home *** CD-ROM | disk | FTP | other *** search
- {$symtab-,$linesize:131,$pagesize:86,
- $title:'DOHELP -- Help menu processor'}
- { COPYRIGHT @ 1982
- Jim Holtman and Eric Holtman
- 35 Dogwood Trail
- Randolph, NJ 07869
- (201) 361-3395
- }
-
- module helpscreen;
-
- type
- menu_c = super array [1..*] of lstring(40);
-
- function showit(var choices : menu_c;
- const title : lstring ) : integer;
-
- external;
-
- procedure do_help(h : integer) [public];
-
- var
- men : menu_c(20);
- txt : text;
- i,j,k : integer;
- buf : lstring(80);
- title : lstring(80);
-
- begin
- assign(txt, 'help.txt');
- reset(txt);
- buf.len := 0;
- while not eof(txt) do begin
- readln(txt, buf);
- if (buf[1] <> '#') or (buf[2] <> '#') or (buf[3] <> '#') then
- cycle;
- delete(buf, 1, 4);
- if (decode(buf, i) = false) then cycle;
- if (i <> h) then cycle;
- readln(txt, title);
- i := 1;
- while (not eof(txt)) do begin
- readln(txt, men[i]);
- i := i + 1;
- if (men[i-1].len = 0) or (eof(txt)) then begin
- men[i].len := 0;
- j:=showit(men, title);
- close(txt);
- return;
- end;
- end;
- end;
- title := 'No help for that option is available now';
- men[1].len := 0;
- j:=showit(men, title);
- close(txt);
- return;
- end;
- end.