aboutsummaryrefslogtreecommitdiffstats
path: root/Game/Code/lib/ctypes
diff options
context:
space:
mode:
authortobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-03 18:47:28 +0000
committertobigun <tobigun@b956fd51-792f-4845-bead-9b4dfca2ff2c>2008-07-03 18:47:28 +0000
commit38cdf2cd93ee7ff0bf224a9577f995e354ffb147 (patch)
treeed603ae722e1c72fcd66d34ad219129a06c6d294 /Game/Code/lib/ctypes
parent955de6842fb816daee68b38ac06c51f579e0b8ed (diff)
downloadusdx-38cdf2cd93ee7ff0bf224a9577f995e354ffb147.tar.gz
usdx-38cdf2cd93ee7ff0bf224a9577f995e354ffb147.tar.xz
usdx-38cdf2cd93ee7ff0bf224a9577f995e354ffb147.zip
ffmpeg pascal header 64bit compatibility fix.
Further headers will follow. git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@1160 b956fd51-792f-4845-bead-9b4dfca2ff2c
Diffstat (limited to 'Game/Code/lib/ctypes')
-rw-r--r--Game/Code/lib/ctypes/ctypes.pas72
1 files changed, 72 insertions, 0 deletions
diff --git a/Game/Code/lib/ctypes/ctypes.pas b/Game/Code/lib/ctypes/ctypes.pas
new file mode 100644
index 00000000..6cdf77fc
--- /dev/null
+++ b/Game/Code/lib/ctypes/ctypes.pas
@@ -0,0 +1,72 @@
+{
+ This file is part of the Free Pascal run time library.
+ Copyright (c) 2004 by Marco van de Voort, member of the
+ Free Pascal development team
+
+ Implements C types for in header conversions
+
+ See the file COPYING.FPC, included in this distribution,
+ for details about the copyright.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+
+ **********************************************************************}
+
+unit ctypes;
+
+interface
+
+type
+ qword = int64; // Keep h2pas "uses ctypes" headers working with delphi.
+
+ { the following type definitions are compiler dependant }
+ { and system dependant }
+
+ cint8 = shortint; pcint8 = ^cint8;
+ cuint8 = byte; pcuint8 = ^cuint8;
+ cchar = cint8; pcchar = ^cchar;
+ cschar = cint8; pcschar = ^cschar;
+ cuchar = cuint8; pcuchar = ^cuchar;
+
+ cint16 = smallint; pcint16 = ^cint16;
+ cuint16 = word; pcuint16 = ^cuint16;
+ cshort = cint16; pcshort = ^cshort;
+ csshort = cint16; pcsshort = ^csshort;
+ cushort = cuint16; pcushort = ^cushort;
+
+ cint32 = longint; pcint32 = ^cint32;
+ cuint32 = longword; pcuint32 = ^cuint32;
+ cint = cint32; pcint = ^cint; { minimum range is : 32-bit }
+ csint = cint32; pcsint = ^csint; { minimum range is : 32-bit }
+ cuint = cuint32; pcuint = ^cuint; { minimum range is : 32-bit }
+ csigned = cint; pcsigned = ^csigned;
+ cunsigned = cuint; pcunsigned = ^cunsigned;
+
+ cint64 = int64; pcint64 = ^cint64;
+ cuint64 = qword; pcuint64 = ^cuint64;
+ clonglong = cint64; pclonglong = ^clonglong;
+ cslonglong = cint64; pcslonglong = ^cslonglong;
+ culonglong = cuint64; pculonglong = ^culonglong;
+
+ cbool = longbool; pcbool = ^cbool;
+
+{$if defined(cpu64) and not(defined(win64) and defined(cpux86_64))}
+ clong = int64; pclong = ^clong;
+ cslong = int64; pcslong = ^cslong;
+ culong = qword; pculong = ^culong;
+{$else}
+ clong = longint; pclong = ^clong;
+ cslong = longint; pcslong = ^cslong;
+ culong = cardinal; pculong = ^culong;
+{$ifend}
+
+ cfloat = single; pcfloat = ^cfloat;
+ cdouble = double; pcdouble = ^cdouble;
+ clongdouble = extended; pclongdouble = ^clongdouble;
+
+implementation
+
+end.