<> <> <> <> <> <> <> <<>> <<>> DIRECTORY IO USING [STREAM], PFSNames USING [PATH], Rope USING [ROPE]; SourceFileOps: CEDAR DEFINITIONS ~ BEGIN ROPE: TYPE ~ Rope.ROPE; Position: TYPE ~ RECORD [ fileName: FileName, index: ARRAY PosKind OF Range]; <> FileName: TYPE ~ PFSNames.PATH; 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, ALL[noRange]]; noName: PFSNames.PATH ~ NIL; noIndex: Index ~ INT.FIRST; WhichSelection: TYPE ~ { primary, secondary, feedback }; <> GetSelection: PROC [selection: WhichSelection _ primary] RETURNS [Position]; <> <> 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.