mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: my_getopt, consistency
almost all my_getopt settings and callbacks are global variables, directly assignable to configure my_getopt. Only getopt_get_addr was using a setter function. Get rid of it, make it a global directly assignable variable like all other settings. Also make getopt_compare_strings() static.
This commit is contained in:
@@ -107,13 +107,13 @@ extern my_bool my_getopt_print_errors;
|
||||
extern my_bool my_getopt_skip_unknown;
|
||||
extern my_bool my_getopt_prefix_matching;
|
||||
extern my_error_reporter my_getopt_error_reporter;
|
||||
extern my_getopt_value my_getopt_get_addr;
|
||||
|
||||
extern int handle_options (int *argc, char ***argv,
|
||||
const struct my_option *longopts, my_get_one_option);
|
||||
extern void my_cleanup_options(const struct my_option *options);
|
||||
extern void my_print_help(const struct my_option *options);
|
||||
extern void my_print_variables(const struct my_option *options);
|
||||
extern void my_getopt_register_get_addr(my_getopt_value);
|
||||
|
||||
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
|
||||
my_bool *fix);
|
||||
@@ -121,7 +121,6 @@ longlong getopt_ll_limit_value(longlong, const struct my_option *,
|
||||
my_bool *fix);
|
||||
double getopt_double_limit_value(double num, const struct my_option *optp,
|
||||
my_bool *fix);
|
||||
my_bool getopt_compare_strings(const char *s, const char *t, uint length);
|
||||
|
||||
ulonglong getopt_double2ulonglong(double);
|
||||
double getopt_ulonglong2double(ulonglong);
|
||||
|
Reference in New Issue
Block a user