* several changes of var parameters into out parameters to avoid

useless warnings: code parameter of val(), destination of str(),
    destinations of ansi2wide and wide2ansi

git-svn-id: trunk@2041 -
This commit is contained in:
Jonas Maebe 2005-12-23 22:25:26 +00:00
parent 4c3fb9ae00
commit 9a08cdccf0
10 changed files with 93 additions and 93 deletions

View File

@ -586,7 +586,7 @@ begin
end;
Function fpc_Val_Real_AnsiStr(Const S : AnsiString; Var Code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_ANSISTR']; compilerproc;
Function fpc_Val_Real_AnsiStr(Const S : AnsiString; out Code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_ANSISTR']; compilerproc;
Var
SS : String;
begin
@ -601,7 +601,7 @@ begin
end;
Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; Var Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_ANSISTR']; compilerproc;
Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; out Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_ANSISTR']; compilerproc;
Var
SS : ShortString;
begin
@ -616,7 +616,7 @@ begin
end;
Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; Var Code : ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_ANSISTR']; compilerproc;
Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; out Code : ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_ANSISTR']; compilerproc;
Var
SS : ShortString;
begin
@ -633,7 +633,7 @@ end;
{$ifndef CPU64}
Function fpc_Val_qword_AnsiStr (Const S : AnsiString; Var Code : ValSInt): qword; [public, alias:'FPC_VAL_QWORD_ANSISTR']; compilerproc;
Function fpc_Val_qword_AnsiStr (Const S : AnsiString; out Code : ValSInt): qword; [public, alias:'FPC_VAL_QWORD_ANSISTR']; compilerproc;
Var
SS : ShortString;
begin
@ -648,7 +648,7 @@ begin
end;
Function fpc_Val_int64_AnsiStr (Const S : AnsiString; Var Code : ValSInt): Int64; [public, alias:'FPC_VAL_INT64_ANSISTR']; compilerproc;
Function fpc_Val_int64_AnsiStr (Const S : AnsiString; out Code : ValSInt): Int64; [public, alias:'FPC_VAL_INT64_ANSISTR']; compilerproc;
Var
SS : ShortString;
begin
@ -665,7 +665,7 @@ end;
{$endif CPU64}
procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;var 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 : ansistring);[public,alias:'FPC_ANSISTR_FLOAT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
var
ss: ShortString;
begin
@ -674,7 +674,7 @@ begin
end;
Procedure fpc_AnsiStr_UInt(v : ValUInt;Len : SizeInt; Var S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALUINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Procedure fpc_AnsiStr_UInt(v : ValUInt;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALUINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Var
SS : ShortString;
begin
@ -684,7 +684,7 @@ end;
Procedure fpc_AnsiStr_SInt(v : ValSInt;Len : SizeInt; Var S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALSINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Procedure fpc_AnsiStr_SInt(v : ValSInt;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_VALSINT']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Var
SS : ShortString;
begin
@ -695,7 +695,7 @@ end;
{$ifndef CPU64}
Procedure fpc_AnsiStr_QWord(v : QWord;Len : SizeInt; Var S : AnsiString);[Public,Alias : 'FPC_ANSISTR_QWORD']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Procedure fpc_AnsiStr_QWord(v : QWord;Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_QWORD']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Var
SS : ShortString;
begin
@ -703,7 +703,7 @@ begin
S:=SS;
end;
Procedure fpc_AnsiStr_Int64(v : Int64; Len : SizeInt; Var S : AnsiString);[Public,Alias : 'FPC_ANSISTR_INT64']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Procedure fpc_AnsiStr_Int64(v : Int64; Len : SizeInt; out S : AnsiString);[Public,Alias : 'FPC_ANSISTR_INT64']; compilerproc; {$IFNDEF VER2_0} Inline; {$ENDIF}
Var
SS : ShortString;
begin

View File

@ -63,46 +63,46 @@ procedure fpc_dynarray_incr_ref(p : pointer); compilerproc;
procedure fpc_dynarray_setlength(var p : pointer;pti : pointer; dimcount : dword;dims : pdynarrayindex); compilerproc;
{ Str() support }
procedure fpc_ShortStr_sint(v : valsint;len : SizeInt;var s : shortstring); compilerproc;
procedure fpc_shortstr_uint(v : valuint;len : SizeInt;var s : shortstring); compilerproc;
procedure fpc_chararray_sint(v : valsint;len : SizeInt;var a : array of char); compilerproc;
procedure fpc_chararray_uint(v : valuint;len : SizeInt;var a : array of char); compilerproc;
procedure fpc_AnsiStr_sint(v : valsint; Len : SizeInt; Var S : AnsiString); compilerproc;
procedure fpc_AnsiStr_uint(v : valuint;Len : SizeInt; Var S : AnsiString); compilerproc;
procedure fpc_WideStr_sint(v : valsint; Len : SizeInt; Var S : WideString); compilerproc;
procedure fpc_WideStr_uint(v : valuint;Len : SizeInt; Var S : WideString); compilerproc;
procedure fpc_ShortStr_sint(v : valsint;len : SizeInt;out s : shortstring); compilerproc;
procedure fpc_shortstr_uint(v : valuint;len : SizeInt;out s : shortstring); compilerproc;
procedure fpc_chararray_sint(v : valsint;len : SizeInt;out a : array of char); compilerproc;
procedure fpc_chararray_uint(v : valuint;len : SizeInt;out a : array of char); compilerproc;
procedure fpc_AnsiStr_sint(v : valsint; Len : SizeInt; out S : AnsiString); compilerproc;
procedure fpc_AnsiStr_uint(v : valuint;Len : SizeInt; out S : AnsiString); compilerproc;
procedure fpc_WideStr_sint(v : valsint; Len : SizeInt; out S : WideString); compilerproc;
procedure fpc_WideStr_uint(v : valuint;Len : SizeInt; out S : WideString); compilerproc;
{$ifndef CPU64}
procedure fpc_shortstr_qword(v : qword;len : SizeInt;var s : shortstring); compilerproc;
procedure fpc_shortstr_int64(v : int64;len : SizeInt;var s : shortstring); compilerproc;
procedure fpc_chararray_qword(v : qword;len : SizeInt;var a : array of char); compilerproc;
procedure fpc_chararray_int64(v : int64;len : SizeInt;var a : array of char); compilerproc;
procedure fpc_ansistr_qword(v : qword;len : SizeInt;var s : ansistring); compilerproc;
procedure fpc_ansistr_int64(v : int64;len : SizeInt;var s : ansistring); compilerproc;
procedure fpc_widestr_qword(v : qword;len : SizeInt;var s : widestring); compilerproc;
procedure fpc_widestr_int64(v : int64;len : SizeInt;var s : widestring); compilerproc;
procedure fpc_shortstr_qword(v : qword;len : SizeInt;out s : shortstring); compilerproc;
procedure fpc_shortstr_int64(v : int64;len : SizeInt;out s : shortstring); compilerproc;
procedure fpc_chararray_qword(v : qword;len : SizeInt;out a : array of char); compilerproc;
procedure fpc_chararray_int64(v : int64;len : SizeInt;out a : array of char); compilerproc;
procedure fpc_ansistr_qword(v : qword;len : SizeInt;out s : ansistring); compilerproc;
procedure fpc_ansistr_int64(v : int64;len : SizeInt;out s : ansistring); compilerproc;
procedure fpc_widestr_qword(v : qword;len : SizeInt;out s : widestring); compilerproc;
procedure fpc_widestr_int64(v : int64;len : SizeInt;out s : widestring); compilerproc;
{$endif CPU64}
procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : shortstring); compilerproc;
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;var a : array of char); compilerproc;
procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : ansistring); compilerproc;
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : WideString); compilerproc;
procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : shortstring); compilerproc;
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;out a : array of char); compilerproc;
procedure fpc_AnsiStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : ansistring); compilerproc;
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : WideString); compilerproc;
{ Val() support }
Function fpc_Val_Real_ShortStr(const s : shortstring; var code : ValSInt): ValReal; compilerproc;
Function fpc_Val_Real_AnsiStr(Const S : AnsiString; Var Code : ValSInt): ValReal; compilerproc;
Function fpc_Val_Real_WideStr(Const S : WideString; Var Code : ValSInt): ValReal; compilerproc;
Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; var Code: ValSInt): ValSInt; compilerproc;
Function fpc_Val_UInt_Shortstr(Const S: ShortString; var Code: ValSInt): ValUInt; compilerproc;
Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; Var Code : ValSInt): ValUInt; compilerproc;
Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; Var Code : ValSInt): ValSInt; compilerproc;
Function fpc_Val_UInt_WideStr (Const S : WideString; Var Code : ValSInt): ValUInt; compilerproc;
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; Var Code : ValSInt): ValSInt; compilerproc;
Function fpc_Val_Real_ShortStr(const s : shortstring; out code : ValSInt): ValReal; compilerproc;
Function fpc_Val_Real_AnsiStr(Const S : AnsiString; out Code : ValSInt): ValReal; compilerproc;
Function fpc_Val_Real_WideStr(Const S : WideString; out Code : ValSInt): ValReal; compilerproc;
Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; out Code: ValSInt): ValSInt; compilerproc;
Function fpc_Val_UInt_Shortstr(Const S: ShortString; out Code: ValSInt): ValUInt; compilerproc;
Function fpc_Val_UInt_AnsiStr (Const S : AnsiString; out Code : ValSInt): ValUInt; compilerproc;
Function fpc_Val_SInt_AnsiStr (DestSize: SizeInt; Const S : AnsiString; out Code : ValSInt): ValSInt; compilerproc;
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; compilerproc;
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; out Code : ValSInt): ValSInt; compilerproc;
{$ifndef CPU64}
Function fpc_val_int64_shortstr(Const S: ShortString; var Code: ValSInt): Int64; compilerproc;
Function fpc_val_qword_shortstr(Const S: ShortString; var Code: ValSInt): QWord; compilerproc;
Function fpc_Val_qword_AnsiStr (Const S : AnsiString; Var Code : ValSInt): qword;compilerproc;
Function fpc_Val_int64_AnsiStr (Const S : AnsiString; Var Code : ValSInt): Int64; compilerproc;
Function fpc_Val_qword_WideStr (Const S : WideString; Var Code : ValSInt): qword; compilerproc;
Function fpc_Val_int64_WideStr (Const S : WideString; Var Code : ValSInt): Int64; compilerproc;
Function fpc_val_int64_shortstr(Const S: ShortString; out Code: ValSInt): Int64; compilerproc;
Function fpc_val_qword_shortstr(Const S: ShortString; out Code: ValSInt): QWord; compilerproc;
Function fpc_Val_qword_AnsiStr (Const S : AnsiString; out Code : ValSInt): qword;compilerproc;
Function fpc_Val_int64_AnsiStr (Const S : AnsiString; out Code : ValSInt): Int64; compilerproc;
Function fpc_Val_qword_WideStr (Const S : WideString; out Code : ValSInt): qword; compilerproc;
Function fpc_Val_int64_WideStr (Const S : WideString; out Code : ValSInt): Int64; compilerproc;
{$endif CPU64}
Procedure fpc_ansistr_decr_ref (Var S : Pointer); compilerproc;

