home *** CD-ROM | disk | FTP | other *** search
- *┌───────────────────────────────────────────────────────────────────────┐
- *│ KEDIT all files listed in directory - possibly KEDIT DIR (profile ... │
- *└───────────────────────────────────────────────────────────────────────┘
- $D = 'kedit' FILEID.1() '(nodefext'; A = ARG(1);
- M = 'emsg MULTIPLE'; S = 'nomsg select' DISPLAY.2()+1;
- if INITIAL() & NBFILE.1() = 1 then
- do
- 'macro PROFILE'; P = POS( ')' , A );
- if P > 0 then A = SUBSTR( A , P+1 ); else A = '';
- end
- C = 1;
- do forever
- P = POS( '(' , A , C ); if P = 0 then leave;
- C = POS( ')' , A , P ); if C = 0 then leave;
- end
- if P = 0 then P = LENGTH(A)+1;
- C = SUBSTR( A , 1 , P-1 ); O = SUBSTR( A , P+1 );
- if C \= '' then C = 'synex' C;
- if SCROLLLOCK() then
- do forever
- 'top'; 'locate /<DIR>/'; if RC \= 0 then leave;
- F = DIRFILEID.1(); 'delete 1'; 'dirappend' F;
- end
- 'top'; 'locate ^/<DIR>/';
- if RC = 0 then
- do
- 'set reserved 1 bright white MULTIPLE profile' DEFPROFILE.1() A 'of:'
- do forever
- F = DIRFILEID.1(); 'msg' F; 'refresh'; 'kedit' F '(nodefext' O;
- if RC > 1 then do; M 'stopped at' F; leave; end
- C; if RC \= 0 & F = FILEID.1() then 'quit';
- $D; S '^/<DIR>/'; if RC \= 0 then do; 'all'; 'top'; leave; end
- end
- 'set reserved 1 OFF';
- if NBFILE.1() > 1 then 'query ring'; else if INITIAL() then 'qquit';
- end
- else
- M 'no file found';
-