diff options
author | unknown <jani@hynda.mysql.fi> | 2002-01-30 05:08:17 +0200 |
---|---|---|
committer | unknown <jani@hynda.mysql.fi> | 2002-01-30 05:08:17 +0200 |
commit | c4f1ced9f16f6e58a469e24a592ee32d6bef05c3 (patch) | |
tree | 4d86999d0c0547ac87829b227add5c4743ace08c /include/my_getopt.h | |
parent | 5b968bb8ee49008e8adfba898472b20b0cf0524f (diff) | |
download | mariadb-git-c4f1ced9f16f6e58a469e24a592ee32d6bef05c3.tar.gz |
New functionality to my_getopt. myisamchk now uses my_getopt
only.
include/my_getopt.h:
Added u_max_value as for user definable maximum value for
a variable in my_getopt.
myisam/myisamchk.c:
myisamchk now uses my_getopt struct for variables also.
Variables can be set with -O var=val, --set-variable=var=val and
--variable=val now.
mysys/getvar.c:
my_set_changeable_var moved to my_getopt.c
mysys/my_getopt.c:
Added special prefix --maximum[-variable-name=...] for user
definable maximum values for variables, among other things.
Diffstat (limited to 'include/my_getopt.h')
-rw-r--r-- | include/my_getopt.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h index fef8aacd75a..8321ad4cd1c 100644 --- a/include/my_getopt.h +++ b/include/my_getopt.h @@ -23,14 +23,15 @@ struct my_optarg }; -enum get_opt_var_type { GET_NO_ARG, GET_INT, GET_LL, GET_STR }; +enum get_opt_var_type { GET_NO_ARG, GET_LONG, GET_LL, GET_STR }; enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG }; struct my_option { const char *name; /* Name of the option */ const char *comment; /* option comment, for autom. --help */ - char *value; /* The variable value */ + gptr *value; /* The variable value */ + gptr *u_max_value; /* The user def. max variable value */ const char **str_values; /* Pointer to possible values */ enum get_opt_var_type var_type; enum get_opt_arg_type arg_type; @@ -41,6 +42,6 @@ struct my_option 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 */ - my_bool changeable_var; /* If true, the option is a variable */ + my_bool opt_is_var; /* If true, the option is a variable */ }; |