diff options
author | Ashwini Sharma <ak.ashwini1981@gmail.com> | 2014-03-19 13:57:06 -0500 |
---|---|---|
committer | Ashwini Sharma <ak.ashwini1981@gmail.com> | 2014-03-19 13:57:06 -0500 |
commit | 64f61640880011b991931ac30371719edd88e65d (patch) | |
tree | 2de61ccc62d5b3d7c37b8e73c6452a1168e8b5ce | |
parent | 817d97ba626f86c376cb8311c099ea5f010205d5 (diff) | |
download | toybox-64f61640880011b991931ac30371719edd88e65d.tar.gz |
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.
-rw-r--r-- | scripts/mkflags.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } |