-
Notifications
You must be signed in to change notification settings - Fork 0
/
HELPZ.PAS
executable file
·48 lines (40 loc) · 914 Bytes
/
HELPZ.PAS
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
Unit HelpZ;
INTERFACE
const
stTopic = '.topic';
stTitle = '.title';
hiNoTopic = 0;
hiAbout = 1;
hiChooseDrives = 2;
hiChoosePart = 3;
hiViewFiles = 4;
type pString = ^string;
procedure ViewHelp(hlpfile : string; idx : word);
IMPLEMENTATION Uses DOS,TextModeUtil,Service;
procedure ViewHelp;
var f : text;
found : boolean;
s,t : string;
i : integer;
lines : array[1..5000] of pString;
begin
{$I-}
assign(f,hlpfile); reset(f);
if IOResult<>0 then exit;
found:=false; {¨é¥¬ § ¯à®é¥ë© ⮯¨ª}
t:=upcasestr(stTopic)+' ';
while (not eof(f))or(not found) do
begin
readln(f,s);
i:=1;
s:=ltrim(rtrim(s));
if upcasestr(copy(s,1,length(stTopic)+1))=t then
begin
s:=ltrim(copy(s,length(stTopic)+1,255));
found:=true;
end;
end;
close(f);
end;
END.
... and Justice 4 all. (c) MetallicA