Implement FRESH-LINE operation for generic, file, and console ports.
authorChris Hanson <org/chris-hanson/cph>
Tue, 16 Feb 1999 05:43:24 +0000 (05:43 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 16 Feb 1999 05:43:24 +0000 (05:43 +0000)
v7/src/runtime/ttyio.scm
v8/src/runtime/runtime.pkg

index 4c890c69be0aa163e8349cb77a256562276b06ff..ae9ed3199211eb6432e328e9816083ecf82ca6a6 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: ttyio.scm,v 1.7 1999/02/16 05:39:29 cph Exp $
+$Id: ttyio.scm,v 1.8 1999/02/16 05:43:24 cph Exp $
 
 Copyright (c) 1991-1999 Massachusetts Institute of Technology
 
@@ -183,7 +183,10 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 (define (operation/fresh-line port)
   (if (not (output-buffer/line-start? (port/output-buffer port)))
-      (operation/write-char port #\newline)))
+      (begin
+       (operation/write-char port #\newline)
+       (if transcript-port
+           (operation/write-char transcript-port #\newline)))))
 
 (define (operation/flush-output port)
   (output-buffer/drain-block (port/output-buffer port))
index afbebd20e8d868b3bfa96cf67da8b124bf0b8aa4..5a2d15f7540230a0e96afba78e56ce1532bf758a 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: runtime.pkg,v 14.314 1999/02/16 05:23:07 cph Exp $
+$Id: runtime.pkg,v 14.315 1999/02/16 05:39:45 cph Exp $
 
 Copyright (c) 1988-1999 Massachusetts Institute of Technology
 
@@ -944,6 +944,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
          operation/discard-chars
          operation/eof?
          operation/flush-output
+         operation/fresh-line
          operation/input-blocking-mode
          operation/input-buffer-size
          operation/input-channel
@@ -1864,6 +1865,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
          output-buffer/channel
          output-buffer/close
          output-buffer/drain-block
+         output-buffer/line-start?
          output-buffer/open?
          output-buffer/set-size
          output-buffer/size
@@ -1893,6 +1895,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
          output-buffer/buffered-chars
          output-buffer/channel
          output-buffer/drain-block
+         output-buffer/line-start?
          output-buffer/set-size
          output-buffer/size
          output-buffer/write-char-block