mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-18 01:38:46 +02:00
Integers are 16-bit in system, replace with SizeInt.
This commit is contained in:
parent
a4240a0c62
commit
b0076a4709
@ -51,11 +51,11 @@ procedure UnicodeCharLenToStrVar(Src : PUnicodeChar;Len : SizeInt;out Dest : Ans
|
|||||||
procedure UnicodeCharToStrVar(S : PUnicodeChar;out Dest : AnsiString);
|
procedure UnicodeCharToStrVar(S : PUnicodeChar;out Dest : AnsiString);
|
||||||
|
|
||||||
function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
|
function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
|
||||||
LocaleStrLen: Integer; UnicodeStr: PWideChar; UnicodeStrLen: Integer): Integer; overload;
|
LocaleStrLen: SizeInt; UnicodeStr: PWideChar; UnicodeStrLen: SizeInt): SizeInt; overload;
|
||||||
|
|
||||||
function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
|
function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
|
||||||
LocaleStr: PAnsiChar; LocaleStrLen: Integer; UnicodeStr: PWideChar;
|
LocaleStr: PAnsiChar; LocaleStrLen: SizeInt; UnicodeStr: PWideChar;
|
||||||
UnicodeStrLen: Integer): Integer; overload;
|
UnicodeStrLen: SizeInt): SizeInt; overload;
|
||||||
|
|
||||||
|
|
||||||
procedure DefaultUnicode2AnsiMove(source:punicodechar;var dest:RawByteString;cp : TSystemCodePage;len:SizeInt);
|
procedure DefaultUnicode2AnsiMove(source:punicodechar;var dest:RawByteString;cp : TSystemCodePage;len:SizeInt);
|
||||||
|
@ -1044,7 +1044,7 @@ function StringToWideChar(const Src : RawByteString;Dest : PWideChar;DestSize :
|
|||||||
{$ifndef FPC_HAS_UNICODEFROMLOCALECHARS}
|
{$ifndef FPC_HAS_UNICODEFROMLOCALECHARS}
|
||||||
{$define FPC_HAS_UNICODEFROMLOCALECHARS}
|
{$define FPC_HAS_UNICODEFROMLOCALECHARS}
|
||||||
function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
|
function UnicodeFromLocaleChars(CodePage, Flags: Cardinal; LocaleStr: PAnsiChar;
|
||||||
LocaleStrLen: Integer; UnicodeStr: PWideChar; UnicodeStrLen: Integer): Integer; overload;
|
LocaleStrLen: SizeInt; UnicodeStr: PWideChar; UnicodeStrLen: SizeInt): SizeInt; overload;
|
||||||
|
|
||||||
var
|
var
|
||||||
temp: widestring;
|
temp: widestring;
|
||||||
@ -1066,8 +1066,8 @@ end;
|
|||||||
{$endif ndef FPC_HAS_UNICODEFROMLOCALECHARS}
|
{$endif ndef FPC_HAS_UNICODEFROMLOCALECHARS}
|
||||||
|
|
||||||
function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
|
function UnicodeFromLocaleChars(const LocaleName: AnsiString; Flags: Cardinal;
|
||||||
LocaleStr: PAnsiChar; LocaleStrLen: Integer; UnicodeStr: PWideChar;
|
LocaleStr: PAnsiChar; LocaleStrLen: SizeInt; UnicodeStr: PWideChar;
|
||||||
UnicodeStrLen: Integer): Integer; overload;
|
UnicodeStrLen: SizeInt): SizeInt; overload;
|
||||||
|
|
||||||
var
|
var
|
||||||
CP : TSystemCodePage;
|
CP : TSystemCodePage;
|
||||||
@ -2405,7 +2405,7 @@ end;
|
|||||||
function UTF8ToString(const S: PAnsiChar): UnicodeString;
|
function UTF8ToString(const S: PAnsiChar): UnicodeString;
|
||||||
var
|
var
|
||||||
rs: RawByteString;
|
rs: RawByteString;
|
||||||
Count: Integer;
|
Count: SizeInt;
|
||||||
begin
|
begin
|
||||||
Count := length(S);
|
Count := length(S);
|
||||||
SetLength(rs, Count);
|
SetLength(rs, Count);
|
||||||
@ -2426,7 +2426,7 @@ end;
|
|||||||
function UTF8ToString(const S: array of AnsiChar): UnicodeString;
|
function UTF8ToString(const S: array of AnsiChar): UnicodeString;
|
||||||
var
|
var
|
||||||
rs: RawByteString;
|
rs: RawByteString;
|
||||||
Count: Integer;
|
Count: SizeInt;
|
||||||
begin
|
begin
|
||||||
Count := Length(S);
|
Count := Length(S);
|
||||||
SetLength(rs, Count);
|
SetLength(rs, Count);
|
||||||
@ -2438,7 +2438,7 @@ end;
|
|||||||
function UTF8ToString(const S: array of Byte): UnicodeString;
|
function UTF8ToString(const S: array of Byte): UnicodeString;
|
||||||
var
|
var
|
||||||
rs: RawByteString;
|
rs: RawByteString;
|
||||||
Count: Integer;
|
Count: SizeInt;
|
||||||
begin
|
begin
|
||||||
Count := Length(S);
|
Count := Length(S);
|
||||||
SetLength(rs, Count);
|
SetLength(rs, Count);
|
||||||
|
Loading…
Reference in New Issue
Block a user