EndOps.mesa; Written by S. McGregor
Edited by McGregor on July 21, 1983 11:00 am
Last Edited by: Maxwell, January 3, 1983 10:29 am
DIRECTORY
Atom USING [GetProp, PutProp];
EndOps: CEDAR DEFINITIONS IMPORTS Atom = BEGIN
Procedures registered will be called synchronously after the user input is enabled, but before any automatic checkpoint takes place.
Register:
PROC [proc:
PROC] =
INLINE
BEGIN
registerList: LIST OF REF PROC ← NARROW[Atom.GetProp[$EndOps, $Registry]];
procRef: REF PROC ~ NEW[PROC ← proc];
IF registerList = NIL THEN registerList ← CONS[procRef, NIL]
ELSE
BEGIN
temp: LIST OF REF PROC ← registerList;
UNTIL temp.rest = NIL DO temp ← temp.rest; ENDLOOP;
temp.rest ← CONS[procRef, NIL];
END;
Atom.PutProp[$EndOps, $Registry, registerList];
END;