Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
42aaea8c
Commit
42aaea8c
authored
Jun 25, 2009
by
Kristofer Pettersson
Browse files
Options
Browse Files
Download
Plain Diff
Automerge
parents
5eab9716
de91a33d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
mysys/my_getopt.c
mysys/my_getopt.c
+13
-2
No files found.
mysys/my_getopt.c
View file @
42aaea8c
...
...
@@ -20,6 +20,7 @@
#include <mysys_err.h>
#include <my_getopt.h>
#include <errno.h>
#include <m_string.h>
typedef
void
(
*
init_func_p
)(
const
struct
my_option
*
option
,
uchar
*
*
variable
,
longlong
value
);
...
...
@@ -649,8 +650,18 @@ static int setval(const struct my_option *opts, uchar* *value, char *argument,
return
EXIT_OUT_OF_MEMORY
;
break
;
case
GET_ENUM
:
if
(((
*
(
int
*
)
result_pos
)
=
find_type
(
argument
,
opts
->
typelib
,
2
)
-
1
)
<
0
)
return
EXIT_ARGUMENT_INVALID
;
if
(((
*
(
int
*
)
result_pos
)
=
find_type
(
argument
,
opts
->
typelib
,
2
)
-
1
)
<
0
)
{
/*
Accept an integer representation of the enumerated item.
*/
char
*
endptr
;
unsigned
int
arg
=
(
unsigned
int
)
strtol
(
argument
,
&
endptr
,
10
);
if
(
*
endptr
||
arg
>=
opts
->
typelib
->
count
)
return
EXIT_ARGUMENT_INVALID
;
*
(
int
*
)
result_pos
=
arg
;
}
break
;
case
GET_SET
:
*
((
ulonglong
*
)
result_pos
)
=
find_typeset
(
argument
,
opts
->
typelib
,
&
err
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment