DIRECTORY IO USING [STREAM], Rope USING [ROPE], WalnutDefs USING [CheckReportProc, WalnutOpsHandle]; WalnutMiscLog: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; TiogaControlItemType: INT = 525; --1015B walnutItemFixedLength: INT = 20; -- magic CheckReportProc: TYPE = WalnutDefs.CheckReportProc; WalnutOpsHandle: TYPE = WalnutDefs.WalnutOpsHandle; GetNewMailLog: PROC[opsH: WalnutOpsHandle, lengthRequired: INT, pagesWanted: INT] RETURNS[strm: STREAM]; CloseNewMailLog: PROC[opsH: WalnutOpsHandle]; CreateReadArchiveLog: PROC[opsH: WalnutOpsHandle, fileToRead: STREAM, msgSet: ROPE, reportProc: CheckReportProc] RETURNS[ok: BOOL, reason: ROPE]; CloseReadArchiveLog: PROC[opsH: WalnutOpsHandle]; ArchiveReader: PROC[opsH: WalnutOpsHandle, archiveStream, fileToRead: STREAM, msgSet: ROPE, reportProc: CheckReportProc, posToStartInFileToRead: INT] RETURNS[ok: BOOL, lastCommitPosInFileToRead: INT]; END. – WalnutMiscLog.Mesa Copyright Σ 1985, 1987, 1992 by Xerox Corporation. All rights reserved. Willie-Sue, February 26, 1988 10:51:06 am PST Contents: procedures for managing the newmail and readArchive logs Types Writing and Reading NewMail/ReadArchive files opens the NewMailLog (aborting any current stream that might be open); truncates it to the required length; returns NIL if the log is shorter than required, or if the file could not be acquired or opened closes the NewMailLog & updates local data structures reads fileToRead from the beginning and writes the readArchiveLog; returns TRUE if all went well; leaves the readArchiveLog closed, fileToRead open. If ok is FALSE, then reason describes what went wrong closes the readArchiveLog & updates local data structures given an archiveStream to write on and a file to read, this creates a readArchiveLog that can be appended to the current log Κ•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ=™HK™-K™KšœB™B—K˜K˜šΟk ˜ Kšžœžœžœ˜Kšœžœžœ˜Kšœ žœ$˜4K˜—Kšœžœž œ˜"K˜Kšž˜K™šΟb™K˜Kšžœžœžœ˜Kšžœžœžœžœ˜Kšœžœ Οc˜)Kšœžœ ˜*K˜Kšœžœ˜3Kšœžœ˜3—K™šŸ-™-K˜šΟn œžœ(žœžœ˜QKšœžœžœ˜K™Ν—K™š‘œžœ˜-K™5—K™š‘œžœ$žœ žœ˜pKšœžœžœ žœ˜!KšœΜ™Μ—K™š‘œžœ˜1Kšœ9™9—K˜š ‘ œžœ3žœ žœ7žœ˜•Kšœžœžœžœ˜3K™|—K˜—K˜Kšžœ˜—…—΄ L