Begin of code restructure
This commit is contained in:
parent
2d05fe7992
commit
22e83a5387
|
@ -46,6 +46,7 @@ Type
|
||||||
Destructor Destroy; Override;
|
Destructor Destroy; Override;
|
||||||
Procedure OpenHelp (X1, Y1, X2, Y2: Byte; FN, Keyword: String);
|
Procedure OpenHelp (X1, Y1, X2, Y2: Byte; FN, Keyword: String);
|
||||||
Function ReadKeywordData : Boolean;
|
Function ReadKeywordData : Boolean;
|
||||||
|
Function StripLinks (Str: String) : String;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Implementation
|
Implementation
|
||||||
|
@ -54,7 +55,7 @@ Uses
|
||||||
m_Strings,
|
m_Strings,
|
||||||
bbs_Core;
|
bbs_Core;
|
||||||
|
|
||||||
Function StripLinks (S: String) : String;
|
Function TAnsiMenuHelp.StripLinks (Str: String) : String;
|
||||||
Var
|
Var
|
||||||
A : Byte;
|
A : Byte;
|
||||||
B : Byte;
|
B : Byte;
|
||||||
|
@ -62,20 +63,20 @@ Begin
|
||||||
A := 255;
|
A := 255;
|
||||||
|
|
||||||
While A > 0 Do Begin
|
While A > 0 Do Begin
|
||||||
A := Pos('<link=', S);
|
A := Pos('<link=', Str);
|
||||||
|
|
||||||
If A > 0 Then Begin
|
If A > 0 Then Begin
|
||||||
B := 1;
|
B := 1;
|
||||||
while S[A+6+B] <> '>' Do Inc(B);
|
while Str[A + 6 + B] <> '>' Do Inc(B);
|
||||||
Delete (S, A, 7 + B);
|
Delete (Str, A, 7 + B);
|
||||||
|
|
||||||
A := Pos('</link>', S);
|
A := Pos('</link>', Str);
|
||||||
If A = 0 Then A := Length(S);
|
If A = 0 Then A := Length(Str);
|
||||||
Delete (S, A, 7);
|
Delete (Str, A, 7);
|
||||||
End;
|
End;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Result := S;
|
Result := Str;
|
||||||
End;
|
End;
|
||||||
|
|
||||||
Constructor TAnsiMenuHelp.Create;
|
Constructor TAnsiMenuHelp.Create;
|
||||||
|
@ -106,6 +107,7 @@ Begin
|
||||||
ReadLn (HelpFile, Str);
|
ReadLn (HelpFile, Str);
|
||||||
|
|
||||||
Temp1 := Pos('<keyword> ', Str);
|
Temp1 := Pos('<keyword> ', Str);
|
||||||
|
|
||||||
If Temp1 = 0 Then Continue;
|
If Temp1 = 0 Then Continue;
|
||||||
|
|
||||||
Key := Copy(Str, Temp1 + 10, Length(Str));
|
Key := Copy(Str, Temp1 + 10, Length(Str));
|
||||||
|
|
Loading…
Reference in New Issue