diff options
Diffstat (limited to 'Tscript.scm')
-rw-r--r-- | Tscript.scm | 25 |
1 files changed, 23 insertions, 2 deletions
diff --git a/Tscript.scm b/Tscript.scm index 22b80ea..a238c61 100644 --- a/Tscript.scm +++ b/Tscript.scm @@ -1,3 +1,22 @@ +;;;; "Tscript.scm" transcript-on and transcript-off. +;; Copyright (C) 1999 Free Software Foundation, Inc. +;; +;; This program is free software: you can redistribute it and/or modify +;; it under the terms of the GNU Lesser General Public License as +;; published by the Free Software Foundation, either version 3 of the +;; License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; Lesser General Public License for more details. +;; +;; You should have received a copy of the GNU Lesser General Public +;; License along with this program. If not, see +;; <http://www.gnu.org/licenses/>. + +;;; Author: Radey Shouman + (define transcript-on #f) (define transcript-off #f) @@ -24,7 +43,9 @@ (and (input-port? port) (lambda () (let ((c (read-char port))) - (write-char c trans) + (if (eof-object? c) + (close-output-port trans) + (write-char c trans)) c))) (lambda () (close-port port))) @@ -57,4 +78,4 @@ (set! transcript-on trans-on) (set! transcript-off trans-off)) -(provide 'transcript)
\ No newline at end of file +(provide 'transcript) |