|
@@ -1136,31 +1136,40 @@ end;
|
|
|
|
|
|
|
|
|
|
{$ifndef FPUNONE}
|
|
{$ifndef FPUNONE}
|
|
-procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : ansistring);[public,alias:'FPC_ANSISTR_FLOAT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[public,alias:'FPC_ANSISTR_FLOAT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
var
|
|
var
|
|
ss: ShortString;
|
|
ss: ShortString;
|
|
begin
|
|
begin
|
|
str_real(len,fr,d,treal_type(rt),ss);
|
|
str_real(len,fr,d,treal_type(rt),ss);
|
|
s:=ss;
|
|
s:=ss;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
{$endif}
|
|
{$endif}
|
|
|
|
|
|
-procedure fpc_ansistr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:ansistring);[public,alias:'FPC_ANSISTR_ENUM'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+procedure fpc_ansistr_enum(ordinal,len:sizeint;typinfo,ord2strindex:pointer;out s:RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[public,alias:'FPC_ANSISTR_ENUM'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
var ss:shortstring;
|
|
var ss:shortstring;
|
|
|
|
|
|
begin
|
|
begin
|
|
fpc_shortstr_enum(ordinal,len,typinfo,ord2strindex,ss);
|
|
fpc_shortstr_enum(ordinal,len,typinfo,ord2strindex,ss);
|
|
s:=ss;
|
|
s:=ss;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
-procedure fpc_ansistr_bool(b : boolean;len:sizeint;out s:ansistring);[public,alias:'FPC_ANSISTR_BOOL'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+procedure fpc_ansistr_bool(b : boolean;len:sizeint;out s:RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[public,alias:'FPC_ANSISTR_BOOL'];compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
var
|
|
var
|
|
ss:shortstring;
|
|
ss:shortstring;
|
|
begin
|
|
begin
|
|
fpc_shortstr_bool(b,len,ss);
|
|
fpc_shortstr_bool(b,len,ss);
|
|
s:=ss;
|
|
s:=ss;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
@@ -1172,50 +1181,65 @@ end;
|
|
|
|
|
|
|
|
|
|
{$ifdef FPC_HAS_STR_CURRENCY}
|
|
{$ifdef FPC_HAS_STR_CURRENCY}
|
|
-procedure fpc_AnsiStr_Currency(c : currency;len,fr : SizeInt;out s : ansistring);[public,alias:'FPC_ANSISTR_CURRENCY']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+procedure fpc_AnsiStr_Currency(c : currency;len,fr : SizeInt;out s : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[public,alias:'FPC_ANSISTR_CURRENCY']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
var
|
|
var
|
|
ss: ShortString;
|
|
ss: ShortString;
|
|
begin
|
|
begin
|
|
str(c:len:fr,ss);
|
|
str(c:len:fr,ss);
|
|
s:=ss;
|
|
s:=ss;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
{$endif FPC_HAS_STR_CURRENCY}
|
|
{$endif FPC_HAS_STR_CURRENCY}
|
|
|
|
|
|
-Procedure fpc_AnsiStr_UInt(v : ValUInt;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALUINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+Procedure fpc_AnsiStr_UInt(v : ValUInt;Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_VALUINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
Var
|
|
Var
|
|
SS : ShortString;
|
|
SS : ShortString;
|
|
begin
|
|
begin
|
|
str(v:Len,SS);
|
|
str(v:Len,SS);
|
|
S:=SS;
|
|
S:=SS;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-Procedure fpc_AnsiStr_SInt(v : ValSInt;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALSINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+Procedure fpc_AnsiStr_SInt(v : ValSInt;Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_VALSINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
Var
|
|
Var
|
|
SS : ShortString;
|
|
SS : ShortString;
|
|
begin
|
|
begin
|
|
str (v:Len,SS);
|
|
str (v:Len,SS);
|
|
S:=SS;
|
|
S:=SS;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
{$ifndef CPU64}
|
|
{$ifndef CPU64}
|
|
|
|
|
|
-Procedure fpc_AnsiStr_QWord(v : QWord;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_QWORD']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+Procedure fpc_AnsiStr_QWord(v : QWord;Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_QWORD']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
Var
|
|
Var
|
|
SS : ShortString;
|
|
SS : ShortString;
|
|
begin
|
|
begin
|
|
str(v:Len,SS);
|
|
str(v:Len,SS);
|
|
S:=SS;
|
|
S:=SS;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
-Procedure fpc_AnsiStr_Int64(v : Int64; Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_INT64']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
|
|
|
|
+Procedure fpc_AnsiStr_Int64(v : Int64; Len : SizeInt; out S : RawByteString{$ifdef FPC_HAS_CPSTRING};cp : TSystemCodePage{$endif FPC_HAS_CPSTRING});[Public,Alias : 'FPC_ANSISTR_INT64']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
|
|
Var
|
|
Var
|
|
SS : ShortString;
|
|
SS : ShortString;
|
|
begin
|
|
begin
|
|
str (v:Len,SS);
|
|
str (v:Len,SS);
|
|
S:=SS;
|
|
S:=SS;
|
|
|
|
+ {$ifdef FPC_HAS_CPSTRING}
|
|
|
|
+ SetCodePage(s,cp,false);
|
|
|
|
+ {$endif FPC_HAS_CPSTRING}
|
|
end;
|
|
end;
|
|
|
|
|
|
{$endif CPU64}
|
|
{$endif CPU64}
|