From 1334c61ab0b971624e05993094b1c9b1d88c3b85 Mon Sep 17 00:00:00 2001 From: Gary Houston Date: Sat, 1 Jun 2002 17:14:17 +0000 Subject: [PATCH 1/1] * boot-9.scm (file-set-position): use seek, not fseek. Make third argument optional, for better SCM compatibility. (file-position): simplify definition. --- ice-9/ChangeLog | 6 ++++++ ice-9/boot-9.scm | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ice-9/ChangeLog b/ice-9/ChangeLog index a7201200e..ae3084e87 100644 --- a/ice-9/ChangeLog +++ b/ice-9/ChangeLog @@ -1,3 +1,9 @@ +2002-06-01 Gary Houston + + * boot-9.scm (file-set-position): Make third argument optional, + for SCM compatibility. + (file-position): simplify definition. + 2002-06-01 Marius Vollmer * boot-9.scm (file-set-position): Use seek instead of fseek. diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index 73878cdb6..e51bf39bd 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -525,8 +525,10 @@ (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) -- 2.20.1