guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Another preproc portability problem with the new snarfer


From: Matthias Koeppe
Subject: Another preproc portability problem with the new snarfer
Date: 08 Jun 2001 14:23:24 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6

The new de-awk-ified snarfing scheme looks good to me.  However, a
preprocessor portability problem remains.  The preprocessor of the Sun
Forte compilers still puts whitespace into different places. This
results in empty DOC and X files.

Here is a sample line from the preprocessor output when invoked with
-DSCM_MAGIC_SNARF_DOCS. Note the whitespace between the magic ^ characters.

 ^ ^ { ^ ^ fname . "sloppy-assq" ^ ^ type . primitive ^ ^ location "alist.c" . 
83 ^ ^ arglist . ( SCM key , SCM alist ) ^ ^ argsig 2 0 0 ^ ^ ( "Behaves like 
@code{assq} but does not do any error checking.\n" "Recommended only for use in 
Guile internals." ) ^ ^ }

Both guile-snarf.in and filter-doc-snarfage.c need to be fixed to cope
with the extra whitespace. For the former, I have the following patch.

Index: guile-snarf.in
===================================================================
RCS file: /cvs/guile/guile-core/libguile/guile-snarf.in,v
retrieving revision 1.12
diff -u -u -r1.12 guile-snarf.in
--- guile-snarf.in      2001/05/31 13:15:54     1.12
+++ guile-snarf.in      2001/06/08 12:16:04
@@ -27,7 +27,7 @@
 ## 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.


I haven't fixed filter-doc-snarfage.c yet, though.  The sample line
quoted above should provide enough data for fixing the problem.

BTW, is there a reason for guile_filter_doc_snarfage having
underscores, whereas everything else uses nice dashes?

-- 
Matthias Köppe -- http://www.math.uni-magdeburg.de/~mkoeppe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]