MagickWand
6.9.12-67
Convert, Edit, Or Compose Bitmap Images
Main Page
Data Structures
Files
File List
All
Data Structures
studio.h
1
/*
2
Copyright 1999-2021 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
MagickWand private application programming interface declarations.
17
*/
18
#ifndef MAGICKWAND_STUDIO_H
19
#define MAGICKWAND_STUDIO_H
20
21
#if defined(__cplusplus) || defined(c_plusplus)
22
extern
"C"
{
23
#endif
24
25
#if defined(WIN32) || defined(WIN64)
26
# define MAGICKWAND_WINDOWS_SUPPORT
27
#else
28
# define MAGICKWAND_POSIX_SUPPORT
29
#endif
30
31
#define MAGICKWAND_IMPLEMENTATION 1
32
33
#if !defined(MAGICKWAND_CONFIG_H)
34
# define MAGICKWAND_CONFIG_H
35
# if !defined(vms) && !defined(macintosh)
36
# include "magick/magick-config.h"
37
# else
38
# include "magick-config.h"
39
# endif
40
#if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
41
# define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
42
#endif
43
#if defined(_magickcore_const) && !defined(const)
44
# define const _magickcore_const
45
#endif
46
#if defined(_magickcore_inline) && !defined(inline)
47
# define inline _magickcore_inline
48
#endif
49
# if defined(__cplusplus) || defined(c_plusplus)
50
# undef inline
51
# endif
52
#endif
53
54
#if !defined(const)
55
# define STDC
56
#endif
57
58
/* Define to 1 if assertions should be disabled. */
59
#if defined(MAGICKCORE_NDEBUG)
60
#define NDEBUG 1
61
#endif
62
63
#include <stdarg.h>
64
#include <stdio.h>
65
#if defined(MAGICKCORE_HAVE_SYS_STAT_H)
66
# include <sys/stat.h>
67
#endif
68
#if defined(MAGICKCORE_STDC_HEADERS)
69
# include <stdlib.h>
70
# include <stddef.h>
71
#else
72
# if defined(MAGICKCORE_HAVE_STDLIB_H)
73
# include <stdlib.h>
74
# endif
75
#endif
76
#if !defined(magick_restrict)
77
# if !defined(_magickcore_restrict)
78
# define magick_restrict restrict
79
# else
80
# define magick_restrict _magickcore_restrict
81
# endif
82
#endif
83
#if defined(MAGICKCORE_HAVE_STRING_H)
84
# if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
85
# include <memory.h>
86
# endif
87
# include <string.h>
88
#endif
89
#if defined(MAGICKCORE_HAVE_STRINGS_H)
90
# include <strings.h>
91
#endif
92
#if defined(MAGICKCORE_HAVE_INTTYPES_H)
93
# include <inttypes.h>
94
#endif
95
#if defined(MAGICKCORE_HAVE_STDINT_H)
96
# include <stdint.h>
97
#endif
98
#if defined(MAGICKCORE_HAVE_UNISTD_H)
99
# include <unistd.h>
100
#endif
101
#if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
102
#define _CRTDBG_MAP_ALLOC
103
#endif
104
105
#if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
106
#define _CRTDBG_MAP_ALLOC
107
#endif
108
#if defined(MAGICKWAND_WINDOWS_SUPPORT)
109
# include <io.h>
110
#if !defined(__CYGWIN__)
111
# include <direct.h>
112
#endif
113
# if !defined(MAGICKCORE_HAVE_STRERROR)
114
# define HAVE_STRERROR
115
# endif
116
#endif
117
118
#include <ctype.h>
119
#include <locale.h>
120
#include <errno.h>
121
#include <fcntl.h>
122
#include <math.h>
123
#include <time.h>
124
#include <limits.h>
125
#include <signal.h>
126
#include <assert.h>
127
128
#if defined(MAGICKCORE_HAVE_XLOCALE_H)
129
# include <xlocale.h>
130
#endif
131
#if defined(MAGICKCORE_THREAD_SUPPORT)
132
# include <pthread.h>
133
#endif
134
#if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
135
# include <sys/syslimits.h>
136
#endif
137
#if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
138
# include <arm/limits.h>
139
#endif
140
141
#if defined(MAGICKCORE_HAVE_CL_CL_H) && !defined(MAGICK_PIXEL_RGBA)
142
# include <CL/cl.h>
143
# define MAGICKCORE_OPENCL_SUPPORT 1
144
#endif
145
#if defined(MAGICKCORE_HAVE_OPENCL_CL_H) && !defined(MAGICK_PIXEL_RGBA)
146
# include <OpenCL/cl.h>
147
# define MAGICKCORE_OPENCL_SUPPORT 1
148
#endif
149
150
#if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
151
# include <omp.h>
152
# define MAGICKCORE_OPENMP_SUPPORT 1
153
#endif
154
155
#if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
156
ssize_t pread(
int
,
void
*,
size_t
,off_t);
157
#endif
158
159
#if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
160
ssize_t pwrite(
int
,
const
void
*,
size_t
,off_t);
161
#endif
162
163
#if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
164
extern
size_t
strlcpy(
char
*,
const
char
*,
size_t
);
165
#endif
166
167
#if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
168
extern
int
vsnprintf(
char
*,
size_t
,
const
char
*,va_list);
169
#endif
170
171
#if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
172
# include <sys/types.h>
173
# include <sys/stat.h>
174
# if defined(MAGICKWAND_POSIX_SUPPORT)
175
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
176
# define dirent direct
177
# define NAMLEN(dirent) (dirent)->d_namlen
178
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
179
# include <sys/ndir.h>
180
# endif
181
# if defined(MAGICKCORE_HAVE_SYS_DIR_H)
182
# include <sys/dir.h>
183
# endif
184
# if defined(MAGICKCORE_HAVE_NDIR_H)
185
# include <ndir.h>
186
# endif
187
# else
188
# include <dirent.h>
189
# define NAMLEN(dirent) strlen((dirent)->d_name)
190
# endif
191
# include <sys/wait.h>
192
# include <pwd.h>
193
# endif
194
# if !defined(S_ISDIR)
195
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
196
# endif
197
# if !defined(S_ISREG)
198
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
199
# endif
200
# include "wand/MagickWand.h"
201
# if !defined(MAGICKWAND_WINDOWS_SUPPORT)
202
# include <sys/time.h>
203
# if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
204
# include <sys/times.h>
205
# endif
206
# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
207
# include <sys/resource.h>
208
# endif
209
# if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
210
# include <sys/mman.h>
211
# endif
212
# if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
213
# include <sys/sendfile.h>
214
# endif
215
#endif
216
#else
217
# include <types.h>
218
# include <stat.h>
219
# if defined(macintosh)
220
# if !defined(DISABLE_SIOUX)
221
# include <SIOUX.h>
222
# include <console.h>
223
# endif
224
# include <unix.h>
225
# endif
226
#endif
227
228
#if defined(S_IRUSR) && defined(S_IWUSR)
229
# define S_MODE (S_IRUSR | S_IWUSR)
230
#elif defined (MAGICKWAND_WINDOWS_SUPPORT)
231
# define S_MODE (_S_IREAD | _S_IWRITE)
232
#else
233
# define S_MODE 0600
234
#endif
235
236
#if defined(MAGICKWAND_WINDOWS_SUPPORT)
237
# include "magick/nt-base.h"
238
#endif
239
#if defined(macintosh)
240
# include "magick/mac.h"
241
#endif
242
#if defined(vms)
243
# include "magick/vms.h"
244
#endif
245
246
#include "wand/MagickWand.h"
247
248
#undef HAVE_CONFIG_H
249
#undef gamma
250
#undef index
251
#undef pipe
252
#undef y1
253
254
/*
255
Review these platform specific definitions.
256
*/
257
#if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
258
# define DirectorySeparator "/"
259
# define DirectoryListSeparator ':'
260
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
261
# define Exit exit
262
# define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
263
# define X11_PREFERENCES_PATH "~/."
264
# define ProcessPendingEvents(text)
265
# define ReadCommandlLine(argc,argv)
266
# define SetNotifyHandlers
267
#else
268
# if defined(vms)
269
# define X11_APPLICATION_PATH "decw$system_defaults:"
270
# define DirectorySeparator ""
271
# define DirectoryListSeparator ';'
272
# define EditorOptions ""
273
# define Exit exit
274
# define IsBasenameSeparator(c) \
275
(((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
276
# define MAGICKCORE_LIBRARY_PATH "sys$login:"
277
# define MAGICKCORE_SHARE_PATH "sys$login:"
278
# define X11_PREFERENCES_PATH "decw$user_defaults:"
279
# define ProcessPendingEvents(text)
280
# define ReadCommandlLine(argc,argv)
281
# define SetNotifyHandlers
282
# endif
283
# if defined(__OS2__)
284
# define DirectorySeparator "\\"
285
# define DirectoryListSeparator ';'
286
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
287
# define Exit exit
288
# define IsBasenameSeparator(c) \
289
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
290
# define PreferencesDefaults "~\."
291
# define ProcessPendingEvents(text)
292
# define ReadCommandlLine(argc,argv)
293
# define SetNotifyHandlers
294
#endif
295
# if defined(macintosh)
296
# define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/"
297
# define DirectorySeparator ":"
298
# define DirectoryListSeparator ';'
299
# define EditorOptions ""
300
# define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse)
301
# define MAGICKCORE_LIBRARY_PATH ""
302
# define MAGICKCORE_SHARE_PATH ""
303
# define X11_PREFERENCES_PATH "~/."
304
# if defined(DISABLE_SIOUX)
305
# define ReadCommandlLine(argc,argv)
306
# define SetNotifyHandlers \
307
SetFatalErrorHandler(MacFatalErrorHandler); \
308
SetErrorHandler(MACErrorHandler); \
309
SetWarningHandler(MACWarningHandler)
310
# else
311
# define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion);
312
# define SetNotifyHandlers \
313
SetErrorHandler(MACErrorHandler); \
314
SetWarningHandler(MACWarningHandler)
315
# endif
316
# endif
317
# if defined(MAGICKWAND_WINDOWS_SUPPORT)
318
# define DirectorySeparator "\\"
319
# define DirectoryListSeparator ';'
320
# define EditorOptions ""
321
# define IsBasenameSeparator(c) \
322
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
323
# define ProcessPendingEvents(text)
324
# if !defined(X11_PREFERENCES_PATH)
325
# define X11_PREFERENCES_PATH "~\\."
326
# endif
327
# define ReadCommandlLine(argc,argv)
328
# define SetNotifyHandlers \
329
SetErrorHandler(NTErrorHandler); \
330
SetWarningHandler(NTWarningHandler)
331
# if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
332
# define HAVE_TIFFCONF_H
333
# endif
334
# endif
335
336
#endif
337
338
/*
339
Define system symbols if not already defined.
340
*/
341
#if !defined(STDIN_FILENO)
342
#define STDIN_FILENO 0x00
343
#endif
344
345
#if !defined(O_BINARY)
346
#define O_BINARY 0x00
347
#endif
348
349
#if !defined(PATH_MAX)
350
#define PATH_MAX 4096
351
#endif
352
353
/*
354
Magick defines.
355
*/
356
#define MAGICK_SSIZE_MAX (SSIZE_MAX)
357
#define MAGICK_SSIZE_MIN (-(SSIZE_MAX)-1)
358
#if defined(_MSC_VER)
359
# define DisableMSCWarning(nr) __pragma(warning(push)) \
360
__pragma(warning(disable:nr))
361
# define RestoreMSCWarning __pragma(warning(pop))
362
#else
363
# define DisableMSCWarning(nr)
364
# define RestoreMSCWarning
365
#endif
366
367
#if defined(__cplusplus) || defined(c_plusplus)
368
}
369
#endif
370
371
#endif
wand
studio.h
Generated by
1.8.5