DEFINITION MODULE StdIO ; (* Author : Gaius Mulley Title : StdIO Date : 12/2/86 [$Date: 1996/05/28 10:13:06 $] SYSTEM : UNIX SUN and Logitech M2 Description: Exports a general Read and Write procedure that ALL character processes should use. Version : $Revision: 1.1.1.1 $ *) (* Log : $Log: StdIO.def,v $ Log : Revision 1.1.1.1 1996/05/28 10:13:06 gaius Log : Modula-2 compiler sources imported Log : *) EXPORT QUALIFIED ProcRead, ProcWrite, Read, Write, PushOutput, PopOutput, GetCurrentOutput ; TYPE ProcWrite = PROCEDURE (CHAR) ; ProcRead = PROCEDURE (VAR CHAR) ; (* Read - is the generic procedure that all higher application layers should use to receive a character. *) PROCEDURE Read (VAR ch: CHAR) ; (* Write - is the generic procedure that all higher application layers should use to emit a character. *) PROCEDURE Write (ch: CHAR) ; (* PushOutput - pushes the current Write procedure onto a stack, any future references to Write will actually invoke procedure, p. *) PROCEDURE PushOutput (p: ProcWrite) ; (* PopOutput - restores Write to use the previous output procedure. *) PROCEDURE PopOutput ; (* GetCurrentOutput - returns the current output procedure. *) PROCEDURE GetCurrentOutput () : ProcWrite ; END StdIO.