DIRECTORY IO USING [STREAM], MSBasics USING [BodyPartType], Rope USING [ROPE]; MSMessage: CEDAR DEFINITIONS ~ BEGIN STREAM: TYPE ~ IO.STREAM; ROPE: TYPE ~ Rope.ROPE; BodyPartType: TYPE ~ MSBasics.BodyPartType; headingBodyPart: BodyPartType = 0; vpFolder: BodyPartType = 1; nsTextFile: BodyPartType = 2; vpDocument: BodyPartType = 3; otherNSFile: BodyPartType= 4; multinationalNote: BodyPartType= 5; ia5Note: BodyPartType= 6; pilotFile: BodyPartType = 7; g3Fax: BodyPartType = 8; teletex: BodyPartType = 9; telex: BodyPartType = 10; iso6937Note: BodyPartType = 11; interpress: BodyPartType = 12; RopeFromBodyPartType: PROC [type: BodyPartType] RETURNS [rope: ROPE]; GetHeader: PROC [bodypart: STREAM] RETURNS [text, plainText, formatting: STREAM, bodyAnnotSize: CARD32]; GetHeaderRope: PROC [bodypart: STREAM] RETURNS [text, plainText, formatting: ROPE, bodyAnnotSize: CARD32]; GetNote: PROC [bodypart: STREAM] RETURNS [text: STREAM]; GetNoteRope: PROC [bodypart: STREAM] RETURNS [text: ROPE]; GetIA5Note: PROC [bodypart: STREAM] RETURNS [text: STREAM]; GetIA5NoteRope: PROC [bodypart: STREAM] RETURNS [text: ROPE]; END. ˜ MSMessage.mesa Copyright Σ 1987, 1991 by Xerox Corporation. All rights reserved. Doug Terry, November 28, 1988 3:24:05 pm PST Willie-Sue, August 21, 1990 11:45:52 am PDT Routines for parsing various XNS message body parts. Body part types The following body part types are defined in the XNS MailFormat Courier program version 3: A sequence of attributes comprising an interpersonal message header. A Xerox Filing Protocol Filing.SerializedFile representing a viewpoint folder. A Xerox Filing Protocol Filing.SerializedFile representing a text file. A Xerox Filing Protocol Filing.SerializedFile representing a viewpoint document. A Xerox Filing Protocol Filing.SerializedFile other than vpFolder, nsTextFile, or vpDocument A maximum of LAST[CARDINAL] characters from the Xerox Character Code Standard. A maximum of LAST[CARDINAL] characters from international Alphabet No 5. Very similar to ASCII. The file type used in the Xerox Development Environment. A g3Fax document encoded as defined in X.420. A teletex document encoded as defined in X.420. A telex document encoded as defined in F.60. An ISO6937 body part X.409 encoded according to the CEN/CENELEC implementation agreements. An Interpress body part encoded according to the Xerox Interpress Electronic Printing Standard. Returns a human-sensible name for the given body part type. Parsing body parts Takes a stream of bits representing a mail message header and returns the header in text form as a stream. Like GetHeader but returns a rope. Takes a stream of bits representing a multinational note (i.e. characters from the Xerox Character Code Standard) and returns the text as a stream. Like GetNote but returns a rope. Takes a stream of bits representing characters from international Alphabet No 5 and returns the text as a stream. Like GetIA5Note but returns a rope. Routines for parsing other types of body parts have not been provided yet, but should. ΚΞ•NewlineDelimiter –(cedarcode) style™code•Mark outsideHeaderšœ™Kšœ Οeœ7™BK™,K™+K™K™4K™—šΟk ˜ Kšžœžœžœ˜Kšœ žœ˜Kšœžœžœ˜—K˜KšΠbl œžœž ˜šœž˜K˜Kšžœžœžœžœ˜Kšžœžœžœ˜K˜Kšœžœ˜+—head™K™[K˜˜"K™D—K˜˜KšœN™N—K˜˜KšœG™G—K˜˜KšœP™P—K˜˜Kšœ\™\—K˜˜#KšœN™N—K˜˜Kšœ`™`—K˜˜Kšœ8™8—K˜˜Jšœ-™-—K˜˜Jšœ/™/—K˜˜Jšœ,™,—K˜˜JšœZ™Z—K˜˜Jšœa™a—J™šΟnœžœžœžœ˜EJ™;——™š   œžœ žœžœžœžœ˜hK™jK™—š   œžœ žœžœžœžœ˜jK™"K™—š  œžœ žœžœžœ˜8Kšœ“™“K™—š   œžœ žœžœžœ˜:Kšœ ™ K™—š   œžœ žœžœžœ˜;Kšœq™qK™—š  œžœ žœžœžœ˜=Kšœ#™#K™—K™VK™—Kšžœ˜—…—rΨ