mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-06 15:40:29 +02:00
1999-08-12 Gary Houston <ghouston@easynet.co.uk>
* ports.c (scm_seek): one more: was scm_lseek. Also changed the Scheme name from lseek to seek, but lseek was added recently so it shouldn't be a big problem. * ports.c, gdbint.c, ioext.c: changed callers.
This commit is contained in:
parent
affc96b533
commit
c94577b445
5 changed files with 23 additions and 16 deletions
|
@ -1,3 +1,10 @@
|
|||
1999-08-12 Gary Houston <ghouston@easynet.co.uk>
|
||||
|
||||
* ports.c (scm_seek): one more: was scm_lseek. Also changed the
|
||||
Scheme name from lseek to seek, but lseek was added recently so
|
||||
it shouldn't be a big problem.
|
||||
* ports.c, gdbint.c, ioext.c: changed callers.
|
||||
|
||||
1999-08-11 Gary Houston <ghouston@easynet.co.uk>
|
||||
|
||||
* fports.c (fport_input_waiting): if select is used, return 1
|
||||
|
|
|
@ -205,10 +205,10 @@ gdb_read (str)
|
|||
}
|
||||
SCM_BEGIN_FOREIGN_BLOCK;
|
||||
unmark_port (gdb_input_port);
|
||||
scm_lseek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_puts (str, gdb_input_port);
|
||||
scm_truncate_file (gdb_input_port, SCM_UNDEFINED);
|
||||
scm_lseek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_seek (gdb_input_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
/* Read one object */
|
||||
tok_buf_mark_p = SCM_GC8MARKP (tok_buf);
|
||||
SCM_CLRGC8MARK (tok_buf);
|
||||
|
@ -267,7 +267,7 @@ gdb_print (obj)
|
|||
RESET_STRING;
|
||||
SCM_BEGIN_FOREIGN_BLOCK;
|
||||
/* Reset stream */
|
||||
scm_lseek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_seek (gdb_output_port, SCM_INUM0, SCM_MAKINUM (SEEK_SET));
|
||||
scm_write (obj, gdb_output_port);
|
||||
scm_truncate_file (gdb_output_port, SCM_UNDEFINED);
|
||||
SEND_STRING (SCM_CHARS (SCM_STREAM (gdb_output_port)));
|
||||
|
|
|
@ -299,7 +299,7 @@ SCM
|
|||
scm_ftell (object)
|
||||
SCM object;
|
||||
{
|
||||
return scm_lseek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
||||
return scm_seek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
||||
}
|
||||
|
||||
SCM_PROC (s_fseek, "fseek", 3, 0, 0, scm_fseek);
|
||||
|
@ -310,7 +310,7 @@ scm_fseek (object, offset, whence)
|
|||
SCM offset;
|
||||
SCM whence;
|
||||
{
|
||||
scm_lseek (object, offset, whence);
|
||||
scm_seek (object, offset, whence);
|
||||
|
||||
return SCM_UNSPECIFIED;
|
||||
}
|
||||
|
|
|
@ -978,9 +978,9 @@ scm_unread_string (str, port)
|
|||
return str;
|
||||
}
|
||||
|
||||
SCM_PROC (s_lseek, "lseek", 3, 0, 0, scm_lseek);
|
||||
SCM_PROC (s_seek, "seek", 3, 0, 0, scm_seek);
|
||||
SCM
|
||||
scm_lseek (SCM object, SCM offset, SCM whence)
|
||||
scm_seek (SCM object, SCM offset, SCM whence)
|
||||
{
|
||||
off_t off;
|
||||
off_t rv;
|
||||
|
@ -988,18 +988,18 @@ scm_lseek (SCM object, SCM offset, SCM whence)
|
|||
|
||||
object = SCM_COERCE_OUTPORT (object);
|
||||
|
||||
off = scm_num2long (offset, (char *)SCM_ARG2, s_lseek);
|
||||
SCM_ASSERT (SCM_INUMP (whence), whence, SCM_ARG3, s_lseek);
|
||||
off = scm_num2long (offset, (char *)SCM_ARG2, s_seek);
|
||||
SCM_ASSERT (SCM_INUMP (whence), whence, SCM_ARG3, s_seek);
|
||||
how = SCM_INUM (whence);
|
||||
if (how != SEEK_SET && how != SEEK_CUR && how != SEEK_END)
|
||||
scm_out_of_range (s_lseek, whence);
|
||||
scm_out_of_range (s_seek, whence);
|
||||
if (SCM_NIMP (object) && SCM_OPPORTP (object))
|
||||
{
|
||||
scm_port *pt = SCM_PTAB_ENTRY (object);
|
||||
scm_ptob_descriptor *ptob = scm_ptobs + SCM_PTOBNUM (object);
|
||||
|
||||
if (!ptob->seek)
|
||||
scm_misc_error (s_lseek, "port is not seekable",
|
||||
scm_misc_error (s_seek, "port is not seekable",
|
||||
scm_cons (object, SCM_EOL));
|
||||
else
|
||||
{
|
||||
|
@ -1013,10 +1013,10 @@ scm_lseek (SCM object, SCM offset, SCM whence)
|
|||
}
|
||||
else /* file descriptor?. */
|
||||
{
|
||||
SCM_ASSERT (SCM_INUMP (object), object, SCM_ARG1, s_lseek);
|
||||
SCM_ASSERT (SCM_INUMP (object), object, SCM_ARG1, s_seek);
|
||||
rv = lseek (SCM_INUM (object), off, how);
|
||||
if (rv == -1)
|
||||
scm_syserror (s_lseek);
|
||||
scm_syserror (s_seek);
|
||||
}
|
||||
return scm_long2num (rv);
|
||||
}
|
||||
|
@ -1037,7 +1037,7 @@ scm_truncate_file (SCM object, SCM length)
|
|||
if (SCM_NIMP (object) && SCM_ROSTRINGP (object))
|
||||
scm_wrong_num_args (scm_makfrom0str (s_truncate_file));
|
||||
|
||||
length = scm_lseek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
||||
length = scm_seek (object, SCM_INUM0, SCM_MAKINUM (SEEK_CUR));
|
||||
}
|
||||
c_length = scm_num2long (length, (char *)SCM_ARG2, s_truncate_file);
|
||||
if (c_length < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue