Go to the documentation of this file. 18 #ifndef MAGICKCORE_STUDIO_H 19 #define MAGICKCORE_STUDIO_H 21 #if defined(__cplusplus) || defined(c_plusplus) 25 #if defined(WIN32) || defined(WIN64) 26 # define MAGICKCORE_WINDOWS_SUPPORT 28 # define MAGICKCORE_POSIX_SUPPORT 31 #define MAGICKCORE_IMPLEMENTATION 1 33 #if !defined(MAGICKCORE_CONFIG_H) 34 # define MAGICKCORE_CONFIG_H 35 # if !defined(vms) && !defined(macintosh) 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) 54 #if defined(MAGICKCORE_NAMESPACE_PREFIX) 64 #if defined(MAGICKCORE_HAVE_SYS_STAT_H) 65 # include <sys/stat.h> 67 #if defined(MAGICKCORE_STDC_HEADERS) 71 # if defined(MAGICKCORE_HAVE_STDLIB_H) 75 #if !defined(magick_restrict) 76 # if !defined(_magickcore_restrict) 77 # define magick_restrict restrict 79 # define magick_restrict _magickcore_restrict 82 #if defined(MAGICKCORE_HAVE_STRING_H) 83 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H) 88 #if defined(MAGICKCORE_HAVE_STRINGS_H) 91 #if defined(MAGICKCORE_HAVE_INTTYPES_H) 92 # include <inttypes.h> 94 #if defined(MAGICKCORE_HAVE_STDINT_H) 97 #if defined(MAGICKCORE_HAVE_UNISTD_H) 100 #if defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DEBUG) 101 #define _CRTDBG_MAP_ALLOC 103 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 106 # if !defined(MAGICKCORE_HAVE_STRERROR) 107 # define HAVE_STRERROR 121 #if defined(MAGICKCORE_HAVE_XLOCALE_H) 122 # include <xlocale.h> 124 #if defined(MAGICKCORE_THREAD_SUPPORT) 125 # include <pthread.h> 126 #elif defined(MAGICKCORE_WINDOWS_SUPPORT) 127 #include <winsock2.h> 128 #include <ws2tcpip.h> 130 #pragma comment (lib, "ws2_32.lib") 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) && !defined(MAGICK_PIXEL_RGBA) 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);
172 #if defined(MAGICKCORE_WINDOWS_SUPPORT) || defined(MAGICKCORE_POSIX_SUPPORT) 173 # include <sys/types.h> 174 # include <sys/stat.h> 175 # if defined(MAGICKCORE_HAVE_SYS_TIMEB_H) 176 # include <sys/timeb.h> 178 # if defined(MAGICKCORE_POSIX_SUPPORT) 179 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H) 180 # define dirent direct 181 # define NAMLEN(dirent) (dirent)->d_namlen 182 # if defined(MAGICKCORE_HAVE_SYS_NDIR_H) 183 # include <sys/ndir.h> 185 # if defined(MAGICKCORE_HAVE_SYS_DIR_H) 186 # include <sys/dir.h> 188 # if defined(MAGICKCORE_HAVE_NDIR_H) 193 # define NAMLEN(dirent) strlen((dirent)->d_name) 195 # include <sys/wait.h> 198 # if !defined(S_ISDIR) 199 # define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR) 201 # if !defined(S_ISREG) 202 # define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG) 205 # if !defined(MAGICKCORE_WINDOWS_SUPPORT) 206 # include <sys/time.h> 207 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H) 208 # include <sys/times.h> 210 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H) 211 # include <sys/resource.h> 213 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H) 214 # include <sys/mman.h> 216 # if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H) 217 # include <sys/sendfile.h> 223 # if defined(macintosh) 224 # if !defined(DISABLE_SIOUX) 226 # include <console.h> 233 #if defined(S_IRUSR) && defined(S_IWUSR) 234 # define S_MODE (S_IRUSR | S_IWUSR) 235 #elif defined (MAGICKCORE_WINDOWS_SUPPORT) 236 # define S_MODE (_S_IREAD | _S_IWRITE) 241 #if defined(MAGICKCORE_WINDOWS_SUPPORT) 244 #if defined(macintosh) 260 #if ( defined(MAGICKCORE_POSIX_SUPPORT) && !defined(__OS2__) ) && !defined( __VMS ) 261 # define DirectorySeparator "/" 262 # define DirectoryListSeparator ':' 263 # define EditorOptions " -title \"Edit Image Comment\" -e vi" 265 # define IsBasenameSeparator(c) ((c) == '/' ? MagickTrue : MagickFalse) 266 # define X11_PREFERENCES_PATH "~/." 267 # define ProcessPendingEvents(text) 268 # define ReadCommandlLine(argc,argv) 269 # define SetNotifyHandlers 272 # define X11_APPLICATION_PATH "decw$system_defaults:" 273 # define DirectorySeparator "" 274 # define DirectoryListSeparator ';' 275 # define EditorOptions "" 277 # define IsBasenameSeparator(c) \ 278 (((c) == ']') || ((c) == ':') || ((c) == '/') ? MagickTrue : MagickFalse) 279 # define MAGICKCORE_LIBRARY_PATH "sys$login:" 280 # define MAGICKCORE_SHARE_PATH "sys$login:" 281 # define X11_PREFERENCES_PATH "decw$user_defaults:" 282 # define ProcessPendingEvents(text) 283 # define ReadCommandlLine(argc,argv) 284 # define SetNotifyHandlers 286 # if defined(__OS2__) 287 # define DirectorySeparator "\\" 288 # define DirectoryListSeparator ';' 289 # define EditorOptions " -title \"Edit Image Comment\" -e vi" 291 # define IsBasenameSeparator(c) \ 292 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) 293 # define PreferencesDefaults "~\." 294 # define ProcessPendingEvents(text) 295 # define ReadCommandlLine(argc,argv) 296 # define SetNotifyHandlers 298 # if defined(macintosh) 299 # define X11_APPLICATION_PATH "/usr/lib/X11/app-defaults/" 300 # define DirectorySeparator ":" 301 # define DirectoryListSeparator ';' 302 # define EditorOptions "" 303 # define IsBasenameSeparator(c) ((c) == ':' ? MagickTrue : MagickFalse) 304 # define MAGICKCORE_LIBRARY_PATH "" 305 # define MAGICKCORE_SHARE_PATH "" 306 # define X11_PREFERENCES_PATH "~/." 307 # if defined(DISABLE_SIOUX) 308 # define ReadCommandlLine(argc,argv) 309 # define SetNotifyHandlers \ 310 SetFatalErrorHandler(MacFatalErrorHandler); \ 311 SetErrorHandler(MACErrorHandler); \ 312 SetWarningHandler(MACWarningHandler) 314 # define ReadCommandlLine(argc,argv) argc=ccommand(argv); puts(MagickVersion); 315 # define SetNotifyHandlers \ 316 SetErrorHandler(MACErrorHandler); \ 317 SetWarningHandler(MACWarningHandler) 320 # if defined(MAGICKCORE_WINDOWS_SUPPORT) 321 # define DirectorySeparator "\\" 322 # define DirectoryListSeparator ';' 323 # define EditorOptions "" 324 # define IsBasenameSeparator(c) \ 325 (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse) 326 # define ProcessPendingEvents(text) 327 # if !defined(X11_PREFERENCES_PATH) 328 # define X11_PREFERENCES_PATH "~\\." 330 # define ReadCommandlLine(argc,argv) 331 # define SetNotifyHandlers \ 332 SetErrorHandler(NTErrorHandler); \ 333 SetWarningHandler(NTWarningHandler) 334 # if !defined(MAGICKCORE_HAVE_TIFFCONF_H) 335 # define HAVE_TIFFCONF_H 344 #if !defined(STDIN_FILENO) 345 #define STDIN_FILENO 0x00 348 #if !defined(O_BINARY) 349 #define O_BINARY 0x00 352 #if !defined(PATH_MAX) 353 #define PATH_MAX 4096 356 #if defined(MAGICKCORE_LTDL_DELEGATE) || (defined(MAGICKCORE_WINDOWS_SUPPORT) && defined(_DLL) && !defined(_LIB)) 357 # define MAGICKCORE_MODULES_SUPPORT 360 #if defined(_MAGICKMOD_) 361 # undef MAGICKCORE_BUILD_MODULES 362 # define MAGICKCORE_BUILD_MODULES 368 #define Swap(x,y) ((x)^=(y), (y)^=(x), (x)^=(y)) 369 #if defined(_MSC_VER) 370 # define DisableMSCWarning(nr) __pragma(warning(push)) \ 371 __pragma(warning(disable:nr)) 372 # define RestoreMSCWarning __pragma(warning(pop)) 374 # define DisableMSCWarning(nr) 375 # define RestoreMSCWarning 378 #if defined(__cplusplus) || defined(c_plusplus)