DIRECTORY System USING [UniversalID], XMessage USING [MsgType, MsgKey, MsgID]; MessageFileFormat: CEDAR DEFINITIONS = BEGIN FileHeader: TYPE = LONG POINTER TO FileHeaderObject; FileHeaderObject: TYPE = MACHINE DEPENDENT RECORD [ formatVersion(0): CARDINAL _ fileHeaderVersion, version(1): System.UniversalID, fileType(6:0..7): FileType, translated(6:8..15): BOOLEAN _ FALSE, language(7): LanguageType, nSegments(8): CARDINAL _ 0, segments(9): ARRAY [0..0) OF Segment]; fileHeaderVersion: CARDINAL = 9214; FileType: TYPE = {masterFile, messageFile}; LanguageType: TYPE = MACHINE DEPENDENT{ USEnglish(0), UKEnglish(1), French(2), German(3), Swedish(4), Italian(5), Dutch(6), Danish(7), Norwegian(8), Finnish(9), Spanish(10), Portuguese(11), Japanese(12), Siemens(13), (255)}; Segment: TYPE = RECORD [base, count: CARDINAL]; Domain: TYPE = LONG BASE POINTER TO DomainHeader; DomainHeader: TYPE = RECORD [ formatVersion: CARDINAL, version: System.UniversalID, domainName: Text, nEntries: CARDINAL, -- no of entries in the domain messageTable: MessageTable, -- entries in key order textTable: TextTable, -- the message text's textLength: CARDINAL, -- the size of the textTable entryTable: EntryTable, -- specified in the order of the text entryTextTable: TextTable, -- for translators notes entryTextLength: CARDINAL, -- the size of the entryTextTable transMessageTable: MessageTable, -- entries in key order transTextTable: TextTable, -- the translated message text's transTextLength: CARDINAL]; --the size of the transTextTable masterFileVersion: CARDINAL = 19214; messageFileVersion: CARDINAL = 29214; TextBase: TYPE = LONG BASE POINTER; -- for accessing TextEntry's should Text: TYPE = TextBase RELATIVE POINTER TO TextEntry; TextEntry: TYPE = MACHINE DEPENDENT RECORD [ length(0): CARDINAL, maxLength(1): CARDINAL, bytes(2): PACKED ARRAY [0..0) OF BYTE]; TextTable: TYPE = Domain RELATIVE POINTER; nullText: TextTable = LOOPHOLE[0]; MessageTable: TYPE = Domain RELATIVE POINTER TO ARRAY [0..0) OF Text; nullMessages: MessageTable = LOOPHOLE[0]; EntryTable: TYPE = Domain RELATIVE POINTER TO ARRAY [0..0) OF Entry; nullEntries: EntryTable = LOOPHOLE[0]; EntryState: TYPE = MACHINE DEPENDENT{ new(0), changed, sameButNotTranslated, translated, deleted, other(7)}; Entry: TYPE = RECORD [ note: Text, key: XMessage.MsgKey, id: XMessage.MsgID, translatable: BOOLEAN, type: XMessage.MsgType, state: EntryState]; END... LOG J.G.Sandman 21-Sep-84 11:07:42 Created File R.M.Balcon 9-Jan-85 10:33:04 Changed format to allow passing of LONG and NS strings MessageFileFormat.mesa - last edit: Copyright (C) 1984, 1986 by Xerox Corporation Balcon.rx 14-Jan-85 10:36:28 JGS 21-Sep-84 11:07:42 Tim Diebert: January 6, 1987 5:09:47 pm PST ***************************************************************************** * FileHeader ************************************************************** ***************************************************************************** ***************************************************************************** * The file header will always take up an exact number of pages because the * * domains are page aligned * * Segments define the boundaries for the message file domains and each file * * may have up to CARDINAL.LAST of these * ***************************************************************************** ***************************************************************************** * DomainHeader ************************************************************ ***************************************************************************** ***************************************************************************** * Records within a domain should searched in the "EntryTable" order as the * * EntryTable is only able to be indexed sequentially. Entries in the * * EntryTable index the MessageTable's ("transMessageTable" and * * "messageTable") via the "key" field. * * * * The "domainName" field is stored in both "textTable" and "transTextTable" * * as the first text in the byte sequence any other place is not acceptable * ***************************************************************************** always allocated in the textTable and transTextTable be initialised by TextTable equivalent to StringBody Κ<˜codešœ#™#Kšœ-™-Kšœ&™&Kšœ™K™+—K˜šΟk ˜ Kšœœ˜Kšœ œ˜(—K˜KšΠlnœœ œ˜,˜KšœM™MKšœM™MKšœM™M—˜KšœM™MKšœM™MKšœ-™-KšœM™MKšœ.™.KšœM™M—˜Kš œ œœœœ˜4—˜š œœœ œœ˜3Kšœœ˜/K˜K˜Kšœœœ˜%K˜Kšœœ˜Kšœ œœ ˜&——˜Kšœœ˜#—˜Kšœ œ˜+—˜šœœœ œ˜'K˜IK˜KK˜"——˜Kšœ œœœ˜/—˜KšœM™MKšœM™MKšœM™MKšœM™MKšœM™MKšœM™MKšœJ™JKšœ4™4Kšœ™KšœM™MKšœM™MKšœM™M—˜Kš œœœœœœ˜1—˜šœœœ˜Kšœœ˜K˜K˜Kšœ5™5Kšœ œΟc˜3KšœŸ˜5KšœŸ˜,Kšœ œŸ˜3KšœŸ%˜>KšœŸ˜4KšœœŸ!˜=Kšœ"Ÿ˜9KšœŸ ˜