From 3a69d95d6f92d661d6635fe0ad967f1a2b768a02 Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Sat, 13 Nov 2010 15:20:26 +0100 Subject: isl_arg_parse: allow options without long name --- isl_arg.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/isl_arg.c b/isl_arg.c index c6ffa149..93785839 100644 --- 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; -- cgit v1.2.3