aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitmodules3
-rw-r--r--Makefile.am4
-rw-r--r--am/guile.m4112
-rw-r--r--configure.ac10
m---------gint0
-rw-r--r--modules/expat2
-rw-r--r--modules/sql2
-rw-r--r--modules/syslog2
-rw-r--r--scripts/Makefile.am2
-rwxr-xr-xscripts/bootstrap3
-rwxr-xr-xscripts/guile-doc-snarf72
-rw-r--r--scripts/guile-doc-snarf.awk88
-rw-r--r--src/.gitignore2
-rw-r--r--src/Makefile.am43
-rw-r--r--src/documentation.sci28
-rw-r--r--src/expat.sci3
-rw-r--r--src/gamma-expat.c26
-rw-r--r--src/gsql_conn.c6
-rw-r--r--src/sql.sci4
-rw-r--r--src/syslog-port.c2
-rw-r--r--src/syslog.c14
-rw-r--r--src/syslog.sci6
22 files changed, 83 insertions, 351 deletions
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..7c369d4
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "gint"]
+ path = gint
+ url = git://git.gnu.org.ua/gint.git
diff --git a/Makefile.am b/Makefile.am
index 19cb54b..da83ed3 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -14,9 +14,9 @@
# You should have received a copy of the GNU General Public License
# along with Gamma. If not, see <http://www.gnu.org/licenses/>.
-ACLOCAL_AMFLAGS = -I m4 -I am
+ACLOCAL_AMFLAGS = -I m4 -I am -I gint
-SUBDIRS = src scripts examples doc
+SUBDIRS = gint src scripts examples doc
# Define the following variables in order to use the ChangeLog rule below:
# prev_change_log [optional] Name of the previous ChangeLog file.
diff --git a/am/guile.m4 b/am/guile.m4
deleted file mode 100644
index 4329d6f..0000000
--- a/am/guile.m4
+++ /dev/null
@@ -1,112 +0,0 @@
-dnl This file is part of GNU mailutils.
-dnl Copyright (C) 2001, 2004, 2007, 2010 Free Software Foundation, Inc.
-dnl
-dnl This program is free software; you can redistribute it and/or modify it
-dnl under the terms of the GNU General Public License as published by the
-dnl Free Software Foundation; either version 3 of the License, or (at your
-dnl option) any later version.
-dnl
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
-dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-dnl GNU General Public License for more details.
-dnl
-dnl You should have received a copy of the GNU General Public License along
-dnl with this program. If not, see <http://www.gnu.org/licenses/>.
-dnl
-
-dnl MU_RESULT_ACTIONS -- generate shell code for the result of a test
-dnl $1 -- CVAR -- cache variable to check
-dnl $2 -- NAME -- if not empty, used to generate a default value TRUE:
-dnl `AC_DEFINE(HAVE_NAME)'
-dnl $2 -- TRUE -- what to do if the CVAR is not `no'
-dnl $3 -- FALSE -- what to do otherwise; defaults to `:'
-dnl
-AC_DEFUN([MU_RESULT_ACTIONS], [
-[if test "$$1" != "" -a "$$1" != no; then
- ]ifelse([$3], ,
- [AC_DEFINE(HAVE_]translit($2, [a-z ./<>], [A-Z___])[,1,[FIXME])],
- [$3])[
-else
- ]ifelse([$4], , [:], [$4])[
-fi]])dnl
-
-AC_DEFUN([MU_CHECK_GUILE],
-[
- if test "x$mu_cv_lib_guile" = x; then
- cached=""
- AC_PATH_PROG(GUILE_CONFIG, guile-config, no, $PATH)
- if test $GUILE_CONFIG = no; then
- mu_cv_lib_guile=no
- else
- GUILE_INCLUDES=`guile-config compile`
- GUILE_LIBS=`guile-config link`
- fi
- gpath=`dirname $GUILE_CONFIG`:$PATH
- AC_PATH_PROG(GUILE_SNARF, guile-snarf, no, $gpath)
-
- if test $GUILE_CONFIG != no; then
- AC_MSG_CHECKING(for guile version 1.8 or higher)
- GUILE_VERSION=`($GUILE_CONFIG --version 2>&1; echo '')|sed -n 's/guile-config - Guile version \([[0-9]][[0-9]]*\)\.\([[0-9]][[0-9]]*\).*/\1\2/p'`
- case "x$GUILE_VERSION" in
- x[[0-9]]*)
- if test $GUILE_VERSION -lt 18; then
- AC_MSG_RESULT(Nope. Version number too low.)
- mu_cv_lib_guile=no
- else
- AC_DEFINE_UNQUOTED(GUILE_VERSION, $GUILE_VERSION,
- [Guile version number: MAX*10 + MIN])
- AC_MSG_RESULT(OK)
- save_LIBS=$LIBS
- save_CFLAGS=$CFLAGS
- LIBS="$LIBS $GUILE_LIBS"
- CFLAGS="$CFLAGS $GUILE_INCLUDES"
- AC_TRY_LINK([#include <libguile.h>],
- ifelse([$1], , scm_shell(0, NULL);, [$1]),
- [mu_cv_lib_guile=yes],
- [mu_cv_lib_guile=no])
- LIBS=$save_LIBS
- CFLAGS=$save_CFLAGS
- fi ;;
- *) AC_MSG_RESULT(Nope. Unknown version number)
- mu_cv_lib_guile=no;;
- esac
- fi
- else
- cached=" (cached) "
- GUILE_INCLUDES=`$GUILE_CONFIG compile`
- GUILE_LIBS=`$GUILE_CONFIG link`
- fi
- AC_MSG_CHECKING(whether to build guile support)
- MU_RESULT_ACTIONS([mu_cv_lib_guile],[LIBGUILE],[$2],[$3])
- AC_MSG_RESULT(${cached}$mu_cv_lib_guile)
-
- if test $mu_cv_lib_guile = yes; then
- AC_CHECK_TYPES([scm_t_off],[],[],[#include <libguile.h>])
- AC_ARG_WITH([guiledir],
- AC_HELP_STRING([--with-guiledir=DIR],
- [specify directory to install guile modules to]),
- [case $withval in
- /*) GUILE_SITE=$withval;;
- yes) GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site;;
- *) AC_MSG_ERROR([Argument to --with-guiledir must be an absolute directory name]);;
- esac],
- [GUILE_SITE=`$GUILE_CONFIG info pkgdatadir`/site
- pfx=$prefix
- test "x$pfx" = xNONE && pfx=$ac_default_prefix
- case $GUILE_SITE in
- $pfx/*) ;; # OK
- *) AC_MSG_WARN([guile site directory "$GUILE_SITE" lies outside your current prefix ($pfx).])
- GUILE_SITE='$(datadir)/guile/site'
- AC_MSG_WARN([Falling back to ${GUILE_SITE} instead. Use --with-guiledir to force using site directory.])
- ;;
- esac])
- fi
-
- AC_SUBST(GUILE_SITE)
- AC_SUBST(GUILE_INCLUDES)
- AC_SUBST(GUILE_LIBS)
-])
-
-
-
diff --git a/configure.ac b/configure.ac
index 414189e..81c9dfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,6 +35,8 @@ AC_PROG_LN_S
AM_PROG_LIBTOOL
AM_C_PROTOTYPES
+GINT_INIT(gint,[1.8],,[AC_MSG_ERROR([Guile not found])])
+
AC_SUBST(INCLUDEPATH)
AC_MSG_CHECKING(for additional includes)
AC_ARG_WITH([include-path],
@@ -56,13 +58,6 @@ AC_ARG_WITH([lib-path],
done])
AC_MSG_RESULT($LIBS)
-dnl Checks for libraries.
-MU_CHECK_GUILE
-
-if test $mu_cv_lib_guile != yes; then
- AC_MSG_ERROR([Guile not found])
-fi
-
dnl Checks for library functions.
AC_HEADER_STDC
@@ -101,6 +96,7 @@ fi
AC_CONFIG_FILES(Makefile
+ gint/Makefile
src/Makefile
scripts/Makefile
examples/Makefile
diff --git a/gint b/gint
new file mode 160000
+Subproject c6a7620deb7e3e139329e2daad31d4071f01b43
diff --git a/modules/expat b/modules/expat
index 5e98150..e4f6686 100644
--- a/modules/expat
+++ b/modules/expat
@@ -42,6 +42,6 @@ scm:
expat.sci
makefile:
-expat.scm: Makefile $(libgamma_expat_la_SOURCES:.c=.inc)
+expat.scm: Makefile
libgamma_expat_la_LIBADD = @LTLIBOBJS@ @GUILE_LIBS@ $(EXPAT_LIBS)
libgamma_expat_la_CPPFLAGS = $(EXPAT_INCS)
diff --git a/modules/sql b/modules/sql
index f01b695..1931df6 100644
--- a/modules/sql
+++ b/modules/sql
@@ -54,7 +54,7 @@ guile-sql.h
app.h
makefile:
-sql.scm: Makefile $(libgamma_sql_la_SOURCES:.c=.inc)
+sql.scm: Makefile
EXTRA_DIST += mysql.c pgsql.c
libgamma_sql_la_LIBADD = @SQLOBJS@ @LTLIBOBJS@ @GUILE_LIBS@ @SQLLIBS@
diff --git a/modules/syslog b/modules/syslog
index bed3202..f6f92aa 100644
--- a/modules/syslog
+++ b/modules/syslog
@@ -13,4 +13,4 @@ scm:
syslog.sci
makefile:
-syslog.scm: Makefile $(libgamma_syslog_la_SOURCES:.c=.inc)
+syslog.scm: Makefile
diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index a4552de..3364ed8 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -16,6 +16,4 @@
EXTRA_DIST = \
bootstrap\
- guile-doc-snarf\
- guile-doc-snarf.awk\
gitlog-to-changelog
diff --git a/scripts/bootstrap b/scripts/bootstrap
index 288f0e9..9c37074 100755
--- a/scripts/bootstrap
+++ b/scripts/bootstrap
@@ -37,7 +37,8 @@ exec ${GUILE-guile} -l $0 -c "(apply $main (cons \"$0\" (cdr (command-line))))"
(define autogenerated-file-header
(list "-*- buffer-read-only: t -*- vi: set ro:"
"DO NOT EDIT! GENERATED AUTOMATICALLY!"))
-(define reconfig-command "autoreconf -f -i -s")
+(define reconfig-command
+ "git submodule init && git submodule update && autoreconf -f -i -s")
(define files-from #f)
(define create-parents #f)
diff --git a/scripts/guile-doc-snarf b/scripts/guile-doc-snarf
deleted file mode 100755
index 6cc184f..0000000
--- a/scripts/guile-doc-snarf
+++ /dev/null
@@ -1,72 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2002, 2010 Sergey Poznyakoff
-#
-# This is a snarfer for guile version 1.6
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-OUTFILE=/dev/tty
-DOCFILE=0
-BASEDIR=`dirname $0`
-test -n "${CPP+set}" || CPP="gcc -E"
-test -n "${AWK+set}" || AWK=awk
-temp=/tmp/snarf.$$
-trap "rm -f $temp" 0 1 2 15
-
-# process aruments
-while [ $# -gt 0 ];
-do
- case $1 in
- -o) OUTFILE=$2; shift 2;;
- -d) DOCFILE=1; shift;;
- *) break;;
- esac
-done
-
-INFILE=$1; shift
-
-cpp_exit=1
-
-snarf_x() {
- echo "/* source: $INFILE */" ;
- echo "/* cpp arguments: $@ */" ;
- $CPP -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp}
- cpp_exit=$?
- grep "^ *\^ *\^" ${temp} | sed -e "s/^ *\^ *\^//" -e "s/\^\ *:\ *\^.*/;/"
-}
-
-snarf_doc() {
- $CPP -DSCM_MAGIC_SNARF_DOCS "$@" > ${temp}
- cpp_exit=$?
- $AWK '
-NF<2 {next}
-state == 0 && /\^\^ {/ { state = 1; print; next }
-state == 0 && /\^\^/ { print }
-state == 1 && /\^\^ }/ { state = 0; print; next }
-state == 1 { print }
-state == 0 { next }' $temp |\
- tr -d '\n' | tr '^' '\n' |\
- awk -f $BASEDIR/guile-doc-snarf.awk > $OUTFILE
-}
-
-case "$DOCFILE" in
- 0) snarf_x $INFILE "$@" > $OUTFILE;;
- 1) snarf_doc $INFILE "$@" > $OUTFILE;;
-esac
-
-if [ $cpp_exit -ne 0 ]; then
- [ "$OUTFILE" != "/dev/tty" ] && rm $OUTFILE
-fi
-exit $cpp_exit
diff --git a/scripts/guile-doc-snarf.awk b/scripts/guile-doc-snarf.awk
deleted file mode 100644
index 2c8455e..0000000
--- a/scripts/guile-doc-snarf.awk
+++ /dev/null
@@ -1,88 +0,0 @@
-# Copyright (C) 2002, 2010 Sergey Poznyakoff
-#
-# This is a snarfer for guile version 1.6
-#
-# This program is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by the
-# Free Software Foundation; either version 3 of the License, or (at your
-# option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program. If not, see <http://www.gnu.org/licenses/>.
-
-BEGIN {
- cname = ""
-}
-
-function flush() {
- if (cname == "")
- return;
- if (arg_req + arg_opt + arg_var != numargs)
- error(cname " incorrectly defined as taking " numargs " arguments")
-
- print "\f" cname
- print "@c snarfed from " loc_source ":" loc_line
- printf "@deffn {Scheme procedure} %s", cname
- for (i = 1; i <= numargs; i++)
- printf(" %s", arglist[i])
- print ""
- print docstring
- print "@end deffn\n"
-
- delete argpos
- delete arglist
- cname = ""
-}
-
-function error(s) {
- print loc_source ":" loc_line ": " s > "/dev/stderr"
- exit 1
-}
-
-state == 0 && /{/ {
- flush()
- cname = $3
- next
-}
-
-state == 0 && /fname/ { fname = $2; next }
-state == 0 && /type/ { type = $2; next }
-state == 0 && /location/ { loc_source = $2; loc_line = $3 }
-state == 0 && /arglist/ {
- match($0, "\\(.*\\)")
- s = substr($0,RSTART+1,RLENGTH-2)
- numargs = split(s, a, ",")
- for (i = 1; i <= numargs; i++) {
- m = split(a[i], b, "[ \t]*")
- if (b[1] == "") {
- t = b[2]
- n = b[3]
- m--
- } else {
- t = b[1]
- n = b[2]
- }
- if (m > 2 || t != "SCM")
- error(cname ": wrong argument type for arg " i " " t)
- arglist[i] = n
- }
-}
-state == 0 && /argsig/ { arg_req = $2; arg_opt = $3; arg_var = $4 }
-
-state == 0 && /.*\"/ {
- gsub("\"\"", "")
- gsub("\\\\n", "\n")
- match($0,"\".*\"")
- docstring = substr($0,RSTART+1,RLENGTH-2)
-}
-
-/argpos/ { argpos[$2] = $3 }
-
-END {
- flush()
-}
diff --git a/src/.gitignore b/src/.gitignore
index de50b14..d819308 100644
--- a/src/.gitignore
+++ b/src/.gitignore
@@ -5,6 +5,8 @@
.libs
*.la
guile-procedures.txt
+guile-procedures.texi
+documentation.scm
sql.scm
syslog.scm
modules.mk
diff --git a/src/Makefile.am b/src/Makefile.am
index 65954b1..7ae8351 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -14,7 +14,7 @@
# You should have received a copy of the GNU General Public License
# along with Gamma. If not, see <http://www.gnu.org/licenses/>.
-INCLUDES =-I$(top_builddir) -I$(srcdir) -I. @GUILE_INCLUDES@ @INCLUDEPATH@
+INCLUDES =-I$(top_builddir) -I$(srcdir) -I. @INCLUDEPATH@
EXTRA_DIST=
EXTRA_LTLIBRARIES=
@@ -22,46 +22,23 @@ lib_LTLIBRARIES=@GAMMA_LIB_LIST@
install-data-hook: @GAMMA_INSTALL_HOOKS@
include modules.mk
-EXTRA_DIST += modules.mk
+EXTRA_DIST += modules.mk documentation.sci
+
+sitedir=$(GUILE_SITE)/$(PACKAGE)
+site_DATA=$(GAMMA_BUILT_DATA_FILES) documentation.scm
.sci.scm:
$(AM_V_GEN)m4 -DVERSION=$(VERSION) -DLIBDIR=$(libdir) \
- -DBUILDDIR="`pwd`" $< > $@
+ -DBUILDDIR="`pwd`" -DSITEDIR='$(sitedir)' $< > $@
-guiledir=$(GUILE_SITE)/$(PACKAGE)
-guile_DATA=guile-procedures.txt $(GAMMA_BUILT_DATA_FILES)
DOT_X_FILES=$(GAMMA_X_FILES)
DOT_DOC_FILES=$(DOT_X_FILES:.x=.doc)
-CLEANFILES=*.inc *.x *.doc
-
-BUILT_SOURCES=$(DOT_X_FILES) $(DOT_DOC_FILES)
-DISTCLEANFILES=$(BUILT_SOURCES) guile-procedures.txt $(GAMMA_BUILT_DATA_FILES)
+DISTCLEANFILES=$(site_DATA)
AM_CPPFLAGS=-DDATADIR=\"$(guiledir)\"
-ETAGS_ARGS = --regex='/SCM_\(GLOBAL_\)?\(G?PROC\|G?PROC1\|SYMBOL\|VCELL\|CONST_LONG\).*\"\([^\"]\)*\"/\3/' \
- --regex='/[ \t]*SCM_[G]?DEFINE1?[ \t]*(\([^,]*\),[^,]*/\1/'
-
-GUILE_DOC_SNARF=$(top_srcdir)/scripts/guile-doc-snarf
-SUFFIXES=.x .doc .inc .sci .scm
-
-.c.x:
- $(AM_V_GEN)AWK=$(AWK) \
- $(GUILE_SNARF) -o $@ \
- $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-
-.c.doc:
- $(AM_V_GEN)AWK=$(AWK) \
- $(GUILE_DOC_SNARF) -d -o $@ \
- $< $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-
-.c.inc:
- $(AM_V_GEN)sed -n 's/SCM_DEFINE *(.[^,]*, *\"\([^"][^"]*\)\".*/[(export \1)]/p;s/^[ ]*GAMMA_CONST *(\(.[^)]*\)).*/[(export \1])/p;s/.*GAMMA_EXPORT *("\(.*\)").*/[(export \1)]/p' $< > $@
-
-guile-procedures.txt: $(DOT_DOC_FILES)
- $(AM_V_GEN)cat $(DOT_DOC_FILES) > $@
-
-## Add -MG to make the .x magic work with auto-dep code.
-MKDEP = $(CC) -M -MG $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
+SUFFIXES=
+CLEANFILES=
+include ../gint/gint.mk
diff --git a/src/documentation.sci b/src/documentation.sci
new file mode 100644
index 0000000..809a6bf
--- /dev/null
+++ b/src/documentation.sci
@@ -0,0 +1,28 @@
+;;;; This file is part of Gamma. -*- scheme -*-
+;;;; Copyright (C) 2002, 2008, 2010 Sergey Poznyakoff
+;;;;
+;;;; Gamma is free software; you can redistribute it and/or modify
+;;;; it under the terms of the GNU General Public License as published by
+;;;; the Free Software Foundation; either version 3, or (at your option)
+;;;; any later version.
+;;;;
+;;;; Gamma is distributed in the hope that it will be useful,
+;;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;;;; GNU General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU General Public License
+;;;; along with Gamma. If not, see <http://www.gnu.org/licenses/>.
+
+changequote([,])dnl
+
+(define-module (gamma documentation)
+ :use-module (ice-9 documentation))
+
+(let ((docfile "SITEDIR/guile-procedures.txt"))
+ (if (not (member docfile documentation-files))
+ (set! documentation-files (append documentation-files
+ (list docfile)))))
+
+
+;;;; End of documentation.scm
diff --git a/src/expat.sci b/src/expat.sci
index 0826c28..6f729fd 100644
--- a/src/expat.sci
+++ b/src/expat.sci
@@ -18,6 +18,7 @@ changequote([,])dnl
(define-module (gamma expat)
:use-module (ice-9 rdelim)
+ :use-module (gamma documentation)
:use-module (srfi srfi-1)
:export (xml-make-parser
xml-parse-more
@@ -31,8 +32,6 @@ changequote([,])dnl
(load-extension (string-append
lib-path "libgamma-expat-v-VERSION") "gamma_expat_init"))
-include(BUILDDIR/gamma-expat.inc)
-
(define (xml-make-parser . rest)
(if (null? rest)
(xml-primitive-make-parser)
diff --git a/src/gamma-expat.c b/src/gamma-expat.c
index 84a2a9d..2dcfbfa 100644
--- a/src/gamma-expat.c
+++ b/src/gamma-expat.c
@@ -110,14 +110,14 @@ make_user_data ()
SCM_GLOBAL_SYMBOL(gamma_xml_error, "gamma-xml-error");
-SCM_DEFINE(scm_xml_expat_version_string, "xml-expat-version-string", 0, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_expat_version_string, "xml-expat-version-string", 0, 0, 0,
(),
"Return the version of the expat library as a string.")
{
return scm_from_locale_string(XML_ExpatVersion());
}
-SCM_DEFINE(scm_xml_expat_version, "xml-expat-version", 0, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_expat_version, "xml-expat-version", 0, 0, 0,
(),
"Return expat library version information.")
{
@@ -127,7 +127,7 @@ SCM_DEFINE(scm_xml_expat_version, "xml-expat-version", 0, 0, 0,
scm_from_int(vinfo.micro));
}
-SCM_DEFINE(scm_xml_primitive_make_parser, "xml-primitive-make-parser", 0, 2, 0,
+SCM_DEFINE_PUBLIC(scm_xml_primitive_make_parser, "xml-primitive-make-parser", 0, 2, 0,
(SCM enc, SCM sep),
"Return a new parser. If @var{enc} is given, it must be one of:"
" \"US-ASCII\", \"UTF-8\", \"UTF-16\", \"ISO-8859-1\". If @var{sep}"
@@ -159,7 +159,7 @@ SCM_DEFINE(scm_xml_primitive_make_parser, "xml-primitive-make-parser", 0, 2, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0,
(SCM parser, SCM enc),
"Set the encoding to be used by the @var{parser}.")
#define FUNC_NAME s_scm_xml_set_encoding
@@ -187,7 +187,7 @@ SCM_DEFINE(scm_xml_set_encoding, "xml-set-encoding", 2, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0,
(SCM parser, SCM input, SCM isfinal),
"Parse next piece of input")
#define FUNC_NAME s_scm_xml_primitive_parse
@@ -233,7 +233,7 @@ SCM_DEFINE(scm_xml_primitive_parse, "xml-primitive-parse", 3, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_default_current, "xml-default-current", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_default_current, "xml-default-current", 1, 0, 0,
(SCM parser),
"Pass current markup to the default handler.")
#define FUNC_NAME s_scm_xml_default_current
@@ -248,7 +248,7 @@ SCM_DEFINE(scm_xml_default_current, "xml-default-current", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_error_string, "xml-error-string", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_error_string, "xml-error-string", 1, 0, 0,
(SCM code),
"Return a textual description corresponding to the error @code{code}.")
#define FUNC_NAME s_scm_xml_error_string
@@ -260,7 +260,7 @@ SCM_DEFINE(scm_xml_error_string, "xml-error-string", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_current_line_number, "xml-current-line-number", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_current_line_number, "xml-current-line-number", 1, 0, 0,
(SCM parser),
"Return the current line number in the input stream. "
"The first line is reported as 1.")
@@ -275,7 +275,7 @@ SCM_DEFINE(scm_xml_current_line_number, "xml-current-line-number", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_current_column_number, "xml-current-column-number", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_current_column_number, "xml-current-column-number", 1, 0, 0,
(SCM parser),
"Return the current column number in the input stream. "
"The first column is reported as 0.")
@@ -290,7 +290,7 @@ SCM_DEFINE(scm_xml_current_column_number, "xml-current-column-number", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_xml_current_byte_count, "xml-current-byte-count", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_current_byte_count, "xml-current-byte-count", 1, 0, 0,
(SCM parser),
"Return the number of bytes in the current event. "
"Returns 0 if the event is inside a reference to an internal "
@@ -884,7 +884,7 @@ find_generic_handler_setter(SCM key)
return -1;
}
-SCM_DEFINE(scm_xml_primitive_set_handler, "xml-primitive-set-handler", 3, 0, 0,
+SCM_DEFINE_PUBLIC(scm_xml_primitive_set_handler, "xml-primitive-set-handler", 3, 0, 0,
(SCM parser, SCM key, SCM handler),
"Set XML handler for event @code{key}.")
#define FUNC_NAME s_scm_xml_primitive_set_handler
@@ -984,9 +984,11 @@ gamma_expat_init()
{
int i;
- for (i = 0; i < sizeof(expat_code_tab)/sizeof(expat_code_tab[0]); i++)
+ for (i = 0; i < sizeof(expat_code_tab)/sizeof(expat_code_tab[0]); i++) {
scm_c_define (expat_code_tab[i].name,
scm_from_int(expat_code_tab[i].val));
+ scm_c_export (expat_code_tab[i].name, NULL);
+ }
gamma_xml_parser_init();
init_generic_handler_setter();
diff --git a/src/gsql_conn.c b/src/gsql_conn.c
index 7b3ca5c..86bf926 100644
--- a/src/gsql_conn.c
+++ b/src/gsql_conn.c
@@ -134,7 +134,7 @@ gamma_cvt_iface(SCM inval, void *outval, const char *func_name)
}
-SCM_DEFINE (sql_open_connection, "sql-open-connection", 1, 0, 0,
+SCM_DEFINE_PUBLIC (sql_open_connection, "sql-open-connection", 1, 0, 0,
(SCM PARAM),
"Connect to a database.")
#define FUNC_NAME s_sql_open_connection
@@ -158,7 +158,7 @@ SCM_DEFINE (sql_open_connection, "sql-open-connection", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE (sql_close_connection, "sql-close-connection", 1, 0, 0,
+SCM_DEFINE_PUBLIC (sql_close_connection, "sql-close-connection", 1, 0, 0,
(SCM CONN),
"Close connection to a database.")
#define FUNC_NAME s_sql_close_connection
@@ -171,7 +171,7 @@ SCM_DEFINE (sql_close_connection, "sql-close-connection", 1, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE (sql_query, "sql-query", 2, 0, 0,
+SCM_DEFINE_PUBLIC (sql_query, "sql-query", 2, 0, 0,
(SCM CONN, SCM QUERY),
"Run an SQL query")
#define FUNC_NAME s_sql_query
diff --git a/src/sql.sci b/src/sql.sci
index 209116a..fd23795 100644
--- a/src/sql.sci
+++ b/src/sql.sci
@@ -17,6 +17,7 @@
changequote([,])dnl
(define-module (gamma sql)
+ :use-module (gamma documentation)
:export-syntax (sql-catch-failure sql-ignore-failure))
(use-syntax (ice-9 syncase))
@@ -24,9 +25,6 @@ changequote([,])dnl
(load-extension (string-append
lib-path "libgamma-sql-v-VERSION") "sql_init"))
-include(BUILDDIR/gsql_lib.inc)
-include(BUILDDIR/gsql_conn.inc)
-
(define-syntax sql-catch-failure
(syntax-rules ()
((sql-catch-failure (handler) expr)
diff --git a/src/syslog-port.c b/src/syslog-port.c
index 186ca37..3088f48 100644
--- a/src/syslog-port.c
+++ b/src/syslog-port.c
@@ -166,7 +166,7 @@ _syslog_port_print(SCM exp, SCM port, scm_print_state *pstate)
return 1;
}
-SCM_DEFINE(scm_open_syslog_port, "open-syslog-port", 1, 0, 0,
+SCM_DEFINE_PUBLIC(scm_open_syslog_port, "open-syslog-port", 1, 0, 0,
(SCM prio),
"Create and open an output port connected to syslog priority "
"@code{prio}.")
diff --git a/src/syslog.c b/src/syslog.c
index 21b835c..088b7b2 100644
--- a/src/syslog.c
+++ b/src/syslog.c
@@ -23,7 +23,7 @@
static char *log_tag;
-SCM_DEFINE(scm_openlog, "openlog", 3, 0, 0,
+SCM_DEFINE_PUBLIC(scm_openlog, "openlog", 3, 0, 0,
(SCM IDENT, SCM OPTION, SCM FACILITY),
"Opens a connection to the system logger for Guile program.\n"
"IDENT, OPTION and FACILITY have the same meaning as in openlog(3)")
@@ -40,7 +40,7 @@ SCM_DEFINE(scm_openlog, "openlog", 3, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_openlog_p, "openlog?", 0, 0, 0,
+SCM_DEFINE_PUBLIC(scm_openlog_p, "openlog?", 0, 0, 0,
(),
"Returns #t if @code{openlog} was called.")
#define FUNC_NAME s_scm_openlog_p
@@ -49,7 +49,7 @@ SCM_DEFINE(scm_openlog_p, "openlog?", 0, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_syslog_tag, "syslog-tag", 0, 0, 0,
+SCM_DEFINE_PUBLIC(scm_syslog_tag, "syslog-tag", 0, 0, 0,
(),
"Returns the tag given to the recent @code{openlog}.")
#define FUNC_NAME s_scm_syslog_tag
@@ -62,7 +62,7 @@ SCM_DEFINE(scm_syslog_tag, "syslog-tag", 0, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_syslog, "syslog", 2, 0, 0,
+SCM_DEFINE_PUBLIC(scm_syslog, "syslog", 2, 0, 0,
(SCM PRIO, SCM TEXT),
"Distributes TEXT via syslogd priority PRIO.")
#define FUNC_NAME s_scm_syslog
@@ -81,7 +81,7 @@ SCM_DEFINE(scm_syslog, "syslog", 2, 0, 0,
}
#undef FUNC_NAME
-SCM_DEFINE(scm_closelog, "closelog", 0, 0, 0,
+SCM_DEFINE_PUBLIC(scm_closelog, "closelog", 0, 0, 0,
(),
"Closes the channel to the system logger opened by @code{openlog}.")
#define FUNC_NAME s_scm_closelog
@@ -152,9 +152,11 @@ syslog_init()
int i;
extern void _gamma_init_syslog_port();
- for (i = 0; i < sizeof (syslog_kw)/sizeof(syslog_kw[0]); i++)
+ for (i = 0; i < sizeof (syslog_kw)/sizeof(syslog_kw[0]); i++) {
scm_c_define (syslog_kw[i].name,
scm_from_int(syslog_kw[i].facility));
+ scm_c_export (syslog_kw[i].name, NULL);
+ }
_gamma_init_syslog_port();
#include <syslog.x>
}
diff --git a/src/syslog.sci b/src/syslog.sci
index 8f502ba..317dd6f 100644
--- a/src/syslog.sci
+++ b/src/syslog.sci
@@ -16,13 +16,11 @@
changequote([,])dnl
-(define-module (gamma syslog))
+(define-module (gamma syslog)
+ :use-module (gamma documentation))
(let ((lib-path "LIBDIR/"))
(load-extension (string-append
lib-path "libgamma-syslog-v-VERSION") "syslog_init"))
-include(BUILDDIR/syslog.inc)
-include(BUILDDIR/syslog-port.inc)
-
;;;; End of syslog.scm

Return to:

Send suggestions and report system problems to the System administrator.