DefaultRemoteNamesImpl.mesa
Copyright © 1984, 1985 by Xerox Corporation. All rights reserved.
Russ Atkinson, February 4, 1985 2:16:42 pm PST
DIRECTORY
DefaultRemoteNames,
Rope USING [ROPE];
DefaultRemoteNamesImpl: CEDAR MONITOR
EXPORTS DefaultRemoteNames
= BEGIN OPEN Rope;
DefaultNames: TYPE = DefaultRemoteNames.DefaultNames;
DefaultNamesRep: TYPE = DefaultRemoteNames.DefaultNamesRep;
initState: DefaultNames ← NEW[DefaultNamesRep ← [
systemHost: "[Cedar]",
userHost: "[User]",
current: "[Cedar]<Cedar6.0>",
previous: "[Indigo]<Cedar5.3>",
registry: "pa"
]];
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.