Don't stop checking xdump field headers when join field is missing

Also improve the error message a bit.
This commit is contained in:
Markus Armbruster 2011-04-27 07:03:09 +02:00
parent 6e4772b175
commit cb3e35cb3a

View file

@ -28,7 +28,7 @@
* *
* Known contributors to this file: * Known contributors to this file:
* Ron Koenderink, 2005 * Ron Koenderink, 2005
* Markus Armbruster, 2005-2010 * Markus Armbruster, 2005-2011
*/ */
/* /*
@ -411,12 +411,14 @@ chkflds(void)
if (is_partial) { if (is_partial) {
/* Need a join field, use 0-th selector */ /* Need a join field, use 0-th selector */
if (!caflds[0]) if (!caflds[0])
return gripe("Header field %s required with ...", ca[0].ca_name); res = gripe("Header field %s required in each table part",
ca[0].ca_name);
} }
if (ellipsis) if (ellipsis)
return 0; return res; /* table is split, another part expected */
/* Check for missing fields */
for (i = 0; ca[i].ca_name; i++) { for (i = 0; ca[i].ca_name; i++) {
cafldsmax = MAX(caflds[i], cafldspp[i]); cafldsmax = MAX(caflds[i], cafldspp[i]);
if (ca[i].ca_flags & NSC_EXTRA) if (ca[i].ca_flags & NSC_EXTRA)