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.
diff --git a/scripts/mkflags.c b/scripts/mkflags.c
index 1cad5bf..748e93d 100644
--- a/scripts/mkflags.c
+++ b/scripts/mkflags.c
@@ -44,7 +44,7 @@
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;
}