PD:
TYPE =
RECORD [
debug: BOOLEAN, -- Diagnostic and progress display
encryptionRequested: BOOLEAN, -- Encrypt RPC
encryptVoice: BOOLEAN, -- Separate decision; false for debugging only, please!
defaultLarkReports:
BOOLEAN←
FALSE
-- If TRUE and debug, Lark events reported SOMEwhere.
Otherwise, only reported if LarkControl window up for this Lark and debug=TRUE
];
Types
WPState: TYPE = REF WPStateRecord;
WPStateRecord:
TYPE =
RECORD [
wpTree: BTree.Tree,
wpVM: BTreeVM.Handle,
keyRecord: REF,
wpFeepTree: BTree.Tree,
wpFeepVM: BTreeVM.Handle,
feepKeyRecord: REF,
wpDataVMFile: FS.OpenFile,
wpDataVM: BTreeVM.Handle,
wpDataVMLen: INT𡤀,
wpDataVMValid: BOOL←TRUE,
wpOpen: BOOL←FALSE
];
ROPE: TYPE=Rope.ROPE;
WPListing: TYPE = RefTab.Ref; -- a table of keys and values.
Attrs:
TYPE =
MACHINE
DEPENDENT {
name(1), rName(2), officeNumber(3), officeDDDNumber(4),
outsideNumber(5), officeAddress(6), officeLocation(7), organization(8),
homeAddress(9), frequency(10), mailSystem(11), primaryKey(12),
(15)
};
WhitePages
These functions provide access to Swinehart's cobby old BTree-based "White Pages"
database. This one is assumed to be keyed and sorted by RName.
They are at present only called by the RName diddling code; see same for usage.
WhitePagesLookup:
PROC[ wpState: WPState, name:
ROPE, feep:
BOOL←
FALSE ]
RETURNS [ listing: WPListing ];
name must be in form rr.xxxxxxx
Returns first listing for which name is a substring, case unimportant, of the listing
WhitePagesEntry:
PROC[
wpState: WPState, name: ROPE←NIL, key: ATOM←$officeNumber,
feep: BOOL←FALSE, listing: WPListing←NIL
] RETURNS [fullRName: ROPE, entry: ROPE, newListing: WPListing];
WhitePagesEnter:
PROC[wpState: WPState, listing: WPListing];
Put in something new, or replace something old.
WhitePagesPrint:
PUBLIC
SAFE
PROC[wpState: WPState, listing: WPListing];
Include an enumerator here, if anybody ends up wanting it outside the implementation.
InitWhitePagesDatabase:
PUBLIC
SAFE
PROC[
fileName: ROPE, accessOptions: FS.AccessOptions ← $read,
howToComplain: Log.WhereToReport←$System]
RETURNS[wpState: WPState←NIL];
}.