summaryrefslogtreecommitdiff
path: root/include/my_getopt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/my_getopt.h')
-rw-r--r--include/my_getopt.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index dcd6ad9d79b..fd523e08d7f 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -29,12 +29,16 @@ C_MODE_START
#define GET_STR 9
#define GET_STR_ALLOC 10
#define GET_DISABLED 11
+#define GET_ENUM 12
+#define GET_SET 13
#define GET_ASK_ADDR 128
#define GET_TYPE_MASK 127
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
+struct st_typelib;
+
struct my_option
{
const char *name; /* Name of the option */
@@ -42,7 +46,7 @@ struct my_option
const char *comment; /* option comment, for autom. --help */
gptr *value; /* The variable value */
gptr *u_max_value; /* The user def. max variable value */
- const char **str_values; /* Pointer to possible values */
+ struct st_typelib *typelib; /* Pointer to possible values */
ulong var_type;
enum get_opt_arg_type arg_type;
longlong def_value; /* Default value */
@@ -50,7 +54,7 @@ struct my_option
longlong max_value; /* Max allowed value */
longlong sub_size; /* Subtract this from given value */
long block_size; /* Value should be a mult. of this */
- int app_type; /* To be used by an application */
+ long app_type; /* To be used by an application */
};
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
@@ -58,6 +62,7 @@ typedef void (* my_error_reporter) (enum loglevel level, const char *format, ...
extern char *disabled_my_option;
extern my_bool my_getopt_print_errors;
+extern my_bool my_getopt_skip_unknown;
extern my_error_reporter my_getopt_error_reporter;
extern int handle_options (int *argc, char ***argv,