<<>> <> <> <> <> <> <> <> <> <<>> <<>> DIRECTORY IO USING [STREAM], PFS USING [nullUniqueID, UniqueID], PFSNames USING [PATH], Rope USING [ROPE]; SourceFileOps: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Position: TYPE ~ RECORD [ fileName: FileName, uniqueID: UniqueID, index: ARRAY PosKind OF Range]; <> FileName: TYPE ~ PFSNames.PATH; UniqueID: TYPE ~ PFS.UniqueID; PosKind: TYPE ~ {char, line}; Index: TYPE ~ INT; Range: TYPE ~ RECORD [first, last: Index ¬ noIndex] ¬ noRange; noRange: Range ~ []; <<[n] is how to talk about a position, rather than a range.>> <<[] is the unspecified range/position.>> noPosition: Position ~ [noName, nullUniqueID, ALL[noRange]]; noName: PFSNames.PATH ~ NIL; noIndex: Index ~ INT.FIRST; nullUniqueID: UniqueID ~ PFS.nullUniqueID; WhichSelection: TYPE ~ { primary, secondary, feedback }; <> GetSelection: PROC [selection: WhichSelection ¬ primary] RETURNS [pos: Position, contents: ROPE]; <> <> <> FormatPosition: PROC [Position] RETURNS [ROPE]; FmtIdxs: PROC [pos: Position] RETURNS [ROPE]; FmtRange: PROC [r: Range, introSingular, introPlural: ROPE ¬ NIL] RETURNS [ROPE]; <> OpenSource: ShowProc; ShowProc: TYPE ~ PROC [desc: ROPE, pos: Position, feedBack: IO.STREAM, selection: WhichSelection ¬ feedback]; <> END.