Changeset 5 for trunk/StringTables.pas


Ignore:
Timestamp:
Jan 7, 2017, 11:20:43 AM (8 years ago)
Author:
chronos
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/StringTables.pas

    r2 r5  
    99
    1010type
    11 TCharList=array[0..9999999] of char;
     11TCharList=array[0..9999999] of AnsiChar;
    1212
    1313TStringTable=class
    1414  constructor Create;
    1515  destructor Destroy; override;
    16   function LoadFromFile(const FileName: string): boolean;
    17   function GetHandle(const Item: string): integer;
     16  function LoadFromFile(const FileName: String): boolean;
     17  function GetHandle(const Item: AnsiString): integer;
    1818  function LookupByHandle(Handle: integer; Index: integer =-1): string;
    1919  function Lookup(const Item: string; Index: integer =-1): string;
     
    2222  Count: integer;
    2323  Data: ^TCharList;
    24   Lines: array[0..MaxCount-1] of PChar;
     24  Lines: array[0..MaxCount-1] of PAnsiChar;
    2525  end;
    2626
     
    4242end;
    4343
    44 function TStringTable.LoadFromFile(const FileName: string): boolean;
     44function TStringTable.LoadFromFile(const FileName:string): boolean;
    4545var
    4646nData, i: integer;
     
    7171end;
    7272
    73 function TStringTable.GetHandle(const Item: string): integer;
     73function TStringTable.GetHandle(const Item: AnsiString): integer;
    7474var
    7575i,l: integer;
Note: See TracChangeset for help on using the changeset viewer.