1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-10 05:50: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

2
NEWS
View file

@ -991,7 +991,7 @@ work on any kind of port, not just ports which are open on a file.
** 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

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;