Mobery>Mobery.Mesa
Last Edited by: Spreitzer, August 14, 1990 8:13 am PDT
JKF January 11, 1989 10:13:29 am PST
Eduardo Pelegri-Llopart, December 21, 1989 8:27:39 pm PST
Andy Litman March 3, 1988 5:51:27 pm PST
DIRECTORY
BasicTime USING [GMT],
MobDefs USING [NullVersion, VersionStamp],
Rope USING [ROPE];
Mobery: CEDAR DEFINITIONS =
BEGIN
ROPE: TYPE = Rope.ROPE;
VersionStamp: TYPE = MobDefs.VersionStamp;
StampTable: TYPE = REF StampTableRep;
StampTableRep: TYPE;
NoStamp: ERROR;
FlushCache:
PROC;
Flush any existing values from the cache (useful for cases like network failure)
Manipulation of Stamps.
EnumerateStampTable: PROC [stampTable: StampTable, to: EnumerateStampProc];
EnumerateStampProc: TYPE = PROC [name, stampClass: ROPE, stamp: VersionStamp] RETURNS [BOOL];
StampFromStampTable: PROC [stampTable: StampTable, fileName: ROPE] RETURNS [stampClass: ROPE, stamp: VersionStamp];
EnumerateStampTableDifference:
PROC [tab1, tab2: StampTable, to: EnumerateStampProc];
Enumerates stamps in tab1 but not tab2.
StampTableSubset:
PROC [tab1, tab2: StampTable]
RETURNS [
BOOL];
Check that all stamps in tab1 are in (and identical) tab2
Has: PROC [stampTable: StampTable, name: ROPE, class: ROPE, stamp: VersionStamp] RETURNS [BOOL];
Reading of Stamps.
ReadStampTable:
PROC [fileName:
ROPE]
RETURNS [stampTable: StampTable];
Get all the version stamps from an OFile. Save them so they can be enumerated afterwards.
StampAndNameFromFile:
PROC [fileName:
ROPE]
RETURNS [stamp: MobDefs.VersionStamp ← MobDefs.NullVersion, name:
ROPE ←
NIL];
Extract the version stamp from the O file. If there is none, return MobDefs.NullVersion.
It uses the prefixes "@(#) mob←version [nnn,mmm] name".
Internal Procedures (useful for debugging).
GetCOStamps: PUBLIC PROC [fileName: ROPE] RETURNS [list: LIST OF ROPE, created: BasicTime.GMT];
VersionAndNameFromString: PUBLIC PROC [aRope: ROPE] RETURNS [stamp: MobDefs.VersionStamp, name: ROPE] ;
END.