uLib  User mode C/C++ extended API library for Win32 programmers.
Types.h
Go to the documentation of this file.
1 //==---------------------------------------------------------------------------
2 // Base types - Lower case for those who prefer it - No cumbersome "_t" suffix.
3 // NOTE: C++ permits type redeclaration as long as it's identical.
4 //==---------------------------------------------------------------------------
5 // Copyleft (L) Love Nystrom - Use as you please.
6 //==---------------------------------------------------------------------------
7 
8 #ifndef __Types_h_incl__
9 #define __Types_h_incl__
10 
12 #if defined(_MSC_VER)
13  #define HAVE_INT64 1
14  #if (_MSC_VER >= 1200)
15  #define HAVE_SMALL_INTRINSICS 1
16  #else
17  #define HAVE_SMALL_INTRINSICS 0
18  #endif
19 #else // This may need amends for newer gcc et c...
20  #define HAVE_INT64 0
21  #define HAVE_SMALL_INTRINSICS 0
22 #endif
23 
28 
29 #ifndef NO_LC_STRING_TYPES
30 typedef const char cchar;
31 typedef const char* cstr; // Changeable ptr to const chars
32 typedef const cstr ccstr; // Const ptr to const chars
33 #endif
34 
39 
40 typedef unsigned char byte;
41 typedef unsigned short word;
42 typedef unsigned long dword;
43 
44 typedef unsigned char uchar;
45 typedef unsigned int uint;
46 typedef unsigned short ushort;
47 typedef unsigned long ulong;
48 
49 #if HAVE_INT64
50 typedef signed __int64 int64;
51 typedef unsigned __int64 uint64;
52 #else
53 typedef signed long long int64;
54 typedef unsigned long long uint64;
55 #endif
56 typedef uint64 qword;
57 
58 #if HAVE_SMALL_INTRINSICS
59 typedef signed __int8 int8;
60 typedef signed __int16 int16;
61 typedef signed __int32 int32;
62 typedef unsigned __int8 uint8;
63 typedef unsigned __int16 uint16;
64 typedef unsigned __int32 uint32;
65 #else
66 typedef signed char int8;
67 typedef signed short int16;
68 typedef signed long int32;
69 typedef unsigned char uint8;
70 typedef unsigned short uint16;
71 typedef unsigned long uint32;
72 #endif
73 
74 #ifndef NO_LC_POINTER_TYPES
75 typedef void * pvoid;
76 typedef float * pfloat;
77 typedef double * pdouble;
78 
79 typedef int * pint;
80 typedef short * pshort;
81 typedef long * plong;
82 typedef uint * puint;
83 typedef ushort * pushort;
84 typedef ulong * pulong;
85 
86 typedef int8 * pint8;
87 typedef int16 * pint16;
88 typedef int32 * pint32;
89 typedef int64 * pint64;
90 typedef uint8 * puint8;
91 typedef uint16 * puint16;
92 typedef uint32 * puint32;
93 typedef uint64 * puint64;
94 #endif//ndef NO_LC_POINTER_TYPES
95 
97 #endif//ndef __Types_h_incl__
98 // EOF
long * plong
Definition: uLib/Types.h:81
uint32 * puint32
Definition: uLib/Types.h:92
signed char int8
Definition: uLib/Types.h:66
uint * puint
Definition: uLib/Types.h:82
const char cchar
Definition: uLib/Types.h:30
unsigned long uint32
Definition: uLib/Types.h:71
uint64 qword
Definition: uLib/Types.h:56
int16 * pint16
Definition: uLib/Types.h:87
unsigned int uint
Definition: uLib/Types.h:45
void * pvoid
Definition: uLib/Types.h:75
short * pshort
Definition: uLib/Types.h:80
int64 * pint64
Definition: uLib/Types.h:89
int8 * pint8
Definition: uLib/Types.h:86
unsigned __int64 uint64
Definition: uLib/Types.h:51
signed long int32
Definition: uLib/Types.h:68
signed __int64 int64
Definition: uLib/Types.h:50
uint8 * puint8
Definition: uLib/Types.h:90
unsigned char byte
Definition: uLib/Types.h:40
unsigned short word
Definition: uLib/Types.h:41
unsigned char uchar
Definition: uLib/Types.h:44
unsigned short uint16
Definition: uLib/Types.h:70
uint16 * puint16
Definition: uLib/Types.h:91
float * pfloat
Definition: uLib/Types.h:76
unsigned short ushort
Definition: uLib/Types.h:46
unsigned long ulong
Definition: uLib/Types.h:47
signed short int16
Definition: uLib/Types.h:67
ulong * pulong
Definition: uLib/Types.h:84
double * pdouble
Definition: uLib/Types.h:77
uint64 * puint64
Definition: uLib/Types.h:93
unsigned char uint8
Definition: uLib/Types.h:69
int * pint
Definition: uLib/Types.h:79
const char * cstr
Definition: uLib/Types.h:31
const cstr ccstr
Definition: uLib/Types.h:32
unsigned long dword
Definition: uLib/Types.h:42
int32 * pint32
Definition: uLib/Types.h:88
ushort * pushort
Definition: uLib/Types.h:83