diff options
author | Sven Verdoolaege <skimo@kotnet.org> | 2010-11-13 15:20:26 +0100 |
---|---|---|
committer | Sven Verdoolaege <skimo@kotnet.org> | 2010-11-24 20:25:02 +0100 |
commit | 3a69d95d6f92d661d6635fe0ad967f1a2b768a02 (patch) | |
tree | a5e5e8bdf1ede2555c604eb9bf8ed17e67fbff42 | |
parent | 35e8c4c68bd93c327ba7cdb7cc1e7ca95dc21ab6 (diff) | |
download | isl-3a69d95d6f92d661d6635fe0ad967f1a2b768a02.tar.gz isl-3a69d95d6f92d661d6635fe0ad967f1a2b768a02.tar.bz2 isl-3a69d95d6f92d661d6635fe0ad967f1a2b768a02.zip |
isl_arg_parse: allow options without long name
-rw-r--r-- | isl_arg.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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; |