home *** CD-ROM | disk | FTP | other *** search
- [AYUDA.CNV]
- [G. Cisneros, 10.9.90]
- [Include &u]
-
- [Load]
- (()()(0 1 2)(
- ((and,<[4]>,<0>).0000<1>=<2>,(if,(%r,ARR:blk[(#Hd,<0>)]),<>,<<
- >>(%Or,<2>)<<
- >>(%W,ARR:blk[(#Hd,<0>)],<<
- >>(REC#(2rpG 1$ryGH63+ [Get available & reqd. memory]
- pG46N'*File too big'mLL;
- 16/&LpGmN'*Out of memory'nLmL; [Quit if not enough]
- lyG-,2S [Adjust available no. of paragraphs]
- 0,6r|lyG 16* 2- wz0qLS JD [set up new workspace]
- 6rn+ 6S [Adjust base of available mem.]
- @C'Loading help file 'TL2$ryt
- @R [Read help file into new workspace]
- Zz(B26%ED:0%ED:;) [Clean ending NULs and ^Zs]
- J''w!mw [Reactivate original workspace]
- lyGI [Insert hex block for new WS];)#))<<
- >>(%C,<2>)(REC#nI#))):
- (*<0>,(C)(,(%r,TTY:<0><,> press (<)return(>) to continue )));
- ((and,<[4]>,<0>).,*File too big):
- (,<=>(REC?QDH(26x^''wml26$S;L;)w [Save WS block, set up alternate WS]
- (27x^1858c27$S;L;) [23-line buffer]
- ''(14858FzqL|:;) [find all sections (LF :)]
- 28x(29x(p4/28$SL29$S [save block ptr in 29, len in 28]
- (Zz<@C>28$r64mJj [label selections w. letters]
- ((d;'HELP error - Fewer sections than headings'TLxM)
- n^pGm%'. '|TL10%Vqtz':'(EL):;)
- (Zz<@E>'Letter = Select a section, 'TL
- (25x^'^ or ctrl-C = Exit';
- L'^ = Up one level, ctrl-C = Exit ';)TL
- R3%=Zz<@C>xE_;'^'=nLZz<@C>3;
- Zz<I'&''u'x&J'A'lyG%(M)ZD>x+'Invalid selection'TL:
- nLQD>\65-,4*;)3=;
- 29$r+pG4+ 4GYBj4GY
- ':'Ez(13%U''w26$ryGQmw@Cn'New level: Searching for 'TLTI
- 25$r^25$Sm<@SJA;25$rd25$S;)JZD>nw:
- <<''1m [delimit section, mark PDL, set panel No.]
- (23(d10%(Fz;L):;)JQ27$rywmD<@CI@Q@E>nw
- q|z(ABlyG#;'EOS';)x+' 'TLTL': 'TL
- (25x^'^ or ';L'^ = Up one level, ';)TL
- 'ctrl-C = Exit, M = Menu,'TL(lyG 1=;L' S = Start,'TL;)
- x+' 'TL(lyG1=;L'L = Last, 'TL;)'other = Continue 'TL
- R ZzI<'&''u'x&JQD>'S'=nL(''=;L:)''1m>JZ<:
- 'M'=0;3%=Zz<@C>xE_;'^'=3;
- n1(=1)&'L'(=;&)dmL>YZ<:^mLpGYz>Z<AB:0;)
- nLm(''=;L:)n3=>>;
- L>>:)
- L2x:(25x^ 0,27$SL 0,26$Sn; d25$S26$ryG;)w
- ?));
- )) L
-
- [Display a screenful line by line]
- (()()(0 1)(
- (<0>(^J)<1>,(M,<0>(^J))<1>):
- (<>,);
- (,(M,<=>));
- )) Q
-
- [Expand tabs while writing to the screen]
- (()(
- ((IF,(0),<=> ,(and,<[8]>,<0>),(REC?0$ryt?))) H
- )(0 1 2)(
- ((and,<[8]>,<0>(^I)<1>)<2>,(H,<0>)<1><2>):
- ((and,<[8]>,<0>)<1>,(REC?0$ryt?)<1>):
- (<0>(^I)<1>,(H,<0>)<1>):
- (<[1]>,<=>(REC?qtD?));
- )) M
-
- [Main program -- set up list of HLP files from PATH]
- ((
- [PATTERNS:]
- [A letter]
- ((or,(IVL/A/Z/),(IVL/a/z/))) l
- [A digit]
- ((IVL/0/9/)) d
- [A number]
- (<:d:>(ITR,<:d:>)) n
- [A valid file name character]
- ((or,<:l:>,<:d:>,$,&,#,%,<'>,<(>,<)>,-,@,^,{,},~,`,!)) h
- [One or more valid characters]
- (<:h:>(ITR,<:h:>)) s
- [A valid name (with extension, if there is one)]
- ((and,<:s:>,(NOT,<[9]>))(or,.(and,(ITR,<:h:>),(NOT,<[4]>)),)) f
- [A valid prefix]
- ((or,<:l:>:,)(or,\,)(ITR,(or,..,.,<:f:>)\)) g
- )(
- ((until,(%r,<2>,<[512]>),<>,<=>,(%r,<2>,<[512]>))) R
- [Append \ to subdirectory names]
- ((WHILE,(0 1),<=>,<0>;<1>,(if,<0>,<:g:><>,<=>;,<=>\;),<1>)) Z
- [Get the "PATH" environment variable; make list of available
- HLP files with their lengths.]
- ((if,(%Or,CTR:fs)<<
- >>(WHILE,(0 1),<0>;(IF,(0),<30>,<-->PATH=<0>(^@),(Z,<0>;),),<0>;<1>,<<
- >>(until,(%S,<0>*.HLP),Not Found,<<
- >>(IF,(2 3),<=>,<[5]>(and,<[4]>,<2>)<3>,<<
- >>(#pDh,(%r,CTR:fs)).(#h,<2>)=<0><3>(^M)),(%A),),<1>,),<<
- >><>,(%t,No HLP files found)(%M),<<
- >>(if,(%r,CTR:fs)(%C,CTR:fs)(%Ow,ARR:ct,2,6),,<<
- >>(%W,ARR:ct[1],<=>)(%W,ARR:ct[2],(#Dh,<=>)))<<
- >>(%Ow,MEM:lst,(#+,(&!,<=>)+32))(%W,MEM:lst,<=>)<<
- >>(%Ow,ARR:blk,(%r,ARR:ct[1]),24))<<
- >>(%t,AYUDA.CNV(^MJ)<<
- >>Copyright <(>c<)> 1990 - Gerardo Cisneros(^MJ)<<
- >>DERECHOS RESERVADOS(^MJ))<<
- >>(,(%r,TTY:Press (<)return(>) to continue ))) P
- [Find file by name]
- ((IF,(0),<=>(%Or,MEM:lst),<0>,<<
- >>(%R,(1),MEM:lst,(itr,<-->(^M))(and,<[13]>=<:g:><0>,<1>)(^M),<1>,))) F
- [Find file by number]
- ((IF,(0),<=>(%Or,MEM:lst),<0>,<<
- >>(%R,(1),MEM:lst,(itr,<-->(^M))<0>.<1>(^M),<0>.<1>,))) N
- [Set active page to 0, clear screen, home cursor]
- ((%G,5,al=0)(%G,6,al=0,bh=3,cx=0,dh=24,dl=79)(%G,2,bh=0,dh=0,cl=0)) C
- [Clear last two lines, put cursor at 23,0]
- ((%G,6,al=0,bh=3,ch=23,cl=0,dh=24,dl=79)(%G,2,bh=0,dh=22,cl=0)) E
- [Display and get a choice]
- ((%Or,MEM:lst)(C)<<
- >>(while,X(%r,MEM:lst),X,,<<
- >>(if,(IF,(0 1),<=>,X<0>.<[8]>=<1>,<<
- >>(%W,TTY:, (#Hd,<0>). <1>(^MJ))<<
- >>(if,(#%,(#Hd,<0>)%23),0,<<
- >>(X,(#-,(#Hd,<0>)-22):(#Hd,<0>)),<<
- >>(%r,ARR:ct[2]),<0>,<<
- >>(X,(#f,(#Hd,<0>)/23*23+1):(#Hd,<0>)),)),<>,<<
- >>X(if,(%r,MEM:lst),(^Z),(%Or,MEM:lst)(%r,MEM:lst)),(N,<=>)))) D
- ((if,(#<,<1>,(%r,ARR:ct[1])),t,continue,<<
- >>(#<,(%r,ARR:ct[1]),24),t,repeat,restart)) Y
- ((E)(if,(%r,TTY:<<
- >>A number between <0> and <1> selects<,> Ctrl-C returns to DOS<,>(^MJ)<<
- >>other inputs (Y) the list: ),<:n:><>,(#Dh,<=>),)) V
- [Read choice]
- ((IF,(0 1),<=>,<0>:<1>,<<
- >>(until,(V),(or,<>,(ivl,(#Dh,<0>),(#Dh,<1>))),,(V)))(C)) X
- ((if,(F,<=>),<>,<<
- >>(,(%r,TTY:Not found<,> press (<)return(>) to continue )),<<
- >>(L,<=>)*)) S
- )(0 1)(
- ((and,<:g:><>,<0>),(P)(L,(D)));
- ((and,<:g:>,<0>)<1>.HLP<>,(P)(if,(F,<1>.HLP),<>,<<
- >>(,(%r,TTY:Not found<,> press (<)return(>) to continue ))(L,(D)),<<
- >>(L,<=>)));
- (<-->.<>,<=>HLP):
- (<-->.,Illegal name: <=> (^MJ)<<
- >><(>No extension or .HLP extension required<)>);
- (,<=>.HLP):
- ))