From: Chris Hanson Date: Fri, 24 Feb 2006 17:42:51 +0000 (+0000) Subject: Export port-property operations. Make sure 'transcript property is X-Git-Tag: 20090517-FFI~1089 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=95a2ab04aa5126f5aafee5e5953c7ac3091f595f;p=mit-scheme.git Export port-property operations. Make sure 'transcript property is removed when not in use. --- diff --git a/v7/src/runtime/port.scm b/v7/src/runtime/port.scm index 6dffc1f8c..61f375e6e 100644 --- a/v7/src/runtime/port.scm +++ b/v7/src/runtime/port.scm @@ -1,9 +1,9 @@ #| -*-Scheme-*- -$Id: port.scm,v 1.41 2005/12/31 15:43:42 cph Exp $ +$Id: port.scm,v 1.42 2006/02/24 17:42:50 cph Exp $ Copyright 1991,1992,1993,1994,1997,1999 Massachusetts Institute of Technology -Copyright 2001,2002,2003,2004,2005 Massachusetts Institute of Technology +Copyright 2001,2002,2003,2004,2005,2006 Massachusetts Institute of Technology This file is part of MIT/GNU Scheme. @@ -635,11 +635,17 @@ USA. (set-cdr! p value) (set-port/properties! port (cons (cons name value) alist)))))) +(define (port/remove-property! port name) + (guarantee-symbol name 'PORT/REMOVE-PROPERTY!) + (set-port/properties! port (del-assq! name (port/properties port)))) + (define (port/transcript port) (port/get-property port 'TRANSCRIPT #f)) (define (set-port/transcript! port tport) - (port/set-property! port 'TRANSCRIPT tport)) + (if tport + (port/set-property! port 'TRANSCRIPT tport) + (port/remove-property! port 'TRANSCRIPT))) (define (transcribe-char char port) (let ((tport (port/transcript port))) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index 899b8c891..94901643f 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.573 2006/02/02 01:02:07 cph Exp $ +$Id: runtime.pkg,v 14.574 2006/02/24 17:42:51 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -1907,6 +1907,7 @@ USA. port-type? port/coding port/copy + port/get-property port/input-blocking-mode port/input-channel port/input-terminal-mode @@ -1920,12 +1921,14 @@ USA. port/output-blocking-mode port/output-channel port/output-terminal-mode + port/remove-property! port/set-coding port/set-input-blocking-mode port/set-input-terminal-mode port/set-line-ending port/set-output-blocking-mode port/set-output-terminal-mode + port/set-property! port/state port/supports-coding? port/thread-mutex