00001 #ifndef _CMD_UTILS_H 00002 #define _CMD_UTILS_H 00003 00004 typedef struct { 00005 const char *name; 00006 int flags; 00007 #define HAS_ARG 0x0001 00008 #define OPT_BOOL 0x0002 00009 #define OPT_EXPERT 0x0004 00010 #define OPT_STRING 0x0008 00011 #define OPT_VIDEO 0x0010 00012 #define OPT_AUDIO 0x0020 00013 #define OPT_GRAB 0x0040 00014 #define OPT_INT 0x0080 00015 #define OPT_FLOAT 0x0100 00016 #define OPT_SUBTITLE 0x0200 00017 union { 00018 void (*func_arg)(const char *); 00019 int *int_arg; 00020 char **str_arg; 00021 float *float_arg; 00022 } u; 00023 const char *help; 00024 const char *argname; 00025 } OptionDef; 00026 00027 void show_help_options(const OptionDef *options, const char *msg, int mask, int value); 00028 void parse_options(int argc, char **argv, const OptionDef *options); 00029 void parse_arg_file(const char *filename); 00030 void print_error(const char *filename, int err); 00031 00032 #endif /* _CMD_UTILS_H */
1.5.5