Sequential option
This commit is contained in:
parent
6a49bd147d
commit
bca312b26a
|
@ -10,6 +10,8 @@ Type
|
|||
IniFile : Text;
|
||||
Buffer : Array[1..1024*4] of Char;
|
||||
Opened : Boolean;
|
||||
Sequential : Boolean;
|
||||
CurrentCat : String;
|
||||
|
||||
Constructor Create (FN: String);
|
||||
Destructor Destroy; Override;
|
||||
|
@ -24,6 +26,8 @@ Uses
|
|||
|
||||
Constructor TIniReader.Create (FN: String);
|
||||
Begin
|
||||
Sequential := False;
|
||||
CurrentCat := '';
|
||||
FileName := FN;
|
||||
FileMode := 66;
|
||||
|
||||
|
@ -52,8 +56,11 @@ Begin
|
|||
Category := strUpper(Category);
|
||||
Value := strUpper(Value);
|
||||
|
||||
Reset (IniFile);
|
||||
If Not Sequential Then Reset (IniFile);
|
||||
|
||||
If Sequential and (CurrentCat = Category) Then
|
||||
GotCat := True
|
||||
Else
|
||||
While Not GotCat And Not Eof(IniFile) Do Begin
|
||||
ReadLn (IniFile, RawStr);
|
||||
|
||||
|
@ -67,6 +74,8 @@ Begin
|
|||
|
||||
If Not GotCat Then Exit;
|
||||
|
||||
CurrentCat := Category;
|
||||
|
||||
While Not Eof(IniFile) Do Begin
|
||||
ReadLn (IniFile, RawStr);
|
||||
|
||||
|
|
Loading…
Reference in New Issue