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 __cplusplus > 199711L 46 #if defined(_magickcore_const) && !defined(const) 47 # define const _magickcore_const 49 #if defined(_magickcore_inline) && !defined(inline) 50 # define inline _magickcore_inline 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(magick_restrict) 81 # if !defined(_magickcore_restrict) 82 # define magick_restrict restrict 84 # define magick_restrict _magickcore_restrict 87 #if defined(MAGICKCORE_HAVE_STRING_H) 88 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H) 93 #if defined(MAGICKCORE_HAVE_STRINGS_H) 96 #if defined(MAGICKCORE_HAVE_INTTYPES_H) 97 # include <inttypes.h> 99 #if defined(MAGICKCORE_HAVE_STDINT_H) 102 #if defined(MAGICKCORE_HAVE_UNISTD_H) 105 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG) 106 #define _CRTDBG_MAP_ALLOC 109 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG) 110 #define _CRTDBG_MAP_ALLOC 112 #if defined(MAGICKWAND_WINDOWS_SUPPORT) 114 # if !defined(MAGICKCORE_HAVE_STRERROR) 115 # define HAVE_STRERROR 129 #if defined(MAGICKCORE_HAVE_XLOCALE_H) 130 # include <xlocale.h> 132 #if defined(MAGICKCORE_THREAD_SUPPORT) 133 # include <pthread.h> 135 #if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H) 136 # include <sys/syslimits.h> 138 #if defined(MAGICKCORE_HAVE_ARM_LIMITS_H) 139 # include <arm/limits.h> 142 #if defined(MAGICKCORE__OPENCL) && !defined(MAGICK_PIXEL_RGBA) 143 #if defined(MAGICKCORE_HAVE_CL_CL_H) 146 #if defined(MAGICKCORE_HAVE_OPENCL_CL_H) 147 # include <OpenCL/cl.h> 149 # define MAGICKCORE_OPENCL_SUPPORT 1 152 #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__)) 154 # define MAGICKCORE_OPENMP_SUPPORT 1 157 #if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD 158 ssize_t pread(
int,
void *,
size_t,off_t);
161 #if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE 162 ssize_t pwrite(
int,
const void *,
size_t,off_t);
165 #if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY 166 extern size_t strlcpy(
char *,
const char *,
size_t);
169 #if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF 170 extern int vsnprintf(
char *,
size_t,
const char *,va_list);
173 #if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT) 174 # include <sys/types.h> 175 # include <sys/stat.h> 176 # if defined(MAGICKCORE_HAVE_SYS_TIMEB_H) 177 # include <sys/timeb.h> 179 # if defined(MAGICKWAND_POSIX_SUPPORT) 180 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H) 181 # define dirent direct 182 # define NAMLEN(dirent) (dirent)->d_namlen 183 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) 184 # include <sys/ndir.h> 186 # if defined(MAGICKCORE_HAVE_SYS_DIR_H) 187 # include <sys/dir.h> 189 # if defined(MAGICKCORE_HAVE_NDIR_H) 194 # define NAMLEN(dirent) strlen((dirent)->d_name) 196 # include <sys/wait.h> 199 # if !defined(S_ISDIR) 200 # define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) 202 # if !defined(S_ISREG) 203 # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) 206 # if !defined(MAGICKWAND_WINDOWS_SUPPORT) 207 # include <sys/time.h> 208 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H) 209 # include <sys/times.h> 211 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H) 212 # include <sys/resource.h> 214 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H) 215 # include <sys/mman.h> 217 # if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H) 218 # include <sys/sendfile.h> 224 # if defined(macintosh) 225 # if !defined(DISABLE_SIOUX) 227 # include <console.h> 233 #if defined(S_IRUSR) && defined(S_IWUSR) 234 # define S_MODE (S_IRUSR | S_IWUSR) 235 #elif defined (MAGICKWAND_WINDOWS_SUPPORT) 236 # define S_MODE (_S_IREAD | _S_IWRITE) 241 #if defined(MAGICKWAND_WINDOWS_SUPPORT) 242 # include "magick/nt-base.h" 244 #if defined(macintosh) 245 # include "magick/mac.h" 248 # include "magick/vms.h" 262 #if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__) 263 # define DirectorySeparator "/" 264 # define DirectoryListSeparator ':' 265 # define EditorOptions " -title \"Edit Image Comment\" -e vi" 267 # define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse) 268 # define X11_PREFERENCES_PATH "~/." 269 # define ProcessPendingEvents(text) 270 # define ReadCommandlLine(argc,argv) 271 # define SetNotifyHandlers 274 # define X11_APPLICATION_PATH "decw$system_defaults:" 275 # define DirectorySeparator "" 276 # define DirectoryListSeparator ';' 277 # define EditorOptions "" 279 # define IsBasenameSeparator(c) \ 280 (((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse) 281 # define MAGICKCORE_LIBRARY_PATH "sys$login:" 282 # define MAGICKCORE_SHARE_PATH "sys$login:" 283 # define X11_PREFERENCES_PATH "decw$user_defaults:" 284 # define ProcessPendingEvents(text) 285 # define ReadCommandlLine(argc,argv) 286 # define SetNotifyHandlers 288 # if defined(__OS2__) 289 # define DirectorySeparator "\\" 290 # define DirectoryListSeparator ';' 291 # define EditorOptions " -title \"Edit Image Comment\" -e vi" 293 # define IsBasenameSeparator(c) \ 294 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) 295 # define PreferencesDefaults "~\." 296 # define ProcessPendingEvents(text) 297 # define ReadCommandlLine(argc,argv) 298 # define SetNotifyHandlers 300 # if defined(macintosh) 301 # define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/" 302 # define DirectorySeparator ":" 303 # define DirectoryListSeparator ';' 304 # define EditorOptions "" 305 # define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse) 306 # define MAGICKCORE_LIBRARY_PATH "" 307 # define MAGICKCORE_SHARE_PATH "" 308 # define X11_PREFERENCES_PATH "~/." 309 # if defined(DISABLE_SIOUX) 310 # define ReadCommandlLine(argc,argv) 311 # define SetNotifyHandlers \ 312 SetFatalErrorHandler(MacFatalErrorHandler); \ 313 SetErrorHandler(MACErrorHandler); \ 314 SetWarningHandler(MACWarningHandler) 316 # define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion); 317 # define SetNotifyHandlers \ 318 SetErrorHandler(MACErrorHandler); \ 319 SetWarningHandler(MACWarningHandler) 322 # if defined(MAGICKWAND_WINDOWS_SUPPORT) 323 # define DirectorySeparator "\\" 324 # define DirectoryListSeparator ';' 325 # define EditorOptions "" 326 # define IsBasenameSeparator(c) \ 327 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) 328 # define ProcessPendingEvents(text) 329 # if !defined(X11_PREFERENCES_PATH) 330 # define X11_PREFERENCES_PATH "~\\." 332 # define ReadCommandlLine(argc,argv) 333 # define SetNotifyHandlers \ 334 SetErrorHandler(NTErrorHandler); \ 335 SetWarningHandler(NTWarningHandler) 336 # if !defined(MAGICKCORE_HAVE_TIFFCONF_H) 337 # define HAVE_TIFFCONF_H 346 #if !defined(STDIN_FILENO) 347 #define STDIN_FILENO 0x00 350 #if !defined(O_BINARY) 351 #define O_BINARY 0x00 354 #if !defined(PATH_MAX) 355 #define PATH_MAX 4096 361 #if defined(_MSC_VER) 362 # define DisableMSCWarning(nr) __pragma(warning(push)) \ 363 __pragma(warning(disable:nr)) 364 # define RestoreMSCWarning __pragma(warning(pop)) 366 # define DisableMSCWarning(nr) 367 # define RestoreMSCWarning 370 #if defined(__cplusplus) || defined(c_plusplus)