summaryrefslogtreecommitdiffstats
path: root/usr.bin
diff options
context:
space:
mode:
authorpaul <paul@FreeBSD.org>1995-01-25 07:56:10 +0000
committerpaul <paul@FreeBSD.org>1995-01-25 07:56:10 +0000
commit3b2b35819c2c40c73aaf5b14631ab7bc50e15a92 (patch)
tree6860966822c1e4ff5b97cfc48b06b2dab0860d18 /usr.bin
parentdd92b5764723d2e00ff85d9eca29fe80695809fc (diff)
downloadFreeBSD-src-3b2b35819c2c40c73aaf5b14631ab7bc50e15a92.zip
FreeBSD-src-3b2b35819c2c40c73aaf5b14631ab7bc50e15a92.tar.gz
More parser fixes. Store attributes properly for each field and
don't emit a second declaration unless it's different to the default.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/fib/parser.y17
1 files changed, 9 insertions, 8 deletions
diff --git a/usr.bin/fib/parser.y b/usr.bin/fib/parser.y
index 2b3615f..d7c10fa 100644
--- a/usr.bin/fib/parser.y
+++ b/usr.bin/fib/parser.y
@@ -610,7 +610,7 @@ parse_form(struct form_list *form, FILE *outf)
} else {
fields->field.type = def->field.type;
fields->field.width = def->field.width;
- fields->field.attr = def->field.attr;
+ fields->attr = def->attr;
}
if (!links) {
@@ -621,15 +621,16 @@ parse_form(struct form_list *form, FILE *outf)
fields->field.right = -1;
fields->field.next = -1;
fields->defname = fieldname;
- } else {
+ }
+
+ if (strcmp(def->fieldname, fields->fieldname))
output_field(def, fields->fieldname, outf);
- if ((fields->field.type == F_TEXT)
- || (fields->field.type == F_ACTION))
- fields->defname = def->fieldname;
- else
- fields->defname = fields->fieldname;
- }
+ if ((fields->field.type == F_TEXT)
+ || (fields->field.type == F_ACTION))
+ fields->defname = def->fieldname;
+ else
+ fields->defname = fields->fieldname;
}
/* Output the field table for this form */
OpenPOWER on IntegriCloud