DIRECTORY TiogaNode; TiogaPathOrder: CEDAR DEFINITIONS = BEGIN Order: TYPE = { same, before, after, disjoint }; Ref: TYPE = TiogaNode.Ref; Path: TYPE = TiogaNode.Path; Compare: PROC [path1, path2: Path] RETURNS [order: Order]; FullPath: TYPE = REF FullPathArray; FullPathArray: TYPE = RECORD [ next: FullPath, -- for free list length: NAT _ 0, nodes: SEQUENCE maxLength: NAT OF TiogaNode.Ref ]; MakeFullPath: PROC [p: Path] RETURNS [fp: FullPath]; CompareFullPaths: PUBLIC PROC [fp1, fp2: FullPath] RETURNS [order: Order]; FreeFullPath: PROC [fp: FullPath]; END. ÜTiogaPathOrder.mesa; Written by Paxton, July 1983 edited by Paxton, July 18, 1983 2:26 pm determines relative order in tree of the nodes at the ends of the paths returns "same" if node1 = node2 returns "before" if node1 comes before node2 returns "after" if node1 comes after node2 returns "disjoint" if nodes are not from the same tree If you're going to do several comparisons, use the following operations. Puts the path on a free list. Don't free more than once! ĘT˜Jšœ1™1Jšœ'™'J˜šĎk ˜ Jšœ ˜ J˜—Jšœœ œ˜)J˜Jšœœ%˜0Jšœœ˜Jšœœ˜J˜šĎnœœœ˜:JšĎcG™GJšŸ™JšŸ,™,JšŸ*™*JšŸ6™6J˜—šŸH™HJ˜Jšœ œœ˜#šœœœ˜JšœŸ˜ Jšœœ˜Jšœœ œœ˜/J˜J˜—Jšž œœ œ˜4J˜Jšžœ œœ˜JJ˜šž œœ˜"J™9J™——J˜Jšœ˜J˜J˜—…—@p