Browse Source

* Fixed INt() proble. Defined THandle, included Filemode constants

michael 26 years ago
parent
commit
d541279136
3 changed files with 30 additions and 14 deletions
  1. 10 3
      rtl/objpas/dati.inc
  2. 10 4
      rtl/objpas/filutilh.inc
  3. 10 7
      rtl/objpas/sysutils.pp

+ 10 - 3
rtl/objpas/dati.inc

@@ -83,9 +83,13 @@ end ;
 {   DateTimeToTimeStamp converts DateTime to a TTimeStamp   }
 {   DateTimeToTimeStamp converts DateTime to a TTimeStamp   }
 
 
 function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;
 function DateTimeToTimeStamp(DateTime: TDateTime): TTimeStamp;
+
+
 begin
 begin
 result.Time := Trunc(Frac(DateTime) * MSecsPerDay);
 result.Time := Trunc(Frac(DateTime) * MSecsPerDay);
-result.Date := 1 + DateDelta + Trunc(Int(DateTime));
+result.Date := 1 
+               + DateDelta 
+               + Trunc(System.Int(DateTime));
 end ;
 end ;
 
 
 {   TimeStampToDateTime converts TimeStamp to a TDateTime value   }
 {   TimeStampToDateTime converts TimeStamp to a TDateTime value   }
@@ -140,7 +144,7 @@ var
    l:longint;
    l:longint;
    ly:boolean;
    ly:boolean;
 begin
 begin
-l := Trunc(Int(Date)) + DateDelta;
+l := Trunc(System.Int(Date)) + DateDelta;
 year := 1 + 400 * (l div D400); l := (l mod D400);
 year := 1 + 400 * (l div D400); l := (l mod D400);
 year := year + 100 * (l div D100);l := (l mod D100);
 year := year + 100 * (l div D100);l := (l mod D100);
 year := year + 4 * (l div D4);l := (l mod D4);
 year := year + 4 * (l div D4);l := (l mod D4);
@@ -621,7 +625,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.5  1998-10-15 09:39:12  michael
+  Revision 1.6  1999-02-09 12:38:42  michael
+  * Fixed INt() proble. Defined THandle, included Filemode constants
+
+  Revision 1.5  1998/10/15 09:39:12  michael
   Changes from Gretjan Schouten
   Changes from Gretjan Schouten
 
 
   Revision 1.4  1998/10/11 13:40:52  michael
   Revision 1.4  1998/10/11 13:40:52  michael

+ 10 - 4
rtl/objpas/filutilh.inc

@@ -14,10 +14,8 @@
 
 
  **********************************************************************}
  **********************************************************************}
 
 
-{$ifndef win32}
 Type 
 Type 
-  THandle = Longint;  // Needed for TSearchRec
-{$endif}
+  THandle = Longint; 
 
 
 Type 
 Type 
   TSearchRec = Record
   TSearchRec = Record
@@ -38,6 +36,11 @@ Const
   faDirectory = $00000010;
   faDirectory = $00000010;
   faArchive   = $00000020;
   faArchive   = $00000020;
   faAnyFile   = $0000003f;
   faAnyFile   = $0000003f;
+
+  fmOpenRead       = $0000;
+  fmOpenWrite      = $0001;
+  fmOpenReadWrite  = $0002;
+      
   
   
 Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
 Function FileOpen (Const FileName : string; Mode : Integer) : Longint;
 Function FileCreate (Const FileName : String) : Longint;
 Function FileCreate (Const FileName : String) : Longint;
@@ -62,7 +65,10 @@ Function FileSearch (Const Name, DirList : String) : String;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.3  1999-02-02 21:21:37  michael
+  Revision 1.4  1999-02-09 12:38:43  michael
+  * Fixed INt() proble. Defined THandle, included Filemode constants
+
+  Revision 1.3  1999/02/02 21:21:37  michael
   + Added filetruncate
   + Added filetruncate
 
 
   Revision 1.2  1998/10/11 13:47:45  michael
   Revision 1.2  1998/10/11 13:47:45  michael

+ 10 - 7
rtl/objpas/sysutils.pp

@@ -22,12 +22,12 @@ interface
        linux
        linux
     {$else}
     {$else}
       {$ifdef win32}
       {$ifdef win32}
-       windows,
-      {$endif}
-       dos
-      {$ifdef go32v2}
-         ,go32
-      {$endif go32v2}
+       dos,windows
+      {$else}
+        {$ifdef go32v2}
+         go32
+        {$endif go32v2}
+      {$endif win32}
     {$endif linux}
     {$endif linux}
        ;
        ;
 
 
@@ -271,7 +271,10 @@ begin
 end.
 end.
 {
 {
     $Log$
     $Log$
-    Revision 1.19  1999-02-03 16:18:58  michael
+    Revision 1.20  1999-02-09 12:38:44  michael
+    * Fixed INt() proble. Defined THandle, included Filemode constants
+
+    Revision 1.19  1999/02/03 16:18:58  michael
     + Uses Windows on win32 platform
     + Uses Windows on win32 platform
 
 
     Revision 1.18  1998/12/15 22:43:12  peter
     Revision 1.18  1998/12/15 22:43:12  peter