18#ifndef MAGICKWAND_MAGICK_WAND_PRIVATE_H
19#define MAGICKWAND_MAGICK_WAND_PRIVATE_H
21#if defined(__cplusplus) || defined(c_plusplus)
25#define MagickWandId "MagickWand"
26#define QuantumTick(i,span) ((MagickBooleanType) ((((i) & ((i)-1)) == 0) || \
27 (((i) & 0xfff) == 0) || \
28 ((MagickOffsetType) (i) == ((MagickOffsetType) (span)-1))))
29#define ThrowWandException(severity,tag,context) \
31 (void) ThrowMagickException(wand->exception,GetMagickModule(),severity, \
32 tag,"`%s'",context); \
33 return(MagickFalse); \
35#define ThrowWandFatalException(severity,tag,context) \
37 ExceptionInfo *fatal_exception = AcquireExceptionInfo(); \
38 char *message = GetExceptionMessage(errno); \
39 (void) ThrowMagickException(fatal_exception,GetMagickModule(),severity,tag, \
40 "`%s'",context == (char *) NULL ? message : context); \
41 message=DestroyString(message); \
42 CatchException(fatal_exception); \
43 (void) DestroyExceptionInfo(fatal_exception); \
44 MagickWandTerminus(); \
45 _exit((int) (severity-FatalErrorException)+1); \
48static inline void CheckMagickCoreCompatibility(
void)
56 quantum=GetMagickQuantumDepth(&depth);
57 if (depth != MAGICKCORE_QUANTUM_DEPTH)
58 ThrowWandFatalException(WandError,
"QuantumDepthMismatch",quantum);
67 name[MagickPathExtent];
87#if defined(__cplusplus) || defined(c_plusplus)