mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-11 06:20:23 +02:00
* ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
to convert the returned value. (scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert the offset argument.
This commit is contained in:
parent
5ce61f2470
commit
8588fa1267
2 changed files with 13 additions and 3 deletions
|
@ -2,6 +2,13 @@ Mon Dec 9 10:10:38 1996 Tom Tromey <tromey@cygnus.com>
|
|||
|
||||
* inet_aton.c: Use #if 0, not #ifdef 0.
|
||||
|
||||
Mon Dec 9 06:36:48 1996 Gary Houston <ghouston@actrix.gen.nz>
|
||||
|
||||
* ioext.c (scm_sys_ftell): use scm_long2num instead of SCM_MAKINUM
|
||||
to convert the returned value.
|
||||
(scm_sys_fseek): use scm_num2long instead of SCM_INUM to convert
|
||||
the offset argument.
|
||||
|
||||
Sun Dec 8 21:06:38 1996 Jim Blandy <jimb@duality.gnu.ai.mit.edu>
|
||||
|
||||
Add new interface to catch/throw, usable from C as well as
|
||||
|
|
|
@ -69,7 +69,7 @@ scm_sys_ftell (port)
|
|||
scm_syserror (s_sys_ftell);
|
||||
if (pos > 0 && SCM_CRDYP (port))
|
||||
pos--;
|
||||
return SCM_MAKINUM (pos);
|
||||
return scm_long2num (pos);
|
||||
}
|
||||
|
||||
|
||||
|
@ -83,13 +83,16 @@ scm_sys_fseek (port, offset, whence)
|
|||
SCM whence;
|
||||
{
|
||||
int rv;
|
||||
long loff;
|
||||
|
||||
SCM_ASSERT (SCM_NIMP (port) && SCM_OPFPORTP (port), port, SCM_ARG1, s_sys_fseek);
|
||||
SCM_ASSERT (SCM_INUMP (offset), offset, SCM_ARG2, s_sys_fseek);
|
||||
loff = scm_num2long (offset, (char *)SCM_ARG2, s_sys_fseek);
|
||||
SCM_ASSERT (SCM_INUMP (whence) && (SCM_INUM (whence) < 3) && (SCM_INUM (whence) >= 0),
|
||||
whence, SCM_ARG3, s_sys_fseek);
|
||||
|
||||
SCM_CLRDY (port); /* Clear ungetted char */
|
||||
/* Values of whence are interned in scm_init_ioext. */
|
||||
rv = fseek ((FILE *)SCM_STREAM (port), SCM_INUM (offset), SCM_INUM (whence));
|
||||
rv = fseek ((FILE *)SCM_STREAM (port), loff, SCM_INUM (whence));
|
||||
if (rv != 0)
|
||||
scm_syserror (s_sys_fseek);
|
||||
return SCM_UNSPECIFIED;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue