DefaultRemoteNamesImpl.mesa
Copyright © 1984 by Xerox Corporation. All rights reserved.
Russ Atkinson, July 11, 1984 8:07:13 pm PDT
DIRECTORY
DefaultRemoteNames,
Rope USING [ROPE];
DefaultRemoteNamesImpl: CEDAR MONITOR
EXPORTS DefaultRemoteNames
= BEGIN
DefaultNames: TYPE = DefaultRemoteNames.DefaultNames;
DefaultNamesRep: TYPE = DefaultRemoteNames.DefaultNamesRep;
ROPE: TYPE = Rope.ROPE;
initState: DefaultNames ← NEW[DefaultNamesRep ← [
systemHost: "[Indigo]",
userHost: "[Ivy]",
current: "[Indigo]<Cedar5.3>",
previous: "[Indigo]<Cedar5.2>"
]];
currentState: DefaultNames ← initState;
Get: PUBLIC ENTRY PROC RETURNS [DefaultNames] = {
Gets the current default names.
RETURN [currentState];
};
Set: PUBLIC ENTRY PROC [new: DefaultNames] = {
No error checking is performed, so the caller is presumed to be both honest and careful. If new = NIL, the defaults are rest to the initial state.
IF new = NIL THEN currentState ← initState ELSE currentState ← new;
};
END.