MagickWand
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/license/
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(WIN32) || defined(WIN64) || defined(_WIN32_WINNT)
22
# define MAGICKWAND_WINDOWS_SUPPORT
23
#else
24
# define MAGICKWAND_POSIX_SUPPORT
25
#endif
26
27
#define MAGICKWAND_IMPLEMENTATION 1
28
29
#if !defined(MAGICKWAND_CONFIG_H)
30
# define MAGICKWAND_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(const)
56
# define STDC
57
#endif
58
59
/* Define to 1 if assertions should be disabled. */
60
#if defined(MAGICKCORE_NDEBUG)
61
#define NDEBUG 1
62
#endif
63
64
#include <stdarg.h>
65
#include <stdio.h>
66
#if defined(MAGICKCORE_HAVE_SYS_STAT_H)
67
# include <sys/stat.h>
68
#endif
69
#if defined(MAGICKCORE_STDC_HEADERS)
70
# include <stdlib.h>
71
# include <stddef.h>
72
#else
73
# if defined(MAGICKCORE_HAVE_STDLIB_H)
74
# include <stdlib.h>
75
# endif
76
#endif
77
#if !defined(magick_restrict)
78
# if !defined(_magickcore_restrict)
79
# define magick_restrict restrict
80
# else
81
# define magick_restrict _magickcore_restrict
82
# endif
83
#endif
84
#if defined(MAGICKCORE_HAVE_STRING_H)
85
# if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
86
# include <memory.h>
87
# endif
88
# include <string.h>
89
#endif
90
#if defined(MAGICKCORE_HAVE_STRINGS_H)
91
# include <strings.h>
92
#endif
93
#if defined(MAGICKCORE_HAVE_INTTYPES_H)
94
# include <inttypes.h>
95
#endif
96
#if defined(MAGICKCORE_HAVE_STDINT_H)
97
# include <stdint.h>
98
#endif
99
#if defined(MAGICKCORE_HAVE_UNISTD_H)
100
# include <unistd.h>
101
#endif
102
#if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
103
#define _CRTDBG_MAP_ALLOC
104
#endif
105
#if defined(MAGICKWAND_WINDOWS_SUPPORT)
106
# include <io.h>
107
#if !defined(__CYGWIN__)
108
# include <direct.h>
109
#endif
110
# if !defined(MAGICKCORE_HAVE_STRERROR)
111
# define HAVE_STRERROR
112
# endif
113
#endif
114
115
#include <ctype.h>
116
#include <locale.h>
117
#include <errno.h>
118
#include <fcntl.h>
119
#include <math.h>
120
#include <time.h>
121
#include <limits.h>
122
#include <signal.h>
123
#include <assert.h>
124
125
#if defined(MAGICKCORE_HAVE_XLOCALE_H)
126
# include <xlocale.h>
127
#endif
128
#if defined(MAGICKCORE_THREAD_SUPPORT)
129
# include <pthread.h>
130
#endif
131
#if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
132
# include <sys/syslimits.h>
133
#endif
134
#if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
135
# include <arm/limits.h>
136
#endif
137
138
#if defined(MAGICKCORE_HAVE_CL_CL_H)
139
# define MAGICKCORE_OPENCL_SUPPORT 1
140
#endif
141
#if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
142
# define MAGICKCORE_OPENCL_SUPPORT 1
143
#endif
144
145
#if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
146
ssize_t pread(
int
,
void
*,
size_t
,off_t);
147
#endif
148
149
#if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
150
ssize_t pwrite(
int
,
const
void
*,
size_t
,off_t);
151
#endif
152
153
#if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
154
extern
size_t
strlcpy(
char
*,
const
char
*,
size_t
);
155
#endif
156
157
#if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
158
extern
int
vsnprintf(
char
*,
size_t
,
const
char
*,va_list);
159
#endif
160
161
#include "MagickWand/method-attribute.h"
162
163
#if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
164
# include <sys/types.h>
165
# include <sys/stat.h>
166
# if defined(MAGICKWAND_POSIX_SUPPORT)
167
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
168
# define dirent direct
169
# define NAMLEN(dirent) (dirent)->d_namlen
170
# if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
171
# include <sys/ndir.h>
172
# endif
173
# if defined(MAGICKCORE_HAVE_SYS_DIR_H)
174
# include <sys/dir.h>
175
# endif
176
# if defined(MAGICKCORE_HAVE_NDIR_H)
177
# include <ndir.h>
178
# endif
179
# else
180
# include <dirent.h>
181
# define NAMLEN(dirent) strlen((dirent)->d_name)
182
# endif
183
# include <sys/wait.h>
184
# include <pwd.h>
185
# endif
186
# if !defined(S_ISDIR)
187
# define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
188
# endif
189
# if !defined(S_ISREG)
190
# define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
191
# endif
192
# include "MagickWand/MagickWand.h"
193
# if !defined(MAGICKWAND_WINDOWS_SUPPORT)
194
# include <sys/time.h>
195
# if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
196
# include <sys/times.h>
197
# endif
198
# if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
199
# include <sys/resource.h>
200
# endif
201
# if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
202
# include <sys/mman.h>
203
# endif
204
# if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
205
# include <sys/sendfile.h>
206
# endif
207
#endif
208
#else
209
# include <types.h>
210
# include <stat.h>
211
#endif
212
213
#if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(__MINGW32__)
214
# define P_MODE (_S_IREAD | _S_IWRITE)
215
# define S_MODE (_S_IREAD | _S_IWRITE)
216
#elif defined(MAGICKWAND_POSIX_SUPPORT)
217
# define P_MODE (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)
218
# define S_MODE (S_IRUSR | S_IWUSR)
219
#else
220
# define P_MODE 0666
221
# define S_MODE 0600
222
#endif
223
224
#if defined(MAGICKWAND_WINDOWS_SUPPORT)
225
# include "MagickCore/nt-base.h"
226
#endif
227
228
#undef HAVE_CONFIG_H
229
#undef gamma
230
#undef index
231
#undef pipe
232
#undef y1
233
234
/*
235
Review these platform specific definitions.
236
*/
237
#if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
238
# define DirectorySeparator "/"
239
# define DirectoryListSeparator ':'
240
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
241
# define Exit exit
242
# define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
243
# define X11_PREFERENCES_PATH "~/."
244
# define ProcessPendingEvents(text)
245
# define ReadCommandlLine(argc,argv)
246
# define SetNotifyHandlers
247
#else
248
# if defined(__OS2__)
249
# define DirectorySeparator "\\"
250
# define DirectoryListSeparator ';'
251
# define EditorOptions " -title \"Edit Image Comment\" -e vi"
252
# define Exit exit
253
# define IsBasenameSeparator(c) \
254
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
255
# define PreferencesDefaults "~\."
256
# define ProcessPendingEvents(text)
257
# define ReadCommandlLine(argc,argv)
258
# define SetNotifyHandlers
259
#endif
260
# if defined(MAGICKWAND_WINDOWS_SUPPORT)
261
# define DirectorySeparator "\\"
262
# define DirectoryListSeparator ';'
263
# define EditorOptions ""
264
# define IsBasenameSeparator(c) \
265
(((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
266
# define ProcessPendingEvents(text)
267
# if !defined(X11_PREFERENCES_PATH)
268
# define X11_PREFERENCES_PATH "~\\."
269
# endif
270
# define ReadCommandlLine(argc,argv)
271
# define SetNotifyHandlers \
272
SetErrorHandler(NTErrorHandler); \
273
SetWarningHandler(NTWarningHandler)
274
# endif
275
276
#endif
277
278
/*
279
Define system symbols if not already defined.
280
*/
281
#if !defined(STDIN_FILENO)
282
#define STDIN_FILENO 0x00
283
#endif
284
285
#if !defined(O_BINARY)
286
#define O_BINARY 0x00
287
#endif
288
289
#if !defined(PATH_MAX)
290
#define PATH_MAX 4096
291
#endif
292
293
/*
294
Magick defines.
295
*/
296
#if defined(_MSC_VER)
297
# define DisableMSCWarning(nr) __pragma(warning(push)) \
298
__pragma(warning(disable:nr))
299
# define RestoreMSCWarning __pragma(warning(pop))
300
#else
301
# define DisableMSCWarning(nr)
302
# define RestoreMSCWarning
303
#endif
304
305
#if defined(__cplusplus) || defined(c_plusplus)
306
}
307
#endif
308
309
#endif
ImageMagick-7
MagickWand
studio.h
Generated by
1.14.0