From 3dc35a77f771a6c1d8f288ebc41b82c5198cabe0 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sat, 17 Dec 2005 15:09:43 +0000 Subject: [PATCH] (xundump): Eat whitespace after table, so that caller can check for trailing junk more easily. This fixes that check in ef_load(). --- src/lib/common/ef_load.c | 2 +- src/lib/common/xundump.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lib/common/ef_load.c b/src/lib/common/ef_load.c index 0fd43597..ee9461d4 100644 --- a/src/lib/common/ef_load.c +++ b/src/lib/common/ef_load.c @@ -55,7 +55,7 @@ ef_load() else { int ch = getc(fp); if (ch != EOF) { - fprintf(stderr, "%s: Junk after the trailer\n", + fprintf(stderr, "%s: Junk after the table\n", ep->file); retval = -1; } diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index 5a284707..8aa292b7 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -559,6 +559,9 @@ xundump(FILE *fp, char *file, int expected_table) if (need_sentinel) xuinitrow(type, row); + while ((ch = skipfs(fp)) == '\n') ; + ungetc(ch, fp); + ep->fids = ep->cids = row; return type; }