* * ports.c (scm_drain_input): new procedure.
authorJim Blandy <jimb@red-bean.com>
Wed, 9 Jun 1999 12:17:53 +0000 (12:17 +0000)
committerJim Blandy <jimb@red-bean.com>
Wed, 9 Jun 1999 12:17:53 +0000 (12:17 +0000)
ports.h: prototype.
* fports.c (FPORT_READ_SAFE, FPORT_WRITE_SAFE, FPORT_ALL_OKAY,
pre_read, pre_write): removed.
(local_fputc, local_fputs, local_ffwrite): use write, not stdio.
(scm_standard_stream_to_port): change first arg from FILE * to
int fdes.
(local_fflush): flush fdes, not FILE *.
* fports.h (SCM_NOFTELL): removed.
* genio.c, ports.c: don't include filesys.h.
* genio.c (scm_getc): don't use scm_internal_select if FPORT.
do it in fports.c:local_fgetc.
* genio.c: don't use SCM_SYSCALL when calling ptob procedures.
do it where it's needed in the port smobs.
* filesys.c (scm_input_waiting_p): moved to fports.c, stdio
  buffer support removed.  take SCM arg, not FILE *.
* filesys.h: prototype moved too.
* fports.c (scm_fdes_to_port): new procedure.
(local_fgetc): use read not fgetc.
(local_fclose): use close, not fclose.
(local_fgets): use read, not fgets
* fports.h: prototype for scm_fdes_to_port.
* fports.h (scm_fport): new struct.
* fports.c (scm_open_file): use open, not fopen.
#include fcntl.h
* ports.h (struct scm_port_table): change stream from SCM to void *.
* ports.c (scm_add_to_port_table): check for memory allocation error.
(scm_prinport): remove MSDOS hair.
(scm_void_port): set stream to 0 instead of SCM_BOOL_F.
(scm_close_port): don't throw errors: do it in fports.c.

libguile/filesys.h

index 12f8a3b..cf0803e 100644 (file)
@@ -74,7 +74,6 @@ extern SCM scm_closedir SCM_P ((SCM port));
 extern SCM scm_chdir SCM_P ((SCM str));
 extern SCM scm_getcwd SCM_P ((void));
 extern SCM scm_select SCM_P ((SCM reads, SCM writes, SCM excepts, SCM secs, SCM msecs));
-extern int scm_input_waiting_p SCM_P ((FILE *file, const char *caller));
 extern SCM scm_fcntl (SCM object, SCM cmd, SCM value);
 extern SCM scm_fsync (SCM object);
 extern SCM scm_symlink SCM_P ((SCM oldpath, SCM newpath));