[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

stream-access background information



Here's a summary of some of the extensions we've added to VAX LISP
to make the functionality of CLtL more "complete".  Instead of a new
LISTEN2 function, perhaps we should modify LISTEN to just return a
second value as well.

			---Walter

-----------------------------------------------------------------------

VAX LISP provides access to more detailed  information  about  streams
than is called for in COMMON LISP:  The Language.  VAX LISP provides a
separate data type for each stream type, a predicate for  each  stream
type, functions to retrieve elements that were used to construct streams,
and several new I/O functions.


Stream Data Types and Predicates

  BROADCAST-STREAM     BROADCAST-STREAM-P object

  CONCATENATED-STREAM  CONCATENATED-STREAM-P object

  DRIBBLE-STREAM       DRIBBLE-STREAM-P object

  ECHO-STREAM          ECHO-STREAM-P object

  FILE-STREAM          FILE-STREAM-P object

  STRING-STREAM        STRING-STREAM-P object

  SYNONYM-STREAM       SYNONYM-STREAM-P object

  TERMINAL-STREAM      TERMINAL-STREAM-P object

  TWO-WAY-STREAM       TWO-WAY-STREAM-P object


Stream Informational Functions

  BROADCAST-STREAM-STREAMS broadcast-stream       ==> list of streams

  CONCATENATED-STREAM-STREAMS concatenated-stream ==> list of streams

  ECHO-STREAM-INPUT-STREAM echo-stream            ==> stream

  ECHO-STREAM-OUTPUT-STREAM echo-stream           ==> stream

  SYNONYM-STREAM-SYMBOL synonym-stream            ==> symbol

  TWO-WAY-STREAM-INPUT-STREAM two-way-stream      ==> stream

  TWO-WAY-STREAM-OUTPUT-STREAM two-way-stream     ==> stream


LINE-POSITION &OPTIONAL output-stream

  Returns the number of characters that have been output on the current
  line if that number can be determined and NIL otherwise.

  Output-stream defaults to *STANDARD-OUTPUT*.  If a value of T is
  supplied, the value of *TERMINAL-IO* is used.


LISTEN2 &OPTIONAL input-stream

  Returns two values.  The first is identical to the value  returned  by
  the  COMMON  LISP  LISTEN function; the second is T if end-of-file was
  encountered on the input stream, and NIL otherwise.  You can use  this
  function wherever you would normally use LISTEN.

  Input-stream defaults to *STANDARD-INPUT*.  If a value of T is
  supplied, the value of *TERMINAL-IO* is used.


OPEN-STREAM-P stream

  Returns T if a stream is open, NIL if it is closed.  It is an error
  if the argument is not a stream.
------