'set novalue on' /* force KEXX and its way of SIGNAL ON NOVALUE */ /* usage: [MACRO] QX [file] */ /* example: QX */ /* requires: Kedit 5.0 (Frank Ellermann, 1998) */ /* QQuit current file and Xedit new file, or reload current file, */ /* combining functions of SAMPLES\RELOAD.KEX with SAMPLES\XQ.KEX: */ /* 'macro qx' (= RELOAD) shows relevant GET-settings like TABSIN */ /* after forcing TABSIN OFF for *NIX stuff. */ /* 'macro qx new' (= XQ) simplified, XQ uses QUIT (with warning), */ /* QX uses QQuit (no warning) and does not */ /* delete old lines (to free DOS memory) */ OLD = '"' || fileid.1() || '"' /* support blanks on HPFS */ if arg() > 0 then do /* ----------- simplified XQ: ----------- */ NEW = strip( arg( 1 )) if right( NEW, 1 ) <> '"' then NEW = '"' || NEW || '"' 'xedit' NEW /* if NEW = OLD exit */ if OLD = '"' || fileid.1() || '"' then exit rc 'xedit' OLD '(new nodefext' ; 'qquit' 'xedit' NEW ; exit rc end /* ----------- simplified RELOAD: ------- */ 'range -* +*' ; 'all' /* complete OLD file */ 'set alt 0 0' ; 'del ALL' ; 'top' /* cheat AUTOSAVE 2 */ 'set alt 0 0' ; 'tabsi off' ; 'nomsg get' OLD ; OLD = rc 'set alt 0 0' ; 'lineflag nonew nochange ALL' NEW = 'tabsin' tabsin.1() tabsin.2() /* show what GET did */ NEW = NEW ' eofin' eofin.1() ' eolin' eolin.1() NEW = NEW ' lrecl' lrecl.1() recfm.1() ' trailing' trailing.1() if OLD = 0 then 'refresh' ; say NEW ; exit OLD