summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorGuilhem Bichot <guilhem@mysql.com>2008-12-10 10:02:25 +0100
committerGuilhem Bichot <guilhem@mysql.com>2008-12-10 10:02:25 +0100
commit70cd9b101dc120bad2eeafa0e8e0fd07edc240d9 (patch)
treedca0acd2a01c113582c29effe5312d2ffc0fb398 /mysys/my_getopt.c
parentad41e2e7e0d55737eb5f21ee41945c73238828c9 (diff)
parente3ae6e5995f8a0cb4fd138db0b0802f7f8a89234 (diff)
downloadmariadb-git-70cd9b101dc120bad2eeafa0e8e0fd07edc240d9.tar.gz
Merge of 5.1-main into 5.1-maria. There were no changes to storage/myisam, mysys/mf_keycache.c, mysql-test/t/*myisam*
since previous merge. MARIA_PAGECACHE_READS in maria-preload.test are down a little bit (5%), which must be a good side-effect of some sql/ change.
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c30
1 files changed, 14 insertions, 16 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 0f8055860d4..464b1d2e3cc 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -28,23 +28,22 @@ static void default_reporter(enum loglevel level, const char *format, ...);
my_error_reporter my_getopt_error_reporter= &default_reporter;
static int findopt(char *optpat, uint length,
- const struct my_option **opt_res,
- char **ffname);
+ const struct my_option **opt_res,
+ char **ffname);
my_bool getopt_compare_strings(const char *s,
- const char *t,
- uint length);
+ const char *t,
+ uint length);
static longlong getopt_ll(char *arg, const struct my_option *optp, int *err);
static ulonglong getopt_ull(char *arg, const struct my_option *optp,
- int *err);
+ int *err);
static double getopt_double(char *arg, const struct my_option *optp, int *err);
static void init_variables(const struct my_option *options,
init_func_p init_one_value);
-static void init_one_value(const struct my_option *option, uchar* *variable,
- longlong value);
+static void init_one_value(const struct my_option *opt, uchar* *, longlong);
static void fini_one_value(const struct my_option *option, uchar* *variable,
longlong value);
-static int setval(const struct my_option *opts, uchar* *value, char *argument,
- my_bool set_maximum_value);
+static int setval(const struct my_option *opts, uchar **value, char *argument,
+ my_bool set_maximum_value);
static char *check_struct_option(char *cur_arg, char *key_name);
/*
@@ -775,7 +774,7 @@ static longlong eval_num_suffix(char *argument, int *error, char *option_name)
return num;
}
-/*
+/*
function: getopt_ll
Evaluates and returns the value that user gave as an argument
@@ -922,7 +921,6 @@ ulonglong getopt_ull_limit_value(ulonglong num, const struct my_option *optp,
my_getopt_error_reporter(WARNING_LEVEL,
"option '%s': unsigned value %s adjusted to %s",
optp->name, ullstr(old, buf1), ullstr(num, buf2));
-
return num;
}
@@ -963,8 +961,8 @@ static double getopt_double(char *arg, const struct my_option *optp, int *err)
SYNOPSIS
init_one_value()
- option Option to initialize
- value Pointer to variable
+ option Option to initialize
+ value Pointer to variable
*/
static void init_one_value(const struct my_option *option, uchar* *variable,
@@ -978,7 +976,7 @@ static void init_one_value(const struct my_option *option, uchar* *variable,
case GET_INT:
*((int*) variable)= (int) value;
break;
- case GET_UINT:
+ case GET_UINT: /* Fall through */
case GET_ENUM:
*((uint*) variable)= (uint) value;
break;
@@ -991,7 +989,7 @@ static void init_one_value(const struct my_option *option, uchar* *variable,
case GET_LL:
*((longlong*) variable)= (longlong) value;
break;
- case GET_ULL:
+ case GET_ULL: /* Fall through */
case GET_SET:
*((ulonglong*) variable)= (ulonglong) value;
break;
@@ -1059,7 +1057,7 @@ void my_cleanup_options(const struct my_option *options)
}
-/*
+/*
initialize all variables to their default values
SYNOPSIS