VersionMapDefaults.mesa
Copyright Ó 1985, 1986, 1987, 1991 by Xerox Corporation. All rights reserved.
Doug Wyatt, December 15, 1986 4:53:45 pm PST
Russ Atkinson (RRA) January 19, 1987 3:27:46 pm PST
These definitions give access to the default source and object version maps.
DIRECTORY
BasicTime USING [GMT],
Rope USING [ROPE],
VersionMap USING [Map, MapList, VersionStamp];
VersionMapDefaults: CEDAR DEFINITIONS = BEGIN OPEN Rope, VersionMap;
Operations on default version map lists.
WhichMapList: TYPE = ATOM;
$Source => the source symbol version map list (initially from CedarSource.VersionMap)
$Symbols => the source symbol version map list (initially from CedarSymbols.VersionMap)
other => a user-defined version map variety (initially empty)
FileNameFromVersion: PROC [which: WhichMapList, version: VersionStamp] RETURNS [name: ROPE, created: BasicTime.GMT];
... returns a name (and create date) corresponding to the given version stamp in the indicated map list (does not check for multiple names, since that is the responsibility of the version map creator).
GetMapList: PROC [which: WhichMapList] RETURNS [MapList];
... gets the current selected version map list. If there is no such map, then NIL will be returned unless which = $Source or which = $Symbols, which will restore the official version maps from CedarSource.VersionMap or CedarSymbols.VersionMap respectively.
AddToMapList: PROC [which: WhichMapList, map: Map];
... adds a new map to the lookup list. Use this proc for adding personal version maps.
SetMapList: PROC [which: WhichMapList, list: MapList ¬ NIL];
.. sets the current version map for source files. Since there can be a race between GetMapList and SetMapList, this operation should not be casually used!
END.