PrinterNamesImpl.mesa
Copyright Ó 1984, 1985, 1986, 1987 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
Tim Diebert: March 13, 1987 8:26:34 am PST
DIRECTORY
PrinterNames,
Rope USING [ROPE];
PrinterNamesImpl: CEDAR MONITOR
EXPORTS PrinterNames
= BEGIN OPEN Rope;
PrinterDefaultNames: TYPE = PrinterNames.DefaultNames;
PrinterDefaultNamesRep: TYPE = PrinterNames.DefaultNamesRep;
initState: PrinterDefaultNames ← NEW[PrinterDefaultNamesRep ← [
printerHost: "[Printer]",
fontHost: "[Fonts]",
currentSystem: "[Printer]<CedarPS>Top>",
currentFont: "[Printer]<CedarPS>Top>",
printerType: "Raven"
]];
currentState: PrinterDefaultNames ← initState;
Get: PUBLIC ENTRY PROC RETURNS [PrinterDefaultNames] = {
Gets the current default names.
RETURN [currentState];
};
Set: PUBLIC ENTRY PROC [new: PrinterDefaultNames] = {
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.