forked from svi-opensource/libics
-
Notifications
You must be signed in to change notification settings - Fork 0
/
libics_conf.h.in
240 lines (193 loc) · 7.03 KB
/
libics_conf.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
/*
* libics: Image Cytometry Standard file reading and writing.
*
* Copyright (C) 2000-2013 Cris Luengo and others
* Copyright 2015, 2017:
* Scientific Volume Imaging Holding B.V.
* Laapersveld 63, 1213 VB Hilversum, The Netherlands
* https://www.svi.nl
*
* Large chunks of this library written by
* Bert Gijsbers
* Dr. Hans T.M. van der Voort
* And also Damir Sudar, Geert van Kempen, Jan Jitze Krol,
* Chiel Baarslag and Fons Laan.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library General Public
* License along with this library; if not, write to the Free
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
/*
* FILE : libics_conf.h
*
* This file allows you to configure libics. Only needed to build the
* library
*
*/
#ifndef LIBICS_CONF_H
#define LIBICS_CONF_H
/* Doubles larger than ICS_MAX_DOUBLE or smaller than ICS_MIN_DOUBLE are written
in scientific notation. */
#define ICS_MAX_DOUBLE 10000000
#define ICS_MIN_DOUBLE 0.001
/* ICS_HISTARRAY_INCREMENT sets the increment for the array allocated to contain
the history strings. */
#define ICS_HISTARRAY_INCREMENT 1024
/* ICS_BUF_SIZE is the size of the buffer allocated to:
- Do the compression. This is independend from the memory allocated by zlib
for the dictionary.
- Decompress stuff into when skipping a data block (IcsSetIdsBlock() for
compressed files).
- Copy data over from one IDS file to another when the ICS file is opened for
updating. */
#define ICS_BUF_SIZE 16384
/*********************************************************************
*** If we are not using the configure script: ***
*** (currently configured for 32-bit Windows - edit as necessary) ***
*********************************************************************/
#undef ICS_USING_CONFIGURE
#if !defined(ICS_USING_CONFIGURE)
/* If ICS_FORCE_C_LOCALE is set, the locale is set to "C" before each read or
write operation. This ensures that the ICS header file is formatted
properly. If your program does not modify the locale, you can safely comment
out is line: the "C" locale is the default. If this constant is not defined
and your program changes the locale, the resulting ICS header file might not
be readable by other applications: it will only be readable if the reading
application is set to the same locale as the writing application. The ICS
standard calls for the locale to be set to "C". */
#define ICS_FORCE_C_LOCALE
/* If ICS_DO_GZEXT is defined, the code will search for IDS files which have the
.ids.gz or .ids.Z filename extension. */
#define ICS_DO_GZEXT
/* If ICS_ZLIB is defined, the zlib dependancy is included, and the library will
be able to read GZIP compressed files. This variable is set by the makefile
-- enable ZLIB support there. */
/*#define ICS_ZLIB*/
/* These are used internally when the precise length of a variable is needed.
These are OK for 32-bit systems, but they might be different for 64-bit
systems. We also use size_t for a variable that is as wide as a pointer
(i.e. can hold the size of any data block).
*/
typedef unsigned char ics_t_uint8;
typedef signed char ics_t_sint8;
typedef unsigned short ics_t_uint16;
typedef signed short ics_t_sint16;
typedef unsigned int ics_t_uint32;
typedef signed int ics_t_sint32;
typedef float ics_t_real32;
typedef double ics_t_real64;
/*********************************************************************
*** If we are using the configure script:
*********************************************************************/
#else
/* Define if your system has strcasecmp() in strings.h */
#undef HAVE_STRINGS_STRCASECMP
/* Define if your system has strcasecmp() in string.h */
#undef HAVE_STRING_STRCASECMP
/* If we should force the c locale. */
#undef ICS_FORCE_C_LOCALE
/* Location of the . */
#undef ICS_DO_GZEXT
/* Whether to search for IDS files with .ids.gz or .ids.Z extension. */
#undef ICS_DO_GZEXT
/* Whether to use zlib compression. */
#undef ICS_ZLIB
/* The number of bytes in a char. */
#undef SIZEOF_CHAR
/* The number of bytes in a short. */
#undef SIZEOF_SHORT
/* The number of bytes in a int. */
#undef SIZEOF_INT
/* The number of bytes in a long. */
#undef SIZEOF_LONG
/* The number of bytes in a unsigned char. */
#undef SIZEOF_UNSIGNED_CHAR
/* The number of bytes in a unsigned short. */
#undef SIZEOF_UNSIGNED_SHORT
/* The number of bytes in a unsigned int. */
#undef SIZEOF_UNSIGNED_INT
/* The number of bytes in a unsigned long. */
#undef SIZEOF_UNSIGNED_LONG
/* The number of bytes in a float. */
#undef SIZEOF_FLOAT
/* The number of bytes in a double. */
#undef SIZEOF_DOUBLE
/* These are used internally when the precise length of a variable is needed.
We also use size_t for a variable that is as wide as a pointer (i.e. can hold
the size of any data block). */
#if SIZEOF_CHAR == 1
typedef signed char ics_t_sint8;
#elif SIZEOF_SHORT == 1
typedef signed short ics_t_sint8;
#elif SIZEOF_INT == 1
typedef signed int ics_t_sint8;
#elif SIZEOF_LONG == 1
typedef signed long ics_t_sint8;
#endif
#if SIZEOF_UNSIGNED_CHAR == 1
typedef unsigned char ics_t_uint8;
#elif SIZEOF_UNSIGNED_SHORT == 1
typedef unsigned short ics_t_uint8;
#elif SIZEOF_UNSIGNED_INT == 1
typedef unsigned int ics_t_uint8;
#elif SIZEOF_UNSIGNED_LONG == 1
typedef unsigned long ics_t_uint8;
#endif
#if SIZEOF_CHAR == 2
typedef signed char ics_t_sint16;
#elif SIZEOF_SHORT == 2
typedef signed short ics_t_sint16;
#elif SIZEOF_INT == 2
typedef signed int ics_t_sint16;
#elif SIZEOF_LONG == 2
typedef signed long ics_t_sint16;
#endif
#if SIZEOF_UNSIGNED_CHAR == 2
typedef unsigned char ics_t_uint16;
#elif SIZEOF_UNSIGNED_SHORT == 2
typedef unsigned short ics_t_uint16;
#elif SIZEOF_UNSIGNED_INT == 2
typedef unsigned int ics_t_uint16;
#elif SIZEOF_UNSIGNED_LONG == 2
typedef unsigned long ics_t_uint16;
#endif
#if SIZEOF_CHAR == 4
typedef signed char ics_t_sint32;
#elif SIZEOF_SHORT == 4
typedef signed short ics_t_sint32;
#elif SIZEOF_INT == 4
typedef signed int ics_t_sint32;
#elif SIZEOF_LONG == 4
typedef signed long ics_t_sint32;
#endif
#if SIZEOF_UNSIGNED_CHAR == 4
typedef unsigned char ics_t_uint32;
#elif SIZEOF_UNSIGNED_SHORT == 4
typedef unsigned short ics_t_uint32;
#elif SIZEOF_UNSIGNED_INT == 4
typedef unsigned int ics_t_uint32;
#elif SIZEOF_UNSIGNED_LONG == 4
typedef unsigned long ics_t_uint32;
#endif
#if SIZEOF_FLOAT == 4
typedef float ics_t_real32;
#elif SIZEOF_DOUBLE == 4
typedef double ics_t_real32;
#endif
#if SIZEOF_FLOAT == 8
typedef float ics_t_real64;
#elif SIZEOF_DOUBLE == 8
typedef double ics_t_real64;
#endif
#endif
#endif