r8215: fix documentation
authorKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 16 Nov 2003 02:57:06 +0000 (02:57 +0000)
committerKevin M. Rosenberg <kevin@rosenberg.net>
Sun, 16 Nov 2003 02:57:06 +0000 (02:57 +0000)
21 files changed:
doc/Makefile
doc/appendix.sgml [deleted file]
doc/bookinfo.sgml [deleted file]
doc/bookinfo.xml [new file with mode: 0644]
doc/catalog-debian.xml [new file with mode: 0644]
doc/catalog-suse.xml [new file with mode: 0644]
doc/catalog.debian [deleted file]
doc/catalog.fink [deleted file]
doc/catalog.redhat [deleted file]
doc/design.sgml [deleted file]
doc/entities.xml [new file with mode: 0644]
doc/fo.xsl [new file with mode: 0644]
doc/glossary.sgml [deleted file]
doc/html.xsl [new file with mode: 0644]
doc/html_chunk.xsl [new file with mode: 0644]
doc/hyperobject.sgml [deleted file]
doc/hyperobject.xml [new file with mode: 0644]
doc/intro.sgml [deleted file]
doc/intro.xml [new file with mode: 0644]
doc/preface.sgml [deleted file]
doc/ref.sgml [deleted file]

index b49647281f4e684cb3075bda2b71e4b67275048f..b7200eab39d70a37ba17ec84389ca3ae5d2cd359 100644 (file)
@@ -1,33 +1,43 @@
+##############################################################################
 # FILE IDENTIFICATION
 # 
 #  Name:         Makefile
-#  Purpose:      Makefile for the hyperobject hyperobject documentation
+#  Purpose:      Makefile for the hyperobject documentation
 #  Programer:    Kevin M. Rosenberg
 #  Date Started: Mar 2002
 #
 #  CVS Id:   $Id$
 #
-# This file, part of Hyperobject, is Copyright (c) 2002 by Kevin M. Rosenberg
+# This file, part of HYPEROBJECT, is Copyright (c) 2002-2003 by Kevin M. Rosenberg
 #
-# System variable to select catalog file
-SYSTEM=fink
-#SYSTEM=debian
-# SYSTEM=redhat
+# HYPEROBJECT users are granted the rights to distribute and use this software
+# as governed by the terms of the Lisp Lesser GNU Public License
+# (http://opensource.franz.com/preamble.html), also known as the LLGPL.
+##############################################################################
 
-# Nothing to configure beyond this point
+DOCFILE_BASE_DEFAULT:=hyperobject
+DOCFILE_EXT_DEFAULT:=xml
 
-CATALOG=catalog.$(SYSTEM)
 
-# Custom DSSSL's
-DSSSL_HTML=../dsssl/html/docbook.dsl
-DSSSL_PRINT=dsssl/print/docbook.dsl
-
-DOCFILE_BASE_DEFAULT=hyperobject
-DOCFILE_EXT_DEFAULT=sgml
+# Standard docfile processing
 
-JADE=openjade
+DEBIAN=$(shell expr "`cat /etc/issue`" : '.*Debian.*')
+SUSE=$(shell expr "`cat /etc/issue`" : '.*SuSE.*')
+REDHAT=$(shell expr "`cat /etc/issue`" : '.*RedHat.*')
+
+
+ifneq (${DEBIAN},0)
+OS:=debian
+else
+  ifneq (${SUSE},0)
+    OS=suse
+  else   
+    ifneq (${REDHAT},0)
+      OS=redhat
+    endif
+  endif
+endif
 
-# Standard docfile processing
 
 ifndef DOCFILE_BASE
 DOCFILE_BASE=${DOCFILE_BASE_DEFAULT}
@@ -37,13 +47,18 @@ ifndef DOCFILE_EXT
 DOCFILE_EXT=${DOCFILE_EXT_DEFAULT}
 endif
 
-DOCFILE=${DOCFILE_BASE}.${DOCFILE_EXT}
-TEXFILE=${DOCFILE_BASE}.tex
-PDFFILE=${DOCFILE_BASE}.pdf
-PSFILE=${DOCFILE_BASE}.ps
-DVIFILE=${DOCFILE_BASE}.dvi
-TMPFILES=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
-DOCFILES=$(shell echo *.sgml)
+DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT}
+FOFILE:=${DOCFILE_BASE}.fo
+PDFFILE:=${DOCFILE_BASE}.pdf
+PSFILE:=${DOCFILE_BASE}.ps
+DVIFILE:=${DOCFILE_BASE}.dvi
+TXTFILE:=${DOCFILE_BASE}.txt
+HTMLFILE:=${DOCFILE_BASE}.html
+TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log
+DOCFILES:=$(shell echo *.xml *.xsl)
+
+CATALOG:=`pwd`/catalog-${OS}.xml
+CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1
 
 .PHONY: all
 all: html pdf 
@@ -54,57 +69,57 @@ dist: html pdf
 .PHONY: doc
 doc: html pdf
 
-CHECK=onsgmls -s -C ${CATALOG} || exit 1
-
 .PHONY: check
 check:
+       @echo "Operating System Detected: ${OS}"
        @$(CHECK)
 
 .PHONY: html
 html: html.tar.gz
 
-html.tar.gz: $(DOCFILES) Makefile
-       @$(CHECK)
-       @( rm -rf html ; mkdir html; cd html ; $(JADE) -t sgml -c ../${CATALOG} -d ${DSSSL_HTML} ../${DOCFILE} > /dev/null; cp book1.html index.html; cd ..; GZIP='-9' tar czf html.tar.gz html)
+html.tar.gz: $(DOCFILES) Makefile 
+       @rm -rf html
+       @mkdir html
+       @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output html/ html_chunk.xsl $(DOCFILE)
+       @GZIP='-9' tar czf html.tar.gz html 
 
-.PHONY: tex
-tex: ${TEXFILE}
+.PHONY: fo
+fo: ${FOFILE}
 
-${TEXFILE}: ${DOCFILES}
-       @$(CHECK)
-       @$(JADE) -t tex -c ${CATALOG} -d ${DSSSL_PRINT} ${DOCFILE} > /dev/null
+${FOFILE}: $(DOCFILES) Makefile 
+       @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE)
 
 .PHONY: pdf
 pdf: ${PDFFILE}
 
-${PDFFILE}: ${DOCFILES}
-       @$(JADE) -t tex -c ${CATALOG} -d ${DSSSL_PRINT} ${DOCFILE} > /dev/null
-       @pdfjadetex -interaction=batchmode '\pdfcompresslevel=9' '\input ${TEXFILE}' > /dev/null
-       @pdfjadetex -interaction=batchmode '\pdfcompresslevel=9' '\input ${TEXFILE}' > /dev/null
-       @pdfjadetex -interaction=batchmode '\pdfcompresslevel=9' '\input ${TEXFILE}' > /dev/null
-       @pdfjadetex -interaction=batchmode '\pdfcompresslevel=9' '\input ${TEXFILE}' > /dev/null
+${PDFFILE}: ${DOCFILES} Makefile
+       @$(MAKE) fo
+       @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null
 
 .PHONY: dvi
 dvi: ${DVIFILE}
 
-${DVIFILE}: ${TEXFILE}
-       @jadetex ${TEXFILE} > /dev/null
-       @jadetex ${TEXFILE} > /dev/null
-       @jadetex ${TEXFILE} > /dev/null
-       @jadetex ${TEXFILE} > /dev/null
-
 .PHONY: ps
 ps: ${PSFILE}
 
