DefaultRemoteNamesImpl.mesa
Copyright © 1984, 1985, 1986 by Xerox Corporation. All rights reserved.
Russ Atkinson, February 4, 1985 2:16:42 pm PST
Doug Wyatt, June 10, 1986 5:46:41 pm PDT
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.1>",
previous: "[Cedar]<Cedar6.0>",
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.