From 03690abe3bbf8be26cefb1479d860c46ff11c714 Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 6 Sep 2003 21:52:24 +0000 Subject: [PATCH] * commited. --- rtl/objpas/dati.inc | 22 +++++++++++++++++++--- rtl/objpas/fina.inc | 13 +++++++++++-- rtl/objpas/syspch.inc | 15 ++++++++++----- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/rtl/objpas/dati.inc b/rtl/objpas/dati.inc index 485e1832f1..ff90e1a540 100644 --- a/rtl/objpas/dati.inc +++ b/rtl/objpas/dati.inc @@ -78,7 +78,11 @@ end ; function MSecsToTimeStamp(MSecs: comp): TTimeStamp; begin result.Date := Round(msecs / msecsperday); +{$IFDEF VIRTUALPASCAL} + msecs:= msecs-result.date*msecsperday; +{$ELSE} msecs:= comp(msecs-result.date*msecsperday); +{$ENDIF} result.Time := Round(MSecs); end ; @@ -311,7 +315,11 @@ var df:string; d,m,y:word; n,i:longint; - c:word; +{$IFDEF VIRTUALPASCAL} + c:longint; +{$ELSE} + c:word; +{$ENDIF} dp,mp,yp,which : Byte; s1:string[4]; values:array[1..3] of longint; @@ -414,7 +422,12 @@ var function GetElement: integer; var - j: integer; c: word; + j: integer; + {$IFDEF VIRTUALPASCAL} + c: longint; + {$ELSE} + c: word; + {$ENDIF} begin result := -1; Inc(Current); @@ -715,7 +728,10 @@ end; { $Log$ - Revision 1.9 2003-01-18 23:45:37 michael + Revision 1.10 2003-09-06 21:52:24 marco + * commited. + + Revision 1.9 2003/01/18 23:45:37 michael + Fixed EncodeDate/Time so they use TryEncodeDate/Time Revision 1.8 2002/12/25 01:03:48 peter diff --git a/rtl/objpas/fina.inc b/rtl/objpas/fina.inc index cbbf0e8c03..569062c833 100644 --- a/rtl/objpas/fina.inc +++ b/rtl/objpas/fina.inc @@ -21,6 +21,10 @@ System Utilities For Free Pascal } +{$IFDEF VIRTUALPASCAL} + {$J+} +{$ENDIF} + function ChangeFileExt(const FileName, Extension: string): string; var i: longint; begin @@ -94,7 +98,9 @@ Var S : String; Begin S:=FileName; + {$IFNDEF VIRTUALPASCAL} DoDirSeparators(S); + {$ENDIF} {$ifdef HasUnix} Result:=Unix.fexpand(S); {$else} @@ -119,7 +125,7 @@ Var Source, Dest : String; Const OneLevelBack = '..'+PathDelim; begin - If Upcase(ExtractFileDrive(BaseName))<>Upcase(ExtractFileDrive(DestName)) Then + If Uppercase(ExtractFileDrive(BaseName))<>Uppercase(ExtractFileDrive(DestName)) Then begin Result:=DestName; exit; @@ -232,7 +238,10 @@ end; { $Log$ - Revision 1.9 2003-01-10 21:02:13 marco + Revision 1.10 2003-09-06 21:52:24 marco + * commited. + + Revision 1.9 2003/01/10 21:02:13 marco * hasunix fix for beos Revision 1.8 2002/10/22 21:57:54 michael diff --git a/rtl/objpas/syspch.inc b/rtl/objpas/syspch.inc index 41be089343..ac5355aeb6 100644 --- a/rtl/objpas/syspch.inc +++ b/rtl/objpas/syspch.inc @@ -28,7 +28,9 @@ type CharArray = array[0..0] of char; { Processor dependent part, shared withs strings unit } +{$IFNDEF VIRTUALPASCAL} // in system there {$i strings.inc } +{$ENDIF} { Read generic string functions that are not implemented for the processor } {$i genstr.inc} @@ -63,13 +65,13 @@ function strnew(p : pchar) : pchar; var len : longint; begin - strnew:=nil; + Result:=nil; if (p=nil) or (p^=#0) then exit; len:=strlen(p)+1; - StrNew:=StrAlloc(Len); - if strnew<>nil then - strmove(strnew,p,len); + Result:=StrAlloc(Len); + if Result<>nil then + strmove(Result,p,len); end; @@ -120,7 +122,10 @@ end ; { $Log$ - Revision 1.7 2003-09-01 20:46:59 peter + Revision 1.8 2003-09-06 21:52:24 marco + * commited. + + Revision 1.7 2003/09/01 20:46:59 peter * small fixes for sparc Revision 1.6 2002/09/07 16:01:22 peter