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
DIRECTORY
System USING [UniversalID],
XMessage USING [MsgType, MsgKey, MsgID];
MessageFileFormat: CEDAR DEFINITIONS = BEGIN
*****************************************************************************
* 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 *
*****************************************************************************
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];
*****************************************************************************
* 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 *
*****************************************************************************
Domain: TYPE = LONG BASE POINTER TO DomainHeader;
DomainHeader:
TYPE =
RECORD [
formatVersion: CARDINAL,
version: System.UniversalID,
domainName: Text,
always allocated in the textTable and transTextTable
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
be initialised by TextTable
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];
equivalent to StringBody
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];
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