From 78d5ba9ff039d0c59e3eb9a3a791aa98ef2eed32 Mon Sep 17 00:00:00 2001 From: florian Date: Fri, 15 Sep 2006 21:03:50 +0000 Subject: [PATCH] * extended ctypes by Aison git-svn-id: trunk@4622 - --- rtl/inc/ctypes.pp | 92 +++++++++++++++++++++++++------------------ rtl/unix/aliasctp.inc | 15 +++++++ rtl/unix/ctypes.inc | 90 ++++++++++++++++++++++++------------------ 3 files changed, 121 insertions(+), 76 deletions(-) diff --git a/rtl/inc/ctypes.pp b/rtl/inc/ctypes.pp index 606768edcf..0eb151184e 100644 --- a/rtl/inc/ctypes.pp +++ b/rtl/inc/ctypes.pp @@ -28,55 +28,71 @@ Type { the following type definitions are compiler dependant } { and system dependant } - cInt8 = shortint; - cUInt8 = byte; - cUInt16= word; - cInt16 = smallint; - cInt32 = longint; - cUInt32= cardinal; - cInt64 = int64; - cUInt64= qword; + cint8 = shortint; + cuint8 = byte; + cuint16 = word; + cint16 = smallint; + cint32 = longint; + cuint32 = cardinal; + cint64 = int64; + cuint64 = qword; + + cbool = longbool; + cchar = shortint; + cuchar = byte; + cint = longint; { minimum range is : 32-bit } + cuint = cardinal; { minimum range is : 32-bit } + + csint = cint; + csigned = cint; + cunsigned = cuint; - cuchar = byte; - cchar = shortint; - cInt = longint; { minimum range is : 32-bit } - cUInt = Cardinal; { minimum range is : 32-bit } {$ifdef cpu64} - cLong = int64; - cuLong = qword; + clong = int64; + culong = qword; {$else} - cLong = longint; - cuLong = Cardinal; + clong = longint; + culong = cardinal; {$endif} - clonglong = int64; + + clonglong = int64; culonglong = qword; - cshort = smallint; - cushort = word; + cshort = smallint; + cushort = word; - pcInt = ^cInt; - pcUInt = ^cUInt; - pcLong = ^cLong; - pculong = ^cuLong; - pcshort = ^cshort; - pcushort = ^cushort; - pcchar = ^cchar; - pcuchar = ^cuchar; - - cunsigned = cuint; + pcint8 = ^cint8; + pcuint8 = ^cuint8; + pcint16 = ^cint16; + pcuint16 = ^cuint16; + pcint32 = ^cint32; + pcuint32 = ^cuint32; + pcint64 = ^cint64; + pcuint64 = ^cuint64; + pcbool = ^cbool; + pcchar = ^cchar; + pcuchar = ^cuchar; + pcint = ^cint; + pcuint = ^cuint; + pcsint = ^csint; + pcsigned = ^csigned; pcunsigned = ^cunsigned; + pclong = ^clong; + pculong = ^culong; + pcshort = ^cshort; + pcushort = ^cushort; - { Floating point } - cFloat = Single; - cDouble = Double; - clDouble = Extended; - pcFloat = ^cFloat; - pcDouble = ^cDouble; - pclDouble = ^clDouble; + { Floating point } + cfloat = single; + cdouble = double; + cldouble = extended; + pcfloat = ^cfloat; + pcdouble = ^cdouble; + pcldouble = ^cldouble; {$endif} // Kylix compat types - u_long = culong; - u_short = cushort; + u_long = culong; + u_short = cushort; implementation diff --git a/rtl/unix/aliasctp.inc b/rtl/unix/aliasctp.inc index ec01610fe9..c6ea051111 100644 --- a/rtl/unix/aliasctp.inc +++ b/rtl/unix/aliasctp.inc @@ -32,7 +32,19 @@ Type cuLong = UnixType.cuLong; cshort = UnixType.cshort; cushort = UnixType.cushort; + csint = UnixType.csint; + csigned = UnixType.csigned; cunsigned = UnixType.cunsigned; + cbool = UnixType.cbool; + + pcint8 = UnixType.pcint8; + pcuint8 = UnixType.pcuint8; + pcint16 = UnixType.pcint16; + pcuint16= UnixType.pcuint16; + pcint32 = UnixType.pcint32; + pcuint32= UnixType.pcuint32; + pcint64 = UnixType.pcint64; + pcuint64= UnixType.pcuint64; pcuchar = UnixType.pcuchar; pcchar = UnixType.pcchar; pcInt = UnixType.pcInt; @@ -41,7 +53,10 @@ Type pculong = UnixType.pculong; pcshort = UnixType.pcshort; pcushort= UnixType.pcushort; + pcsint = UnixType.pcsint; + pcsigned = UnixType.pcsigned; pcunsigned = UnixType.pcunsigned; + pcbool = UnixType.pcbool; { Floating point } cFloat = UnixType.cFloat; diff --git a/rtl/unix/ctypes.inc b/rtl/unix/ctypes.inc index c3926297f8..cfa5940e21 100644 --- a/rtl/unix/ctypes.inc +++ b/rtl/unix/ctypes.inc @@ -21,49 +21,63 @@ Type { the following type definitions are compiler dependant } { and system dependant } - cInt8 = shortint; - cUInt8 = byte; - cUInt16= word; - cInt16 = smallint; - cInt32 = longint; - cUInt32= cardinal; - cInt64 = int64; - cUInt64= qword; + cint8 = shortint; + cuint8 = byte; + cuint16 = word; + cint16 = smallint; + cint32 = longint; + cuint32 = cardinal; + cint64 = int64; + cuint64 = qword; + + cbool = longbool; + cchar = shortint; + cuchar = byte; + cint = longint; { minimum range is : 32-bit } + cuint = cardinal; { minimum range is : 32-bit } + + csint = cint; + csigned = cint; + cunsigned = cuint; - cuchar = byte; - cchar = shortint; - cInt = longint; { minimum range is : 32-bit } - cUInt = Cardinal; { minimum range is : 32-bit } {$ifdef cpu64} - cLong = int64; - cuLong = qword; + clong = int64; + culong = qword; {$else} - cLong = longint; - cuLong = Cardinal; + clong = longint; + culong = cardinal; {$endif} - clonglong = int64; + + clonglong = int64; culonglong = qword; - cshort = smallint; - cushort = word; + cshort = smallint; + cushort = word; - pcInt = ^cInt; - pcUInt = ^cUInt; - pcLong = ^cLong; - pculong = ^cuLong; - pcshort = ^cshort; - pcushort = ^cushort; - pcchar = ^cchar; - pcuchar = ^cuchar; - - cunsigned = cuint; + pcint8 = ^cint8; + pcuint8 = ^cuint8; + pcint16 = ^cint16; + pcuint16 = ^cuint16; + pcint32 = ^cint32; + pcuint32 = ^cuint32; + pcint64 = ^cint64; + pcuint64 = ^cuint64; + pcbool = ^cbool; + pcchar = ^cchar; + pcuchar = ^cuchar; + pcint = ^cint; + pcuint = ^cuint; + pcsint = ^csint; + pcsigned = ^csigned; pcunsigned = ^cunsigned; - + pclong = ^clong; + pculong = ^culong; + pcshort = ^cshort; + pcushort = ^cushort; + { Floating point } - cFloat = Single; - cDouble = Double; - clDouble = Extended; - pcFloat = ^cFloat; - pcDouble = ^cDouble; - pclDouble = ^clDouble; - - + cfloat = single; + cdouble = double; + cldouble = extended; + pcfloat = ^cfloat; + pcdouble = ^cdouble; + pcldouble = ^cldouble;