View File

@ -1007,7 +1007,7 @@ function align(addr : Pointer;alignment : PtrInt) : Pointer;{$ifdef SYSTEMINLINE
{$ifndef FPC_SYSTEM_HAS_INT_STR_LONGINT}
procedure int_str(l : longint;var s : string);
procedure int_str(l : longint;out s : string);
var
value: longint;
negative: boolean;
@ -1048,7 +1048,7 @@ var
{$ifndef FPC_SYSTEM_HAS_INT_STR_LONGWORD}
procedure int_str(l : longword;var s : string);
procedure int_str(l : longword;out s : string);
begin
s:='';
if l = 0 then
@ -1067,7 +1067,7 @@ end;
{$ifndef FPC_SYSTEM_HAS_INT_STR_INT64}
procedure int_str(l : int64;var s : string);
procedure int_str(l : int64;out s : string);
var
value: int64;
negative: boolean;
@ -1108,7 +1108,7 @@ var
{$ifndef FPC_SYSTEM_HAS_INT_STR_QWORD}
procedure int_str(l : qword;var s : string);
procedure int_str(l : qword;out s : string);
begin
s:='';
if l = 0 then

View File

@ -20,7 +20,7 @@ type
);
{ corresponding to single double extended fixed comp for i386 }
Procedure str_real (len,f : longint; d : ValReal; real_type :treal_type; var s : string);
Procedure str_real (len,f : longint; d : ValReal; real_type :treal_type; out s : string);
{$ifdef SUPPORT_EXTENDED}
type
TSplitExtended = packed record

