LAR Library: base.h Source File

LAR Library

base.h
Go to the documentation of this file.
1 #ifndef LARLIB_BASE_H
2 #define LARLIB_BASE_H
3 
140 #ifdef __TELIUM3__
141 #define HAS_STDINT
142 #endif
143 
144 /*
145  * If not available, redefine some C99's stdint types.
146  */
147 #if !defined(HAVE_STDINT) && !defined(HAS_STDINT)
148 
150 typedef char int8_t;
151 
153 typedef short int16_t;
154 
156 typedef int int32_t;
157 
159 typedef long long int64_t;
160 
162 typedef unsigned char uint8_t;
163 
165 typedef unsigned short uint16_t;
166 
168 typedef unsigned int uint32_t;
169 
171 typedef unsigned long long uint64_t;
172 
173 #else
174 #include <stdint.h>
175 #endif
176 
177 /* -------------------------------------------------------------------------- */
178 
192 };
193 
194 /* -------------------------------------------------------------------------- */
195 
196 /*
197  * Helpful defines.
198  */
199 
203 #define BASE_MAX(a,b) (((a) < (b)) ? (b) : (a))
204 
208 #define BASE_MIN(a,b) (((a) < (b)) ? (a) : (b))
209 
220 #define BASE_LENGTH(v) (sizeof(v) / sizeof((v)[0]))
221 
222 /* -------------------------------------------------------------------------- */
223 
224 /*
225  * Library version information
226  */
227 
234 #define LARLIB_VERSION (0x0113)
235 
251 const char *larlibGetVersion(void);
252 
253 /* @} */
254 
255 #endif
unsigned long long uint64_t
Unsigned 64-bit integer.
Definition: base.h:171
long long int64_t
Signed 64-bit integer.
Definition: base.h:159
No error.
Definition: base.h:183
Requested data was not found.
Definition: base.h:185
Function was given an invalid parameter.
Definition: base.h:184
Canceled by external process (user?)
Definition: base.h:190
Access/permission failure.
Definition: base.h:189
Either parameter is too large, or result buffer too small.
Definition: base.h:188
Time-limited function has not completed in the requested time.
Definition: base.h:191
unsigned int uint32_t
Unsigned 32-bit integer.
Definition: base.h:168
baseErrors_t
Common error values.
Definition: base.h:182
unsigned short uint16_t
Unsigned 16-bit integer.
Definition: base.h:165
short int16_t
Signed 16-bit integer.
Definition: base.h:153
const char * larlibGetVersion(void)
Return a string with the version and revision of LarLib library.
char int8_t
Signed 8-bit integer.
Definition: base.h:150
Given handle is invalid.
Definition: base.h:186
Resource allocation problem (usually memory)
Definition: base.h:187
unsigned char uint8_t
Unsigned 8-bit integer.
Definition: base.h:162
int int32_t
Signed 32-bit integer.
Definition: base.h:156
Generated on Mon Mar 27 2017 15:42:52 for LAR Library by   doxygen 1.8.9.1