summaryrefslogtreecommitdiff
path: root/include/my_getopt.h
diff options
context:
space:
mode:
authorunknown <jani@rhols221.adsl.netsonic.fi>2003-06-27 18:51:39 +0300
committerunknown <jani@rhols221.adsl.netsonic.fi>2003-06-27 18:51:39 +0300
commitcb9c86ede6ae7201df768a3e7b4acb26f9503051 (patch)
tree80f87865a04a14f3b6cd03877645d46eeb421233 /include/my_getopt.h
parent11e9c572ad1d81536902dd01d48c68ef00ce9018 (diff)
downloadmariadb-git-cb9c86ede6ae7201df768a3e7b4acb26f9503051.tar.gz
Added support for structured options (WL task ID 947).
Diffstat (limited to 'include/my_getopt.h')
-rw-r--r--include/my_getopt.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/my_getopt.h b/include/my_getopt.h
index 3b4551b445e..213c8c3570e 100644
--- a/include/my_getopt.h
+++ b/include/my_getopt.h
@@ -17,7 +17,12 @@
C_MODE_START
enum get_opt_var_type { GET_NO_ARG, GET_BOOL, GET_INT, GET_UINT, GET_LONG,
- GET_ULONG, GET_LL, GET_ULL, GET_STR, GET_STR_ALLOC };
+ GET_ULONG, GET_LL, GET_ULL, GET_STR, GET_STR_ALLOC
+ };
+
+#define GET_ASK_ADDR 128
+#define GET_TYPE_MASK 127
+
enum get_opt_arg_type { NO_ARG, OPT_ARG, REQUIRED_ARG };
struct my_option
@@ -48,6 +53,8 @@ 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);
+extern void my_getopt_register_get_addr(gptr* (*func_addr)(char *, uint,
+ const struct my_option *));
ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp);
my_bool getopt_compare_strings(const char *s, const char *t, uint length);