1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-23 03:54:12 +02:00

* fports.c (scm_fdes_to_port): always set rw_random if the fdes is

random access.  rw_active needs to be maintained even for single
	directional ports, otherwise scm_seek and probably other things are
	broken.  (thanks to Roland Orre).

	* strports.c (scm_mkstrport): set rw_random to 1 unconditionally.

	* ports.c (scm_add_to_port_table): initialise rw_random to 0.

	* ports.h (scm_port): change the comments on rw_random and rw_active.
This commit is contained in:
Gary Houston 1999-10-18 20:49:29 +00:00
parent 4fcd6551ff
commit 0de97b83c0
5 changed files with 25 additions and 14 deletions

View file

@ -113,16 +113,16 @@ typedef struct
unsigned char shortbuf; /* buffer for "unbuffered" streams. */
int rw_random; /* true if the port is bidirectional and
random access. implies that the buffers
must be flushed before switching between
reading and writing. */
int rw_random; /* true if the port is random access.
implies that the buffers must be
flushed before switching between
reading and writing, seeking, etc. */
enum scm_port_rw_active rw_active; /* for bidirectional random
ports, indicates which of the
buffers is currently in use. can
be SCM_PORT_WRITE, SCM_PORT_READ,
or 0. */
enum scm_port_rw_active rw_active; /* for random access ports,
indicates which of the buffers
is currently in use. can be
SCM_PORT_WRITE, SCM_PORT_READ,
or SCM_PORT_NEITHER. */
/* a buffer for un-read chars and strings. */