projects
/
platform
/
upstream
/
isl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35e8c4c
)
isl_arg_parse: allow options without long name
author
Sven Verdoolaege
<skimo@kotnet.org>
Sat, 13 Nov 2010 14:20:26 +0000
(15:20 +0100)
committer
Sven Verdoolaege
<skimo@kotnet.org>
Wed, 24 Nov 2010 19:25:02 +0000
(20:25 +0100)
isl_arg.c
patch
|
blob
|
history
diff --git
a/isl_arg.c
b/isl_arg.c
index
c6ffa14
..
9378583
100644
(file)
--- a/
isl_arg.c
+++ b/
isl_arg.c
@@
-479,6
+479,8
@@
static const char *skip_name(struct isl_arg *decl, const char *arg,
*has_argument = arg[2] != '\0';
return arg + 2;
}
+ if (!decl->long_name)
+ return NULL;
if (strncmp(arg, "--", 2))
return NULL;
@@
-608,6
+610,9
@@
static int parse_bool_option(struct isl_arg *decl, const char *arg,
return 1;
}
+ if (!decl->long_name)
+ return 0;
+
if (strncmp(arg, "--", 2))
return 0;
arg += 2;