Redesign ports. New design supports bidirectional ports. Old code
authorChris Hanson <org/chris-hanson/cph>
Fri, 15 Nov 1991 05:15:24 +0000 (05:15 +0000)
committerChris Hanson <org/chris-hanson/cph>
Fri, 15 Nov 1991 05:15:24 +0000 (05:15 +0000)
commitb3432362982691c8bc0ae4d0f5205deb558e391f
tree01a29a05b041977fb4ba72117a1b61acd5959e1a
parent244c2c02ef2962dd93a035b2ab6e0189efe427f9
Redesign ports.  New design supports bidirectional ports.  Old code
should continue to work, with two (unlikely) exceptions: the
input/output port pairs for sockets and processes are now implemented
as bidirectional ports, and closing one of the ports automatically
closes the other as well.

* New procedures:

CLOSE-PORT
I/O-PORT?
MAKE-GENERIC-I/O-PORT
MAKE-I/O-PORT
OPEN-I/O-FILE
PORT/COPY
PORT/INPUT-CHANNEL
PORT/OPERATION
PORT/OPERATION-NAMES
PORT/OUTPUT-CHANNEL
PORT/STATE
PORT?
SET-PORT/STATE!
SUBPROCESS-I/O-PORT

* New global variable CONSOLE-I/O-PORT identifies the bidirectional
  port that communicates with Scheme's console.  CONSOLE-INPUT-PORT
  and CONSOLE-OUTPUT-PORT are initially EQ? to this port.

* Obsolete procedures:

Old name New name
---------------------------- --------------------
INPUT-PORT/CHANNEL PORT/INPUT-CHANNEL
INPUT-PORT/COPY PORT/COPY
INPUT-PORT/CUSTOM-OPERATION PORT/OPERATION
INPUT-PORT/OPERATION PORT/OPERATION
INPUT-PORT/OPERATION-NAMES PORT/OPERATION-NAMES
INPUT-PORT/STATE PORT/STATE
OUTPUT-PORT/CHANNEL PORT/OUTPUT-CHANNEL
OUTPUT-PORT/COPY PORT/COPY
OUTPUT-PORT/CUSTOM-OPERATION PORT/OPERATION
OUTPUT-PORT/OPERATION PORT/OPERATION
OUTPUT-PORT/OPERATION-NAMES PORT/OPERATION-NAMES
OUTPUT-PORT/STATE PORT/STATE
SET-INPUT-PORT/STATE! SET-PORT/STATE!
SET-OUTPUT-PORT/STATE! SET-PORT/STATE!
SUBPROCESS-INPUT-PORT SUBPROCESS-I/O-PORT
SUBPROCESS-OUTPUT-PORT SUBPROCESS-I/O-PORT

  For now these procedures still exist.

* Obsolete input-port operations:

Old name New name
--------------- ---------------------
BUFFER-SIZE INPUT-BUFFER-SIZE
BUFFERED-CHARS BUFFERED-INPUT-CHARS
CHANNEL INPUT-CHANNEL
SET-BUFFER-SIZE SET-INPUT-BUFFER-SIZE

  INPUT-PORT/OPERATION and INPUT-PORT/CUSTOM-OPERATION perform these
  translations so your programs should continue to work.

* Obsolete output-port operations:

Old name New name
--------------- ---------------------
BUFFER-SIZE OUTPUT-BUFFER-SIZE
BUFFERED-CHARS BUFFERED-OUTPUT-CHARS
CHANNEL OUTPUT-CHANNEL
SET-BUFFER-SIZE SET-OUTPUT-BUFFER-SIZE

  OUTPUT-PORT/OPERATION and OUTPUT-PORT/CUSTOM-OPERATION perform these
  translations so your programs should continue to work.

* The ASSOCIATED-PORT operation is no longer implemented by any
  runtime system port.  Ports that previously supported this operation
  are now bidirectional.

* WITH-INPUT-FROM-FILE and WITH-OUTPUT-TO-FILE no longer close the
  port when they are exited abnormally.

* Change cold-boot sequence to permit records to be used in most of
  runtime system.

* New procedure RECORD-COPY.

* New files "genio.scm", "fileio.scm", and "ttyio.scm" replace old
  files "genin.scm", "genout.scm", "filein.scm", "filout.scm",
  "ttyin.scm", and "ttyout.scm".

* New file "port.scm".
v7/src/runtime/input.scm
v7/src/runtime/make.scm
v7/src/runtime/output.scm
v7/src/runtime/process.scm
v7/src/runtime/record.scm
v7/src/runtime/runtime.pkg
v7/src/runtime/socket.scm
v8/src/runtime/make.scm
v8/src/runtime/runtime.pkg