From 2fdcf8bdf04dcbe8848a42db1317029e798cb752 Mon Sep 17 00:00:00 2001 From: "Greg J. Badros" Date: Sun, 9 Jan 2000 01:07:17 +0000 Subject: [PATCH] * backtrace.c: Fix spelling typo in a comment. * snarf.h: Use new SCM_DOCS macro to encapsulate the non SCM_INIT text. Reformatted some of the expansions. --- libguile/backtrace.c | 2 +- libguile/snarf.h | 20 +++++++++++--------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/libguile/backtrace.c b/libguile/backtrace.c index 8640b3753..343cea135 100644 --- a/libguile/backtrace.c +++ b/libguile/backtrace.c @@ -232,7 +232,7 @@ struct display_error_handler_data { Note that it is very important that this handler *doesn't* try to print more than the error tag, since the error very probably is caused by an erroneous print call-back routine. If we would - tru to print all objects, we would enter an infinite loop. */ + try to print all objects, we would enter an infinite loop. */ static SCM display_error_handler (struct display_error_handler_data *data, SCM tag, SCM args) diff --git a/libguile/snarf.h b/libguile/snarf.h index e70565cc5..cc8fa4d50 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -73,9 +73,11 @@ #ifndef SCM_MAGIC_SNARFER # define SCM_HERE(X) X # define SCM_INIT(X) +# define SCM_DOCS(X) #else # define SCM_HERE(X) # define SCM_INIT(X) %%% X +# define SCM_DOCS(X) X #endif #define SCM_DEFINE(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ @@ -85,6 +87,8 @@ SCM FNAME ARGLIST\ )\ 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 @!!! \ ) @@ -92,22 +96,20 @@ $$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!! SCM_HERE(\ static const char s_ ## FNAME [] = PRIMNAME; \ SCM FNAME ARGLIST\ -)SCM_INIT(\ -scm_make_subr (s_ ## FNAME, TYPE, FNAME); \ +)\ +SCM_INIT(scm_make_subr (s_ ## FNAME, TYPE, FNAME); ) \ +SCM_DOCS(\ $$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! \ ) #define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ SCM_HERE(static const char RANAME[]=STR) \ -SCM_INIT(\ -scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN) \ -) +SCM_INIT(scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN)) #define SCM_REGISTER_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ -SCM_HERE(\ -static const char RANAME[]=STR \ -)SCM_INIT(\ -scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM_FUNC_CAST_ARBITRARY_ARGS) CFN); \ +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 @!!! \ )