studio.h

Go to the documentation of this file.
00001 /*
00002   Copyright 1999-2020 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 #include <stdarg.h>
00055 #include <stdio.h>
00056 #if defined(MAGICKCORE_HAVE_SYS_STAT_H)
00057 # include <sys/stat.h>
00058 #endif
00059 #if defined(MAGICKCORE_STDC_HEADERS)
00060 # include <stdlib.h>
00061 # include <stddef.h>
00062 #else
00063 # if defined(MAGICKCORE_HAVE_STDLIB_H)
00064 #  include <stdlib.h>
00065 # endif
00066 #endif
00067 #if !defined(magick_restrict)
00068 # if !defined(_magickcore_restrict)
00069 #  define magick_restrict restrict
00070 # else
00071 #  define magick_restrict _magickcore_restrict
00072 # endif
00073 #endif
00074 #if defined(MAGICKCORE_HAVE_STRING_H)
00075 # if !defined(STDC_HEADERS) && defined(MAGICKCORE_HAVE_MEMORY_H)
00076 #  include <memory.h>
00077 # endif
00078 # include <string.h>
00079 #endif
00080 #if defined(MAGICKCORE_HAVE_STRINGS_H)
00081 # include <strings.h>
00082 #endif
00083 #if defined(MAGICKCORE_HAVE_INTTYPES_H)
00084 # include <inttypes.h>
00085 #endif
00086 #if defined(MAGICKCORE_HAVE_STDINT_H)
00087 # include <stdint.h>
00088 #endif
00089 #if defined(MAGICKCORE_HAVE_UNISTD_H)
00090 # include <unistd.h>
00091 #endif
00092 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
00093 #define _CRTDBG_MAP_ALLOC
00094 #endif
00095 
00096 #if defined(MAGICKWAND_WINDOWS_SUPPORT) && defined(_DEBUG)
00097 #define _CRTDBG_MAP_ALLOC
00098 #endif
00099 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
00100 # include <io.h>
00101 #if !defined(__CYGWIN__)
00102 # include <direct.h>
00103 #endif
00104 # if !defined(MAGICKCORE_HAVE_STRERROR)
00105 #  define HAVE_STRERROR
00106 # endif
00107 #endif
00108 
00109 #include <ctype.h>
00110 #include <locale.h>
00111 #include <errno.h>
00112 #include <fcntl.h>
00113 #include <math.h>
00114 #include <time.h>
00115 #include <limits.h>
00116 #include <signal.h>
00117 #include <assert.h>
00118 
00119 #if defined(MAGICKCORE_HAVE_XLOCALE_H)
00120 # include <xlocale.h>
00121 #endif
00122 #if defined(MAGICKCORE_THREAD_SUPPORT)
00123 # include <pthread.h>
00124 #endif
00125 #if defined(MAGICKCORE_HAVE_SYS_SYSLIMITS_H)
00126 # include <sys/syslimits.h>
00127 #endif
00128 #if defined(MAGICKCORE_HAVE_ARM_LIMITS_H)
00129 # include <arm/limits.h>
00130 #endif
00131 
00132 #if defined(MAGICKCORE__OPENCL)
00133 #if defined(MAGICKCORE_HAVE_CL_CL_H)
00134 #  include <CL/cl.h>
00135 #endif
00136 #if defined(MAGICKCORE_HAVE_OPENCL_CL_H)
00137 #  include <OpenCL/cl.h>
00138 #endif
00139 #  define MAGICKCORE_OPENCL_SUPPORT  1
00140 #endif
00141 
00142 #if defined(_OPENMP) && ((_OPENMP >= 200203) || defined(__OPENCC__))
00143 #  include <omp.h>
00144 #  define MAGICKCORE_OPENMP_SUPPORT  1
00145 #endif
00146 
00147 #if defined(MAGICKCORE_HAVE_PREAD) && defined(MAGICKCORE_HAVE_DECL_PREAD) && !MAGICKCORE_HAVE_DECL_PREAD
00148 ssize_t pread(int,void *,size_t,off_t);
00149 #endif
00150 
00151 #if defined(MAGICKCORE_HAVE_PWRITE) && defined(MAGICKCORE_HAVE_DECL_PWRITE) && !MAGICKCORE_HAVE_DECL_PWRITE
00152 ssize_t pwrite(int,const void *,size_t,off_t);
00153 #endif
00154 
00155 #if defined(MAGICKCORE_HAVE_STRLCPY) && defined(MAGICKCORE_HAVE_DECL_STRLCPY) && !MAGICKCORE_HAVE_DECL_STRLCPY
00156 extern size_t strlcpy(char *,const char *,size_t);
00157 #endif
00158 
00159 #if defined(MAGICKCORE_HAVE_VSNPRINTF) && defined(MAGICKCORE_HAVE_DECL_VSNPRINTF) && !MAGICKCORE_HAVE_DECL_VSNPRINTF
00160 extern int vsnprintf(char *,size_t,const char *,va_list);
00161 #endif
00162 
00163 #include "MagickWand/method-attribute.h"
00164 
00165 #if defined(MAGICKWAND_WINDOWS_SUPPORT) || defined(MAGICKWAND_POSIX_SUPPORT)
00166 # include <sys/types.h>
00167 # include <sys/stat.h>
00168 # if defined(MAGICKCORE_HAVE_SYS_TIMEB_H)
00169 # include <sys/timeb.h>
00170 # endif
00171 # if defined(MAGICKWAND_POSIX_SUPPORT)
00172 #  if defined(MAGICKCORE_HAVE_SYS_NDIR_H) || defined(MAGICKCORE_HAVE_SYS_DIR_H) || defined(MAGICKCORE_HAVE_NDIR_H)
00173 #   define dirent direct
00174 #   define NAMLEN(dirent) (dirent)->d_namlen
00175 #   if defined(MAGICKCORE_HAVE_SYS_NDIR_H)
00176 #    include <sys/ndir.h>
00177 #   endif
00178 #   if defined(MAGICKCORE_HAVE_SYS_DIR_H)
00179 #    include <sys/dir.h>
00180 #   endif
00181 #   if defined(MAGICKCORE_HAVE_NDIR_H)
00182 #    include <ndir.h>
00183 #   endif
00184 #  else
00185 #   include <dirent.h>
00186 #   define NAMLEN(dirent) strlen((dirent)->d_name)
00187 #  endif
00188 #  include <sys/wait.h>
00189 #  include <pwd.h>
00190 # endif
00191 # if !defined(S_ISDIR)
00192 #  define S_ISDIR(mode) (((mode) & S_IFMT) == S_IFDIR)
00193 # endif
00194 # if !defined(S_ISREG)
00195 #  define S_ISREG(mode) (((mode) & S_IFMT) == S_IFREG)
00196 # endif
00197 # include "MagickWand/MagickWand.h"
00198 # if !defined(MAGICKWAND_WINDOWS_SUPPORT)
00199 #  include <sys/time.h>
00200 # if defined(MAGICKCORE_HAVE_SYS_TIMES_H)
00201 #  include <sys/times.h>
00202 # endif
00203 # if defined(MAGICKCORE_HAVE_SYS_RESOURCE_H)
00204 #  include <sys/resource.h>
00205 # endif
00206 # if defined(MAGICKCORE_HAVE_SYS_MMAN_H)
00207 #  include <sys/mman.h>
00208 # endif
00209 # if defined(MAGICKCORE_HAVE_SYS_SENDFILE_H)
00210 #  include <sys/sendfile.h>
00211 # endif
00212 #endif
00213 #else
00214 # include <types.h>
00215 # include <stat.h>
00216 # if defined(macintosh)
00217 #  if !defined(DISABLE_SIOUX)
00218 #   include <SIOUX.h>
00219 #   include <console.h>
00220 #  endif
00221 #  include <unix.h>
00222 # endif
00223 #endif
00224 
00225 #if defined(S_IRUSR) && defined(S_IWUSR)
00226 # define S_MODE (S_IRUSR | S_IWUSR)
00227 #elif defined (MAGICKWAND_WINDOWS_SUPPORT)
00228 # define S_MODE (_S_IREAD | _S_IWRITE)
00229 #else
00230 # define S_MODE  0600
00231 #endif
00232 
00233 #if defined(MAGICKWAND_WINDOWS_SUPPORT)
00234 # include "MagickCore/nt-base.h"
00235 #endif
00236 
00237 #undef HAVE_CONFIG_H
00238 #undef gamma
00239 #undef index
00240 #undef pipe
00241 #undef y1
00242 
00243 /*
00244   Review these platform specific definitions.
00245 */
00246 #if defined(MAGICKWAND_POSIX_SUPPORT) && !defined(__OS2__)
00247 # define DirectorySeparator  "/"
00248 # define DirectoryListSeparator  ':'
00249 # define EditorOptions  " -title \"Edit Image Comment\" -e vi"
00250 # define Exit  exit
00251 # define IsBasenameSeparator(c)  ((c) == '/' ? MagickTrue : MagickFalse)
00252 # define X11_PREFERENCES_PATH  "~/."
00253 # define ProcessPendingEvents(text)
00254 # define ReadCommandlLine(argc,argv)
00255 # define SetNotifyHandlers
00256 #else
00257 # if defined(__OS2__)
00258 #   define DirectorySeparator  "\\"
00259 #   define DirectoryListSeparator  ';'
00260 # define EditorOptions  " -title \"Edit Image Comment\" -e vi"
00261 # define Exit  exit
00262 #  define IsBasenameSeparator(c) \
00263   (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
00264 # define PreferencesDefaults  "~\."
00265 # define ProcessPendingEvents(text)
00266 # define ReadCommandlLine(argc,argv)
00267 # define SetNotifyHandlers
00268 #endif
00269 # if defined(MAGICKWAND_WINDOWS_SUPPORT)
00270 #  define DirectorySeparator  "\\"
00271 #  define DirectoryListSeparator  ';'
00272 #  define EditorOptions ""
00273 #  define IsBasenameSeparator(c) \
00274   (((c) == '/') || ((c) == '\\') ? MagickTrue : MagickFalse)
00275 #  define ProcessPendingEvents(text)
00276 #  if !defined(X11_PREFERENCES_PATH)
00277 #    define X11_PREFERENCES_PATH  "~\\."
00278 #  endif
00279 #  define ReadCommandlLine(argc,argv)
00280 #  define SetNotifyHandlers \
00281     SetErrorHandler(NTErrorHandler); \
00282     SetWarningHandler(NTWarningHandler)
00283 #  if !defined(MAGICKCORE_HAVE_TIFFCONF_H)
00284 #    define HAVE_TIFFCONF_H
00285 #  endif
00286 # endif
00287 
00288 #endif
00289 
00290 /*
00291   Define system symbols if not already defined.
00292 */
00293 #if !defined(STDIN_FILENO)
00294 #define STDIN_FILENO  0x00
00295 #endif
00296 
00297 #if !defined(O_BINARY)
00298 #define O_BINARY  0x00
00299 #endif
00300 
00301 #if !defined(PATH_MAX)
00302 #define PATH_MAX  4096
00303 #endif
00304 
00305 /*
00306   Magick defines.
00307 */
00308 #if defined(_MSC_VER)
00309 # define DisableMSCWarning(nr) __pragma(warning(push)) \
00310   __pragma(warning(disable:nr))
00311 # define RestoreMSCWarning __pragma(warning(pop))
00312 #else
00313 # define DisableMSCWarning(nr)
00314 # define RestoreMSCWarning
00315 #endif
00316 
00317 #if defined(__cplusplus) || defined(c_plusplus)
00318 }
00319 #endif
00320 
00321 #endif

Generated on 31 Dec 2019 for MagickWand by  doxygen 1.6.1