(xuheader): Fix misleading diagnostics.

(xundump1): Fix table shrinking.
This commit is contained in:
Markus Armbruster 2006-02-19 17:03:33 +00:00
parent 24910a0681
commit fe53057977

View file

@ -669,7 +669,7 @@ xuheader(FILE *fp, int expected_table)
if (!ef_cadef(type) || !(ef_flags(type) & EFF_MEM)) { if (!ef_cadef(type) || !(ef_flags(type) & EFF_MEM)) {
CANT_HAPPEN(expected_table != EF_BAD); CANT_HAPPEN(expected_table != EF_BAD);
return gripe("Undumping of table `%s' not implemented", name); return gripe("Table `%s' is not permitted here", name);
} }
if (skipfs(fp) != '\n') if (skipfs(fp) != '\n')
@ -834,7 +834,7 @@ xundump1(FILE *fp, int type, struct castr *ca)
gripe("Warning: should resize table %s from %d to %d, not implemented", gripe("Warning: should resize table %s from %d to %d, not implemented",
ef_nameof(type), ep->csize, n); ef_nameof(type), ep->csize, n);
else if (type >= EF_SHIP_CHR && type <= EF_NUKE_CHR) else if (type >= EF_SHIP_CHR && type <= EF_NUKE_CHR)
; /* shrinking these is okay */ ep->cids = ep->fids = n;
else else
return gripe("Table %s requires %d rows, got %d", return gripe("Table %s requires %d rows, got %d",
ef_nameof(type), ep->fids, n); ef_nameof(type), ep->fids, n);