diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 043b3ed0d..a1aeba577 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -51,7 +51,7 @@ modern_snarf () # writes stdout ## empty file. echo "/* cpp arguments: $@ */" ; ${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true - grep "^ *\^ *\^" ${temp} | sed -e "s/ *\^ *\^//g" -e "s/\^ *: *\^/;/g" + sed -ne "s/ *\^ *: *\^/\n/;s/[^\n]*\^ *\^ *\([^\n]*\)/\1;/;tx;d;:x;P;D" ${temp} } ## main diff --git a/test-suite/standalone/test-guile-snarf b/test-suite/standalone/test-guile-snarf index 94cfd9023..78d35ea16 100755 --- a/test-suite/standalone/test-guile-snarf +++ b/test-suite/standalone/test-guile-snarf @@ -15,6 +15,6 @@ snarf_test () snarf_test "^^a^:^" "a;" snarf_test " ^ ^ b ^ : ^ " "b;" -#snarf_test "c\n^^d^:^\ne" "d;" -#snarf_test "f^^g^:^h" "g;" -#snarf_test "^^i^:^j^^k^:^" "i;k;" +snarf_test "c\n^^d^:^\ne" "d;" +snarf_test "f^^g^:^h" "g;" +snarf_test "^^i^:^j^^k^:^" "i;k;"