(xundump): Eat whitespace after table, so that caller can check for

trailing junk more easily.  This fixes that check in ef_load().
This commit is contained in:
Markus Armbruster 2005-12-17 15:09:43 +00:00
parent 4799984997
commit 3dc35a77f7
2 changed files with 4 additions and 1 deletions

View file

@ -55,7 +55,7 @@ ef_load()
else { else {
int ch = getc(fp); int ch = getc(fp);
if (ch != EOF) { if (ch != EOF) {
fprintf(stderr, "%s: Junk after the trailer\n", fprintf(stderr, "%s: Junk after the table\n",
ep->file); ep->file);
retval = -1; retval = -1;
} }

View file

@ -559,6 +559,9 @@ xundump(FILE *fp, char *file, int expected_table)
if (need_sentinel) if (need_sentinel)
xuinitrow(type, row); xuinitrow(type, row);
while ((ch = skipfs(fp)) == '\n') ;
ungetc(ch, fp);
ep->fids = ep->cids = row; ep->fids = ep->cids = row;
return type; return type;
} }