TiogaAccessPrivate.mesa
Copyright Ó 1985, 1986, 1988 by Xerox Corporation. All rights reserved.
Russ Atkinson (RRA) July 2, 1985 11:06:55 am PDT
Doug Wyatt, February 18, 1988 11:26:31 am PST
Private types for TiogaAccess.
DIRECTORY
Atom USING [PropList],
Rope USING [ROPE],
Rosary USING [ROSARY],
TextEdit USING [CharSetRun, LooksRun, PropListRun],
TextLooks USING [Looks, Runs],
TextNode USING [Ref],
TiogaAccess USING [CharSet, TiogaChar];
TiogaAccessPrivate: CEDAR DEFINITIONS
~ BEGIN
ROPE: TYPE ~ Rope.ROPE;
ROSARY: TYPE ~ Rosary.ROSARY;
CharSet: TYPE ~ TiogaAccess.CharSet;
TiogaChar: TYPE ~ TiogaAccess.TiogaChar;
ropePieces: NAT ~ 15;
Reader: TYPE ~ REF ReaderRep;
ReaderRep: TYPE ~ RECORD [
root: TextNode.Ref,
textNode: TextNode.Ref,
textNodeIndex: INT,
format: ATOM,
end: BOOLEAN,
comment: BOOLEAN,
nodeProps: Atom.PropList,
level: INT,
nodeLength: INT,
textBuffer: REF TEXT,
textStart, textEnd: INT,
charSetRun: TextEdit.CharSetRun,
looksRun: TextEdit.LooksRun,
propListRun: TextEdit.PropListRun,
startingOffsetFromOriginalRoot: INT,
putback: LIST OF TiogaChar
];
Writer: TYPE ~ REF WriterRep;
WriterRep: TYPE ~ RECORD [
root: TextNode.Ref,
first: TextNode.Ref,
last: TextNode.Ref,
level: INT,
lastLevel: INT,
nodeSize: INT,
ropes: ARRAY [0..ropePieces) OF ROPE,
textBuf: REF TEXT,
The contents of the current node is represented by the concatenation of ropes in order by decreasing index, together with the contents of textBuf. The size of ropes[i] is either 0 or approximately textBufSize*2**i; building the rope this way yields a balanced rope without a lot of flattening.
runs: TextLooks.Runs,
newLooks: TextLooks.Looks,
newLooksRepeat: INT,
charSets: ROSARY,
newCharSet: REF CharSet,
newCharSetRepeat: INT,
charProps: ROSARY,
newCharProp: Atom.PropList,
newCharPropRepeat: INT
];
END.