View File

@ -340,14 +340,14 @@ end;
Str() Helpers
*****************************************************************************}
procedure fpc_shortstr_SInt(v : valSInt;len : SizeInt;var s : shortstring);[public,alias:'FPC_SHORTSTR_SINT']; compilerproc;
procedure fpc_shortstr_SInt(v : valSInt;len : SizeInt;out s : shortstring);[public,alias:'FPC_SHORTSTR_SINT']; compilerproc;
begin
int_str(v,s);
if length(s)<len then
s:=space(len-length(s))+s;
end;
procedure fpc_shortstr_UInt(v : valUInt;len : SizeInt;var s : shortstring);[public,alias:'FPC_SHORTSTR_UINT']; compilerproc;
procedure fpc_shortstr_UInt(v : valUInt;len : SizeInt;out s : shortstring);[public,alias:'FPC_SHORTSTR_UINT']; compilerproc;
begin
int_str(v,s);
if length(s)<len then
@ -356,7 +356,7 @@ end;
{$ifndef CPU64}
procedure fpc_shortstr_qword(v : qword;len : longint;var s : shortstring);[public,alias:'FPC_SHORTSTR_QWORD']; compilerproc;
procedure fpc_shortstr_qword(v : qword;len : longint;out s : shortstring);[public,alias:'FPC_SHORTSTR_QWORD']; compilerproc;
begin
int_str(v,s);
if length(s)<len then
@ -364,7 +364,7 @@ end;
end;
procedure fpc_shortstr_int64(v : int64;len : longint;var s : shortstring);[public,alias:'FPC_SHORTSTR_INT64']; compilerproc;
procedure fpc_shortstr_int64(v : int64;len : longint;out s : shortstring);[public,alias:'FPC_SHORTSTR_INT64']; compilerproc;
begin
int_str(v,s);
if length(s)<len then
@ -380,7 +380,7 @@ end;
{$I real2str.inc}
procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : shortstring);[public,alias:'FPC_SHORTSTR_FLOAT']; compilerproc;
procedure fpc_ShortStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : shortstring);[public,alias:'FPC_SHORTSTR_FLOAT']; compilerproc;
begin
str_real(len,fr,d,treal_type(rt),s);
end;
@ -390,7 +390,7 @@ end;
Array Of Char Str() helpers
}
procedure fpc_chararray_sint(v : valsint;len : SizeInt;var a:array of char);compilerproc;
procedure fpc_chararray_sint(v : valsint;len : SizeInt;out a:array of char);compilerproc;
var
ss : shortstring;
maxlen : SizeInt;
@ -406,7 +406,7 @@ begin
end;
procedure fpc_chararray_uint(v : valuint;len : SizeInt;var a : array of char);compilerproc;
procedure fpc_chararray_uint(v : valuint;len : SizeInt;out a : array of char);compilerproc;
var
ss : shortstring;
maxlen : SizeInt;
@ -424,7 +424,7 @@ end;
{$ifndef CPU64}
procedure fpc_chararray_qword(v : qword;len : SizeInt;var a : array of char);compilerproc;
procedure fpc_chararray_qword(v : qword;len : SizeInt;out a : array of char);compilerproc;
var
ss : shortstring;
maxlen : SizeInt;
@ -440,7 +440,7 @@ begin
end;
procedure fpc_chararray_int64(v : int64;len : SizeInt;var a : array of char);compilerproc;
procedure fpc_chararray_int64(v : int64;len : SizeInt;out a : array of char);compilerproc;
var
ss : shortstring;
maxlen : SizeInt;
@ -458,7 +458,7 @@ end;
{$endif CPU64}
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;var a : array of char);compilerproc;
procedure fpc_chararray_Float(d : ValReal;len,fr,rt : SizeInt;out a : array of char);compilerproc;
var
ss : shortstring;
maxlen : SizeInt;
@ -476,7 +476,7 @@ end;
Val() Functions
*****************************************************************************}
Function InitVal(const s:shortstring;var negativ:boolean;var base:byte):ValSInt;
Function InitVal(const s:shortstring;out negativ:boolean;out base:byte):ValSInt;
var
Code : SizeInt;
begin
@ -527,7 +527,7 @@ begin
end;
Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; var Code: ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_SHORTSTR']; compilerproc;
Function fpc_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; out Code: ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_SHORTSTR']; compilerproc;
var
u, temp, prev, maxPrevValue, maxNewValue: ValUInt;
base : byte;
@ -580,10 +580,10 @@ end;
{ we need this for fpc_Val_SInt_Ansistr and fpc_Val_SInt_WideStr because }
{ we have to pass the DestSize parameter on (JM) }
Function int_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; var Code: ValSInt): ValSInt; [external name 'FPC_VAL_SINT_SHORTSTR'];
Function int_Val_SInt_ShortStr(DestSize: SizeInt; Const S: ShortString; out Code: ValSInt): ValSInt; [external name 'FPC_VAL_SINT_SHORTSTR'];
Function fpc_Val_UInt_Shortstr(Const S: ShortString; var Code: ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_SHORTSTR']; compilerproc;
Function fpc_Val_UInt_Shortstr(Const S: ShortString; out Code: ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_SHORTSTR']; compilerproc;
var
u, prev : ValUInt;
base : byte;
@ -618,7 +618,7 @@ end;
{$ifndef CPU64}
Function fpc_val_int64_shortstr(Const S: ShortString; var Code: ValSInt): Int64; [public, alias:'FPC_VAL_INT64_SHORTSTR']; compilerproc;
Function fpc_val_int64_shortstr(Const S: ShortString; out Code: ValSInt): Int64; [public, alias:'FPC_VAL_INT64_SHORTSTR']; compilerproc;
type
QWordRec = packed record
l1,l2: longint;
@ -683,7 +683,7 @@ end;
end;
Function fpc_val_qword_shortstr(Const S: ShortString; var Code: ValSInt): QWord; [public, alias:'FPC_VAL_QWORD_SHORTSTR']; compilerproc;
Function fpc_val_qword_shortstr(Const S: ShortString; out Code: ValSInt): QWord; [public, alias:'FPC_VAL_QWORD_SHORTSTR']; compilerproc;
type qwordrec = packed record
l1,l2: longint;
end;
@ -726,7 +726,7 @@ end;
{$endif CPU64}
Function fpc_Val_Real_ShortStr(const s : shortstring; var code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_SHORTSTR']; compilerproc;
Function fpc_Val_Real_ShortStr(const s : shortstring; out Code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_SHORTSTR']; compilerproc;
var
hd,
esign,sign : valreal;

View File

@ -34,16 +34,16 @@ Procedure SetString (Out S : WideString; Buf : PChar; Len : SizeInt);
function WideCharToString(S : PWideChar) : AnsiString;
function StringToWideChar(const Src : AnsiString;Dest : PWideChar;DestSize : SizeInt) : PWideChar;
function WideCharLenToString(S : PWideChar;Len : SizeInt) : AnsiString;
procedure WideCharLenToStrVar(Src : PWideChar;Len : SizeInt;var Dest : AnsiString);
procedure WideCharToStrVar(S : PWideChar;var Dest : AnsiString);
procedure WideCharLenToStrVar(Src : PWideChar;Len : SizeInt;out Dest : AnsiString);
procedure WideCharToStrVar(S : PWideChar;out Dest : AnsiString);
procedure DefaultWide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure DefaultAnsi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
procedure DefaultWide2AnsiMove(source:pwidechar;out dest:ansistring;len:SizeInt);
procedure DefaultAnsi2WideMove(source:pchar;out dest:widestring;len:SizeInt);
Type
TWideStringManager = record
Wide2AnsiMoveProc : procedure(source:pwidechar;var dest:ansistring;len:SizeInt);
Ansi2WideMoveProc : procedure(source:pchar;var dest:widestring;len:SizeInt);
Wide2AnsiMoveProc : procedure(source:pwidechar;out dest:ansistring;len:SizeInt);
Ansi2WideMoveProc : procedure(source:pchar;out dest:widestring;len:SizeInt);
// UpperUTF8 : procedure(p:PUTF8String);

View File

@ -51,7 +51,7 @@ Const
These routines can be overwritten for the Current Locale
}
procedure DefaultWide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure DefaultWide2AnsiMove(source:pwidechar;out dest:ansistring;len:SizeInt);
var
i : SizeInt;
begin
@ -69,7 +69,7 @@ begin
end;
procedure DefaultAnsi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
procedure DefaultAnsi2WideMove(source:pchar;out dest:widestring;len:SizeInt);
var
i : SizeInt;
begin
@ -704,12 +704,12 @@ function WideCharLenToString(S : PWideChar;Len : SizeInt) : AnsiString;
widestringmanager.Wide2AnsiMoveproc(S,result,Len);
end;
procedure WideCharLenToStrVar(Src : PWideChar;Len : SizeInt;var Dest : AnsiString);
procedure WideCharLenToStrVar(Src : PWideChar;Len : SizeInt;out Dest : AnsiString);
begin
Dest:=WideCharLenToString(Src,Len);
end;
procedure WideCharToStrVar(S : PWideChar;var Dest : AnsiString);
procedure WideCharToStrVar(S : PWideChar;out Dest : AnsiString);
begin
Dest:=WideCharToString(S);
end;
@ -965,7 +965,7 @@ begin
end;
Function fpc_Val_Real_WideStr(Const S : WideString; Var Code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_WIDESTR']; compilerproc;
Function fpc_Val_Real_WideStr(Const S : WideString; out Code : ValSInt): ValReal; [public, alias:'FPC_VAL_REAL_WIDESTR']; compilerproc;
Var
SS : String;
begin
@ -980,7 +980,7 @@ begin
end;
Function fpc_Val_UInt_WideStr (Const S : WideString; Var Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_WIDESTR']; compilerproc;
Function fpc_Val_UInt_WideStr (Const S : WideString; out Code : ValSInt): ValUInt; [public, alias:'FPC_VAL_UINT_WIDESTR']; compilerproc;
Var
SS : ShortString;
begin
@ -995,7 +995,7 @@ begin
end;
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; Var Code : ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_WIDESTR']; compilerproc;
Function fpc_Val_SInt_WideStr (DestSize: SizeInt; Const S : WideString; out Code : ValSInt): ValSInt; [public, alias:'FPC_VAL_SINT_WIDESTR']; compilerproc;
Var
SS : ShortString;
begin
@ -1012,7 +1012,7 @@ end;
{$ifndef CPU64}
Function fpc_Val_qword_WideStr (Const S : WideString; Var Code : ValSInt): qword; [public, alias:'FPC_VAL_QWORD_WIDESTR']; compilerproc;
Function fpc_Val_qword_WideStr (Const S : WideString; out Code : ValSInt): qword; [public, alias:'FPC_VAL_QWORD_WIDESTR']; compilerproc;
Var
SS : ShortString;
begin
@ -1027,7 +1027,7 @@ begin
end;
Function fpc_Val_int64_WideStr (Const S : WideString; Var Code : ValSInt): Int64; [public, alias:'FPC_VAL_INT64_WIDESTR']; compilerproc;
Function fpc_Val_int64_WideStr (Const S : WideString; out Code : ValSInt): Int64; [public, alias:'FPC_VAL_INT64_WIDESTR']; compilerproc;
Var
SS : ShortString;
begin
@ -1044,7 +1044,7 @@ end;
{$endif CPU64}
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;var s : WideString);compilerproc;
procedure fpc_WideStr_Float(d : ValReal;len,fr,rt : SizeInt;out s : WideString);compilerproc;
var
ss : shortstring;
begin
@ -1053,7 +1053,7 @@ begin
end;
Procedure fpc_WideStr_SInt(v : ValSint; Len : SizeInt; Var S : WideString);compilerproc;
Procedure fpc_WideStr_SInt(v : ValSint; Len : SizeInt; out S : WideString);compilerproc;
Var
SS : ShortString;
begin
@ -1062,7 +1062,7 @@ begin
end;
Procedure fpc_WideStr_UInt(v : ValUInt;Len : SizeInt; Var S : WideString);compilerproc;
Procedure fpc_WideStr_UInt(v : ValUInt;Len : SizeInt; out S : WideString);compilerproc;
Var
SS : ShortString;
begin
@ -1073,7 +1073,7 @@ end;
{$ifndef CPU64}
Procedure fpc_WideStr_Int64(v : Int64; Len : SizeInt; Var S : WideString);compilerproc;
Procedure fpc_WideStr_Int64(v : Int64; Len : SizeInt; out S : WideString);compilerproc;
Var
SS : ShortString;
begin
@ -1082,7 +1082,7 @@ begin
end;
Procedure fpc_WideStr_Qword(v : Qword;Len : SizeInt; Var S : WideString);compilerproc;
Procedure fpc_WideStr_Qword(v : Qword;Len : SizeInt; out S : WideString);compilerproc;
Var
SS : ShortString;
begin

View File

@ -107,7 +107,7 @@ var
iconv_ansi2wide,
iconv_wide2ansi : iconv_t;
procedure Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure Wide2AnsiMove(source:pwidechar;out dest:ansistring;len:SizeInt);
var
outlength,
outoffset,
@ -160,7 +160,7 @@ procedure Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
end;
procedure Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
procedure Ansi2WideMove(source:pchar;out dest:widestring;len:SizeInt);
var
outlength,
outoffset,

View File

@ -951,7 +951,7 @@ function CharLowerBuff(lpsz:LPWSTR; cchLength:DWORD):DWORD;
stdcall; external 'user32' name 'CharLowerBuffW';
procedure Win32Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure Win32Wide2AnsiMove(source:pwidechar;out dest:ansistring;len:SizeInt);
var
destlen: SizeInt;
begin
@ -961,7 +961,7 @@ procedure Win32Wide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
WideCharToMultiByte(CP_ACP, 0, source, len+1, @dest[1], destlen, nil, nil);
end;
procedure Win32Ansi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
procedure Win32Ansi2WideMove(source:pchar;out dest:widestring;len:SizeInt);
var
destlen: SizeInt;
begin

View File

@ -1448,7 +1448,7 @@ function CharUpperBuff(lpsz:LPWSTR; cchLength:DWORD):DWORD; stdcall; external Ke
function CharLowerBuff(lpsz:LPWSTR; cchLength:DWORD):DWORD; stdcall; external KernelDLL name 'CharLowerBuffW';
procedure WinCEWide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
procedure WinCEWide2AnsiMove(source:pwidechar;out dest:ansistring;len:SizeInt);
var
i: integer;
begin
@ -1467,7 +1467,7 @@ procedure WinCEWide2AnsiMove(source:pwidechar;var dest:ansistring;len:SizeInt);
end;
end;
procedure WinCEAnsi2WideMove(source:pchar;var dest:widestring;len:SizeInt);
procedure WinCEAnsi2WideMove(source:pchar;out dest:widestring;len:SizeInt);
var
i: integer;
begin