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:
parent
6c747373c5
commit
1b9c3daec9
4 changed files with 12 additions and 3 deletions
2
NEWS
2
NEWS
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue