(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:
parent
4799984997
commit
3dc35a77f7
2 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue