EndOps.mesa; Edited by McGregor on October 25, 1982 2:07 pm
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 PROCNARROW[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;
END.