summaryrefslogtreecommitdiff
path: root/mysys/my_getopt.c
diff options
context:
space:
mode:
authorunknown <lenz@mysql.com>2002-07-03 18:45:38 +0200
committerunknown <lenz@mysql.com>2002-07-03 18:45:38 +0200
commit0670fc939be40a938b401590b3a821e0c28ff91b (patch)
tree65a935ba87804f544829b381550784cca307e304 /mysys/my_getopt.c
parentef8712b2c7384d88b94c6c7542c3afa617ca66ca (diff)
downloadmariadb-git-0670fc939be40a938b401590b3a821e0c28ff91b.tar.gz
Added a compile fix for AIX to include/my_sys.h
Corrected some comments that were using C++-style instead of C-style include/my_sys.h: Portability fix: define alloca as a compiler builtin on systems that have gcc but no alloca.h (e.g. some IBM AIX flavors), use "#pragma alloca" for IBMs compiler (xlc) mysys/my_getopt.c: Replace C++-style comments with C-style comments strings/ctype-latin1_de.c: Replace C++-style comments with C-style comments strings/ctype-tis620.c: Replace C++-style comments with C-style comments
Diffstat (limited to 'mysys/my_getopt.c')
-rw-r--r--mysys/my_getopt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/mysys/my_getopt.c b/mysys/my_getopt.c
index 9583b5a72c3..f8ad3ad9ce3 100644
--- a/mysys/my_getopt.c
+++ b/mysys/my_getopt.c
@@ -293,7 +293,7 @@ int handle_options(int *argc, char ***argv,
*/
*((my_bool*) optp->value)= (my_bool) (!optend || *optend == '1');
(*argc)--;
- continue; // For GET_BOOL get_one_option() shouldn't be called
+ continue; /* For GET_BOOL get_one_option() shouldn't be called */
}
argument= optend;
}
@@ -341,16 +341,16 @@ int handle_options(int *argc, char ***argv,
if (optp->var_type == GET_BOOL && optp->arg_type == NO_ARG)
{
*((my_bool*) optp->value)= (my_bool) 1;
- continue; // For GET_BOOL get_one_option() shouldn't be called
+ continue; /* For GET_BOOL get_one_option() shouldn't be called */
}
else if (optp->arg_type == REQUIRED_ARG ||
optp->arg_type == OPT_ARG)
{
if (*(optend + 1))
{
- // The rest of the option is option argument
+ /* The rest of the option is option argument */
argument= optend + 1;
- // This is in effect a jump out of the outer loop
+ /* This is in effect a jump out of the outer loop */
optend= (char*) " ";
}
else if (optp->arg_type == REQUIRED_ARG)
@@ -573,7 +573,7 @@ static longlong getopt_ll (char *arg, const struct my_option *optp, int *err)
if (num < (longlong) optp->min_value)
num= (longlong) optp->min_value;
else if (num > 0 && (ulonglong) num > (ulonglong) (ulong) optp->max_value
- && optp->max_value) // if max value is not set -> no upper limit
+ && optp->max_value) /* if max value is not set -> no upper limit */
num= (longlong) (ulong) optp->max_value;
num= ((num - (longlong) optp->sub_size) / (optp->block_size ?
(ulonglong) optp->block_size :
@@ -597,7 +597,7 @@ static ulonglong getopt_ull (char *arg, const struct my_option *optp, int *err)
if (num < (ulonglong) optp->min_value)
num= (ulonglong) optp->min_value;
else if (num > 0 && (ulonglong) num > (ulonglong) (ulong) optp->max_value
- && optp->max_value) // if max value is not set -> no upper limit
+ && optp->max_value) /* if max value is not set -> no upper limit */
num= (ulonglong) (ulong) optp->max_value;
num= ((num - (ulonglong) optp->sub_size) / (optp->block_size ?
(ulonglong) optp->block_size :
@@ -717,7 +717,7 @@ void my_print_help(const struct my_option *options)
for (line_end= comment + comment_space; *line_end != ' '; line_end--);
for (; comment != line_end; comment++)
putchar(*comment);
- comment++; // skip the space, as a newline will take it's place now
+ comment++; /* skip the space, as a newline will take it's place now */
putchar('\n');
for (col= 0; col < name_space; col++)
putchar(' ');