33 #define GET_STR_ALLOC 10
34 #define GET_DISABLED 11
38 #define GET_FLAGSET 15
39 #define GET_PASSWORD 16
41 #define GET_ASK_ADDR 128
42 #define GET_TYPE_MASK 127
51 enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
94 typedef my_bool (*my_get_one_option)(int,
const struct my_option *,
char *);
101 typedef void *(*my_getopt_value)(
const char *, uint,
const struct my_option *,
105 extern char *disabled_my_option;
106 extern my_bool my_getopt_print_errors;
107 extern my_bool my_getopt_skip_unknown;
108 extern my_error_reporter my_getopt_error_reporter;
110 extern int handle_options (
int *argc,
char ***argv,
111 const struct my_option *longopts, my_get_one_option);
112 extern int my_handle_options (
int *argc,
char ***argv,
115 const char **command_list);
116 extern void my_cleanup_options(
const struct my_option *options);
117 extern void my_cleanup_options(
const struct my_option *options);
118 extern void my_print_help(
const struct my_option *options);
119 extern void my_print_variables(
const struct my_option *options);
120 extern void my_getopt_register_get_addr(my_getopt_value);
122 ulonglong getopt_ull_limit_value(ulonglong num,
const struct my_option *optp,
124 longlong getopt_ll_limit_value(longlong,
const struct my_option *,
126 double getopt_double_limit_value(
double num,
const struct my_option *optp,
128 my_bool getopt_compare_strings(
const char *s,
const char *t, uint length);
129 ulonglong max_of_int_range(
int var_type);
131 ulonglong getopt_double2ulonglong(
double);
132 double getopt_ulonglong2double(ulonglong);