-${PSFILE}: ${DVIFILE}
-       @dvips -o ${PSFILE} ${DVIFILE} > /dev/null
+${PSFILE}: ${DOCFILES} Makefile
+       @$(MAKE) fo
+       @fop $(FOFILE) -ps $(PSFILE) > /dev/null
+
+
+.PHONY: txt
+txt: ${TXTFILE}
+
+${TXTFILE}: ${FOFILE}
+       @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE)
+       lynx -dump ${HTMLFILE} > ${TXTFILE}
 
 .PHONY: clean
 clean: 
        @rm -f *~ *.bak *.orig \#*\# .\#* texput.log
-       @rm -rf html ${PSFILE}
-       @rm -f ${TMPFILES}
-       @rm -f  ${DVIFILE} ${TEXFILE}
+       @rm -rf html ${PSFILE} ${HTMLFILE}
+       @rm -f ${TMPFILES} ${FOFILE}
+       @rm -f  ${DVIFILE} ${TXTFILE}
 
 .PHONY: distclean
 distclean: clean
diff --git a/doc/appendix.sgml b/doc/appendix.sgml
deleted file mode 100644 (file)
index cf1b4cd..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<appendix>
-  <title>Installation</title>
-  <sect1>
-    <title>Download &uffi;</title>
-    <para>
-You need to download the &uffi; package from its web
-<ulink url="http://uffi.med-info.com"><citetitle>home</citetitle></ulink>.
-You also need to have a copy of &asdf;. If you need a copy of
-&asdf;, it is included in the 
-  <ulink
-      url="http://www.sourceforge.net/projects/cclan">
-      <citetitle>CCLAN</citetitle></ulink> package. You can download
-the file <filename>defsystem.lisp</filename> from the CVS 
-<ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp"><citetitle>tree</citetitle></ulink>.
-    </para>
-  </sect1>
-  <sect1>
-    <title>Installation</title>
-    <para>
-      After downloading and installing &asdf;, simply
-      <function>push</function> the
-      directory containing &uffi; into
-      <varname>asdf:*central-registry*</varname> variable. Whenever you
-want to load the &uffi; package, use the function
-      <computeroutput>(asdf:oos 'asdf:load-op :uffi)</computeroutput>.
-    </para>
-  </sect1>
-</appendix>
diff --git a/doc/bookinfo.sgml b/doc/bookinfo.sgml
deleted file mode 100644 (file)
index 587a888..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-
-  <bookinfo>
-    <title>&hyperobject; Reference Guide</title>
-    <author>
-      <firstname>Kevin</firstname>
-      <othername>M.</othername>
-      <surname>Rosenberg</surname>
-    <affiliation>
-       <orgname>Heart Hospital of New Mexico</orgname>
-       <address>
-       <email>kevin@rosenberg.net</email>
-        <street>504 Elm Street N.E.</street>
-        <city>Albuquerque</city>
-        <state>New Mexico</state>
-        <postcode>87102</postcode>
-        </address>
-      </affiliation>
-    </author>
-      
-    <printhistory>
-      <simpara>$Id: bookinfo.sgml,v 1.1 2002/12/09 09:31:27 kevin Exp $</simpara>
-      <simpara>File $Date: 2002/12/09 09:31:27 $</simpara>
-    </printhistory>
-    <copyright>
-      <year>2002</year>
-      <holder>Kevin M. Rosenberg</holder>
-    </copyright>
-    <legalnotice>
-      <itemizedlist>
-       <listitem>
-         <para>The &hyperobject; package was designed and
-           written by Kevin M. Rosenberg.
-         </para>
-       </listitem>
-<listitem>
-<para>
-      Permission is granted to copy, distribute and/or modify this document
-      under the terms of the GNU Free Documentation License, Version 1.1
-      or any later version published by the Free Software Foundation;
-      with no Invariant Sections, with the no
-      Front-Cover Texts, and with no Back-Cover Texts.
-      A copy of the license is included in the &uffi; distribution.
-</para>
-</listitem>
-       <listitem>
-         <para><application>Allegro CL</application>&reg; is a registered
-           trademark of Franz Inc.
-         </para>
-       </listitem>
-       <listitem>
-         <para><application>Lispworks</application>&reg; is a registered
-           trademark of Xanalys Inc.
-         </para>
-       </listitem>
-       <listitem>
-         <para><application>Microsoft
-           Windows</application>&reg; is a registered trademark of
-           Microsoft Inc.
-         </para>
-       </listitem>
-       <listitem>
-         <para>Other brand or
-           product names are the registered trademarks or trademarks of
-           their respective holders.
-         </para>
-       </listitem>
-      </itemizedlist>
-    </legalnotice>
-  </bookinfo>
diff --git a/doc/bookinfo.xml b/doc/bookinfo.xml
new file mode 100644 (file)
index 0000000..624d59d
--- /dev/null
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % myents SYSTEM "entities.xml">
+%myents;
+]>
+
+<bookinfo>
+  <title>&hyperobject; Reference Guide</title>
+  <author>
+    <firstname>Kevin</firstname>
+    <othername>M.</othername>
+    <surname>Rosenberg</surname>
+    <affiliation>
+      <orgname>Heart Hospital of New Mexico</orgname>
+      <address>
+       <email>kevin@rosenberg.net</email>
+       <street>504 Elm Street N.E.</street>
+       <city>Albuquerque</city>
+       <state>New Mexico</state>
+       <postcode>87102</postcode>
+      </address>
+    </affiliation>
+  </author>
+  
+  <printhistory>
+    <simpara>$Id$</simpara>
+    <simpara>File $Date$</simpara>
+  </printhistory>
+  <copyright>
+    <year>2002-2003</year>
+    <holder>Kevin M. Rosenberg</holder>
+  </copyright>
+  <legalnotice>
+    <itemizedlist>
+      <listitem>
+       <para>The &hyperobject; package was designed and
+         written by Kevin M. Rosenberg.
+       </para>
+      </listitem>
+      <listitem>
+       <para>
+         Permission is granted to copy, distribute and/or modify this document
+         under the terms of the GNU Free Documentation License, Version 1.1
+         or any later version published by the Free Software Foundation;
+         with no Invariant Sections, with the no
+         Front-Cover Texts, and with no Back-Cover Texts.
+         A copy of the license is included in the &hyperobject; distribution.
+       </para>
+      </listitem>
+      <listitem>
+       <para><application>Allegro CL</application>&reg; is a registered
+         trademark of Franz Inc.
+       </para>
+      </listitem>
+      <listitem>
+       <para><application>Lispworks</application>&reg; is a registered
+         trademark of Xanalys Inc.
+       </para>
+      </listitem>
+      <listitem>
+       <para><application>Microsoft
+         Windows</application>&reg; is a registered trademark of
+         Microsoft Inc.
+       </para>
+      </listitem>
+      <listitem>
+       <para>Other brand or
+         product names are the registered trademarks or trademarks of
+         their respective holders.
+       </para>
+      </listitem>
+    </itemizedlist>
+  </legalnotice>
+</bookinfo>
diff --git a/doc/catalog-debian.xml b/doc/catalog-debian.xml
new file mode 100644 (file)
index 0000000..0188d9b
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" ?>
+<!DOCTYPE catalog
+   PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
+   "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+  <!-- The directory DTD and stylesheet files are installed under -->
+  <group  xml:base="file:///usr/share/sgml/docbook/" >
+
+    <!-- Resolve DTD URL system ID to local file -->
+    <rewriteSystem
+        systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"
+        rewritePrefix="dtd/xml/4.2/" />
+    <!-- Resolve stylesheet URL to local file -->
+    <rewriteURI
+        uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
+        rewritePrefix="stylesheet/xsl/nwalsh/" />
+
+    <!-- Resolve DTD PUBLIC identifiers -->
+    <nextCatalog  catalog="dtd/xml/4.2/catalog.xml" />
+
+    <!-- To resolve simple DTD SYSTEM identifiers. -->
+    <!-- Note: this does not work with Java resolver -->
+    <!--   classes in Saxon or Xalan -->
+    <system
+         systemId="docbook.dtd"
+         uri="dtd/xml/4.2/xml/docbookx.dtd" />
+
+    <!-- To resolve short stylesheet references -->
+    <uri
+        name="docbook_html.xsl"
+        uri="stylesheet/xsl/nwalsh/html/docbook.xsl" />
+    <uri 
+        name="docbook_chunk.xsl"
+        uri="stylesheet/xsl/nwalsh/html/chunk.xsl" />
+    <uri
+        name="docbook_fo.xsl"
+        uri="stylesheet/xsl/nwalsh/fo/docbook.xsl" />
+
+  </group>
+
+</catalog>
diff --git a/doc/catalog-suse.xml b/doc/catalog-suse.xml
new file mode 100644 (file)
index 0000000..6a03830
--- /dev/null
@@ -0,0 +1,43 @@
+<?xml version="1.0" ?>
+<!DOCTYPE catalog
+   PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN"
+   "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd">
+
+<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
+
+  <!-- The directory DTD and stylesheet files are installed under -->
+  <group  xml:base="file:///usr/share/sgml/" >
+
+    <!-- Resolve DTD URL system ID to local file -->
+    <rewriteSystem
+        systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/"
+        rewritePrefix="db42xml/" />
+    <!-- Resolve stylesheet URL to local file -->
+    <rewriteURI
+        uriStartString="http://docbook.sourceforge.net/release/xsl/current/"
+        rewritePrefix="docbook/docbook-xsl/" />
+
+    <!-- Resolve DTD PUBLIC identifiers -->
+    <nextCatalog  catalog="db42xml/catalog.xml" />
+
+    <!-- To resolve simple DTD SYSTEM identifiers. -->
+    <!-- Note: this does not work with Java resolver -->
+    <!--   classes in Saxon or Xalan -->
+    <system
+         systemId="docbook.dtd"
+         uri="db42xml/docbookx.dtd" />
+
+    <!-- To resolve short stylesheet references -->
+    <uri
+        name="docbook_html.xsl"
+        uri="docbook/docbook-xsl/html/docbook.xsl" />
+    <uri 
+        name="docbook_chunk.xsl"
+        uri="docbook/docbook-xsl/html/chunk.xsl" />
+    <uri
+        name="docbook_fo.xsl"
+        uri="docbook/docbook-xsl/fo/docbook.xsl" />
+
+  </group>
+
+</catalog>
diff --git a/doc/catalog.debian b/doc/catalog.debian
deleted file mode 100644 (file)
index e082e53..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-CATALOG /etc/sgml/docbook.cat  
-CATALOG /etc/sgml/docbook-dsssl.cat  
-DOCUMENT hyperobject.sgml
diff --git a/doc/catalog.fink b/doc/catalog.fink
deleted file mode 100644 (file)
index d791797..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CATALOG /sw/share/sgml/catalog
-DOCUMENT hyperobject.sgml
diff --git a/doc/catalog.redhat b/doc/catalog.redhat
deleted file mode 100644 (file)
index 1e8a521..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-CATALOG /etc/sgml/sgml-docbook-4.1.cat
-DOCUMENT hyperobject.sgml
diff --git a/doc/design.sgml b/doc/design.sgml
deleted file mode 100644 (file)
index f4c3dcd..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<chapter>
-  <title>Design</title>
-  <sect1>
-    <title>Class Options</title>
-    <para></para>
-  </sect1>
-</chapter>
diff --git a/doc/entities.xml b/doc/entities.xml
new file mode 100644 (file)
index 0000000..8a6b585
--- /dev/null
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="iso-8859-1" ?>
+
+<!ENTITY hyperobject "<application><emphasis>Hyperobject</emphasis></application>">
+<!ENTITY uffi "<application><emphasis>UFFI</emphasis></application>">
+<!ENTITY ffi "<acronym>FFI</acronym>">
+<!ENTITY cmucl "<application>CMUCL</application>">
+<!ENTITY scl "<application>SCL</application>">
+<!ENTITY lw "<application>Lispworks</application>">
+<!ENTITY sbcl "<application>SBCL</application>">
+<!ENTITY openmcl "<application>OpenMCL</application>">
+<!ENTITY mcl "<application>MCL</application>">
+<!ENTITY acl "<application>AllegroCL</application>">
+<!ENTITY cl "<application>ANSI Common Lisp</application>">
+<!ENTITY t "<constant>T</constant>">
+<!ENTITY nil "<constant>NIL</constant>">
+<!ENTITY null "<constant>NULL</constant>">
+<!ENTITY c "<computeroutput>C</computeroutput>">
+<!ENTITY asdf "<application>ASDF</application>">
+<!ENTITY kmrcl "<application>KMRCL</application>">
+<!ENTITY clsql "<application>CLSQL</application>">
diff --git a/doc/fo.xsl b/doc/fo.xsl
new file mode 100644 (file)
index 0000000..50ed481
--- /dev/null
@@ -0,0 +1,8 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<xsl:import href="docbook_fo.xsl"/>
+
+</xsl:stylesheet>
+
diff --git a/doc/glossary.sgml b/doc/glossary.sgml
deleted file mode 100644 (file)
index 008ada1..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<glossary>
-  <glossentry id="gloss-ffi">
-    <glossterm>Foreign Function Interface
-      <acronym>FFI</acronym>)
-    </glossterm>
-    <glossdef>
-      <para>
-        An interface to a C-compatible library.
-      </para>
-    </glossdef>
-  </glossentry>
-</glossary>
-
-
diff --git a/doc/html.xsl b/doc/html.xsl
new file mode 100644 (file)
index 0000000..aada3f2
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<xsl:import href="docbook_html.xsl"/>
+<xsl:param name="use.id.as.filename" select="1"/>
+
+</xsl:stylesheet>
+
diff --git a/doc/html_chunk.xsl b/doc/html_chunk.xsl
new file mode 100644 (file)
index 0000000..a2bb88f
--- /dev/null
@@ -0,0 +1,9 @@
+<?xml version='1.0'?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                version="1.0">
+
+<xsl:import href="docbook_chunk.xsl"/>
+<xsl:param name="use.id.as.filename" select="1"/>
+
+</xsl:stylesheet>
+
diff --git a/doc/hyperobject.sgml b/doc/hyperobject.sgml
deleted file mode 100644 (file)
index af60c10..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<!DOCTYPE BOOK PUBLIC "-//OASIS//DTD DocBook V4.1//EN" [
-<!ENTITY hyperobject "<application><emphasis>Hyperobject</emphasis></application>">
-<!ENTITY uffi "<application>UFFI</application>">
-<!ENTITY clsql "<application>CLSQL</application>">
-<!ENTITY kmrcl "<application>KMRCL</application>">
-<!ENTITY cmucl "<application>CMUCL</application>">
-<!ENTITY sbcl "<application>SBCL</application>">
-<!ENTITY scl "<application>SCL</application>">
-<!ENTITY lw "<application>Lispworks</application>">
-<!ENTITY openmcl "<application>OpenMCL</application>">
-<!ENTITY mcl "<application>MCL</application>">
-<!ENTITY acl "<application>AllegroCL</application>">
-<!ENTITY cl "<application>ANSI Common Lisp</application>">
-<!ENTITY t "<constant>T</constant>">
-<!ENTITY nil "<constant>NIL</constant>">
-<!ENTITY null "<constant>NULL</constant>">
-<!ENTITY c "<computeroutput>C</computeroutput>">
-<!ENTITY defsystem "<application>defsystem</application>">
-<!ENTITY asdf "<application>ASDF</application>">
-<!ENTITY bookinfo SYSTEM "bookinfo.sgml">
-<!ENTITY preface SYSTEM "preface.sgml">
-<!ENTITY intro SYSTEM "intro.sgml">
-<!ENTITY design SYSTEM "design.sgml">
-<!ENTITY ref SYSTEM "ref.sgml">
-]>
-
-<book>
-&bookinfo;
-&preface;
-&intro;
-&design;
-&ref;
-</book>
diff --git a/doc/hyperobject.xml b/doc/hyperobject.xml
new file mode 100644 (file)
index 0000000..1c0cf26
--- /dev/null
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % myents SYSTEM "entities.xml">
+%myents;
+]>
+
+
+<book lang="en">
+  <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+  <xi:include href="intro.xml" xmlns:xi="http://www.w3.org/2001/XInclude" />
+</book>
diff --git a/doc/intro.sgml b/doc/intro.sgml
deleted file mode 100644 (file)
index 41642d3..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<chapter>
-  <title>Introduction</title>
-  <sect1>
-    <title>Purpose</title>
-    <para> This reference guide describes
-      &hyperobject;, which provides an object representation
-      library for Common Lisp programs. 
-    </para>
-  </sect1>
-
-  <sect1>
-    <title>Supported Implementations</title> 
-    <para>The primary tested and supported platforms for &hyperobject; are: 
-    </para>
-    <itemizedlist mark="opencircle">
-      <listitem><para>&acl; v6.2</para></listitem>
-      <listitem><para>&lw; v4.2</para></listitem>
-      <listitem><para>&cmucl; 18d</para></listitem>
-      <listitem><para>&sbcl; 0.7.10</para></listitem>
-      <listitem><para>&scl; 1.1.1</para></listitem>
-    </itemizedlist>
-  </sect1>
-
-  <sect1>
-  <title>Installation</title>
-  <sect2>
-    <title>Download</title>
-    <para>
-You need to download the &hyperobject; package from its web
-<ulink url="http://hyperobject.b9.com"><citetitle>home</citetitle></ulink>.
-Other require packages are:</para> 
-<itemizedlist mark="opencircle">
-<listitem><para>&kmrcl; from it's <ulink url="ftp://kmrcl.b9.com"><citetitle>home</citetitle></ulink>.</para></listitem>
-<listitem><para>&uffi; from it's <ulink url="http://uffi.b9.com"><citetitle>home</citetitle></ulink>.</para></listitem>
-<listitem><para>&clsql; from it's <ulink url="ftp://clsql.b9.com"><citetitle>home</citetitle></ulink>.</para></listitem>
-<listitem><para>&asdf; from it's home  <ulink url="http://www.sourceforge.net/projects/cclan"><citetitle>CCLAN</citetitle></ulink> package. You can download
-the file <filename>asdf.lisp</filename> from the CVS 
-<ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp"><citetitle>tree</citetitle></ulink>.</para></listitem>
-</itemizedlist>
-  </sect2>     
-  <sect2>
-    <title>Loading</title>
-    <para>
-      After downloading and installing &asdf;, simply
-      <function>push</function> the
-      directories containing &hyperobject;, &kmrcl;, &uffi;, and &clsql; onto
-      <varname>asdf:*central-registry*</varname> variable. Whenever you
-want to load the &hyperobject; package, use the function
-      <computeroutput>(asdf:oos 'asdf:load-op :hyperobject)</computeroutput>.
-    </para>
-  </sect2>
-</sect1>
-
-    <sect1>
-      <title>Design</title>
-      <sect2>
-       <title>Overview</title>
-       <para>
-         &hyperobject; was designed as a cross-implementation 
-         compatible <emphasis>Foreign Function Interface</emphasis>.
-         Necessarily,
-         only a common subset of functionality can be
-         provided. Likewise, not every optimization for that a specific
-         implementation provides can be supported. Wherever possible,
-         though, implementation-specific optimizations are invoked.
-       </para> 
-      </sect2>
-
-      </sect1>
-</chapter>
diff --git a/doc/intro.xml b/doc/intro.xml
new file mode 100644 (file)
index 0000000..e4431f7
--- /dev/null
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
+"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % myents SYSTEM "entities.xml">
+%myents;
+]>
+
+<chapter id="introduction">
+  <title>Introduction</title>
+  <sect1 id="purpose">
+    <title>Purpose</title>
+    <para> This reference guide describes
+    &hyperobject;, which provides an object representation
+    library for Common Lisp programs. 
+    </para>
+  </sect1>
+
+  <sect1 id="supported_impl">
+    <title>Supported Implementations</title> 
+    <para>The primary tested and supported platforms for &hyperobject; are: 
+    </para>
+    <itemizedlist mark="opencircle">
+      <listitem><para>&acl; v6.2</para></listitem>
+      <listitem><para>&lw; v4.3</para></listitem>
+      <listitem><para>&cmucl; 18e</para></listitem>
+      <listitem><para>&sbcl; 0.8.5</para></listitem>
+      <listitem><para>&scl; 1.1.1</para></listitem>
+      <listitem><para>&openmcl; 0.14</para></listitem>
+    </itemizedlist>
+  </sect1>
+
+  <sect1 id="download">
+    <title>Installation</title>
+    <sect2>
+      <title>Download</title>
+      <para>
+       You need to download the &hyperobject; package from its web
+       <ulink url="http://hyperobject.b9.com/"><citetitle>home</citetitle></ulink>.
+      Other required packages are:</para> 
+      <itemizedlist mark="opencircle">
+       <listitem>
+         <para>
+           <ulink url="http://files.b9.com/kmrcl/"><citetitle>&kmrcl;</citetitle></ulink>
+         </para>
+       </listitem>
+       <listitem>
+       <para>
+         <ulink url="http://files.b9.com/uffi/"><citetitle>&uffi;</citetitle></ulink>
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           <ulink url="http://files.b9.com/clsql/"><citetitle>&clsql;</citetitle></ulink>
+         </para>
+       </listitem>
+       <listitem>
+         <para>
+           &asdf; from it's home <ulink
+           url="http://www.sourceforge.net/projects/cclan"><citetitle>CCLAN</citetitle></ulink>
+           package. You can download the file
+           <filename>asdf.lisp</filename> from the CVS <ulink
+           url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp"><citetitle>tree</citetitle></ulink>.
+         </para>
+       </listitem>
+      </itemizedlist>
+    </sect2>   
+    <sect2>
+      <title>Loading</title>
+      <para>
+       After downloading and installing &asdf;, simply
+       <function>push</function> the
+       directories containing &hyperobject;, &kmrcl;, &uffi;, and &clsql; onto
+       <varname>asdf:*central-registry*</varname> variable. Whenever you
+       want to load the &hyperobject; package, use the function
+       <computeroutput>(asdf:operate 'asdf:load-op :hyperobject)</computeroutput>.
+      </para>
+    </sect2>
+  </sect1>
+  
+</chapter>
diff --git a/doc/preface.sgml b/doc/preface.sgml
deleted file mode 100644 (file)
index 16ed906..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-<preface>
-  <title>Preface</title>
-  <para>This reference guide describes the usage and features
-    of &hyperobject;.
-  </para>
-</preface>
diff --git a/doc/ref.sgml b/doc/ref.sgml
deleted file mode 100644 (file)
index f299c19..0000000
+++ /dev/null
@@ -1,2218 +0,0 @@
-<!-- -*- DocBook -*- -->
-
-  
-<reference>
-  <title>Declarations</title>
-
-  <partintro>
-    <sect1>
-      <title>Overview</title>
-      <para>Declarations are used to give the compiler optimizing
-       information about foreign types. Currently, only &cmucl;
-       supports declarations. On &acl; and &lw;, these expressions 
-       declare the type generically as &t;
-      </para>
-    </sect1>
-  </partintro>
-
-      <refentry id="def-type">
-       <refnamediv>
-         <refname>def-type</refname>
-       <refpurpose>Defines a Common Lisp type. 
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-type</function> <replaceable>name type</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A symbol naming the type</para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>A form that is evaluated that specifies the &uffi; type.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>Defines a Common Lisp type based on a &uffi; type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-type char-ptr '(* :char))
-...
-(defun foo (ptr)
-  (declare (type char-ptr ptr))
-  ...
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Defines a new &cl; type.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-  </reference>
-
-
-  <reference>
-    <title>Primitive Types</title>
-    <partintro>
-      <title>Overview</title>
-       <para>
-         Primitive types have a single value, these include
-         characters, numbers, and pointers. They are all symbols in
-         the keyword package.
-       </para>
-       <itemizedlist>
-         <listitem>
-           <para><constant>:char</constant> - Signed 8-bits. A
-dereferenced :char pointer returns an character.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:unsigned-char</constant> - Unsigned 8-bits. A dereferenced :unsigned-char
-pointer returns an character.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:byte</constant> - Signed 8-bits. A
-dereferenced :byte pointer returns an integer.</para>
-          </listitem>
-         <listitem>
-           <para><constant>:unsigned-byte</constant> - Unsigned 8-bits. A
-dereferenced :unsigned-byte pointer returns an integer.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:short</constant> - Signed 16-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:unsigned-short</constant> - Unsigned 16-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:int</constant> - Signed 32-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:unsigned-int</constant> - Unsigned 32-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:long</constant> - Signed 32-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:unsigned-long</constant> - Unsigned 32-bits.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:float</constant> - 32-bit floating point.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:double</constant> - 64-bit floating point.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:cstring</constant> - 
-A &null; terminated string used for passing and returning characters strings with a &c; function.
-           </para>
-         </listitem>
-         <listitem>
-           <para><constant>:void</constant> - 
-The absence of a value. Used to indicate that a function does not return a value.</para>
-         </listitem>
-         <listitem>
-           <para><constant>:pointer-void</constant> - 
-Points to a generic object.</para>
-         </listitem>
-         <listitem>
-           <para><constant>*</constant> - Used to declare a pointer to an object</para>
-         </listitem>
-       </itemizedlist>
-      </partintro>
-
-      <refentry id="def-constant">
-       <refnamediv>
-         <refname>def-constant</refname>
-       <refpurpose>Binds a symbol to a constant. 
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-constant</function> <replaceable>name value &amp;key export</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A symbol that will be bound to the value.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>value</parameter></term>
-           <listitem>
-             <para>An evaluated form that is bound the the name.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>export</parameter></term>
-           <listitem>
-             <para>When &t;, the name is exported from the current package. The default is &nil;</para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         This is a thin wrapper around
-         <function>defconstant</function>. It evaluates at
-           compile-time and optionally exports the symbol from the package.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-constant pi2 (* 2 pi))
-(def-constant exported-pi2 (* 2 pi) :export t)
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Creates a new special variable..</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="def-foreign-type">
-       <refnamediv>
-         <refname>def-foreign-type</refname>
-       <refpurpose>Defines a new foreign type. 
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsect1>
-       <title>Syntax</title>
-<synopsis>
-         <function>def-foreign-type</function> <replaceable>name type</replaceable>
-</synopsis>
-      </refsect1>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A symbol naming the new foreign type.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>value</parameter></term>
-           <listitem>
-             <para>A form that is not evaluated that defines the new
-foreign type.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>Defines a new foreign type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-foreign-type my-generic-pointer :pointer-void)
-(def-foreign-type a-double-float :double-float)
-(def-foreign-type char-ptr (* :char))
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Defines a new foreign type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="null-char-p">
-       <refnamediv>
-         <refname>null-char-p</refname>
-       <refpurpose>Tests a character for &null; value.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsect1>
-       <title>Syntax</title>
-<synopsis>
-         <function>null-char-p</function> <replaceable>char</replaceable> => <returnvalue>is-null</returnvalue>
-</synopsis>
-      </refsect1>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>char</parameter></term>
-           <listitem>
-             <para>A character or integer.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>is-null</parameter></term>
-           <listitem>
-             <para>A boolean flag indicating if char is a &null; value.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         A predicate testing if a character or integer is &null;. This
-abstracts the difference in implementations where some return a 
-<computeroutput>character</computeroutput> and some return a 
-<computeroutput>integer</computeroutput> whence dereferencing a 
-<computeroutput>C</computeroutput> character pointer.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-array-pointer ca :unsigned-char)
-(let ((fs (convert-to-foreign-string "ab")))
-   (values (null-char-p (deref-array fs 'ca 0))
-           (null-char-p (deref-array fs 'ca 2))))
-=> &nil;
-   &t;
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-  </reference>
-
-  <reference>
-    <title>Aggregate Types</title>
-    <partintro>
-      <title>Overview</title>
-      <para>
-       Aggregate types are comprised of one or more primitive types.
-      </para>
-    </partintro>
-
-    <refentry id="def-enum">
-      <refnamediv>
-       <refname>def-enum</refname>
-       <refpurpose>Defines a &c; enumeration.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-enum</function> <replaceable>name fields &amp;key separator-string</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A symbol that names the enumeration.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>fields</parameter></term>
-           <listitem>
-             <para>A list of field defintions. Each definition can be
-a symbol or a list of two elements. Symbols get assigned a value of the
-current counter which starts at <computeroutput>0</computeroutput> and
-increments by <computeroutput>1</computeroutput> for each subsequent symbol. It the field definition is a list, the first position is the symbol and the second
-position is the value to assign the the symbol. The current counter gets set
-to <computeroutput>1+</computeroutput> this value.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>separator-string</parameter></term>
-           <listitem>
-             <para>A string that governs the creation of constants. The
-default is <computeroutput>"#"</computeroutput>.</para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Declares a &c; enumeration. It generates constants with integer values for the elements of the enumeration. The symbols for the these constant
-values are created by the <function>concatenation</function> of the
-enumeration name, separator-string, and field symbol. Also creates
-a foreign type with the name <parameter>name</parameter> of type
-<constant>:int</constant>.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-enum abc (:a :b :c)) 
-;; Creates constants abc#a (1), abc#b (2), abc#c (3) and defines
-;; the foreign type "abc" to be :int
-
-(def-enum efoo (:e1 (:e2 10) :e3) :separator-string "-")
-;; Creates constants efoo-e1 (1), efoo-e2 (10), efoo-e3 (11) and defines
-;; the foreign type efoo to be :int
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Creates a :int foreign type, defines constants.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-      <refentry id="def-struct">
-       <refnamediv>
-         <refname>def-struct</refname>
-       <refpurpose>Defines a &c; structure.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-struct</function> <replaceable>name &amp;rest fields</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A symbol that names the structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>fields</parameter></term>
-           <listitem>
-             <para>A variable number of field defintions. Each definition is a list consisting of a symbol naming the field followed by its foreign type.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Declares a structure. A special type is available as a slot
-in the field. It is a pointer that points to an instance of the parent
-structure. It's type is <constant>:pointer-self</constant>.
-
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-struct foo (a :unsigned-int) 
-                (b (* :char)) 
-                (c (:array :int 10)) 
-                (next :pointer-self))
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Creates a foreign type.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="get-slot-value">
-      <refnamediv>
-       <refname>get-slot-value</refname>
-       <refpurpose>Retrieves a value from a slot of a structure.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>get-slot-value</function> <replaceable>obj type field</replaceable> => <returnvalue>value</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>obj</parameter></term>
-           <listitem>
-             <para>A pointer to foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>A name of the foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>field</parameter></term>
-           <listitem>
-             <para>A name of the desired field in foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>value</returnvalue></term>
-           <listitem>
-             <para>The value of the field in the structure.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Accesses a slot value from a structure.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(get-slot-value foo-ptr 'foo-structure 'field-name)
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="get-slot-pointer">
-      <refnamediv>
-       <refname>get-slot-pointer</refname>
-       <refpurpose>Retrieves a pointer from a slot of a structure.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>get-slot-pointer</function> <replaceable>obj type field</replaceable> => <returnvalue>pointer</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>obj</parameter></term>
-           <listitem>
-             <para>A pointer to foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>A name of the foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>field</parameter></term>
-           <listitem>
-             <para>A name of the desired field in foreign structure.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>pointer</returnvalue></term>
-           <listitem>
-             <para>The value of the field in the structure.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         This is similar to <function>get-slot-value</function>. It
-         is used when the value of a slot is a pointer type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(get-slot-pointer foo-ptr 'foo-structure 'my-char-ptr)
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="def-array-pointer">
-      <refnamediv>
-       <refname>def-array-pointer</refname>
-       <refpurpose>Defines a pointer to a array of type.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-array-pointer</function> <replaceable>name type</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A name of the new foreign type.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>The foreign type of the array elements.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Defines a type tat is a pointer to an array of type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-array-pointer byte-array-pointer :unsigned-char)
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Defines a new foreign type.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="deref-array">
-      <refnamediv>
-       <refname>deref-array</refname>
-       <refpurpose>Deference an array.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>deref-array</function> <replaceable>array type positon</replaceable> => <returnvalue>value</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>array</parameter></term>
-           <listitem>
-             <para>A foreign array.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>The foreign type of the array.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>position</parameter></term>
-           <listitem>
-             <para>An integer specifying the position to retrieve from
-the array.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>value</returnvalue></term>
-           <listitem>
-             <para>The value stored in the position of the array.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Dereferences (retrieves) the value of an array element.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-array ca :char)
-(let ((fs (convert-to-foreign-string "ab")))
-   (values (null-char-p (deref-array fs 'ca 0))
-           (null-char-p (deref-array fs 'ca 2))))
-=> &nil;
-   &t;
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="def-union">
-      <refnamediv>
-       <refname>def-union</refname>
-       <refpurpose>Defines a foreign union type.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-union</function> <replaceable>name &amp;rest fields</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A name of the new union type.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>fields</parameter></term>
-           <listitem>
-             <para>A list of fields of the union.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Defines a foreign union type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-union test-union
-  (a-char :char)
-  (an-int :int))
-
-(let ((u (allocate-foreign-object 'test-union))
-  (setf (get-slot-value u 'test-union 'an-int) (+ 65 (* 66 256)))
-  (prog1 
-    (ensure-char-character (get-slot-value u 'test-union 'a-char))
-    (free-foreign-object u)))
-=> #\A
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Defines a new foreign type.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-</reference>
-
-<reference>
-    <title>Objects</title>
-<partintro>
-<title>Overview</title>
-    <para>
-      Objects are entities that can allocated, referred to by pointers, and
-can be freed.
-    </para>
-</partintro>
-
-
-    <refentry id="allocate-foreign-object">
-      <refnamediv>
-       <refname>allocate-foreign-object</refname>
-       <refpurpose>Allocates an instance of a foreign object.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>allocate-foreign-object</function> <replaceable>type &amp;optional size</replaceable> => <returnvalue>ptr</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>The type of foreign object to allocate. This parameter is evaluated.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>size</parameter></term>
-           <listitem>
-             <para>An optional size parameter that is evaluated. If specified, allocates and returns an
-array of <parameter>type</parameter> that is <parameter>size</parameter> members long. This parameter is evaluated.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>ptr</returnvalue></term>
-           <listitem>
-             <para>A pointer to the foreign object.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Allocates an instance of a foreign object. It returns a pointer to the object.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-struct ab (a :int) (b :double))
-(allocate-foreign-object 'ab)
-=> #&lt;ptr&gt;
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="free-foreign-object">
-      <refnamediv>
-       <refname>free-foreign-object</refname>
-       <refpurpose>Frees memory that was allocated for a foreign boject.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>free-foreign-object</function> <replaceable>ptr</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>ptr</parameter></term>
-           <listitem>
-             <para>A pointer to the allocated foreign object to free.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Frees the memory used by the allocation of a foreign object.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="with-foreign-object">
-      <refnamediv>
-       <refname>with-foreign-object</refname>
-       <refpurpose>Wraps the allocation of a foreign object around a body of code.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>with-foreign-object</function> <replaceable>(var type) &amp;body body</replaceable> => <returnvalue>form-return</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>var</parameter></term>
-           <listitem>
-             <para>The variable name to bind.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>The type of foreign object to allocate. This parameter is evaluated.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>form-return</returnvalue></term>
-           <listitem>
-             <para>The result of evaluating the <parameter>body</parameter>.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-This function wraps the allocation, binding, and destruction of a foreign object.
-On &cmucl; and
-&lw; platforms the object is stack allocated for efficiency. Benchmarks show that &acl; performs
-much better with static allocation.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(defun gethostname2 ()
-  "Returns the hostname"
-  (uffi:with-foreign-object (name '(:array :unsigned-char 256))
-    (if (zerop (c-gethostname (uffi:char-array-to-pointer name) 256))
-       (uffi:convert-from-foreign-string name)
-       (error "gethostname() failed."))))
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="size-of-foreign-type">
-      <refnamediv>
-       <refname>size-of-foreign-type</refname>
-       <refpurpose>Returns the number of data bytes used by a foreign object type.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>size-of-foreign-type</function> <replaceable>ftype</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>ftype</parameter></term>
-           <listitem>
-             <para>A foreign type specifier. This parameter is evaluated.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Returns the number of data bytes used by a foreign object type. This does not include any Lisp storage overhead.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <para>
-<programlisting>
-(size-of-foreign-object :unsigned-byte)
-=> 1
-(size-of-foreign-object 'my-100-byte-vector-type)
-=> 100
-</programlisting>
-        </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="pointer-address">
-      <refnamediv>
-       <refname>pointer-address</refname>
-       <refpurpose>Returns the address of a pointer.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>pointer-address</function> <replaceable>ptr</replaceable> => <returnvalue>address</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>ptr</parameter></term>
-           <listitem>
-             <para>A pointer to a foreign object.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>address</parameter></term>
-           <listitem>
-             <para>An integer representing the pointer's address.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Returns the address as an integer of a pointer.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="deref-pointer">
-      <refnamediv>
-       <refname>deref-pointer</refname>
-       <refpurpose>Deferences a pointer.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>deref-pointer</function> <replaceable>ptr type</replaceable> => <returnvalue>value</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>ptr</parameter></term>
-           <listitem>
-             <para>A pointer to a foreign object.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>A foreign type of the object being pointed to.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>value</returnvalue></term>
-           <listitem>
-             <para>The value of the object where the pointer points.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Returns the object to which a pointer points.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <para>
-<programlisting>
-(let ((intp (allocate-foreign-object :int)))
-  (setf (deref-pointer intp :int) 10)
-  (prog1
-    (deref-pointer intp :int)
-    (free-foreign-object intp)))
-=> 10
-</programlisting>
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="ensure-char-character">
-      <refnamediv>
-       <refname>ensure-char-character</refname>
-       <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is
-a character.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>ensure-char-character</function> <replaceable>object</replaceable> => <returnvalue>char</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>object</parameter></term>
-           <listitem>
-             <para>Either a character or a integer specifying a character code.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>char</returnvalue></term>
-           <listitem>
-             <para>A character.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Ensures that an object obtained by dereferencing a 
-<constant>:char</constant> pointer is a character.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <para>
-<programlisting>
-(let ((fs (convert-to-foreign-string "a")))
-  (prog1 
-    (ensure-char-character (deref-pointer fs :char))
-    (free-foreign-object fs)))
-=> #\a
-</programlisting>
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>Depending upon the implementation and what &uffi; expects, this
-macro may signal an error if the object is not a character or
-integer.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="ensure-char-integer">
-      <refnamediv>
-       <refname>ensure-char-integer</refname>
-       <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is
-an integer.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>ensure-char-integer</function> <replaceable>object</replaceable> => <returnvalue>int</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>object</parameter></term>
-           <listitem>
-             <para>Either a character or a integer specifying a character code.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>int</returnvalue></term>
-           <listitem>
-             <para>An integer.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Ensures that an object obtained by dereferencing a 
-<constant>:char</constant> pointer is an integer.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <para>
-<programlisting>
-(let ((fs (convert-to-foreign-string "a")))
-  (prog1 
-    (ensure-char-integer (deref-pointer fs :char))
-    (free-foreign-object fs)))
-=> 96
-</programlisting>
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>Depending upon the implementation and what &uffi; expects, this
-macro may signal an error if the object is not a character or
-integer.</para>
-      </refsect1>
-    </refentry>
-
-    <refentry id="make-null-pointer">
-      <refnamediv>
-       <refname>make-null-pointer</refname>
-       <refpurpose>Create a &null; pointer.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>make-null-pointer</function> <replaceable>type</replaceable> => <returnvalue>ptr</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>type</parameter></term>
-           <listitem>
-             <para>A type of object to which the pointer refers.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>ptr</parameter></term>
-           <listitem>
-             <para>The &null; pointer of type <parameter>type</parameter>.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Creates a &null; pointer of a specified type.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="null-pointer-p">
-      <refnamediv>
-       <refname>null-pointer-p</refname>
-       <refpurpose>Tests a pointer for &null; value.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>null-pointer-p</function> <replaceable>ptr</replaceable> => <returnvalue>is-null</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>ptr</parameter></term>
-           <listitem>
-             <para>A foreign object pointer.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>is-null</returnvalue></term>
-           <listitem>
-             <para>The boolean flag.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         A predicate testing if a pointer is has a &null; value.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="null-cstring-pointer">
-      <refnamediv>
-       <refname>+null-cstring-pointer+</refname>
-       <refpurpose>A constant &null; cstring pointer.
-       </refpurpose>
-       <refclass>Constant</refclass>
-      </refnamediv>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         A &null; cstring pointer. This can be used for testing
-if a cstring returned by a function is &null;.
-       </para>
-      </refsect1>
-    </refentry>
-
-</reference>
-
-    <reference>
-      <title>Strings</title>
-<partintro>
-<title>Overview</title>
-<para>
-
-         &uffi; has functions to two types of
-<varname>C</varname>-compatible
-         strings: <emphasis>cstring</emphasis> and
-<emphasis>foreign</emphasis> strings.
-
-cstrings are used <emphasis>only</emphasis> as parameters to and from
-functions. In some implementations a cstring is not a foreign type but
-rather the Lisp string itself. On other platforms a cstring is a newly
-allocated foreign vector for storing characters. The following is an
-example of using cstrings to both send and return a value.  
-</para>
-
-<programlisting>
-(uffi:def-function ("getenv" c-getenv) 
-    ((name :cstring))
-  :returning :cstring)
-
-(defun my-getenv (key)
-  "Returns an environment variable, or NIL if it does not exist"
-  (check-type key string)
-  (uffi:with-cstring (key-native key)
-    (uffi:convert-from-cstring (c-getenv key-native))))
-</programlisting>
-
-<para> In contrast, foreign strings are always a foreign vector of
-characters which have memory allocated. Thus, if you need to allocate
-memory to hold the return value of a string, you must use a foreign
-string and not a cstring.  The following is an example of using a foreign
-string for a return value.  </para>
-
-<programlisting>
-(uffi:def-function ("gethostname" c-gethostname)
-    ((name (* :unsigned-char))
-     (len :int))
-  :returning :int)
-
-(defun gethostname ()
-  "Returns the hostname"
-  (let* ((name (uffi:allocate-foreign-string 256))
-         (result-code (c-gethostname name 256))
-         (hostname (when (zerop result-code)
-                     (uffi:convert-from-foreign-string name))))
-    (uffi:free-foreign-object name)
-    (unless (zerop result-code)
-      (error "gethostname() failed."))))
-</programlisting>
-
-</partintro>
-
-    <refentry id="convert-from-cstring">
-      <refnamediv>
-       <refname>convert-from-cstring</refname>
-       <refpurpose>Converts a cstring to a Lisp string.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>convert-from-cstring</function> <replaceable>cstring</replaceable> => <returnvalue>string</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>cstring</parameter></term>
-           <listitem>
-             <para>A cstring.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>string</returnvalue></term>
-           <listitem>
-             <para>A Lisp string.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Converts a Lisp string to a <constant>cstring</constant>. This is
-most often used when processing the results of a foreign function
-that returns a cstring.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="convert-to-cstring">
-      <refnamediv>
-       <refname>convert-to-cstring</refname>
-       <refpurpose>Converts a Lisp string to a cstring.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>convert-to-cstring</function> <replaceable>string</replaceable> => <returnvalue>cstring</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>string</parameter></term>
-           <listitem>
-             <para>A Lisp string.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>cstring</returnvalue></term>
-           <listitem>
-             <para>A cstring.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Converts a Lisp string to a
-         <varname>cstring</varname>. The
-         <varname>cstring</varname> should be freed with
-         <function>free-cstring</function>.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>On some implementations, this function allocates memory.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="free-cstring">
-      <refnamediv>
-       <refname>free-cstring</refname>
-       <refpurpose>Free memory used by cstring.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>free-cstring</function> <replaceable>cstring</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>cstring</parameter></term>
-           <listitem>
-             <para>A cstring.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Frees any memory possibly allocated by
-         <function>convert-to-cstring</function>. On some implementions, a cstring is just the Lisp string itself.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="with-cstring">
-      <refnamediv>
-       <refname>with-cstring</refname>
-       <refpurpose>Binds a newly created cstring.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>with-cstring</function> <replaceable>(cstring string) {body}</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>cstring</parameter></term>
-           <listitem>
-             <para>A symbol naming the cstring to be created.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>string</parameter></term>
-           <listitem>
-             <para>A Lisp string that will be translated to a cstring.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>body</parameter></term>
-           <listitem>
-             <para>The body of where the cstring will be bound.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Binds a symbol to a cstring created from conversion of a string. Automatically frees the <varname>cstring</varname>.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <para>
-           <programlisting>
-(def-function ("getenv" c-getenv) 
-   ((name :cstring))
-   :returning :cstring)
-
-(defun getenv (key)
-  "Returns an environment variable, or NIL if it does not exist"
-  (check-type key string)
-  (with-cstring (key-cstring key)
-    (convert-from-cstring (c-getenv key-cstring))))
-           </programlisting>
-         </para>
-       </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="convert-from-foreign-string">
-      <refnamediv>
-       <refname>convert-from-foreign-string</refname>
-       <refpurpose>Converts a foreign string into a Lisp string.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>convert-from-foreign-string</function> <replaceable>foreign-string &amp;key length null-terminated-p</replaceable> => <returnvalue>string</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>foreign-string</parameter></term>
-           <listitem>
-             <para>A foreign string.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>length</parameter></term>
-           <listitem>
-             <para>The length of the foreign string to
-convert. The default is the length of the string until a &null;
-character is reached.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>null-terminated-p</parameter></term>
-           <listitem>
-             <para>A boolean flag with a default value of &t; When true,
-the string is converted until the first &null; character is reached.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>string</returnvalue></term>
-           <listitem>
-             <para>A Lisp string.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Returns a Lisp string from a foreign string. 
-Can translated ASCII and binary strings.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-    <refentry id="convert-to-foreign-string">
-      <refnamediv>
-       <refname>convert-to-foreign-string</refname>
-       <refpurpose>Converts a Lisp string to a foreign string.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>convert-to-foreign-string</function> <replaceable>string</replaceable> => <returnvalue>foreign-string</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>string</parameter></term>
-           <listitem>
-             <para>A Lisp string.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>foreign-string</returnvalue></term>
-           <listitem>
-             <para>A foreign string.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Converts a Lisp string to a foreign string. Memory should be
-         freed with <function>free-foreign-object</function>.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-
-
-    <refentry id="allocate-foreign-string">
-      <refnamediv>
-       <refname>allocate-foreign-string</refname>
-       <refpurpose>Allocates space for a foreign string.
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>allocate-foreign-string</function> <replaceable>size &amp;key unsigned</replaceable> => <returnvalue>foreign-string</returnvalue>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>size</parameter></term>
-           <listitem>
-             <para>The size of the space to be allocated in bytes.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>unsigned</parameter></term>
-           <listitem>
-             <para>A boolean flag with a default value of &t;. When true,
-marks the pointer as an <constant>:unsigned-char</constant>.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>foreign-string</returnvalue></term>
-           <listitem>
-             <para>A foreign string which has undefined contents.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>
-         Allocates space for a foreign string. Memory should
-         be freed with <function>free-foreign-object</function>.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-  </reference>
-
-  <reference>
-      <title>Functions &amp; Libraries</title>
-
-      <refentry id="def-function">
-       <refnamediv>
-         <refname>def-function</refname>
-       <refpurpose>Declares a function. 
-       </refpurpose>
-       <refclass>Macro</refclass>
-      </refnamediv>
-      <refsynopsisdiv>
-       <title>Syntax</title>
-       <synopsis>
-         <function>def-function</function> <replaceable>name args &amp;key module returning</replaceable>
-       </synopsis>
-      </refsynopsisdiv>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>name</parameter></term>
-           <listitem>
-             <para>A string or list specificying the function name. If it is a string, that names the foreign function. A Lisp name is created by translating #\_ to #\- and by converting to upper-case in case-insensitive Lisp implementations. If it is a list, the first item is a string specifying the foreign function name and the second it is a symbol stating the Lisp name.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>args</parameter></term>
-           <listitem>
-             <para>A list of argument declarations. If &nil;, indicates that the function does not take any arguments.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>module</parameter></term>
-           <listitem>
-             <para>A string specifying which module (or library) that the foreign function resides. (Required by Lispworks)</para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>returning</returnvalue></term>
-           <listitem>
-             <para>A declaration specifying the result type of the
-foreign function. If <constant>:void</constant> indicates module does not return any value.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>Declares a foreign function.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(def-function "gethostname" 
-  ((name (* :unsigned-char))
-   (len :int))
-  :returning :int)
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-      <refentry id="load-foreign-library">
-       <refnamediv>
-         <refname>load-foreign-library</refname>
-       <refpurpose>Loads a foreign library. 
-       </refpurpose>
-       <refclass>Function</refclass>
-      </refnamediv>
-      <refsect1>
-       <title>Syntax</title>
-<synopsis>
-         <function>load-foreign-library</function> <replaceable>filename &amp;key module supporting-libraries</replaceable> => <returnvalue>success</returnvalue>
-</synopsis>
-      </refsect1>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>filename</parameter></term>
-           <listitem>
-             <para>A string or pathname specifying the library location
-in the filesystem. At least one implementation (&lw;) can not
-accept a logical pathname.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>module</parameter></term>
-           <listitem>
-             <para>A string designating the name of the module to apply
-to functions in this library. (Required for Lispworks)
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>supporting-libraries</parameter></term>
-           <listitem>
-             <para>A list of strings naming the libraries required to
-link the foreign library. (Required by CMUCL)
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>success</returnvalue></term>
-           <listitem>
-             <para>A boolean flag, &t; if the library was able to be
-loaded successfully or if the library has been previously loaded,
-otherwise &nil;.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>Loads a foreign library. Applies a module name to functions
-within the library. Ensures that a library is only loaded once during
-a session.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-  (load-foreign-library #p"/usr/lib/libmysqlclient.so" 
-                        :module "mysql" 
-                        :supporting-libraries '("c"))
-    => T
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>Loads the foreign code into the Lisp system.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>Ability to load the file.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-      <refentry id="find-foreign-library">
-       <refnamediv>
-         <refname>find-foreign-library</refname>
-       <refpurpose>Finds a foreign library file.
-       </refpurpose>
-       <refclass>Function</refclass>
-      </refnamediv>
-      <refsect1>
-       <title>Syntax</title>
-<synopsis>
-         <function>find-foreign-library</function> <replaceable>names directories &amp; drive-letters types</replaceable> => <returnvalue>path</returnvalue>
-</synopsis>
-      </refsect1>
-      <refsect1>
-       <title>Arguments and Values</title>
-       <variablelist>
-         <varlistentry>
-           <term><parameter>names</parameter></term>
-           <listitem>
-             <para>A string or list of strings containing the base name of the library file.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>directories</parameter></term>
-           <listitem>
-             <para>A string or list of strings containing the directory the library file.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>drive-letters</parameter></term>
-           <listitem>
-             <para>A string or list of strings containing the drive letters for the library file.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><parameter>types</parameter></term>
-           <listitem>
-             <para>A string or list of strings containing the file type of the library file. Default
-is &nil;. If &nil;, will use a default type based on the currently running implementation.
-             </para>
-           </listitem>
-         </varlistentry>
-         <varlistentry>
-           <term><returnvalue>path</returnvalue></term>
-           <listitem>
-             <para>A path containing the path found, or &nil; if the library file was not found.
-             </para>
-           </listitem>
-         </varlistentry>
-       </variablelist>
-      </refsect1>
-      <refsect1>
-       <title>Description</title>
-       <para>Finds a foreign library by searching through a number of possible locations. Returns
-the path of the first found file.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Examples</title>
-       <programlisting>
-(find-foreign-library '("libmysqlclient" "libmysql")
-    '("/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/mysql/lib/opt/")
-    :types '("so" "dll")
-    :drive-letters '("C" "D" "E"))
-=> #P"D:\\mysql\\lib\\opt\\libmysql.dll"
-       </programlisting>
-      </refsect1>
-      <refsect1>
-       <title>Side Effects</title>
-       <para>None.
-       </para>
-      </refsect1>
-      <refsect1>
-       <title>Affected by</title>
-       <para>None.</para>
-      </refsect1>
-      <refsect1>
-       <title>Exceptional Situations</title>
-       <para>None.</para>
-      </refsect1>
-    </refentry>
-
-</reference>
-
-