summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntti-Juhani Kaijanaho <ajk@debian.org>2006-01-28 21:14:51 +0100
committerAntti-Juhani Kaijanaho <ajk@debian.org>2006-01-28 21:14:51 +0100
commitb76cb0ca8330028714bf38047a2b0f741142ff95 (patch)
tree339971f437466fa5ac63ad764b2780f5f5f62790
parentb32b5fceba9eff4de1a6fdf7bf3ada3e5f15ed23 (diff)
downloaddctrl-tools-b76cb0ca8330028714bf38047a2b0f741142ff95.tar.gz
Import 1.102
-rw-r--r--debian/changelog8
-rw-r--r--paragraph.c8
2 files changed, 15 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 0d8f9aa..35a666b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+grep-dctrl (1.102) unstable; urgency=low
+
+ * paragraph.c (para_parse_next) [case BODY_NEWLINE]: Do not declare eof
+ on reading -1.
+ Closes: #205933 (Silently ignores the last stanza if no trailing newline)
+
+ -- Antti-Juhani Kaijanaho <ajk@debian.org> Mon, 25 Aug 2003 18:46:04 +0300
+
grep-dctrl (1.101) unstable; urgency=low
* fieldtrie.h (fieldtrie_count): New function.
diff --git a/paragraph.c b/paragraph.c
index a777bcc..1aebc30 100644
--- a/paragraph.c
+++ b/paragraph.c
@@ -45,6 +45,12 @@ void para_parse_next(para_t * para)
size_t field_start = 0;
struct field_data * field_data = 0;
while (state != END) {
+# ifndef TEST_NODEBUG
+ static char * const stnm[] = { "START", "FIELD_NAME",
+ "BODY", "BODY_NEWLINE",
+ "BODY_SKIPBLANKS", "END" };
+ if (do_msg(L_DEBUG)) fprintf(stderr, "State: %s\n", stnm[state]);
+# endif
int c = fsaf_getc(fp, pos++);
switch (state) {
case START:
@@ -106,7 +112,7 @@ void para_parse_next(para_t * para)
case BODY_NEWLINE:
switch (c) {
case -1:
- para->eof = true;
+ //para->eof = true;
/* pass through */
case '\n':
state = END;