From 47bcd6465f75719bbed6ae4520dda2e7480b77ed Mon Sep 17 00:00:00 2001 From: Michael Livshin Date: Fri, 8 Jun 2001 13:48:39 +0000 Subject: [PATCH] =?UTF-8?q?*=20filter-doc-snarfage.c,=20guile-snarf.in:=20?= =?UTF-8?q?try=20to=20cope=20with=20spaces=20inside=20cookies.=20=20thanks?= =?UTF-8?q?=20to=20Matthias=20K=C3=B6ppe!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- libguile/ChangeLog | 10 +++++++--- libguile/filter-doc-snarfage.c | 5 +++-- libguile/guile-snarf.in | 2 +- 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/libguile/ChangeLog b/libguile/ChangeLog index 5eb22ccd8..3f48f61f6 100644 --- a/libguile/ChangeLog +++ b/libguile/ChangeLog @@ -1,3 +1,8 @@ +2001-06-08 Michael Livshin + + * filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces + inside cookies. thanks to Matthias Köppe! + 2001-06-08 Dirk Herrmann * keywords.c (keyword_print): Don't use SCM_C[AD]R to access @@ -200,9 +205,8 @@ * snarf.h: make the output both texttools- and `read'-friendly. - * guile-doc-snarf.in (bindir): reimplement in terms of guile-snarf - and guile-snarf-docs. (should also deprecate, I guess. maybe - not). + * guile-doc-snarf.in: reimplement in terms of guile-snarf and + guile-snarf-docs. (should also deprecate, I guess. maybe not). 2001-05-31 Marius Vollmer diff --git a/libguile/filter-doc-snarfage.c b/libguile/filter-doc-snarfage.c index c403b0ebf..f1d2fd14e 100644 --- a/libguile/filter-doc-snarfage.c +++ b/libguile/filter-doc-snarfage.c @@ -55,7 +55,7 @@ process () want_cookie = 0; } else want_cookie = 1; - } else + } else if (c != ' ') want_cookie = 0; break; case SKIP_COOKIE: @@ -82,7 +82,8 @@ process () } else want_cookie = 1; } else { - want_cookie = 0; + if (c != ' ') + want_cookie = 0; putc (c, stdout); } break; diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 41542dcfc..ffb035146 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -27,7 +27,7 @@ test -n "${CPP+set}" || CPP="@CPP@" ## We must use a temporary file here, instead of a pipe, because we ## need to know if CPP exits with a non-zero status. ${CPP} -DSCM_MAGIC_SNARF_INITS "$@" > ${temp} || exit $? -< ${temp} grep "^ *\^\^" | sed -e "s/^ *\^\^//" +< ${temp} grep "^ *\^ *\^" | sed -e "s/^ *\^ *\^//" ## Apparently, AIX's preprocessor is unhappy if you try to #include an ## empty file.