summaryrefslogtreecommitdiff
path: root/src/util/ParseFile.c
diff options
context:
space:
mode:
authorgoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-07 13:48:34 +0000
committergoodale <goodale@17b73243-c579-4c4c-a9d2-2d5706c11dac>1999-07-07 13:48:34 +0000
commit61d3ba8e0f1d975e70dee7bf617ea43444d394a0 (patch)
tree58fcfbef332bf06f4cea6ed19acc57afe9da16f3 /src/util/ParseFile.c
parent827affd34723a71d28b03d8db8462dfb57317c04 (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/util/ParseFile.c')
-rw-r--r--src/util/ParseFile.c10
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 */