MrSID Decode SDK for Raster Reference Manual
9.0.0.3864
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
lt_types.h
Go to the documentation of this file.
1
/* $Id$ */
2
/* //////////////////////////////////////////////////////////////////////////
3
// //
4
// This code is Copyright (c) 2004 LizardTech, Inc, 1008 Western Avenue, //
5
// Suite 200, Seattle, WA 98104. Unauthorized use or distribution //
6
// prohibited. Access to and use of this code is permitted only under //
7
// license from LizardTech, Inc. Portions of the code are protected by //
8
// US and foreign patents and other filings. All Rights Reserved. //
9
// //
11
/* PUBLIC */
12
22
#ifndef LT_TYPES_H
23
#define LT_TYPES_H
24
25
#include <limits.h>
26
#include <float.h>
27
28
#include "
lt_platform.h
"
29
30
31
#if defined(LT_COMPILER_MS)
32
#pragma warning(push,4)
33
#endif
34
44
typedef
signed
char
lt_int8
;
46
typedef
unsigned
char
lt_uint8
;
48
typedef
signed
short
lt_int16
;
50
typedef
unsigned
short
lt_uint16
;
52
typedef
signed
int
lt_int32
;
54
typedef
unsigned
int
lt_uint32
;
56
typedef
float
lt_float32
;
58
typedef
double
lt_float64
;
59
60
#if defined(LT_COMPILER_MS)
61
62
typedef
signed
__int64 lt_int64;
64
typedef
unsigned
__int64 lt_uint64;
65
#elif defined ( LT_COMPILER_GNU ) || \
66
defined ( LT_COMPILER_SUN )
67
68
typedef
long
long
int
lt_int64;
70
typedef
unsigned
long
long
int
lt_uint64;
71
#else
72
#error NOT YET PORTED TO TARGET COMPILER
73
#endif
74
77
#ifndef DOXYGEN_EXCLUDE
78
79
#define LT_CHAR_MAX ((char)CHAR_MAX)
80
#define LT_CHAR_MIN ((char)CHAR_MIN)
81
#define LT_SCHAR_MAX ((signed char)SCHAR_MAX)
82
#define LT_SCHAR_MIN ((signed char)SCHAR_MIN)
83
#define LT_UCHAR_MAX ((unsigned char)UCHAR_MAX)
84
85
#define LT_SHRT_MAX ((short int)SHRT_MAX)
86
#define LT_SHRT_MIN ((short int)SHRT_MIN)
87
#define LT_USHRT_MAX ((unsigned short int)USHRT_MAX)
88
89
#define LT_INT_MAX ((int)INT_MAX)
90
#define LT_INT_MIN ((int)INT_MIN)
91
#define LT_UINT_MAX ((unsigned int)UINT_MAX)
92
93
#define LT_LONG_MAX ((long int)LONG_MAX)
94
#define LT_LONG_MIN ((long int)LONG_MIN)
95
#define LT_ULONG_MAX ((unsigned long int)ULONG_MAX)
96
97
#define LT_FLT_MIN ((float)FLT_MIN)
98
#define LT_FLT_MAX ((float)FLT_MAX)
99
#define LT_FLOAT_MIN (LT_FLT_MIN)
100
#define LT_FLOAT_MAX (LT_FLT_MAX)
101
102
#define LT_DBL_MIN ((double)DBL_MIN)
103
#define LT_DBL_MAX ((double)DBL_MAX)
104
#define LT_DOUBLE_MIN (LT_DBL_MIN)
105
#define LT_DOUBLE_MAX (LT_DBL_MAX)
106
107
#define LT_INT8_MAX ((lt_int8)127)
/* 2^7 - 1 */
108
#define LT_INT8_MIN ((lt_int8)(-LT_INT8_MAX - 1))
/* -2^7 */
109
#define LT_UINT8_MAX ((lt_uint8)255U)
/* 2^8 - 1 */
110
#define LT_UINT8_MIN (0)
111
#define LT_INT16_MAX ((lt_int16)32767)
/* 2^15 - 1 */
112
#define LT_INT16_MIN ((lt_int16)-LT_INT16_MAX - 1)
/* -2^15 */
113
#define LT_UINT16_MAX ((lt_uint16)65535U)
/* 2^16 - 1 */
114
#define LT_UINT16_MIN (0)
115
#define LT_INT32_MAX ((lt_int32)2147483647)
/* 2^31 - 1 */
116
#define LT_INT32_MIN ((lt_int32)(-LT_INT32_MAX - 1))
/* -2^31 */
117
#define LT_UINT32_MAX ((lt_uint32)4294967295U)
/* 2^32 - 1 */
118
#define LT_UINT32_MIN (0)
119
#define LT_INT64_MIN ((lt_int64)-LT_INT64_MAX - 1)
/* -2^63 */
120
#define LT_UINT64_MIN (0)
121
122
// GNU wants these constants suffixed, windows does not
123
#if defined(LT_COMPILER_GNU) || \
124
defined(LT_COMPILER_SUN)
125
#define LT_INT64_MAX ((lt_int64)9223372036854775807LL)
/* 2^63 - 1 */
126
#define LT_UINT64_MAX ((lt_uint64)18446744073709551615ULL)
/* 2^64 - 1 */
127
#elif defined(LT_COMPILER_MS)
128
#define LT_INT64_MAX ((lt_int64)9223372036854775807)
/* 2^63 - 1 */
129
#define LT_UINT64_MAX ((lt_uint64)18446744073709551615)
/* 2^64 - 1 */
130
#else
131
#error NOT YET PORTED TO TARGET COMPILER
132
#endif
133
134
#endif
/* DOXYGEN_EXCLUDE */
135
136
138
//typedef char lt_utf8;
139
//#define LT_UTF8STR(str) ((lt_utf8 *)(str))
140
145
typedef
char
lt_ascii
;
146
typedef
lt_uint8
lt_utf8
;
147
//typedef char lt_utf8;
148
typedef
lt_uint16
lt_utf16
;
149
typedef
lt_uint32
lt_utf32
;
151
152
153
#if defined(LT_COMPILER_MS)
154
#pragma warning(pop)
155
#endif
156
157
#endif
/* LT_TYPES_H */
LizardTech