VersionMapDefaults.mesa
Russ Atkinson, March 30, 1983 9:20 pm
These definitions give access to the default source and object version maps.
DIRECTORY
BcdDefs USING [VersionStamp],
Rope USING [ROPE],
VersionMap USING [Map, MapList];
VersionMapDefaults: CEDAR DEFINITIONS
= BEGIN OPEN Rope;
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: BcdDefs.VersionStamp] RETURNS [name: ROPE];
... returns a name 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 [VersionMap.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: VersionMap.Map];
... adds a new map to the lookup list. Use this proc for adding personal version maps.
SetMapList: PROC [which: WhichMapList, list: VersionMap.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.