Go to the documentation of this file.
18 #ifndef _MAGICKWAND_STUDIO_H
19 #define _MAGICKWAND_STUDIO_H
21 #if defined(__cplusplus) || defined(c_plusplus)
25 #if defined(WIN32) || defined(WIN64)
26 # define MAGICKWAND_WINDOWS_SUPPORT
28 # define MAGICKWAND_POSIX_SUPPORT
31 #define MAGICKWAND_IMPLEMENTATION 1
33 #if !defined(_MAGICKWAND_CONFIG_H)
34 # define _MAGICKWAND_CONFIG_H
35 # if !defined(vms) && !defined(macintosh)
36 # include "magick/magick-config.h"
38 # include "magick-config.h"
40 #if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
41 # define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
43 #if defined(_magickcore_const) && !defined(const)
44 # define const _magickcore_const
46 #if defined(_magickcore_inline) && !defined(inline)
47 # define inline _magickcore_inline
49 #if defined(_magickcore_restrict) && !defined(restrict)
50 # define restrict _magickcore_restrict
52 # if defined(__cplusplus) || defined(c_plusplus)
61 #if defined(__cplusplus) || defined(c_plusplus)
62 # define storage_class c_class
64 # define storage_class class
69 #if defined(MAGICKCORE_HAVE_SYS_STAT_H)
70 # include <sys/stat.h>
72 #if defined(MAGICKCORE_STDC_HEADERS)
76 # if defined(MAGICKCORE_HAVE_STDLIB_H)
80 #if defined(MAGICKCORE_HAVE_STRING_H)
81 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
86 #if defined(MAGICKCORE_HAVE_STRINGS_H)
89 #if defined(MAGICKCORE_HAVE_INTTYPES_H)
90 # include <inttypes.h>
92 #if defined(MAGICKCORE_HAVE_STDINT_H)
95 #if defined(MAGICKCORE_HAVE_UNISTD_H)
98 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
99 #define _CRTDBG_MAP_ALLOC
102 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
103 #define _CRTDBG_MAP_ALLOC
105 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
107 # if !defined(MAGICKCORE_HAVE_STRERROR)
108 # define HAVE_STRERROR
122 #if defined(MAGICKCORE_HAVE_XLOCALE_H)
123 # include <xlocale.h>
125 #if defined(MAGICKCORE_THREAD_SUPPORT)
126 # include <pthread.h>
127 #elif defined(MAGICKWAND_WINDOWS_SUPPORT)
128 # define MAGICKCORE_HAVE_WINTHREADS 1
131 #if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
132 # include <sys/syslimits.h>
134 #if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
135 # include <arm/limits.h>
138 #if defined(MAGICKCORE__OPENCL)
139 #if defined(MAGICKCORE_HAVE_CL_CL_H)
142 #if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
143 # include <OpenCL/cl.h>
145 # define MAGICKCORE_OPENCL_SUPPORT 1
148 #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
150 # define MAGICKCORE_OPENMP_SUPPORT 1
153 #if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
154 ssize_t pread(
int,
void *,
size_t,off_t);
157 #if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
158 ssize_t pwrite(
int,
const void *,
size_t,off_t);
161 #if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
162 extern size_t strlcpy(
char *,
const char *,
size_t);
165 #if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
166 extern int vsnprintf(
char *,
size_t,
const char *,va_list);
169 #if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
170 # include <sys/types.h>
171 # include <sys/stat.h>
172 # if defined(MAGICKCORE_HAVE_FTIME)
173 # include <sys/timeb.h>
175 # if defined(MAGICKWAND_POSIX_SUPPORT)
176 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
177 # define dirent direct
178 # define NAMLEN(dirent) (dirent)->d_namlen
179 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
180 # include <sys/ndir.h>
182 # if defined(MAGICKCORE_HAVE_SYS_DIR_H)
183 # include <sys/dir.h>
185 # if defined(MAGICKCORE_HAVE_NDIR_H)
190 # define NAMLEN(dirent) strlen((dirent)->d_name)
192 # include <sys/wait.h>
195 # if !defined(S_ISDIR)
196 # define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
198 # if !defined(S_ISREG)
199 # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
202 # if !defined(MAGICKWAND_WINDOWS_SUPPORT)
203 # include <sys/time.h>
204 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
205 # include <sys/times.h>
207 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
208 # include <sys/resource.h>
210 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
211 # include <sys/mman.h>
217 # if defined(macintosh)
218 # if !defined(DISABLE_SIOUX)
220 # include <console.h>
226 #if defined(S_IRUSR) && defined(S_IWUSR)
227 # define S_MODE (S_IRUSR | S_IWUSR)
228 #elif defined (MAGICKWAND_WINDOWS_SUPPORT)
229 # define S_MODE (_S_IREAD | _S_IWRITE)
234 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
235 # include "magick/nt-base.h"
237 #if defined(macintosh)
238 # include "magick/mac.h"
241 # include "magick/vms.h"
255 #if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
256 # define DirectorySeparator "/"
257 # define DirectoryListSeparator ':'
258 # define EditorOptions " -title \"Edit Image Comment\" -e vi"
260 # define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
261 # define X11_PREFERENCES_PATH "~/."
262 # define ProcessPendingEvents(text)
263 # define ReadCommandlLine(argc,argv)
264 # define SetNotifyHandlers
267 # define X11_APPLICATION_PATH "decw$system_defaults:"
268 # define DirectorySeparator ""
269 # define DirectoryListSeparator ';'
270 # define EditorOptions ""
272 # define IsBasenameSeparator(c) \
273 (((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
274 # define MAGICKCORE_LIBRARY_PATH "sys$login:"
275 # define MAGICKCORE_SHARE_PATH "sys$login:"
276 # define X11_PREFERENCES_PATH "decw$user_defaults:"
277 # define ProcessPendingEvents(text)
278 # define ReadCommandlLine(argc,argv)
279 # define SetNotifyHandlers
281 # if defined(__OS2__)
282 # define DirectorySeparator "\\"
283 # define DirectoryListSeparator ';'
284 # define EditorOptions " -title \"Edit Image Comment\" -e vi"
286 # define IsBasenameSeparator(c) \
287 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
288 # define PreferencesDefaults "~\."
289 # define ProcessPendingEvents(text)
290 # define ReadCommandlLine(argc,argv)
291 # define SetNotifyHandlers
293 # if defined(macintosh)
294 # define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/"
295 # define DirectorySeparator ":"
296 # define DirectoryListSeparator ';'
297 # define EditorOptions ""
298 # define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse)
299 # define MAGICKCORE_LIBRARY_PATH ""
300 # define MAGICKCORE_SHARE_PATH ""
301 # define X11_PREFERENCES_PATH "~/."
302 # if defined(DISABLE_SIOUX)
303 # define ReadCommandlLine(argc,argv)
304 # define SetNotifyHandlers \
305 SetFatalErrorHandler(MacFatalErrorHandler); \
306 SetErrorHandler(MACErrorHandler); \
307 SetWarningHandler(MACWarningHandler)
309 # define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion);
310 # define SetNotifyHandlers \
311 SetErrorHandler(MACErrorHandler); \
312 SetWarningHandler(MACWarningHandler)
315 # if defined(MAGICKWAND_WINDOWS_SUPPORT)
316 # define DirectorySeparator "\\"
317 # define DirectoryListSeparator ';'
318 # define EditorOptions ""
319 # define IsBasenameSeparator(c) \
320 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
321 # define ProcessPendingEvents(text)
322 # if !defined(X11_PREFERENCES_PATH)
323 # define X11_PREFERENCES_PATH "~\\."
325 # define ReadCommandlLine(argc,argv)
326 # define SetNotifyHandlers \
327 SetErrorHandler(NTErrorHandler); \
328 SetWarningHandler(NTWarningHandler)
330 # define sleep(seconds) Sleep(seconds*1000)
331 # if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
332 # define HAVE_TIFFCONF_H
341 #if !defined(STDIN_FILENO)
342 #define STDIN_FILENO 0x00
345 #if !defined(O_BINARY)
346 #define O_BINARY 0x00
349 #if !defined(PATH_MAX)
350 #define PATH_MAX 4096
356 #if defined(_MSC_VER)
357 # define DisableMSCWarning(nr) __pragma(warning(push)) \
358 __pragma(warning(disable:nr))
359 # define RestoreMSCWarning __pragma(warning(pop))
361 # define DisableMSCWarning(nr)
362 # define RestoreMSCWarning
365 #if defined(__cplusplus) || defined(c_plusplus)