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(__cplusplus) || defined(c_plusplus)
58 #if defined(__cplusplus) || defined(c_plusplus)
59 # define storage_class c_class
61 # define storage_class class
66 #if defined(MAGICKCORE_HAVE_SYS_STAT_H)
67 # include <sys/stat.h>
69 #if defined(MAGICKCORE_STDC_HEADERS)
73 # if defined(MAGICKCORE_HAVE_STDLIB_H)
77 #if !defined(magick_restrict)
78 # if !defined(_magickcore_restrict)
79 # define magick_restrict restrict
81 # define magick_restrict _magickcore_restrict
84 #if defined(MAGICKCORE_HAVE_STRING_H)
85 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
90 #if defined(MAGICKCORE_HAVE_STRINGS_H)
93 #if defined(MAGICKCORE_HAVE_INTTYPES_H)
94 # include <inttypes.h>
96 #if defined(MAGICKCORE_HAVE_STDINT_H)
99 #if defined(MAGICKCORE_HAVE_UNISTD_H)
102 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
103 #define _CRTDBG_MAP_ALLOC
106 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
107 #define _CRTDBG_MAP_ALLOC
109 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
111 # if !defined(MAGICKCORE_HAVE_STRERROR)
112 # define HAVE_STRERROR
126 #if defined(MAGICKCORE_HAVE_XLOCALE_H)
127 # include <xlocale.h>
129 #if defined(MAGICKCORE_THREAD_SUPPORT)
130 # include <pthread.h>
132 #if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
133 # include <sys/syslimits.h>
135 #if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
136 # include <arm/limits.h>
139 #if defined(MAGICKCORE__OPENCL)
140 #if defined(MAGICKCORE_HAVE_CL_CL_H)
143 #if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
144 # include <OpenCL/cl.h>
146 # define MAGICKCORE_OPENCL_SUPPORT 1
149 #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
151 # define MAGICKCORE_OPENMP_SUPPORT 1
154 #if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
155 ssize_t pread(
int,
void *,
size_t,off_t);
158 #if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
159 ssize_t pwrite(
int,
const void *,
size_t,off_t);
162 #if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
163 extern size_t strlcpy(
char *,
const char *,
size_t);
166 #if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
167 extern int vsnprintf(
char *,
size_t,
const char *,va_list);
170 #if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
171 # include <sys/types.h>
172 # include <sys/stat.h>
173 # if defined(MAGICKCORE_HAVE_FTIME)
174 # include <sys/timeb.h>
176 # if defined(MAGICKWAND_POSIX_SUPPORT)
177 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
178 # define dirent direct
179 # define NAMLEN(dirent) (dirent)->d_namlen
180 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
181 # include <sys/ndir.h>
183 # if defined(MAGICKCORE_HAVE_SYS_DIR_H)
184 # include <sys/dir.h>
186 # if defined(MAGICKCORE_HAVE_NDIR_H)
191 # define NAMLEN(dirent) strlen((dirent)->d_name)
193 # include <sys/wait.h>
196 # if !defined(S_ISDIR)
197 # define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
199 # if !defined(S_ISREG)
200 # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
203 # if !defined(MAGICKWAND_WINDOWS_SUPPORT)
204 # include <sys/time.h>
205 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
206 # include <sys/times.h>
208 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
209 # include <sys/resource.h>
211 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
212 # include <sys/mman.h>
214 # if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
215 # include <sys/sendfile.h>
221 # if defined(macintosh)
222 # if !defined(DISABLE_SIOUX)
224 # include <console.h>
230 #if defined(S_IRUSR) && defined(S_IWUSR)
231 # define S_MODE (S_IRUSR | S_IWUSR)
232 #elif defined (MAGICKWAND_WINDOWS_SUPPORT)
233 # define S_MODE (_S_IREAD | _S_IWRITE)
238 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
239 # include "magick/nt-base.h"
241 #if defined(macintosh)
242 # include "magick/mac.h"
245 # include "magick/vms.h"
259 #if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
260 # define DirectorySeparator "/"
261 # define DirectoryListSeparator ':'
262 # define EditorOptions " -title \"Edit Image Comment\" -e vi"
264 # define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse)
265 # define X11_PREFERENCES_PATH "~/."
266 # define ProcessPendingEvents(text)
267 # define ReadCommandlLine(argc,argv)
268 # define SetNotifyHandlers
271 # define X11_APPLICATION_PATH "decw$system_defaults:"
272 # define DirectorySeparator ""
273 # define DirectoryListSeparator ';'
274 # define EditorOptions ""
276 # define IsBasenameSeparator(c) \
277 (((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse)
278 # define MAGICKCORE_LIBRARY_PATH "sys$login:"
279 # define MAGICKCORE_SHARE_PATH "sys$login:"
280 # define X11_PREFERENCES_PATH "decw$user_defaults:"
281 # define ProcessPendingEvents(text)
282 # define ReadCommandlLine(argc,argv)
283 # define SetNotifyHandlers
285 # if defined(__OS2__)
286 # define DirectorySeparator "\\"
287 # define DirectoryListSeparator ';'
288 # define EditorOptions " -title \"Edit Image Comment\" -e vi"
290 # define IsBasenameSeparator(c) \
291 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
292 # define PreferencesDefaults "~\."
293 # define ProcessPendingEvents(text)
294 # define ReadCommandlLine(argc,argv)
295 # define SetNotifyHandlers
297 # if defined(macintosh)
298 # define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/"
299 # define DirectorySeparator ":"
300 # define DirectoryListSeparator ';'
301 # define EditorOptions ""
302 # define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse)
303 # define MAGICKCORE_LIBRARY_PATH ""
304 # define MAGICKCORE_SHARE_PATH ""
305 # define X11_PREFERENCES_PATH "~/."
306 # if defined(DISABLE_SIOUX)
307 # define ReadCommandlLine(argc,argv)
308 # define SetNotifyHandlers \
309 SetFatalErrorHandler(MacFatalErrorHandler); \
310 SetErrorHandler(MACErrorHandler); \
311 SetWarningHandler(MACWarningHandler)
313 # define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion);
314 # define SetNotifyHandlers \
315 SetErrorHandler(MACErrorHandler); \
316 SetWarningHandler(MACWarningHandler)
319 # if defined(MAGICKWAND_WINDOWS_SUPPORT)
320 # define DirectorySeparator "\\"
321 # define DirectoryListSeparator ';'
322 # define EditorOptions ""
323 # define IsBasenameSeparator(c) \
324 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
325 # define ProcessPendingEvents(text)
326 # if !defined(X11_PREFERENCES_PATH)
327 # define X11_PREFERENCES_PATH "~\\."
329 # define ReadCommandlLine(argc,argv)
330 # define SetNotifyHandlers \
331 SetErrorHandler(NTErrorHandler); \
332 SetWarningHandler(NTWarningHandler)
333 # if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
334 # define HAVE_TIFFCONF_H
343 #if !defined(STDIN_FILENO)
344 #define STDIN_FILENO 0x00
347 #if !defined(O_BINARY)
348 #define O_BINARY 0x00
351 #if !defined(PATH_MAX)
352 #define PATH_MAX 4096
358 #if defined(_MSC_VER)
359 # define DisableMSCWarning(nr) __pragma(warning(push)) \
360 __pragma(warning(disable:nr))
361 # define RestoreMSCWarning __pragma(warning(pop))
363 # define DisableMSCWarning(nr)
364 # define RestoreMSCWarning
367 #if defined(__cplusplus) || defined(c_plusplus)