#| -*-Scheme-*-
-$Id: docstr.scm,v 1.1 1993/09/03 04:41:53 cph Exp $
+$Id: docstr.scm,v 1.2 1994/11/20 05:06:04 cph Exp $
-Copyright (c) 1993 Massachusetts Institute of Technology
+Copyright (c) 1993-94 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(guarantee-doc-string-state)
(let* ((channel *doc-string-channel*)
(buffer *doc-string-buffer*)
- (flen (file-length channel))
+ (flen (channel-file-length channel))
(nlen (string-length name))
(delta (fix:- flen (fix:+ posn 2))))
(if (fix:< delta 0)
(out-of-range))
- (file-set-position channel posn)
+ (channel-file-set-position channel posn)
(let ((blen (min doc-string-buffer-length delta)))
(fill-buffer channel buffer 0 blen)
(let* ((dslen (fix:+ (vector-8b-ref buffer 0)
;;; -*-Scheme-*-
;;;
-;;; $Id: fileio.scm,v 1.120 1994/05/04 22:56:34 cph Exp $
+;;; $Id: fileio.scm,v 1.121 1994/11/20 05:06:21 cph Exp $
;;;
;;; Copyright (c) 1986, 1989-94 Massachusetts Institute of Technology
;;;
(define (group-insert-file! group index truename)
(let ((filename (->namestring truename)))
(let ((channel (file-open-input-channel filename)))
- (let ((length (file-length channel)))
+ (let ((length (channel-file-length channel)))
(bind-condition-handler (list condition-type:allocation-failure)
(lambda (condition)
condition
#| -*-Scheme-*-
-$Id: fileio.scm,v 1.7 1993/10/21 14:52:36 cph Exp $
+$Id: fileio.scm,v 1.8 1994/11/20 05:04:35 cph Exp $
-Copyright (c) 1991-1993 Massachusetts Institute of Technology
+Copyright (c) 1991-94 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(pathname false read-only true))
(define (operation/length port)
- (file-length (operation/input-channel port)))
+ (channel-file-length (operation/input-channel port)))
(define (operation/pathname port)
(file-state/pathname (port/state port)))
#| -*-Scheme-*-
-$Id: io.scm,v 14.38 1994/11/14 00:13:38 cph Exp $
+$Id: io.scm,v 14.39 1994/11/20 05:03:33 cph Exp $
-Copyright (c) 1988-1993 Massachusetts Institute of Technology
+Copyright (c) 1988-94 Massachusetts Institute of Technology
This material was developed by the Scheme project at the Massachusetts
Institute of Technology, Department of Electrical Engineering and
(define (file-open-append-channel filename)
(file-open (ucode-primitive file-open-append-channel 1) filename))
-(define (file-length channel)
+(define (channel-file-length channel)
((ucode-primitive file-length-new 1) (channel-descriptor channel)))
-(define (file-position channel)
+(define (channel-file-position channel)
((ucode-primitive file-position 1) (channel-descriptor channel)))
-(define (file-set-position channel position)
+(define (channel-file-set-position channel position)
((ucode-primitive file-set-position 2) (channel-descriptor channel)
position))
=> (lambda (marker)
(if (and (fix:> n-read 0)
(channel-type=file? channel)
- (fix:= (file-position channel)
- (file-length channel))
+ (fix:=
+ (channel-file-position channel)
+ (channel-file-length channel))
(char=?
(string-ref string
(+ delta
(channel-type=file? channel)
(not (input-buffer/line-translation buffer)) ; Can't tell otherwise
(not (input-buffer/end-marker buffer)) ; Can't tell otherwise
- (let ((n (fix:- (file-length channel) (file-position channel))))
+ (let ((n
+ (fix:- (channel-file-length channel)
+ (channel-file-position channel))))
(and (fix:>= n 0)
(fix:+ (input-buffer/buffered-chars buffer) n))))))
#| -*-Scheme-*-
-$Id: sfile.scm,v 14.13 1994/05/04 22:47:10 cph Exp $
+$Id: sfile.scm,v 14.14 1994/11/20 05:06:56 cph Exp $
Copyright (c) 1988-94 Massachusetts Institute of Technology
(file-open-output-channel output-filename)))
unspecific)
(lambda ()
- (let ((source-length (file-length input-channel))
+ (let ((source-length (channel-file-length input-channel))
(buffer-length 8192))
(if (zero? source-length)
0