47
47
const char *name; /* Name of the option */
48
48
int id; /* unique id or short option */
49
49
const char *comment; /* option comment, for autom. --help */
50
uchar **value; /* The variable value */
51
uchar **u_max_value; /* The user def. max variable value */
50
char **value; /* The variable value */
51
char **u_max_value; /* The user def. max variable value */
52
52
struct st_typelib *typelib; /* Pointer to possible values */
54
54
enum get_opt_arg_type arg_type;
55
longlong def_value; /* Default value */
56
longlong min_value; /* Min allowed value */
57
longlong max_value; /* Max allowed value */
58
longlong sub_size; /* Subtract this from given value */
55
int64_t def_value; /* Default value */
56
int64_t min_value; /* Min allowed value */
57
int64_t max_value; /* Max allowed value */
58
int64_t sub_size; /* Subtract this from given value */
59
59
long block_size; /* Value should be a mult. of this */
60
60
void *app_type; /* To be used by an application */
63
typedef my_bool (* my_get_one_option) (int, const struct my_option *, char * );
63
typedef bool (* my_get_one_option) (int, const struct my_option *, char * );
64
64
typedef void (* my_error_reporter) (enum loglevel level, const char *format, ... );
66
66
extern char *disabled_my_option;
67
extern my_bool my_getopt_print_errors;
68
extern my_bool my_getopt_skip_unknown;
67
extern bool my_getopt_print_errors;
68
extern bool my_getopt_skip_unknown;
69
69
extern my_error_reporter my_getopt_error_reporter;
71
71
extern int handle_options (int *argc, char ***argv,
73
73
extern void my_cleanup_options(const struct my_option *options);
74
74
extern void my_print_help(const struct my_option *options);
75
75
extern void my_print_variables(const struct my_option *options);
76
extern void my_getopt_register_get_addr(uchar ** (*func_addr)(const char *, uint,
77
const struct my_option *));
76
extern void my_getopt_register_get_addr(char ** (*func_addr)(const char *, uint,
77
const struct my_option *));
79
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
81
longlong getopt_ll_limit_value(longlong, const struct my_option *,
83
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
79
uint64_t getopt_ull_limit_value(uint64_t num, const struct my_option *optp,
81
int64_t getopt_ll_limit_value(int64_t, const struct my_option *,
83
bool getopt_compare_strings(const char *s, const char *t, uint length);