lazutils: fixed compilation on win64

git-svn-id: branches/fixes_1_4@47880 -
This commit is contained in:
mattias 2015-02-18 16:53:12 +00:00
parent 53eedaa08b
commit 3cb4d0a391
2 changed files with 11 additions and 11 deletions

View File

@ -238,7 +238,7 @@ Type
var var
CompareFunc: function(const Item1, Item2: String): Integer; CompareFunc: function(const Item1, Item2: String): PtrInt;
SourceRoot, DestRoot, CmpDest, CmpSource: String; SourceRoot, DestRoot, CmpDest, CmpSource: String;
CmpDestLen, CmpSourceLen, DestCount, SourceCount, i, CmpDestLen, CmpSourceLen, DestCount, SourceCount, i,
SharedFolders, LevelsBack, LevelsUp: Integer; SharedFolders, LevelsBack, LevelsUp: Integer;

View File

@ -124,11 +124,11 @@ procedure AssignUTF8ListToAnsi(UTF8List, AnsiList: TStrings);
//compare functions //compare functions
function UTF8CompareStr(const S1, S2: string): Integer; inline; function UTF8CompareStr(const S1, S2: string): PtrInt; inline;
function UTF8CompareStrP(S1, S2: PChar): Integer; function UTF8CompareStrP(S1, S2: PChar): PtrInt;
function UTF8CompareStr(S1: PChar; Count1: SizeInt; S2: PChar; Count2: SizeInt): Integer; function UTF8CompareStr(S1: PChar; Count1: SizeInt; S2: PChar; Count2: SizeInt): PtrInt;
function UTF8CompareText(const S1, S2: string): Integer; function UTF8CompareText(const S1, S2: string): PtrInt;
function UTF8CompareStrCollated(const S1, S2: string): Integer; function UTF8CompareStrCollated(const S1, S2: string): PtrInt;
function CompareStrListUTF8LowerCase(List: TStringList; Index1, Index2: Integer): Integer; function CompareStrListUTF8LowerCase(List: TStringList; Index1, Index2: Integer): Integer;
type type
@ -2855,19 +2855,19 @@ end;
Returns: < 0 if S1 < S2, 0 if S1 = S2, > 0 if S2 > S1. Returns: < 0 if S1 < S2, 0 if S1 = S2, > 0 if S2 > S1.
Compare 2 UTF8 encoded strings, case sensitive. Compare 2 UTF8 encoded strings, case sensitive.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function UTF8CompareStr(const S1, S2: string): Integer; function UTF8CompareStr(const S1, S2: string): PtrInt;
begin begin
Result := UTF8CompareStr(PChar(Pointer(S1)),length(S1), Result := UTF8CompareStr(PChar(Pointer(S1)),length(S1),
PChar(Pointer(S2)),length(S2)); PChar(Pointer(S2)),length(S2));
end; end;
function UTF8CompareStrP(S1, S2: PChar): Integer; function UTF8CompareStrP(S1, S2: PChar): PtrInt;
begin begin
Result:=UTF8CompareStr(S1,StrLen(S1),S2,StrLen(S2)); Result:=UTF8CompareStr(S1,StrLen(S1),S2,StrLen(S2));
end; end;
function UTF8CompareStr(S1: PChar; Count1: SizeInt; S2: PChar; Count2: SizeInt function UTF8CompareStr(S1: PChar; Count1: SizeInt; S2: PChar; Count2: SizeInt
): Integer; ): PtrInt;
var var
Count: SizeInt; Count: SizeInt;
begin begin
@ -2894,7 +2894,7 @@ end;
Note: Use this function instead of AnsiCompareText. Note: Use this function instead of AnsiCompareText.
This function guarantees proper collation on all supported platforms. This function guarantees proper collation on all supported platforms.
------------------------------------------------------------------------------} ------------------------------------------------------------------------------}
function UTF8CompareText(const S1, S2: string): Integer; function UTF8CompareText(const S1, S2: string): PtrInt;
var var
S1Lower, S2Lower: string; S1Lower, S2Lower: string;
begin begin
@ -2903,7 +2903,7 @@ begin
Result := UTF8CompareStr(S1Lower, S2Lower); Result := UTF8CompareStr(S1Lower, S2Lower);
end; end;
function UTF8CompareStrCollated(const S1, S2: string): Integer; function UTF8CompareStrCollated(const S1, S2: string): PtrInt;
begin begin
{$IFDEF MSWINDOWS} {$IFDEF MSWINDOWS}
Result := AnsiCompareStr(UTF8ToSys(S1), UTF8ToSys(S2)); Result := AnsiCompareStr(UTF8ToSys(S1), UTF8ToSys(S2));