(*
    Title: 	Unix Error messages - Definitions
    LastEdit:	"Wed May 19 11:35:01 1982"
    Author: 	Mick Jordan
		Cambridge University Computer Laboratory
*)

DEFINITION MODULE UnixErrors;

EXPORT QUALIFIED
     SYSERRORSTRING, PError, PErrorN, SysNErr, SysErrlist;

TYPE SYSERRORSTRING = ARRAY [0 .. 25] OF CHAR;

CONST SysNErr = 34;			(* maximum entry in SysErrlist*)
VAR SysErrlist: ARRAY [0 .. SysNErr] OF SYSERRORSTRING;
(*  Contains the system error message string (without a newline).
    The error number can be used to index this table directly.
*)

PROCEDURE PError(prompt: ARRAY OF CHAR);
(*  Prints the prompt followed by a ': ' and the message pertaining
    to the error code in ErrnoPtr^. (set by the last UNIXCALL).
*)

PROCEDURE PErrorN(prompt: ARRAY OF CHAR; n: INTEGER);
(*  As above but uses 'n' as the error code.
*)

END UnixErrors .
