diff --git a/rtl/i386/strings.inc b/rtl/i386/strings.inc index e7ea76662f..fe03502825 100644 --- a/rtl/i386/strings.inc +++ b/rtl/i386/strings.inc @@ -132,7 +132,7 @@ end; {$ifndef FPC_UNIT_HAS_STRLCOPY} {$define FPC_UNIT_HAS_STRLCOPY} -function strlcopy(dest,source : pchar;maxlen : longint) : pchar;assembler; +function strlcopy(dest,source : pchar;maxlen : sizeint) : pchar;assembler; var saveesi,saveedi : longint; asm @@ -235,7 +235,7 @@ end; {$ifndef FPC_UNIT_HAS_STRLCOMP} {$define FPC_UNIT_HAS_STRLCOMP} -function strlcomp(str1,str2 : pchar;l : longint) : longint;assembler; +function strlcomp(str1,str2 : pchar;l : sizeint) : longint;assembler; var saveeax,saveedx,saveecx,saveesi,saveedi : longint; asm @@ -336,7 +336,7 @@ end; {$ifndef FPC_UNIT_HAS_STRLICOMP} {$define FPC_UNIT_HAS_STRLICOMP} -function strlicomp(str1,str2 : pchar;l : longint) : longint;assembler; +function strlicomp(str1,str2 : pchar;l : sizeint) : longint;assembler; var saveeax,saveedx,saveecx,saveesi,saveedi : longint; asm @@ -633,7 +633,10 @@ end; { $Log$ - Revision 1.14 2004-05-01 15:26:33 jonas + Revision 1.15 2004-06-13 10:49:50 florian + * fixed some bootstrapping problems as well as some 64 bit stuff + + Revision 1.14 2004/05/01 15:26:33 jonas * use some more string routines from libc if FPC_USE_LIBC is used Revision 1.13 2003/12/19 09:28:00 michael diff --git a/rtl/objpas/sysutils/sysansi.inc b/rtl/objpas/sysutils/sysansi.inc index 66fc043cbf..4ef564616c 100644 --- a/rtl/objpas/sysutils/sysansi.inc +++ b/rtl/objpas/sysutils/sysansi.inc @@ -19,12 +19,12 @@ ********************************************************************* } -Function AnsiCompareFileName(const S1, S2: string): Integer; +Function AnsiCompareFileName(const S1, S2: string): SizeInt; begin If FileNameCaseSensitive then Result:=AnsiCompareStr(S1,S2) // Compare case sensitive - else + else Result:=AnsiCompareText(S1,S2); // Compare case insensitive. No MBCS yet. end; @@ -72,7 +72,10 @@ end; { $Log$ - Revision 1.2 2003-11-26 22:17:42 michael + Revision 1.3 2004-06-13 10:49:50 florian + * fixed some bootstrapping problems as well as some 64 bit stuff + + Revision 1.2 2003/11/26 22:17:42 michael + Merged fixbranch fixes, missing in main branch Revision 1.1 2003/10/06 21:01:06 peter diff --git a/rtl/objpas/sysutils/sysstr.inc b/rtl/objpas/sysutils/sysstr.inc index 79acbe3569..8aedebdc26 100644 --- a/rtl/objpas/sysutils/sysstr.inc +++ b/rtl/objpas/sysutils/sysstr.inc @@ -147,7 +147,7 @@ begin I:=0; If (P1)<>(P2) then While Result and (i=MinCurrency) and (Value<=MaxCurrency); if Result then AResult := Value; +{$else VER1_0} + Result:=false; +{$endif VER1_0} end; - + function FloatToCurr(const Value: Extended): Currency; begin if not TryFloatToCurr(Value, Result) then Raise EConvertError.CreateFmt(SInvalidCurrency, [FloatToStr(Value)]); end; - + Function CurrToStr(Value: Currency): string; @@ -1361,7 +1365,7 @@ function StrToBool(const S: string): Boolean; Var Temp : String; D : Double; -{$IFDEF VIRTUALPASCAL} +{$IFDEF VIRTUALPASCAL} Code: longint; {$ELSE} Code: word; @@ -2075,10 +2079,10 @@ end; Function FindCmdLineSwitch(const Switch: string; const Chars: TSysCharSet;IgnoreCase: Boolean): Boolean; -Var +Var I,L : Integer; S,T : String; - + begin Result:=False; S:=Switch; @@ -2095,7 +2099,7 @@ begin T:=UpperCase(T); Result:=S=T; end; - Dec(i); + Dec(i); end; end; @@ -2171,7 +2175,10 @@ const { $Log$ - Revision 1.12 2004-06-12 13:57:18 michael + Revision 1.13 2004-06-13 10:49:50 florian + * fixed some bootstrapping problems as well as some 64 bit stuff + + Revision 1.12 2004/06/12 13:57:18 michael + Enhanced FloatToStrF to 18 digits (Delphi compatibility, bug 3106 Revision 1.11 2004/06/12 13:23:17 michael diff --git a/rtl/objpas/sysutils/sysstrh.inc b/rtl/objpas/sysutils/sysstrh.inc index c9fc0dc9ed..b99ad7957f 100644 --- a/rtl/objpas/sysutils/sysstrh.inc +++ b/rtl/objpas/sysutils/sysstrh.inc @@ -44,9 +44,15 @@ const MinDateTime: TDateTime = -657434.0; { 01/01/0100 12:00:00.000 AM } MaxDateTime: TDateTime = 2958465.99999; { 12/31/9999 11:59:59.999 PM } - MinCurrency: Currency = -922337203685477.5807; - MaxCurrency: Currency = 922337203685477.5807; - +{$ifndef VER1_0} +{$if defined(FPC_HAS_TYPE_EXTENDED) or defined(FPC_HAS_TYPE_FLOAT)} + MinCurrency: Currency = -922337203685477.5807; + MaxCurrency: Currency = 922337203685477.5807; +{$else} + MinCurrency: Currency = -922337203685477.0000; + MaxCurrency: Currency = 922337203685477.0000; +{$endif} +{$endif VER1_0} Type TTextLineBreakStyle = (tlbsLF, tlbsCRLF); // Must move to system unit, and add Mac tlbsCR too ? @@ -54,7 +60,7 @@ Type Const DefaultTextLineBreakStyle: TTextLineBreakStyle = {$ifdef unix} tlbsLF {$else} tlbsCRLF {$endif}; - + Const LeadBytes: set of Char = []; EmptyStr : string = ''; @@ -160,7 +166,7 @@ Function ByteToCharIndex(const S: string; Index: Integer): Integer; const {$ifndef unix} - SwitchChars = ['/','-']; + SwitchChars = ['/','-']; {$else} SwitchChars = ['-']; {$endif} @@ -171,8 +177,8 @@ Type Function FindCmdLineSwitch(const Switch: string; const Chars: TSysCharSet;IgnoreCase: Boolean): Boolean; Function FindCmdLineSwitch(const Switch: string; IgnoreCase: Boolean): Boolean; Function FindCmdLineSwitch(const Switch: string): Boolean; - - + + {==============================================================================} { extra functions } @@ -184,7 +190,10 @@ function BCDToInt(Value: integer): integer; { $Log$ - Revision 1.5 2004-06-12 13:23:17 michael + Revision 1.6 2004-06-13 10:49:50 florian + * fixed some bootstrapping problems as well as some 64 bit stuff + + Revision 1.5 2004/06/12 13:23:17 michael + Fixed currency<->string conversion support Revision 1.4 2004/02/26 08:46:21 michael @@ -243,4 +252,4 @@ function BCDToInt(Value: integer): integer; instead of direct comparisons of low/high values of orddefs because qword is a special case -} \ No newline at end of file +} diff --git a/rtl/win32/sysutils.pp b/rtl/win32/sysutils.pp index fa0ab930de..2fa6115242 100644 --- a/rtl/win32/sysutils.pp +++ b/rtl/win32/sysutils.pp @@ -101,7 +101,7 @@ begin end; -Function FileCreate (Const FileName : String; Mode:longint) : Longint; +Function FileCreate (Const FileName : String; Mode:longint) : SizeInt; begin FileCreate:=FileCreate(FileName); end; @@ -729,7 +729,7 @@ end; function ExecuteProcess(Const Path: AnsiString; Const ComLine: Array of AnsiString):integer; -Var +Var CommandLine : AnsiString; i : Integer; @@ -813,7 +813,10 @@ Finalization end. { $Log$ - Revision 1.33 2004-02-13 10:50:23 marco + Revision 1.34 2004-06-13 10:49:50 florian + * fixed some bootstrapping problems as well as some 64 bit stuff + + Revision 1.33 2004/02/13 10:50:23 marco * Hopefully last large changes to fpexec and friends. - naming conventions changes from Michael. - shell functions get alternative under ifdef.