IndexTree.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Created by Rick Beach, July 11, 1983 9:20 am
Rick Beach, April 6, 1985 8:35:00 pm PST
DIRECTORY
IndexProps USING [IndexEntry],
RedBlackTree USING [Table],
Rope USING [ROPE],
TextNode USING [Span, nullSpan],
TiogaButtons USING [TiogaButton],
TiogaOps USING [Ref];
IndexTree: CEDAR DEFINITIONS
= BEGIN
Index: TYPE ~ RECORD[
table: RedBlackTree.Table,
root: TiogaOps.Ref
];
CreateIndex: PROC [root: TiogaOps.Ref] RETURNS [index: Index];
IxItem: TYPE ~ REF IxItemRec;
IxItemRec: TYPE ~ RECORD[
ix: IndexProps.IndexEntry,
range: TextNode.Span ← TextNode.nullSpan,
button: TiogaButtons.TiogaButton ← NIL
];
InsertNewIndexEntry: PROCEDURE [ix: IndexProps.IndexEntry, range: TextNode.Span,
index: Index];
DuplicateKey: SIGNAL; -- if ix entry already present in the table
RopeForIndexReference: PROCEDURE [ixItem: IxItem,
seenPage, seenSee: BOOLEANFALSE]
RETURNS [reference: Rope.ROPENIL, sawPage, sawSee: BOOLEANFALSE];
DeleteIndexEntry: PROCEDURE [ixItem: IxItem, index: Index];
END.