diff options
author | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-07 13:48:34 +0000 |
---|---|---|
committer | goodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 1999-07-07 13:48:34 +0000 |
commit | 61d3ba8e0f1d975e70dee7bf617ea43444d394a0 (patch) | |
tree | 58fcfbef332bf06f4cea6ed19acc57afe9da16f3 /src | |
parent | 827affd34723a71d28b03d8db8462dfb57317c04 (diff) |
If there is no = before the end of the line discards the tokens
collected so far. This stops it continuing collecting the name of
a parameter across newlines.
Note that this bug will also be there in Cactus 3.0.
Tom
git-svn-id: http://svn.cactuscode.org/flesh/trunk@686 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src')
-rw-r--r-- | src/util/ParseFile.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/util/ParseFile.c b/src/util/ParseFile.c index d6d5a97d..2e395580 100644 --- a/src/util/ParseFile.c +++ b/src/util/ParseFile.c @@ -89,11 +89,19 @@ int ParseFile(FILE *ifp, } /* End of line */ - if (c == '\n') { + if (c == '\n') + { + if(intoken) + { + fprintf(stderr, "Parse error at line %d. No value supplied.\n", lineno); + intoken = 0; + } + lineno ++; #ifdef DEBUG printf ("LINE %d\n",lineno); #endif + } /* Token character */ |