TBase.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Doug Wyatt, March 6, 1992 12:35 pm PST
DIRECTORY
BasicTime USING [GMT],
Char USING [XCHAR],
Rope USING [ROPE],
TextFind USING [Direction],
Tioga USING [Node, Location, Looks, noLooks, PropList, Event];
TBase: CEDAR DEFINITIONS ~ BEGIN
XCHAR: TYPE ~ Char.XCHAR;
ROPE: TYPE ~ Rope.ROPE;
Node: TYPE ~ Tioga.Node;
Location: TYPE ~ Tioga.Location;
Looks: TYPE ~ Tioga.Looks;
noLooks: Looks ~ Tioga.noLooks;
PropList: TYPE ~ Tioga.PropList;
Event: TYPE ~ Tioga.Event;
Direction:
TYPE ~ TextFind.Direction;
MapAction:
TYPE ~
PROC [node: Node, index:
INT, char:
XCHAR]
RETURNS [quit:
BOOL ¬
FALSE];
Map:
PROC [direction: Direction, loc1, loc2: Location, action: MapAction]
RETURNS [quit:
BOOL];
forward => visit chars with index IN[loc1..loc2); null loc2 means end of doc
backward => visit chars with index DECREASING IN[loc1..loc2); null loc1 means start of doc
return TRUE immediately if action returns TRUE, else return FALSE when done
ExpandToBrackets:
PROC [char1, char2:
XCHAR, loc1, loc2: Location,
bound1, bound2: Location ¬ [
NIL, 0], includeInResult:
BOOL ¬
TRUE]
RETURNS [found:
BOOL, result1, result2: Location];
FindBrackets:
PROC [direction: Direction, char1, char2:
XCHAR, loc: Location,
bound1, bound2: Location ¬ [
NIL, 0], includeInResult:
BOOL ¬
TRUE]
RETURNS [found:
BOOL, result1, result2: Location];
CaretProc:
TYPE ~
PROC [node: Node, caret:
INT, event: Event ¬
NIL]
RETURNS [ok:
BOOL ¬
FALSE, resultStart, resultLen:
INT ¬ 0];
MakeControlChar: CaretProc;
UnMakeControlChar: CaretProc;
MakeOctalChar: CaretProc;
UnMakeOctalChar: CaretProc;
InsertBrackets:
PROC [loc1, loc2: Location, rope1, rope2:
ROPE,
looks: Looks ¬ noLooks, props: PropList ¬
NIL, includeInResult:
BOOL ¬
FALSE,
event: Event ¬
NIL]
RETURNS [result1, result2: Location];
SetFormat:
PROC [node1, node2: Node, format:
ATOM, event: Event ¬
NIL];
SetComment:
PROC [node1, node2: Node, comment:
BOOL, event: Event ¬
NIL];
InsertTime:
PROC [node: Node, index:
INT, gmt: BasicTime.
GMT,
looks: Looks ¬ noLooks, props: PropList ¬
NIL, event: Event ¬
NIL]
RETURNS [resultStart, resultLen, dateLen:
INT];
END.