aboutsummaryrefslogtreecommitdiff
path: root/scripts/mkflags.c
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/mkflags.c')
-rw-r--r--scripts/mkflags.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/scripts/mkflags.c b/scripts/mkflags.c
index 228cd2f8..d87087bc 100644
--- a/scripts/mkflags.c
+++ b/scripts/mkflags.c
@@ -122,10 +122,14 @@ int main(int argc, char *argv[])
char *gaps, *mgaps, c;
unsigned bit;
- *command = 0;
+ *command = *flags = *allflags = 0;
bit = fscanf(stdin, "%255s \"%1023[^\"]\" \"%1023[^\"]\"\n",
command, flags, allflags);
+ if (getenv("DEBUG"))
+ fprintf(stderr, "command=%s, flags=%s, allflags=%s\n",
+ command, flags, allflags);
+
if (!*command) break;
if (bit != 3) {
fprintf(stderr, "\nError in %s (duplicate command?)\n", command);
@@ -182,8 +186,7 @@ int main(int argc, char *argv[])
if (flist) flist = flist->next;
}
} else if (aflist->command) {
- if (flist && (!aflist->command || *aflist->command == *flist->command))
- {
+ if (flist && (!flist->command || *aflist->command == *flist->command)) {
if (aflist->command)
sprintf(out, "#define FLAG_%c (1<<%d)\n", *aflist->command, bit);
flist = flist->next;