MagickCore
7.1.2
Convert, Edit, Or Compose Bitmap Images
Loading...
Searching...
No Matches
studio.h
1
/*
2
Copyright @ 1999 ImageMagick Studio LLC, a non-profit organization
3
dedicated to making software imaging solutions freely available.
4
5
You may not use this file except in compliance with the License. You may
6
obtain a copy of the License at
7
8
https://imagemagick.org/script/license.php
9
10
Unless required by applicable law or agreed to in writing, software
11
distributed under the License is distributed on an "AS IS" BASIS,
12
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
See the License for the specific language governing permissions and
14
limitations under the License.
15
16
MagickCore private application programming interface declarations.
17
*/
18
#ifndef MAGICKCORE_STUDIO_H
19
#define MAGICKCORE_STUDIO_H
20
21
#if defined(WIN32) || defined(WIN64) || defined(_WIN32_WINNT)
22
# define MAGICKCORE_WINDOWS_SUPPORT
23
#else
24
# define MAGICKCORE_POSIX_SUPPORT
25
#endif
26
27
#define MAGICKCORE_IMPLEMENTATION 1
28
29
#if !defined(MAGICKCORE_CONFIG_H)
30
# define MAGICKCORE_CONFIG_H
31
#include "MagickCore/magick-config.h"
32
# if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
33
# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
34
#endif
35
#if defined(_magickcore_const) && !defined(const)
36
# define const _magickcore_const
37
#endif
38
#if defined(_magickcore_inline) && !defined(inline)
39
# define inline _magickcore_inline
40
#endif
41
# if defined(__cplusplus) || defined(c_plusplus)
42
# undef inline
43
# endif
44
#endif
45
46
#if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
47
# include <omp.h>
48
# define MAGICKCORE_OPENMP_SUPPORT 1
49
#endif
50
51
#if defined(__cplusplus) || defined(c_plusplus)
52
extern
"C"
{
53
#endif
54
55
#if defined(MAGICKCORE_NAMESPACE_PREFIX)
56
# include "MagickCore/methods.h"
57
#endif
58
59
#if !defined(const)
60
# define STDC
61
#endif
62
63
/* Define to 1 if assertions should be disabled. */
64
#if defined(MAGICKCORE_NDEBUG)
65
#define NDEBUG 1
66
#endif
67
68
#include <stdarg.h>
69
#include <stdio.h>
70
#if defined(MAGICKCORE_HAVE_SYS_STAT_H)
71
# include <sys/stat.h>
72
#endif
73
#if defined(MAGICKCORE_STDC_HEADERS)
74
# include <stdlib.h>
75
# include <stddef.h>
76
#else
77
# if defined(MAGICKCORE_HAVE_STDLIB_H)
78
# include <stdlib.h>
79
# endif
80
#endif
81
#if !defined(magick_restrict)
82
# if !defined(_magickcore_restrict)
83
# define magick_restrict restrict
84
# else
85
# define magick_restrict _magickcore_restrict
86
# endif
87
#endif
88
#if defined(MAGICKCORE_HAVE_STRING_H)
89
# if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
90
# include <memory.h>
91
# endif
92
# include <string.h>
93
#endif
94
#if defined(MAGICKCORE_HAVE_STRINGS_H)
95
# include <strings.h>
96
#endif
97
#if defined(MAGICKCORE_HAVE_INTTYPES_H)
98
# include <inttypes.h>
99
#endif
100
#if defined(MAGICKCORE_HAVE_STDINT_H)
101
# include <stdint.h>
102
#endif
103
#if defined(MAGICKCORE_HAVE_UNISTD_H)
104
# include <unistd.h>
105
#endif
106
#if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG)
107
#define _CRTDBG_MAP_ALLOC
108
#endif
109
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
110
# define NOMINMAX
111
# include <io.h>
112
#if !defined(__CYGWIN__)
113
# include <direct.h>
114
#endif
115
# if !defined(MAGICKCORE_HAVE_STRERROR)
116
# define HAVE_STRERROR
117
# endif
118
#endif
119
120
#include <ctype.h>
121
#include <locale.h>
122
#include <errno.h>
123
#include <fcntl.h>
124
#include <math.h>
125
#include <time.h>
126
#include <limits.h>
127
#include <signal.h>
128
#include <assert.h>
129
130
#if defined(MAGICKCORE_HAVE_XLOCALE_H)
131
# include <xlocale.h>
132
#endif
133
#if defined(MAGICKCORE_THREAD_SUPPORT)
134
# include <pthread.h>
135
#endif
136
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
137
# if !defined(__CYGWIN__)
138
# if defined(MAGICKCORE_DPC_SUPPORT)
139
# include <winsock2.h>
140
# ifdef _MSC_VER
141
# pragma comment (lib, "ws2_32.lib")
142
# endif
143
# endif
144
# include <ws2tcpip.h>
145
# endif
146
#endif
147
#if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
148
# include <sys/syslimits.h>
149
#endif
150
#if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
151
# include <arm/limits.h>
152
#endif
153
154
#if defined(MAGICKCORE_HAVE_CL_CL_H)
155
# define MAGICKCORE_OPENCL_SUPPORT 1
156
#endif
157
#if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
158
# define MAGICKCORE_OPENCL_SUPPORT 1
159
#endif
160
161
#if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
162
ssize_t pread(
int
,
void
*,
size_t
,off_t);
163
#endif
164
165
#if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
166
ssize_t pwrite(
int
,
const
void
*,
size_t
,off_t);
167
#endif
168
169
#if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
170
extern
size_t
strlcpy(
char
*,
const
char
*,
size_t
);
171
#endif
172
173
#if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
174
extern
int
vsnprintf(
char
*,
size_t
,
const
char
*,va_list);
175
#endif
176
177
#include "MagickCore/method-attribute.h"
178
179
#if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT)
180
# include <sys/types.h>
181
# include <sys/stat.h>
182
# if defined(MAGICKCORE_POSIX_SUPPORT)
183
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
184
# define dirent direct
185
# define NAMLEN(dirent) (dirent)->d_namlen
186
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
187
# include <sys/ndir.h>
188
# endif
189
# if defined(MAGICKCORE_HAVE_SYS_DIR_H)
190
# include <sys/dir.h>
191
# endif
192
# if defined(MAGICKCORE_HAVE_NDIR_H)
193
# include <ndir.h>
194
# endif
195
# else
196
# include <dirent.h>
197
# define NAMLEN(dirent) strlen((dirent)->d_name)
198
# endif
199
# include <sys/wait.h>
200
# include <pwd.h>
201
# endif
202
# if !defined(S_ISDIR)
203
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
204
# endif
205
# if !defined(S_ISREG)
206
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
207
# endif
208
# include "MagickCore/magick-type.h"
209
# if !defined(MAGICKCORE_WINDOWS_SUPPORT)
210
# include <sys/time.h>
211
# if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
212
# include <sys/times.h>
213
# endif
214
# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
215
# include <sys/resource.h>
216
# endif
217
# if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
218
# include <sys/mman.h>
219
# endif
220
# if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
221
# include <sys/sendfile.h>
222
# endif
223
# if defined(MAGICKCORE_HAVE_SYS_SOCKET_H)
224
# include <sys/socket.h>
225
# endif
226
# if defined(MAGICKCORE_HAVE_SYS_UIO_H)
227
# include <sys/uio.h>
228
# endif
229
#endif
230
#else
231
# include <types.h>
232
# include <stat.h>
233
# include "MagickCore/magick-type.h"
234
#endif
235
236
#if defined(S_IRUSR) && defined(S_IWUSR)
237
# define S_MODE (S_IRUSR | S_IWUSR)
238
#elif defined (MAGICKCORE_WINDOWS_SUPPORT)
239
# define S_MODE (_S_IREAD | _S_IWRITE)
240
#else
241
# define S_MODE 0600
242
#endif
243
244
#if defined(MAGICKCORE_WINDOWS_SUPPORT)
245
# include "MagickCore/nt-base.h"
246
#endif
247
#ifdef __VMS
248
# include "MagickCore/vms.h"
249
#endif
250
251
#undef HAVE_CONFIG_H
252
#undef gamma
253
#undef index
254
#undef pipe
255
#undef y1
256
257
/*
258
Review these platform specific definitions.
259
*/
260
#if defined(MAGICKCORE_POSIX_SUPPORT) && !( defined(__OS2__) || defined( vms ) )
261
# define DirectorySeparator "/"
262
# define DirectoryListSeparator ':'
263
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
264
# define Exit exit
265
# define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
266
# define X11_PREFERENCES_PATH "~/."
267
# define ProcessPendingEvents(text)
268
# define ReadCommandlLine(argc,argv)
269
# define SetNotifyHandlers
270
#else
271
# ifdef __VMS
272
# define X11_APPLICATION_PATH "decw$system_defaults:"
273
# define DirectorySeparator ""
274
# define DirectoryListSeparator ';'
275
# define EditorOptions ""
276
# define Exit exit
277
# define IsBasenameSeparator(c) \
278
(((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
279
# define MAGICKCORE_LIBRARY_ABSOLUTE_PATH "sys$login:"
280
# define MAGICKCORE_SHARE_PATH "sys$login:"
281
# define X11_PREFERENCES_PATH "decw$user_defaults:"
282
# define ProcessPendingEvents(text)
283
# define ReadCommandlLine(argc,argv)
284
# define SetNotifyHandlers
285
# endif
286
# if defined(__OS2__)
287
# define DirectorySeparator "\\"
288
# define DirectoryListSeparator ';'
289
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
290
# define Exit exit
291
# define IsBasenameSeparator(c) \
292
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
293
# define PreferencesDefaults "~\."
294
# define ProcessPendingEvents(text)
295
# define ReadCommandlLine(argc,argv)
296
# define SetNotifyHandlers
297
#endif
298
# if defined(MAGICKCORE_WINDOWS_SUPPORT)
299
# define DirectorySeparator "\\"
300
# define DirectoryListSeparator ';'
301
# define EditorOptions ""
302
# define IsBasenameSeparator(c) \
303
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
304
# define ProcessPendingEvents(text)
305
# if !defined(X11_PREFERENCES_PATH)
306
# define X11_PREFERENCES_PATH "~\\."
307
# endif
308
# define ReadCommandlLine(argc,argv)
309
# define SetNotifyHandlers \
310
SetErrorHandler(NTErrorHandler); \
311
SetWarningHandler(NTWarningHandler)
312
# endif
313
314
#endif
315
316
/*
317
Define system symbols if not already defined.
318
*/
319
#if !defined(STDIN_FILENO)
320
#define STDIN_FILENO 0x00
321
#endif
322
323
#if !defined(O_BINARY)
324
#define O_BINARY 0x00
325
#endif
326
327
#if !defined(PATH_MAX)
328
#define PATH_MAX 4096
329
#endif
330
331
#if defined(MAGICKCORE_LTDL_DELEGATE) || (defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DLL) && !defined(_LIB))
332
# define MAGICKCORE_MODULES_SUPPORT
333
#endif
334
335
#if defined(_MAGICKMOD_)
336
# undef MAGICKCORE_BUILD_MODULES
337
# define MAGICKCORE_BUILD_MODULES
338
#endif
339
340
/*
341
Magick defines.
342
*/
343
#define MagickMaxRecursionDepth 600
344
#define Swap(x,y) ((x)^=(y), (y)^=(x), (x)^=(y))
345
#if defined(_MSC_VER)
346
# define DisableMSCWarning(nr) __pragma(warning(push)) \
347
__pragma(warning(disable:nr))
348
# define RestoreMSCWarning __pragma(warning(pop))
349
#else
350
# define DisableMSCWarning(nr)
351
# define RestoreMSCWarning
352
#endif
353
354
#if defined(__cplusplus) || defined(c_plusplus)
355
}
356
#endif
357
358
#endif
ImageMagick-7
MagickCore
studio.h
Generated by
1.13.2