studio.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2019 ImageMagick Studio LLC, a non-profit organization
00003   dedicated to making software imaging solutions freely available.
00004   
00005   You may not use this file except in compliance with the License.  You may
00006   obtain a copy of the License at
00007   
00008     https://imagemagick.org/script/license.php
00009   
00010   Unless required by applicable law or agreed to in writing, software
00011   distributed under the License is distributed on an "AS IS" BASIS,
00012   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013   See the License for the specific language governing permissions and
00014   limitations under the License.
00015 
00016   MagickWand private application programming interface declarations.
00017 */
00018 #ifndef MAGICKWAND_STUDIO_H
00019 #define MAGICKWAND_STUDIO_H
00020 
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024 
00025 #if defined(WIN32) || defined(WIN64)
00026 #  define MAGICKWAND_WINDOWS_SUPPORT
00027 #else
00028 #  define MAGICKWAND_POSIX_SUPPORT
00029 #endif 
00030 
00031 #define MAGICKWAND_IMPLEMENTATION  1
00032 
00033 #if !defined(MAGICKWAND_CONFIG_H)
00034 # define MAGICKWAND_CONFIG_H
00035 # include "MagickCore/magick-config.h"
00036 #if defined(MAGICKCORE__FILE_OFFSET_BITS) && !defined(_FILE_OFFSET_BITS)
00037 # define _FILE_OFFSET_BITS MAGICKCORE__FILE_OFFSET_BITS
00038 #endif
00039 #if defined(_magickcore_const) && !defined(const)
00040 # define const _magickcore_const
00041 #endif
00042 #if defined(_magickcore_inline) && !defined(inline)
00043 # define inline _magickcore_inline
00044 #endif
00045 # if defined(__cplusplus) || defined(c_plusplus)
00046 #  undef inline
00047 # endif
00048 #endif
00049 
00050 #if !defined(const)
00051 #  define STDC
00052 #endif
00053 
00054 #if defined(__cplusplus) || defined(c_plusplus)
00055 # define storage_class  c_class
00056 #else
00057 # define storage_class  class
00058 #endif
00059 
00060 #include <stdarg.h>
00061 #include <stdio.h>
00062 #if defined(MAGICKCORE_HAVE_SYS_STAT_H)
00063 # include <sys/stat.h>
00064 #endif
00065 #if defined(MAGICKCORE_STDC_HEADERS)
00066 # include <stdlib.h>
00067 # include <stddef.h>
00068 #else
00069 # if defined(MAGICKCORE_HAVE_STDLIB_H)
00070 #  include <stdlib.h>
00071 # endif
00072 #endif
00073 #if !defined(magick_restrict)
00074 # if !defined(_magickcore_restrict)
00075 #  define magick_restrict restrict
00076 # else
00077 #  define magick_restrict _magickcore_restrict
00078 # endif
00079 #endif
00080 #if defined(MAGICKCORE_HAVE_STRING_H)
00081 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
00082 #  include <memory.h>
00083 # endif
00084 # include <string.h>
00085 #endif
00086 #if defined(MAGICKCORE_HAVE_STRINGS_H)
00087 # include <strings.h>
00088 #endif
00089 #if defined(MAGICKCORE_HAVE_INTTYPES_H)
00090 # include <inttypes.h>
00091 #endif
00092 #if defined(MAGICKCORE_HAVE_STDINT_H)
00093 # include <stdint.h>
00094 #endif
00095 #if defined(MAGICKCORE_HAVE_UNISTD_H)
00096 # include <unistd.h>
00097 #endif
00098 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
00099 #define _CRTDBG_MAP_ALLOC
00100 #endif
00101 
00102 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
00103 #define _CRTDBG_MAP_ALLOC
00104 #endif
00105 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
00106 # include <io.h>
00107 #if !defined(__CYGWIN__)
00108 # include <direct.h>
00109 #endif
00110 # if !defined(MAGICKCORE_HAVE_STRERROR)
00111 #  define HAVE_STRERROR
00112 # endif
00113 #endif
00114 
00115 #include <ctype.h>
00116 #include <locale.h>
00117 #include <errno.h>
00118 #include <fcntl.h>
00119 #include <math.h>
00120 #include <time.h>
00121 #include <limits.h>
00122 #include <signal.h>
00123 #include <assert.h>
00124 
00125 #if defined(MAGICKCORE_HAVE_XLOCALE_H)
00126 # include <xlocale.h>
00127 #endif
00128 #if defined(MAGICKCORE_THREAD_SUPPORT)
00129 # include <pthread.h>
00130 #endif
00131 #if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
00132 # include <sys/syslimits.h>
00133 #endif
00134 #if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
00135 # include <arm/limits.h>
00136 #endif
00137 
00138 #if defined(MAGICKCORE__OPENCL)
00139 #if defined(MAGICKCORE_HAVE_CL_CL_H)
00140 #  include <CL/cl.h>
00141 #endif
00142 #if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
00143 #  include <OpenCL/cl.h>
00144 #endif
00145 #  define MAGICKCORE_OPENCL_SUPPORT  1
00146 #endif
00147 
00148 #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
00149 #  include <omp.h>
00150 #  define MAGICKCORE_OPENMP_SUPPORT  1
00151 #endif
00152 
00153 #if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
00154 ssize_t pread(int,void *,size_t,off_t);
00155 #endif
00156 
00157 #if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
00158 ssize_t pwrite(int,const void *,size_t,off_t);
00159 #endif
00160 
00161 #if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
00162 extern size_t strlcpy(char *,const char *,size_t);
00163 #endif
00164 
00165 #if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
00166 extern int vsnprintf(char *,size_t,const char *,va_list);
00167 #endif
00168 
00169 #include "MagickWand/method-attribute.h"
00170 
00171 #if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
00172 # include <sys/types.h>
00173 # include <sys/stat.h>
00174 # if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
00175 # include <sys/timeb.h>
00176 # endif
00177 # if defined(MAGICKWAND_POSIX_SUPPORT)
00178 #  if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
00179 #   define dirent direct
00180 #   define NAMLEN(dirent) (dirent)->d_namlen
00181 #   if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
00182 #    include <sys/ndir.h>
00183 #   endif
00184 #   if defined(MAGICKCORE_HAVE_SYS_DIR_H)
00185 #    include <sys/dir.h>
00186 #   endif
00187 #   if defined(MAGICKCORE_HAVE_NDIR_H)
00188 #    include <ndir.h>
00189 #   endif
00190 #  else
00191 #   include <dirent.h>
00192 #   define NAMLEN(dirent) strlen((dirent)->d_name)
00193 #  endif
00194 #  include <sys/wait.h>
00195 #  include <pwd.h>
00196 # endif
00197 # if !defined(S_ISDIR)
00198 #  define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
00199 # endif
00200 # if !defined(S_ISREG)
00201 #  define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
00202 # endif
00203 # include "MagickWand/MagickWand.h"
00204 # if !defined(MAGICKWAND_WINDOWS_SUPPORT)
00205 #  include <sys/time.h>
00206 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
00207 #  include <sys/times.h>
00208 # endif
00209 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
00210 #  include <sys/resource.h>
00211 # endif
00212 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
00213 #  include <sys/mman.h>
00214 # endif
00215 # if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
00216 #  include <sys/sendfile.h>
00217 # endif
00218 #endif
00219 #else
00220 # include <types.h>
00221 # include <stat.h>
00222 # if defined(macintosh)
00223 #  if !defined(DISABLE_SIOUX)
00224 #   include <SIOUX.h>
00225 #   include <console.h>
00226 #  endif
00227 #  include <unix.h>
00228 # endif
00229 #endif
00230 
00231 #if defined(S_IRUSR) && defined(S_IWUSR)
00232 # define S_MODE (S_IRUSR | S_IWUSR)
00233 #elif defined (MAGICKWAND_WINDOWS_SUPPORT)
00234 # define S_MODE (_S_IREAD | _S_IWRITE)
00235 #else
00236 # define S_MODE  0600
00237 #endif
00238 
00239 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
00240 # include "MagickCore/nt-base.h"
00241 #endif
00242 
00243 #undef HAVE_CONFIG_H
00244 #undef gamma
00245 #undef index
00246 #undef pipe
00247 #undef y1
00248 
00249 /*
00250   Review these platform specific definitions.
00251 */
00252 #if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
00253 # define DirectorySeparator  "/"
00254 # define DirectoryListSeparator  ':'
00255 # define EditorOptions  " -title \"Edit Image Comment\" -e vi"
00256 # define Exit  exit
00257 # define IsBasenameSeparator(c)  ((c) == '/' ? MagickTrue : MagickFalse)
00258 # define X11_PREFERENCES_PATH  "~/."
00259 # define ProcessPendingEvents(text)
00260 # define ReadCommandlLine(argc,argv)
00261 # define SetNotifyHandlers
00262 #else
00263 # if defined(__OS2__)
00264 #   define DirectorySeparator  "\\"
00265 #   define DirectoryListSeparator  ';'
00266 # define EditorOptions  " -title \"Edit Image Comment\" -e vi"
00267 # define Exit  exit
00268 #  define IsBasenameSeparator(c) \
00269   (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
00270 # define PreferencesDefaults  "~\."
00271 # define ProcessPendingEvents(text)
00272 # define ReadCommandlLine(argc,argv)
00273 # define SetNotifyHandlers
00274 #endif
00275 # if defined(MAGICKWAND_WINDOWS_SUPPORT)
00276 #  define DirectorySeparator  "\\"
00277 #  define DirectoryListSeparator  ';'
00278 #  define EditorOptions ""
00279 #  define IsBasenameSeparator(c) \
00280   (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
00281 #  define ProcessPendingEvents(text)
00282 #  if !defined(X11_PREFERENCES_PATH)
00283 #    define X11_PREFERENCES_PATH  "~\\."
00284 #  endif
00285 #  define ReadCommandlLine(argc,argv)
00286 #  define SetNotifyHandlers \
00287     SetErrorHandler(NTErrorHandler); \
00288     SetWarningHandler(NTWarningHandler)
00289 #  if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
00290 #    define HAVE_TIFFCONF_H
00291 #  endif
00292 # endif
00293 
00294 #endif
00295 
00296 /*
00297   Define system symbols if not already defined.
00298 */
00299 #if !defined(STDIN_FILENO)
00300 #define STDIN_FILENO  0x00
00301 #endif
00302 
00303 #if !defined(O_BINARY)
00304 #define O_BINARY  0x00
00305 #endif
00306 
00307 #if !defined(PATH_MAX)
00308 #define PATH_MAX  4096
00309 #endif
00310 
00311 /*
00312   Magick defines.
00313 */
00314 #if defined(_MSC_VER)
00315 # define DisableMSCWarning(nr) __pragma(warning(push)) \
00316   __pragma(warning(disable:nr))
00317 # define RestoreMSCWarning __pragma(warning(pop))
00318 #else
00319 # define DisableMSCWarning(nr)
00320 # define RestoreMSCWarning
00321 #endif
00322 
00323 #if defined(__cplusplus) || defined(c_plusplus)
00324 }
00325 #endif
00326 
00327 #endif

Generated on 22 Jul 2019 for MagickWand by  doxygen 1.6.1