DIRECTORY IO USING [STREAM], Rope USING [ROPE], SpellingWordMap USING [CharSet], TiogaOpsDefs USING [Location, Ref, SelectionGrain], ViewerClasses USING [Viewer]; SpellingToolShared: CEDAR DEFINITIONS = { ROPE: TYPE ~ Rope.ROPE; STREAM: TYPE = IO.STREAM; CharSet: TYPE = SpellingWordMap.CharSet; SelectionRec: TYPE = RECORD[ viewer: ViewerClasses.Viewer, start, end: TiogaOpsDefs.Location, level: TiogaOpsDefs.SelectionGrain, caretBefore, pendingDelete: BOOL]; Selection: TYPE = REF SelectionRec; MapWordsInSelection: PROC [start, end: TiogaOpsDefs.Location, alphabetic: CharSet, f: PROC [REF TEXT, REF ANY, INT] RETURNS [BOOL], forwards: BOOL] RETURNS [premature: BOOL ¬ FALSE, wordStart, wordEnd: TiogaOpsDefs.Location]; ToRope: PROC [Selection] RETURNS [ROPE]; ProcessSelection: PROC [forceEOD: BOOL ¬ FALSE, defEOD: BOOL ¬ TRUE, forwards: BOOL] RETURNS [Processed]; Processed: TYPE ~ RECORD [s: Selection, alphabetic: CharSet, wasExtended: BOOL]; CheckMiddleOfWord: PROC[s: Selection, alphabetic: CharSet]; FirstWithin: PROC [r: TiogaOpsDefs.Ref] RETURNS [first: TiogaOpsDefs.Ref]; AdjustCharSet: PROC [org: CharSet, add, rem: ROPE] RETURNS [CharSet]; }.  SpellingToolShared.mesa Copyright Σ 1987, 1992 by Xerox Corporation. All rights reserved. Last Edited by: Nix, November 21, 1983 5:21 pm Jack Kent August 17, 1987 4:47:47 pm PDT Last tweaked by Mike Spreitzer on February 17, 1989 6:34:08 pm PST Tim Diebert: January 26, 1987 4:50:58 pm PST Willie-s, May 22, 1992 2:37 pm PDT Second argument to f is the node; third is the starting index. Analyzes the current selection and returns a selection record that describes it. If forceEOD is true, then the selection record returned always describes a selection from the beginning of the current selection to the end of the document, even if the user only had one word selected. If defEOD is TRUE, then this sort of selection is returned only when the user has a point or single character selection, otherwise the user's actual selection is returned. Non-destructive. Starts from empty set if given org=NIL. Κ9•NewlineDelimiter –(cedarcode) style™codešœ™Kšœ Οeœ7™BK™.K™(K™BK™,K™"—K˜šΟk ˜ Kšžœžœžœ˜Kšœžœžœ˜Kšœžœ ˜ Kšœ žœ!˜3Kšœžœ ˜—K˜KšΠbnœžœž œ˜)Kšžœžœžœ˜Kšžœžœžœžœ˜Kšœ žœ˜(K˜šœžœžœ˜K˜Kšœ˜K˜K˜#Kšœžœ˜"—Kšœ žœžœ˜#K˜šΟnœžœ=žœžœžœžœžœžœžœžœ žœžœ žœžœ-˜αKšœœ*™>—K˜Kš œžœ žœžœ˜(K˜šΠanΟažœ žœžœ žœžœ žœžœ ˜iKšœΘ™ΘKšœ žœžœ2žœ˜P—K˜Kš œžœ$˜;K˜Kš  œžœžœ˜KK˜š  œžœžœžœ ˜EKšœ1œ™9—K˜K˜K˜—…—” ]