00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef MAGICKWAND_WANDCLI_PRIVATE_H
00019 #define MAGICKWAND_WANDCLI_PRIVATE_H
00020
00021 #if defined(__cplusplus) || defined(c_plusplus)
00022 extern "C" {
00023 #endif
00024
00025 #define CLIWandException(severity,tag,option) \
00026 (void) CLIThrowException(cli_wand,GetMagickModule(),severity,tag, \
00027 "`%s'",option)
00028
00029 #define CLIWandExceptionArg(severity,tag,option,arg) \
00030 (void) CLIThrowException(cli_wand,GetMagickModule(),severity,tag, \
00031 "'%s' '%s'",option, arg)
00032
00033 #define CLIWandWarnReplaced(message) \
00034 if ( (cli_wand->process_flags & ProcessWarnDeprecated) != 0 ) \
00035 (void) CLIThrowException(cli_wand,GetMagickModule(),OptionWarning, \
00036 "ReplacedOption", "'%s', use \"%s\"",option,message)
00037
00038 #define CLIWandExceptionFile(severity,tag,context) \
00039 { char *message=GetExceptionMessage(errno); \
00040 (void) CLIThrowException(cli_wand,GetMagickModule(),severity,tag, \
00041 "'%s': %s",context,message); \
00042 message=DestroyString(message); \
00043 }
00044
00045 #define CLIWandExceptionBreak(severity,tag,option) \
00046 { CLIWandException(severity,tag,option); break; }
00047
00048 #define CLIWandExceptionReturn(severity,tag,option) \
00049 { CLIWandException(severity,tag,option); return; }
00050
00051 #define CLIWandExceptArgBreak(severity,tag,option,arg) \
00052 { CLIWandExceptionArg(severity,tag,option,arg); break; }
00053
00054 #define CLIWandExceptArgReturn(severity,tag,option,arg) \
00055 { CLIWandExceptionArg(severity,tag,option,arg); return; }
00056
00057
00058
00059
00060 typedef enum
00061 {
00062
00063 ProcessImplictRead = 0x0001,
00064
00065
00066
00067 ProcessInterpretProperities = 0x0010,
00068
00069
00070 ProcessExitOption = 0x0100,
00071 ProcessScriptOption = 0x0200,
00072 ProcessReadOption = 0x0400,
00073 ProcessWarnDeprecated = 0x0800,
00074
00075
00076 ProcessOneOptionOnly = 0x4000,
00077 ProcessImplictWrite = 0x8000,
00078
00079
00080 MagickCommandOptionFlags = 0x8FFF,
00081 ConvertCommandOptionFlags = 0x800F,
00082 MagickScriptArgsFlags = 0x000F,
00083 } ProcessOptionFlags;
00084
00085
00086
00087
00088
00089
00090 typedef struct _Stack
00091 {
00092 struct _Stack *next;
00093 void *data;
00094 } Stack;
00095
00096
00097
00098
00099
00100
00101 struct _MagickCLI
00102 {
00103 struct _MagickWand
00104 wand;
00105
00106 QuantizeInfo
00107 *quantize_info;
00108
00109 DrawInfo
00110 *draw_info;
00111
00112 ProcessOptionFlags
00113 process_flags;
00114
00115 const OptionInfo
00116 *command;
00117
00118 Stack
00119 *image_list_stack,
00120 *image_info_stack;
00121
00122 const char
00123 *location,
00124 *filename;
00125
00126 size_t
00127 line,
00128 column;
00129
00130 size_t
00131 signature;
00132 };
00133
00134
00135
00136 #if defined(__cplusplus) || defined(c_plusplus)
00137 }
00138 #endif
00139
00140 #endif