DIRECTORY TiogaOps USING [CommandProc], TiogaOpsDefs, Rope USING [ROPE]; TiogaExtraOps: CEDAR DEFINITIONS = BEGIN OPEN TiogaOpsDefs; SetProp: PROC [name: ROPE, value: REF, which: WhichNodes _ selection]; PutProp: PROCEDURE [n: Ref, name: ATOM, value: REF]; GetProp: PROCEDURE [n: Ref, name: ATOM] RETURNS [REF]; RemProp: PROCEDURE [n: Ref, name: ATOM]; MapProps: PROC [n: Ref, action: MapPropsAction, typeFlag, commentFlag: BOOLEAN _ TRUE] RETURNS [BOOLEAN]; MapPropsAction: TYPE = PROC [name: ATOM, value: REF] RETURNS [BOOLEAN]; RegisterPropProc: PROC [name: ATOM, reader: ReadSpecsProc, writer: WriteSpecsProc, copier: CopyInfoProc]; ReadSpecsProc: TYPE = PROC [name: ATOM, specs: ROPE] RETURNS [value: REF]; WriteSpecsProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [specs: ROPE]; CopyInfoProc: TYPE = PROC [name: ATOM, value: REF] RETURNS [new: REF]; NullRead: ReadSpecsProc; -- returns NIL always NullWrite: WriteSpecsProc; -- returns NIL always NullCopy: CopyInfoProc; -- returns NIL always PutTextKey: PROC [node: Ref, where: Offset, key: REF]; GetTextKey: PROC [node: Ref, key: REF] RETURNS [loc: Location]; TextKeyNotFound: ERROR; -- raised by GetTextKey RemoveTextKey: PROC [node: Ref, key: REF]; MapTextKeys: PROC [ node: Ref, proc: PROC [key: REF, where: Offset] RETURNS [BOOLEAN]] RETURNS [BOOLEAN]; GetFile: PROCEDURE [name: ROPE] RETURNS [root: Ref]; PutFile: PROCEDURE [name: ROPE, root: Ref]; FreeTree: PROCEDURE [root: Ref]; UnRegisterCommand: PROC [name: ATOM, proc: TiogaOps.CommandProc]; editTypeScripts: BOOL ; -- if true and selection not at end of ts, edit like normal Tioga doc. sourceExtensions: LIST OF ROPE; -- the extensions all start with "." END. 4TiogaExtraOps.Mesa written by Bill Paxton. June 1982 last written by Paxton. December 30, 1982 11:19 am last written by Teitelman. January 19, 1983 12:02 pm Last Edited by: Maxwell, January 19, 1983 12:22 pm This contains overflow from TiogaOps.Mesa Node Property Lists NIL is a valid value. Use RemProp to remove property. (Although GetProp will not distinguish between property value NIL and no property present, it is useful to be able to have NIL values to avoid creating garbage. Setting to NIL doesn't release the property record, so don't need to reallocate when next set to a non-NIL value. -- apply the action to each name & value pair for the node -- returns true if&when an action returns true -- if commentFlag is false, skips Comment property; ditto for typeFlag -- hack to accelerate Inherit and PutFile operations read, write, copy props -- registers these procs for this property name -- they will be called by DoSpecs, GetSpecs, and CopyInfo Text keys: persistent "addresses" for characters in text nodes Associates the key with the given offset in the text node. Key moves with the text as edits take place in the node. Key can move to new node. (Also defined in TiogaOps) Tells you where the key is in the node at the current time. loc node may be different if addr has been moved (Also defined in TiogaOps) Calls proc for all the keys for the given node. Returns true if&when an action returns true File I/O If you have gotten access to the root by GetFile and know that there are no remaining references to it, call FreeTree to have all of the intra-tree pointers set to NIL. This causes circular reference chains to be broken so that the garbage collector can reclaim the tree. If you are not sure, don't call this! Registering Command procedures Remove the proc from the list for the atom. Miscellaneous Κ„˜šΟc™Jš!™!Jš2™2Jš4™4J™2—J™J™)J™šΟk ˜ Jšœ žœ˜Jšœ ˜ Jšœžœžœ˜J˜—J˜JšΠbl œžœ˜"J˜Jšž œ ž˜headšœ™IprocšΟnœžœžœ žœ!˜FJ˜š œž œžœ žœ˜4JšœΛ™ΛJ™—š  œž œžœžœžœ˜6J˜—š œž œžœ˜(J˜—š œžœ9žœžœ˜VJšžœžœ˜Jš:™:Jš.™.šF™FJš4™4—Jš œžœžœžœ žœžœžœ˜G——šœ™š œžœžœ˜#J˜J˜J˜Jš/™/Jš:™:J˜—Jš  œžœžœžœ žœžœ žœ˜JJ˜Jš œžœžœžœ žœžœ žœ˜KJ˜Jš  œžœžœžœ žœžœžœ˜FJ˜Jš œ˜.J˜Jš  œ˜0J˜Jš œ˜-—šœ>™>š  œžœ!žœ˜6Jšœͺ™ͺ—J˜š  œžœžœžœ˜?J™;J™K—J˜Jš œžœ˜/J˜Jš  œžœžœ˜*J˜š  œžœ˜Jšœ ˜ Jš œžœžœžœžœ˜7Jšžœžœ˜J™/Jš+™+——šœ™Jš œž œžœžœ ˜4J˜Jš œž œžœ ˜+J˜š œž œ ˜ J™·——šœ™š œžœžœ˜AL™+——™ Jš œžœF˜^J˜Jš  œžœžœžœ$˜DJ˜—Jšžœ˜J˜—…—¨`