(void) CLIThrowException(cli_wand,GetMagickModule(),severity,tag, \
"'%s' '%s'",option, arg)
+#define CLIWandWarnReplaced(message) \
+ if ( (cli_wand->process_flags & ProcessWarnDepreciated) != 0 ) \
+ (void) CLIThrowException(cli_wand,GetMagickModule(),OptionWarning, \
+ "ReplacedOption", "'%s', use \"%s\"",option,message)
+
#define CLIWandExceptionFile(severity,tag,context) \
{ char *message=GetExceptionMessage(errno); \
(void) CLIThrowException(cli_wand,GetMagickModule(),severity,tag, \
{ CLIWandExceptionArg(severity,tag,option,arg); return; }
+
/* Define how options should be processed */
typedef enum
{
- /* NonOption Handling */
- ProcessNonOptionImageRead = 0x0001, /* A non-option is a image read
+ /* General Option Handling */
+ ProcessImplictRead = 0x0001, /* Non-options are image reads.
If not set then skip implied read
without producing an error.
For use with "mogrify" handling */
+ ProcessInterpretProperities = 0x0010, /* allow general escapes in args */
/* Special Option Handling */
ProcessExitOption = 0x0100, /* allow '-exit' use */
ProcessScriptOption = 0x0200, /* allow '-script' use */
ProcessReadOption = 0x0400, /* allow '-read' use */
+ ProcessWarnDepreciated = 0x0800, /* warn about depreciated options */
/* Option Processing Flags */
ProcessOneOptionOnly = 0x4000, /* Process one option only */
- ProcessImpliedWrite = 0x8000, /* Last arg is an implied write */
+ ProcessImplictWrite = 0x8000, /* Last arg is an implict write */
/* Flag Groups for specific Situations */
- MagickCommandOptionFlags = 0x8F0F, /* Magick Command Flags */
+ MagickCommandOptionFlags = 0x8FFF, /* Magick Command Flags */
ConvertCommandOptionFlags = 0x800F, /* Convert Command Flags */
MagickScriptArgsFlags = 0x000F, /* Script CLI Process Args Flags */
} ProcessOptionFlags;
DrawInfo
*draw_info; /* for CLI API usage, not used by MagickWand API */
+ ProcessOptionFlags
+ process_flags; /* When handling CLI, what options do we process? */
+
+ const OptionInfo
+ *command; /* The option entry that is being processed */
+
Stack
*image_list_stack, /* Stacks of Image Lists and Image Info settings */
*image_info_stack;
- ProcessOptionFlags
- process_flags; /* when handling CLI, what options do we process? */
-
const char /* Location of option being processed for exception */
*location, /* location format string for exception reports */
- *filename; /* "CLI", "unknown", or script filename */
+ *filename; /* "CLI", "unknown", or the script filename */
size_t
line, /* location of current option from source */