gm2-libs/IO
DEFINITION MODULE IO ;
(*
Description: provides Read, Write, Errors procedures that map onto UNIX
file descriptors 0, 1 and 2. This is achieved by using
FIO if we are in buffered mode and using libc.write
if not.
*)
EXPORT QUALIFIED Read, Write, Error,
UnBufferedMode, BufferedMode,
EchoOn, EchoOff ;
PROCEDURE Read (VAR ch: CHAR) ;
PROCEDURE Write (ch: CHAR) ;
PROCEDURE Error (ch: CHAR) ;
(*
UnBufferedMode - places file descriptor, fd, into an unbuffered mode.
*)
PROCEDURE UnBufferedMode (fd: INTEGER; input: BOOLEAN) ;
(*
BufferedMode - places file descriptor, fd, into a buffered mode.
*)
PROCEDURE BufferedMode (fd: INTEGER; input: BOOLEAN) ;
(*
EchoOn - turns on echoing for file descriptor, fd. This
only really makes sence for a file descriptor opened
for terminal input or maybe some specific file descriptor
which is attached to a particular piece of hardware.
*)
PROCEDURE EchoOn (fd: INTEGER; input: BOOLEAN) ;
(*
EchoOff - turns off echoing for file descriptor, fd. This
only really makes sence for a file descriptor opened
for terminal input or maybe some specific file descriptor
which is attached to a particular piece of hardware.
*)
PROCEDURE EchoOff (fd: INTEGER; input: BOOLEAN) ;
END IO.