From 64f61640880011b991931ac30371719edd88e65d Mon Sep 17 00:00:00 2001 From: Ashwini Sharma Date: Wed, 19 Mar 2014 13:57:06 -0500 Subject: There are cases when the long options are of the format abc-def. In current implementation FLAG_xxx macros are generated for long options too. with __-__ sign in the macro, it will generate errors. I am of the opinion that __-__ be converted to '_' for generating the FLAG_xxx macros and be used in the command. This will enable the user to 'abc-def', but be handled like 'abc_def' in code. --- scripts/mkflags.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/mkflags.c') diff --git a/scripts/mkflags.c b/scripts/mkflags.c index 1cad5bf4..748e93d3 100644 --- a/scripts/mkflags.c +++ b/scripts/mkflags.c @@ -44,7 +44,7 @@ struct flag *digest(char *string) blank->lopt = new; list = blank; } - while (*++string != ')'); // An empty longopt () would break this. + while (*++string != ')') if (*string == '-') *string = '_'; // An empty longopt () would break this. *(string++) = 0; continue; } -- cgit v1.2.3