* boot-9.scm (file-set-position): use seek, not fseek. Make
authorGary Houston <ghouston@arglist.com>
Sat, 1 Jun 2002 17:14:17 +0000 (17:14 +0000)
committerGary Houston <ghouston@arglist.com>
Sat, 1 Jun 2002 17:14:17 +0000 (17:14 +0000)
third argument optional, for better SCM compatibility.
(file-position): simplify definition.

ice-9/ChangeLog
ice-9/boot-9.scm

index a720120..ae3084e 100644 (file)
@@ -1,3 +1,9 @@
+2002-06-01  Gary Houston  <ghouston@arglist.com>
+
+       * boot-9.scm (file-set-position): Make third argument optional,
+       for SCM compatibility.
+       (file-position): simplify definition.
+
 2002-06-01  Marius Vollmer  <mvo@zagadka.ping.de>
 
        * boot-9.scm (file-set-position): Use seek instead of fseek.
index 73878cd..e51bf39 100644 (file)
 (define (tms:cutime obj) (vector-ref obj 3))
 (define (tms:cstime obj) (vector-ref obj 4))
 
-(define (file-position . args) (apply ftell args))
-(define (file-set-position . args) (apply seek args))
+(define file-position ftell)
+(define (file-set-position port offset . whence)
+  (let ((whence (if (eq? whence '()) SEEK_SET (car whence))))
+    (seek port offset whence)))
 
 (define (move->fdes fd/port fd)
   (cond ((integer? fd/port)