New input port operation 'INPUT-LINE.
authorJoe Marshall <jmarshall@alum.mit.edu>
Wed, 24 Mar 2010 16:14:10 +0000 (09:14 -0700)
committerJoe Marshall <jmarshall@alum.mit.edu>
Wed, 24 Mar 2010 16:14:10 +0000 (09:14 -0700)
src/runtime/input.scm
src/runtime/runtime.pkg

index d3d55afff576d0e65d24e124b952200b1b21ec8c..fde4fb73a650eebc2a8c829e117766b9f4d090af 100644 (file)
@@ -131,6 +131,11 @@ USA.
   (let ((eof? (port/operation port 'EOF?)))
     (and eof?
         (eof? port))))
+
+(define (input-port/line port)
+  (let ((operation (port/operation port 'INPUT-LINE)))
+    (and operation
+        (operation port))))
 \f
 ;;;; High level
 
index 28fb7de1a82dc5a7eca1dcc51ea5c7cf6d640d36..e5525005dde457b49cc3efc323430e3118880fd1 100644 (file)
@@ -2146,6 +2146,7 @@ USA.
          input-port/%read-char
          input-port/%peek-char
          input-port/char-ready?
+         input-port/line
          input-port/discard-chars
          input-port/eof?
          input-port/peek-char