/* REXX QHELP Does the specified input have a real HELP segment? Answer with a GCL. The caller has invoked EDIT and named QHELP as the initial macro. Find 'HELP:' in 1 and an 'exit' statement following that also carries a '@ HELP' string. . PUSH "0 (xef) OK" if both found and there is no dot-aster-slash in the HELP section. . PUSH "8 (xef) NG" if any failure. Subroutine of TOOLHELP. */ address ISREDIT "MACRO (opts)" parse var opts parms "((" opts upper opts opts = Strip( opts,'T',')' ) /* yes we want no bananas */ parse value "" with tv parse var opts "TRACE" tv . parse value tv "N" with tv . rc = Trace('O') ; rc = Trace(tv) xef = 'EF'x "X ALL" /* hide everything */ "FIND 'HELP:' 1 FIRST " /* find start of HELP */ if rc > 0 then signal ng "(start) = LINENUM .zcsr" "FIND 'exit' 1 NEXT " /* find end of HELP */ if rc > 0 then signal ng "(end) = LINENUM .zcsr" "RESET " start end /* expose entire HELP pgf */ "(txt) = LINE .zcsr" if Pos( "@ HELP",txt ) = 0 then signal ng /* non-canonical */ "F '.*/' NX ALL " /* unfinished HELP */ if rc = 0 then signal ng OK: "CANCEL" push "0" xef "OK" exit NG: "CANCEL" push "8" xef "NG" exit /*@ QHELP */