% % stack: [ [ . . . ] list-count ] % *vaxprest Task.@ 0 Tree./Below empty !tglobal % % stack: empty % % create the master list of jsx files in Pshop purview % *flisting % % variable builder has the executable list from % all locations for Pshop jsx % % stack: empty % pop _builder execstr countup { !ordinal _Values.SearchB second Str.Found { dup !file "filex " log() read % % search for occurences within functions % { isnull ? _Values.SearchD second Str.Found "srchd " log() { % % found the string occurence % split this position in the string % _Values.SearchD slice exch "/*:" revslice % % stack: right-of-value left-of-func func-to-occurence % isnull { % % no reference for function % pop2 } { % % put together the string back to the function token % in case this string is within the function name % ^"/*:" &_Values.SearchD rot & % % stack: left-of-func right-with-func % "/*:" Str.Right ":*/" slice % % stack: left-of-func func-name past-func % % seed a dummy token to insure an empty string for right % part of last function % &"/*:" "/*:" Str.Right isnull { % % no more functions % } { % % there is content in the right of the next func % remove the dummy token % -3 right ^"/*:" } ifelse % % stack: left-of-func func-name past-func-body % % check for global tree addr in left of func % rot "/*;" Str.RevRight % % stack: func-name past-func-body right-of-token % isnull { % % no global tree addr % pop _tglobal } { % % record the global tree address % ";*/" Str.Left dup !tglobal } ifelse % % stack: func-name past-func-body global-addr % rot % % stack: past-func-body global-addr func-name % % place the func name into the global tree address % exch "/" slice "|||" Str.Right ^"|||" % % stack: past-func-body func-name global-tree right-part % ^3 ^"/" % % stack: past-func-body func-name global-tree func-and-right % exch "\" Str.RevLeft &"\-1" % % stack: past-func-body func-name func-and-right global-tree-and-node % ^ "redone " log() exch % % stack: past-func-body mod-global-addr func-name % second "\" Str.Left "#" "\" replall &"\" % % stack: past-func-body global-addr func-name tree-hier % second "." "\" replall & % % stack: past-func-body global-addr func-name tree-node-hier % "hierstr " log() rootnode _\ make !\ % % stack: past-func-body global-addr func-name % "function" \! dup "\" Str.RevLeft "tpref " log() "tpref" \! "tglobal " log() dup "tglobal" \! % % turn on sorting for all nodes ancestral to this node % { Tree._Parent dup negative ? % % valid node, turn on sorting % !\ % % load the information for this node % *tasksort } loop pop % % stack: past-func-body global-addr % pop } ifelse } { pop empty } ifelse } loop pop } { % % not found in file % pop } ifelse } for 0 !counter empty Tree.Up { !\ "tglobal" \_ isnull { pop } if } for *expander % % stack: empty [ global-val . . . ] % *vaxpostd % % stack: builder % *vaxposte