DIRECTORY IO USING [STREAM], Rope USING [ROPE]; WalnutMiscLog: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; STREAM: TYPE = IO.STREAM; TiogaControlItemType: INT = 525; --1015B walnutItemFixedLength: INT = 20; -- magic GetNewMailLog: PROC[lengthRequired: INT, pagesWanted: INT] RETURNS[strm: STREAM]; CloseNewMailLog: PROC; CreateReadArchiveLog: PROC[ fileToRead: STREAM, msgSet: ROPE, reportProc: PROC[msg1, msg2, msg3: ROPE_ NIL]] RETURNS[ok: BOOL, reason: ROPE]; CloseReadArchiveLog: PROC; ArchiveReader: PROC[archiveStream, fileToRead: STREAM, msgSet: ROPE, reportProc: PROC[msg1, msg2, msg3: ROPE_ NIL], posToStartInFileToRead: INT] RETURNS[ok: BOOL, lastCommitPosInFileToRead: INT]; MiscShutdown: PROC; END. žWalnutMiscLog.Mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Willie-Sue, June 17, 1986 11:37:33 am PDT 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 clear any local variables ÊÀ˜šœ™Jšœ Ïmœ1™