From 8201c704c3047771638612000d2508d05394e38a Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 14 Sep 2004 20:00:27 +0000 Subject: [PATCH] Implement SET-PORT/TYPE!. --- v7/src/runtime/port.scm | 8 ++++++-- v7/src/runtime/runtime.pkg | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/v7/src/runtime/port.scm b/v7/src/runtime/port.scm index a987cdd41..f87301df1 100644 --- a/v7/src/runtime/port.scm +++ b/v7/src/runtime/port.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: port.scm,v 1.33 2004/05/26 15:20:09 cph Exp $ +$Id: port.scm,v 1.34 2004/09/14 20:00:05 cph Exp $ Copyright 1991,1992,1993,1994,1997,1999 Massachusetts Institute of Technology Copyright 2001,2002,2003,2004 Massachusetts Institute of Technology @@ -513,7 +513,7 @@ USA. (define-structure (port (type-descriptor ) (conc-name port/) (constructor %make-port (%type %state))) - (%type #f read-only #t) + %type %state (%thread-mutex (make-thread-mutex)) (unread #f) @@ -528,6 +528,10 @@ USA. (guarantee-port port 'PORT/TYPE) (port/%type port)) +(define (set-port/type! port type) + (guarantee-port port 'SET-PORT/TYPE!) + (set-port/%type! port type)) + (define (port/state port) (guarantee-port port 'PORT/STATE) (port/%state port)) diff --git a/v7/src/runtime/runtime.pkg b/v7/src/runtime/runtime.pkg index ddc6f5fc1..173ec24c3 100644 --- a/v7/src/runtime/runtime.pkg +++ b/v7/src/runtime/runtime.pkg @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: runtime.pkg,v 14.490 2004/07/15 04:05:16 cph Exp $ +$Id: runtime.pkg,v 14.491 2004/09/14 20:00:27 cph Exp $ Copyright 1988,1989,1990,1991,1992,1993 Massachusetts Institute of Technology Copyright 1994,1995,1996,1997,1998,1999 Massachusetts Institute of Technology @@ -1074,6 +1074,7 @@ USA. console-output-port set-console-i/o-port!) (export (runtime emacs-interface) + set-port/type! the-console-port) (initialization (initialize-package!))) -- 2.25.1