diff --git a/libguile/guile-snarf.awk.in b/libguile/guile-snarf.awk.in index 9e380d23e..b49b590fc 100644 --- a/libguile/guile-snarf.awk.in +++ b/libguile/guile-snarf.awk.in @@ -10,16 +10,16 @@ BEGIN { FS="|"; printf "" > dot_doc_file; } -/^[ \t]* *% *% *%/ { copy = $0; - gsub(/[ \t]* *% *% *%/, "", copy); - gsub(/ *\$ *\$ *\$.*$/, "", copy); +/^[ \t]*SCM__I/ { copy = $0; + gsub(/[ \t]*SCM__I/, "", copy); + gsub(/SCM__D.*$/, "", copy); print copy; } -/ *\$ *\$ *\$/,/ *@ *@ *@/ { copy = $0; - if (match(copy,/ *\$ *\$ *\$R/)) { registering = 1; } +/SCM__D/,/SCM__S/ { copy = $0; + if (match(copy,/SCM__DR/)) { registering = 1; } else {registering = 0; } - gsub(/.* *\$ *\$ *\$./,"", copy); - gsub(/ *@ *@ *@.*/,"",copy); + gsub(/.*SCM__D./,"", copy); + gsub(/SCM__S.*/,"",copy); gsub(/[ \t]+/," ", copy); sub(/^[ \t]*/,"(", copy); gsub(/\"/,"",copy); @@ -52,10 +52,10 @@ BEGIN { FS="|"; { print location ":*** `" copy "' is improperly registered as having " numactuals " arguments" > std_err; } print " \n" copy (registering?")":"") > dot_doc_file ; } -/ *@ *@ *@/,/@ *! *! *!.*$/ { copy = $0; - gsub(/.* *@ *@ *@/,"",copy); +/SCM__S/,/SCM__E.*$/ { copy = $0; + gsub(/.*SCM__S/,"",copy); sub(/^[ \t]*"?/,"", copy); - sub(/\"?[ \t]*@ *! *! *!.*$/,"", copy); + sub(/\"?[ \t]*SCM__E.*$/,"", copy); gsub(/\\n\\n"?/,"\n",copy); gsub(/\\n"?[ \t]*$/,"",copy); gsub(/\\\"[ \t]*$/,"\"",copy); @@ -63,7 +63,7 @@ BEGIN { FS="|"; if (copy != "") { print copy > dot_doc_file } } -/@ *! *! *![ \t]/ { print "[" location "]" >> dot_doc_file; } +/SCM__E[ \t]/ { print "[" location "]" >> dot_doc_file; } /\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION/ { copy = $0; sub(/.*\*&\*&\*&\*SCM_ARG_BETTER_BE_IN_POSITION\([ \t]*/,"",copy); diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index ee01980ab..29332e727 100644 --- a/libguile/guile-snarf.in +++ b/libguile/guile-snarf.in @@ -10,7 +10,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_SNARFER "$@" > ${temp} || exit $? -< ${temp} grep "^ *% *% *%" | sed -e "s/^ *% *% *%//" -e 's/ *\$ *\$ *\$.*$//g' +< ${temp} grep "^SCM__I" | sed -e "s/^SCM__I//" -e 's/SCM__D.*$//g' ## Apparently, AIX's preprocessor is unhappy if you try to #include an ## empty file. diff --git a/libguile/snarf.h b/libguile/snarf.h index 3dbeb88ce..688762e68 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -67,7 +67,7 @@ * SCM_INIT (NAME = foo ()) * * The SCM_INIT text goes into the corresponding .x file - * up through the first occurrence of $$$ on that line, if any. + * up through the first occurrence of SCM__D on that line, if any. */ #ifndef SCM_MAGIC_SNARFER @@ -76,7 +76,7 @@ # define SCM_DOCS(X) #else # define SCM_HERE(X) -# define SCM_INIT(X) %%% X +# define SCM_INIT(X) SCM__I X # define SCM_DOCS(X) X #endif @@ -89,7 +89,7 @@ SCM_INIT(\ scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) FNAME); \ )\ SCM_DOCS(\ -$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! \ +SCM__DP PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | SCM__S DOCSTRING SCM__E \ ) #define SCM_DEFINE1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ @@ -99,7 +99,7 @@ SCM FNAME ARGLIST\ )\ SCM_INIT(scm_make_subr (s_ ## FNAME, TYPE, FNAME); ) \ SCM_DOCS(\ -$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! \ +SCM__D1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | SCM__S DOCSTRING SCM__E \ ) #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ @@ -110,7 +110,7 @@ SCM_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) C SCM_HERE(static const char RANAME[]=STR) \ SCM_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN);) \ SCM_DOCS(\ -$$$R STR | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ CFN @!!! \ +SCM__DR STR | REQ | OPT | VAR | __FILE__:__LINE__ | SCM__S CFN SCM__E \ ) #define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF) \