21 lines
484 B
Modula-2
21 lines
484 B
Modula-2
DEFINITION MODULE Traps;
|
|
|
|
IMPORT EM;
|
|
|
|
TYPE TrapHandler = EM.TrapHandler;
|
|
|
|
PROCEDURE InstallTrapHandler(t: TrapHandler): TrapHandler;
|
|
(* Install a new trap handler, and return the previous one.
|
|
Parameter of trap handler is the trap number.
|
|
*)
|
|
|
|
PROCEDURE Message(str: ARRAY OF CHAR);
|
|
(* Write message "str" on standard error, preceeded by filename and
|
|
linenumber if possible
|
|
*)
|
|
|
|
PROCEDURE Trap(n: INTEGER);
|
|
(* cause trap number "n" to occur *)
|
|
|
|
END Traps.
|