]> git.pond.sub.org Git - empserver/commitdiff
(xuheader, xundump): Return -2 for empty input, so it can be
authorMarkus Armbruster <armbru@pond.sub.org>
Mon, 13 Feb 2006 19:07:31 +0000 (19:07 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Mon, 13 Feb 2006 19:07:31 +0000 (19:07 +0000)
distinguished from bad input.

src/lib/common/xundump.c

index c43bc4632043c1a9470e8e8a7f0ec6c921cdf5f6..4dcb5ead4888fc8b10018eb6b08c2de627e0cded 100644 (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))