Browse Source

* use ctypes unit

florian 20 years ago
parent
commit
005ca57ebb
2 changed files with 3 additions and 28 deletions
  1. 2 10
      packages/extra/x11/x.pp
  2. 1 18
      packages/extra/x11/xlib.pp

+ 2 - 10
packages/extra/x11/x.pp

@@ -1,15 +1,13 @@
 unit x;
 unit x;
 interface
 interface
+uses
+  ctypes;
 
 
 {$ifndef os2}
 {$ifndef os2}
   {$LinkLib c}
   {$LinkLib c}
   {$LinkLib X11}
   {$LinkLib X11}
 {$endif}
 {$endif}
 
 
-type
-  culong = dword;
-  cuchar = byte;
-
 {
 {
   Automatically converted by H2Pas 0.99.15 from x.h
   Automatically converted by H2Pas 0.99.15 from x.h
   The following command line parameters were used:
   The following command line parameters were used:
@@ -23,14 +21,8 @@ type
 
 
 { Pointers to basic pascal types, inserted by h2pas conversion program.}
 { Pointers to basic pascal types, inserted by h2pas conversion program.}
 Type
 Type
-  PLongint  = ^Longint;
   PPLongint = ^PLongint;
   PPLongint = ^PLongint;
-  PSmallInt = ^SmallInt;
-  PByte     = ^Byte;
   PPByte    = ^PByte;
   PPByte    = ^PByte;
-  PWord     = ^Word;
-  PDWord    = ^DWord;
-  PDouble   = ^Double;
   PPChar    = ^PChar;
   PPChar    = ^PChar;
   PPPChar   = ^PPChar;
   PPPChar   = ^PPChar;
   PPWideChar  = ^PWideChar;
   PPWideChar  = ^PWideChar;

+ 1 - 18
packages/extra/x11/xlib.pp

@@ -2,7 +2,7 @@ unit xlib;
 interface
 interface
 {$mode objfpc}
 {$mode objfpc}
 uses
 uses
-  x;
+  ctypes,x;
 {$define MACROS}
 {$define MACROS}
 
 
 {$ifndef os2}
 {$ifndef os2}
@@ -16,25 +16,8 @@ const
 {$endif}
 {$endif}
 
 
 type
 type
-  culong = sizeuint;
-  cuchar = byte;
-
-  clong = sizeint;
-  cint = longint;
-  cuint = longword;
-  cshort = smallint;
-  cushort = word;
-
-  cunsigned = cuint;
-  cchar = shortint;
-
-  Pcint = ^cint;
-  Pcuint = ^cuint;
-  Pculong = ^culong;
-  Pcuchar = ^cuchar;
   PPcint = ^Pcint;
   PPcint = ^Pcint;
   PPcuchar = ^Pcuchar;
   PPcuchar = ^Pcuchar;
-
 {
 {
   Automatically converted by H2Pas 0.99.15 from xlib.h
   Automatically converted by H2Pas 0.99.15 from xlib.h
   The following command line parameters were used:
   The following command line parameters were used: