changeset 1243:eae29e8e2bc8 draft

_mkflags_ had an issue for generating FLAG_xxxx macros for long options. Only the first __long__ option, without any __short__ option had a proper flag value, rest all were defined to ZERO. Becaus the _flist_ was not moved to the next in this case.
author Ashwini Sharma <ak.ashwini1981@gmail.com>
date Wed, 09 Apr 2014 07:40:02 -0500
parents 2014f64a141b
children 40ed517e0cda
files scripts/mkflags.c
diffstat 1 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/mkflags.c	Mon Apr 07 12:53:24 2014 -0500
+++ b/scripts/mkflags.c	Wed Apr 09 07:40:02 2014 -0500
@@ -117,7 +117,13 @@
           flist->lopt = flist->lopt->next;
         } else sprintf(out, "#define FLAG_%s 0\n", aflist->lopt->command);
         aflist->lopt = aflist->lopt->next;
-        if (!aflist->command) aflist = aflist->next;
+        if (!aflist->command) {
+          aflist = aflist->next;
+          if (flist) {
+            flist = flist->next;
+            bit++;
+          }
+        }
       } else if (aflist->command) {
         if (flist && (!aflist->command || *aflist->command == *flist->command))
         {