ctypes.pp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. {
  2. $Id: ctypes.pp,v 1.5 2005/03/13 10:05:13 florian Exp $
  3. This file is part of the Free Pascal run time library.
  4. Copyright (c) 2004 by Marco van de Voort, member of the
  5. Free Pascal development team
  6. Implements C types for in header conversions
  7. See the file COPYING.FPC, included in this distribution,
  8. for details about the copyright.
  9. This program is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  12. **********************************************************************}
  13. unit ctypes;
  14. interface
  15. {$ifdef unix}
  16. uses unixtype;
  17. {$i aliasctp.inc}
  18. {$else}
  19. Type
  20. { the following type definitions are compiler dependant }
  21. { and system dependant }
  22. cInt8 = shortint;
  23. cUInt8 = byte;
  24. cUInt16= word;
  25. cInt16 = smallint;
  26. cInt32 = longint;
  27. cUInt32= cardinal;
  28. cInt64 = int64;
  29. cUInt64= qword;
  30. cuchar = byte;
  31. cchar = shortint;
  32. cInt = longint; { minimum range is : 32-bit }
  33. cUInt = Cardinal; { minimum range is : 32-bit }
  34. {$ifdef cpu64}
  35. cLong = int64;
  36. cuLong = qword;
  37. {$else}
  38. cLong = longint;
  39. cuLong = Cardinal;
  40. {$endif}
  41. clonglong = int64;
  42. culonglong = qword;
  43. cshort = smallint;
  44. cushort = word;
  45. pcInt = ^cInt;
  46. pcUInt = ^cUInt;
  47. pcLong = ^cLong;
  48. pculong = ^cuLong;
  49. pcshort = ^cshort;
  50. pcushort = ^cushort;
  51. pcchar = ^cchar;
  52. pcuchar = ^cuchar;
  53. cunsigned = cuint;
  54. pcunsigned = ^cunsigned;
  55. { Floating point }
  56. cFloat = Single;
  57. cDouble = Double;
  58. clDouble = Extended;
  59. pcFloat = ^cFloat;
  60. pcDouble = ^cDouble;
  61. pclDouble = ^clDouble;
  62. {$endif}
  63. // Kylix compat types
  64. u_long = culong;
  65. u_short = cushort;
  66. implementation
  67. end.
  68. {
  69. $Log: ctypes.pp,v $
  70. Revision 1.5 2005/03/13 10:05:13 florian
  71. + floating point c types added
  72. Revision 1.4 2005/03/01 22:45:09 hajny
  73. * Florian's changes from ctypes.inc merged in to make xlib compilable under non-Unix again
  74. Revision 1.3 2005/02/14 17:13:22 peter
  75. * truncate log
  76. Revision 1.2 2005/02/12 17:35:18 marco
  77. * some kylix stuf
  78. Revision 1.1 2005/01/10 10:32:50 marco
  79. * initial version
  80. }