(xuheader, xundump): Return -2 for empty input, so it can be

distinguished from bad input.
This commit is contained in:
Markus Armbruster 2006-02-13 19:07:31 +00:00
parent 6ed05a024c
commit 9e362de34f

View file

@ -540,7 +540,7 @@ xuheader(FILE *fp, int expected_table)
while ((ch = skipfs(fp)) == '\n')
lineno++;
if (ch == EOF && expected_table == EF_BAD)
return -1;
return -2;
ungetc(ch, fp);
human = ch == 'c';
@ -639,7 +639,7 @@ xundump(FILE *fp, char *file, int expected_table)
}
if ((type = xuheader(fp, expected_table)) < 0)
return -1;
return type;
ca = ef_cadef(type);
if (CANT_HAPPEN(!ca))