summaryrefslogtreecommitdiff
path: root/include/my_getopt.h
diff options
context:
space:
mode:
authorunknown <jani@hynda.mysql.fi>2002-04-02 20:29:53 +0300
committerunknown <jani@hynda.mysql.fi>2002-04-02 20:29:53 +0300
commita2e75474b51e41446af02081ba2917f0f296aee2 (patch)
tree1646f32146d233c71f082b8d74b469e6a1c1e70f /include/my_getopt.h
parent90a76d688ab49832f51462dbc906b4c11b4a09fb (diff)
downloadmariadb-git-a2e75474b51e41446af02081ba2917f0f296aee2.tar.gz
Changed mysql, mysqladmin, mysqlshow, mysqldump, mysqlimport,
mysqlcheck and myisamchk to use new my_getopt struct. client/client_priv.h: Changes for my_getopt client/mysql.cc: Uses new my_getopt client/mysqladmin.c: Uses new my_getopt client/mysqlcheck.c: Uses new my_getopt client/mysqldump.c: Uses new my_getopt client/mysqlimport.c: Uses new my_getopt client/mysqlshow.c: Uses new my_getopt include/my_getopt.h: Added GET_BOOL type include/sslopt-case.h: This is shouldn't be needed anymore. include/sslopt-longopts.h: Uses new my_getopt myisam/myisamchk.c: Uses new my_getopt mysys/my_getopt.c: Some bug fixes and small feature adds to my_getopt sql/mysqld.cc: mysqld.cc will be changed next. sslopt-* had to be removed temporarily.
Diffstat (limited to 'include/my_getopt.h')
-rw-r--r--include/my_getopt.h17
1 files changed, 7 insertions, 10 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 2e40fb8ffaa..b3b3ee2f785 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -14,28 +14,21 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
-struct my_optarg
-{
- char *arg; /* option argument */
- int pos; /* next element in ARGV */
- int verbose; /* 0 = inhibit warnings of unrecognized options */
- int unrecognized; /* position of the unrecognized option */
-};
+C_MODE_START
-
-enum get_opt_var_type { GET_NO_ARG, GET_LONG, GET_LL, GET_STR };
+enum get_opt_var_type { GET_NO_ARG, GET_BOOL, 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 */
+ int id; /* unique id or short 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 */
enum get_opt_var_type var_type;
enum get_opt_arg_type arg_type;
- int id; /* unique id or short option */
longlong def_value; /* Default value */
longlong min_value; /* Min allowed value */
longlong max_value; /* Max allowed value */
@@ -44,6 +37,8 @@ struct my_option
int app_type; /* To be used by an application */
};
+extern char *disabled_my_option;
+
extern int handle_options (int *argc, char ***argv,
const struct my_option *longopts,
my_bool (*get_one_option)(int,
@@ -51,3 +46,5 @@ extern int handle_options (int *argc, char ***argv,
char *));
extern void my_print_help(const struct my_option *options);
extern void my_print_variables(const struct my_option *options);
+
+C_MODE_END