* ports.c (scm_putc): fix line-buffering.
(init.c: remove an obsolete comment).
** The procedure truncate-file now works on string ports as well
as file ports. If the size argument is omitted, the current
-file position is now used.
+file position is used.
** new procedure: lseek PORT/FDES OFFSET WHENCE
The arguments are the same as for the old fseek procedure, but it
+1999-07-25 Gary Houston <ghouston@easynet.co.uk>
+
+ * ports.c (scm_putc): fix line-buffering.
+
1999-07-25 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
* ports.c, ports.h, fports.c, strports.c, vports.c: Renamed
buffered input on stdin can reset \ex{(current-input-port)} to
block buffering for higher performance. */
- /* stdout and stderr are also now unbuffered if connected to
- a terminal, since line buffered output is no longer available. */
scm_def_inp
= scm_standard_stream_to_port (0,
isatty (0) ? "r0" : "r",
if (pt->write_pos == pt->write_end)
ptob->fflush (port);
+ else
+ {
+ /* check for line-buffering. */
+ if ((SCM_CAR (port) & SCM_BUFLINE)
+ && c == '\n')
+ ptob->fflush (port);
+ }
if (pt->rw_random)
pt->rw_active = SCM_PORT_WRITE;