summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2010-03-15 14:40:39 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2010-03-15 15:08:46 (GMT)
commit04b9cd97aa9287668ce41e3db7e273324d3136bc (patch) (side-by-side diff)
treef5df013d2eb3f594914ccbc40c42c776e5a12e98
parente3fcfbbc3b488928f8cb53c7ab76af8de7fec4ce (diff)
downloadgamma-04b9cd97aa9287668ce41e3db7e273324d3136bc.tar.gz
gamma-04b9cd97aa9287668ce41e3db7e273324d3136bc.tar.bz2
Add documentation.
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--Makefile.am2
-rw-r--r--NEWS4
-rw-r--r--README88
-rw-r--r--README-alpha75
-rw-r--r--README-hacking2
-rw-r--r--am/guile.m42
-rw-r--r--configure.ac36
-rw-r--r--doc/.gitignore21
-rw-r--r--doc/Makefile.am130
-rw-r--r--doc/expat.texi285
-rw-r--r--doc/fdl.texi449
-rw-r--r--doc/gamma.texi125
-rwxr-xr-xdoc/gendocs_template78
-rw-r--r--doc/macros.texi3
-rw-r--r--doc/mastermenu.el90
-rw-r--r--doc/rendition.texi94
-rw-r--r--doc/sql.texi131
-rw-r--r--doc/syslog.texi136
-rw-r--r--doc/untabify.el13
-rw-r--r--src/syslog.c27
20 files changed, 1763 insertions, 28 deletions
diff --git a/Makefile.am b/Makefile.am
index 5419ad7..19cb54b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -16,7 +16,7 @@
ACLOCAL_AMFLAGS = -I m4 -I am
-SUBDIRS = src scripts examples
+SUBDIRS = 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/NEWS b/NEWS
index d0cb342..3cd6491 100644
--- a/NEWS
+++ b/NEWS
@@ -1,10 +1,12 @@
-Gamma NEWS -- history of user-visible changes. 2010-03-13
+Gamma NEWS -- history of user-visible changes. 2010-03-15
Copyright (C) 2004, 2007, 2010 Sergey Poznyakoff
See the end of file for copying conditions.
Please send radius bug reports to <gray@gnu.org.ua>
+Version 1.99.99
+
* New modules: expat and syslog
diff --git a/README b/README
index 4f2b6f1..14ed675 100644
--- a/README
+++ b/README
@@ -1,36 +1,71 @@
-GAMMA = Guile Archive of Multiple Modules with 'A' just for the 'A' of it.
+Gamma README
+Copyright (C) 2002, 2004, 2007, 2010 Sergey Poznyakoff
+See end of file for copying conditions
* Introduction
-It is a set of possibly useful modules. Currently it includes
+This file contains brief information about configuring, testing
+and running Gamma. It is provided as a brief reference only.
+More specifically, is *not* intended as a replacement for the
+documentation. The complete documentation for Gamma is available
+in the doc/ subdirectory. To read it without installing the package
+run `info -f doc/gamma.info'. After the package is installed
+the documentation can be accessed running `info gamma'.
-** interfaces for two SQL DBMS: MySQL and PostgreSQL
-** interfaces to Expat
-** interfaces to syslog
+An online copy of the documentation in various formats is available
+at http://gamma.man.gnu.org.ua.
-Both are extensively used by Ellinika (http://ellinika.farlep.net)
-and Runasimi (http://www.runasimi.org).
+* Overview
-* Installation
+Gamma is a set of assorted modules for Guile. It includes:
-Please see the INSTALL file in this directory for the generic instructions
-on how to use configure. The list of GAMMA-specific options follows:
+** (gamma sql)
-** --without-mysql
+This module provides interfaces for two SQL DBMS: MySQL and PostgreSQL.
-Configure to work without MySQL
+** (gamma expat)
-** --without-postgres
+Interfaces to Expat: a library for parsing XML documents.
-Configure to work without Postgres
+** (gamma syslog)
+
+Interfaces to syslog(2).
+
+* Uses
+
+Gamma is the main working horse for xmltools[1], a parser engine
+powering Ellinika[2] and Runasimi[3] web projects.
+
+For more info on these, see:
+
+[1] http://puszcza.gnu.org.ua/projects/xmltools/
+[2] http://ellinika.gnu.org.ua
+[3] http://www.runasimi.org
+
+* Installation
+
+For generic instructions on how to use configure, see the INSTALL file
+in this directory. The following is a list of Gamma-specific options:
+
+** --disable-expat
+
+Disables building of the expat module
** --disable-sql
-Disable both SQL interfaces.
+Disables building of the sql module
** --disable-syslog
-Do not compile syslog bindings.
+Disables building of the syslog module
+
+** --without-mysql
+
+Configure to work without MySQL
+
+** --without-postgres
+
+Configure to work without Postgres
** --with-guiledir=DIR
@@ -68,6 +103,25 @@ is equivalent to running
./configure LDFLAGS="-L/usr/mysql/lib -L/usr/pgsql/lib"
+* Bug reporting.
+
+Send bug reports to <gray+gamma@gnu.org.ua>.
+
+
+* Copyright information:
+
+Copyright (C) 2002, 2004, 2007, 2010 Sergey Poznyakoff
+
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and this permission notice are preserved,
+ thus giving the recipient permission to redistribute in turn.
+
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last changed them.
+
Local Variables:
mode: outline
@@ -77,4 +131,4 @@ End:
- \ No newline at end of file
+
diff --git a/README-alpha b/README-alpha
new file mode 100644
index 0000000..58303ef
--- a/dev/null
+++ b/README-alpha
@@ -0,0 +1,75 @@
+This file is part of Gamma package.
+See end of file for copying conditions.
+
+* Introduction
+
+This is a *pre-release* version, and not ready for production use yet.
+If you are taking source from GIT, you will need to have several
+special tools to help contribute. See the file README-hacking for more
+information, See chapter `Bootstrapping' for the detailed instructions on
+how to build the package.
+
+Please, note that the accompanying documentation may be inaccurate
+or incomplete. The Git logs are the authoritative documentation of
+all recent changes. To convert them to the traditional ChangeLog
+format, run `make ChangeLog'.
+
+Please send comments and problem reports to <gray+gamma@gnu.org.ua>.
+
+* Checking Out the Sources
+
+The following instructions apply if you wish to obtain sources from
+the GIT repository:
+
+To clone the Gamma repository, issue the following command:
+
+ git clone git://git.gnu.org.ua/gamma.git
+
+or
+
+ git clone http://git.gnu.org.ua/repo/gamma.git
+
+This will create a directory named `gamma' and populate it with the
+sources.
+
+If you are not interested in the entire development history, you can
+abridge it by giving the `--depth' option to clone. For example,
+
+ git clone --depth 2 git://git.gnu.org.ua/repo/gamma.git
+
+will clone only two recent revisions from the repository.
+
+For more information about GIT access, visit
+http://puszcza.gnu.org.ua/git/?group=gamma
+
+* Building
+
+The usual procedures apply:
+
+ ./configure
+ make
+ make install
+
+See INSTALL and README for the detailed instructions.
+
+* Copyright information:
+
+Copyright (C) 2002, 2004, 2007, 2010 Sergey Poznyakoff
+
+ Permission is granted to anyone to make or distribute verbatim copies
+ of this document as received, in any medium, provided that the
+ copyright notice and this permission notice are preserved,
+ thus giving the recipient permission to redistribute in turn.
+
+ Permission is granted to distribute modified versions
+ of this document, or of portions of it,
+ under the above conditions, provided also that they
+ carry prominent notices stating who last changed them.
+
+
+Local Variables:
+mode: outline
+paragraph-separate: "[ ]*$"
+version-control: never
+End:
+
diff --git a/README-hacking b/README-hacking
index a668241..f9a5c99 100644
--- a/README-hacking
+++ b/README-hacking
@@ -31,7 +31,7 @@ You do this as follows:
scripts/bootstrap --moddir modules --parents
Once done, proceed as described in the file README (section
-INSTALLATION).
+"Installation").
For more information about `bootstrap', run `bootstrap --help'.
diff --git a/am/guile.m4 b/am/guile.m4
index 2aa25c9..43e08c1 100644
--- a/am/guile.m4
+++ b/am/guile.m4
@@ -42,7 +42,7 @@ AC_DEFUN([MU_CHECK_GUILE],
GUILE_INCLUDES=`guile-config compile`
GUILE_LIBS=`guile-config link`
fi
- gpath=`bindir $GUILE_CONFIG`:$PATH
+ gpath=`dirname $GUILE_CONFIG`:$PATH
AC_PATH_PROG(GUILE_SNARF, guile-snarf, no, $gpath)
if test $GUILE_CONFIG != no; then
diff --git a/configure.ac b/configure.ac
index 4f3b6e4..483b882 100644
--- a/configure.ac
+++ b/configure.ac
@@ -16,12 +16,12 @@ dnl along with Gamma. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ(2.63)
-AC_INIT(gamma, 1.99, [gray@gnu.org.ua])
+AC_INIT(gamma, [1.99.99], [gray+gamma@gnu.org.ua])
AC_CONFIG_SRCDIR(src/guile-sql.h)
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AC_CANONICAL_SYSTEM
-AM_INIT_AUTOMAKE([1.11.1 gnu tar-ustar silent-rules])
+AM_INIT_AUTOMAKE([1.11.1 gnu tar-ustar readme-alpha silent-rules])
AC_CONFIG_HEADERS([config.h])
# Enable silent rules by default:
@@ -74,6 +74,36 @@ if test -z "$GAMMA_LIB_LIST"; then
AC_MSG_ERROR([Nothing to build!])
fi
-AC_CONFIG_FILES(Makefile src/Makefile scripts/Makefile examples/Makefile)
+# Doc hints.
+# Select a rendition level:
+# DISTRIB for stable releases (at most one dot in the version number)
+# and maintenance releases (two dots, patchlevel < 50)
+# PROOF for alpha releases.
+# PUBLISH can only be required manually when running make in doc/
+AC_SUBST(RENDITION)
+case `echo $VERSION|sed 's/[[^.]]//g'` in
+""|".") RENDITION=DISTRIB;;
+"..") if test `echo $VERSION | sed 's/.*\.//'` -lt 50; then
+ RENDITION=DISTRIB
+ else
+ RENDITION=PROOF
+ fi;;
+*) RENDITION=PROOF;;
+esac
+
+if test $RENDITION = "PROOF"; then
+ if test -r $srcdir/git-describe; then
+ GIT_DESCRIBE=`sed '2,$d' $srcdir/git-describe`
+ AC_DEFINE_UNQUOTED([GIT_DESCRIBE], "$GIT_DESCRIBE",
+ [The most recent git tag])
+ fi
+fi
+
+
+AC_CONFIG_FILES(Makefile
+ src/Makefile
+ scripts/Makefile
+ examples/Makefile
+ doc/Makefile)
AC_OUTPUT
diff --git a/doc/.gitignore b/doc/.gitignore
new file mode 100644
index 0000000..f985f1a
--- a/dev/null
+++ b/doc/.gitignore
@@ -0,0 +1,21 @@
+gamma.info*
+stamp-vti
+version.texi
+gamma.aux
+gamma.cp
+gamma.cps
+gamma.dvi
+gamma.fl
+gamma.fn
+gamma.kw
+gamma.ky
+gamma.log
+gamma.mt
+gamma.op
+gamma.pg
+gamma.pr
+gamma.ps
+gamma.toc
+gamma.tp
+gamma.vr
+
diff --git a/doc/Makefile.am b/doc/Makefile.am
new file mode 100644
index 0000000..bb3d940
--- a/dev/null
+++ b/doc/Makefile.am
@@ -0,0 +1,130 @@
+# This file is part of Gamma.
+# Copyright (C) 2002, 2007, 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/>.
+
+info_TEXINFOS=gamma.texi
+gamma_TEXINFOS=\
+ fdl.texi\
+ macros.texi\
+ rendition.texi\
+ expat.texi\
+ syslog.texi\
+ sql.texi
+
+EXTRA_DIST = \
+ gendocs_template\
+ mastermenu.el\
+ untabify.el
+
+clean-local:
+ @rm -rf manual
+
+# Checking
+check-format:
+ @if test -n "`cat $(info_TEXINFOS) $(gamma_TEXINFOS) | tr -d -c '\t'`"; then \
+ echo "Sources contain tabs; run make untabify"; \
+ false; \
+ fi
+
+check-refs:
+ @for file in $(info_TEXINFOS) $(gamma_TEXINFOS); \
+ do \
+ sed -e = $$file | \
+ sed -n 'N;/@FIXME-.*ref/{s/\(^[0-9][0-9]*\).*@FIXME-.*ref{\([^}]*\)}.*/'$$file':\1: \2/gp}'; \
+ done > $@-t; \
+ if [ -s $@-t ]; then \
+ echo "Unresolved cross-references:"; \
+ cat $@-t;\
+ rm $@-t; \
+ else \
+ rm -f $@-t; \
+ fi
+
+check-fixmes:
+ @for file in $(info_TEXINFOS) $(gamma_TEXINFOS); \
+ do \
+ sed -e = $$file | \
+ sed -n 'N;/@FIXME{/{s/\(^[0-9][0-9]*\).*@FIXME{\([^}]*\).*/'$$file':\1: \2/gp}'; \
+ done > $@-t; \
+ if [ -s $@-t ]; then \
+ echo "Unresolved FIXMEs:"; \
+ cat $@-t; \
+ rm $@-t; \
+ false; \
+ else \
+ rm -f $@-t; \
+ fi
+
+check-writeme:
+ @grep -Hn @WRITEME $(info_TEXINFOS) $(gamma_TEXINFOS) > $@-t; \
+ if [ -s $@-t ]; then \
+ echo "Empty nodes:"; \
+ cat $@-t; \
+ rm $@-t; \
+ false;\
+ else \
+ rm $@-t; \
+ fi
+
+check-unrevised:
+ @grep -Hn @UNREVISED $(info_TEXINFOS) $(gamma_TEXINFOS) > $@-t; \
+ if [ -s $@-t ]; then \
+ echo "Unrevised nodes:"; \
+ cat $@-t; \
+ rm $@-t; \
+ false;\
+ else \
+ rm $@-t; \
+ fi
+
+all-check-docs: check-format \
+ check-refs check-fixmes check-writeme check-unrevised
+
+check-docs:
+ @$(MAKE) -k all-check-docs
+
+#
+
+master-menu:
+ -$(AM_V_GEN)grep -q '^@detailmenu' $(info_TEXINFOS) && \
+ emacs -batch -l mastermenu.el -f make-master-menu $(info_TEXINFOS)
+
+untabify:
+ @emacs -batch -l untabify.el $(info_TEXINFOS) $(gamma_TEXINFOS)
+
+final: untabify master-menu
+
+# The rendering level is one of PUBLISH, DISTRIB or PROOF.
+# Just call `make RENDITION=PROOF [target]' if you want PROOF rendition.
+
+MAKEINFOFLAGS=-D$(RENDITION)
+
+GENDOCS=gendocs.sh
+
+TEXI2DVI=texi2dvi -t '@set $(RENDITION)' -E
+
+# Make sure you set TEXINPUTS.
+# TEXINPUTS=/usr/share/texmf/pdftex/plain/misc/ is ok for most distributions
+.PHONY: manual
+manual:
+ TEXINPUTS=$(srcdir):$(top_srcdir)/build-aux:$(TEXINPUTS) \
+ MAKEINFO="$(MAKEINFO) $(MAKEINFOFLAGS)" \
+ TEXI2DVI="$(TEXI2DVI) -t @finalout" \
+ $(GENDOCS) --texi2html $(PACKAGE) '$(PACKAGE_NAME) manual'
+
+manual.tar.bz2: manual
+ tar cfj manual.tar.bz2 manual
+
+man-tar: manual.tar.bz2
diff --git a/doc/expat.texi b/doc/expat.texi
new file mode 100644
index 0000000..e52a636
--- a/dev/null
+++ b/doc/expat.texi
@@ -0,0 +1,285 @@
+@c This file is part of the Gamma manual.
+@c Copyright (C) 2010 Sergey Poznyakoff
+@c See gamma.texi for copying conditions.
+@c *******************************************************************
+@WRITEME
+
+The @samp{(gamma expat)} module provides interface with
+@command{libexpat}, a library for parsing @acronym{XML} documents.
+
+Usage:
+
+@lisp
+(use-modules ((gamma expat)))
+@end lisp
+
+@menu
+* primitives:: Expat Primitives
+* handlers::
+@end menu
+
+@node primitives
+@section Expat Primitives
+@WRITEME
+
+@deffn {Scheme procedure} xml-primitive-make-parser enc sep
+Return a new @acronym{XML} parser. If @var{enc} is given, it must be one of:
+@samp{US-ASCII}, @samp{UTF-8}, @samp{UTF-16}, @samp{ISO-8859-1}. If @var{sep}
+is given, the returned parser has namespace processing in effect. In
+that case, @var{sep} is a character which is used as a separator
+between the namespace @acronym{URI} and the local part of the name in
+returned namespace element and attribute names.
+@end deffn
+
+@deffn {Scheme procedure} xml-set-encoding parser enc
+Set the encoding to be used by the @var{parser}. The latter must be a
+value returned from a previous call to
+@code{xml-primitive-make-parser} or @code{xml-make-parser}.
+
+The sequence:
+
+@lisp
+@group
+ (let ((parser (xml-primitive-make-parser)))
+ (xml-set-encoding parser encoding)
+ @dots{}
+@end group
+@end lisp
+
+@noindent
+is equivalent to:
+
+@lisp
+ (let ((parser (xml-primitive-make-parser encoding)))
+ @dots{}
+@end lisp
+
+@noindent
+and to:
+
+@lisp
+ (let ((parser (xml-make-parser encoding)))
+ @dots{}
+@end lisp
+@end deffn
+
+@deffn {Scheme procedure} xml-primitive-parse parser input isfinal
+Parse next piece of input. Arguments are:
+
+@table @var
+@item parser
+A parser returned from a previous call to
+@code{xml-primitive-make-parser} or @code{xml-make-parser}.
+
+@item input
+A piece of input text.
+
+@item isfinal
+Boolean value indicating whether @var{input} is the last part of
+input.
+@end table
+@end deffn
+
+@deffn {Scheme procedure} xml-primitive-set-handler parser key handler
+Set @acronym{XML} handler for an event. Arguments are:
+
+@table @var
+@item parser
+A valid @acronym{XML} parser
+
+@item key
+A key, identifying an event.
+
+@table @asis
+@kwindex start-element-handler
+@item #:start-element-handler
+
+@kwindex end-element-handler
+@item #:end-element-handler
+
+@kwindex character-data-handler
+@item #:character-data-handler
+
+@kwindex processing-instruction-handler
+@item #:processing-instruction-handler
+
+@kwindex comment-handler
+@item #:comment-handler
+
+@kwindex start-cdata-section-handler
+@item #:start-cdata-section-handler
+
+@kwindex end-cdata-section-handler
+@item #:end-cdata-section-handler
+
+@kwindex default-handler
+@item #:default-handler
+
+@kwindex default-handler-expand
+@item #:default-handler-expand
+
+@kwindex external-entity-ref-handler
+@item #:external-entity-ref-handler
+
+@kwindex skipped-entity-handler
+@item #:skipped-entity-handler
+
+@kwindex unknown-encoding-handler
+@item #:unknown-encoding-handler
+
+@kwindex start-namespace-decl-handler
+@item #:start-namespace-decl-handler
+
+@kwindex end-namespace-decl-handler
+@item #:end-namespace-decl-handler
+
+@kwindex xml-decl-handler
+@item #:xml-decl-handler
+
+@kwindex start-doctype-decl-handler
+@item #:start-doctype-decl-handler
+
+@kwindex end-doctype-decl-handler
+@item #:end-doctype-decl-handler
+
+@kwindex element-decl-handler
+@item #:element-decl-handler
+
+@kwindex attlist-decl-handler
+@item #:attlist-decl-handler
+
+@kwindex entity-decl-handler
+@item #:entity-decl-handler
+
+@kwindex unparsed-entity-decl-handler
+@item #:unparsed-entity-decl-handler
+
+@kwindex notation-decl-handler
+@item #:notation-decl-handler
+
+@kwindex not-standalone-handler
+@item #:not-standalone-handler
+@end table
+
+
+@item handler
+Handler procedure.
+@end table
+@end deffn
+
+@deffn {Scheme function} xml-make-parser args@dots{}
+@FIXME
+@end deffn
+
+@deffn {Scheme function} xml-parse-more parser input
+Equivalent to:
+
+@lisp
+(xml-primitive-parse parser input #f)
+@end lisp
+
+@noindent
+unless @var{input} is an end-of-file object, in which case it
+is equivalent to:
+
+@lisp
+(xml-primitive-parse parser "" #t)
+@end lisp
+@end deffn
+
+@deffn {Scheme function} xml-parse parser
+@FIXME
+@end deffn
+
+@deffn {Scheme function} xml-set-handler parser args@dots{}
+@FIXME
+@end deffn
+
+@node handlers
+@section Expat Handlers
+@WRITEME
+
+@deffn {Handler prototype} start-element name attrs
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} end-element name
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} character-data text
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} processing-instruction target data
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} comment text
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} start-cdata-section
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} end-cdata-section
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} default text
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} default-expand text
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} unparsed-entity-decl entity-name base @
+ system-id public-id notation-name
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} notation-decl notation-name base @
+ system-id public-id
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} start-namespace prefix uri
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} end-namespace prefix
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} skipped-entity entity-name parameter?
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} not-standalone
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} xml-decl version encoding detail
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} start-doctype-decl name sysid pubid @
+ has-internal-subset?
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} end-doctype-decl
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} attlist-decl el-name att-name att-type detail
+@FIXME
+@end deffn
+
+@deffn {Handler prototype} entity-decl name param? value base sys-id pub-id @
+ notation
+@FIXME
+@end deffn
+
diff --git a/doc/fdl.texi b/doc/fdl.texi
new file mode 100644
index 0000000..7da8738
--- a/dev/null
+++ b/doc/fdl.texi
@@ -0,0 +1,449 @@
+@setfilename fdl.info
+@cindex FDL, GNU Free Documentation License
+@center Version 1.2, November 2002
+
+@display
+Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
+59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document except
+as expressly provided for under this License. Any other attempt to
+copy, modify, sublicense or distribute the Document is void, and will
+automatically terminate your rights under this License. However,
+parties who have received copies, or rights, from you under this
+License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation.
+@end enumerate
+
+@page
+@appendixsec ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.2
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with...Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/gamma.texi b/doc/gamma.texi
new file mode 100644
index 0000000..8f5b67e
--- a/dev/null
+++ b/doc/gamma.texi
@@ -0,0 +1,125 @@
+\input texinfo @c -*-texinfo-*-
+@smallbook
+@c %**start of header
+@setfilename gamma.info
+@settitle Gamma
+@c %**end of header
+@setchapternewpage odd
+
+@include version.texi
+@include macros.texi
+@include rendition.texi
+
+@defcodeindex op
+@defcodeindex kw
+@syncodeindex fn cp
+@syncodeindex pg cp
+@syncodeindex op cp
+@syncodeindex kw cp
+
+@ifinfo
+@dircategory Guile modules
+@direntry
+* gamma: (gamma). Assorted Guile Modules.
+@end direntry
+@end ifinfo
+
+@copying
+Copyright @copyright{} 2010 Sergey Poznyakoff
+
+Permission is granted to copy, distribute and/or modify this document
+under the terms of the GNU Free Documentation License, Version 1.2 or
+any later version published by the Free Software Foundation; with no
+Invariant Sections, with the Front-Cover texts being ``Gamma Manual'',
+and with the Back-Cover Texts as in (a) below. A copy of the license
+is included in the section entitled ``GNU Free Documentation License''.
+
+(a) The FSF's Back-Cover Text is: ``You have freedom to copy and modify
+this Manual, like GNU software. Help the software be free.''
+@end copying
+
+@titlepage
+@title Gamma
+@subtitle version @value{VERSION}, @value{UPDATED}
+@author Sergey Poznyakoff.
+@page
+@vskip 0pt plus 1filll
+@insertcopying
+@end titlepage
+
+@ifnothtml
+@page
+@summarycontents
+@page
+@end ifnothtml
+@contents
+
+@ifnottex
+@node Top
+@top Gamma
+
+This edition of the @cite{Gamma Manual}, last updated @value{UPDATED},
+documents @GAMMA{} Version @value{VERSION}.
+@end ifnottex
+
+@menu
+* Overview::
+* Syslog:: Syslog Interface.
+* SQL:: SQL Interface.
+* Expat:: Expat Interface.
+* Reporting Bugs:: How to Report a Bug.
+
+Appendices
+
+* Copying This Manual:: The GNU Free Documentation License.
+* Concept Index:: Index of Concepts.
+
+@c @detailmenu
+@c --- The Detailed Node Listing ---
+@c @end detailmenu
+
+@end menu
+
+@node Overview
+@chapter Overview
+@WRITEME
+
+@node Syslog
+@chapter Syslog Interface
+@include syslog.texi
+
+@node SQL
+@chapter SQL Interface
+@include sql.texi
+
+@node Expat
+@chapter Expat Interface
+@include expat.texi
+
+@node Reporting Bugs
+@chapter How to Report a Bug
+
+ If you think you've found a bug, please report it to
+@email{gray+gamma@@gnu.org.ua}. Be sure to include maximum
+information needed to reliably reproduce it, or at least to analyze
+it. The information needed is:
+
+@itemize
+@item Version of the package you are using.
+@item Compilation options used when configuring the package.
+@item Run-time configuration.
+@item Conditions under which the bug appears.
+@end itemize
+
+@node Copying This Manual
+@appendix GNU Free Documentation License
+@include fdl.texi
+
+@node Concept Index
+@unnumbered Concept Index
+
+This is a general index of all issues discussed in this manual
+
+@printindex cp
+
+@bye
diff --git a/doc/gendocs_template b/doc/gendocs_template
new file mode 100755
index 0000000..7b46516
--- a/dev/null
+++ b/doc/gendocs_template
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+
+<head>
+ <title>Gamma - Guile Modules</title>
+ <link rev="made" href="mailto:gray@gnu.org.ua" />
+ <link rel="stylesheet" type="text/css" href="gray.css" />
+ <link rel="icon" type="image/png" href="/graphics/gnu-head-icon.png" />
+</head>
+<body>
+<!--#include virtual="inc/header.html" -->
+<ul class='tabs'>
+ <li><a href="gamma.html">Main</a></li>
+ <li><a href="download.html">Downloads</a></li>
+ <li><a class="active" href="manual.html">Documentation</a></li>
+</ul>
+
+<div id="main">
+<p>The manual for <b>%%PACKAGE%%</b> is available in the following formats:</p>
+
+<ul>
+ <li><a href="manual/%%PACKAGE%%.html">HTML
+ (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
+ <li><a href="manual/html_node/index.html">HTML</a> - with one web page per
+ node.</li>
+%%IF HTML_SECTION%%
+ <li><a href="manual/html_section/index.html">HTML</a> - with one web page per
+ section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+ <li><a href="manual/html_chapter/index.html">HTML</a> - with one web page per
+ chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+ <li><a href="manual/%%PACKAGE%%.html.gz">HTML compressed
+ (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+ one web page.</li>
+ <li><a href="manual/%%PACKAGE%%.html_node.tar.gz">HTML compressed
+ (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per node.</li>
+%%IF HTML_SECTION%%
+ <li><a href="manual/%%PACKAGE%%.html_section.tar.gz">HTML compressed
+ (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+ <li><a href="manual/%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
+ (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+ <li><a href="manual/%%PACKAGE%%.info.tar.gz">Info document
+ (%%INFO_TGZ_SIZE%%K characters gzipped tar file)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.txt">ASCII text
+ (%%ASCII_SIZE%%K characters)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.txt.gz">ASCII text compressed
+ (%%ASCII_GZ_SIZE%%K gzipped characters)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.dvi.gz">TeX dvi file
+ (%%DVI_GZ_SIZE%%K characters gzipped)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.ps.gz">PostScript file
+ (%%PS_GZ_SIZE%%K characters gzipped)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.pdf">PDF file
+ (%%PDF_SIZE%%K characters)</a>.</li>
+ <li><a href="manual/%%PACKAGE%%.texi.tar.gz">Texinfo source
+ (%%TEXI_TGZ_SIZE%%K characters gzipped tar file)</a></li>
+</ul>
+
+</div>
+
+<div class="generator">
+<p>(This page is generated by the <a
+href="%%SCRIPTURL%%">%%SCRIPTNAME%%</a> script.)
+</p>
+</div>
+
+<!--#include virtual="inc/footer.html" -->
+</body>
+</html>
diff --git a/doc/macros.texi b/doc/macros.texi
new file mode 100644
index 0000000..ddade54
--- a/dev/null
+++ b/doc/macros.texi
@@ -0,0 +1,3 @@
+@macro GAMMA
+@samp{Gamma}
+@end macro
diff --git a/doc/mastermenu.el b/doc/mastermenu.el
new file mode 100644
index 0000000..3ab3341
--- a/dev/null
+++ b/doc/mastermenu.el
@@ -0,0 +1,90 @@
+;;; mastermenu.el --- Redefinition of texinfo-master-menu-list
+
+;; Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+
+;; Author: Sergey Poznyakoff
+;; Maintainer: bug-tar@gnu.org
+;; Keywords: maint, tex, docs
+
+;; This file is part of GNU tar documentation suite
+
+;; 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, 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/>.
+
+;;; Commentary:
+
+;; This file redefines texinfo-master-menu-list so that it takes into
+;; account included files.
+
+;; Known bugs: @menu without previous sectioning command will inherit
+;; documentation string from the previous menu. However, since such a
+;; menu is illegal in a texinfo file, we can live with it.
+
+(require 'texinfo)
+(require 'texnfo-upd)
+
+(defun texinfo-master-menu-list-recursive (title)
+ "Auxiliary function used by `texinfo-master-menu-list'."
+ (save-excursion
+ (let (master-menu-list)
+ (while (re-search-forward "\\(^@menu\\|^@include\\)" nil t)
+ (cond
+ ((string= (match-string 0) "@include")
+ (skip-chars-forward " \t")
+ (let ((included-name (let ((start (point)))
+ (end-of-line)
+ (skip-chars-backward " \t")
+ (buffer-substring start (point)))))
+ (end-of-line)
+ (let ((prev-title (texinfo-copy-menu-title)))
+ (save-excursion
+ (set-buffer (find-file-noselect included-name))
+ (setq master-menu-list
+ (append (texinfo-master-menu-list-recursive prev-title)
+ master-menu-list))))))
+ (t
+ (setq master-menu-list
+ (cons (list
+ (texinfo-copy-menu)
+ (let ((menu-title (texinfo-copy-menu-title)))
+ (if (string= menu-title "")
+ title
+ menu-title)))
+ master-menu-list)))))
+ master-menu-list)))
+
+(defun texinfo-master-menu-list ()
+ "Return a list of menu entries and header lines for the master menu,
+recursing into included files.
+
+Start with the menu for chapters and indices and then find each
+following menu and the title of the node preceding that menu.
+
+The master menu list has this form:
+
+ \(\(\(... \"entry-1-2\" \"entry-1\"\) \"title-1\"\)
+ \(\(... \"entry-2-2\" \"entry-2-1\"\) \"title-2\"\)
+ ...\)
+
+However, there does not need to be a title field."
+
+ (reverse (texinfo-master-menu-list-recursive "")))
+
+(defun make-master-menu ()
+ "Create master menu in the first Emacs argument."
+ (find-file (car command-line-args-left))
+ (texinfo-master-menu nil)
+ (save-buffer))
+
+
+;;; mastermenu.el ends here
diff --git a/doc/rendition.texi b/doc/rendition.texi
new file mode 100644
index 0000000..45ac068
--- a/dev/null
+++ b/doc/rendition.texi
@@ -0,0 +1,94 @@
+@c Let's use the concept of 'renditions' by Fra@,{c}ois Pinard
+@c I extended it by adding a FIXME_FOOTNOTE variable, which controls
+@c whether FIXME information should be placed in footnotes or
+@c inlined.
+
+@c ======================================================================
+@c This document has three levels of rendition: PUBLISH, DISTRIB or PROOF,
+@c as decided by @set symbols. The PUBLISH rendition does not show
+@c notes or marks asking for revision. Most users will prefer having more
+@c information, even if this information is not fully revised for adequacy,
+@c so DISTRIB is the default for distributions. The PROOF rendition
+@c show all marks to the point of ugliness, but is nevertheless useful to
+@c those working on the manual itself.
+@c ======================================================================
+
+@c Set this symbol if you wish FIXMEs to appear in footnotes, instead
+@c of being inserted into the text.
+@c @set PROOF_FOOTNOTED
+
+@ifclear PUBLISH
+@ifclear DISTRIB
+@ifclear PROOF
+@set DISTRIB
+@end ifclear
+@end ifclear
+@end ifclear
+
+@ifset PUBLISH
+@set RENDITION The book, version
+@end ifset
+
+@ifset DISTRIB
+@set RENDITION FTP release, version
+@end ifset
+
+@ifset PROOF
+@set RENDITION Proof reading version
+@end ifset
+
+@c Output marks for nodes needing revision, but not in PUBLISH rendition.
+
+@macro WRITEME
+@ifclear PUBLISH
+@quotation
+@emph{This node is to be written.}
+@end quotation
+@end ifclear
+@end macro
+
+@macro UNREVISED
+@ifclear PUBLISH
+@quotation
+(@emph{The information in this node may be obsolete or otherwise inaccurate.}
+This message will disappear, once this node revised.)
+@end quotation
+@end ifclear
+@end macro
+
+@c Output various FIXME information only in PROOF rendition.
+
+@macro FIXME{string}
+@ifset PROOF
+@ifset PROOF_FOOTNOTED
+@footnote{@strong{FIXME:} \string\}
+@end ifset
+@ifclear PROOF_FOOTNOTED
+@cartouche
+@strong{<FIXME>} \string\ @strong{</>}
+@end cartouche
+@end ifclear
+@end ifset
+
+@end macro
+
+@macro FIXME-ref{string}
+@ifset PROOF
+@strong{<REF>} \string\ @strong{</>}
+@end ifset
+
+@end macro
+
+@macro FIXME-pxref{string}
+@ifset PROOF
+@strong{<PXREF>} \string\ @strong{</>}
+@end ifset
+
+@end macro
+
+@macro FIXME-xref{string}
+@ifset PROOF
+@strong{<XREF>} \string\ @strong{</>}
+@end ifset
+
+@end macro
diff --git a/doc/sql.texi b/doc/sql.texi
new file mode 100644
index 0000000..8e1b4da
--- a/dev/null
+++ b/doc/sql.texi
@@ -0,0 +1,131 @@
+@c This file is part of the Gamma manual.
+@c Copyright (C) 2010 Sergey Poznyakoff
+@c See gamma.texi for copying conditions.
+@c *******************************************************************
+
+The @samp{(gamma sql)} module provides interface with MySQL and
+PostfeSQL database management systems.
+
+Usage:
+
+@lisp
+(use-modules ((gamma sql)))
+@end lisp
+
+@deffn {Scheme procedure} sql-open-connection params
+This function opens a connection to the @acronym{SQL}
+server and returns a connection object. This object is
+then used as argument to @code{sql-query} and
+@code{sql-close-connection} functions.
+
+The @code{params} argument supplies the connection parameters.
+It is a list of conses, each of which is composed from a keyword
+and a value.
+
+@defvr {Keyword} #:iface
+Defines the type of the @acronym{SQL} interface. Valid values are:
+@samp{"mysql"}, to connect to a MySQL server, and @samp{"pgsql"}, to
+connect to a Postgres server.
+@end defvr
+
+@defvr {Keyword} #:host
+Defines server host name. The value is a string, containing the host
+name or @acronym{ASCII} representation of the host IP address.
+@end defvr
+
+@defvr {Keyword} #:port
+Defines the port number server is listening on. The value is a
+decimal port number.
+@end defvr
+
+@defvr {Keyword} #:socket
+If the @acronym{SQL} server is listening on a socket, this keyword
+defines the @acronym{UNIX} pathname of the socket. This keyword
+cannot be used together with @samp{#:host} or @samp{#:port} keyword
+pairs.
+@end defvr
+
+@defvr {Keyword} #:user
+Sets the @acronym{SQL} user name.
+@end defvr
+
+@defvr {Keyword} #:pass
+Sets the @acronym{SQL} user password.
+@end defvr
+
+@defvr {Keyword} #:db
+Sets the database name.
+@end defvr
+
+@defvr {Keyword} #:ssl-cert
+Defines full pathname of the @acronym{SSL} certificate to use. If
+this keyword is present, the connection with the server will be
+encrypted using @acronym{SSL}.
+
+Currently it is implemented only for MySQL connections.
+@end defvr
+
+@defvr {Keyword} #:config-file
+Use the specified MySQL configuration file to obtain missing parameters.
+@end defvr
+
+@defvr {Keyword} #:config-group
+Obtain missing parameters from the specified group in the MySQL
+configuration file (see @samp{#:config-file}, above).
+@end defvr
+
+@end deffn
+
+@deffn {Scheme procedure} sql-close-connection conn
+Close the @acronym{SQL} connection. The @var{conn} must be a
+connection descriptor returned from a previous call to
+@code{sql-open-connection}.
+@end deffn
+
+@deffn {Scheme procedure} sql-query conn query
+@var{Conn} is a connection descriptor returned from a previous call to
+@code{sql-open-connection}, and @var{query} is a valid @acronym{SQL}
+query. This function executes the query and returns its results.
+
+If @var{query} is a @code{SELECT} query (or a similar query, returning
+tuples), the return is a list, each element of which is a list
+representing a row. Elements of each row (@dfn{columns}) are string
+values.
+
+If @var{query} results in some modifications to the database (e.g. an
+@code{UPDATE} statement), the @code{sql-query} function returns
+the number of affected database rows.
+@end deffn
+
+@defvr {Error Keyword} gsql-error
+An error of this type is raised when any of the above functions
+fails. Two arguments are supplied: a string describing the error,
+and error message from the underlying @acronym{SQL} implementation.
+@end defvr
+
+@deffn {Scheme syntax} sql-catch-failure (handler) expr
+@deffnx {Scheme syntax} sql-catch-failure expr
+This syntax executes the Scheme expression @var{expr} and calls
+@code{handler} if a @code{gsql-error} exception occurs. The handler
+must be declared as follows:
+
+@lisp
+(define (handler err descr)
+ ...)
+@end lisp
+
+In its second form, @code{sql-catch-failure} calls a function named
+@code{sql-error-handler} if a @code{gsql-error} exception occurs.
+The @code{sql-error-handler} must be declared by the user.
+@end deffn
+
+@deffn {Scheme syntax} sql-ignore-failure (value) expr
+@deffnx {Scheme syntax} sql-ignore-failure expr
+Evaluates Scheme expression @var{expr} and returns the result of
+evaluation, or @var{value} if a @code{gsql-error} exception occurs.
+
+In its second form, returns @code{#f} in case of error.
+@end deffn
+
+
+
diff --git a/doc/syslog.texi b/doc/syslog.texi
new file mode 100644
index 0000000..879ea04
--- a/dev/null
+++ b/doc/syslog.texi
@@ -0,0 +1,136 @@
+@c This file is part of the Gamma manual.
+@c Copyright (C) 2010 Sergey Poznyakoff
+@c See gamma.texi for copying conditions.
+@c *******************************************************************
+
+The @samp{(gamma syslog)} module provides bindings for @samp{syslog}
+functions:
+
+@lisp
+(use-modules ((gamma syslog)))
+@end lisp
+
+@deffn {Scheme procedure} openlog tag option facility
+Opens a connection to the system logger for Guile program.
+Arguments have the same meaning as in openlog(3):
+
+@table @var
+@item tag
+Syslog @dfn{tag}: a string that will be prepended to every message.
+
+@item option
+Flags that control the operation. A logical or (@code{logior}) of
+one or more of the following:
+
+@table @asis
+@item LOG_CONS
+Write directly to system console if there is an error while sending to
+system logger.
+
+@item LOG_NDELAY
+Open the connection immediately (normally, the opening is delayed
+until when the first message is logged).
+
+@item LOG_NOWAIT
+Don't wait for child processes that may have been created while
+logging the message.
+
+@item LOG_ODELAY
+The converse of @samp{LOG_NDELAY}; opening of the connection is
+delayed until @code{syslog} is called. This is the default.
+
+@item LOG_PERROR
+Print to stderr as well. This constant may be absent if the
+underlying implementation does not support it.
+
+@item LOG_PID
+Include PID with each message.
+@end table
+
+@item facility
+Specifies what type of program is logging the message.
+The facility must be one of:
+
+@multitable @columnfractions 0.3 0.7
+@headitem Facility @tab Meaning
+@item LOG_AUTH @tab Security/authorization messages.
+@item LOG_AUTHPRIV @tab Same as @code{LOG_AUTH}.
+@item LOG_CRON @tab Clock daemon.
+@item LOG_DAEMON @tab System daemons without separate facility value.
+@item LOG_FTP @tab @acronym{FTP} daemon.
+@item LOG_LOCAL0 through LOG_LOCAL7 @tab Reserved for local use.
+@item LOG_LPR @tab Line printer subsystem.
+@item LOG_MAIL @tab Mail subsystem.
+@item LOG_NEWS @tab @acronym{USENET} news subsystem.
+@item LOG_SYSLOG @tab Messages generated internally by @command{syslogd}.
+@item LOG_USER @tab Generic user-level messages. This is the default.
+@item LOG_UUCP @tab @acronym{UUCP} subsystem.
+@end multitable
+
+Example:
+
+@lisp
+(openlog "reader" (logior LOG_PID LOG_CONS) LOG_DAEMON)
+@end lisp
+@end table
+@end deffn
+
+@deffn {Scheme procedure} syslog-tag
+Returns the tag, used in the recent call to @code{openlog}.
+@end deffn
+
+@deffn {Scheme procedure} syslog prio text
+Distribute a message via @command{syslogd}. The @var{text} supplies
+the message text. The @var{prio} specifies @dfn{priority} of the
+message. Its value must be one of the following:
+
+@multitable @columnfractions 0.3 0.7
+@headitem Priority @tab Meaning
+@item LOG_EMERG @tab system is unusable
+@item LOG_ALERT @tab action must be taken immediately
+@item LOG_CRIT @tab critical conditions
+@item LOG_ERR @tab error conditions
+@item LOG_WARNING @tab warning conditions
+@item LOG_NOTICE @tab normal, but significant, condition
+@item LOG_INFO @tab informational message
+@item LOG_DEBUG @tab debug-level message
+@end multitable
+
+Example:
+
+@lisp
+(syslog LOG_WARNING "This is a test message")
+@end lisp
+
+The priority argument may also be @samp{OR}ed with a facility value, to
+override the one set by the @code{openlog} function, e.g.:
+
+@lisp
+(syslog (logior LOG_DAEMON LOG_WARNING) "This is a test message")
+@end lisp
+
+It is common to use the @code{format} function to prepare the value
+of the @var{text} argument:
+
+@lisp
+@group
+(syslog LOG_WARNING
+ (format #f "operation reported: ~A" result))
+@end group
+@end lisp
+@end deffn
+
+@deffn {Scheme procedure} openlog?
+Return @code{#t} if @code{openlog} was previously called.
+@end deffn
+
+@deffn {Scheme procedure} closelog
+Close the logging channel. The use of this function is optional.
+@end deffn
+
+
+
+
+
+
+
diff --git a/doc/untabify.el b/doc/untabify.el
new file mode 100644
index 0000000..77dd5c0
--- a/dev/null
+++ b/doc/untabify.el
@@ -0,0 +1,13 @@
+;;;; Untabify the sources.
+;;;; Usage: emacs -batch -l untabify.el [file ...]
+
+(defun global-untabify (buflist)
+ (mapcar
+ (lambda (bufname)
+ (set-buffer (find-file bufname))
+ (untabify (point-min) (point-max))
+ (save-buffer)
+ (kill-buffer (current-buffer)))
+ buflist))
+
+(global-untabify command-line-args-left)
diff --git a/src/syslog.c b/src/syslog.c
index ac1ac4d..b50762f 100644
--- a/src/syslog.c
+++ b/src/syslog.c
@@ -101,9 +101,21 @@ static struct {
char *name;
} syslog_kw[] = {
#define GAMMA_CONST(s) { s, #s }
- GAMMA_CONST(LOG_USER),
+ GAMMA_CONST(LOG_AUTH),
+#ifdef LOG_AUTHPRIV
+ GAMMA_CONST(LOG_AUTHPRIV),
+#endif
+ GAMMA_CONST(LOG_CRON),
GAMMA_CONST(LOG_DAEMON),
- GAMMA_CONST(LOG_AUTH),
+#ifdef LOG_FTP
+ GAMMA_CONST(LOG_FTP),
+#endif
+ GAMMA_CONST(LOG_USER),
+ GAMMA_CONST(LOG_LPR),
+ GAMMA_CONST(LOG_MAIL),
+ GAMMA_CONST(LOG_NEWS),
+ GAMMA_CONST(LOG_SYSLOG),
+ GAMMA_CONST(LOG_UUCP),
GAMMA_CONST(LOG_LOCAL0),
GAMMA_CONST(LOG_LOCAL1),
GAMMA_CONST(LOG_LOCAL2),
@@ -121,10 +133,17 @@ static struct {
GAMMA_CONST(LOG_NOTICE),
GAMMA_CONST(LOG_INFO),
GAMMA_CONST(LOG_DEBUG),
- /* options */
+ /* options */
GAMMA_CONST(LOG_CONS),
GAMMA_CONST(LOG_NDELAY),
- GAMMA_CONST(LOG_PID)
+ GAMMA_CONST(LOG_PID),
+ GAMMA_CONST(LOG_NOWAIT),
+#ifdef LOG_ODELAY
+ GAMMA_CONST(LOG_ODELAY),
+#endif
+#ifdef LOG_PERROR
+ GAMMA_CONST(LOG_PERROR)
+#endif
};
void

Return to:

Send suggestions and report system problems to the System administrator.