From 3dc81fbacea7ccac0e9f1a1f97f93ed7d2e00aba Mon Sep 17 00:00:00 2001 From: "Greg J. Badros" Date: Sun, 12 Dec 1999 23:37:40 +0000 Subject: [PATCH] * snarf.h: Drop SCM_PROC, SCM_PROC1. Added extra output for guile-doc-snarf script. * guile-doc-snarf.in, guile-doc-snarf.awk: New, simple doc extraction system. Builds foo.x, foo.doc from foo.{c,cc}. There are dependencies between these files and snarf.h. This replaces guile-snarf. * guile-snarf.in: Drop everything after $$$ for the new snarf.h macros. This is obsoleted by guile-doc-snarf, but kept here for now for good measure. * Makefile.am: Added guile-doc-snarf, guile-doc-snarf.awk to bin_SCRIPTS. Added .doc to SUFFIXES, and give rule for creating .doc files to use guile-doc-snarf. Update the rule for creating .x files to use guile-doc-snarf. --- libguile/Makefile.am | 12 ++++++--- libguile/Makefile.in | 50 +++++++++++++++++++++--------------- libguile/guile-doc-snarf.awk | 36 ++++++++++++++++++++++++++ libguile/guile-doc-snarf.in | 28 ++++++++++++++++++++ libguile/guile-snarf.in | 2 +- libguile/snarf.h | 33 ++++++++++++------------ 6 files changed, 120 insertions(+), 41 deletions(-) create mode 100644 libguile/guile-doc-snarf.awk create mode 100755 libguile/guile-doc-snarf.in diff --git a/libguile/Makefile.am b/libguile/Makefile.am index 0e95e1df0..aa980b026 100644 --- a/libguile/Makefile.am +++ b/libguile/Makefile.am @@ -103,7 +103,7 @@ modinclude_HEADERS = \ ## and not a header -- headers are included in the distribution. modinclude_DATA = scmconfig.h -bin_SCRIPTS = guile-snarf +bin_SCRIPTS = guile-snarf guile-doc-snarf guile-doc-snarf.awk check_ldadd = libguile.la ${THREAD_LIBS_LOCAL} check_PROGRAMS = gh_test_c gh_test_repl @@ -154,10 +154,16 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status @echo '}' >> libpath.tmp @mv libpath.tmp libpath.h -SUFFIXES = .x + +# ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ + +SUFFIXES = .x .doc .c.x: - ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \ + ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< \ || { rm $@; false; } +.c.doc: + ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< \ + || { rm $@; false; } ## Add -MG to make the .x magic work with auto-dep code. MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) diff --git a/libguile/Makefile.in b/libguile/Makefile.in index 1c61f67ab..17c0ab67c 100644 --- a/libguile/Makefile.in +++ b/libguile/Makefile.in @@ -1,4 +1,4 @@ -# Makefile.in generated automatically by automake 1.4 from Makefile.am +# Makefile.in generated automatically by automake 1.4a from Makefile.am # Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation @@ -46,9 +46,10 @@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) +INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_FLAG = transform = @program_transform_name@ NORMAL_INSTALL = : @@ -102,13 +103,13 @@ bin_PROGRAMS = guile guile_SOURCES = guile.c guile_LDADD = libguile.la ${THREAD_LIBS_LOCAL} -libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c chars.c continuations.c debug.c dynl.c dynwind.c eq.c error.c eval.c evalext.c feature.c fluids.c fports.c gc.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c gh_io.c gh_list.c gh_predicates.c gsubr.c guardians.c hash.c hashtab.c init.c ioext.c keywords.c lang.c list.c load.c macros.c mallocs.c modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c print.c procprop.c procs.c ramap.c random.c read.c root.c scmsigs.c script.c simpos.c smob.c sort.c srcprop.c stackchk.c stacks.c stime.c strings.c strop.c strorder.c strports.c struct.c symbols.c tag.c throw.c unif.c variable.c vectors.c version.c vports.c weaks.c +libguile_la_SOURCES = alist.c arbiters.c async.c backtrace.c boolean.c chars.c continuations.c debug.c dynl.c dynwind.c eq.c error.c eval.c evalext.c feature.c fluids.c fports.c gc.c gdbint.c gh_data.c gh_eval.c gh_funcs.c gh_init.c gh_io.c gh_list.c gh_predicates.c gsubr.c guardians.c hash.c hashtab.c init.c ioext.c keywords.c lang.c list.c load.c macros.c mallocs.c modules.c numbers.c objects.c objprop.c options.c pairs.c ports.c print.c procprop.c procs.c random.c read.c root.c scmsigs.c script.c simpos.c smob.c sort.c srcprop.c stackchk.c stacks.c stime.c strings.c strop.c strorder.c strports.c struct.c symbols.c tag.c throw.c variable.c vectors.c version.c vports.c weaks.c BUILT_SOURCES = cpp_err_symbols.c cpp_sig_symbols.c libpath.h alist.x arbiters.x async.x backtrace.x boolean.x chars.x continuations.x debug.x dynl.x dynwind.x eq.x error.x eval.x evalext.x feature.x filesys.x fluids.x fports.x gc.x gsubr.x guardians.x hash.x hashtab.x init.x ioext.x iselect.x keywords.x lang.x list.x load.x macros.x mallocs.x modules.x net_db.x numbers.x objects.x objprop.x options.x pairs.x ports.x posix.x print.x procprop.x procs.x random.x ramap.x read.x regex-posix.x root.x scmsigs.x script.x simpos.x smob.x socket.x sort.x srcprop.x stackchk.x stacks.x stime.x strings.x strop.x strorder.x strports.x struct.x symbols.x tag.x threads.x throw.x unif.x variable.x vectors.x version.x vports.x weaks.x -EXTRA_libguile_la_SOURCES = _scm.h alloca.c inet_aton.c memmove.c putenv.c strerror.c threads.c regex-posix.c iselect.c filesys.c posix.c net_db.c socket.c +EXTRA_libguile_la_SOURCES = _scm.h alloca.c inet_aton.c memmove.c putenv.c strerror.c threads.c regex-posix.c iselect.c filesys.c posix.c net_db.c socket.c ramap.c unif.c noinst_HEADERS = coop-threads.c coop-threads.h coop.c @@ -124,12 +125,12 @@ pkginclude_HEADERS = gh.h # These are headers visible as . modincludedir = $(includedir)/libguile -modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h chars.h continuations.h debug.h dynl.h dynwind.h eq.h error.h eval.h evalext.h feature.h filesys.h fports.h gc.h gdb_interface.h gdbint.h genio.h gsubr.h guardians.h hash.h hashtab.h init.h ioext.h keywords.h kw.h lang.h list.h load.h macros.h mallocs.h modules.h net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h regex-posix.h print.h procprop.h procs.h random.h ramap.h read.h root.h scmsigs.h script.h simpos.h smob.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h strop.h strorder.h strports.h struct.h symbols.h tag.h tags.h throw.h unif.h variable.h vectors.h version.h vports.h weaks.h snarf.h threads.h coop-defs.h fluids.h iselect.h +modinclude_HEADERS = __scm.h alist.h arbiters.h async.h backtrace.h boolean.h chars.h continuations.h debug.h dynl.h dynwind.h eq.h error.h eval.h evalext.h feature.h filesys.h fports.h gc.h gdb_interface.h gdbint.h genio.h gsubr.h guardians.h hash.h hashtab.h init.h ioext.h keywords.h kw.h lang.h list.h load.h macros.h mallocs.h modules.h net_db.h numbers.h objects.h objprop.h options.h pairs.h ports.h posix.h regex-posix.h print.h procprop.h procs.h random.h ramap.h read.h root.h scmsigs.h scm_validate.h script.h simpos.h smob.h socket.h sort.h srcprop.h stackchk.h stacks.h stime.h strings.h strop.h strorder.h strports.h struct.h symbols.h tag.h tags.h throw.h unif.h variable.h vectors.h version.h vports.h weaks.h snarf.h threads.h coop-defs.h fluids.h iselect.h modinclude_DATA = scmconfig.h -bin_SCRIPTS = guile-snarf +bin_SCRIPTS = guile-snarf guile-doc-snarf guile-doc-snarf.awk check_ldadd = libguile.la ${THREAD_LIBS_LOCAL} check_PROGRAMS = gh_test_c gh_test_repl @@ -141,7 +142,9 @@ gh_test_repl_LDADD = ${check_ldadd} EXTRA_DIST = ChangeLog-gh ChangeLog-scm ChangeLog-threads dynl-dl.c dynl-dld.c dynl-shl.c dynl-vms.c DYNAMIC-LINKING cpp_signal.c cpp_errno.c cpp_err_symbols.in cpp_sig_symbols.in cpp_cnvt.awk coop-threads.h.cygnus coop-threads.c.cygnus mit-pthreads.h mit-pthreads.c fsu-pthreads.h -SUFFIXES = .x +# ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ + +SUFFIXES = .x .doc MKDEP = gcc -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) @@ -153,7 +156,7 @@ CLEANFILES = libpath.h DISTCLEANFILES = *.x mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = scmconfig.h -CONFIG_CLEAN_FILES = guile-snarf versiondat.h +CONFIG_CLEAN_FILES = guile-snarf guile-doc-snarf versiondat.h LTLIBRARIES = $(lib_LTLIBRARIES) @@ -168,11 +171,11 @@ gdbint.lo gh_data.lo gh_eval.lo gh_funcs.lo gh_init.lo gh_io.lo \ gh_list.lo gh_predicates.lo gsubr.lo guardians.lo hash.lo hashtab.lo \ init.lo ioext.lo keywords.lo lang.lo list.lo load.lo macros.lo \ mallocs.lo modules.lo numbers.lo objects.lo objprop.lo options.lo \ -pairs.lo ports.lo print.lo procprop.lo procs.lo ramap.lo random.lo \ -read.lo root.lo scmsigs.lo script.lo simpos.lo smob.lo sort.lo \ -srcprop.lo stackchk.lo stacks.lo stime.lo strings.lo strop.lo \ -strorder.lo strports.lo struct.lo symbols.lo tag.lo throw.lo unif.lo \ -variable.lo vectors.lo version.lo vports.lo weaks.lo +pairs.lo ports.lo print.lo procprop.lo procs.lo random.lo read.lo \ +root.lo scmsigs.lo script.lo simpos.lo smob.lo sort.lo srcprop.lo \ +stackchk.lo stacks.lo stime.lo strings.lo strop.lo strorder.lo \ +strports.lo struct.lo symbols.lo tag.lo throw.lo variable.lo vectors.lo \ +version.lo vports.lo weaks.lo PROGRAMS = $(bin_PROGRAMS) guile_OBJECTS = guile.o @@ -197,12 +200,12 @@ HEADERS = $(include_HEADERS) $(modinclude_HEADERS) $(noinst_HEADERS) \ $(pkginclude_HEADERS) DIST_COMMON = ./stamp-h.in COPYING ChangeLog Makefile.am Makefile.in \ -guile-snarf.in scmconfig.h.in versiondat.h.in +guile-doc-snarf.in guile-snarf.in scmconfig.h.in versiondat.h.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) -TAR = tar +TAR = gtar GZIP_ENV = --best DEP_FILES = .deps/alist.P .deps/alloca.P .deps/arbiters.P .deps/async.P \ .deps/backtrace.P .deps/boolean.P .deps/chars.P .deps/continuations.P \ @@ -232,7 +235,7 @@ OBJECTS = $(libguile_la_OBJECTS) $(guile_OBJECTS) $(gh_test_c_OBJECTS) $(gh_test all: all-redirect .SUFFIXES: -.SUFFIXES: .S .c .lo .o .s .x +.SUFFIXES: .S .c .doc .lo .o .s .x $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign libguile/Makefile @@ -270,6 +273,8 @@ distclean-hdr: maintainer-clean-hdr: guile-snarf: $(top_builddir)/config.status guile-snarf.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status +guile-doc-snarf: $(top_builddir)/config.status guile-doc-snarf.in + cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status versiondat.h: $(top_builddir)/config.status versiondat.h.in cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status @@ -347,8 +352,8 @@ install-binPROGRAMS: $(bin_PROGRAMS) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ if test -f $$p; then \ - echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ - $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ + echo " $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`"; \ + $(LIBTOOL) --mode=install $(INSTALL_PROGRAM) $(INSTALL_STRIP_FLAG) $$p $(DESTDIR)$(bindir)/`echo $$p|sed 's/$(EXEEXT)$$//'|sed '$(transform)'|sed 's/$$/$(EXEEXT)/'`; \ else :; fi; \ done @@ -504,7 +509,7 @@ distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ - cp -pr $$/$$file $(distdir)/$$file; \ + cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ @@ -576,7 +581,7 @@ all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(DATA) \ $(HEADERS) scmconfig.h all-redirect: all-am install-strip: - $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install + $(MAKE) $(AM_MAKEFLAGS) INSTALL_STRIP_FLAG=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(bindir) \ $(DESTDIR)$(bindir) $(DESTDIR)$(modincludedir) \ @@ -690,8 +695,11 @@ libpath.h: $(srcdir)/Makefile.in $(top_builddir)/config.status @echo '}' >> libpath.tmp @mv libpath.tmp libpath.h .c.x: - ./guile-snarf $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< > $@ \ + ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< \ || { rm $@; false; } +.c.doc: + ./guile-doc-snarf $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $< \ + || { rm $@; false; } cpp_err_symbols.c: cpp_err_symbols.in $(AWK) -f $(srcdir)/cpp_cnvt.awk < $(srcdir)/cpp_err_symbols.in > \ diff --git a/libguile/guile-doc-snarf.awk b/libguile/guile-doc-snarf.awk new file mode 100644 index 000000000..6f36c9cd0 --- /dev/null +++ b/libguile/guile-doc-snarf.awk @@ -0,0 +1,36 @@ +#!/usr/bin/awk -f +BEGIN { FS="|"; + filename = ARGV[1]; ARGV[1] = ""; + dot_x_file = filename; dot_doc_file = filename; + sub(/\..*$/,".x",dot_x_file); + sub(/\..*$/,".doc",dot_doc_file); +} + +/^[ \t]*%%%/ { copy = $0; gsub(/[ \t]*%%%/, "", copy); gsub(/\$\$\$.*$/, "", copy); print copy > dot_x_file } + +/\$\$\$/,/@@@/ { copy = $0; + gsub(/.*\$\$\$./,"", copy); + gsub(/@@@.*/,"",copy); + gsub(/[ \t]+/," ", copy); + sub(/^[ \t]*/,"(", copy); +# gsub(/.\".*\"/, toupper("&"), copy); + gsub(/\"/,"",copy); + sub(/ \(/," ",copy); + numargs = gsub(/SCM /,"", copy); + numcommas = gsub(/,/,"", copy); + numactuals = $2 + $3 + $4; + location = $5; + gsub(/\"/,"",location); + gsub(/^[ \t]*/,"",location); + gsub(/[ \t]*\|.*$/,"",copy); + if (numargs != numactuals) { print location ":*** `" copy "' is improperly registered as having " numactuals " arguments"; } + print " " copy > dot_doc_file ; } + +/@@@/,/@!!![ \t]*$/ { copy = $0; + gsub(/.*@@@/,"",copy); + gsub(/^"/,"", copy); + gsub(/\"[ \t]*@!!![ \t]*$/,"", copy); + gsub(/\\\"/,"\"",copy); + print copy > dot_doc_file ; } +/@!!![ \t]*$/ { print "[" location "]\n" >> dot_doc_file; } + diff --git a/libguile/guile-doc-snarf.in b/libguile/guile-doc-snarf.in new file mode 100755 index 000000000..6933b2067 --- /dev/null +++ b/libguile/guile-doc-snarf.in @@ -0,0 +1,28 @@ +#!/bin/sh +# Extract the initialization actions for builtin things. + +filename=$1; shift + +# we need to be sure that the .x file exists +# since the .c/.cc file may include it +# (the old guile-snarf did not have this problem +# because the makefile redirects output to the .x file +# which creates the file before the inclusion occurs) +# --12/12/99 gjb +dot_x=${filename%.*}.x +touch --date=01/01/70 $dot_x + +temp="/tmp/snarf.$$" +trap "rm -f $temp" 0 1 2 15 + +## Let the user override the preprocessor autoconf found. +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} awk -f `dirname $0`/guile-doc-snarf.awk $filename + +## Apparently, AIX's preprocessor is unhappy if you try to #include an +## empty file. +echo diff --git a/libguile/guile-snarf.in b/libguile/guile-snarf.in index 0a776df71..ead21ef4b 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/^ *% *% *%//" +< ${temp} grep "^ *% *% *%" | sed -e "s/^ *% *% *%//" -e 's/\$\$\$.*$//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 999ffe3d7..2900820c1 100644 --- a/libguile/snarf.h +++ b/libguile/snarf.h @@ -65,48 +65,49 @@ SCM FNAME ARGLIST #define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF) \ static const char RANAME[]=STR; \ static SCM GF = 0 -#define SCM_PROC1(RANAME, STR, TYPE, CFN) \ - static const char RANAME[]=STR #define SCM_GPROC1(RANAME, STR, TYPE, CFN, GF) \ static const char RANAME[]=STR; \ static SCM GF = 0 #else #if defined(__cplusplus) || defined(GUILE_CPLUSPLUS_SNARF) +/* for C++ snarfing */ #define GUILE_PROC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ %%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)(...)) FNAME); \ -$$$ primname #ARGLIST req opt var @@@ docstring @!!! +$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! #define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ %%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \ -$$1 primname #ARGLIST type @@@ docstring @!!! +$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! #define SCM_REGISTER_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ -%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)(...)) CFN) \ -$$R RANAMEprimname #ARGLIST type @@@ docstring @!!! +%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)(...)) CFN); \ +$$$R RANAME CFN STR REQ OPT VAR @!!! #define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF) \ %%% scm_make_gsubr_with_generic (RANAME, REQ, OPT, VAR, (SCM (*)(...))CFN, &GF) -#define SCM_PROC1(RANAME, STR, TYPE, CFN) \ -%%% scm_make_subr(RANAME, TYPE, (SCM (*)(...))CFN) + #define SCM_GPROC1(RANAME, STR, TYPE, CFN, GF) \ %%% scm_make_subr_with_generic(RANAME, TYPE, (SCM (*)(...))CFN, &GF) + #else +/* for ANSI C snarfing, not C++ */ #define GUILE_PROC(FNAME, PRIMNAME, REQ, OPT, VAR, ARGLIST, DOCSTRING) \ -%%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)()) FNAME); -#define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ -%%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); +%%% scm_make_gsubr (s_ ## FNAME, REQ, OPT, VAR, (SCM (*)()) FNAME); \ +$$$P PRIMNAME #ARGLIST | REQ | OPT | VAR | __FILE__:__LINE__ | @@@ DOCSTRING @!!! +#define GUILE_PROC1(FNAME, PRIMNAME, TYPE, ARGLIST, DOCSTRING) \ +%%% scm_make_subr (s_ ## FNAME, TYPE, FNAME); \ +$$$1 PRIMNAME #ARGLIST | 2 | 0 | 0 | __FILE__:__LINE__ | @@@ DOCSTRING @!!! -#define SCM_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ -%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)()) CFN) #define SCM_REGISTER_PROC(RANAME, STR, REQ, OPT, VAR, CFN) \ -%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)()) CFN) +%%% scm_make_gsubr (RANAME, REQ, OPT, VAR, (SCM (*)()) CFN); \ +$$$R RANAME CFN STR REQ OPT VAR @!!! + #define SCM_GPROC(RANAME, STR, REQ, OPT, VAR, CFN, GF) \ %%% scm_make_gsubr_with_generic (RANAME, REQ, OPT, VAR, (SCM (*)()) CFN, &GF) -#define SCM_PROC1(RANAME, STR, TYPE, CFN) \ -%%% scm_make_subr(RANAME, TYPE, CFN) + #define SCM_GPROC1(RANAME, STR, TYPE, CFN, GF) \ %%% scm_make_subr_with_generic(RANAME, TYPE, CFN, &GF) #endif -- 2.20.1