From 710a97992705d67c3ded0d4b270c5978ce29b11f Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Mon, 20 Feb 2017 00:05:37 -0800 Subject: Import Upstream version 5e4 --- ioext.c | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'ioext.c') diff --git a/ioext.c b/ioext.c index 62efc2b..9f4ada7 100644 --- a/ioext.c +++ b/ioext.c @@ -193,49 +193,8 @@ static char s_write_line[] = "write-line"; SCM l_write_line(obj, port) SCM obj, port; { - display(obj, port); - return newline(port); -} - -static char s_file_position[] = "file-position", - s_file_set_pos[] = "file-set-position"; -SCM file_position(port) - SCM port; -{ - long ans; - ASRTER(NIMP(port) && OPFPORTP(port), port, ARG1, s_file_position); - SYSCALL(ans = ftell(STREAM(port));); - if (CRDYP(port)) ans--; - return MAKINUM(ans); - } -SCM file_set_position(port, pos) - SCM port, pos; -{ - SCM ans; - ASRTER(NIMP(port) && OPFPORTP(port), port, ARG1, s_file_set_pos); -#ifndef RECKLESS - if (TRACKED & SCM_PORTFLAGS(port)) { - if (INUM0==pos) { - int i = SCM_PORTNUM(port); - scm_port_table[i].line = 1L; - scm_port_table[i].col = 1; - } - else { - if (2 <= verbose) - scm_warn("Setting file position for tracked port: ", "", port); - SCM_PORTFLAGS(port) &= (~TRACKED); - } - } -#endif - CLRDY(port); /* Clear ungetted char */ - SYSCALL(ans = (fseek(STREAM(port), INUM(pos), 0)) ? BOOL_F : BOOL_T;); -#ifdef HAVE_PIPE -# ifdef ESPIPE - if (!OPIOPORTP(port)) - ASRTER(ESPIPE != errno, port, ARG1, s_file_set_pos); -# endif -#endif - return ans; + scm_display(obj, port); + return scm_newline(port); } static char s_reopen_file[] = "reopen-file"; @@ -792,7 +751,6 @@ SCM l_putenv(str) #endif static iproc subr1s[] = { - {s_file_position, file_position}, {s_fileno, l_fileno}, #ifndef MCH_AMIGA # ifndef vms @@ -877,7 +835,6 @@ SCM scm_try_create_file(fname, modes, perms) #endif static iproc subr2os[] = { - {s_file_set_pos, file_set_position}, {s_read_line1, read_line1}, {s_write_line, l_write_line}, {0, 0}}; -- cgit v1.2.3