MrSID Decode SDK for Raster Reference Manual  9.5.5.5244
lt_types.h
Go to the documentation of this file.
1 //
2 // This code is property of Celartem, Inc dba Extensis.
3 // Copyright (c) 1995-2023. All rights reserved.
4 // Use permitted only under license from Extensis.
5 //
6 /* PUBLIC */
7 
17 #ifndef LT_TYPES_H
18 #define LT_TYPES_H
19 
20 #include <limits.h>
21 #include <float.h>
22 
23 #include "lt_platform.h"
24 
34 typedef signed char lt_int8;
36 typedef unsigned char lt_uint8;
38 typedef signed short lt_int16;
40 typedef unsigned short lt_uint16;
42 typedef signed int lt_int32;
44 typedef unsigned int lt_uint32;
46 typedef float lt_float32;
48 typedef double lt_float64;
49 
50 #if defined(LT_COMPILER_MS)
52  typedef signed __int64 lt_int64;
54  typedef unsigned __int64 lt_uint64;
55 #else
57  typedef long long int lt_int64;
59  typedef unsigned long long int lt_uint64;
60 #endif
64 #ifndef DOXYGEN_EXCLUDE
65 
66 #define LT_CHAR_MAX ((char)CHAR_MAX)
67 #define LT_CHAR_MIN ((char)CHAR_MIN)
68 #define LT_SCHAR_MAX ((signed char)SCHAR_MAX)
69 #define LT_SCHAR_MIN ((signed char)SCHAR_MIN)
70 #define LT_UCHAR_MAX ((unsigned char)UCHAR_MAX)
71 
72 #define LT_SHRT_MAX ((short int)SHRT_MAX)
73 #define LT_SHRT_MIN ((short int)SHRT_MIN)
74 #define LT_USHRT_MAX ((unsigned short int)USHRT_MAX)
75 
76 #define LT_INT_MAX ((int)INT_MAX)
77 #define LT_INT_MIN ((int)INT_MIN)
78 #define LT_UINT_MAX ((unsigned int)UINT_MAX)
79 
80 #define LT_LONG_MAX ((long int)LONG_MAX)
81 #define LT_LONG_MIN ((long int)LONG_MIN)
82 #define LT_ULONG_MAX ((unsigned long int)ULONG_MAX)
83 
84 #define LT_FLT_MIN ((float)FLT_MIN)
85 #define LT_FLT_MAX ((float)FLT_MAX)
86 #define LT_FLOAT_MIN (LT_FLT_MIN)
87 #define LT_FLOAT_MAX (LT_FLT_MAX)
88 
89 #define LT_DBL_MIN ((double)DBL_MIN)
90 #define LT_DBL_MAX ((double)DBL_MAX)
91 #define LT_DOUBLE_MIN (LT_DBL_MIN)
92 #define LT_DOUBLE_MAX (LT_DBL_MAX)
93 
94 #define LT_INT8_MAX ((lt_int8)127) /* 2^7 - 1 */
95 #define LT_INT8_MIN ((lt_int8)(-LT_INT8_MAX - 1)) /* -2^7 */
96 #define LT_UINT8_MAX ((lt_uint8)255U) /* 2^8 - 1 */
97 #define LT_UINT8_MIN (0)
98 #define LT_INT16_MAX ((lt_int16)32767) /* 2^15 - 1 */
99 #define LT_INT16_MIN ((lt_int16)-LT_INT16_MAX - 1) /* -2^15 */
100 #define LT_UINT16_MAX ((lt_uint16)65535U) /* 2^16 - 1 */
101 #define LT_UINT16_MIN (0)
102 #define LT_INT32_MAX ((lt_int32)2147483647) /* 2^31 - 1 */
103 #define LT_INT32_MIN ((lt_int32)(-LT_INT32_MAX - 1)) /* -2^31 */
104 #define LT_UINT32_MAX ((lt_uint32)4294967295U) /* 2^32 - 1 */
105 #define LT_UINT32_MIN (0)
106 #define LT_INT64_MIN ((lt_int64)-LT_INT64_MAX - 1) /* -2^63 */
107 #define LT_UINT64_MIN (0)
108 
109 // GNU wants these constants suffixed, windows does not
110 #if defined(LT_COMPILER_MS)
111  #define LT_INT64_MAX ((lt_int64)9223372036854775807) /* 2^63 - 1 */
112  #define LT_UINT64_MAX ((lt_uint64)18446744073709551615) /* 2^64 - 1 */
113 #else
114  #define LT_INT64_MAX ((lt_int64)9223372036854775807LL) /* 2^63 - 1 */
115  #define LT_UINT64_MAX ((lt_uint64)18446744073709551615ULL) /* 2^64 - 1 */
116 #endif
117 
118 #endif /* DOXYGEN_EXCLUDE */
119 
120 
122 //typedef char lt_utf8;
123 //#define LT_UTF8STR(str) ((lt_utf8 *)(str))
124 
129 typedef char lt_ascii;
131 //typedef char lt_utf8;
135 
136 #endif /* LT_TYPES_H */
Preprocessor symbols for canonical identification of OS, architecture, and compiler.
unsigned short lt_uint16
unsigned 16-bit integer
Definition: lt_types.h:40
signed char lt_int8
signed 8-bit integer
Definition: lt_types.h:34
char lt_ascii
(DEPRECATED)
Definition: lt_types.h:129
lt_uint8 lt_utf8
signed 8-bit integer
Definition: lt_types.h:130
float lt_float32
32-bit floating point (DEPRECATED)
Definition: lt_types.h:46
unsigned long long int lt_uint64
unsigned 64-bit integer
Definition: lt_types.h:59
lt_uint32 lt_utf32
signed 8-bit integer
Definition: lt_types.h:133
unsigned char lt_uint8
unsigned 8-bit integer
Definition: lt_types.h:36
signed short lt_int16
signed 16-bit integer
Definition: lt_types.h:38
unsigned int lt_uint32
unsigned 32-bit integer
Definition: lt_types.h:44
double lt_float64
64-bit floating point (DEPRECATED)
Definition: lt_types.h:48
long long int lt_int64
signed 64-bit integer
Definition: lt_types.h:57
lt_uint16 lt_utf16
signed 8-bit integer
Definition: lt_types.h:132
signed int lt_int32
signed 32-bit integer
Definition: lt_types.h:42

Extensis