1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-19 02:00:26 +02:00

1999-07-25 Gary Houston <ghouston@easynet.co.uk>

* ports.c (scm_putc): fix line-buffering.

(init.c: remove an obsolete comment).
This commit is contained in:
Gary Houston 1999-07-25 17:45:01 +00:00
parent 6c747373c5
commit 1b9c3daec9
4 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,7 @@
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

View file

@ -282,8 +282,6 @@ scm_init_standard_ports ()
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",

View file

@ -771,6 +771,13 @@ scm_putc (c, port)
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;