mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-31 09:20:23 +02:00
(file-set-position): Make third argument optional,
for SCM compatibility. (file-position): simplify definition.
This commit is contained in:
parent
a3a97bcdcc
commit
cc5eb6357e
1 changed files with 4 additions and 2 deletions
|
@ -544,8 +544,10 @@
|
||||||
(define (tms:cutime obj) (vector-ref obj 3))
|
(define (tms:cutime obj) (vector-ref obj 3))
|
||||||
(define (tms:cstime obj) (vector-ref obj 4))
|
(define (tms:cstime obj) (vector-ref obj 4))
|
||||||
|
|
||||||
(define (file-position . args) (apply ftell args))
|
(define file-position ftell)
|
||||||
(define (file-set-position . args) (apply fseek args))
|
(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)
|
(define (move->fdes fd/port fd)
|
||||||
(cond ((integer? fd/port)
|
(cond ((integer? fd/port)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue