#| -*-Scheme-*-
-$Id: input.scm,v 14.28 2004/11/04 03:00:15 cph Exp $
+$Id: input.scm,v 14.29 2004/11/19 06:59:41 cph Exp $
Copyright 1986,1987,1988,1989,1990,1991 Massachusetts Institute of Technology
Copyright 1992,1993,1997,1999,2002,2003 Massachusetts Institute of Technology
(define-integrable (accum-count a)
(cdr a))
-(define-record-type <eof-object>
- (%make-eof-object port)
- eof-object?
- (port eof-object-port))
-
(define (make-eof-object port)
- (if port
- (begin
- (guarantee-input-port port 'MAKE-EOF-OBJECT)
- (or (port/eof-object port)
- (let ((eof (%make-eof-object port)))
- (set-port/eof-object! port eof)
- eof)))
- (or saved-eof-object
- (let ((eof (%make-eof-object port)))
- (set! saved-eof-object eof)
- eof))))
-
-(define saved-eof-object #f)
+ port
+ (object-new-type (ucode-type constant) 6))
+
+(define (eof-object? object)
+ (eq? object (object-new-type (ucode-type constant) 6)))
\f
;;;; High level
#| -*-Scheme-*-
-$Id: port.scm,v 1.35 2004/11/04 03:00:25 cph Exp $
+$Id: port.scm,v 1.36 2004/11/19 06:59:50 cph Exp $
Copyright 1991,1992,1993,1994,1997,1999 Massachusetts Institute of Technology
Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology
(let ((tport (port/transcript port)))
(if tport
(output-port/discretionary-flush tport))))
-
-(define (port/eof-object port)
- (port/get-property port 'EOF-OBJECT #f))
-
-(define (set-port/eof-object! port eof)
- (port/set-property! port 'EOF-OBJECT eof))
\f
(define (input-port? object)
(and (port? object)
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.514 2004/11/19 06:56:21 cph Exp $
+$Id: runtime.pkg,v 14.515 2004/11/19 07:00:01 cph Exp $
Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology
Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology
with-output-to-port
with-trace-output-port)
(export (runtime input-port)
- port/eof-object
port/operation/char-ready?
port/operation/discard-char
port/operation/peek-char
port/operation/read-external-substring
port/operation/read-substring
port/operation/read-wide-substring
- port/operation/unread-char
- set-port/eof-object!)
+ port/operation/unread-char)
(export (runtime output-port)
port/operation/discretionary-flush-output
port/operation/flush-output
(export ()
char-ready?
discard-char
- eof-object-port
eof-object?
input-port/char-ready?
input-port/discard-char