| 1 | /*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*\ |
| 2 | |
| 3 | File: octtype.h |
| 4 | |
| 5 | Copyright (c) 2001-2007 Octasic Inc. |
| 6 | |
| 7 | Description: |
| 8 | |
| 9 | This file defines the base storage types. |
| 10 | |
| 11 | This file is part of the Octasic OCT6100 GPL API . The OCT6100 GPL API is |
| 12 | free software; you can redistribute it and/or modify it under the terms of |
| 13 | the GNU General Public License as published by the Free Software Foundation; |
| 14 | either version 2 of the License, or (at your option) any later version. |
| 15 | |
| 16 | The OCT6100 GPL API is distributed in the hope that it will be useful, but |
| 17 | WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
| 18 | or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 19 | for more details. |
| 20 | |
| 21 | You should have received a copy of the GNU General Public License |
| 22 | along with the OCT6100 GPL API; if not, write to the Free Software |
| 23 | Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
| 24 | |
| 25 | $Octasic_Release: OCT612xAPI-01.00-PR49 $ |
| 26 | |
| 27 | $Octasic_Revision: 18 $ |
| 28 | |
| 29 | \*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*/ |
| 30 | #ifndef __OCTTYPE_H__ |
| 31 | #define __OCTTYPE_H__ |
| 32 | |
| 33 | /*-------------------------------------------------------------------------- |
| 34 | C language |
| 35 | ----------------------------------------------------------------------------*/ |
| 36 | |
| 37 | #ifdef __cplusplus |
| 38 | extern "C" { |
| 39 | #endif |
| 40 | |
| 41 | /*-------------------------------------------------------------------------- |
| 42 | Include target-specific header if available |
| 43 | ----------------------------------------------------------------------------*/ |
| 44 | #if defined( OCT_NTDRVENV ) |
| 45 | #include "octtypentdrv.h" /* All NT driver typedef */ |
| 46 | #elif defined( OCT_WINENV ) |
| 47 | #include "octtypewin.h" /* All Win32 typedef */ |
| 48 | #elif defined( OCT_VXENV ) |
| 49 | #include "octtypevx.h" /* All VxWorks typedef */ |
| 50 | #else |
| 51 | /*-------------------------------------------------------------------------- |
| 52 | No target-specific header available |
| 53 | ----------------------------------------------------------------------------*/ |
| 54 | |
| 55 | #ifdef SZ |
| 56 | #undef SZ |
| 57 | #endif |
| 58 | |
| 59 | /***************************** DEFINES *************************************/ |
| 60 | /* 16-bit integer */ |
| 61 | typedef unsigned short UINT16; |
| 62 | typedef signed short INT16; |
| 63 | typedef unsigned short *PUINT16; |
| 64 | typedef signed short *PINT16; |
| 65 | |
| 66 | /* 8-bit integer */ |
| 67 | typedef unsigned char UINT8; |
| 68 | typedef signed char INT8; |
| 69 | typedef signed char OCT_INT8; |
| 70 | typedef unsigned char *PUINT8; |
| 71 | typedef signed char *PINT8; |
| 72 | |
| 73 | |
| 74 | /* 32 bit integer */ |
| 75 | typedef unsigned int UINT32; |
| 76 | typedef signed int INT32; |
| 77 | typedef INT32 * PINT32; |
| 78 | typedef UINT32 * PUINT32; |
| 79 | |
| 80 | /* Long integer */ |
| 81 | typedef signed long LONG; |
| 82 | typedef unsigned long ULONG; |
| 83 | typedef long * PLONG; |
| 84 | typedef unsigned long * PULONG; |
| 85 | |
| 86 | /* Short integer */ |
| 87 | typedef short SHORT; |
| 88 | typedef unsigned short USHORT; |
| 89 | typedef short * PSHORT; |
| 90 | typedef unsigned short *PUSHORT; |
| 91 | |
| 92 | /* 8-bit integer*/ |
| 93 | typedef unsigned char BYTE; |
| 94 | typedef BYTE * PBYTE; |
| 95 | typedef unsigned char UCHAR; |
| 96 | |
| 97 | /* Character and strings */ |
| 98 | typedef char CHAR; |
| 99 | typedef CHAR SZ; |
| 100 | typedef CHAR * PSZ; |
| 101 | typedef CHAR * PCHAR; |
| 102 | |
| 103 | /* Double integers */ |
| 104 | typedef double DOUBLE; |
| 105 | typedef double * PDOUBLE; |
| 106 | typedef float FLOAT; |
| 107 | typedef float * PFLOAT; |
| 108 | |
| 109 | typedef void VOID; |
| 110 | typedef void * PVOID; |
| 111 | |
| 112 | /* Booleans */ |
| 113 | typedef int BOOL; |
| 114 | typedef BOOL * PBOOL; |
| 115 | |
| 116 | /* Integers */ |
| 117 | typedef int INT; |
| 118 | typedef int * PINT; |
| 119 | typedef unsigned int UINT; |
| 120 | typedef unsigned int * PUINT; |
| 121 | |
| 122 | /* Define pseudo-keywords IN and OUT if not defined yet */ |
| 123 | #ifndef IN |
| 124 | #define IN /* IN param */ |
| 125 | #endif |
| 126 | |
| 127 | #ifndef OUT |
| 128 | #define OUT /* OUT param */ |
| 129 | #endif |
| 130 | |
| 131 | /* LONG LONG */ |
| 132 | #define LLONG signed long long |
| 133 | #define PLLONG signed long long * |
| 134 | #define ULLONG unsigned long long |
| 135 | #define PULLONG unsigned long long * |
| 136 | |
| 137 | #ifndef OPT |
| 138 | #define OPT /* OPT param */ |
| 139 | #endif |
| 140 | |
| 141 | typedef PSZ * PPSZ; |
| 142 | |
| 143 | #if defined(__FreeBSD__) |
| 144 | #include <sys/stddef.h> |
| 145 | #else |
| 146 | #include <linux/stddef.h> |
| 147 | #endif |
| 148 | |
| 149 | #endif |
| 150 | |
| 151 | /*-------------------------------------------------------------------------- |
| 152 | C language |
| 153 | ----------------------------------------------------------------------------*/ |
| 154 | |
| 155 | #ifdef __cplusplus |
| 156 | } |
| 157 | #endif |
| 158 | |
| 159 | #endif /* __OCTTYPE_H__ */ |