Browse Source

* made it compilable with both 1.0.x and 1.1

peter 24 years ago
parent
commit
e822cd361b
5 changed files with 78 additions and 20 deletions
  1. 12 3
      packages/forms/fd2pascal.pp
  2. 21 3
      packages/ncurses/ncrt.pp
  3. 15 4
      packages/ncurses/ocrt.pp
  4. 18 6
      packages/uncgi/uncgi.pp
  5. 12 4
      packages/utmp/utmp.pp

+ 12 - 3
packages/forms/fd2pascal.pp

@@ -21,7 +21,13 @@ Program fd2pascal;
 
 { $Id$ }
 
-Uses Unix;
+uses
+{$ifdef ver1_0}
+  Linux
+{$else}
+  Unix
+{$endif}
+  ;
 
 Const RevString = '$Revision$';
   NrOptions = 4;
@@ -1118,10 +1124,13 @@ begin
   EmitFooter;
   CloseOutFile;
 end.  $Log$
-end.  Revision 1.3  2001-01-21 21:38:52  marco
+end.  Revision 1.4  2001-04-08 12:27:55  peter
+end.    * made it compilable with both 1.0.x and 1.1
+end.
+end.  Revision 1.3  2001/01/21 21:38:52  marco
 end.   * renamefest in packages
 end.
 end.  Revision 1.2  2000/07/13 11:33:11  michael
 end.  + removed logs
-end. 
+end.
 }

+ 21 - 3
packages/ncurses/ncrt.pp

@@ -24,7 +24,22 @@ Unit nCrt;
 }
 Interface
 
-Uses Unix,ncurses;
+Uses
+{$ifdef freebsd}
+  {$ifdef ver1_0}
+    linux,
+  {$else}
+    unix,
+  {$endif}
+{$endif}
+{$ifdef linux}
+  {$ifdef ver1_0}
+    linux,
+  {$else}
+    unix,
+  {$endif}
+{$endif}
+  ncurses;
 
 {$i ncrt.inc}
 
@@ -38,7 +53,10 @@ Begin
 End. { of Unit nCrt }
 {
   $Log$
-  Revision 1.4  2001-01-21 21:38:52  marco
+  Revision 1.5  2001-04-08 12:27:55  peter
+    * made it compilable with both 1.0.x and 1.1
+
+  Revision 1.4  2001/01/21 21:38:52  marco
    * renamefest in packages
 
   Revision 1.3  2000/08/29 05:51:09  michael
@@ -46,5 +64,5 @@ End. { of Unit nCrt }
 
   Revision 1.2  2000/07/13 11:33:27  michael
   + removed logs
- 
+
 }

+ 15 - 4
packages/ncurses/ocrt.pp

@@ -148,7 +148,15 @@ Unit oCrt;
 }
 Interface
 
-Uses Unix,ncurses,panel,menu;
+Uses
+{$ifdef linux}
+  {$ifdef ver1_0}
+    linux,
+  {$else}
+    unix,
+  {$endif}
+{$endif}
+  ncurses,panel,menu;
 
 Const
 
@@ -2931,7 +2939,7 @@ Begin
       key := readkey;
       xkey := 0;
       case key of
-	 #0 : xkey := ord(readkey);
+         #0 : xkey := ord(readkey);
          ^F : xkey := nKeyHome;
          ^L : xkey := nKeyEnd;
          #9,
@@ -2940,7 +2948,7 @@ Begin
          else menu_driver(pm,ord(key));
       end;
       case xkey of
-	 nKeyHome : menu_driver(pm,REQ_FIRST_ITEM);
+         nKeyHome : menu_driver(pm,REQ_FIRST_ITEM);
          nKeyEnd  : menu_driver(pm,REQ_LAST_ITEM);
          nKeyRight,
          nKeyDown : menu_driver(pm,REQ_NEXT_ITEM);
@@ -3258,7 +3266,10 @@ End. { of Unit oCrt }
 
 {
   $Log$
-  Revision 1.5  2001-01-21 21:38:52  marco
+  Revision 1.6  2001-04-08 12:27:55  peter
+    * made it compilable with both 1.0.x and 1.1
+
+  Revision 1.5  2001/01/21 21:38:52  marco
    * renamefest in packages
 
   Revision 1.4  2000/08/29 05:51:09  michael

+ 18 - 6
packages/uncgi/uncgi.pp

@@ -9,13 +9,22 @@ unit uncgi;
 interface
 uses
   strings
-{$ifdef Unix}
- ,Unix
+{$ifdef ver1_0}
+  {$ifdef linux}
+    ,Linux
+  {$endif}
+  {$ifdef freebsd}
+    ,Linux
+  {$endif}
+{$else}
+  {$ifdef Unix}
+    ,Unix
+  {$endif}
 {$endif}
 {$IFDEF OS2}
- , DosCalls
+  ,DosCalls
 {$ENDIF OS2}
- ;
+  ;
 
 {***********************************************************************}
 
@@ -427,7 +436,10 @@ end.
 {
   HISTORY
   $Log$
-  Revision 1.5  2001-01-23 20:54:18  hajny
+  Revision 1.6  2001-04-08 12:27:55  peter
+    * made it compilable with both 1.0.x and 1.1
+
+  Revision 1.5  2001/01/23 20:54:18  hajny
     * OS/2 GetEnv correction
 
   Revision 1.4  2001/01/21 21:38:52  marco
@@ -438,5 +450,5 @@ end.
 
   Revision 1.2  2000/07/13 11:33:32  michael
   + removed logs
- 
+
 }

+ 12 - 4
packages/utmp/utmp.pp

@@ -3,7 +3,12 @@ unit Utmp;
 interface
 
 uses
-  Unix;
+{$ifdef ver1_0}
+  Linux
+{$else}
+  Unix
+{$endif}
+  ;
 
 const
   Device_name_length = 12;
@@ -241,7 +246,7 @@ var
     S : Stat;
 
   begin
-    Unix.FStat(Utmp_file, S);
+    FStat(Utmp_file, S);
     Number_of_utmp_entries := S.Size div System.SizeOf(tLL_Utmp);
   end;
 
@@ -319,10 +324,13 @@ begin
   Set_search_parameters(Include,DefaultLoginType);
 end.
   $Log$
-  Revision 1.3  2001-01-21 21:38:52  marco
+  Revision 1.4  2001-04-08 12:27:55  peter
+    * made it compilable with both 1.0.x and 1.1
+
+  Revision 1.3  2001/01/21 21:38:52  marco
    * renamefest in packages
 
   Revision 1.2  2000/07/13 11:33:33  michael
   + removed logs
- 
+
 }