This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

[BUG] soft portsb


Hello,

   I think that following code is not correct:

guile-1.3.4/libguile/vports.c:

	static void
	sf_write (SCM port, void *data, size_t size)
	{
	  SCM p = SCM_STREAM (port);
	
	  scm_apply (SCM_VELTS (p)[1], scm_cons (scm_makfrom0str ((char *) data),
						 SCM_EOL),
		     SCM_EOL);
	}

  IMHO there should be scm_makfromstr ((char *) data, size, 0) - otherwise
  (newline softport) creates garbage: scm_newline calls scm_putc and scm_putc
  calls scm_lfwrite (&c, 1, port)  /* c is newline character */ - but it is not
  guaranteed that "char *" &c is terminated by \000.... :-(

Daniel Skarda

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]