(xundump): Table names no longer contain whitespace. Simplify.
This commit is contained in:
parent
871ed677c2
commit
8e6baf0bcb
1 changed files with 1 additions and 8 deletions
|
@ -417,18 +417,11 @@ xundump(FILE *fp, char *file, int expected_table)
|
|||
} else
|
||||
lineno++;
|
||||
|
||||
if (fscanf(fp, "XDUMP %63[^0123456789]%*d%c", name, &sep) != 2)
|
||||
if (fscanf(fp, "XDUMP %63s %*d%c", name, &sep) != 2)
|
||||
return gripe("Expected XDUMP header");
|
||||
if (sep != '\n')
|
||||
return gripe("Junk after XDUMP header");
|
||||
|
||||
if (strlen(name) < 2)
|
||||
return gripe("Invalid table name in header %s", name);
|
||||
if (name[strlen(name) - 1] != ' ')
|
||||
return gripe("Missing space after table name in header %s",
|
||||
name);
|
||||
name[strlen(name) - 1] = '\0';
|
||||
|
||||
type = ef_byname(name);
|
||||
if (type < 0)
|
||||
return gripe("Table not found %s", name);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue