DIRECTORY BasicTime USING [GMT, nullGMT], IO USING [STREAM], Rope USING [ROPE]; WalnutKernelDefs: CEDAR DEFINITIONS = BEGIN STREAM: TYPE = IO.STREAM; ROPE: TYPE = Rope.ROPE; RootEntry: TYPE = RECORD [ ident: ROPE, -- would like ATOM, but then case counts and rootFile is edited by people value: ROPE, -- NIL for LogInfo entries info: LogInfoFromRoot -- NIL for entries other than LogInfo entries ]; LogInfoFromRoot: TYPE = RECORD [ fileName: ROPE, internalFileID: INT, logSeqNo: ROPE, seqNoPos: INT -- position in rootFile of this logFile's sequence number ]; LogEntry: TYPE = REF LogEntryObject; LogEntryObject: TYPE = RECORD [ SELECT type: * FROM LogFileInfo => [ -- change this name each time the format changes key: ROPE ¬ NIL, internalFileID: INT, logSeqNo: INT ], CreateMsg => [ msg: ROPE ¬ NIL, date: BasicTime.GMT ¬ BasicTime.nullGMT, show: BOOL, -- to distinguish new grapevine mail sender, from, subject, to, cc: ROPE ¬ NIL, entryStart: INT ¬ 0, -- the position of the entry in the log textOffset: INT ¬ 0, -- the offset of the first char of the message header textLen: INT ¬ 0, -- the length of the text (chars) formatLen: INT ¬ 0, -- the length of the formatting information headersLen: INT ¬ 0 -- the length of the headers information ], ExpungeMsgs => NULL, WriteExpungeLog => [ internalFileID: INT ], CreateMsgSet => [ msgSet: ROPE ¬ NIL ], DestroyMsgSet => [ msgSet: ROPE ¬ NIL ], EmptyMsgSet => [ msgSet: ROPE ¬ NIL ], HasBeenRead => [ msg: ROPE ¬ NIL ], AddMsg => [ msg: ROPE ¬ NIL, to: ROPE ¬ NIL], RemoveMsg => [ msg: ROPE ¬ NIL, from: ROPE ¬ NIL], MoveMsg => [ msg: ROPE ¬ NIL, from: ROPE ¬ NIL, to: ROPE ¬ NIL ], RecordNewMailInfo => [ logLen: INT, when: BasicTime.GMT, server: ROPE ¬ NIL, num: INT ], StartCopyNewMail => NULL, EndCopyNewMailInfo => [ startCopyPos: INT ], AcceptNewMail => NULL, StartReadArchiveFile => [ file: ROPE ¬ NIL, msgSet: ROPE ¬ NIL], EndReadArchiveFile => NULL, StartCopyReadArchive => NULL, EndCopyReadArchiveInfo => [ startCopyPos: INT ], EndOfLog => [length: INT], -- need not be a "real" entry ENDCASE ]; MsgLogEntry: TYPE = REF CreateMsg LogEntryObject; WhichTempLog: TYPE = {newMail, readArchive}; LogExpungePhase: TYPE = {idle, initializingExpungeLog, writingExpungeLog, swappingLogs}; END. 8 WalnutKernelDefs.mesa Copyright Σ 1984, 1986, 1987, 1992 by Xerox Corporation. All rights reserved. Willie-Sue, May 23, 1988 4:32:16 pm PDT Definitions used by WalnutLog, WalnutStream These are internal for use by WalnutKernel (Changed ROPEs to REF TEXT to avoid all the allocations) (Added EndReadArchiveFile entry) (Changed REF TEXT to ROPEs, as they almost always get converted anyway!) Types -- Relating to Entries in root files; these entries do not include a size; -- logSeqNo is guaranteed to be 7 characters long -- formal definition, but we won't use it RootEntry: TYPE = REF RootEntryObject; RootEntryObject: TYPE = RECORD [ SELECT type: * FROM Key => [ keyValue: ROPE ], MailFor => [ rName: ROPE ], Database => [ dbName: ROPE ], NewMailLog => [ fileName: ROPE ], ReadArchiveLog => [ fileName: ROPE ], LogInfo => fileName: ROPE, internalFileID: INT, logSeqNo: ROPE -- is number or "Expunge" or "Emptied" ], End => NULL -- entries after this one are ignored ]; -- Relating to Entries in log files the end of the log - returned by WalnutStream -- Misc Κ•NewlineDelimiter –(cedarcode) style™šΟb™Jšœ ΟeœC™NJ™'J™J™+J™*J™J™8J™ J™HJ™—codešΟk ˜ Kšœ ŸœŸœ ˜KšŸœŸœŸœ˜KšœŸœŸœ˜—K˜šœŸ˜#K˜šœŸ˜K˜—KšŸœŸœŸœŸœ˜šŸœŸœŸœ˜K˜—š™K˜JšœJ™JJšœΟc œ™1J™*™Jšœ ŸœŸœ™&šœŸœŸœ™ šŸœ Ÿ™JšœŸœ™JšœŸœ™JšœŸœ™JšœŸœ™!JšœŸœ™%™ Jšœ Ÿœ™JšœŸœ™Jšœ Ÿœ '™7J™—JšœŸœ %™2—J™—K˜šœ ŸœŸœ˜KšœŸœ I˜XKšœŸœ ˜+Kšœ -˜DK˜—K˜šœŸœŸœ˜ Kšœ Ÿœ˜KšœŸœ˜Kšœ Ÿ˜Kšœ Ÿœ 9˜HK˜——J™™#K˜Kšœ ŸœŸœ˜$šœŸœŸœ˜šŸœ Ÿ˜šœ 0˜BKšœŸœŸœ˜KšœŸœ˜Kšœ Ÿ˜ K˜K˜—šœ˜KšœŸœŸœ˜KšœŸœ˜(KšœŸœ $˜1šœ˜K˜Kšœ˜Kšœ˜KšœŸœŸœ˜—Kšœ Ÿœ '˜>Kšœ Ÿœ 5˜MKšœ Ÿœ  !˜6Kšœ Ÿœ +˜@Kšœ Ÿœ (˜