#| -*-Scheme-*-
-$Id: input.scm,v 14.36 2007/07/07 17:22:19 cph Exp $
+$Id: input.scm,v 14.37 2007/09/12 23:35:00 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
(define (eof-object? object)
(eq? object (object-new-type (ucode-type constant) 6)))
+
+(define (input-port/eof? port)
+ (let ((eof? (port/operation port 'EOF?)))
+ (and eof?
+ (eof? port))))
\f
;;;; High level
(let ((port (optional-input-port port 'READ-CHAR-NO-HANG)))
(if (input-port/char-ready? port)
(input-port/read-char port)
- (let ((eof? (port/operation port 'EOF?)))
- (and eof?
- (eof? port)
- (eof-object))))))
+ (and (input-port/eof? port)
+ (eof-object)))))
(define (read-string delimiters #!optional port)
(input-port/read-string (optional-input-port port 'READ-STRING) delimiters))
#| -*-Scheme-*-
-$Id: runtime.pkg,v 14.625 2007/08/10 19:07:13 cph Exp $
+$Id: runtime.pkg,v 14.626 2007/09/12 23:35:01 cph Exp $
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
eof-object?
input-port/char-ready?
input-port/discard-chars
+ input-port/eof?
input-port/peek-char
input-port/read-char
input-port/read-external-string!