/* CSON: NX the .cs on/of ranges in DCF material (REXX)*/ /********************************************************************* MACRO: Reformat lines of data PURPOSE: Reformat data in edit EXAMPLES: CSON 6 CSON 6 9 RELATED: TAGX, LABNX *********************************************************************** CSON Author: David McRitchie, created 1994/05/19 is03 at "The REXX Macros Toolbox", DMcRitchie@hotmail.com "The REXX Macros Toolbox" "The REXX Macros Toolbox" *******************************************************************/ Address 'ISREDIT';'MACRO (token)' 'x all' if token = '' then token = '1 2 3 4 5 6 7 8 9 0' do i = 1 to words(token) "seek first p'=' 1" do forever "find word '.cs" word(token,i)" on'" if rc \= 0 then leave "label .zcsr = .beg 1" "find word '.cs" word(token,i)" off'" if rc \= 0 then do "line_before .zf = noteline", """Last .cs" word(token,i) "on -- is not matched with off""" "reset .beg .beg x" "line_after .beg = msgline ", """Last .cs" word(token,i) "on -- is not matched with off""" leave end "reset .beg .zcsr x " end "seek word x '.cs" word(token,i)" off'" if rc = 0 then do "line_before .zf = noteline", """Last .cs" word(token,i) "on -- is not matched with off""" "line_after .zcsr = noteline", """Last .cs" word(token,i) "on -- is not matched with off""" end end /* test .cs 3 on .******* .cs 3 off .************ .cs 2 off .cs 1 on .******* .cs 1 off .************ .cs 2 off ****************************/