-- file MailFormatDefs.mesa
-- edited by Levin, February 24, 1981 4:51 PM
-- edited by Schroeder, February 24, 1981 11:32 AM
-- edited by Brotz, October 16, 1980 11:29 AM

DIRECTORY
MailParse,
ovD: FROM "OverviewDefs",
vmD: FROM "VirtualMgrDefs";

mfD: DEFINITIONS =

BEGIN


CreateStamp: PROCEDURE [tp: vmD.TOCFixedPartPtr, PutChar: PROC [CHARACTER]];
-- Creates a complete message stamp with textLength, deleted, seen, and mark from the
-- TOCFixedPart, and stores it with PutChar. Sets tp.offsetToHeader, the number of
-- characters from the beginning of the stamp to the beginning of the header that will
-- follow it provided that the initial value is zero. If it is nonzero it is left undisturbed, as
-- we are presumably updateing an existing stamp.


ParseStamp: PROCEDURE [NextChar: PROC RETURNS [CHARACTER],
tp: vmD.TOCFixedPartPtr] RETURNS [ovD.ErrorCode];
-- Reads the stamp with NextChar and fills into the TOCFixedPart located by tp the deleted,
-- seen, mark,offsetToHeader, and textLength fields. Leaves NextChar ready to read the
-- first character following the fixed part of the stamp. Expects NextChar to return a null
-- character if no more characters remain to be gotten. Returns ’ok’ and ’notAStamp’.


Handle: TYPE = POINTER TO ParseHeaderObject;
ParseHeaderObject: TYPE;

InitializeParseHeader: PROCEDURE [next: PROC RETURNS [CHARACTER], backup: PROC]
RETURNS [Handle];

FinalizeParseHeader: PROCEDURE [h: Handle];

ParseHeaderForTOC: PROCEDURE [s: STRING, h: Handle];
-- Produces in ’s’ the TOC string that goes with the message whose characters are
-- available through the initialized Handle.


END. -- of MailFormatDefs --