DIRECTORY BasicTime USING [GMT, nullGMT], DBDefs USING[Segment, SegmentIndex], 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: REF TEXT _ NIL, internalFileID: INT, logSeqNo: INT ], CreateMsg => [ msg: REF TEXT _ NIL, date: BasicTime.GMT _ BasicTime.nullGMT, show: BOOL, -- to distinguish new grapevine mail sender, subject, to: 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, -- the length of the text (chars) formatLen: INT, -- the length of the formatting information headersLen: INT -- the length of the headers information ], ExpungeMsgs => NULL, WriteExpungeLog => [internalFileID: INT], CreateMsgSet => [ msgSet: REF TEXT _ NIL], DestroyMsgSet => [ msgSet: REF TEXT _ NIL], EmptyMsgSet => [msgSet: REF TEXT _ NIL], HasBeenRead => [msg: REF TEXT _ NIL], AddMsg => [ msg: REF TEXT _ NIL, to: REF TEXT _ NIL], RemoveMsg => [ msg: REF TEXT _ NIL, from: REF TEXT _ NIL], MoveMsg => [ msg: REF TEXT _ NIL, from: REF TEXT _ NIL, to: REF TEXT _ NIL ], RecordNewMailInfo => [ logLen: INT, when: BasicTime.GMT, server: REF TEXT _ NIL, num: INT], StartCopyNewMail => NULL, EndCopyNewMailInfo => [ startCopyPos: INT], AcceptNewMail => NULL, StartReadArchiveFile => [ file: REF TEXT _ NIL, msgSet: REF TEXT _ NIL], EndReadArchiveFile => NULL, StartCopyReadArchive => NULL, EndCopyReadArchiveInfo => [ startCopyPos: INT], ENDCASE ]; MsgLogEntry: TYPE = REF CreateMsg LogEntryObject; WhichTempLog: TYPE = {newMail, readArchive}; LogExpungePhase: TYPE = {idle, initializingExpungeLog, writingExpungeLog, swappingLogs}; Segment: TYPE = DBDefs.Segment; SegmentIndex: TYPE = DBDefs.SegmentIndex _ defaultSegmentIndex; defaultSegmentIndex: SegmentIndex = 0; SegmentID: TYPE = RECORD[segment: Segment, index: SegmentIndex]; END. xWalnutKernelDefs.mesa Willie-Sue, March 26, 1986 2:51:52 pm PST Donahue, March 24, 1986 11:15:06 am PST Definitions used by WalnutOps, WalnutDB, WalnutLog, WalnutStream These are internal for use by WalnutKernel Copyright c 1984 by Xerox Corporation. All rights reserved. Last Edited by: Willie-Sue, January 4, 1985 10:10:40 am PST Last Edited by: Donahue, at December 11, 1984 10:45:27 am PST (Changed ROPEs to REF TEXT to avoid all the allocations) (Added EndReadArchiveFile entry) 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 -- Misc -- Segment stuff Κ/– "Cedar" style˜šΟb™J™)Icode™'—J™J™@J™*J™Jšœ Οmœ1™