Changed the license to the AGPL3. Downcased all the lisp sources. Completed the README file and added Makefile rules to generate "README.pdf".

Pascal J. Bourguignon [2012-04-15 01:45]
Changed the license to the AGPL3. Downcased all the lisp sources. Completed the README file and added Makefile rules to generate "README.pdf".
Filename
COPYING
Makefile
README
README.pdf
cl-loaders/aima.lisp
cl-loaders/asdf.lisp
cl-loaders/cclan.lisp
cl-loaders/cl-pdf.lisp
cl-loaders/cliki.lisp
cl-loaders/clocc.lisp
cl-loaders/clx.lisp
cl-loaders/garnet.lisp
cl-loaders/hemlock.lisp
cl-loaders/lisa.lisp
cl-loaders/norvig-graph.lisp
cl-loaders/norvig.lisp
cl-loaders/old-asdf.lisp
cl-loaders/pjb.lisp
cl-loaders/plisp.lisp
cl-loaders/portableaserve.lisp
cl-loaders/pseudo.lisp
cl-loaders/regex.lisp
cl-loaders/uffi.lisp
cl-posix/cliki/Makefile
cl-posix/cliki/NEWS
cl-posix/cliki/README
cl-posix/cliki/TODO
cl-posix/cliki/authed-cliki-class.lisp
cl-posix/cliki/authed-cliki.lisp
cl-posix/cliki/buffered-output-stream-class.lisp
cl-posix/cliki/buffered-output-stream.lisp
cl-posix/cliki/cliki-instance-class.lisp
cl-posix/cliki/cliki-instance.lisp
cl-posix/cliki/cliki-net.lisp
cl-posix/cliki/cliki-page-class.lisp
cl-posix/cliki/cliki-page.lisp
cl-posix/cliki/cliki-posix-page.lisp
cl-posix/cliki/cliki-request-class.lisp
cl-posix/cliki/cliki-request.lisp
cl-posix/cliki/cliki-skin.lisp
cl-posix/cliki/cliki.asd
cl-posix/cliki/clposixcliki.asd
cl-posix/cliki/date.lisp
cl-posix/cliki/defpackage.lisp
cl-posix/cliki/edit-handler-class.lisp
cl-posix/cliki/edit-handler.lisp
cl-posix/cliki/elided-stream.lisp
cl-posix/cliki/example.lisp
cl-posix/cliki/handlers.lisp
cl-posix/cliki/hyperspec.lisp
cl-posix/cliki/index.lisp
cl-posix/cliki/link-checker.lisp
cl-posix/cliki/make-TODO.pl
cl-posix/cliki/recent-changes.lisp
cl-posix/cliki/search.lisp
cl-posix/cliki/strip-html-stream.lisp
cl-posix/cliki/utilities.lisp
cl-posix/cliki/versions.lisp
cl-posix/cliki/view-source.lisp
cl-posix/cliki/view.lisp
cl-posix/susv3.lisp
clext/character-sets.lisp
clext/closer-weak-test.lisp
clext/closer-weak.lisp
clext/init.lisp
clext/tests.lisp
clisp/Makefile
clisp/binio.lisp
clisp/disk.lisp
clisp/fifo-stream.lisp
clisp/init.lisp
clisp/iotask.lisp
clisp/make-volumes.lisp
clisp/mysql.lisp
clisp/objc.lisp
clisp/raw-memory.lisp
clisp/rfc1413.lisp
clisp/script.lisp
clisp/shell.lisp
clisp/string.lisp
clisp/susv3-mc3.lisp
clisp/susv3-xsi.lisp
clisp/susv3.lisp
clisp/syslog.lisp
clisp/uffi-bsd.lisp
clisp/uffi-test.lisp
clisp/uffi.lisp
clisp/xterm.lisp
clmisc/asdf-system-tarball-location.lisp
clmisc/init.lisp
clmisc/resource-utilization.lisp
common-lisp/Makefile
common-lisp/arithmetic/p127n2.lisp
common-lisp/arithmetic/primes.lisp
common-lisp/bank/iban.lisp
common-lisp/bank/rib.lisp
common-lisp/cesarum/activity.lisp
common-lisp/cesarum/array.lisp
common-lisp/cesarum/ascii.lisp
common-lisp/cesarum/brelation.lisp
common-lisp/cesarum/bset.lisp
common-lisp/cesarum/cache.lisp
common-lisp/cesarum/character-sets.lisp
common-lisp/cesarum/combination.lisp
common-lisp/cesarum/constraints.lisp
common-lisp/cesarum/date.lisp
common-lisp/cesarum/dfa.lisp
common-lisp/cesarum/dictionary.lisp
common-lisp/cesarum/dll.lisp
common-lisp/cesarum/ecma048.lisp
common-lisp/cesarum/file.lisp
common-lisp/cesarum/float-binio.lisp
common-lisp/cesarum/graph.lisp
common-lisp/cesarum/iana-character-sets.lisp
common-lisp/cesarum/iso3166.lisp
common-lisp/cesarum/iso4217.lisp
common-lisp/cesarum/iso639a.lisp
common-lisp/cesarum/list.lisp
common-lisp/cesarum/llrbtree.lisp
common-lisp/cesarum/message-queue.lisp
common-lisp/cesarum/package.lisp
common-lisp/cesarum/peek-stream.lisp
common-lisp/cesarum/pmatch.lisp
common-lisp/cesarum/priority-queue.lisp
common-lisp/cesarum/queue.lisp
common-lisp/cesarum/raiden.lisp
common-lisp/cesarum/sequence.lisp
common-lisp/cesarum/stream.lisp
common-lisp/cesarum/string.lisp
common-lisp/cesarum/tea.lisp
common-lisp/cesarum/update-iso3166.lisp
common-lisp/cesarum/utility.lisp
common-lisp/cesarum/version.lisp
common-lisp/compile-with-asdf.lisp
common-lisp/csv/csv.lisp
common-lisp/cxx/cxx.lisp
common-lisp/data-encoding/bencode.lisp
common-lisp/data-encoding/data-encoding-test.lisp
common-lisp/data-encoding/data-encoding.lisp
common-lisp/data-encoding/ecp.lisp
common-lisp/diagram/tree-to-diagram.lisp
common-lisp/ed/ed.lisp
common-lisp/gen-lib-graph.lisp
common-lisp/graphviz/graph-dot.lisp
common-lisp/heap/heap.lisp
common-lisp/heap/memory.lisp
common-lisp/html-base/html-entities.lisp
common-lisp/html-base/html401.lisp
common-lisp/html-generator/html.lisp
common-lisp/html-parser/parse-html.lisp
common-lisp/http/hquery.lisp
common-lisp/http/htrans.lisp
common-lisp/init.lisp
common-lisp/interactive/browser.lisp
common-lisp/interactive/interactive.lisp
common-lisp/invoice/invoice.lisp
common-lisp/lisp-reader/package-fun.lisp
common-lisp/lisp-reader/reader.lisp
common-lisp/lisp-sexp/source-form.lisp
common-lisp/lisp-text/source-text.lisp
common-lisp/lisp/generic-cl.lisp
common-lisp/obsolete-or-incomplete/avl.lisp
common-lisp/obsolete-or-incomplete/database.lisp
common-lisp/obsolete-or-incomplete/dictionary.lisp
common-lisp/obsolete-or-incomplete/graf.lisp
common-lisp/obsolete-or-incomplete/isbn.lisp
common-lisp/obsolete-or-incomplete/iso646.lisp
common-lisp/obsolete-or-incomplete/rfc2047.lisp
common-lisp/obsolete-or-incomplete/web-cache.lisp
common-lisp/parser/parser.lisp
common-lisp/parser/scanner.lisp
common-lisp/picture/cons-to-ascii.lisp
common-lisp/picture/picture.lisp
common-lisp/picture/tree-to-ascii.lisp
common-lisp/regexp/regexp-emacs.lisp
common-lisp/regexp/regexp-posix.lisp
common-lisp/rfc2822/rfc2822.lisp
common-lisp/rfc3548/rfc3548.lisp
common-lisp/unix/aliases.lisp
common-lisp/unix/group.lisp
common-lisp/unix/passwd.lisp
compile.lisp
objcl/cocoa.lisp
objcl/howto.lisp
objcl/layout.lisp
objcl/mac-roman.lisp
objcl/objcl.lisp
objcl/oclo-ccl.lisp
objcl/oclo.lisp
objcl/packages.lisp
objcl/scratch.lisp
objcl/simple-test.lisp
objcl/test-objcl.lisp
rdp/COPYING
rdp/example-lisp.lisp
rdp/movie-shell.lisp
small-cl-pgms/aim-8/aim-8.lisp
small-cl-pgms/author-signature.lisp
small-cl-pgms/basic/basic.lisp
small-cl-pgms/brainfuck/bf.lisp
small-cl-pgms/brainfuck/simple-cl.lisp
small-cl-pgms/clisp-fork/count-fork.lisp
small-cl-pgms/cube.lisp
small-cl-pgms/douze.lisp
small-cl-pgms/example-soft-opcodes.lisp
small-cl-pgms/geek-day/Makefile
small-cl-pgms/geek-day/geek-day.lisp
small-cl-pgms/ibcl/ibcl-bootstrap.lisp
small-cl-pgms/ibcl/ibcl.lisp
small-cl-pgms/index.lisp
small-cl-pgms/init.lisp
small-cl-pgms/life.lisp
small-cl-pgms/m-expression/m-expression.lisp
small-cl-pgms/miscellaneous/clisp-server.lisp
small-cl-pgms/playtomo-stonedge/playtomo-stonedge.lisp
small-cl-pgms/puzzle.lisp
small-cl-pgms/quine.lisp
small-cl-pgms/rdp/example-basic.lisp
small-cl-pgms/rdp/example-lisp.lisp
small-cl-pgms/rdp/movie-shell.lisp
small-cl-pgms/rdp/rdp-basic-gen.lisp
small-cl-pgms/rdp/rdp.lisp
small-cl-pgms/rpsls/rpsls.lisp
small-cl-pgms/sedit/sedit.lisp
small-cl-pgms/solitaire.lisp
susv3/dirent.lisp
susv3/init.lisp
susv3/ipc.lisp
susv3/process.lisp
susv3/tools.lisp
tools/clext-compile.lisp
tools/clisp-compile.lisp
tools/clmisc-compile.lisp
tools/common-lisp-compile.lisp
tools/compile-with-asdf.lisp
tools/init-asdf.lisp
tools/load-asdf.lisp
tools/make-depends.lisp
tools/make.lisp
tools/openmcl-init.lisp
tools/sbcl-compile.lisp
tools/script.lisp
tools/susv3-compile.lisp
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..dba13ed
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,661 @@
+                    GNU AFFERO GENERAL PUBLIC LICENSE
+                       Version 3, 19 November 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU Affero General Public License is a free, copyleft license for
+software and other kinds of works, specifically designed to ensure
+cooperation with the community in the case of network server software.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+our General Public Licenses are intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  Developers that use our General Public Licenses protect your rights
+with two steps: (1) assert copyright on the software, and (2) offer
+you this License which gives you legal permission to copy, distribute
+and/or modify the software.
+
+  A secondary benefit of defending all users' freedom is that
+improvements made in alternate versions of the program, if they
+receive widespread use, become available for other developers to
+incorporate.  Many developers of free software are heartened and
+encouraged by the resulting cooperation.  However, in the case of
+software used on network servers, this result may fail to come about.
+The GNU General Public License permits making a modified version and
+letting the public access it on a server without ever releasing its
+source code to the public.
+
+  The GNU Affero General Public License is designed specifically to
+ensure that, in such cases, the modified source code becomes available
+to the community.  It requires the operator of a network server to
+provide the source code of the modified version running there to the
+users of that server.  Therefore, public use of a modified version, on
+a publicly accessible server, gives the public access to the source
+code of the modified version.
+
+  An older license, called the Affero General Public License and
+published by Affero, was designed to accomplish similar goals.  This is
+a different license, not a version of the Affero GPL, but Affero has
+released a new version of the Affero GPL which permits relicensing under
+this license.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU Affero General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Remote Network Interaction; Use with the GNU General Public License.
+
+  Notwithstanding any other provision of this License, if you modify the
+Program, your modified version must prominently offer all users
+interacting with it remotely through a computer network (if your version
+supports such interaction) an opportunity to receive the Corresponding
+Source of your version by providing access to the Corresponding Source
+from a network server at no charge, through some standard or customary
+means of facilitating copying of software.  This Corresponding Source
+shall include the Corresponding Source for any work covered by version 3
+of the GNU General Public License that is incorporated pursuant to the
+following paragraph.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the work with which it is combined will remain governed by version
+3 of the GNU General Public License.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU Affero General Public License from time to time.  Such new versions
+will be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU Affero General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU Affero General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU Affero General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software: you can redistribute it and/or modify
+    it under the terms of the GNU Affero General Public License as published by
+    the Free Software Foundation, either version 3 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU Affero General Public License for more details.
+
+    You should have received a copy of the GNU Affero General Public License
+    along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If your software can interact with users remotely through a computer
+network, you should also make sure that it provides a way for users to
+get its source.  For example, if your program is a web application, its
+interface could display a "Source" link that leads users to an archive
+of the code.  There are many ways you could offer source, and different
+solutions will be better for different programs; see section 13 for the
+specific requirements.
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU AGPL, see
+<http://www.gnu.org/licenses/>.
diff --git a/Makefile b/Makefile
index af0d236..f7d2a49 100644
--- a/Makefile
+++ b/Makefile
@@ -22,22 +22,22 @@
 #MODIFICATIONS
 #   2001-06-19 <PJB> Reorganized and simplified.
 #LEGAL
-#	Copyright Pascal J. Bourguignon 1992 - 2003
-#
-#   This script is free software; you can redistribute it and/or
-#   modify it under the terms of the GNU  General Public
-#   License as published by the Free Software Foundation; either
-#   version 2 of the License, or (at your option) any later version.
-#
-#   This script is distributed in the hope that it will be useful,
-#   but WITHOUT ANY WARRANTY; without even the implied warranty of
-#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-#   General Public License for more details.
-#
-#   You should have received a copy of the GNU General Public
-#   License along with this library; see the file COPYING.LIB.
-#   If not, write to the Free Software Foundation,
-#   59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#    AGPL3
+#
+#    Copyright Pascal J. Bourguignon 2012 - 2012
+#
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
+#
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
+#
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #******************************************************************************
 all::

@@ -129,5 +129,19 @@ etags tags TAGS::
 	| etags -
 	@printf ';; Done.\n'

+
+
+
+help::
+	@printf $(HELP_FMT)  'documentation' 'Generates the README.pdf file.'
+documentation: README.pdf
+
+README.pdf:README
+	rst2pdf README
+
+showpdf show-pdfs:README.pdf
+	open README.pdf
+
+
 #### THE END ####

diff --git a/README b/README
index e91d60e..88dbd50 100644
--- a/README
+++ b/README
@@ -41,14 +41,72 @@ clisp/

 susv3/

-    POSIX API.
+    POSIX API (clisp specific for now).


 tools/

     Various tools to help developing and compiling these packages.
+    (Mostly obsolete since the introduction of ASDF and Quicklisp).


+rdp/
+
+    Simple Recursive-Descent Parser.
+
+objcl/
+
+    Objective-CL reader macros.
+
+
+small-cl-pgms/
+
+    Various small lisp programs and proof-of-concept demos.
+    Those are not gathered with ASDF system definitions.
+
+
+Repository
+==========
+
+These libraries can be obtained from the `git` repository at
+https://gitorious.org/com-informatimago/ ::
+
+    git clone https://git.gitorious.org/com-informatimago/com-informatimago.git informatimago
+
+They're also available thru `quicklisp <http://quicklisp.org/>`_: ::
+
+    (ql:quickload :com.informatimago.common-lisp)
+    (ql:quickload :com.informatimago.clext)
+    (ql:quickload :com.informatimago.clmisc)
+    #+clisp (ql:quickload :com.informatimago.clisp)
+    #+clisp (ql:quickload :com.informatimago.susv3)
+    (ql:quickload :com.informatimago.rdp)
+    (ql:quickload :com.informatimago.objcl)
+
+
+
+Authors & License
+=================
+
+All this code is authored by Pascal J. Bourguignon,  apart from
+`com.informatimago.lisp-reader.package` which is authored by Zach
+Beane and modified by Pascal J. Bourguignon.
+
+All this code is released under the `GNU AFFERO GENERAL PUBLIC LICENSE
+<http://www.gnu.org/licenses/agpl-3.0.html>`_,
+apart from `com.informatimago.lisp-reader.package` which is released
+under the BSD license.
+
+
+References
+==========
+
+- AGPL: http://www.gnu.org/licenses/agpl-3.0.html
+- Common Lisp: http://en.wikipedia.org/wiki/Common_lisp
+- Common Lisp Wiki: http://cliki.net
+- Pascal J. Bourguignon: mailto:pjb@informatimago.com  http://www.informatimago.com/
+- Quicklisp: http://quicklisp.org/
+- Zach Beane: http://xach.com/


 .. comment:
diff --git a/README.pdf b/README.pdf
new file mode 100644
index 0000000..6533d1b
--- /dev/null
+++ b/README.pdf
@@ -0,0 +1,906 @@
+%PDF-1.4
+% ReportLab Generated PDF document http://www.reportlab.com
+% 'BasicFonts': class PDFDictionary
+1 0 obj
+% The standard fonts dictionary
+<< /F1 2 0 R
+ /F2 3 0 R
+ /F3 4 0 R
+ /F4 6 0 R >>
+endobj
+% 'F1': class PDFType1Font
+2 0 obj
+% Font Helvetica
+<< /BaseFont /Helvetica
+ /Encoding /WinAnsiEncoding
+ /Name /F1
+ /Subtype /Type1
+ /Type /Font >>
+endobj
+% 'F2': class PDFType1Font
+3 0 obj
+% Font Helvetica-Bold
+<< /BaseFont /Helvetica-Bold
+ /Encoding /WinAnsiEncoding
+ /Name /F2
+ /Subtype /Type1
+ /Type /Font >>
+endobj
+% 'F3': class PDFType1Font
+4 0 obj
+% Font Helvetica-Oblique
+<< /BaseFont /Helvetica-Oblique
+ /Encoding /WinAnsiEncoding
+ /Name /F3
+ /Subtype /Type1
+ /Type /Font >>
+endobj
+% 'Annot.NUMBER1': class PDFDictionary
+5 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (https://gitorious.org/com-informatimago/) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 315.5829
+ 237.7736
+ 491.7529
+ 249.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'F4': class PDFType1Font
+6 0 obj
+% Font Courier
+<< /BaseFont /Courier
+ /Encoding /WinAnsiEncoding
+ /Name /F4
+ /Subtype /Type1
+ /Type /Font >>
+endobj
+% 'Annot.NUMBER2': class PDFDictionary
+7 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://quicklisp.org/) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 181.8729
+ 188.134
+ 220.2129
+ 200.134 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Page1': class PDFPage
+8 0 obj
+% Page dictionary
+<< /Annots [ 5 0 R
+ 7 0 R ]
+ /Contents 26 0 R
+ /MediaBox [ 0
+ 0
+ 595.2756
+ 841.8898 ]
+ /Parent 25 0 R
+ /Resources << /Font 1 0 R
+ /ProcSet [ /PDF
+ /Text
+ /ImageB
+ /ImageC
+ /ImageI ] >>
+ /Rotate 0
+ /Trans <<  >>
+ /Type /Page >>
+endobj
+% 'Annot.NUMBER3': class PDFDictionary
+9 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://www.gnu.org/licenses/agpl-3.0.html) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 250.7097
+ 696.7736
+ 471.405
+ 708.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER4': class PDFDictionary
+10 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://www.gnu.org/licenses/agpl-3.0.html) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 117.9329
+ 624.7736
+ 300.7829
+ 636.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER5': class PDFDictionary
+11 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://en.wikipedia.org/wiki/Common_lisp) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 152.9329
+ 606.7736
+ 333.5429
+ 618.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER6': class PDFDictionary
+12 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://cliki.net) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 174.5929
+ 588.7736
+ 232.9529
+ 600.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER7': class PDFDictionary
+13 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (mailto:pjb@informatimago.com) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 191.3029
+ 570.7736
+ 329.2629
+ 582.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER8': class PDFDictionary
+14 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://www.informatimago.com/) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 332.0429
+ 570.7736
+ 469.3029
+ 582.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER9': class PDFDictionary
+15 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://quicklisp.org/) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 131.8129
+ 552.7736
+ 215.1829
+ 564.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Annot.NUMBER10': class PDFDictionary
+16 0 obj
+<< /A << /S /URI
+ /Type /Action
+ /URI (http://xach.com/) >>
+ /Border [ 0
+ 0
+ 0 ]
+ /Rect [ 145.1729
+ 534.7736
+ 215.7629
+ 546.7736 ]
+ /Subtype /Link
+ /Type /Annot >>
+endobj
+% 'Page2': class PDFPage
+17 0 obj
+% Page dictionary
+<< /Annots [ 9 0 R
+ 10 0 R
+ 11 0 R
+ 12 0 R
+ 13 0 R
+ 14 0 R
+ 15 0 R
+ 16 0 R ]
+ /Contents 27 0 R
+ /MediaBox [ 0
+ 0
+ 595.2756
+ 841.8898 ]
+ /Parent 25 0 R
+ /Resources << /Font 1 0 R
+ /ProcSet [ /PDF
+ /Text
+ /ImageB
+ /ImageC
+ /ImageI ] >>
+ /Rotate 0
+ /Trans <<  >>
+ /Type /Page >>
+endobj
+% 'R18': class PDFCatalog
+18 0 obj
+% Document Root
+<< /Outlines 20 0 R
+ /PageLabels 28 0 R
+ /PageMode /UseNone
+ /Pages 25 0 R
+ /Type /Catalog >>
+endobj
+% 'R19': class PDFInfo
+19 0 obj
+<< /Author ()
+ /CreationDate (D:20120415034521-01'00')
+ /Creator (\(unspecified\))
+ /Keywords ()
+ /Producer (ReportLab PDF Library - www.reportlab.com)
+ /Subject (\(unspecified\))
+ /Title () >>
+endobj
+% 'R20': class PDFOutlines
+20 0 obj
+<< /Count 4
+ /First 21 0 R
+ /Last 24 0 R
+ /Type /Outlines >>
+endobj
+% 'Outline.0': class OutlineEntryObject
+21 0 obj
+<< /Dest [ 8 0 R
+ /XYZ
+ 62.69291
+ 765.0236
+ 0 ]
+ /Next 22 0 R
+ /Parent 20 0 R
+ /Title (Informatimago Public Common Lisp Libraries) >>
+endobj
+% 'Outline.1': class OutlineEntryObject
+22 0 obj
+<< /Dest [ 8 0 R
+ /XYZ
+ 62.69291
+ 276.0236
+ 0 ]
+ /Next 23 0 R
+ /Parent 20 0 R
+ /Prev 21 0 R
+ /Title (Repository) >>
+endobj
+% 'Outline.2': class OutlineEntryObject
+23 0 obj
+<< /Dest [ 17 0 R
+ /XYZ
+ 62.69291
+ 765.0236
+ 0 ]
+ /Next 24 0 R
+ /Parent 20 0 R
+ /Prev 22 0 R
+ /Title (Authors & License) >>
+endobj
+% 'Outline.3': class OutlineEntryObject
+24 0 obj
+<< /Dest [ 17 0 R
+ /XYZ
+ 62.69291
+ 672.0236
+ 0 ]
+ /Parent 20 0 R
+ /Prev 23 0 R
+ /Title (References) >>
+endobj
+% 'R25': class PDFPages
+25 0 obj
+% page tree
+<< /Count 2
+ /Kids [ 8 0 R
+ 17 0 R ]
+ /Type /Pages >>
+endobj
+% 'R26': class PDFStream
+26 0 obj
+% page stream
+<< /Length 6473 >>
+stream
+1 0 0 1 0 0 cm  BT /F1 12 Tf 14.4 TL ET
+q
+1 0 0 1 62.69291 744.0236 cm
+q
+BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Informatimago Public Common Lisp Libraries) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 726.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (common-lisp/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 720.0236 cm
+Q
+q
+1 0 0 1 62.69291 630.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 66 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 1.219213 Tw (The sublibrary systems provided by this library should contain only pure conformant Common Lisp) Tj T* 0 Tw (packages.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 50 Tm /F1 10 Tf 12 TL .455697 Tw (They should compile and run in all Common Lisp compliant implementations, and should have make) Tj T* 0 Tw 2.706647 Tw (use of no external package \(eg. compatibility library\) and no other \(implementation dependant\)) Tj T* 0 Tw 2.405814 Tw (package than COMMON-LISP. They should not use #+/#- to activate or disable implementation) Tj T* 0 Tw 1.919979 Tw (specific code. [There remains some packages using #+/#- with implementations specific variants,) Tj T* 0 Tw (we're working on removing these forms].) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 630.0236 cm
+Q
+q
+1 0 0 1 62.69291 612.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (clext/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 606.0236 cm
+Q
+q
+1 0 0 1 62.69291 564.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 30 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Common Lisp Extensions.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 3.91248 Tw (This directory contains Common-Lisp packages that are mostly portable, but that use some) Tj T* 0 Tw (extensions, packages out of the Common-Lisp specifications, like GRAY or other portability libraries.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 564.0236 cm
+Q
+q
+1 0 0 1 62.69291 546.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (clmisc/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 540.0236 cm
+Q
+q
+1 0 0 1 62.69291 528.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Miscellaneous Common Lisp packages.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 528.0236 cm
+Q
+q
+1 0 0 1 62.69291 510.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (clisp/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 504.0236 cm
+Q
+q
+1 0 0 1 62.69291 492.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (clisp specific packages.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 492.0236 cm
+Q
+q
+1 0 0 1 62.69291 474.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (susv3/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 468.0236 cm
+Q
+q
+1 0 0 1 62.69291 456.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (POSIX API \(clisp specific for now\).) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 456.0236 cm
+Q
+q
+1 0 0 1 62.69291 438.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (tools/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 432.0236 cm
+Q
+q
+1 0 0 1 62.69291 408.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL 4.141647 Tw (Various tools to help developing and compiling these packages. \(Mostly obsolete since the) Tj T* 0 Tw (introduction of ASDF and Quicklisp\).) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 408.0236 cm
+Q
+q
+1 0 0 1 62.69291 390.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (rdp/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 384.0236 cm
+Q
+q
+1 0 0 1 62.69291 372.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Simple Recursive-Descent Parser.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 372.0236 cm
+Q
+q
+1 0 0 1 62.69291 354.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (objcl/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 348.0236 cm
+Q
+q
+1 0 0 1 62.69291 336.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (Objective-CL reader macros.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 336.0236 cm
+Q
+q
+1 0 0 1 62.69291 318.0236 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL (small-cl-pgms/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 312.0236 cm
+Q
+q
+1 0 0 1 62.69291 288.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+BT 1 0 0 1 0 2 Tm  T* ET
+q
+1 0 0 1 20 0 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 14 Tm /F1 10 Tf 12 TL .406136 Tw (Various small lisp programs and proof-of-concept demos. Those are not gathered with ASDF system) Tj T* 0 Tw (definitions.) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 288.0236 cm
+Q
+q
+1 0 0 1 62.69291 255.0236 cm
+q
+BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Repository) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 237.0236 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (These libraries can be obtained from the ) Tj /F3 10 Tf (git ) Tj /F1 10 Tf (repository at ) Tj 0 0 .501961 rg (https://gitorious.org/com-informatimago/) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 207.384 cm
+q
+q
+.858717 0 0 .858717 0 0 cm
+q
+1 0 0 1 6.6 7.685888 cm
+q
+.662745 .662745 .662745 RG
+.5 w
+.960784 .960784 .862745 rg
+n -6 -6 546 24 re B*
+Q
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F4 10 Tf 12 TL (git clone https://git.gitorious.org/com-informatimago/com-informatimago.git informatimago) Tj T* ET
+Q
+Q
+Q
+Q
+Q
+q
+1 0 0 1 62.69291 187.384 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (They're also available thru ) Tj 0 0 .501961 rg (quicklisp) Tj 0 0 0 rg (:) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 82.18396 cm
+q
+q
+1 0 0 1 0 0 cm
+q
+1 0 0 1 6.6 6.6 cm
+q
+.662745 .662745 .662745 RG
+.5 w
+.960784 .960784 .862745 rg
+n -6 -6 468.6898 96 re B*
+Q
+q
+0 0 0 rg
+BT 1 0 0 1 0 74 Tm /F4 10 Tf 12 TL (\(ql:quickload :com.informatimago.common-lisp\)) Tj T* (\(ql:quickload :com.informatimago.clext\)) Tj T* (\(ql:quickload :com.informatimago.clmisc\)) Tj T* (#+clisp \(ql:quickload :com.informatimago.clisp\)) Tj T* (#+clisp \(ql:quickload :com.informatimago.susv3\)) Tj T* (\(ql:quickload :com.informatimago.rdp\)) Tj T* (\(ql:quickload :com.informatimago.objcl\)) Tj T* ET
+Q
+Q
+Q
+Q
+Q
+
+endstream
+endobj
+% 'R27': class PDFStream
+27 0 obj
+% page stream
+<< /Length 3299 >>
+stream
+1 0 0 1 0 0 cm  BT /F1 12 Tf 14.4 TL ET
+q
+1 0 0 1 62.69291 744.0236 cm
+q
+BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (Authors & License) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 714.0236 cm
+q
+BT 1 0 0 1 0 14 Tm 1.639979 Tw 12 TL /F1 10 Tf 0 0 0 rg (All this code is authored by Pascal J. Bourguignon, apart from ) Tj /F3 10 Tf (com.informatimago.lisp-reader.package) Tj T* 0 Tw /F1 10 Tf (which is authored by Zach Beane and modified by Pascal J. Bourguignon.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 684.0236 cm
+q
+BT 1 0 0 1 0 14 Tm 5.023828 Tw 12 TL /F1 10 Tf 0 0 0 rg (All this code is released under the ) Tj 0 0 .501961 rg (GNU AFFERO GENERAL PUBLIC LICENSE) Tj 0 0 0 rg (, apart from) Tj T* 0 Tw /F3 10 Tf (com.informatimago.lisp-reader.package ) Tj /F1 10 Tf (which is released under the BSD license.) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 651.0236 cm
+q
+BT 1 0 0 1 0 3.5 Tm 21 TL /F2 17.5 Tf 0 0 0 rg (References) Tj T* ET
+Q
+Q
+q
+1 0 0 1 62.69291 639.0236 cm
+Q
+q
+1 0 0 1 62.69291 639.0236 cm
+Q
+q
+1 0 0 1 62.69291 627.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (AGPL: ) Tj 0 0 .501961 rg (http://www.gnu.org/licenses/agpl-3.0.html) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 621.0236 cm
+Q
+q
+1 0 0 1 62.69291 609.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Common Lisp: ) Tj 0 0 .501961 rg (http://en.wikipedia.org/wiki/Common_lisp) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 603.0236 cm
+Q
+q
+1 0 0 1 62.69291 591.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Common Lisp Wiki: ) Tj 0 0 .501961 rg (http://cliki.net) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 585.0236 cm
+Q
+q
+1 0 0 1 62.69291 573.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Pascal J. Bourguignon: ) Tj 0 0 .501961 rg (mailto:pjb@informatimago.com) Tj 0 0 0 rg ( ) Tj 0 0 .501961 rg (http://www.informatimago.com/) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 567.0236 cm
+Q
+q
+1 0 0 1 62.69291 555.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Quicklisp: ) Tj 0 0 .501961 rg (http://quicklisp.org/) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 549.0236 cm
+Q
+q
+1 0 0 1 62.69291 537.0236 cm
+0 0 0 rg
+BT /F1 10 Tf 12 TL ET
+q
+1 0 0 1 6 -3 cm
+q
+0 0 0 rg
+BT 1 0 0 1 0 2 Tm /F1 10 Tf 12 TL 10.5 0 Td (\177) Tj T* -10.5 0 Td ET
+Q
+Q
+q
+1 0 0 1 23 -3 cm
+q
+BT 1 0 0 1 0 2 Tm 12 TL /F1 10 Tf 0 0 0 rg (Zach Beane: ) Tj 0 0 .501961 rg (http://xach.com/) Tj T* ET
+Q
+Q
+q
+Q
+Q
+q
+1 0 0 1 62.69291 537.0236 cm
+Q
+
+endstream
+endobj
+% 'R28': class PDFPageLabels
+28 0 obj
+% Document Root
+<< /Nums [ 0
+ 29 0 R
+ 1
+ 30 0 R ] >>
+endobj
+% 'R29': class PDFPageLabel
+29 0 obj
+% None
+<< /S /D
+ /St 1 >>
+endobj
+% 'R30': class PDFPageLabel
+30 0 obj
+% None
+<< /S /D
+ /St 2 >>
+endobj
+xref
+0 31
+0000000000 65535 f
+0000000113 00000 n
+0000000245 00000 n
+0000000410 00000 n
+0000000585 00000 n
+0000000778 00000 n
+0000001024 00000 n
+0000001197 00000 n
+0000001420 00000 n
+0000001741 00000 n
+0000001999 00000 n
+0000002259 00000 n
+0000002518 00000 n
+0000002753 00000 n
+0000003000 00000 n
+0000003248 00000 n
+0000003489 00000 n
+0000003710 00000 n
+0000004074 00000 n
+0000004233 00000 n
+0000004481 00000 n
+0000004606 00000 n
+0000004808 00000 n
+0000004993 00000 n
+0000005186 00000 n
+0000005341 00000 n
+0000005457 00000 n
+0000012029 00000 n
+0000015431 00000 n
+0000015537 00000 n
+0000015614 00000 n
+trailer
+<< /ID
+ % ReportLab generated PDF document -- digest (http://www.reportlab.com)
+ [(\304?ta0\014\013~4`w:\355<.\204) (\304?ta0\014\013~4`w:\355<.\204)]
+
+ /Info 19 0 R
+ /Root 18 0 R
+ /Size 31 >>
+startxref
+15661
+%%EOF
diff --git a/cl-loaders/aima.lisp b/cl-loaders/aima.lisp
index a0e7c1f..405740e 100644
--- a/cl-loaders/aima.lisp
+++ b/cl-loaders/aima.lisp
@@ -4,11 +4,11 @@
 ;; -- CMU-AI -- AIMA: Artificial Inteligence - A Modern Approach --
 ;; ----------------------------------------------------------------

-(LOAD "cmu-ai:bookcode;aima;aima")
-(AIMA-LOAD 'ALL)
+(load "cmu-ai:bookcode;aima;aima")
+(aima-load 'all)

-(DEFUN COMPILE-AIMA ()
-  (AIMA-COMPILE)
-  (TEST 'ALL))
+(defun compile-aima ()
+  (aima-compile)
+  (test 'all))

 ;;;; aima.lisp                        -- 2003-05-02 08:02:18 -- pascal   ;;;;
diff --git a/cl-loaders/asdf.lisp b/cl-loaders/asdf.lisp
index d34e115..b40c52a 100644
--- a/cl-loaders/asdf.lisp
+++ b/cl-loaders/asdf.lisp
@@ -16,24 +16,22 @@
 ;;;;    2003-06-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
-;;;;    Copyright Pascal Bourguignon 2003 - 2005.
+;;;;    Copyright Pascal Bourguignon 2003 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
@@ -44,24 +42,24 @@
 ;; (handler-case (ASDF:OPERATE 'ASDF:load-OP :CCLAN-GET)
 ;;   (error ()  (ASDF:OPERATE 'ASDF:compile-OP :CCLAN-GET)))

-(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
+(load "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF.LISP")
 ;;(LOAD "PACKAGES:NET;SOURCEFORGE;CCLAN;ASDF;ASDF-INSTALL.LISP")

 (in-package "COM.INFORMATIMAGO.PJB")

-(defparameter *original-asdf-registry* ASDF:*CENTRAL-REGISTRY*)
+(defparameter *original-asdf-registry* asdf:*central-registry*)

 (defun asdf-rescan-packages ()
   (when *load-verbose*
     (format *trace-output* "~&;; Scanning ASDF packages...~%"))
   (prog1
-      (SORT
-       (DELETE-DUPLICATES
-        (MAPCAR
-         (LAMBDA (P) (MAKE-PATHNAME :NAME NIL :TYPE NIL :VERSION NIL :DEFAULTS P))
-         (DIRECTORY "PACKAGES:**;*.ASD"))
+      (sort
+       (delete-duplicates
+        (mapcar
+         (lambda (p) (make-pathname :name nil :type nil :version nil :defaults p))
+         (directory "PACKAGES:**;*.ASD"))
         :test (function equal))
-       (LAMBDA (A B) (if (= (length a) (length b))
+       (lambda (a b) (if (= (length a) (length b))
                   (string< a b)
                   (< (length a) (length b))))
        :key (function namestring))
@@ -70,12 +68,12 @@


 (defun update-asdf-registry ()
-  (setf ASDF:*CENTRAL-REGISTRY*
+  (setf asdf:*central-registry*
         (nconc (asdf-rescan-packages)
                ;;(list CCLAN-GET::*CCLAN-ASDF-REGISTRY*)
                *original-asdf-registry*)))

-(EXPORT 'UPDATE-ASDF-REGISTRY)
+(export 'update-asdf-registry)
 (update-asdf-registry)

 (in-package "COMMON-LISP-USER")
diff --git a/cl-loaders/cclan.lisp b/cl-loaders/cclan.lisp
index 38f7ce4..f13a34d 100644
--- a/cl-loaders/cclan.lisp
+++ b/cl-loaders/cclan.lisp
@@ -14,34 +14,32 @@
 ;;;;    2003-06-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(LOAD "CCLAN:ASDF;ASDF.LISP")
-(LOAD "CCLAN:CCLAN-GET;PACKAGE.LISP")
-(LOAD "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
-(ASDF:OPERATE 'ASDF:LOAD-OP :CCLAN-GET)
-(SETF CCLAN-GET::*CCLAN-TARBALL-DIRECTORY* "SHARE-LISP:CCLAN;TARBALL;"
-      CCLAN-GET::*CCLAN-SOURCE-DIRECTORY*  "SHARE-LISP:CCLAN;SOURCE;"
-      CCLAN-GET::*CCLAN-ASDF-REGISTRY*     "SHARE-LISP:CCLAN;REGISTRY;")
-(PUSH CCLAN-GET::*CCLAN-ASDF-REGISTRY* ASDF:*CENTRAL-REGISTRY*)
+(load "CCLAN:ASDF;ASDF.LISP")
+(load "CCLAN:CCLAN-GET;PACKAGE.LISP")
+(load "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
+(asdf:operate 'asdf:load-op :cclan-get)
+(setf cclan-get::*cclan-tarball-directory* "SHARE-LISP:CCLAN;TARBALL;"
+      cclan-get::*cclan-source-directory*  "SHARE-LISP:CCLAN;SOURCE;"
+      cclan-get::*cclan-asdf-registry*     "SHARE-LISP:CCLAN;REGISTRY;")
+(push cclan-get::*cclan-asdf-registry* asdf:*central-registry*)

 (format t  "Push on ASDF:*CENTRAL-REGISTRY* directories where .asd files are ~
             to be found.~%")
diff --git a/cl-loaders/cl-pdf.lisp b/cl-loaders/cl-pdf.lisp
index 85a30b8..26a0ef0 100644
--- a/cl-loaders/cl-pdf.lisp
+++ b/cl-loaders/cl-pdf.lisp
@@ -14,28 +14,26 @@
 ;;;;    2004-10-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(LOAD "LOADERS:ASDF")
-(PUSHNEW "PACKAGES:COM;FRACTALCONCEPT;CL-PDF;" ASDF:*CENTRAL-REGISTRY*)
-(ASDF:OPERATE 'ASDF:LOAD-OP :CL-PDF)
+(load "LOADERS:ASDF")
+(pushnew "PACKAGES:COM;FRACTALCONCEPT;CL-PDF;" asdf:*central-registry*)
+(asdf:operate 'asdf:load-op :cl-pdf)

 ;;;; cl-pdf.lisp                      --                     --          ;;;;
diff --git a/cl-loaders/cliki.lisp b/cl-loaders/cliki.lisp
index 19333c5..2436f5b 100644
--- a/cl-loaders/cliki.lisp
+++ b/cl-loaders/cliki.lisp
@@ -14,27 +14,25 @@
 ;;;;    2004-12-25 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (if (string= (lisp-implementation-type) "SBCL")
-  (SB-EXT:WITHOUT-PACKAGE-LOCKS (require 'cliki))
+  (sb-ext:without-package-locks (require 'cliki))
   (format t "~&cliki works only on SBCL~%"))

diff --git a/cl-loaders/clocc.lisp b/cl-loaders/clocc.lisp
index 4481de7..40003f6 100644
--- a/cl-loaders/clocc.lisp
+++ b/cl-loaders/clocc.lisp
@@ -4,23 +4,23 @@
 ;; CLOCC -- Compiling the CLOCC --
 ;; -------------------------------

-(DEFPARAMETER *CLOCC-ROOT*
+(defparameter *clocc-root*
   (namestring
    (translate-logical-pathname "PACKAGES:NET;SOURCEFORGE;CLOCC;CLOCC;")))
-(LOAD "CLOCC:CLOCC")
-(LOAD "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM")
-(LOAD "CLOCC:SRC;CLLIB;BASE")
+(load "CLOCC:CLOCC")
+(load "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM")
+(load "CLOCC:SRC;CLLIB;BASE")

-(DEFUN COMPILE-CLOCC ()
-  (LOAD (compile-file "CLOCC:CLOCC"))
-  (LOAD (compile-file "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM"))
+(defun compile-clocc ()
+  (load (compile-file "CLOCC:CLOCC"))
+  (load (compile-file "CLOCC:SRC;DEFSYSTEM;DEFSYSTEM"))
   ;; * compile some systems
-   (SETQ MK::*CENTRAL-REGISTRY*
-        (NCONC
+   (setq mk::*central-registry*
+        (nconc
          ;; select the systems you want to use
-         (MAPCAR (LAMBDA (SYSSUB)
-                   (TRANSLATE-LOGICAL-PATHNAME
-                    (CONCATENATE 'STRING "CLOCC:SRC;" SYSSUB)))
+         (mapcar (lambda (syssub)
+                   (translate-logical-pathname
+                    (concatenate 'string "CLOCC:SRC;" syssub)))
                  '("CLLIB;"
                    "EXT;QUEUES;"
                    "EXT;UNION-FIND;"
@@ -36,39 +36,39 @@
                    "SCREAMER;"
                    "SCREAMER;"
                    ))
-         MK::*CENTRAL-REGISTRY*))
-  (MK:OOS "cllib" :COMPILE)
-  (MK:OOS "f2cl" :COMPILE));;COMPILE-CLOCC
+         mk::*central-registry*))
+  (mk:oos "cllib" :compile)
+  (mk:oos "f2cl" :compile));;COMPILE-CLOCC

 ;; ----------------------------------------------------------------------
 ;; -- CLOCC -- FORTRAN to LISP translator --
 ;; -----------------------------------------

-(DEFVAR *EXT*
-  #+CLISP   ".fas"
-  #+CMUCL   ".x86f"
-  #+SBCL    ".fasl"
-  #+ALLEGRO ".fasl"
-  #+VMS     ".fas"
-  #+LUCID   ".sbin")
-(DEFVAR *F2CL_DIR* "CLOCC:CLOCC;SRC;F2CL;SRC;")
-(DEFUN LOAD-F2CL-MODULE (X)
-  (LOAD (CONCATENATE 'STRING *F2CL_DIR* X *EXT*) :PRINT NIL :VERBOSE NIL)) ;;LOAD-F2CL-MODULE
-(DEFUN LOAD-F2CL ()
-  (LOAD-F2CL-MODULE "f2cl0" )
-  (LOAD-F2CL-MODULE "f2cl1" )
-  (LOAD-F2CL-MODULE "f2cl2" )
-  (LOAD-F2CL-MODULE "f2cl3" )
-  (LOAD-F2CL-MODULE "f2cl4" )
-  (LOAD-F2CL-MODULE "f2cl5" )
-  (LOAD-F2CL-MODULE "f2cl6" )
-  (LOAD-F2CL-MODULE "f2cl7" )
-  (LOAD-F2CL-MODULE "macros" )
-  (FORMAT T "~&The f2cl software has been loaded.~%"));;LOAD-F2CL
+(defvar *ext*
+  #+clisp   ".fas"
+  #+cmucl   ".x86f"
+  #+sbcl    ".fasl"
+  #+allegro ".fasl"
+  #+vms     ".fas"
+  #+lucid   ".sbin")
+(defvar *f2cl_dir* "CLOCC:CLOCC;SRC;F2CL;SRC;")
+(defun load-f2cl-module (x)
+  (load (concatenate 'string *f2cl_dir* x *ext*) :print nil :verbose nil)) ;;LOAD-F2CL-MODULE
+(defun load-f2cl ()
+  (load-f2cl-module "f2cl0" )
+  (load-f2cl-module "f2cl1" )
+  (load-f2cl-module "f2cl2" )
+  (load-f2cl-module "f2cl3" )
+  (load-f2cl-module "f2cl4" )
+  (load-f2cl-module "f2cl5" )
+  (load-f2cl-module "f2cl6" )
+  (load-f2cl-module "f2cl7" )
+  (load-f2cl-module "macros" )
+  (format t "~&The f2cl software has been loaded.~%"));;LOAD-F2CL

 (format t  "Push on MK::*CENTRAL-REGISTRY* directories where .system files are ~
             to be found.~%")

-(push "clocc:src;port;" MK::*CENTRAL-REGISTRY*)
+(push "clocc:src;port;" mk::*central-registry*)

 ;;;; clocc.lisp                       --                     --          ;;;;
diff --git a/cl-loaders/clx.lisp b/cl-loaders/clx.lisp
index 3bc34ef..af0bcab 100644
--- a/cl-loaders/clx.lisp
+++ b/cl-loaders/clx.lisp
@@ -1,30 +1,30 @@
 ;;;; -*- coding:utf-8 -*-


-(IN-PACKAGE "COMMON-LISP-USER")
+(in-package "COMMON-LISP-USER")

-#+SBCL (PROGN
-         (LOAD "db-sockets")
-         (PUSHNEW :DB-SOCKETS *FEATURES*) )
+#+sbcl (progn
+         (load "db-sockets")
+         (pushnew :db-sockets *features*) )


-#+CLISP (DEFPARAMETER SAVED-WOFPC  CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*)
-#+CLISP (SETQ CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION* NIL)
+#+clisp (defparameter saved-wofpc  custom:*warn-on-floating-point-contagion*)
+#+clisp (setq custom:*warn-on-floating-point-contagion* nil)



-(LET ((HOME (OR #+SBCL  (SB-EXT:POSIX-GETENV "HOME")
-                #+CLISP (EXT:GETENV "HOME")
+(let ((home (or #+sbcl  (sb-ext:posix-getenv "HOME")
+                #+clisp (ext:getenv "HOME")
                 "/home/pascal")))
-  (SETF (LOGICAL-PATHNAME-TRANSLATIONS "HOME")
-        (LIST
-         (LIST "**;*.*"  (CONCATENATE 'STRING HOME "/**/*.*"))
-         (LIST ";**;*.*" (CONCATENATE 'STRING HOME "/**/*.*")))))
+  (setf (logical-pathname-translations "HOME")
+        (list
+         (list "**;*.*"  (concatenate 'string home "/**/*.*"))
+         (list ";**;*.*" (concatenate 'string home "/**/*.*")))))


-(PUSHNEW :CLX-DEBUGGING *FEATURES*)
+(pushnew :clx-debugging *features*)

-(DEFPARAMETER *CLX-SOURCES*
+(defparameter *clx-sources*
   '(
     ;; First load port:
     "clocc:clocc;src;port;ext"
@@ -62,23 +62,23 @@
     ))


-(DOLIST (FILE *CLX-SOURCES*) (LOAD FILE))
+(dolist (file *clx-sources*) (load file))

-#+CLISP (SETQ CUSTOM:*WARN-ON-FLOATING-POINT-CONTAGION*  SAVED-WOFPC)
+#+clisp (setq custom:*warn-on-floating-point-contagion*  saved-wofpc)


-(DEFUN COMPILE-CLX ()
-  (DOLIST (FILE *CLX-SOURCES*)
+(defun compile-clx ()
+  (dolist (file *clx-sources*)
     (format t "Compiling ~A~%" file)
-    (LOAD (COMPILE-FILE FILE))))
+    (load (compile-file file))))


-(DEFUN TEST-CLX ()
-  (XLIB::HELLO-WORLD ""))
+(defun test-clx ()
+  (xlib::hello-world ""))


-(LOAD "PACKAGE:CLX-DEMOS;QIX.LISP")
-(LOAD "PACKAGE:CLX-DEMOS;SOKOBAN.LISP")
+(load "PACKAGE:CLX-DEMOS;QIX.LISP")
+(load "PACKAGE:CLX-DEMOS;SOKOBAN.LISP")
 ;; note: sokoban only works with clisp clx for it needs xpm extension.


diff --git a/cl-loaders/garnet.lisp b/cl-loaders/garnet.lisp
index b5fc929..39cc300 100644
--- a/cl-loaders/garnet.lisp
+++ b/cl-loaders/garnet.lisp
@@ -14,25 +14,23 @@
 ;;;;    2004-03-29 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(LOAD "PACKAGES:NET;SOURCEFORGE;GARNET;GARNET-LOADER")
+(load "PACKAGES:NET;SOURCEFORGE;GARNET;GARNET-LOADER")

diff --git a/cl-loaders/hemlock.lisp b/cl-loaders/hemlock.lisp
index 22931f2..d8900e8 100644
--- a/cl-loaders/hemlock.lisp
+++ b/cl-loaders/hemlock.lisp
@@ -14,24 +14,22 @@
 ;;;;    2004-07-29 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (load "loaders:clocc")
diff --git a/cl-loaders/lisa.lisp b/cl-loaders/lisa.lisp
index 6f1e18b..62a9ad3 100644
--- a/cl-loaders/lisa.lisp
+++ b/cl-loaders/lisa.lisp
@@ -1,7 +1,7 @@
 ;;;; -*- coding:utf-8 -*-

 (unless (find-package "ASDF") (load "LOADER:ASDF"))
-(pushnew "PACKAGES:NET;SOURCEFORGE;LISA;LISA;" ASDF::*CENTRAL-REGISTRY*)
+(pushnew "PACKAGES:NET;SOURCEFORGE;LISA;LISA;" asdf::*central-registry*)
 (asdf:oos 'asdf:load-op :lisa)

 ;;;; clocc.lisp                       --                     --          ;;;;
diff --git a/cl-loaders/norvig-graph.lisp b/cl-loaders/norvig-graph.lisp
index adc7848..040a417 100644
--- a/cl-loaders/norvig-graph.lisp
+++ b/cl-loaders/norvig-graph.lisp
@@ -15,86 +15,83 @@
 ;;;;    2003-05-16 <PJB>  Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
-;;;;    mailto:pjb@informatimago.com
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************


-(LOAD "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;GRAPH")
-(LOAD "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;GRAPH-DOT")
-(LOAD "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;LIST")
-(LOAD "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;UTILITY")
-(USE-PACKAGE "COM.INFORMATIMAGO.COMMON-LISP.GRAPH")
-(USE-PACKAGE "COM.INFORMATIMAGO.COMMON-LISP.GRAPH-DOT")
-(USE-PACKAGE "COM.INFORMATIMAGO.COMMON-LISP.LIST")
-(USE-PACKAGE "COM.INFORMATIMAGO.COMMON-LISP.UTILITY")
-
-(DEFVAR DATA)
-(DEFVAR G)
-
-(SETQ DATA
-      (MAPCAN
-       (LAMBDA (FILE)
-         (LET ((REQUIRES
-                (WITH-OPEN-FILE (IN FILE :DIRECTION :INPUT)
-                  (LET ((*READTABLE* (COPY-READTABLE NIL)))
-                    (SET-DISPATCH-MACRO-CHARACTER
-                     #\# #\. (LAMBDA (&REST ARGS) ARGS))
-                    (DO* ((EOF (GENSYM "eof"))
-                          (SEXP (READ IN NIL EOF) (READ IN NIL EOF))
-                          (RESULT (LIST)))
-                        ((EQ EOF SEXP) RESULT)
-                      (WHEN (AND (CONSP SEXP) (EQ 'REQUIRES (CAR SEXP)))
-                        (SETQ RESULT (NCONC (CDR SEXP) RESULT ))))))  ))
-           (WHEN REQUIRES
-             (LIST (CONS
-                    (LET* ((NAME (FILE-NAMESTRING FILE))
-                           (POSI (SEARCH ".lisp" NAME)))
-                      (IF POSI (SUBSEQ NAME 0 POSI) NAME))
-                    REQUIRES)))
+(load "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;GRAPH")
+(load "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;GRAPH-DOT")
+(load "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;LIST")
+(load "PACKAGE:COM;INFORMATIMAGO;COMMON-LISP;UTILITY")
+(use-package "COM.INFORMATIMAGO.COMMON-LISP.GRAPH")
+(use-package "COM.INFORMATIMAGO.COMMON-LISP.GRAPH-DOT")
+(use-package "COM.INFORMATIMAGO.COMMON-LISP.LIST")
+(use-package "COM.INFORMATIMAGO.COMMON-LISP.UTILITY")
+
+(defvar data)
+(defvar g)
+
+(setq data
+      (mapcan
+       (lambda (file)
+         (let ((requires
+                (with-open-file (in file :direction :input)
+                  (let ((*readtable* (copy-readtable nil)))
+                    (set-dispatch-macro-character
+                     #\# #\. (lambda (&rest args) args))
+                    (do* ((eof (gensym "eof"))
+                          (sexp (read in nil eof) (read in nil eof))
+                          (result (list)))
+                        ((eq eof sexp) result)
+                      (when (and (consp sexp) (eq 'requires (car sexp)))
+                        (setq result (nconc (cdr sexp) result ))))))  ))
+           (when requires
+             (list (cons
+                    (let* ((name (file-namestring file))
+                           (posi (search ".lisp" name)))
+                      (if posi (subseq name 0 posi) name))
+                    requires)))
            ))
-       (DIRECTORY "NORVIG:*.LISP")))
-(SETQ G (MAKE-INSTANCE 'GRAPH-CLASS))
-(SET-PROPERTY G :NAME "NORVIG")
-(ADD-NODES  G (MAPCAR
-               (LAMBDA (NAME) (LET ((NODE (MAKE-INSTANCE 'ELEMENT-CLASS)))
-                                (SET-PROPERTY NODE :NAME NAME)
-                                NODE))
-               (DELETE-DUPLICATES (FLATTEN DATA) :TEST (FUNCTION STRING=))))
-(MAPC
- (LAMBDA (ARCS)
-   (LET* ((FROM (CAR ARCS))
-          (FROM-NODE (CAR (FIND-NODES-WITH-PROPERTY G :NAME FROM))))
-     (MAPC
-      (LAMBDA (TO)
-        (LET ((TO-NODE (CAR (FIND-NODES-WITH-PROPERTY G :NAME TO))))
-          (ADD-EDGE-BETWEEN-NODES G FROM-NODE TO-NODE)))
-      (CDR ARCS))))
- DATA)
-
-(LET ((FNAME "norvig"))
-  (WITH-OPEN-FILE (OUT (FORMAT NIL "~A.dot" FNAME) :DIRECTION :OUTPUT
-                       :IF-EXISTS :SUPERSEDE :IF-DOES-NOT-EXIST :CREATE)
-    (PRINC (GENERATE-DOT G) OUT))
-  (EXT:SHELL (FORMAT NIL "n=~A ; (dot -Tps ${n}.dot -o ${n}.ps;gv ${n}.ps)&"
-                     FNAME))
+       (directory "NORVIG:*.LISP")))
+(setq g (make-instance 'graph-class))
+(set-property g :name "NORVIG")
+(add-nodes  g (mapcar
+               (lambda (name) (let ((node (make-instance 'element-class)))
+                                (set-property node :name name)
+                                node))
+               (delete-duplicates (flatten data) :test (function string=))))
+(mapc
+ (lambda (arcs)
+   (let* ((from (car arcs))
+          (from-node (car (find-nodes-with-property g :name from))))
+     (mapc
+      (lambda (to)
+        (let ((to-node (car (find-nodes-with-property g :name to))))
+          (add-edge-between-nodes g from-node to-node)))
+      (cdr arcs))))
+ data)
+
+(let ((fname "norvig"))
+  (with-open-file (out (format nil "~A.dot" fname) :direction :output
+                       :if-exists :supersede :if-does-not-exist :create)
+    (princ (generate-dot g) out))
+  (ext:shell (format nil "n=~A ; (dot -Tps ${n}.dot -o ${n}.ps;gv ${n}.ps)&"
+                     fname))
 ;;;   (EXT:SHELL (FORMAT NIL "n=~A ; (tred ${n}.dot > ${n}-tred.dot ;~
 ;;;                           dot -Tps ${n}-tred.dot -o ${n}-tred.ps ;~
 ;;;                           gv ${n}-tred.ps) & " FNAME))
@@ -105,296 +102,296 @@


 ;; Give a list of conflicts, symbol defineds in two files.
-(MAPCON
- (LAMBDA (LEFT-REST)
-   (LET ((LEFT (CAR LEFT-REST)))
-     (MAPCAN (LAMBDA (RIGHT)
+(mapcon
+ (lambda (left-rest)
+   (let ((left (car left-rest)))
+     (mapcan (lambda (right)
                ;; (FORMAT T "~2%LEFT = ~S~%RIGHT= ~S~%" (CDR LEFT) (CDR RIGHT))
-               (LET ((RES (INTERSECTION (CDR LEFT) (CDR RIGHT)
-                                        :TEST (FUNCTION STRING-EQUAL))))
-                 (IF RES (LIST (CONS (CAR LEFT) (CONS (CAR RIGHT) RES))) NIL)))
-             (CDR LEFT-REST))))
- (REMOVE-IF
-  (LAMBDA (L) (= 1 (LENGTH L)))
-  (MAPCAR
-   (LAMBDA (FILE)
-     (CONS FILE
-           (MAPCAR
-            (LAMBDA (ITEM)
-              (COND
-               ((SYMBOLP (SECOND ITEM))
-                (SECOND ITEM))
-               ((AND (CONSP   (SECOND ITEM))
-                     (SYMBOLP (CAR (SECOND ITEM))))
-                (CAR (SECOND ITEM)))
-               (T NIL)))
-            (WITH-OPEN-FILE (IN FILE :DIRECTION :INPUT)
-              (LET ((*READTABLE* (COPY-READTABLE NIL)))
-                (SET-DISPATCH-MACRO-CHARACTER
-                 #\# #\. (LAMBDA (&REST ARGS) ARGS))
-                (DO* ((EOF (GENSYM "eof"))
-                      (SEXP (READ IN NIL EOF) (READ IN NIL EOF))
-                      (RESULT ()))
-                    ((EQ EOF SEXP) RESULT)
-                  (WHEN (AND (CONSP SEXP)
-                             (< 3 (LENGTH (STRING (CAR SEXP))))
-                             (STRING-EQUAL
-                              "DEF" (SUBSEQ (STRING (CAR SEXP)) 0 3)))
-                    (PUSH SEXP RESULT))))))))
-   (DIRECTORY "NORVIG:*.LISP"))))
+               (let ((res (intersection (cdr left) (cdr right)
+                                        :test (function string-equal))))
+                 (if res (list (cons (car left) (cons (car right) res))) nil)))
+             (cdr left-rest))))
+ (remove-if
+  (lambda (l) (= 1 (length l)))
+  (mapcar
+   (lambda (file)
+     (cons file
+           (mapcar
+            (lambda (item)
+              (cond
+               ((symbolp (second item))
+                (second item))
+               ((and (consp   (second item))
+                     (symbolp (car (second item))))
+                (car (second item)))
+               (t nil)))
+            (with-open-file (in file :direction :input)
+              (let ((*readtable* (copy-readtable nil)))
+                (set-dispatch-macro-character
+                 #\# #\. (lambda (&rest args) args))
+                (do* ((eof (gensym "eof"))
+                      (sexp (read in nil eof) (read in nil eof))
+                      (result ()))
+                    ((eq eof sexp) result)
+                  (when (and (consp sexp)
+                             (< 3 (length (string (car sexp))))
+                             (string-equal
+                              "DEF" (subseq (string (car sexp)) 0 3)))
+                    (push sexp result))))))))
+   (directory "NORVIG:*.LISP"))))




 (

- ("eliza.lisp" "intro.lisp" MAPPEND)
+ ("eliza.lisp" "intro.lisp" mappend)

- ("eliza.lisp" "eliza1.lisp" *ELIZA-RULES* MAPPEND ELIZA)
+ ("eliza.lisp" "eliza1.lisp" *eliza-rules* mappend eliza)

- ("eliza.lisp" "eliza-pm.lisp" ELIZA)
+ ("eliza.lisp" "eliza-pm.lisp" eliza)

- ("eliza.lisp" "unifgram.lisp" PUNCTUATION-P)
+ ("eliza.lisp" "unifgram.lisp" punctuation-p)

- ("eliza.lisp" "auxfns.lisp" MAPPEND)
+ ("eliza.lisp" "auxfns.lisp" mappend)

- ("prolog.lisp" "prolog1.lisp" VARIABLES-IN   SHOW-PROLOG-VARS
-  TOP-LEVEL-PROVE PROVE PROVE-ALL ?- FIND-ANYWHERE-IF
-  UNIQUE-FIND-ANYWHERE-IF RENAME-VARIABLES CLEAR-PREDICATE CLEAR-DB
-  ADD-CLAUSE <- *DB-PREDICATES* PREDICATE GET-CLAUSES CLAUSE-BODY
-  CLAUSE-HEAD)
+ ("prolog.lisp" "prolog1.lisp" variables-in   show-prolog-vars
+  top-level-prove prove prove-all ?- find-anywhere-if
+  unique-find-anywhere-if rename-variables clear-predicate clear-db
+  add-clause <- *db-predicates* predicate get-clauses clause-body
+  clause-head)

- ("prolog.lisp" "krep2.lisp" SHOW-PROLOG-VARS TOP-LEVEL-PROVE PROVE
-  PROVE-ALL)
+ ("prolog.lisp" "krep2.lisp" show-prolog-vars top-level-prove prove
+  prove-all)

- ("prolog.lisp" "prologc2.lisp" ARGS)
+ ("prolog.lisp" "prologc2.lisp" args)

- ("prolog.lisp" "prologc1.lisp" ARGS)
+ ("prolog.lisp" "prologc1.lisp" args)

- ("prolog.lisp" "krep.lisp" REPLACE-?-VARS)
+ ("prolog.lisp" "krep.lisp" replace-?-vars)

- ("prolog.lisp" "prologc.lisp" TOP-LEVEL-PROVE ADD-CLAUSE <- ARGS)
+ ("prolog.lisp" "prologc.lisp" top-level-prove add-clause <- args)

- ("prolog.lisp" "compile3.lisp" ARGS)
+ ("prolog.lisp" "compile3.lisp" args)

- ("intro.lisp" "eliza1.lisp" MAPPEND)
+ ("intro.lisp" "eliza1.lisp" mappend)

- ("intro.lisp"   "auxfns.lisp" MAPPEND)
+ ("intro.lisp"   "auxfns.lisp" mappend)

- ("search.lisp" "mycin.lisp" IS IS)
+ ("search.lisp" "mycin.lisp" is is)

- ("search.lisp" "compile3.lisp" IS IS)
+ ("search.lisp" "compile3.lisp" is is)

- ("search.lisp" "gps.lisp"   FIND-PATH)
+ ("search.lisp" "gps.lisp"   find-path)

- ("othello2.lisp" "othello.lisp" MOBILITY ALL-SQUARES)
+ ("othello2.lisp" "othello.lisp" mobility all-squares)

- ("othello2.lisp" "overview.lisp" NODE)
+ ("othello2.lisp" "overview.lisp" node)

- ("simple.lisp" "lexicon.lisp"   VERB NOUN)
+ ("simple.lisp" "lexicon.lisp"   verb noun)

- ("simple.lisp" "eliza1.lisp" RANDOM-ELT)
+ ("simple.lisp" "eliza1.lisp" random-elt)

- ("simple.lisp"   "syntax3.lisp" *GRAMMAR*)
+ ("simple.lisp"   "syntax3.lisp" *grammar*)

- ("simple.lisp" "syntax2.lisp" *GRAMMAR*)
+ ("simple.lisp" "syntax2.lisp" *grammar*)

- ("simple.lisp" "syntax1.lisp" *GRAMMAR*)
+ ("simple.lisp" "syntax1.lisp" *grammar*)

- ("simple.lisp"   "auxfns.lisp" RANDOM-ELT)
+ ("simple.lisp"   "auxfns.lisp" random-elt)

- ("compopt.lisp" "mycin-r.lisp" NIL)
+ ("compopt.lisp" "mycin-r.lisp" nil)

- ("eliza1.lisp" "eliza-pm.lisp" USE-ELIZA-RULES ELIZA)
+ ("eliza1.lisp" "eliza-pm.lisp" use-eliza-rules eliza)

- ("eliza1.lisp"   "patmatch.lisp" SEGMENT-MATCH SEGMENT-MATCH
-  SEGMENT-PATTERN-P   PAT-MATCH EXTEND-BINDINGS MATCH-VARIABLE
-  PAT-MATCH EXTEND-BINDINGS   LOOKUP BINDING-VAL GET-BINDING FAIL
-  VARIABLE-P)
+ ("eliza1.lisp"   "patmatch.lisp" segment-match segment-match
+  segment-pattern-p   pat-match extend-bindings match-variable
+  pat-match extend-bindings   lookup binding-val get-binding fail
+  variable-p)

- ("eliza1.lisp"   "auxfns.lisp" RANDOM-ELT MAPPEND MKLIST FLATTEN
-  PAT-MATCH   EXTEND-BINDINGS MATCH-VARIABLE PAT-MATCH EXTEND-BINDINGS
-  LOOKUP   GET-BINDING FAIL VARIABLE-P)
+ ("eliza1.lisp"   "auxfns.lisp" random-elt mappend mklist flatten
+  pat-match   extend-bindings match-variable pat-match extend-bindings
+  lookup   get-binding fail variable-p)

- ("eliza1.lisp" "cmacsyma.lisp"   VARIABLE-P)
+ ("eliza1.lisp" "cmacsyma.lisp"   variable-p)

- ("eliza1.lisp" "macsyma.lisp" VARIABLE-P)
+ ("eliza1.lisp" "macsyma.lisp" variable-p)

- ("syntax3.lisp" "syntax2.lisp" INTEGERS 10*N+D INFIX-FUNCALL
-  EXTEND-PARSE PARSE TERMINAL-TREE-P APPLY-SEMANTICS LEXICAL-RULES
-  *OPEN-CATEGORIES* PARSER APPEND1 COMPLETE-PARSES FIRST-OR-NIL
-  RULES-STARTING-WITH LEXICAL-RULES PARSE-LHS PARSE USE TREE RULE
-  *GRAMMAR*)
+ ("syntax3.lisp" "syntax2.lisp" integers 10*n+d infix-funcall
+  extend-parse parse terminal-tree-p apply-semantics lexical-rules
+  *open-categories* parser append1 complete-parses first-or-nil
+  rules-starting-with lexical-rules parse-lhs parse use tree rule
+  *grammar*)

- ("syntax3.lisp" "syntax1.lisp" EXTEND-PARSE PARSE   LEXICAL-RULES
-  *OPEN-CATEGORIES* PARSER APPEND1 COMPLETE-PARSES
-  RULES-STARTING-WITH LEXICAL-RULES PARSE-LHS PARSE USE RULE
-  *GRAMMAR*)
+ ("syntax3.lisp" "syntax1.lisp" extend-parse parse   lexical-rules
+  *open-categories* parser append1 complete-parses
+  rules-starting-with lexical-rules parse-lhs parse use rule
+  *grammar*)

- ("syntax3.lisp" "mycin.lisp" RULE)
+ ("syntax3.lisp" "mycin.lisp" rule)

- ("syntax3.lisp"   "loop.lisp" SUM REPEAT)
+ ("syntax3.lisp"   "loop.lisp" sum repeat)

- ("syntax3.lisp" "unifgram.lisp" RULE)
+ ("syntax3.lisp" "unifgram.lisp" rule)

- ("syntax3.lisp" "student.lisp" RULE)
+ ("syntax3.lisp" "student.lisp" rule)

- ("syntax3.lisp" "auxfns.lisp"   FIRST-OR-NIL)
+ ("syntax3.lisp" "auxfns.lisp"   first-or-nil)

- ("syntax3.lisp" "cmacsyma.lisp" RULE)
+ ("syntax3.lisp" "cmacsyma.lisp" rule)

- ("syntax3.lisp"   "macsyma.lisp" RULE)
+ ("syntax3.lisp"   "macsyma.lisp" rule)

- ("syntax3.lisp" "compile3.lisp" ARG2)
+ ("syntax3.lisp" "compile3.lisp" arg2)

- ("syntax3.lisp" "gps.lisp" USE)
+ ("syntax3.lisp" "gps.lisp" use)

- ("syntax2.lisp" "syntax1.lisp"   EXTEND-PARSE PARSE *OPEN-CATEGORIES*
-  USE PARSER APPEND1   COMPLETE-PARSES RULES-STARTING-WITH
-  LEXICAL-RULES PARSE-LHS PARSE   RULE *GRAMMAR*)
+ ("syntax2.lisp" "syntax1.lisp"   extend-parse parse *open-categories*
+  use parser append1   complete-parses rules-starting-with
+  lexical-rules parse-lhs parse   rule *grammar*)

- ("syntax2.lisp" "mycin.lisp" RULE)
+ ("syntax2.lisp" "mycin.lisp" rule)

- ("syntax2.lisp"   "unifgram.lisp" RULE)
+ ("syntax2.lisp"   "unifgram.lisp" rule)

- ("syntax2.lisp" "student.lisp" RULE)
+ ("syntax2.lisp" "student.lisp" rule)

- ("syntax2.lisp" "auxfns.lisp" FIRST-OR-NIL)
+ ("syntax2.lisp" "auxfns.lisp" first-or-nil)

- ("syntax2.lisp"   "cmacsyma.lisp" RULE)
+ ("syntax2.lisp"   "cmacsyma.lisp" rule)

- ("syntax2.lisp" "macsyma.lisp" RULE)
+ ("syntax2.lisp" "macsyma.lisp" rule)

- ("syntax2.lisp" "gps.lisp" USE)
+ ("syntax2.lisp" "gps.lisp" use)

- ("syntax1.lisp" "mycin.lisp" RULE)
+ ("syntax1.lisp" "mycin.lisp" rule)

- ("syntax1.lisp" "unifgram.lisp" RULE)
+ ("syntax1.lisp" "unifgram.lisp" rule)

- ("syntax1.lisp" "student.lisp"   RULE)
+ ("syntax1.lisp" "student.lisp"   rule)

- ("syntax1.lisp" "cmacsyma.lisp" RULE)
+ ("syntax1.lisp" "cmacsyma.lisp" rule)

- ("syntax1.lisp"   "macsyma.lisp" RULE)
+ ("syntax1.lisp"   "macsyma.lisp" rule)

- ("syntax1.lisp" "gps.lisp" USE)
+ ("syntax1.lisp" "gps.lisp" use)

- ("prolog1.lisp"   "krep2.lisp" SHOW-PROLOG-VARS TOP-LEVEL-PROVE
-  PROVE-ALL PROVE)
+ ("prolog1.lisp"   "krep2.lisp" show-prolog-vars top-level-prove
+  prove-all prove)

- ("prolog1.lisp" "prologc.lisp" TOP-LEVEL-PROVE ADD-CLAUSE <-)
+ ("prolog1.lisp" "prologc.lisp" top-level-prove add-clause <-)

- ("mycin.lisp" "unifgram.lisp" RULE)
+ ("mycin.lisp" "unifgram.lisp" rule)

- ("mycin.lisp" "overview.lisp"   TRUE)
+ ("mycin.lisp" "overview.lisp"   true)

- ("mycin.lisp" "student.lisp" RULE)
+ ("mycin.lisp" "student.lisp" rule)

- ("mycin.lisp"   "cmacsyma.lisp" RULE)
+ ("mycin.lisp"   "cmacsyma.lisp" rule)

- ("mycin.lisp" "macsyma.lisp" RULE)
+ ("mycin.lisp" "macsyma.lisp" rule)

- ("mycin.lisp" "compile3.lisp" IS)
+ ("mycin.lisp" "compile3.lisp" is)

- ("loop.lisp" "overview.lisp"   WHILE)
+ ("loop.lisp" "overview.lisp"   while)

- ("patmatch.lisp" "auxfns.lisp" MATCH-VARIABLE EXTEND-BINDINGS
-  LOOKUP GET-BINDING VARIABLE-P FAIL PAT-MATCH)
+ ("patmatch.lisp" "auxfns.lisp" match-variable extend-bindings
+  lookup get-binding variable-p fail pat-match)

- ("patmatch.lisp"   "cmacsyma.lisp" VARIABLE-P)
+ ("patmatch.lisp"   "cmacsyma.lisp" variable-p)

- ("patmatch.lisp" "macsyma.lisp"   VARIABLE-P)
+ ("patmatch.lisp" "macsyma.lisp"   variable-p)

- ("unifgram.lisp" "student.lisp" RULE)
+ ("unifgram.lisp" "student.lisp" rule)

- ("unifgram.lisp"   "cmacsyma.lisp" RULE)
+ ("unifgram.lisp"   "cmacsyma.lisp" rule)

- ("unifgram.lisp" "macsyma.lisp" RULE)
+ ("unifgram.lisp" "macsyma.lisp" rule)

- ("krep2.lisp" "krep1.lisp" RETRIEVE MAPC-RETRIEVE INDEX)
+ ("krep2.lisp" "krep1.lisp" retrieve mapc-retrieve index)

- ("krep2.lisp" "krep.lisp" ADD-FACT INDEX)
+ ("krep2.lisp" "krep.lisp" add-fact index)

- ("krep2.lisp"   "prologc.lisp" TOP-LEVEL-PROVE)
+ ("krep2.lisp"   "prologc.lisp" top-level-prove)

- ("krep1.lisp" "krep.lisp"   DTREE-INDEX INDEX)
+ ("krep1.lisp" "krep.lisp"   dtree-index index)

- ("prologc2.lisp" "prologc1.lisp" COMPILE-CLAUSE   COMPILE-PREDICATE
-  PROPER-LISTP HAS-VARIABLE-P COMPILE-ARG   COMPILE-UNIFY =
-  DEF-PROLOG-COMPILER-MACRO PROLOG-COMPILER-MACRO   COMPILE-CALL
-  COMPILE-BODY MAKE-= MAKE-PREDICATE MAKE-PARAMETERS ARGS
-  RELATION-ARITY CLAUSES-WITH-ARITY PROLOG-COMPILE VAR *VAR-COUNTER*
-  UNDO-BINDINGS!  SET-BINDING! *TRAIL* PRINT-VAR SET-BINDING! UNIFY!
-  DEREF BOUND-P VAR UNBOUND)
+ ("prologc2.lisp" "prologc1.lisp" compile-clause   compile-predicate
+  proper-listp has-variable-p compile-arg   compile-unify =
+  def-prolog-compiler-macro prolog-compiler-macro   compile-call
+  compile-body make-= make-predicate make-parameters args
+  relation-arity clauses-with-arity prolog-compile var *var-counter*
+  undo-bindings!  set-binding! *trail* print-var set-binding! unify!
+  deref bound-p var unbound)

- ("prologc2.lisp" "prologc.lisp"   BIND-UNBOUND-VARS
-  MAYBE-ADD-UNDO-BINDINGS COMPILE-CLAUSE   COMPILE-PREDICATE
-  PROPER-LISTP HAS-VARIABLE-P COMPILE-ARG   COMPILE-UNIFY =
-  DEF-PROLOG-COMPILER-MACRO PROLOG-COMPILER-MACRO   COMPILE-CALL
-  COMPILE-BODY MAKE-= MAKE-PREDICATE MAKE-PARAMETERS ARGS
-  RELATION-ARITY CLAUSES-WITH-ARITY PROLOG-COMPILE VAR *VAR-COUNTER*
-  UNDO-BINDINGS! SET-BINDING! *TRAIL* PRINT-VAR SET-BINDING! UNIFY!
-  DEREF BOUND-P VAR UNBOUND)
+ ("prologc2.lisp" "prologc.lisp"   bind-unbound-vars
+  maybe-add-undo-bindings compile-clause   compile-predicate
+  proper-listp has-variable-p compile-arg   compile-unify =
+  def-prolog-compiler-macro prolog-compiler-macro   compile-call
+  compile-body make-= make-predicate make-parameters args
+  relation-arity clauses-with-arity prolog-compile var *var-counter*
+  undo-bindings! set-binding! *trail* print-var set-binding! unify!
+  deref bound-p var unbound)

- ("prologc2.lisp" "compile3.lisp" ARGS)
+ ("prologc2.lisp" "compile3.lisp" args)

- ("prologc1.lisp" "prologc.lisp" PROPER-LISTP HAS-VARIABLE-P
-  COMPILE-ARG COMPILE-UNIFY = DEF-PROLOG-COMPILER-MACRO
-  PROLOG-COMPILER-MACRO COMPILE-CALL COMPILE-BODY MAKE-=
-  COMPILE-CLAUSE MAKE-PREDICATE MAKE-PARAMETERS COMPILE-PREDICATE ARGS
-  RELATION-ARITY CLAUSES-WITH-ARITY PROLOG-COMPILE VAR *VAR-COUNTER*
-  UNDO-BINDINGS! SET-BINDING! *TRAIL* PRINT-VAR SET-BINDING! UNIFY!
-  DEREF BOUND-P VAR UNBOUND)
+ ("prologc1.lisp" "prologc.lisp" proper-listp has-variable-p
+  compile-arg compile-unify = def-prolog-compiler-macro
+  prolog-compiler-macro compile-call compile-body make-=
+  compile-clause make-predicate make-parameters compile-predicate args
+  relation-arity clauses-with-arity prolog-compile var *var-counter*
+  undo-bindings! set-binding! *trail* print-var set-binding! unify!
+  deref bound-p var unbound)

- ("prologc1.lisp" "compile3.lisp" ARGS)
+ ("prologc1.lisp" "compile3.lisp" args)

- ("overview.lisp" "auxfns.lisp" FIND-ALL)
+ ("overview.lisp" "auxfns.lisp" find-all)

- ("auxmacs.lisp"   "macsyma.lisp" FIND-ANYWHERE)
+ ("auxmacs.lisp"   "macsyma.lisp" find-anywhere)

- ("auxmacs.lisp" "gps.lisp"   STARTS-WITH)
+ ("auxmacs.lisp" "gps.lisp"   starts-with)

- ("student.lisp" "cmacsyma.lisp" PREFIX->INFIX   BINARY-EXP-P EXP-ARGS
-  EXP-P EXP RULE)
+ ("student.lisp" "cmacsyma.lisp" prefix->infix   binary-exp-p exp-args
+  exp-p exp rule)

- ("student.lisp" "macsyma.lisp"   PREFIX->INFIX BINARY-EXP-P EXP-ARGS
-  EXP-P EXP RULE)
+ ("student.lisp" "macsyma.lisp"   prefix->infix binary-exp-p exp-args
+  exp-p exp rule)

- ("auxfns.lisp"   "interp1.lisp" DELAY DELAY)
+ ("auxfns.lisp"   "interp1.lisp" delay delay)

- ("auxfns.lisp" "cmacsyma.lisp"   VARIABLE-P)
+ ("auxfns.lisp" "cmacsyma.lisp"   variable-p)

- ("auxfns.lisp" "macsyma.lisp" VARIABLE-P PARTITION-IF)
+ ("auxfns.lisp" "macsyma.lisp" variable-p partition-if)

- ("auxfns.lisp" "gps.lisp" MEMBER-EQUAL)
+ ("auxfns.lisp" "gps.lisp" member-equal)

- ("prologc.lisp"   "compile3.lisp" ARGS)
+ ("prologc.lisp"   "compile3.lisp" args)

- ("gps1.lisp" "gps.lisp" APPLY-OP APPROPRIATE-P   ACHIEVE GPS OP
-  *OPS*)
+ ("gps1.lisp" "gps.lisp" apply-op appropriate-p   achieve gps op
+  *ops*)

- ("interp3.lisp" "interp2.lisp" INTERP)
+ ("interp3.lisp" "interp2.lisp" interp)

- ("interp3.lisp" "interp1.lisp" INIT-SCHEME-PROC SCHEME INTERP)
+ ("interp3.lisp" "interp1.lisp" init-scheme-proc scheme interp)

- ("interp3.lisp" "compile3.lisp" SCHEME)
+ ("interp3.lisp" "compile3.lisp" scheme)

- ("interp2.lisp"   "interp1.lisp" INTERP)
+ ("interp2.lisp"   "interp1.lisp" interp)

- ("interp1.lisp" "compile3.lisp" SCHEME)
+ ("interp1.lisp" "compile3.lisp" scheme)

- ("interp1.lisp" "compile1.lisp" DEFINE)
+ ("interp1.lisp" "compile1.lisp" define)

- ("cmacsyma.lisp"   "macsyma.lisp" PREFIX->INFIX *INFIX->PREFIX-RULES*
-  VARIABLE-P   INFIX->PREFIX BINARY-EXP-P EXP-ARGS EXP-P EXP RULE)
+ ("cmacsyma.lisp"   "macsyma.lisp" prefix->infix *infix->prefix-rules*
+  variable-p   infix->prefix binary-exp-p exp-args exp-p exp rule)

- ("compile3.lisp"   "compile2.lisp" *PRIMITIVE-FNS* OPTYMIZE
-  INIT-SCHEME-COMP ASSEMBLE)
+ ("compile3.lisp"   "compile2.lisp" *primitive-fns* optymize
+  init-scheme-comp assemble)

- ("compile3.lisp" "compile1.lisp" SHOW-FN)
+ ("compile3.lisp" "compile1.lisp" show-fn)

- ("compile2.lisp"   "compile1.lisp" COMP-LAMBDA GEN-SET COMP-IF
-  COMP-BEGIN COMP)
+ ("compile2.lisp"   "compile1.lisp" comp-lambda gen-set comp-if
+  comp-begin comp)

  )

diff --git a/cl-loaders/norvig.lisp b/cl-loaders/norvig.lisp
index fa3eb10..23005e9 100644
--- a/cl-loaders/norvig.lisp
+++ b/cl-loaders/norvig.lisp
@@ -14,234 +14,231 @@
 ;;;;    2003-05-14 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
-;;;;    mailto:pjb@informatimago.com
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************


 (defpackage "COM.NORVIG"
   (:use "COMMON-LISP")
-  (:SHADOW "EXP"))
+  (:shadow "EXP"))
 (in-package "COM.NORVIG")

-(DEFPARAMETER CONFIGURATION
-  '(GPS-SEARCH  ELISA-PM PROLOG-CP KREP SYNTAX-3 SCHEME-3 SCHEME-C3))
-
-
-(DEFMACRO EXCLUSIVE (&REST E-B)
-  (LET ((ETIQUETTES (MAPCAR (FUNCTION CAR) E-B))
-        (REP (GENSYM "REP")))
-    `(LET ((,REP (INTERSECTION CONFIGURATION ',ETIQUETTES)))
-       (IF (= 1 (LENGTH ,REP))
-         (PROGN
-           (SETQ ,REP (CAR ,REP))
-           (FORMAT T "~&CONFIGURED: ~A~%" ,REP))
-         (SETQ ,REP
-               (DO ((,REP NIL))
-                   (,REP ,REP)
-                 (FORMAT *QUERY-IO* "~&Please choose what to load from ~S: "
-                         ',ETIQUETTES)
-                 (SETQ ,REP (READ *QUERY-IO*))
-                 (UNLESS (MEMBER ,REP ',ETIQUETTES) (SETQ ,REP NIL)))))
-       (CASE ,REP
-         ,@E-B))))
-
-
-
-
-(DEFVAR *PAIP-SOURCE-FILES*
-  (TRANSLATE-LOGICAL-PATHNAME (MAKE-PATHNAME
-                               :HOST "NORVIG"
-                               :DIRECTORY '(:ABSOLUTE)
-                               :NAME NIL
-                               :TYPE "LISP"))
+(defparameter configuration
+  '(gps-search  elisa-pm prolog-cp krep syntax-3 scheme-3 scheme-c3))
+
+
+(defmacro exclusive (&rest e-b)
+  (let ((etiquettes (mapcar (function car) e-b))
+        (rep (gensym "REP")))
+    `(let ((,rep (intersection configuration ',etiquettes)))
+       (if (= 1 (length ,rep))
+         (progn
+           (setq ,rep (car ,rep))
+           (format t "~&CONFIGURED: ~A~%" ,rep))
+         (setq ,rep
+               (do ((,rep nil))
+                   (,rep ,rep)
+                 (format *query-io* "~&Please choose what to load from ~S: "
+                         ',etiquettes)
+                 (setq ,rep (read *query-io*))
+                 (unless (member ,rep ',etiquettes) (setq ,rep nil)))))
+       (case ,rep
+         ,@e-b))))
+
+
+
+
+(defvar *paip-source-files*
+  (translate-logical-pathname (make-pathname
+                               :host "NORVIG"
+                               :directory '(:absolute)
+                               :name nil
+                               :type "LISP"))
   "The location of the source files for this book.
   CHANGE IT TO REFLECT THE LOCATION OF THE FILES ON YOUR COMPUTER.")


-(LOAD "norvig:intro.lisp") ;; A few simple definitions
-(LOAD "norvig:simple.lisp") ;; Random sentence generator (two versions)
-(LOAD "norvig:overview.lisp") ;; 14 versions of LENGTH and other examples
+(load "norvig:intro.lisp") ;; A few simple definitions
+(load "norvig:simple.lisp") ;; Random sentence generator (two versions)
+(load "norvig:overview.lisp") ;; 14 versions of LENGTH and other examples


-(LOAD "norvig:auxmacs.lisp") ;; A few macros; load this first.
+(load "norvig:auxmacs.lisp") ;; A few macros; load this first.

-(UNLESS (FBOUNDP 'COMMON-LISP:LOOP)
-  (LOAD "norvig:loop.lisp")) ;; Load if your Lisp doesn't support ANSI LOOP
+(unless (fboundp 'common-lisp:loop)
+  (load "norvig:loop.lisp")) ;; Load if your Lisp doesn't support ANSI LOOP

-(LOAD "norvig:auxfns.lisp") ;; Commonly used auxiliary functions.
+(load "norvig:auxfns.lisp") ;; Commonly used auxiliary functions.


-(LOAD "norvig:search.lisp") ;; Search Utility
+(load "norvig:search.lisp") ;; Search Utility
 ;;     "norvig:search.dat"      ;; Test data (examples) for above

-(EXCLUSIVE
- (GPS-SIMPLE
-  (LOAD "norvig:gps1.lisp") ;; Simple version of General Problem Solver
+(exclusive
+ (gps-simple
+  (load "norvig:gps1.lisp") ;; Simple version of General Problem Solver
   ;;     "norvig:gps1.dat"      ;; Test data (examples) for above
   )
- (GPS
-  (LOAD "norvig:gps1.lisp") ;; Simple version of General Problem Solver
-  (LOAD "norvig:gps.lisp") ;; Final version of General Problem Solver
+ (gps
+  (load "norvig:gps1.lisp") ;; Simple version of General Problem Solver
+  (load "norvig:gps.lisp") ;; Final version of General Problem Solver
   ;;     "norvig:gps.dat"       ;; Test data (examples) for above
   )
- (GPS-SEARCH
-  (LOAD "norvig:gps1.lisp") ;; Simple version of General Problem Solver
-  (LOAD "norvig:gps.lisp") ;; Final version of General Problem Solver
-  (LOAD "norvig:gps-srch.lisp") ;; Version of GPS using the search utility
+ (gps-search
+  (load "norvig:gps1.lisp") ;; Simple version of General Problem Solver
+  (load "norvig:gps.lisp") ;; Final version of General Problem Solver
+  (load "norvig:gps-srch.lisp") ;; Version of GPS using the search utility
   ;;     "norvig:gps-srch.dat"  ;; Test data (examples) for above
   ))



-(LOAD "norvig:patmatch.lisp") ;; Pattern Matching Utility
+(load "norvig:patmatch.lisp") ;; Pattern Matching Utility
 ;;     "norvig:patmatch.dat"    ;; Test data (examples) for above


-(EXCLUSIVE
- (ELISA-BASIC
-  (LOAD "norvig:eliza1.lisp") ;; Basic version of Eliza program
+(exclusive
+ (elisa-basic
+  (load "norvig:eliza1.lisp") ;; Basic version of Eliza program
   )
- (ELISA
-  (LOAD "norvig:eliza.lisp") ;; Eliza with more rules; different reader
+ (elisa
+  (load "norvig:eliza.lisp") ;; Eliza with more rules; different reader
   )
- (ELISA-PM
-  (LOAD "norvig:eliza-pm.lisp") ;; Version of Eliza using utilities
-  (LOAD "norvig:cmacsyma.lisp") ;; Efficient Macsyma with canonical form
+ (elisa-pm
+  (load "norvig:eliza-pm.lisp") ;; Version of Eliza using utilities
+  (load "norvig:cmacsyma.lisp") ;; Efficient Macsyma with canonical form
   ;;     "norvig:cmacsyma.dat"  ;; Test data (examples) for above
   ))


-(LOAD "norvig:eliza1.lisp")   ;; Needed by The Student Program
-(LOAD "norvig:student.lisp")  ;; The Student Program
+(load "norvig:eliza1.lisp")   ;; Needed by The Student Program
+(load "norvig:student.lisp")  ;; The Student Program
 ;;     "norvig:student.dat"   ;; Test data (examples) for above

-(LOAD "norvig:macsyma.lisp") ;; The Macsyma Program
-(LOAD "norvig:macsymar.lisp") ;; Simplification & integration rules for Macsyma
+(load "norvig:macsyma.lisp") ;; The Macsyma Program
+(load "norvig:macsymar.lisp") ;; Simplification & integration rules for Macsyma
 ;;     "norvig:macsyma.dat"   ;; Test data (examples) for above


-(LOAD "norvig:unify.lisp") ;; Unification functions
+(load "norvig:unify.lisp") ;; Unification functions

-(EXCLUSIVE
- (PROLOG1
-  (LOAD "norvig:prolog1.lisp") ;; First version of Prolog interpreter
+(exclusive
+ (prolog1
+  (load "norvig:prolog1.lisp") ;; First version of Prolog interpreter
   ;;     "norvig:prolog1.dat"   ;; Test data (examples) for above
   )
- (PROLOG
-  (LOAD "norvig:prolog.lisp") ;; Final version of Prolog interpreter
+ (prolog
+  (load "norvig:prolog.lisp") ;; Final version of Prolog interpreter
   ;;     "norvig:prolog.dat"    ;; Test data (examples) for above
   )
- (PROLOG-C1
-  (LOAD "norvig:prologc1.lisp") ;; First version of Prolog compiler
+ (prolog-c1
+  (load "norvig:prologc1.lisp") ;; First version of Prolog compiler
   ;;     "norvig:prologc1.dat"  ;; Test data (examples) for above
   )
- (PROLOG-C2
-  (LOAD "norvig:prologc2.lisp") ;; Second version of Prolog compiler
+ (prolog-c2
+  (load "norvig:prologc2.lisp") ;; Second version of Prolog compiler
   ;;     "norvig:prologc2.dat"  ;; Test data (examples) for above
   )
- (PROLOG-C
-  (LOAD "norvig:prologc.lisp") ;; Final version of Prolog compiler
+ (prolog-c
+  (load "norvig:prologc.lisp") ;; Final version of Prolog compiler
   ;;     "norvig:prologc.dat"   ;; Test data (examples) for above
   )
- (PROLOG-CP
+ (prolog-cp
   ;;(LOAD "norvig:prologcp.lisp") ;; Primitives for Prolog compiler
   ;;(LOAD "norvig:unifgram.lisp") ;; Unification Parser
   ;;     "norvig:unifgram.dat"  ;; Test data (examples) for above

   ;;(LOAD "norvig:lexicon.lisp") ;; Sample Lexicon of English
   ;;     "norvig:grammar.dat"   ;; Test data (examples) for above
-  (LOAD "norvig:grammar.lisp") ;; Comprehensive grammar of English
+  (load "norvig:grammar.lisp") ;; Comprehensive grammar of English
   ))



-(LOAD "norvig:clos.lisp") ;; Some object-oriented and CLOS code
+(load "norvig:clos.lisp") ;; Some object-oriented and CLOS code
 ;;     "norvig:clos.dat"      ;; Test data (examples) for above

-(EXCLUSIVE
- (KREP-1
-  (LOAD "norvig:krep1.lisp") ;; Knowledge Representation code: first version
+(exclusive
+ (krep-1
+  (load "norvig:krep1.lisp") ;; Knowledge Representation code: first version
   ;;     "norvig:krep1.dat"   ;; Test data (examples) for above
   )
- (KREP-2
-  (LOAD "norvig:krep2.lisp") ;; Knowledge Representation code w/ conjunctions
+ (krep-2
+  (load "norvig:krep2.lisp") ;; Knowledge Representation code w/ conjunctions
   )
- (KREP
-  (LOAD "norvig:krep.lisp") ;; Final KR code: worlds and attached functions
+ (krep
+  (load "norvig:krep.lisp") ;; Final KR code: worlds and attached functions
   ))


-(LOAD "norvig:mycin.lisp") ;; The Emycin expert system shell
-(LOAD "norvig:mycin-r.lisp") ;; Some rules for a medical application of emycin
+(load "norvig:mycin.lisp") ;; The Emycin expert system shell
+(load "norvig:mycin-r.lisp") ;; Some rules for a medical application of emycin
 ;;     "norvig:mycin.dat"     ;; Test data (examples) for above

-(LOAD "norvig:waltz.lisp") ;; A Line-Labeling program using Waltz algorithm
+(load "norvig:waltz.lisp") ;; A Line-Labeling program using Waltz algorithm
 ;;     "norvig:waltz.dat"     ;; Test data (examples) for above

 ;; (LOAD "norvig:othello.lisp") ;; The Othello playing program & strategies
 ;;     "norvig:othello.dat"   ;; Test data (examples) for above
-(LOAD "norvig:othello2.lisp") ;; Additional strategies for Othello
-(LOAD "norvig:edge-tab.lisp") ;; Edge table for Iago strategy
+(load "norvig:othello2.lisp") ;; Additional strategies for Othello
+(load "norvig:edge-tab.lisp") ;; Edge table for Iago strategy

-(EXCLUSIVE
- (SYNTAX-1
-  (LOAD "norvig:syntax1.lisp") ;; Syntactic Parser
+(exclusive
+ (syntax-1
+  (load "norvig:syntax1.lisp") ;; Syntactic Parser
   ;;     "norvig:syntax1.dat"   ;; Test data (examples) for above
   )
- (SYNTAX-2
-  (LOAD "norvig:syntax2.lisp") ;; Syntactic Parser with semantics
+ (syntax-2
+  (load "norvig:syntax2.lisp") ;; Syntactic Parser with semantics
   ;;     "norvig:syntax2.dat"   ;; Test data (examples) for above
   )
- (SYNTAX-3
-  (LOAD "norvig:syntax3.lisp") ;; Syntactic Parser with semantics and pref.
+ (syntax-3
+  (load "norvig:syntax3.lisp") ;; Syntactic Parser with semantics and pref.
   ;;     "norvig:syntax3.dat"   ;; Test data (examples) for above
   ))



-(EXCLUSIVE
- (SCHEME-1
-  (LOAD "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
+(exclusive
+ (scheme-1
+  (load "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
   ;;     "norvig:interp1.dat"   ;; Test data (examples) for above
   )
- (SCHEME-2
-  (LOAD "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
-  (LOAD "norvig:interp2.lisp") ;; A tail recurive Scheme interpreter
+ (scheme-2
+  (load "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
+  (load "norvig:interp2.lisp") ;; A tail recurive Scheme interpreter
   )
- (SCHEME-3
-  (LOAD "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
-  (LOAD "norvig:interp3.lisp") ;; A Scheme interpreter that handles call/cc
+ (scheme-3
+  (load "norvig:interp1.lisp") ;; Scheme interpreter, incl. version with macros
+  (load "norvig:interp3.lisp") ;; A Scheme interpreter that handles call/cc
   ;;     "norvig:interp3.dat"   ;; Test data (examples) for above
   ))

-(EXCLUSIVE
- (SCHEME-C1
-  (LOAD "norvig:compile1.lisp") ;; Simple Scheme compiler
+(exclusive
+ (scheme-c1
+  (load "norvig:compile1.lisp") ;; Simple Scheme compiler
   )
- (SCHEME-C2
-  (LOAD "norvig:compile2.lisp") ;; Compiler with tail recursion and primitives
+ (scheme-c2
+  (load "norvig:compile2.lisp") ;; Compiler with tail recursion and primitives
   )
- (SCHEME-C3
-  (LOAD "norvig:compile3.lisp") ;; Compiler with peephole optimizer
-  (LOAD "norvig:compopt.lisp") ;; Peephole optimizers for compile3.lisp
+ (scheme-c3
+  (load "norvig:compile3.lisp") ;; Compiler with peephole optimizer
+  (load "norvig:compopt.lisp") ;; Peephole optimizers for compile3.lisp
   ;;     "norvig:compile.dat"  ;; Test data (examples) for all 3 versions above
   ))

diff --git a/cl-loaders/old-asdf.lisp b/cl-loaders/old-asdf.lisp
index f1f1be1..bc40ddb 100644
--- a/cl-loaders/old-asdf.lisp
+++ b/cl-loaders/old-asdf.lisp
@@ -15,51 +15,49 @@
 ;;;;    2003-06-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
-;;;;    Copyright Pascal Bourguignon 2003 - 2005.
+;;;;    Copyright Pascal Bourguignon 2003 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
-(LOAD "CCLAN:ASDF;ASDF.LISP")
-(LOAD "CCLAN:CCLAN-GET;PACKAGE.LISP")
-(LOAD "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
-(handler-case (ASDF:OPERATE 'ASDF:load-OP :CCLAN-GET)
-  (error ()  (ASDF:OPERATE 'ASDF:compile-OP :CCLAN-GET)))
+(load "CCLAN:ASDF;ASDF.LISP")
+(load "CCLAN:CCLAN-GET;PACKAGE.LISP")
+(load "CCLAN:CCLAN-GET;CCLAN-GET.ASD")
+(handler-case (asdf:operate 'asdf:load-op :cclan-get)
+  (error ()  (asdf:operate 'asdf:compile-op :cclan-get)))

 (in-package "COM.INFORMATIMAGO.PJB")

-(defparameter *original-asdf-registry* ASDF:*CENTRAL-REGISTRY*)
+(defparameter *original-asdf-registry* asdf:*central-registry*)

-(SETF CCLAN-GET::*CCLAN-TARBALL-DIRECTORY* "SHARE-LISP:CCLAN;TARBALL;"
-      CCLAN-GET::*CCLAN-SOURCE-DIRECTORY*  "SHARE-LISP:CCLAN;SOURCE;"
-      CCLAN-GET::*CCLAN-ASDF-REGISTRY*     "SHARE-LISP:CCLAN;REGISTRY;")
+(setf cclan-get::*cclan-tarball-directory* "SHARE-LISP:CCLAN;TARBALL;"
+      cclan-get::*cclan-source-directory*  "SHARE-LISP:CCLAN;SOURCE;"
+      cclan-get::*cclan-asdf-registry*     "SHARE-LISP:CCLAN;REGISTRY;")

 (defun asdf-rescan-packages ()
   (format *trace-output* "~&;; Scanning ASDF packages...~%")
   (prog1
-      (SORT
-       (DELETE-DUPLICATES
-        (MAPCAR
-         (LAMBDA (P) (MAKE-PATHNAME :NAME NIL :TYPE NIL :VERSION NIL :DEFAULTS P))
-         (DIRECTORY "PACKAGES:**;*.ASD"))
+      (sort
+       (delete-duplicates
+        (mapcar
+         (lambda (p) (make-pathname :name nil :type nil :version nil :defaults p))
+         (directory "PACKAGES:**;*.ASD"))
         :test (function equal))
-       (LAMBDA (A B) (if (= (length a) (length b))
+       (lambda (a b) (if (= (length a) (length b))
                   (string< a b)
                   (< (length a) (length b))))
        :key (function namestring))
@@ -67,12 +65,12 @@


 (defun update-asdf-registry ()
-  (setf ASDF:*CENTRAL-REGISTRY*
+  (setf asdf:*central-registry*
         (nconc (asdf-rescan-packages)
-                (list CCLAN-GET::*CCLAN-ASDF-REGISTRY*)
+                (list cclan-get::*cclan-asdf-registry*)
                 *original-asdf-registry*)))

-(EXPORT 'UPDATE-ASDF-REGISTRY)
+(export 'update-asdf-registry)
 (update-asdf-registry)

 (in-package "COMMON-LISP-USER")
diff --git a/cl-loaders/pjb.lisp b/cl-loaders/pjb.lisp
index f265d10..d8b621f 100644
--- a/cl-loaders/pjb.lisp
+++ b/cl-loaders/pjb.lisp
@@ -14,47 +14,45 @@
 ;;;;    2003-06-15 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************


-(DOLIST
-    (PACKAGE
-     '( COM.INFORMATIMAGO.COMMON-LISP.COMPATIBILITY
-        COM.INFORMATIMAGO.COMMON-LISP.DFA
-        COM.INFORMATIMAGO.COMMON-LISP.DICTIONARY
+(dolist
+    (package
+     '( com.informatimago.common-lisp.compatibility
+        com.informatimago.common-lisp.dfa
+        com.informatimago.common-lisp.dictionary
         ;; COM.INFORMATIMAGO.COMMON-LISP.GRAPH-DIAGRAM
         ;; COM.INFORMATIMAGO.COMMON-LISP.GRAPH-DOT
-        COM.INFORMATIMAGO.COMMON-LISP.GRAPH
+        com.informatimago.common-lisp.graph
         ;; collision with MAP: COM.INFORMATIMAGO.COMMON-LISP.HTML
-        COM.INFORMATIMAGO.COMMON-LISP.LIST
-        COM.INFORMATIMAGO.COMMON-LISP.MAKE-DEPENDS
-        COM.INFORMATIMAGO.COMMON-LISP.PICTURE
-        COM.INFORMATIMAGO.COMMON-LISP.STRING
-        COM.INFORMATIMAGO.COMMON-LISP.TREE-TO-DIAGRAM
-        COM.INFORMATIMAGO.COMMON-LISP.TREE-TO-ASCII
-        COM.INFORMATIMAGO.COMMON-LISP.UTILITY
+        com.informatimago.common-lisp.list
+        com.informatimago.common-lisp.make-depends
+        com.informatimago.common-lisp.picture
+        com.informatimago.common-lisp.string
+        com.informatimago.common-lisp.tree-to-diagram
+        com.informatimago.common-lisp.tree-to-ascii
+        com.informatimago.common-lisp.utility
         ))
-  (IN-PACKAGE "COMMON-LISP-USER")
-  (COM.INFORMATIMAGO.COMMON-LISP.PACKAGE:LOAD-PACKAGE PACKAGE)
-  (IN-PACKAGE "COMMON-LISP-USER")
+  (in-package "COMMON-LISP-USER")
+  (com.informatimago.common-lisp.package:load-package package)
+  (in-package "COMMON-LISP-USER")
 ;;  (USE-PACKAGE PACKAGE)
   )

diff --git a/cl-loaders/plisp.lisp b/cl-loaders/plisp.lisp
index 58c5c80..22fe55a 100644
--- a/cl-loaders/plisp.lisp
+++ b/cl-loaders/plisp.lisp
@@ -14,45 +14,43 @@
 ;;;;    2004-10-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(DEFPACKAGE "COM.1729.PLISP"
-  (:USE "COMMON-LISP")
-  (:EXPORT "PS-INIT" "PS-COMPILE"))
+(defpackage "COM.1729.PLISP"
+  (:use "COMMON-LISP")
+  (:export "PS-INIT" "PS-COMPILE"))

-(IN-PACKAGE "COM.1729.PLISP")
+(in-package "COM.1729.PLISP")


 ;;;  This builds an executable postscript compiler

-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;VARS")     ; has defvars
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;MACROS")   ; useful macros
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;TOP")      ; top level control
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;COMPILE")  ; guts of the compilation process
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;OUTPUT")   ; output routines
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;DEFPS")    ; definitions of postscript functions
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;ARGS")
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;NAMES")
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;FLOW")
-(LOAD "PACKAGES:COM;1729;PLISP;COMPILER;UTIL")
+(load "PACKAGES:COM;1729;PLISP;COMPILER;VARS")     ; has defvars
+(load "PACKAGES:COM;1729;PLISP;COMPILER;MACROS")   ; useful macros
+(load "PACKAGES:COM;1729;PLISP;COMPILER;TOP")      ; top level control
+(load "PACKAGES:COM;1729;PLISP;COMPILER;COMPILE")  ; guts of the compilation process
+(load "PACKAGES:COM;1729;PLISP;COMPILER;OUTPUT")   ; output routines
+(load "PACKAGES:COM;1729;PLISP;COMPILER;DEFPS")    ; definitions of postscript functions
+(load "PACKAGES:COM;1729;PLISP;COMPILER;ARGS")
+(load "PACKAGES:COM;1729;PLISP;COMPILER;NAMES")
+(load "PACKAGES:COM;1729;PLISP;COMPILER;FLOW")
+(load "PACKAGES:COM;1729;PLISP;COMPILER;UTIL")

 ;; Simple-minded iteration through the common-lisp directory -
 ;; may need changing depending of OS
@@ -64,7 +62,7 @@

 ;; This only needs to be done once.  ps-init is in defps

-(PS-INIT)
+(ps-init)



diff --git a/cl-loaders/portableaserve.lisp b/cl-loaders/portableaserve.lisp
index cfb9986..085f005 100644
--- a/cl-loaders/portableaserve.lisp
+++ b/cl-loaders/portableaserve.lisp
@@ -15,33 +15,31 @@
 ;;
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(LOAD "package:portableaserve;logical-hostnames.lisp")
-(LOAD "package:portableaserve;acl-compat;acl-compat-clisp.system")
-(DEF-LP-TRANS "ACL-COMPAT"  +SHARE-LISP+ "portableaserve/acl-compat/")
-(EXT:WITHOUT-PACKAGE-LOCK ()
-  (MK:OOS "ACL-COMPAT" :LOAD :COMPILE-DURING-LOAD T))
-(LOAD "aserve:aserve.system")
-(MK:OOS "ASERVE" :LOAD :COMPILE-DURING-LOAD T)
+(load "package:portableaserve;logical-hostnames.lisp")
+(load "package:portableaserve;acl-compat;acl-compat-clisp.system")
+(def-lp-trans "ACL-COMPAT"  +share-lisp+ "portableaserve/acl-compat/")
+(ext:without-package-lock ()
+  (mk:oos "ACL-COMPAT" :load :compile-during-load t))
+(load "aserve:aserve.system")
+(mk:oos "ASERVE" :load :compile-during-load t)

 (defpackage :aserve-example)
 (defun aserve-example (&optional (port 2001))
diff --git a/cl-loaders/pseudo.lisp b/cl-loaders/pseudo.lisp
index 6642208..132aad9 100644
--- a/cl-loaders/pseudo.lisp
+++ b/cl-loaders/pseudo.lisp
@@ -13,11 +13,11 @@

 (if (equal (lisp-implementation-type) "Emacs Common Lisp")
     (progn
-      (LOAD "/usr/local/share/lisp/packages/edu/mit/ai/pseudo/loadit.lisp")
-      (LOAD-PSEUDOSCHEME  "/usr/local/share/lisp/packages/edu/mit/ai/pseudo/"))
+      (load "/usr/local/share/lisp/packages/edu/mit/ai/pseudo/loadit.lisp")
+      (load-pseudoscheme  "/usr/local/share/lisp/packages/edu/mit/ai/pseudo/"))
     (progn
-      (LOAD "PACKAGES:EDU;MIT;AI;PSEUDO;LOADIT")
-      (LOAD-PSEUDOSCHEME "PACKAGES:EDU;MIT;AI;PSEUDO;")))
-(DEFMACRO SCHEME () `(PS:SCHEME))
+      (load "PACKAGES:EDU;MIT;AI;PSEUDO;LOADIT")
+      (load-pseudoscheme "PACKAGES:EDU;MIT;AI;PSEUDO;")))
+(defmacro scheme () `(ps:scheme))
 (format t "~2%Use: (scheme)~2%")
 ;;;; pseudo.lisp                      --                     --          ;;;;
diff --git a/cl-loaders/regex.lisp b/cl-loaders/regex.lisp
index e3ee5a8..f8ef444 100644
--- a/cl-loaders/regex.lisp
+++ b/cl-loaders/regex.lisp
@@ -14,24 +14,22 @@
 ;;;;    2004-11-23 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (load "loaders:clocc")
@@ -65,7 +63,7 @@
                                                     :type :wild
                                                     :version :wild
                                                     :defaults src-path))))
-  (push src-path MK::*CENTRAL-REGISTRY*))
+  (push src-path mk::*central-registry*))

 (mk:oos "regex" :load)

diff --git a/cl-loaders/uffi.lisp b/cl-loaders/uffi.lisp
index 5069a8e..fa0a7dd 100644
--- a/cl-loaders/uffi.lisp
+++ b/cl-loaders/uffi.lisp
@@ -14,32 +14,30 @@
 ;;;;    2003-06-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(UNLESS (FIND-PACKAGE "ASDF")
-  (LOAD "LOADER:CCLAN.LISP"))
+(unless (find-package "ASDF")
+  (load "LOADER:CCLAN.LISP"))

-(PUSH (DIRECTORY-NAMESTRING (TRANSLATE-LOGICAL-PATHNAME "UFFI:UFFI.ASD"))
-      ASDF:*CENTRAL-REGISTRY*)
-(ASDF:OPERATE 'ASDF:LOAD-OP :UFFI)
+(push (directory-namestring (translate-logical-pathname "UFFI:UFFI.ASD"))
+      asdf:*central-registry*)
+(asdf:operate 'asdf:load-op :uffi)


 ;;;; uffi.lisp                        -- 2003-06-05 21:06:08 -- pascal   ;;;;
diff --git a/cl-posix/cliki/Makefile b/cl-posix/cliki/Makefile
deleted file mode 100644
index 0d90102..0000000
--- a/cl-posix/cliki/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-LISP=sbcl --noinform --noprogrammer # --no-sysinit
-
-all: package
-
-package:
-	echo "(asdf:operate 'asdf:load-op 'cclan)" "(cclan:cvs-tag 'cliki)"  "(cclan:make-tar-file 'cliki)" |$(LISP)
-
diff --git a/cl-posix/cliki/NEWS b/cl-posix/cliki/NEWS
deleted file mode 100644
index a708710..0000000
--- a/cl-posix/cliki/NEWS
+++ /dev/null
@@ -1,186 +0,0 @@
-								-*- Text -*-
-
-New in CLiki 0.4.4 (not released)
-
-* Introduce anti-spamming device: all but one version of a page is now
-  served with NOFOLLOW robots tag.  That version is the newest version
-  which has lasted more than 24 hours (without|before) being edited
-
-* Bugfixes for new stuff in 0.4.3
-
-* RSS feed now includes a pubDate element, to make aggregators
-  (primarily Planet Lisp, it must be admitted) happier
-
-* Export CHECK-PAGE-SAVE-ALLOWED (GF) and the condition
-  CLIKI-PAGE-SAVE-REJECTED, making it easier for cliki-based apps
-  to do things like username checking
-
-New in CLiki 0.4.3
-
-* Versioning!  At the expense of making the file names correspond even
-  less closely with the page title, we now produce a version per edit.
-
-* While indexing we collect the first sentence of each page, and
-  make it accessible as (CLIKI-FIRST-SENTENCE page)
-
-* Legacy searches now print this out.
-
-* Beginning of the long slow process to separate generic cliki engine
-  stuff from www.cliki.net stuff: new cliki-net class that you
-  probably don't want to use unless you're me
-
-* Indexing tweaks mean startup on big clikis may be a bit faster.
-
-* Bug fixes: RSS generation, topic searches.
-
-* *(Uncategorized) marker added to default text for new pages.
-
-New in CLiki 0.4.2
-
-* Now depends on xmls package for rss generation (stop complaining at
-  the back there: it's small, it's asdf-installable if you ignore the
-  lack of GPG key, and it decruftifies the code noticeably)
-
-* Tweaked the feature that allows users to collapse multiple edits to
-  the same page such that they only show on Recent Changes once.  Now
-  it only works if the two edits happened within ten minutes of each
-  other.
-
-* Update README to include web address for lispweb list
-
-* 'Create new page' link to site root, and other links in the default
-  HTML stuff fixed (pointed out by Erik Enge, patch from Ivan Toshkov,
-  thanks both)
-
-* example.lisp package name changed to something less clashable
-
-New in CLiki 0.4.1
-
-* Fixed up a couple of links in the default page header/footer to
-  not point to the site root if the handler is installed elsewhere.
-
-* Update README file to correspond to Araneida 0.81, and add
-  example.lisp demonstrating a simple CLiki installation.
-
-* Change CLIKI-INSTANCE class graph.  Now we have CLIKI-VIEW as a parent
-  of CLIKI-INSTANCE.  The approximate division is that CLIKI-VIEW deals
-  with the visual aspects and CLIKI-INSTANCE deals with updating and
-  saving data.
-
-* CLIKI-SKIN is a new CLIKI-VIEW subclass demonstrating a way to make
-  a second look and feel for an existing cliki.
-
-* New CLIKI-PAGE-SURROUND method replaces CLIKI-PAGE-HEADER and
-  CLIKI-PAGE-FOOTER.  WITH-PAGE-SURROUND macro allows any response
-  handler to reasonably conveniently use the standard surround for
-  some cliki it's associated with.
-
-* New class AUTHED-CLIKI does cookie-based authentication for clikis that
-  you don't want just anyone to edit.  Badly, though.  Feel free to send
-  patches.
-
-* At last, proper escaping of page pathnames.  Page titles may now contain
-  interesting characters like #\#, #\., #\+ etc.
-
-  If you have any pages stored in files with even mildly interesting
-  names, they will change: what was "Foo Bar" is now "Foo=20Bar", for
-  example.  The old names are still read, and updated to new names on
-  SAVE-PAGE (i.e. after edits).
-
-* #\Space and #\_ are treated as equivalent in page names, just as #\A
-  and #\a are.
-
-* SAVE-PAGE is now a GF specialkised on CLIKI-VIEW.  Might be usable
-  for e.g. database-backed clikis.
-
-* Bug fix: admin/recent-changes.dat is created if not found.
-
-* Some HTML cleanup.
-
-New in CLiki 0.4.0
-
-* Visual makeover.  Thanks to Miles Egan for doing the hard work, and
-  apologies to him for my subsequent attempts to wreck it again.
-
-* ?download request redirects now merge against cclan
-
-* Very slight documentation update
-
-* New :package tag is actually pretty similar to :download but explicitly
-  for ASDF systems
-
-* Some bug fixes:
-  - pages no longer show themselves in 'related pages' lists
-  - RDF file has working link for Recent Changes page
-  - empty pages can be edited again
-
-New in CLiki 0.3.9
-
-* Wholesale changes to take advantage of the new handler model in
-  Araneida 0.69+ (i.e. you need that too)
-
-* Potentially backward-incompatible change: now redirects requests
-  for the foo.html url to the foo page.  This has been threatened
-  for years
-
-* Default search result page gets a summary of matched text for each
-  matching document
-
-* CLIKI-DEFAULT-PAGE-NAME method lets you have a start page called something
-  other than `index'
-
-* ADD-TO-INDEX-FOR-PAGE methods can now also add their arguments to the
-  TF index, so that text in :(foo ...) constructs can be picked up in
-  full-text searching
-
-* recent changes is now always displayed in GMT
-
-* Javascript link in default page header method to create new page
-
-* Removed (in hindsight, silly) >(foo) download syntax
-
-* Targets for 0.4: perhaps some documentation.  Lift the user auth from
-  Entomotomy and include it here.  Bug fixes (please report bugs)
-
-
-New in CLiki 0.3.3
-
-* RDF RSS (0.92, insofar as it exists) export for Recent Changes
-
-* Major changes to internal workings of search and indexes such that the
-  index collection is now extensible: index.lisp should be reasonably clear.
-  CLiki 0.4 will happen when some work has been done on the search side of it
-  and some documentation written
-
-* CLiki syntax (_(foo), *(bar) etc) parsing radically changed to help with
-  index chages as above.
-
-* The latter two should have produced little or no user-visible changes to
-  existing cliki pages
-
-New in CLiki 0.3.2
-
-* New syntax for marking the >(download) URL of a package
-
-* Uses new Araneida cookie accessors (so yes, you need a new Araneida as well)
-
-* Default CLHS URL changed to lisp.org, as they still have the old Hyperspec
-  page names.  This is a stopgap measure, really
-
-New in CLiki 0.3.1
-
-* Nothing much.  Now builds using asdf
-
-New in CLiki 0.3
-
-* Hyperspec lookups (thanks to Eric Marsden for the code)
-
-* A full-text search engine (thanks to Neil W. Van Dyke for
-  introducing me to tfidf and pointing me at articles)
-
-* Multiple CLiki instances can co-exist in the same Lisp instance
-
-* Recent Changes view is now paged for speed of downloading
-
-* Can optionally use a cookie to remember the editors' names
-
diff --git a/cl-posix/cliki/README b/cl-posix/cliki/README
deleted file mode 100644
index e6817d3..0000000
--- a/cl-posix/cliki/README
+++ /dev/null
@@ -1,59 +0,0 @@
--*- Text -*-
-
-Interactive user-updatable web pages a la wiki (http://www.c2.com/cgi/wiki)
-
-See the live CLikis at
- http://www.cliki.net/
- http://sbcl-internals.cliki.net/
- http://cliki.tunes.org/
- ... etc
-
-* Building it
-
-CLiki depends on SBCL, and on a large number of modules, all of which
-are available from your nearest CCLAN node
-(see http://ww.telent.net/cclan/)
-
-If you're building on a machine with reasonable access to the
-internet (HTTP, possibly through a proxy), by far the simplest way to
-download and install everything is with asdf-install
-
-* (require 'asdf-install)
-* (asdf-install:install 'cliki)
-
-
-* Using it
-
-You need to create a cliki-instance object and install cliki-handler
-somewhere in your URL hierarchy.  See example.lisp for, as the name
-suggests, an example.
-
-data-directory is where the data files will be created, so must be
-writable by the user who is running the CL instance.
-
-If you would like to run multiple CLikis on the same listener, you can
-do that with multiple cliki-instances.  If you want them to have
-different look and feel, you can create a subclass of cliki-instance
-and specialize various methods.  See cliki-net.lisp for the layout
-used by www.cliki.net
-
-
-* For help
-
-Araneida and CLiki users are encouraged to subscribe to the lispweb
-mailing list: configuration problems and questions are welcome there.
-
- http://www.red-bean.com/lispweb/
-
-
-Paid support and custom development is also available if you're
-considering using this software in a commercial setting.  For details
-see
-
- http://web.metacircles.com/Support
-
-
-* ObPayPal
-
-This is Free Software yadda yadda yadda speech != beer yadda yadda
-http://ww.telent.net/donate.html blah blah blah
diff --git a/cl-posix/cliki/TODO b/cl-posix/cliki/TODO
deleted file mode 100644
index c882dbb..0000000
--- a/cl-posix/cliki/TODO
+++ /dev/null
@@ -1,103 +0,0 @@
--*- Text -*-
-
-See http://www.cliki.net/TODO%20List for features
-
-Look at the source for XXX ("fix me eventually") and TODO ("fix me soon")
-comments for things to do in support of those features.  You can use
-the supplied Perl script to do this for you: "perl make-TODO.pl *.lisp"
-
-view-recent-changes has calls to cliki:dayname that prolly ought to
-use net.telent.date
-
-We need to be able to edit a page's aliases, which involves UI design
-of some kind.  Another box on the edit page?
-
-Now we have some versioning support, but more features necessary
- - show diffs to/from other versions: needs UI thought
- - support "keep only n versions"
-
-Tighten up username cookies: send the user a cookie which has their
-name /and/ some opaque data that we can compare to.  Save whole thing
-in Recent Changes, so they can't fake someone else's username to
-overwrite their change.
-
-handle the cliki-page-save-rejected signals somewhere, in a way that
-will make the text show up in the browser window, not the error log.
-
-Can we make *(Delete this page) do more to make a page look deleted?
-Hard to say what exactly, though: if it's not got any links and stuff
-it should be mostly inaccessible other than from Recent Changes.
-Could lose it from admin/all-pages, I suppose
-
-refuse to accept edits when the body is entirely empty (seems to be a
-problem sometimes possibly with buggy browsers or mod_proxy)
-
-html entity escaping when editing in a textarea
-
-when a page is created, links to it from other pages probbaly aren't
-noted because the Last-modified on the other pages doesn't change -
-hence mod_proxy will serve the old version.  bypassing the proxy will
-cause the change to be noted
-
-when a page is created, it doesn't know about the existing pages that
-link to it.  the index protocol thing will manage outgoing links ok,
-but there's nothing to scan the rest of the repository for incoming
-links.  (Is this also a problem at page load?  if a->b and a is loaded
-before b exists, do we lose the backlink?)
-
-
-
-* CLiki
-** topic synonyms, UI for
-
-these would be really good for using cliki as backend half of a
-brainstorming tool, where having to stop and think about what a page
-should be called inhibits the creative flow, and we'd rather just give
-it some arbitrary unique name and let people assign user-visible
-titles later.  Need UI for titles ...
-
-If titles can be changed, and if titles are exposed in URLs (I think
-they should be), we have that whole urls-should-persist issue to deal
-with.  Might just punt on this by telling people to be careful, though.
-
-** read-only/authenticated version
-  - some of this is done for entomotomy already
-  - add some kind of acl to each page, inheriting sensibly from, um,
-     some other page (what other page?)
-  - access rights are :view, :edit, :comment  (append-only)
-
-so, authentication and authorization handlers on the edit-handler.
-But we don't bother authenticating if the page access perms say that
-anybody may edit
-
-groups:
-- anonymous user
-- any named user
-- a user
-- recursively, a list of groups
-
-somewhere we need to store the edit permissions per-page.
-persistently, yes.  I guess we could put them in the .titles files.
-we also need to store the user group data
-
-somehow we need a policy for edit perms on new pages
-
-ideally also we need a UI for changing it.
-
-** Can we use cliki as a photo manager?
-
-- "photo" pages: one picture and some text
-- "collection" pages: text and many half-sized photos being links to
-  the relevant photo pages
-- some convenience for page naming when uploading a whole collection
-- convenient internal anchor syntax for collection pages (then it
-  could be used as a diary): should also accept a human-readable title
-  so that collections can have associated rdf files
-
-** what about TODO lists
-
-requirements:
-represent "w depends on z"
-generate list of stuff in which each item is represented
-this would be useful stuff for entomotomy too, actually.
-
diff --git a/cl-posix/cliki/authed-cliki-class.lisp b/cl-posix/cliki/authed-cliki-class.lisp
deleted file mode 100644
index 4ebde96..0000000
--- a/cl-posix/cliki/authed-cliki-class.lisp
+++ /dev/null
@@ -1,4 +0,0 @@
-(in-package :cliki)
-(defclass authed-cliki-handler (cliki-instance)
-  ((users :initform nil :accessor cliki-users)))
-(defclass authed-cliki-edit-handler (edit-handler) ())
diff --git a/cl-posix/cliki/authed-cliki.lisp b/cl-posix/cliki/authed-cliki.lisp
deleted file mode 100644
index 4a5a968..0000000
--- a/cl-posix/cliki/authed-cliki.lisp
+++ /dev/null
@@ -1,81 +0,0 @@
-(in-package :cliki)
-
-;; user auth, originally developed for entomotomy
-
-(defstruct user name password)
-
-(defmethod find-user ((cliki authed-cliki-handler) name)
-  (find name (cliki-users cliki)
-	:key #'user-name
-	:test #'string=))
-
-(defmethod cliki-user-name ((cliki authed-cliki-handler) user)
-  (user-name user))
-
-(defmethod cliki-user-cookie ((cliki authed-cliki-handler) user)
-  (format nil "auth-username=~A:~A; path=~A; expires=~A; domain=~A"
-	  (urlstring-escape (user-name user))
-	  (urlstring-escape (user-password user))
-	  (url-path (cliki-url-root cliki))
-	  "Sun, 01-Jun-2036 00:00:01 GMT"
-	  (url-host (cliki-url-root cliki))))
-
-(defun login-handler (request)
-  (let* ((cliki (request-cliki request))
-	 (url (request-url request))
-	 (body (request-body request))
-	 (name (body-param "NAME" body))
-	 (from (body-param "FROM" body))
-	 (password (body-param "PASSWORD" body))
-	 (user (find-user cliki name)))
-    (cond ((and user
-		(string= password (user-password user)))
-	   (request-send-headers request :set-cookie (cliki-user-cookie cliki user))
-	   (request-redirect
-	    request (parse-urlstring from)
-	    :set-cookie (cliki-user-cookie cliki user)))
-	  (t (request-send-error request 401)))
-    (signal 'response-sent)))
-
-(defmethod shared-initialize :after ((handler authed-cliki-handler)
-				     slot-names &rest initargs)
-  (change-class (find-handler handler "edit/" nil)
-		'authed-cliki-edit-handler)
-  (with-open-file (i (merge-pathnames
-		      (make-pathname :name "users" :type "dat"
-				     :directory '(:relative "admin"))
-		      (cliki:cliki-data-directory handler)))
-    (let ((*package* #.*package*))
-      (setf (cliki-users handler) (read i))))
-  (install-handler handler 'login-handler "admin/login" nil))
-
-(defmethod handle-request-authentication ((handler authed-cliki-edit-handler)
-					 method request)
-  (let* ((u (request-cookie request "auth-username"))
-	 (colon (position #\: u))
-	 (username (urlstring-unescape (subseq u 0 colon)))
-	 (password (and colon (urlstring-unescape (subseq u (1+ colon)))))
-	 (cliki (cliki:request-cliki request))
-	 (user (find-user cliki username)))
-    (unless (and username password user
-		 (string= password (user-password user)))
-      (request-send-headers request)
-      (princ
-       (html
-	`(html (head (title "Login"))
-	  (body (h1 "Authentication required")
-	   (p "We need you to provide a username and password before you can edit this page")
-	   ,@(if password `((p "Incorrect password provided")))
-	   ((form :method post :action
-		  ,(format nil "~Aadmin/login"
-			   (urlstring
-			    (cliki:cliki-url-root cliki))))
-	    (p "Name " ((input :name :name :type :text :size 30)))
-	    (p "Password"
-	       ((input :name :password :type :text :size 30)))
-	    (p ((input :name :from :type :hidden :value
-		       ,(urlstring (request-url request))))
-	       ((input :name login :value "Login" :type submit)))))))
-       (request-stream request))
-      (signal 'response-sent))
-    (setf (request-user request) user)))
\ No newline at end of file
diff --git a/cl-posix/cliki/buffered-output-stream-class.lisp b/cl-posix/cliki/buffered-output-stream-class.lisp
deleted file mode 100644
index 80b23bb..0000000
--- a/cl-posix/cliki/buffered-output-stream-class.lisp
+++ /dev/null
@@ -1,21 +0,0 @@
-(in-package :cliki)
-
-;;; buffered-output-stream - see also elided-stream, a demonstration of its
-;;; purpose
-
-
-(defclass buffered-output-stream (fundamental-character-output-stream)
-  ((buffer :initarg buffer
-	   :initform (make-array 4096 :element-type 'character
-				 :adjustable t
-				 :fill-pointer 0)
-	   :reader buffered-output-stream-buffer)
-   ;; internal
-   (write-threshold :initform 1024 :initarg :write-threshold
-		    :accessor buffered-output-stream-write-threshold)
-   (temporary-write-threshold
-    :initform 1024
-    :accessor buffered-output-stream-temporary-write-threshold)
-   (extend-by :initarg :extend-by :initform 512 :accessor buffered-output-stream-extend-by)
-
-   (line-column :initform 0 :accessor stream-line-column)))
diff --git a/cl-posix/cliki/buffered-output-stream.lisp b/cl-posix/cliki/buffered-output-stream.lisp
deleted file mode 100644
index 0f57fb0..0000000
--- a/cl-posix/cliki/buffered-output-stream.lisp
+++ /dev/null
@@ -1,75 +0,0 @@
-(in-package :cliki)
-
-;;; buffered-output-stream - see also elided-stream, a demonstration of its
-;;; purpose
-
-
-;;; FIXME other ways to suck -
-
-;;; 0) doesn't support quite a lot of the gray streams protocol
-;;; 1) if the search string occurs a lot, so that it can't find
-;;; suitable elision points, buffer writes will fail and the buffer
-;;; may grow quite large (potentially up to the total length of all the
-;;; input)
-
-
-(defgeneric buffered-output-stream-write-buffer (stream &optional force-p))
-
-;;; internal
-(defmethod buffered-output-stream-write-some ((stream buffered-output-stream)
-					      &optional force-p)
-  (let ((chars-written (buffered-output-stream-write-buffer stream force-p)))
-    (if (> chars-written 0)
-	(let ((b (buffered-output-stream-buffer stream )))
-	  (if (> (length b) chars-written)
-	      (replace b b :start1 0 :start2 chars-written))
-	  (setf (fill-pointer b) (- (length b) chars-written)
-		(buffered-output-stream-temporary-write-threshold stream)
-		 (buffered-output-stream-write-threshold stream)))
-	(incf (buffered-output-stream-temporary-write-threshold stream)
-	      (buffered-output-stream-write-threshold stream)))))
-
-(defmethod stream-start-line-p ((stream buffered-output-stream))
-  (eql (stream-line-column stream) 0))
-
-(defmethod print-object ((object buffered-output-stream) stream)
-  (print-unreadable-object (object stream :type t :identity t)
-    (format stream "~A characters buffered"
-	    (length (buffered-output-stream-buffer object)))))
-
-(defmethod stream-write-string ((stream buffered-output-stream) string
-				&optional (start 0) (end (length string)))
-  (unless end (setf end (length string)))
-  (let ((buffer (buffered-output-stream-buffer stream))
-	(extend-by (max (- end start)
-			(buffered-output-stream-extend-by stream))))
-    (loop for i from start below end
-	  do (vector-push-extend (elt string i) buffer extend-by))
-    (when (> (length buffer) (buffered-output-stream-write-threshold stream))
-      (buffered-output-stream-write-some stream)))
-  string)
-
-(defmethod stream-write-char ((stream buffered-output-stream) character)
-  (let ((buffer (buffered-output-stream-buffer stream)))
-    (vector-push-extend character buffer
-			(buffered-output-stream-extend-by stream))
-    (when (> (length buffer)
-	     (buffered-output-stream-temporary-write-threshold stream))
-      (buffered-output-stream-write-some stream)))
-  character)
-
-;;; subclasses should probably avoid specialising these two methods
-(defmethod stream-finish-output ((stream buffered-output-stream))
-  (buffered-output-stream-write-some stream t))
-(defmethod stream-force-output ((stream buffered-output-stream))
-  (buffered-output-stream-write-some stream t))
-
-(defmethod stream-clear-output :after ((stream buffered-output-stream))
-  (let ((b (buffered-output-stream-buffer stream)))
-    (setf (fill-pointer b) 0)))
-
-(defmethod close :after ((stream buffered-output-stream) &key abort)
-  (if abort
-      (stream-clear-output stream)
-      (stream-force-output stream)))
-
diff --git a/cl-posix/cliki/cliki-instance-class.lisp b/cl-posix/cliki/cliki-instance-class.lisp
deleted file mode 100644
index 6701027..0000000
--- a/cl-posix/cliki/cliki-instance-class.lisp
+++ /dev/null
@@ -1,24 +0,0 @@
-(in-package :cliki)
-
-(defclass cliki-view (araneida:dispatching-handler)
-  ((title :reader cliki-title :initarg :title :initform "CLiki")
-   ;; XXX is this still needed?
-   (url-root :accessor cliki-url-root :initarg :url-root)))
-
-
-(defclass cliki-instance (cliki-view)
-  ;; caller should initialize data-directory, title, url-root; the
-  ;; rest will be sorted out internally
-  ((data-directory :accessor cliki-data-directory :initarg :data-directory)
-   (recent-changes :accessor cliki-recent-changes :initform (list))
-   (idf)
-   (pages :accessor cliki-pages :initform (make-hash-table :test 'equal))
-   (short-forms :accessor cliki-short-forms
-		:initarg :short-forms
-		:initform '((#\_ :link)
-			    (#\* :topic)
-			    (#\/ :legacy-search)
-			    (#\# ((#\H :clhs)))
-			    (#\: :long-form)))))
-
-
diff --git a/cl-posix/cliki/cliki-instance.lisp b/cl-posix/cliki/cliki-instance.lisp
deleted file mode 100644
index c3c0b50..0000000
--- a/cl-posix/cliki/cliki-instance.lisp
+++ /dev/null
@@ -1,191 +0,0 @@
-(in-package :cliki)
-
-(defun canonise-title (title)
-  "Return the key for the pages hash for the document with title TITLE"
-  (if (zerop (length title))
-      nil
-      (nstring-downcase (substitute #\Space #\_ title))))
-
-(defmethod find-page ((cliki cliki-view) title)
-  (gethash (or (canonise-title title)
-	       (string-downcase (cliki-default-page-name cliki)))
-	   (cliki-pages cliki)))
-
-(defmethod find-page-or-placeholder ((cliki cliki-view) titles)
-  (or (some (lambda (x) (find-page cliki x)) titles )
-      (let ((p
-	     (make-instance 'cliki-page :title (car titles)
-			    :pathname nil ; no pathname
-			    :names titles
-			    :versions nil
-			    :cliki cliki)))
-	(dolist (title titles)
-	  (setf (gethash (canonise-title title) (cliki-pages cliki)) p))
-	p)))
-
-(defun name-for-url (url)
-  (let* ((path (url-path url))
-	 (slash (position #\/ path :from-end t))
-	 (dothtml (search ".html" path :from-end t)))
-    (urlstring-unescape (subseq path (if slash (1+ slash) 0) dothtml))))
-
-#||
-* (name-for-url (parse-urlstring "http://www.foo.com/blah/bAng%20banG.html"))
-"bAng banG"
-* (name-for-url (parse-urlstring "http://www.foo.com/blah/bAng%20banGhtml"))
-"bAng banGhtml"
-* (name-for-url (parse-urlstring "http://www.foo.com/blah/bAn.g%20banGhtml"))
-"bAn.g banGhtml"
-* (name-for-url (parse-urlstring "http://www.foo.com/blah/bAn.g%20banG.html"))
-"bAn.g banG"
-||#
-
-(defmethod cliki-idf ((cliki cliki-instance) term)
-  (gethash term (slot-value cliki 'idf)))
-
-;;; XXX this doesnt give an entirely correct answer because it counts
-;;; aliases twice
-(defmethod cliki-number-of-documents ((cliki cliki-view))
-  (hash-table-count (cliki-pages cliki)))
-
-(defun update-idf (cliki)
-  "Update idf, using page-tf for each page and summing stuff.  page-tf
-is set by update-page-indices (at startup and after edits).  "
-  (let ((idf (make-hash-table :test 'equal)))
-    (loop for document being the hash-values of (cliki-pages cliki)
-	  do
-	  (let* ((frequencies (page-index document :tf))
-		 (terms (mapcar #'car frequencies)))
-	    (dolist (term terms)
-	      (let ((x (gethash term idf)))
-		(setf (gethash term idf) (1+ (or x 0)))))))
-    (setf (slot-value cliki 'idf) idf)))
-
-
-(defmethod cliki-load-page ((cliki cliki-instance) pathname)
-  (let* ((titles-f (merge-pathnames (make-pathname :type "titles") pathname))
-	 (titles (with-open-file (i titles-f :direction :input) (read i)))
-	 (meta (merge-pathnames (make-pathname :type "index") pathname))
-	 (versions
-	  (sort
-	   (remove-if #'zerop
-		      (mapcar
-		       (lambda (x)
-			 (or (parse-integer (or (pathname-type x) "")
-					    :junk-allowed t) 0))
-		       (directory
-			(make-pathname :type :wild :defaults pathname))))
-	   #'>))
-	 (page (find-page-or-placeholder cliki titles)))
-    (setf (page-versions page) (or versions (list 0))
-	  (page-pathname page) pathname)
-    (cond ((probe-file meta)
-	   ; ... do stuff to reload the index data
-	   )
-	  (t (update-page-indices cliki page)))
-    page))
-
-(defmethod shared-initialize
-    :after ((cliki cliki-instance) slot-names &rest initargs)
-    (declare (ignorable initargs))
-  (setf (cliki-data-directory cliki) (pathname (cliki-data-directory cliki)))
-  (let ((files (remove-if-not
-		#'pathname-name
-		(directory
-		 (merge-pathnames "*.titles"
-				  (cliki-data-directory cliki))))))
-    (let ((*default-pathname-defaults* (cliki-data-directory cliki)))
-      (dolist (f files)
-	(cliki-load-page
-	 cliki (merge-pathnames (make-pathname :name (pathname-name f))))
-	(format t "Loaded page ~A~%" f)))
-    (update-idf cliki)
-    (restore-recent-changes cliki)))
-
-(defmethod shared-initialize
-    :after ((cliki cliki-view) slot-names &rest initargs)
-  (declare (ignorable initargs))
-  (let ((edit-handler (make-instance 'edit-handler :cliki cliki)))
-    (install-handler cliki edit-handler "edit/" nil))
-
-  (install-handler cliki 'cliki-list-all-pages-handler "admin/all-pages" t)
-  (install-handler cliki
-		   (lambda (request)
-		     (request-send-headers request
-					   :content-type "text/css")
-		     (cliki-css-text cliki (request-stream request))
-		     t)
-		   "admin/cliki.css" t)
-
-  (install-handler cliki
-		   (lambda (request)
-		     (request-send-error request 404 "not found"))
-		   "favicon.ico" nil)
-  (install-handler cliki 'cliki-search-handler "admin/search" nil)
-  (install-handler cliki `(view-recent-changes) "Recent%20Changes" nil)
-  (install-handler cliki `(rdf-recent-changes) "recent-changes.rdf" t)
-  (install-handler cliki `(sexp-recent-changes) "recent-changes.sexp" t)
-  (install-handler cliki `(view-recent-changes) "Recent+Changes" nil))
-
-
-;; XXX is this reasonable?  I don't think so, really
-(defmethod handle-request-authentication ((handler cliki-view)
-					  method request)
-  (setf (request-user request) (request-cookie request "auth-username")))
-
-(defmethod request-cliki ((request request))
-  (labels ((find-handler (handlers)
-	     (cond ((null handlers) nil)
-		   ((typep (caar handlers) 'cliki-view)
-		    (caar handlers))
-		   (t (find-handler (cdr handlers))))))
-    (find-handler (request-handled-by request))))
-
-(defmethod handle-request :around ((handler cliki-view) request)
-  (handler-case
-      (call-next-method)
-    (http-error (c)
-      (request-send-headers request
-			    :response-code (http-error-code c)
-			    :response-text (http-error-message c) )
-      (with-page-surround (handler request (symbol-name (type-of c)))
-	(format cliki::out "~A" (http-error-client-message c)))
-      (signal 'response-sent))))
-
-(defmethod handle-request-response ((handler cliki-view)
-				    (method (eql :head))
-				    request )
-  (or
-   (call-next-method)
-   (multiple-value-bind (page title) (find-page-or-redirect handler request)
-     (cond
-       (page
-	(request-send-headers request :last-modified
-			      (page-last-modified page))
-	t)
-       (t nil)))))
-
-(defmethod handle-request-response ((handler cliki-view)
-				    (method (eql :get))
-				    request )
-  (or
-   (call-next-method)
-   (multiple-value-bind (page title) (find-page-or-redirect handler request)
-     (let* ((u (request-url request))
-	    (version (integer-for (car (url-query-param u "v"))
-				  :default :newest)))
-       (cond
-	 ((url-query-param u "source")
-	  (view-page-source request page title :version version))
-	 ((url-query-param u "download")
-	  (let ((d (and page (page-index page :package))))
-	    (when d
-	      (request-redirect
-	       request
-	       (merge-url (parse-urlstring "http://ww.telent.net/cclan/")
-			  (caar d)))
-	      t)))
-	 (t
-	  (view-page handler request page title :version version)))))))
-
-
diff --git a/cl-posix/cliki/cliki-net.lisp b/cl-posix/cliki/cliki-net.lisp
deleted file mode 100644
index 0d68443..0000000
--- a/cl-posix/cliki/cliki-net.lisp
+++ /dev/null
@@ -1,209 +0,0 @@
-(in-package :cliki)
-
-;;; once upon a time, cliki the engine was simply the code that runs
-;;; cliki the web site.  These days there are multiple users of cliki
-;;; the engine, and not all of them want our exact CSSified layout and
-;;; crass donation solicitation.
-
-(defclass cliki-net (cliki-instance) ())
-
-(defmethod cliki-css-text ((cliki cliki-net) stream)
-  (write-sequence "
-body
-{
-  background: white;
-  color: black;
-  font-family: serif;
-  margin: 0; padding: 0.5em;
-}
-
-h1, h2, h3, h4
-{
-  color: #999;
-  font-family: sans-serif;
-}
-h3 { font-weight: bold; font-size: 175%; }
-
-hr { border: 0; background: black; height: 1px }
-a.internal { color: #0077bb ; }
-a:visited.internal { color: #004488; }
-a.hyperspec { font-weight: bold; }
-
-a[href]:hover { background: #ff9 }
-
-table { border-collapse: collapse; border: 1px solid #aaa; }
-th
-{
-  font-family: sans-serif;
-  background: royalblue;
-  color: white;
-  text-transform: lowercase
-}
-th, td { padding: 0.2em 0.3em }
-
-ul li { list-style-type: square }
-
-pre
-{
-  background: #cdf;
-  border: 1px solid #679;
-  color: #235;
-  font-size: 90%;
-  padding: 0.3em;
-}
-
-/*
- * banner
- */
-#banner
-{
-  background: steelblue;
-  border: 1px solid black;
-  color: white;
-  margin: 0;  padding: 0.5em 0.5em 1.5em;
-}
-#banner a { color: white; font-weight: normal; text-decoration: none; padding: 0 }
-#banner a:hover { background: transparent; color: white }
-#banner a:hover.logo { text-decoration: none }
-#banner a.logo { font-family: serif; font-weight: bold; font-size: 250%; border-width: 0px }
-#banner a.logo .sub
-{
-  color: gold;
-  font-size: 90%;
-  position: relative; top: -0.3em;
-}
-
-.search
-{
-  float: right;
-  text-align: right;
-  padding:  1em 0 0;
-}
-.search input { border: 1px solid black }
-
-#navbar { margin: 1em 0 -0.5em 0 }
-#navbar a
-{
-  border: 1px solid gold;
-  border-width: 1px 0 1px 0;
-  font-size: 90%;
-  margin: 0 1em; padding: 0 0.2em
-}
-#navbar a:hover
-{
-  border: 1px solid white;
-  border-width: 1px 0 1px 0;
-}
-
-.lastedit
-{
-  color: gold;
-  float: right;
-  text-align: right;
-  text-transform: lowercase;
-  margin: 0; padding: 0
-}
-
-/*
- * content
- */
-#content
-{
-  clear: both;
-  margin: 0; padding: 0 1.5em;
-}
-
-/*
- * footer
- */
-#footer
-{
-  background: steelblue;
-  color: white;
-  border: 1px solid black;
-  font-family: sans-serif;
-  margin-top: 0.5em; padding: 0.5em;
-}
-#footer a[href] { color: gold; text-decoration: none }
-#footer a[href]:hover { background: transparent; color: gold }
-" stream))
-
-
-(defmethod cliki-page-surround  ((cliki cliki-net) request function
-				 &key title head)
-  (let* ((stream (request-stream request))
-	 (page (find-page cliki title))
-         (home (cliki-url-root cliki)))
-    (format stream
-	    "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">~%")
-    (labels ((ahref (l) (urlstring (merge-url home l))))
-      (html-stream
-       stream
-       `(html
-	 (head (title ,(format nil "CLiki : ~A" title))
-	       ,@head
-	       ((link :rel "alternate"
-		      :type "application/rss+xml"
-		      :title "Recent Changes"
-		      :href ,(ahref  "recent-changes.rdf")))
-	       ((link :rel "stylesheet" :href ,(ahref "admin/cliki.css"))))
-	 (body
-	  ((form  :action ,(ahref "admin/search"))
-	   ((div :id "banner")
-	    ((span :class "search")
-	     ((input :name "words" :size "30"))
-	     ((input :type "submit" :value "search")))
-	    ((a :title "CLiki home page" :class "logo" :href ,(ahref nil))
-	     "CL" ((span :class "sub") "iki"))
-	    "the common lisp wiki"
-	    (br)
-	    ((div :id "navbar")
-	     ((a :href ,(ahref (cliki-default-page-name cliki))) "Home")
-	     ((a :href ,(ahref "Recent%20Changes")) "Recent Changes")
-	     ((a :href ,(ahref "CLiki")) "About CLiki")
-	     ((a :href ,(ahref "Text%20Formatting")) "Text Formatting")
-	     ((a :onclick ,(format nil "if(name=window.prompt('New page name ([A-Za-z0-9 ])')) document.location='~a'+name ;return false;" (ahref "edit/" ))
-		 :href "#" )
-	      "Create New Page"))))
-	  (h1 ,title)
-	  ,function
-	  ,@(if page
-		  `(((div :id "footer")
-		     ((a :href
-			 ,(if page (format nil "edit/~A?v=~A"
-					   (urlstring-escape title)
-					   (request-for-version page request))
-			      (format nil "edit/~A"
-				      (urlstring-escape title))))
-		      "Edit page")
-		     " | "
-		     ((a :href ,(format nil "~A?source"
-					(urlstring-escape title)))
-		      "View source")
-		     " | Revisions: "
-		     ,@(version-links cliki page request)))
-
-		  '(((div :id "footer") (br))))
-	  (p "CLiki pages can be edited by anyone at any time.  Imagine a fearsomely comprehensive disclaimer of liability.  Now fear, comprehensively")
-	  ))))))
-
-(defparameter *blacklist* (cl-ppcre:create-scanner "interseo|transwell|navinic|activeshow|sba.com.cn|konseptech.com"))
-
-(defmethod check-page-save-allowed ((cliki cliki-net) page version user)
-  (call-next-method)
-  (when (string-prefix-p "A N Other" user)
-    (signal 'cliki-page-save-rejected "Anonymous posting is disabled.  Please provide a name (preferably your own"))
-  (let ((body (request-body *request*)))
-    (loop for (name value) in body
-	  for el =
-	  (and (eql (elt name 0) #\T) (digit-char-p (elt name 1))
-	       (parse-form-element-for-keyword
-		cliki *request* (intern value :keyword)
-		(parse-integer name :start 1 :junk-allowed t)))
-	  when (typep el 'string)
-	  do (if (cl-ppcre:scan *blacklist* el)
-		 (signal 'cliki-page-save-rejected "Internal error")))))
-
-
-
-
diff --git a/cl-posix/cliki/cliki-page-class.lisp b/cl-posix/cliki/cliki-page-class.lisp
deleted file mode 100644
index b39bcb0..0000000
--- a/cl-posix/cliki/cliki-page-class.lisp
+++ /dev/null
@@ -1,20 +0,0 @@
-(in-package :cliki)
-
-;;; XXX should initialize some of these to e.g. (list) or (make-hash-table)
-
-
-(defclass cliki-page ()
-  ((title :accessor page-title :initarg :title)
-   (names :accessor page-names :initarg :names)
-   (cliki :accessor page-cliki :initarg :cliki)
-   (versions :accessor page-versions :initarg :versions)
-   (indices :accessor page-indices :initarg :indices :initform nil)
-   (first-sentence :accessor page-first-sentence :initarg :sentence
-		   :initform nil)
-   (pathname :initarg :pathname)	;note no accessor
-   (backlinks :accessor page-backlinks :initform nil)
-   (topics :accessor page-topics :initform nil)
-   (last-modified :initform (get-universal-time))
-   ))
-
-
diff --git a/cl-posix/cliki/cliki-page.lisp b/cl-posix/cliki/cliki-page.lisp
deleted file mode 100644
index 3191c12..0000000
--- a/cl-posix/cliki/cliki-page.lisp
+++ /dev/null
@@ -1,105 +0,0 @@
-(in-package :cliki)
-
-(defmethod page-index ((page cliki-page) index)
-  (cdr (assoc index (page-indices page))))
-
-(defmethod page-pathname ((page cliki-page) &key (version :newest))
-  (let ((pathname (slot-value page 'pathname)))
-    (if pathname
-	(let ((newest (car (page-versions page))))
-	  (when (eql version :newest) (setf version newest))
-	  (if (zerop version)
-	      pathname
-	      (make-pathname :type (princ-to-string version)
-			     :defaults pathname)))
-	nil)))
-
-(defmethod (setf page-pathname) (value (page cliki-page))
-  (setf (slot-value page 'pathname) value))
-
-(defmethod googlable-version ((page cliki-page))
-  "The newest version which is more than 24 hours older than its successor.
-The successor of the latest version is the current time"
-  (block func
-    (let ((newer (get-universal-time)))
-      (dolist (v (page-versions page))
-	(let ((date (file-write-date (page-pathname page :version v))))
-	  (when (< date (- newer 86400)) (return-from func v))))
-      1)))
-
-(defmethod googlable-p ((page cliki-page) version)
-  (when (eql version :newest) (setf version (car (page-versions page))))
-  (and (page-pathname page)
-       (= version (googlable-version page))))
-
-
-
-;;; page last-modified times
-;;; (1) a slot in cliki-page stores the last time that it was updated
-;;; from within cliki
-;;; - P is edited => touch P
-;;; - P links to P' and P' is created => touch P
-;;; - P formerly linked to P' and now doesn't => touch P'
-;;; (2) if the page slot is out of date wrt the filesystem, update it
-
-(defmethod page-last-modified ((page cliki-page))
-  (let ((lm (slot-value page 'last-modified))
-	(d (aif (page-pathname page) (file-write-date it) 0)))
-    (max lm d)))
-
-(defmethod touch-page ((page cliki-page))
-  (setf (slot-value page 'last-modified) (get-universal-time)))
-
-
-
-(defmethod (setf page-index) (new-value (page cliki-page) index)
-  (setf (cdr (assoc index (page-indices page))) new-value))
-
-(defmethod page-tfidf ((page cliki-page))
-  (let ((cliki (page-cliki page)))
-    (loop for (term . frequency) in (page-index page :tf)
-	  collect (cons term
-			(* frequency (log (/ (cliki-number-of-documents cliki)
-					     (cliki-idf cliki term))))))))
-
-(defmethod page-url ((cliki cliki-view) (page cliki-page))
-  (merge-url (cliki-url-root cliki)
-	     (urlstring-escape (page-title page))))
-
-(defmethod page-summary ((cliki cliki-view) (page cliki-page) search-term)
-  (loop for i in (apply #'search-term-summary cliki page search-term)
-	append `(,i (br))))
-
-(defmethod print-object ((page cliki-page) stream)
-  (print-unreadable-object (page stream :type t :identity t)
-			   (princ (page-title page) stream)))
-
-(defun escape-for-filename (title)
-  (with-output-to-string (o)
-    (labels ((maybe-escape (char)
-	       (cond ((alphanumericp char) (princ char o))
-		     ((member char '(#\, #\! #\-)) (princ char o))
-		     (t (format o "=~X" (char-code char))))))
-      (map 'nil #'maybe-escape title))))
-
-(defun scan-stream (chars stream output dispatch)
-  (labels ((find-token (chars stream dispatch)
-	     (let* ((c1 (read-char stream)))
-	       (cons c1
-		     (dolist (possible chars)
-		       (when (eql c1 (car possible))
-			 (return
-			   (if (listp (cadr possible))
-			       (find-token
-				(cadr possible) stream dispatch)
-			       (let ((c2 (peek-char nil stream nil)))
-				 (when (eql c2 #\( )
-				   (funcall dispatch (cadr possible)
-					    (read-matched-parens stream))
-				   (throw 'matched nil)))))))))))
-    (handler-case
-	(loop
-	 (catch 'matched
-	   (dolist (i (find-token chars stream dispatch))
-	     (funcall output i))))
-      (end-of-file (c) (declare (ignore c)) nil))))
diff --git a/cl-posix/cliki/cliki-posix-page.lisp b/cl-posix/cliki/cliki-posix-page.lisp
deleted file mode 100644
index 588be2e..0000000
--- a/cl-posix/cliki/cliki-posix-page.lisp
+++ /dev/null
@@ -1,9 +0,0 @@
-(in-package :cliki)
-
-(defclass cliki-posix-page (cliki-page)
-  ((posix-type  :accessor page-posix-type :initarg :posix-type
-                :type (member :function :header))
-   (posix-name  :accessor page-posix-name :initarg :posix-name
-                :type string)))
-
-
diff --git a/cl-posix/cliki/cliki-request-class.lisp b/cl-posix/cliki/cliki-request-class.lisp
deleted file mode 100644
index 41d92c6..0000000
--- a/cl-posix/cliki/cliki-request-class.lisp
+++ /dev/null
@@ -1,6 +0,0 @@
-(in-package :cliki)
-
-;;; dead file
-
-(defclass cliki-request (request)
-  ((cliki :accessor request-cliki :initarg :cliki)))
diff --git a/cl-posix/cliki/cliki-request.lisp b/cl-posix/cliki/cliki-request.lisp
deleted file mode 100644
index 89cb8a7..0000000
--- a/cl-posix/cliki/cliki-request.lisp
+++ /dev/null
@@ -1,39 +0,0 @@
-(in-package :cliki)
-(defmethod cliki-default-page-name ((cliki cliki-view)) nil "index")
-(defmethod find-page-or-redirect ((cliki cliki-view)
-				  (request request))
-  (let* ((search-string (name-for-url (request-url request)))
-	 (query (url-query (request-url request)))
-         (actual (find-page cliki search-string)))
-    (cond
-      ((not actual)			; no page found
-       (values nil search-string))
-      ((string= search-string (page-title actual)) ;same name
-       (values actual (page-title actual)))
-      (t				;other name, redirect the browser
-       (request-redirect request
-			 (merge-url
-			  (page-url cliki actual)
-			  (if query (format nil "?~A" query) "")))
-       (signal 'response-sent)))))
-
-;; user is some kind of object which represents a user.  If your cliki-instance
-;; subclass makes it anything other than a string, it needs to provide
-;; methods for these
-(defgeneric cliki-user-name (cliki user))
-(defmethod cliki-user-name ((cliki cliki-view) user)
-  user)
-
-(defgeneric cliki-user-cookie (cliki user))
-(defmethod cliki-user-cookie ((cliki cliki-view) user)
-  (format nil "username=~A; path=~A; expires=~A; domain=~A"
-	  (urlstring-escape (cliki-user-name cliki user))
-	  (url-path (cliki-url-root cliki))
-	  "Sun, 01-Jun-2036 00:00:01 GMT"
-	  (url-host (cliki-url-root cliki))))
-
-(defmethod cliki-user-cookie ((cliki cliki-view) (user (eql nil)))
-  (format nil "username=; path=~A; expires=~A; domain=~A"
-	  (url-path (cliki-url-root cliki))
-	  "Mon, 32-Jul-2001 00:00:01 GMT"
-	  (url-host (cliki-url-root cliki))))
diff --git a/cl-posix/cliki/cliki-skin.lisp b/cl-posix/cliki/cliki-skin.lisp
deleted file mode 100644
index 8d09d4d..0000000
--- a/cl-posix/cliki/cliki-skin.lisp
+++ /dev/null
@@ -1,22 +0,0 @@
-(in-package :cliki)
-
-(defclass cliki-skin (cliki-view)
-  ((real-cliki :initarg :real-cliki :reader skin-real-cliki)))
-
-;;; we don't provide cliki-data-directory, as it's only used by save-pages,
-;;; so we've delegated that at a higher level
-
-(defmacro defdelegate (form name ((instance class) &rest args))
-  `(,form ,name ((,instance ,class) ,@args)
-	  (,name (skin-real-cliki ,instance) ,@args)))
-
-;; note that this means
-;; (not (eq (page-cliki (find-page skin "index")) skin))
-(defdelegate defmethod cliki-pages ((cliki cliki-skin)))
-
-(defdelegate defmethod cliki-recent-changes ((cliki cliki-skin)))
-(defdelegate defmethod cliki-idf ((cliki cliki-skin) term))
-(defdelegate defmethod cliki-short-forms ((cliki cliki-skin) ))
-
-(defmethod save-page ((cliki cliki-skin) request &optional title)
-  (save-page (skin-real-cliki cliki) request title))
\ No newline at end of file
diff --git a/cl-posix/cliki/cliki.asd b/cl-posix/cliki/cliki.asd
deleted file mode 100644
index f777d42..0000000
--- a/cl-posix/cliki/cliki.asd
+++ /dev/null
@@ -1,56 +0,0 @@
-;;; -*- Lisp -*-
-(defpackage :cliki-system (:use #:cl #:asdf))
-(in-package :cliki-system)
-
-(defsystem cliki
-  :depends-on (ARANEIDA net-telent-date xmls diff cl-ppcre)
-  :version "0.4.4"
-  :components ((:file "defpackage")
-	       (:file "utilities" :depends-on ("defpackage"))
-	       (:file "cliki-instance-class" :depends-on ("defpackage"))
-	       (:file "cliki-instance" :depends-on
-		      ("utilities" "cliki-instance-class"))
-	       (:file "cliki-page-class" :depends-on ("defpackage"))
-	       (:file "cliki-page" :depends-on ("cliki-page-class" "cliki-instance-class" "utilities"))
-	       (:file "cliki-request-class" :depends-on ("defpackage"))
-	       (:file "cliki-request" :depends-on
-		      ("cliki-instance-class" "cliki-request-class"))
-	       (:file "edit-handler-class"
-		      :depends-on ("defpackage" "utilities" "recent-changes"))
-	       (:file "edit-handler" :depends-on ("cliki-request-class"
-						  "cliki-page-class"
-						  "view"
-						  "edit-handler-class"))
-	       (:file "authed-cliki-class" :depends-on ("cliki-instance"
-							"edit-handler"))
-	       (:file "authed-cliki" :depends-on ("authed-cliki-class"))
-	       (:file "index"
-		      :depends-on ("cliki-page" "cliki-instance"
-						"cliki-request"))
-	       (:file "hyperspec" :depends-on ("defpackage"))
-               ;(:file "link-checker") :depends-on ("indexing"))
-               (:file "view" :depends-on
-		      ("hyperspec" "utilities" "cliki-request"))
-               (:file "recent-changes"
-		      :depends-on ("view" "cliki-instance"  "cliki-request"))
-	       (:file "view-source"
-		      :depends-on ("cliki-instance" "cliki-request"))
-               (:file "buffered-output-stream-class"
-		      :depends-on ("defpackage"))
-	       (:file "buffered-output-stream" :depends-on
-		      ("buffered-output-stream-class"))
-               (:file "elided-stream" :depends-on ("buffered-output-stream"))
-	       (:file "strip-html-stream" :depends-on ("buffered-output-stream"))
-               (:file "search" :depends-on ("index" "elided-stream" "strip-html-stream"))
-               (:file "handlers" :depends-on
-                      ("view" "utilities" "index" "view-source" "search"))
-	       (:file "cliki-skin" :depends-on ("cliki-instance-class"))
-	       (:file "cliki-net"  :depends-on ("cliki-instance"))
-	       (:file "versions" :depends-on ("defpackage" "cliki-page"))
-	       (:static-file "example" :pathname "example.lisp")
-	       (:static-file "TODO")
-	       (:static-file "make-TODO" :pathname "make-TODO.pl")
-	       (:static-file "NEWS")
-	       (:static-file "README")))
-
-
diff --git a/cl-posix/cliki/clposixcliki.asd b/cl-posix/cliki/clposixcliki.asd
deleted file mode 100644
index 5b887f4..0000000
--- a/cl-posix/cliki/clposixcliki.asd
+++ /dev/null
@@ -1,70 +0,0 @@
-;;; -*- Lisp -*-
-(defpackage :cliki-system (:use #:common-lisp #:asdf))
-(in-package :cliki-system)
-
-(defsystem cliki
-  :depends-on (ARANEIDA net-telent-date xmls diff cl-ppcre)
-  :version "0.4.4"
-  :components
-  ((:file "defpackage")
-   (:file "utilities"
-    :depends-on ("defpackage"))
-   (:file "cliki-instance-class"
-    :depends-on ("defpackage"))
-   (:file "cliki-instance"
-    :depends-on ("utilities" "cliki-instance-class"))
-   (:file "cliki-page-class"
-    :depends-on ("defpackage"))
-   (:file "cliki-posix-page"
-    :depends-on ("defpackage" "cliki-page"))
-   (:file "cliki-page"
-    :depends-on ("cliki-page-class" "cliki-instance-class" "utilities"))
-   (:file "cliki-request-class"
-    :depends-on ("defpackage"))
-   (:file "cliki-request"
-    :depends-on
-    ("cliki-instance-class" "cliki-request-class"))
-   (:file "edit-handler-class"
-    :depends-on ("defpackage" "utilities" "recent-changes"))
-   (:file "edit-handler"
-    :depends-on ("view" "cliki-request-class" "cliki-page-class" "edit-handler-class"))
-   (:file "authed-cliki-class"
-    :depends-on ("cliki-instance" "edit-handler"))
-   (:file "authed-cliki"
-    :depends-on ("authed-cliki-class"))
-   (:file "index"
-    :depends-on ("cliki-page" "cliki-instance" "cliki-request"))
-   (:file "hyperspec"
-    :depends-on ("defpackage"))
-   ;;(:file "link-checker") depends-on ("indexing"))
-   (:file "view"
-    :depends-on ("hyperspec" "utilities" "cliki-request"))
-   (:file "recent-changes"
-    :depends-on ("view" "cliki-instance"  "cliki-request"))
-   (:file "view-source"
-    :depends-on ("cliki-instance" "cliki-request"))
-   (:file "buffered-output-stream-class"
-    :depends-on ("defpackage"))
-   (:file "buffered-output-stream"
-    :depends-on ("buffered-output-stream-class"))
-   (:file "elided-stream"
-    :depends-on ("buffered-output-stream"))
-   (:file "strip-html-stream"
-    :depends-on ("buffered-output-stream"))
-   (:file "search"
-    :depends-on ("index" "elided-stream" "strip-html-stream"))
-   (:file "handlers"
-    :depends-on ("view" "utilities" "index" "view-source" "search"))
-   (:file "cliki-skin"
-    :depends-on ("cliki-instance-class"))
-   (:file "cliki-net"
-    :depends-on ("cliki-instance"))
-   (:file "versions"
-    :depends-on ("defpackage" "cliki-page"))
-   (:static-file "example" :pathname "example.lisp")
-   (:static-file "TODO")
-   (:static-file "make-TODO" :pathname "make-TODO.pl")
-   (:static-file "NEWS")
-   (:static-file "README")))
-
-
diff --git a/cl-posix/cliki/date.lisp b/cl-posix/cliki/date.lisp
deleted file mode 100644
index 556b55d..0000000
--- a/cl-posix/cliki/date.lisp
+++ /dev/null
@@ -1,53 +0,0 @@
-(in-package :cliki)
-
-(defvar *daynames*
-  '((0 . "Monday")
-    (1 . "Tuesday")
-    (2 . "Wednesday")
-    (3 . "Thursday")
-    (4 . "Friday")
-    (5 . "Saturday")
-    (6 . "Sunday")))
-
-(defun dayname (stream arg colon-p at-p &optional width (mincol 0) (colinc 1) (minpad 0) (padchar #\Space))
-  "Print the day of the week (0=Sunday) corresponding to ARG on STREAM.  This is intended for embedding in a FORMAT directive: WIDTH governs the number of characters of text printed, MINCOL, COLINC, MINPAD, PADCHAR work as for ~A"
-  (let ((daystring (cdr (assoc (mod arg 7) *daynames*))))
-    (if (not daystring) (return-from dayname nil))
-    (let ((truncate (if width (min width (length daystring)) nil)))
-      (format stream
-              (if at-p "~V,V,V,V@A" "~V,V,V,VA")
-              mincol colinc minpad padchar
-              (subseq daystring 0 truncate)))))
-
-(defvar *monthnames*
-  '((1 . "January")
-    (2 . "February")
-    (3 . "March")
-    (4 . "April")
-    (5 . "May")
-    (6 . "June")
-    (7 . "July")
-    (8 . "August")
-    (9 . "September")
-    (10 . "October")
-    (11 . "November")
-    (12 . "December")))
-
-(defun monthname (stream arg colon-p at-p &optional width (mincol 0) (colinc 1) (minpad 0) (padchar #\Space))
-  "Print the name of the month (1=January) corresponding to ARG on STREAM.  This is intended for embedding in a FORMAT directive: WIDTH governs the number of characters of text printed, MINCOL, COLINC, MINPAD, PADCHAR work as for ~A"
-  (let ((monthstring (cdr (assoc arg *monthnames*))))
-    (if (not monthstring) (return-from monthname nil))
-    (let ((truncate (if width (min width (length monthstring)) nil)))
-      (format stream
-              (if at-p "~V,V,V,V@A" "~V,V,V,VA")
-              mincol colinc minpad padchar
-              (subseq monthstring 0 truncate)))))
-
-(defmacro with-date (universal-time &body body)
-  `(multiple-value-bind
-       (second minute hour date month year day daylight-p zone)
-       (decode-universal-time ,universal-time)
-     (declare (ignorable second minute hour date month year day daylight-p zone))
-     ,@body))
-
-
diff --git a/cl-posix/cliki/defpackage.lisp b/cl-posix/cliki/defpackage.lisp
deleted file mode 100644
index afd3993..0000000
--- a/cl-posix/cliki/defpackage.lisp
+++ /dev/null
@@ -1,32 +0,0 @@
-(in-package :CL-USER)
-(defpackage "CLIKI"
-  (:export cliki-view-handler cliki-edit-handler cliki-instance cliki-view
-	   cliki-url-root
-	   with-page-surround
-	   cliki-css-text cliki-pages cliki-page-header cliki-page-footer
-	   cliki-user-name short-forms
-
-	   authed-cliki-handler authed-cliki-edit-handler
-
-	   write-a-href request-cliki cliki-data-directory
-	   html-for-keyword form-element-for-keyword
-	   parse-form-element-for-keyword
-	   request-cliki cliki-default-page-name
-	   cliki-page find-page page-pathname
-	   compute-index-for-page add-to-index-for-page make-index-for-page
-	   search-term-relevance search-term-summary
-	   edit-handler
-
-	   check-page-save-allowed cliki-page-save-rejected
-
-	   elided-stream)
-
-  (:import-from #+sbcl "SB-GRAY" #+cmu "EXT"
-                "FUNDAMENTAL-CHARACTER-OUTPUT-STREAM")
-  (:use "NET.TELENT.DATE" "COMMON-LISP" "SB-GRAY" "ARANEIDA" "SB-BSD-SOCKETS"))
-
-;;; language for inline searches and stuff
-(defpackage "CLIKI-PAGES" (:use #| nil |# ))
-
-;;; used for collection of markup routines
-(defpackage "CLIKI-HTML")
diff --git a/cl-posix/cliki/edit-handler-class.lisp b/cl-posix/cliki/edit-handler-class.lisp
deleted file mode 100644
index 3fc6662..0000000
--- a/cl-posix/cliki/edit-handler-class.lisp
+++ /dev/null
@@ -1,5 +0,0 @@
-(in-package :cliki)
-
-(defclass edit-handler (handler)
-  ((cliki :accessor handler-cliki :initarg :cliki)))
-
diff --git a/cl-posix/cliki/edit-handler.lisp b/cl-posix/cliki/edit-handler.lisp
deleted file mode 100644
index cd177a4..0000000
--- a/cl-posix/cliki/edit-handler.lisp
+++ /dev/null
@@ -1,231 +0,0 @@
-(in-package :cliki)
-
-(define-condition cliki-page-save-rejected (http-internal-server-error)
-  ((reason :initarg :reason :reader rejected-reason)))
-
-(defmethod form-element-for-keyword ((cliki cliki-view) n keyword &rest args)
-  (declare (ignore args))
-  nil)
-
-(defmethod parse-form-element-for-keyword
-    ((cliki cliki-view) request keyword prefix)
-  (format *trace-output* "~A => ~A~%"
-	  keyword (body-params (format nil "Eb~A" prefix)
-			       (request-body request)))
-  "dummy")
-
-(defmethod parse-form-element-for-keyword
-    ((cliki cliki-view) request (keyword (eql :body)) prefix)
-  (body-param (format nil "E~A" prefix) (request-body request)))
-
-(defun write-page-form-to-stream (cliki in-stream stream)
-  "Read the file for PAGE and write to STREAM, substituting weird markup language elements as we go. "
-  (let ((element-num 0)
-	(acc-stream (make-string-output-stream)))
-    (labels ((dispatch (token arg)
-	       (let* ((l (long-form-for token arg))
-		      (s (apply #'form-element-for-keyword
-				cliki  element-num l)))
-		 (cond
-		   (s (end-text)
-		      (format stream "<INPUT type=hidden name=T~A value=~A>~%"
-			      element-num (car l))
-		      (write-sequence (apply #'form-element-for-keyword
-					     cliki  element-num l)
-				      stream)
-		      (incf element-num))
-		   (t (let* ((*package* (find-package :keyword))
-			     (short (find token (cliki-short-forms cliki)
-					  :key #'cadr)))
-			(if short
-			    (format acc-stream "~A(~A)"
-				    (car short) (strip-outer-parens arg))
-			    (format acc-stream ":(~A ~S)"
-				    token (strip-outer-parens arg))))))))
-	     (end-text ()
-	       (let* ((buf (get-output-stream-string acc-stream))
-		      (cr (count #\Newline buf)))
-		 (when (> (count-if #'graphic-char-p buf) 0)
-		   (format stream "<INPUT type=hidden name=T~A value=BODY>~%"
-			   element-num)
-		   (format stream "<TEXTAREA rows=~A cols=80 name=E~A>~%"
-			   (min 15 (floor (* cr 1.5))) element-num)
-		   (write-sequence buf stream)
-		   (format stream "</TEXTAREA>~%")
-		   (incf element-num) )))
-	     (output (c) (write-char c acc-stream)))
-      (scan-stream (cliki-short-forms cliki)
-		   in-stream
-		   #'output #'dispatch)
-      (end-text)
-      (close acc-stream))))
-
-(defmethod handle-request-response ((handler edit-handler)
-				    (method (eql :get))
-				    request )
-  (let* ((cliki (handler-cliki handler))
-	 (auth-username (cliki-user-name cliki (request-user request)))
-	 (v (or (parse-integer
-		 (or (car (url-query-param (request-url request) "v")) "")
-		 :junk-allowed t) :newest))
-	 (unauth-username (urlstring-unescape (request-cookie request "username"))))
-    (multiple-value-bind (page title) (find-page-or-redirect cliki request)
-      (if (< (length unauth-username) 1) (setf unauth-username nil))
-      (request-send-headers request
-			    :expires (get-universal-time)
-			    :cache-control "no-cache")
-      (with-page-surround (cliki request (format nil "Edit ``~A''" title)
-				 '(((meta :name "ROBOTS"
-				     :content "noindex,nofollow"))))
-	(format cliki::out "<form method=post>~%<input type=hidden name=version value=~A>~%" (if page (car (page-versions page)) 0))
-	(let ((default (format nil "<input type=hidden name=T0 value=BODY>
-<textarea wrap=virtual name=E0 rows=20 cols=80>
-Describe ~A here
-
-
-
-
-
-<hr>
-This page is presently *(Uncategorized): please add appropriate
-_(topic markers) and remove this text
-</textarea>" title)))
-	  (if (and page (page-pathname page))
-	      (with-open-file (in-stream (page-pathname page :version v)
-					 :direction :input)
-		(unless (or (eql v (car (page-versions page)))
-			    (eql v :newest))
-		  (html-stream cliki::out
-			       `(p "The text shown below is from a " (i "previous version") " of this page: saving your edits may overwrite changes made in more recent versions.  Please be sure this is what you want to do, or "
-				   ((a :href
-				       ,(urlstring
-					 (merge-url (cliki-url-root cliki)
-						    (format nil "edit/~A"
-							    (urlstring-escape title)))))
-				    "click here")
-				   " to recall the most recent version")))
-		(if (zerop (file-length in-stream))
-		    (write-sequence default out)
-		    (write-page-form-to-stream cliki in-stream out)))
-	      (write-sequence default out)))
-	(format out "<!-- /textarea-->
- <br>Please supply ~Aa summary of changes for the Recent Changes page.  If you are making a minor alteration to a page you recently edited, you can avoid making another Recent Changes entry by leaving the Summary box blank
- <br><b>Summary of changes:</b>
-  <input type=text size=60 name=summary value=\"\">"
-		(if (request-user request) "" "your name and " ))
-	(if (request-user request)
-	    (format out "<br><b>Your name:</b> <tt>~A</tt>
- <br><input type=submit value=Save name=Save></form></body></html>"
-		    auth-username)
-	    (format out
-		    "<br><b>Your name:</b>
-  <input type=text size=30 name=name value=~S>
- <br><input type=checkbox ~A name=rememberme > <b>Check this box to fill in your name automatically next time</b> (uses a cookie)
-  <br><input type=submit value=Save name=Save></form></body></html>"
-		    (or unauth-username "A N Other")
-		    (if unauth-username "checked=checked" "")))
-	(format out "<p><b>Please note:</b> other readers will see your changes immediately, but external search engines will continue to see the old version for another 24 hours.  Spamming this site to improve your PageRank is therefore a particularly fruitless activity.<p>")
-	(let ((topics (loop for p being the hash-values of
-			    (cliki-pages cliki)
-			    append (car (page-index p :topic)))))
-	  (format out "<small><b>Current <a href=\"~Atopic%20markers\">topic markers</a>:</b> ~{~A~^ | ~} </small>"
-		  (urlstring (cliki-url-root cliki))
-		  (mapcar
-		   (lambda (x) (write-a-href cliki x nil))
-		   (sort (remove-duplicates topics :test #'string-equal)
-			 #'string-lessp)))))
-      t)))
-
-(defun save-stream (cliki request pathname)
-  (with-open-file (out-file pathname :direction :output :if-exists :supersede)
-    (let ((body (request-body request)))
-      (loop for (name value) in body
-	    for el =
-	    (and (eql (elt name 0) #\T) (digit-char-p (elt name 1))
-		 (parse-form-element-for-keyword
-		  cliki request (intern value :keyword)
-		  (parse-integer name :start 1 :junk-allowed t)))
-	    when (typep el 'cons)
-	    do (with-standard-io-syntax  (format out-file "~&:~S" el))
-	    end
-	    when (typep el 'string)
-	    do (write-sequence el out-file)))))
-
-(defvar *request*)
-(defmethod save-page ((cliki cliki-instance) request &optional title)
-  (multiple-value-bind (page titl)
-      (find-page-or-redirect cliki request)
-    (labels ((title-file (n) (merge-pathnames
-			      (make-pathname :type "titles") n)))
-      (let* ((title (or title titl))
-	     (*default-pathname-defaults* (cliki-data-directory cliki))
-	     (body (request-body request))
-	     (summary (body-param "summary" body))
-	     (version (integer-for (body-param "version" body) ))
-	     (username (cliki-user-name
-			cliki (or (request-user request)
-				  (body-param "name" body)))))
-	(setf page
-	      (or page
-		  (make-instance 'cliki-page
-				 :title title :names (list title)
-				 :versions (list 0)
-				 :pathname
-				 (merge-pathnames (escape-for-filename title))
-				 :cliki cliki)))
-	(when (zerop (length summary)) (setf summary nil))
-	(when (or summary (not (can-save-as-version-p
-				cliki page version username)))
-	  (incf version)
-	  (setf summary (or summary "(none)")))
-	(let ((pn (page-pathname page :version version)))
-	  (let ((*request* request))
-	    (check-page-save-allowed cliki page version username))
-	  (unless pn			; set path if was a placeholder
-	    (setf pn (merge-pathnames (escape-for-filename title))
-		  (slot-value page 'pathname) pn))
-	  (save-stream cliki request pn)
-	  (with-open-file (out-file (title-file pn)  :direction :output
-				    :if-does-not-exist :create
-				    :if-exists :overwrite)
-	    (with-standard-io-syntax
-	      (write (page-names page) :stream out-file)))
-	  (when summary
-	    (add-recent-change cliki (get-universal-time) title
-			       username summary))
-	  (setf (gethash (canonise-title title) (cliki-pages cliki))
-		(cliki-load-page cliki pn)))
-	(update-idf cliki)
-	(loop for p being the hash-values of (cliki-pages cliki)
-	      do (touch-page p))
-	title))))
-
-(defmethod handle-request-response ((handler edit-handler)
-				    (method (eql :post))
-				    request )
-  (let* ((cliki (handler-cliki handler))
-	 title
-	 (out (request-stream request))
-	 (body (request-body request))
-	 (cookie nil))
-    (unless (request-user request)
-      (if (body-param "rememberme" body)
-	  (setf cookie (cliki-user-cookie
-			cliki (body-param "name" body)))
-	  (if (request-cookie request "username")
-	      ;; cookie previously set; seems reasonable that unticking the box
-	      ;; should be interpreted as a request to clear it
-	      (setf cookie (cliki-user-cookie cliki nil)))))
-    (handler-case
-	(setf title (save-page cliki request))
-      (file-error (c) (signal 'http-internal-server-error
-			      :client-message (format nil "~A" c))))
-    (request-send-headers request :set-cookie cookie)
-    (with-page-surround (cliki request "Thanks")
-      (format cliki::out "Thanks for editing ~A.  You probably need to `reload' or `refresh' to see your changes take effect"
-	      (format nil "<a href=\"~A\">~A</a>"
-		      (urlstring (merge-url
-				  (cliki-url-root cliki)
-				  (request-path-info request)))
-		      title)))
-    t))
diff --git a/cl-posix/cliki/elided-stream.lisp b/cl-posix/cliki/elided-stream.lisp
deleted file mode 100644
index a50e659..0000000
--- a/cl-posix/cliki/elided-stream.lisp
+++ /dev/null
@@ -1,130 +0,0 @@
-(in-package :cliki)
-
-;;; and given all that, here's the elided-stream.
-
-(defclass elided-stream (buffered-output-stream)
-  ((important-words :initarg :important-words
-		    :accessor elided-stream-important-words)
-   (context-characters :initarg :context-characters
-		       :initform 50
-		       :accessor elided-stream-context-characters)
-   (output-stream :initarg :output-stream
-		  :accessor elided-stream-output-stream)))
-
-(defun find-elision-boundary-backward (buffer index max)
-  (let* ((para (or (position #\Newline buffer
-			     :start (max 0 (- index max))
-			     :end index :from-end t) 0))
-	 (sentence (or (position #\. buffer
-				 :start (max 0 (- index max))
-				 :end index :from-end t) 0))
-	 (stop (max (- index max) para  sentence)))
-    (or (position-if-not #'word-char-p
-			 buffer :start (min (1+ stop) index) :end index)
-	stop)))
-
-(defun find-elision-boundary-forward (buffer index max)
-  (let* ((max (if (> (+ index max) (length buffer))
-		  (- (length buffer) index)
-		  max))
-	 (end (+ index max))
-	 (para (or (position #\Newline buffer :start index :end end) end))
-	 (sentence (or (position #\. buffer :start index :end end) end))
-	 (stop (min end para sentence)))
-    (or (position-if-not #'word-char-p
-			 buffer :start index :end  stop :from-end t)
-	stop)))
-
-(defmethod elided-stream-highlight-words ((stream elided-stream) start-index end-index words-start)
-  (let ((b (buffered-output-stream-buffer stream))
-	(max (elided-stream-context-characters stream))
-	(out-stream (elided-stream-output-stream stream)))
-    (write-sequence
-     b out-stream
-     :start
-     (loop for i in words-start
-	   for end = (position-if-not
-		      #'alphanumericp b :start i)
-	   and last-end =
-	   (find-elision-boundary-backward b (car words-start) max)
-	   then end
-	   do (progn
-		(write-sequence b out-stream :start last-end :end i)
-		(write-sequence "<b>" out-stream)
-		(write-sequence b out-stream :start i :end end)
-		(write-sequence "</b>" out-stream))
-	   finally (return end))
-     :end (find-elision-boundary-forward b (car (last words-start)) max))
-    nil))
-
-(defun search-word (word buffer start)
-  (let ((stem (stem-for-word word)))
-    (loop
-     (let* ((p (search stem buffer :start2 start :test #'char-equal) )
-	    (end (and p (position-if-not #'word-char-p buffer :start p))))
-       (if p
-	   (if (and
-		(or (< p 1) (not (word-char-p (elt buffer (1- p)))))
-		(equal stem (stem-for-word (subseq buffer p end))))
-	       (return-from search-word (values p  (+ p (length word))))
-	       (setf start (1+ p)))
-	   (return-from search-word nil))))))
-
-
-
-(defmethod buffered-output-stream-write-buffer ((stream elided-stream)
-						&optional force-p)
-  (let* ((b (buffered-output-stream-buffer stream))
-	 (out (elided-stream-output-stream stream))
-	 (words
-	  (remove-if-not (lambda (x) (> (length x) 0))
-			 (elided-stream-important-words stream)))
-	 (threshold (elided-stream-context-characters stream))
-	 (end-index 0)
-	 (start-index 0)
-	 interesting-indices iword next-iword)
-    (labels ((find-interesting-word (start)
-	       (unless (< start (length b))
-		 (return-from find-interesting-word nil))
-	       (loop for w in words
-		     for p = (search-word w b start)
-		     when p minimize p into min
-		     and collect t into foundp
-		     finally (return (and foundp min)))))
-      (loop
-       (setf iword (find-interesting-word end-index))
-       ;;(format t "iword  ~A ~A~%" iword (subseq b (- iword 8) (+ iword 8)))
-       (unless iword
-	 ;(format t "no iword in this block ~S~%" (subseq b end-index))
-	 (return (if force-p (length b) (- (length b) threshold))))
-       (setf start-index (- iword threshold)
-	     next-iword iword)
-       (setf interesting-indices (list next-iword))
-       (loop
-	(setf end-index (+ next-iword threshold)
-	      next-iword (find-interesting-word (1+ next-iword)))
-	(when (or (not next-iword)
-		  (> next-iword (+ threshold end-index))) ; sure?
-	  (return))
-       (push next-iword interesting-indices))
-       ;(format t "~&next-iword ~A start-index ~A~%" next-iword start-index)
-       (unless force-p
-	 (when (and next-iword
-		    (> next-iword (- (length b) threshold)))
-	   ;; there is another word, but it's too near the end to decide
-	   ;; whether to print it in the current batch, so wait for more data
-	   (return start-index)))
-       (format out " ... ")
-       (elided-stream-highlight-words stream start-index end-index
-				      (nreverse interesting-indices))
-       ))))
-
-
-#|
-(with-open-file (i "/var/www/cliki/cirCLe")
-  (let ((o (make-instance 'elided-stream :output-stream *standard-output*)))
-    (do ((c (read-char i nil nil)  (read-char i nil nil)))
-	((null c) nil)
-     (write-char (if (graphic-char-p c) c #\Space) o))
-    (close o)))
-|#
diff --git a/cl-posix/cliki/example.lisp b/cl-posix/cliki/example.lisp
deleted file mode 100644
index 82907b5..0000000
--- a/cl-posix/cliki/example.lisp
+++ /dev/null
@@ -1,22 +0,0 @@
-(defpackage "MY-CLIKI" (:use "CL" "ARANEIDA" "CLIKI" "SB-EXT"))
-(in-package :my-cliki)
-
-(defun my-fqdn ()
-  (sb-bsd-sockets:host-ent-name
-   (sb-bsd-sockets:get-host-by-name (machine-instance))))
-
-(defvar *url* (make-url :scheme "http" :host (my-fqdn)
-			:port 8000))
-(defvar *listener* (make-instance 'serve-event-http-listener
-				  :port (url-port *url*)))
-(defvar *cliki-instance* nil)
-(setf *cliki-instance*
-      (make-instance 'cliki::cliki-net
-                     :data-directory "/var/www/cliki/"
-                     :url-root (merge-url *url* "/cliki/")))
-(install-handler (http-listener-handler *listener*)
-		 *cliki-instance*
-		 (merge-url *url* "/cliki/") nil)
-(start-listening *listener*)
-
-
diff --git a/cl-posix/cliki/handlers.lisp b/cl-posix/cliki/handlers.lisp
deleted file mode 100644
index 983898e..0000000
--- a/cl-posix/cliki/handlers.lisp
+++ /dev/null
@@ -1,233 +0,0 @@
-(in-package :cliki)
-
-(defmethod cliki-css-text ((cliki cliki-view) stream)
-  (write-sequence "
-/*
- * cliki.css
- * toplevel cliki style sheet
- */
-
-/*
- * general styles
- */
-body
-{
-  background: white;
-  color: black;
-  font-family: serif;
-  margin: 0; padding: 0.5em;
-}
-
-h1, h2, h3, h4
-{
-  color: #999;
-  font-family: sans-serif;
-/*  text-transform: lowercase; */
-}
-h3 { font-weight: bold; font-size: 175%; }
-/*
-h1:before, h2:before, h3:before, h4:before { color: gold; content: '(' }
-h1:after, h2:after, h3:after, h4:after { color: gold; content: ')' }
-*/
-
-hr { border: 0; background: black; height: 1px }
-/* a { font-weight: bold; font-family: sans-serif; text-decoration: none } */
-/* a { color: blue } */
-a.internal { color: #0077bb ; }
-a:visited.internal { color: #004488; }
-a.hyperspec { font-weight: bold; }
-
-a[href]:hover { background: #ff9 }
-
-table { border-collapse: collapse; border: 1px solid #aaa; }
-th
-{
-  font-family: sans-serif;
-  background: royalblue;
-  color: white;
-  text-transform: lowercase
-}
-th, td { padding: 0.2em 0.3em }
-
-ul li { list-style-type: square }
-
-pre
-{
-  background: #cdf;
-  border: 1px solid #679;
-  color: #235;
-  font-size: 90%;
-  padding: 0.3em;
-}
-
-/*
- * banner
- */
-#banner
-{
-  background: steelblue;
-  border: 1px solid black;
-  color: white;
-  margin: 0; padding: 0.5em 0.5em 1.5em;
-}
-#banner a { color: white; font-weight: normal; text-decoration: none; padding: 0 }
-#banner a:hover { background: transparent; color: white }
-#banner a.logo { font-family: serif; font-weight: bold; font-size: 250% }
-#banner a.logo .sub
-{
-  color: gold;
-  font-size: 90%;
-  position: relative; top: -0.3em;
-}
-
-.search
-{
-/*   float: right; */
-  text-align: right;
-  text-transform: lowercase;
-}
-.search input { border: 1px solid black }
-
-#navbar { margin: 1em 0 -0.5em 0 }
-#navbar a
-{
-  border: 1px solid gold;
-  border-width: 1px 0 1px 0;
-  font-size: 90%;
-  margin: 0 1em; padding: 0 0.2em
-}
-#navbar a:hover
-{
-  border: 1px solid white;
-  border-width: 1px 0 1px 0;
-}
-
-.lastedit
-{
-  color: gold;
-  float: right;
-  text-align: right;
-  text-transform: lowercase;
-  margin: 0; padding: 0
-}
-
-/*
- * content
- */
-#content
-{
-  clear: both;
-  margin: 0; padding: 0 1.5em;
-}
-
-/*
- * footer
- */
-#footer
-{
-  background: steelblue;
-  color: white;
-  border: 1px solid black;
-  font-family: sans-serif;
-  margin-top: 0.5em; padding: 0.5em;
-}
-#footer a[href] { color: gold; text-decoration: none }
-#footer a[href]:hover { background: transparent; color: gold }
-.disclaimer { font-weight: bold }
-" stream))
-
-(defun cliki-list-all-pages-handler (request)
-  (let* ((cliki (request-cliki request))
-	 (pages (loop for p being the hash-values of
-		      (cliki-pages cliki)
-		      when (page-pathname p) collect p)))
-    (request-send-headers request)
-    (html-stream
-     (request-stream request)
-     `(html
-       (head (title "Cliki: All pages"))
-       (body
-	(h1 "All pages")
-	(ul
-	 ,(lambda (stream)
-		  (dolist (x pages)
-		    (html-stream
-		     stream
-		     `(li ((a :href
-			      ,(urlstring (page-url cliki x)))
-			   ,(page-title x))))))))))))
-
-(defun search-pages (cliki term)
-  (when term
-    (sort (loop for page being the hash-values of (cliki-pages cliki)
-		for relevance = (apply #'search-term-relevance cliki page term)
-		if (> relevance 0)
-		collect (cons page relevance))
-	  #'>
-	  :key #'cdr)))
-
-(defun complex-search-term (term)
-  (cond ((zerop (length term)) nil)
-	((eql (elt term 0) #\()
-	 (let ((*read-eval* nil)
-	       (*package* (find-package :keyword)))
-	   (ignore-errors
-	     (values (read-from-string
-		      (urlstring-unescape term))))))
-	(t `(:body ,term))))
-
-(defmethod format-search-relevance ((cliki cliki-view) relevance)
-  (format nil "(~,01F% relevant)" (* relevance 100)))
-
-(defun cliki-search-handler (request)
-  (let* ((url (request-url request))
-	 (cliki (request-cliki request))
-	 (term (car (url-query-param url  "words"))))
-    (multiple-value-bind (c-term error) (complex-search-term term)
-      (let* ((results (unless error (search-pages cliki c-term)))
-	     (start (parse-integer
-		     (or (car (url-query-param url "start"))
-			 "0") :junk-allowed t))
-	     (end (min (length results) (+ start 10)))
-	     (out (request-stream request)))
-	(request-send-headers request)
-	(with-page-surround (cliki request "Search results")
-	  (format out "<form action=\"~Aadmin/search\"> Search again: <input name=words size=60 value=~S></form>"
-		  (urlstring (cliki-url-root cliki))
-		  (html-escape
-		   (cond (error term)
-			 ((eql (car c-term) :body) (cadr c-term))
-			 (t (prin1-to-string c-term)))))
-	  (cond
-	    (error
-	     (format out "Sorry, your search term could not be read<pre>~A</pre>" (html-escape (princ-to-string error))))
-	    (results
-	     (search-results-blurb cliki out)
-	     (format out "<p>~A result~:p found, showing results ~A to ~A.  " (length results) (1+ start)  end )
-	     (loop for (name . rel) in (subseq results start end)
-		   for j from start to end
-		   do (format out "~&<p>~A <b><a href=\"~A\">~A</a></b> ~A<br>~A"
-			      (1+ j)
-			      (urlstring (page-url cliki name))
-			      (page-title name)
-			      (format-search-relevance cliki rel)
-			      (let ((s (page-summary cliki name c-term)))
-				(if s
-				    (html
-				     `((div :style "margin-top: -5px; margin-left: 5%; font-size: 80%")
-				       ,@s))
-				    ""))
-			      ))
-	     (print-page-selector
-	      (request-stream request) start 10 (length results)
-	      (format nil "~A?words=~A&start="
-		      (url-path url)
-		      (urlstring-escape
-		       (format nil "~S" c-term)))))
-	    (t (format out "Sorry, no pages match your search term."))))
-	t))))
-
-
-;; XXX is this used for anything?
-(defvar   *cliki-instance*)
-
diff --git a/cl-posix/cliki/hyperspec.lisp b/cl-posix/cliki/hyperspec.lisp
deleted file mode 100644
index 5e92eb5..0000000
--- a/cl-posix/cliki/hyperspec.lisp
+++ /dev/null
@@ -1,1057 +0,0 @@
-;;; hyperspec.lisp -- mappings from CL symbols to CLHS URLs
-;;
-;; Author: Eric Marsden <emarsden@laas.fr>
-;; Time-stamp: <2001-08-14 emarsden>
-;;
-;;
-;; The function HYPERSPEC-URL takes a string or a symbol designating a
-;; Common Lisp term, and returns an URL to a HyperSpec entry for that
-;; term, or NIL if the term is unknown.
-;;
-;; The alist contents are stolen from hyperspec.el by Erik Naggum.
-
-
-(in-package :cliki)
-
-
-(defparameter *hyperspec-base-url*
-  #+nil "http://www.xanalys.com/software_tools/reference/HyperSpec/Body/"
-  "http://www.lisp.org/HyperSpec/Body/")
-
-(defvar *hyperspec-filenames* (make-hash-table :test #'equal :size 100))
-
-(defvar *hyperspec-alist*
-	'(("&allow-other-keys" "sec_3-4-1.html")
-	  ("&aux" "sec_3-4-1.html")
-	  ("&body" "sec_3-4-4.html")
-	  ("&environment" "sec_3-4-4.html")
-	  ("&key" "sec_3-4-1.html")
-	  ("&optional" "sec_3-4-1.html")
-	  ("&rest" "sec_3-4-1.html")
-	  ("&whole" "sec_3-4-4.html")
-	  ("*" "fun_st.html")
-	  ("*" "var_stcm_ststcm_ststst.html")
-	  ("**" "var_stcm_ststcm_ststst.html")
-	  ("***" "var_stcm_ststcm_ststst.html")
-	  ("*break-on-signals*" "var_stbreak-on-signalsst.html")
-	  ("*compile-file-pathname*" "var_stcompile_e-truenamest.html")
-	  ("*compile-file-truename*" "var_stcompile_e-truenamest.html")
-	  ("*compile-print*" "var_stcompile_le-verbosest.html")
-	  ("*compile-verbose*" "var_stcompile_le-verbosest.html")
-	  ("*debug-io*" "var_stdebug-i_ace-outputst.html")
-	  ("*debugger-hook*" "var_stdebugger-hookst.html")
-	  ("*default-pathname-defaults*" "var_stdefault_e-defaultsst.html")
-	  ("*error-output*" "var_stdebug-i_ace-outputst.html")
-	  ("*features*" "var_stfeaturesst.html")
-	  ("*gensym-counter*" "var_stgensym-counterst.html")
-	  ("*load-pathname*" "var_stload-pa_d-truenamest.html")
-	  ("*load-print*" "var_stload-pr_ad-verbosest.html")
-	  ("*load-truename*" "var_stload-pa_d-truenamest.html")
-	  ("*load-verbose*" "var_stload-pr_ad-verbosest.html")
-	  ("*macroexpand-hook*" "var_stmacroexpand-hookst.html")
-	  ("*modules*" "var_stmodulesst.html")
-	  ("*package*" "var_stpackagest.html")
-	  ("*print-array*" "var_stprint-arrayst.html")
-	  ("*print-base*" "var_stprint-b_rint-radixst.html")
-	  ("*print-case*" "var_stprint-casest.html")
-	  ("*print-circle*" "var_stprint-circlest.html")
-	  ("*print-escape*" "var_stprint-escapest.html")
-	  ("*print-gensym*" "var_stprint-gensymst.html")
-	  ("*print-length*" "var_stprint-l_int-lengthst.html")
-	  ("*print-level*" "var_stprint-l_int-lengthst.html")
-	  ("*print-lines*" "var_stprint-linesst.html")
-	  ("*print-miser-width*" "var_stprint-miser-widthst.html")
-	  ("*print-pprint-dispatch*" "var_stprint-p_t-dispatchst.html")
-	  ("*print-pretty*" "var_stprint-prettyst.html")
-	  ("*print-radix*" "var_stprint-b_rint-radixst.html")
-	  ("*print-readably*" "var_stprint-readablyst.html")
-	  ("*print-right-margin*" "var_stprint-right-marginst.html")
-	  ("*query-io*" "var_stdebug-i_ace-outputst.html")
-	  ("*random-state*" "var_strandom-statest.html")
-	  ("*read-base*" "var_stread-basest.html")
-	  ("*read-default-float-format*" "var_stread-de_oat-formatst.html")
-	  ("*read-eval*" "var_stread-evalst.html")
-	  ("*read-suppress*" "var_stread-suppressst.html")
-	  ("*readtable*" "var_streadtablest.html")
-	  ("*standard-input*" "var_stdebug-i_ace-outputst.html")
-	  ("*standard-output*" "var_stdebug-i_ace-outputst.html")
-	  ("*terminal-io*" "var_stterminal-iost.html")
-	  ("*trace-output*" "var_stdebug-i_ace-outputst.html")
-	  ("+" "fun_pl.html")
-	  ("+" "var_plcm_plplcm_plplpl.html")
-	  ("++" "var_plcm_plplcm_plplpl.html")
-	  ("+++" "var_plcm_plplcm_plplpl.html")
-	  ("-" "fun_-.html")
-	  ("-" "var_-.html")
-	  ("/" "fun_sl.html")
-	  ("/" "var_slcm_slslcm_slslsl.html")
-	  ("//" "var_slcm_slslcm_slslsl.html")
-	  ("///" "var_slcm_slslcm_slslsl.html")
-	  ("/=" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  ("1+" "fun_1plcm_1-.html")
-	  ("1-" "fun_1plcm_1-.html")
-	  ("<" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  ("<=" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  ("=" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  (">" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  (">=" "fun_eqcm_sleq__lteqcm_gteq.html")
-	  ("abort" "fun_abortcm_c_cm_use-value.html")
-	  ("abort" "res_abort.html")
-	  ("abs" "fun_abs.html")
-	  ("acons" "fun_acons.html")
-	  ("acos" "fun_asincm_acoscm_atan.html")
-	  ("acosh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("add-method" "stagenfun_add-method.html")
-	  ("adjoin" "fun_adjoin.html")
-	  ("adjust-array" "fun_adjust-array.html")
-	  ("adjustable-array-p" "fun_adjustable-array-p.html")
-	  ("allocate-instance" "stagenfun_all_ate-instance.html")
-	  ("alpha-char-p" "fun_alpha-char-p.html")
-	  ("alphanumericp" "fun_alphanumericp.html")
-	  ("and" "mac_and.html")
-	  ("and" "typspe_and.html")
-	  ("append" "fun_append.html")
-	  ("apply" "fun_apply.html")
-	  ("apropos" "fun_aproposcm_apropos-list.html")
-	  ("apropos-list" "fun_aproposcm_apropos-list.html")
-	  ("aref" "acc_aref.html")
-	  ("arithmetic-error" "contyp_arithmetic-error.html")
-	  ("arithmetic-error-operands" "fun_arithmeti_or-operation.html")
-	  ("arithmetic-error-operation" "fun_arithmeti_or-operation.html")
-	  ("array" "syscla_array.html")
-	  ("array-dimension" "fun_array-dimension.html")
-	  ("array-dimension-limit" "convar_array-_ension-limit.html")
-	  ("array-dimensions" "fun_array-dimensions.html")
-	  ("array-displacement" "fun_array-displacement.html")
-	  ("array-element-type" "fun_array-element-type.html")
-	  ("array-has-fill-pointer-p" "fun_array-has_ll-pointer-p.html")
-	  ("array-in-bounds-p" "fun_array-in-bounds-p.html")
-	  ("array-rank" "fun_array-rank.html")
-	  ("array-rank-limit" "convar_array-rank-limit.html")
-	  ("array-row-major-index" "fun_array-row-major-index.html")
-	  ("array-total-size" "fun_array-total-size.html")
-	  ("array-total-size-limit" "convar_array-_l-size-limit.html")
-	  ("arrayp" "fun_arrayp.html")
-	  ("ash" "fun_ash.html")
-	  ("asin" "fun_asincm_acoscm_atan.html")
-	  ("asinh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("assert" "mac_assert.html")
-	  ("assoc" "fun_assoccm_a_assoc-if-not.html")
-	  ("assoc-if" "fun_assoccm_a_assoc-if-not.html")
-	  ("assoc-if-not" "fun_assoccm_a_assoc-if-not.html")
-	  ("atan" "fun_asincm_acoscm_atan.html")
-	  ("atanh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("atom" "fun_atom.html")
-	  ("atom" "typ_atom.html")
-	  ("base-char" "typ_base-char.html")
-	  ("base-string" "typ_base-string.html")
-	  ("bignum" "typ_bignum.html")
-	  ("bit" "acc_bitcm_sbit.html")
-	  ("bit" "typ_bit.html")
-	  ("bit-and" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-andc1" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-andc2" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-eqv" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-ior" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-nand" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-nor" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-not" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-orc1" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-orc2" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("bit-vector" "syscla_bit-vector.html")
-	  ("bit-vector-p" "fun_bit-vector-p.html")
-	  ("bit-xor" "fun_bit-andcm_c2cm_bit-xor.html")
-	  ("block" "speope_block.html")
-	  ("boole" "fun_boole.html")
-	  ("boole-1" "convar_boole-_cm_boole-xor.html")
-	  ("boole-2" "convar_boole-_cm_boole-xor.html")
-	  ("boole-and" "convar_boole-_cm_boole-xor.html")
-	  ("boole-andc1" "convar_boole-_cm_boole-xor.html")
-	  ("boole-andc2" "convar_boole-_cm_boole-xor.html")
-	  ("boole-c1" "convar_boole-_cm_boole-xor.html")
-	  ("boole-c2" "convar_boole-_cm_boole-xor.html")
-	  ("boole-clr" "convar_boole-_cm_boole-xor.html")
-	  ("boole-eqv" "convar_boole-_cm_boole-xor.html")
-	  ("boole-ior" "convar_boole-_cm_boole-xor.html")
-	  ("boole-nand" "convar_boole-_cm_boole-xor.html")
-	  ("boole-nor" "convar_boole-_cm_boole-xor.html")
-	  ("boole-orc1" "convar_boole-_cm_boole-xor.html")
-	  ("boole-orc2" "convar_boole-_cm_boole-xor.html")
-	  ("boole-set" "convar_boole-_cm_boole-xor.html")
-	  ("boole-xor" "convar_boole-_cm_boole-xor.html")
-	  ("boolean" "typ_boolean.html")
-	  ("both-case-p" "fun_upper-cas__both-case-p.html")
-	  ("boundp" "fun_boundp.html")
-	  ("break" "fun_break.html")
-	  ("broadcast-stream" "syscla_broadcast-stream.html")
-	  ("broadcast-stream-streams" "fun_broadcast_ream-streams.html")
-	  ("built-in-class" "syscla_built-in-class.html")
-	  ("butlast" "fun_butlastcm_nbutlast.html")
-	  ("byte" "fun_bytecm_by_yte-position.html")
-	  ("byte-position" "fun_bytecm_by_yte-position.html")
-	  ("byte-size" "fun_bytecm_by_yte-position.html")
-	  ("caaaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caaadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caadar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caaddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cadaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cadadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cadar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caddar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cadddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("caddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("call-arguments-limit" "convar_call-a_uments-limit.html")
-	  ("call-method" "locmac_call-m__make-method.html")
-	  ("call-next-method" "locfun_call-next-method.html")
-	  ("car" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("case" "mac_casecm_ccasecm_ecase.html")
-	  ("catch" "speope_catch.html")
-	  ("ccase" "mac_casecm_ccasecm_ecase.html")
-	  ("cdaaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdaadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdadar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdaddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cddaar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cddadr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cddar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdddar" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cddddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cddr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("cdr" "acc_carcm_cdr_darcm_cddddr.html")
-	  ("ceiling" "fun_floorcm_f_undcm_fround.html")
-	  ("cell-error" "contyp_cell-error.html")
-	  ("cell-error-name" "fun_cell-error-name.html")
-	  ("cerror" "fun_cerror.html")
-	  ("change-class" "stagenfun_change-class.html")
-	  ("char" "acc_charcm_schar.html")
-	  ("char-code" "fun_char-code.html")
-	  ("char-code-limit" "convar_char-code-limit.html")
-	  ("char-downcase" "fun_char-upca_har-downcase.html")
-	  ("char-equal" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-greaterp" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-int" "fun_char-int.html")
-	  ("char-lessp" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-name" "fun_char-name.html")
-	  ("char-not-equal" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-not-greaterp" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-not-lessp" "fun_chareqcm__ar-not-lessp.html")
-	  ("char-upcase" "fun_char-upca_har-downcase.html")
-	  ("char/=" "fun_chareqcm__ar-not-lessp.html")
-	  ("char<" "fun_chareqcm__ar-not-lessp.html")
-	  ("char<=" "fun_chareqcm__ar-not-lessp.html")
-	  ("char=" "fun_chareqcm__ar-not-lessp.html")
-	  ("char>" "fun_chareqcm__ar-not-lessp.html")
-	  ("char>=" "fun_chareqcm__ar-not-lessp.html")
-	  ("character" "fun_character.html")
-	  ("character" "syscla_character.html")
-	  ("characterp" "fun_characterp.html")
-	  ("check-type" "mac_check-type.html")
-	  ("cis" "fun_cis.html")
-	  ("class" "syscla_class.html")
-	  ("class-name" "stagenfun_class-name.html")
-	  ("class-of" "fun_class-of.html")
-	  ("clear-input" "fun_clear-input.html")
-	  ("clear-output" "fun_finish-ou_clear-output.html")
-	  ("close" "fun_close.html")
-	  ("clrhash" "fun_clrhash.html")
-	  ("code-char" "fun_code-char.html")
-	  ("coerce" "fun_coerce.html")
-	  ("compilation-speed" "dec_optimize.html")
-	  ("compile" "fun_compile.html")
-	  ("compile-file" "fun_compile-file.html")
-	  ("compile-file-pathname" "fun_compile-file-pathname.html")
-	  ("compiled-function" "typ_compiled-function.html")
-	  ("compiled-function-p" "fun_compiled-function-p.html")
-	  ("compiler-macro" "stagenfun_doc_umentationcp.html")
-	  ("compiler-macro-function" "acc_compiler-_cro-function.html")
-	  ("complement" "fun_complement.html")
-	  ("complex" "fun_complex.html")
-	  ("complex" "syscla_complex.html")
-	  ("complexp" "fun_complexp.html")
-	  ("compute-applicable-methods" "stagenfun_com_able-methods.html")
-	  ("compute-restarts" "fun_compute-restarts.html")
-	  ("concatenate" "fun_concatenate.html")
-	  ("concatenated-stream" "syscla_concatenated-stream.html")
-	  ("concatenated-stream-streams" "fun_concatena_ream-streams.html")
-	  ("cond" "mac_cond.html")
-	  ("condition" "contyp_condition.html")
-	  ("conjugate" "fun_conjugate.html")
-	  ("cons" "fun_cons.html")
-	  ("cons" "syscla_cons.html")
-	  ("consp" "fun_consp.html")
-	  ("constantly" "fun_constantly.html")
-	  ("constantp" "fun_constantp.html")
-	  ("continue" "fun_abortcm_c_cm_use-value.html")
-	  ("continue" "res_continue.html")
-	  ("control-error" "contyp_control-error.html")
-	  ("copy-alist" "fun_copy-alist.html")
-	  ("copy-list" "fun_copy-list.html")
-	  ("copy-pprint-dispatch" "fun_copy-pprint-dispatch.html")
-	  ("copy-readtable" "fun_copy-readtable.html")
-	  ("copy-seq" "fun_copy-seq.html")
-	  ("copy-structure" "fun_copy-structure.html")
-	  ("copy-symbol" "fun_copy-symbol.html")
-	  ("copy-tree" "fun_copy-tree.html")
-	  ("cos" "fun_sincm_coscm_tan.html")
-	  ("cosh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("count" "fun_countcm_c_count-if-not.html")
-	  ("count-if" "fun_countcm_c_count-if-not.html")
-	  ("count-if-not" "fun_countcm_c_count-if-not.html")
-	  ("ctypecase" "mac_typecasec_cm_etypecase.html")
-	  ("debug" "dec_optimize.html")
-	  ("decf" "mac_incfcm_decf.html")
-	  ("declaim" "mac_declaim.html")
-	  ("declaration" "dec_declaration.html")
-	  ("declare" "sym_declare.html")
-	  ("decode-float" "fun_decode-fl_decode-float.html")
-	  ("decode-universal-time" "fun_decode-universal-time.html")
-	  ("defclass" "mac_defclass.html")
-	  ("defconstant" "mac_defconstant.html")
-	  ("defgeneric" "mac_defgeneric.html")
-	  ("define-compiler-macro" "mac_define-compiler-macro.html")
-	  ("define-condition" "mac_define-condition.html")
-	  ("define-method-combination" "mac_define-me_-combination.html")
-	  ("define-modify-macro" "mac_define-modify-macro.html")
-	  ("define-setf-expander" "mac_define-setf-expander.html")
-	  ("define-symbol-macro" "mac_define-symbol-macro.html")
-	  ("defmacro" "mac_defmacro.html")
-	  ("defmethod" "mac_defmethod.html")
-	  ("defpackage" "mac_defpackage.html")
-	  ("defparameter" "mac_defparametercm_defvar.html")
-	  ("defsetf" "mac_defsetf.html")
-	  ("defstruct" "mac_defstruct.html")
-	  ("deftype" "mac_deftype.html")
-	  ("defun" "mac_defun.html")
-	  ("defvar" "mac_defparametercm_defvar.html")
-	  ("delete" "fun_removecm__elete-if-not.html")
-	  ("delete-duplicates" "fun_remove-du_e-duplicates.html")
-	  ("delete-file" "fun_delete-file.html")
-	  ("delete-if" "fun_removecm__elete-if-not.html")
-	  ("delete-if-not" "fun_removecm__elete-if-not.html")
-	  ("delete-package" "fun_delete-package.html")
-	  ("denominator" "fun_numerator__denominator.html")
-	  ("deposit-field" "fun_deposit-field.html")
-	  ("describe" "fun_describe.html")
-	  ("describe-object" "stagenfun_describe-object.html")
-	  ("destructuring-bind" "mac_destructuring-bind.html")
-	  ("digit-char" "fun_digit-char.html")
-	  ("digit-char-p" "fun_digit-char-p.html")
-	  ("directory" "fun_directory.html")
-	  ("directory-namestring" "fun_namestrin_h-namestring.html")
-	  ("disassemble" "fun_disassemble.html")
-	  ("division-by-zero" "contyp_division-by-zero.html")
-	  ("do" "mac_docm_dost.html")
-	  ("do*" "mac_docm_dost.html")
-	  ("do-all-symbols" "mac_do-symbol_-all-symbols.html")
-	  ("do-external-symbols" "mac_do-symbol_-all-symbols.html")
-	  ("do-symbols" "mac_do-symbol_-all-symbols.html")
-	  ("documentation" "stagenfun_doc_umentationcp.html")
-	  ("dolist" "mac_dolist.html")
-	  ("dotimes" "mac_dotimes.html")
-	  ("double-float" "typ_short-flo_m_long-float.html")
-	  ("double-float-epsilon" "convar_short-_tive-epsilon.html")
-	  ("double-float-negative-epsilon" "convar_short-_tive-epsilon.html")
-	  ("dpb" "fun_dpb.html")
-	  ("dribble" "fun_dribble.html")
-	  ("dynamic-extent" "dec_dynamic-extent.html")
-	  ("ecase" "mac_casecm_ccasecm_ecase.html")
-	  ("echo-stream" "syscla_echo-stream.html")
-	  ("echo-stream-input-stream" "fun_echo-stre_utput-stream.html")
-	  ("echo-stream-output-stream" "fun_echo-stre_utput-stream.html")
-	  ("ed" "fun_ed.html")
-	  ("eighth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("elt" "acc_elt.html")
-	  ("encode-universal-time" "fun_encode-universal-time.html")
-	  ("end-of-file" "contyp_end-of-file.html")
-	  ("endp" "fun_endp.html")
-	  ("enough-namestring" "fun_namestrin_h-namestring.html")
-	  ("ensure-directories-exist" "fun_ensure-di_tories-exist.html")
-	  ("ensure-generic-function" "fun_ensure-ge_ric-function.html")
-	  ("eq" "fun_eq.html")
-	  ("eql" "fun_eql.html")
-	  ("eql" "typspe_eql.html")
-	  ("equal" "fun_equal.html")
-	  ("equalp" "fun_equalp.html")
-	  ("error" "fun_error.html")
-	  ("error" "contyp_error.html")
-	  ("etypecase" "mac_typecasec_cm_etypecase.html")
-	  ("eval" "fun_eval.html")
-	  ("eval-when" "speope_eval-when.html")
-	  ("evenp" "fun_evenpcm_oddp.html")
-	  ("every" "fun_everycm_s_erycm_notany.html")
-	  ("exp" "fun_expcm_expt.html")
-	  ("export" "fun_export.html")
-	  ("expt" "fun_expcm_expt.html")
-	  ("extended-char" "typ_extended-char.html")
-	  ("fboundp" "fun_fboundp.html")
-	  ("fceiling" "fun_floorcm_f_undcm_fround.html")
-	  ("fdefinition" "acc_fdefinition.html")
-	  ("ffloor" "fun_floorcm_f_undcm_fround.html")
-	  ("fifth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("file-author" "fun_file-author.html")
-	  ("file-error" "contyp_file-error.html")
-	  ("file-error-pathname" "fun_file-error-pathname.html")
-	  ("file-length" "fun_file-length.html")
-	  ("file-namestring" "fun_namestrin_h-namestring.html")
-	  ("file-position" "fun_file-position.html")
-	  ("file-stream" "syscla_file-stream.html")
-	  ("file-string-length" "fun_file-string-length.html")
-	  ("file-write-date" "fun_file-write-date.html")
-	  ("fill" "fun_fill.html")
-	  ("fill-pointer" "acc_fill-pointer.html")
-	  ("find" "fun_findcm_fi__find-if-not.html")
-	  ("find-all-symbols" "fun_find-all-symbols.html")
-	  ("find-class" "acc_find-class.html")
-	  ("find-if" "fun_findcm_fi__find-if-not.html")
-	  ("find-if-not" "fun_findcm_fi__find-if-not.html")
-	  ("find-method" "stagenfun_find-method.html")
-	  ("find-package" "fun_find-package.html")
-	  ("find-restart" "fun_find-restart.html")
-	  ("find-symbol" "fun_find-symbol.html")
-	  ("finish-output" "fun_finish-ou_clear-output.html")
-	  ("first" "acc_firstcm_s_inthcm_tenth.html")
-	  ("fixnum" "typ_fixnum.html")
-	  ("flet" "speope_fletcm_scm_macrolet.html")
-	  ("float" "fun_float.html")
-	  ("float" "syscla_float.html")
-	  ("float-digits" "fun_decode-fl_decode-float.html")
-	  ("float-precision" "fun_decode-fl_decode-float.html")
-	  ("float-radix" "fun_decode-fl_decode-float.html")
-	  ("float-sign" "fun_decode-fl_decode-float.html")
-	  ("floating-point-inexact" "contyp_floati_oint-inexact.html")
-	  ("floating-point-invalid-operation" "contyp_floati_id-operation.html")
-	  ("floating-point-overflow" "contyp_floati_int-overflow.html")
-	  ("floating-point-underflow" "contyp_floati_nt-underflow.html")
-	  ("floatp" "fun_floatp.html")
-	  ("floor" "fun_floorcm_f_undcm_fround.html")
-	  ("fmakunbound" "fun_fmakunbound.html")
-	  ("force-output" "fun_finish-ou_clear-output.html")
-	  ("format" "fun_format.html")
-	  ("formatter" "mac_formatter.html")
-	  ("fourth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("fresh-line" "fun_terpricm_fresh-line.html")
-	  ("fround" "fun_floorcm_f_undcm_fround.html")
-	  ("ftruncate" "fun_floorcm_f_undcm_fround.html")
-	  ("ftype" "dec_ftype.html")
-	  ("funcall" "fun_funcall.html")
-	  ("function" "speope_function.html")
-	  ("function" "stagenfun_doc_umentationcp.html")
-	  ("function" "syscla_function.html")
-	  ("function-keywords" "stagenfun_fun_ion-keywords.html")
-	  ("function-lambda-expression" "fun_function-_a-expression.html")
-	  ("functionp" "fun_functionp.html")
-	  ("gcd" "fun_gcd.html")
-	  ("generic-function" "syscla_generic-function.html")
-	  ("gensym" "fun_gensym.html")
-	  ("gentemp" "fun_gentemp.html")
-	  ("get" "acc_get.html")
-	  ("get-decoded-time" "fun_get-unive_decoded-time.html")
-	  ("get-dispatch-macro-character" "fun_set-dispa_ro-character.html")
-	  ("get-internal-real-time" "fun_get-internal-real-time.html")
-	  ("get-internal-run-time" "fun_get-internal-run-time.html")
-	  ("get-macro-character" "fun_set-macro_ro-character.html")
-	  ("get-output-stream-string" "fun_get-outpu_tream-string.html")
-	  ("get-properties" "fun_get-properties.html")
-	  ("get-setf-expansion" "fun_get-setf-expansion.html")
-	  ("get-universal-time" "fun_get-unive_decoded-time.html")
-	  ("getf" "acc_getf.html")
-	  ("gethash" "acc_gethash.html")
-	  ("go" "speope_go.html")
-	  ("graphic-char-p" "fun_graphic-char-p.html")
-	  ("handler-bind" "mac_handler-bind.html")
-	  ("handler-case" "mac_handler-case.html")
-	  ("hash-table" "syscla_hash-table.html")
-	  ("hash-table-count" "fun_hash-table-count.html")
-	  ("hash-table-p" "fun_hash-table-p.html")
-	  ("hash-table-rehash-size" "fun_hash-table-rehash-size.html")
-	  ("hash-table-rehash-threshold" "fun_hash-tabl_sh-threshold.html")
-	  ("hash-table-size" "fun_hash-table-size.html")
-	  ("hash-table-test" "fun_hash-table-test.html")
-	  ("host-namestring" "fun_namestrin_h-namestring.html")
-	  ("identity" "fun_identity.html")
-	  ("if" "speope_if.html")
-	  ("ignorable" "dec_ignorecm_ignorable.html")
-	  ("ignore" "dec_ignorecm_ignorable.html")
-	  ("ignore-errors" "mac_ignore-errors.html")
-	  ("imagpart" "fun_realpartcm_imagpart.html")
-	  ("import" "fun_import.html")
-	  ("in-package" "mac_in-package.html")
-	  ("incf" "mac_incfcm_decf.html")
-	  ("initialize-instance" "stagenfun_ini_ize-instance.html")
-	  ("inline" "dec_inlinecm_notinline.html")
-	  ("input-stream-p" "fun_input-str_put-stream-p.html")
-	  ("inspect" "fun_inspect.html")
-	  ("integer" "syscla_integer.html")
-	  ("integer-decode-float" "fun_decode-fl_decode-float.html")
-	  ("integer-length" "fun_integer-length.html")
-	  ("integerp" "fun_integerp.html")
-	  ("interactive-stream-p" "fun_interactive-stream-p.html")
-	  ("intern" "fun_intern.html")
-	  ("internal-time-units-per-second" "convar_intern_s-per-second.html")
-	  ("intersection" "fun_intersect_intersection.html")
-	  ("invalid-method-error" "fun_invalid-method-error.html")
-	  ("invoke-debugger" "fun_invoke-debugger.html")
-	  ("invoke-restart" "fun_invoke-restart.html")
-	  ("invoke-restart-interactively" "fun_invoke-re_nteractively.html")
-	  ("isqrt" "fun_sqrtcm_isqrt.html")
-	  ("keyword" "typ_keyword.html")
-	  ("keywordp" "fun_keywordp.html")
-	  ("labels" "speope_fletcm_scm_macrolet.html")
-	  ("lambda" "mac_lambda.html")
-	  ("lambda" "sym_lambda.html")
-	  ("lambda-list-keywords" "convar_lambda_ist-keywords.html")
-	  ("lambda-parameters-limit" "convar_lambda_meters-limit.html")
-	  ("last" "fun_last.html")
-	  ("lcm" "fun_lcm.html")
-	  ("ldb" "acc_ldb.html")
-	  ("ldb-test" "fun_ldb-test.html")
-	  ("ldiff" "fun_ldiffcm_tailp.html")
-	  ("least-negative-double-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-long-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-normalized-double-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-normalized-long-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-normalized-short-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-normalized-single-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-short-float" "convar_most-p_d-long-float.html")
-	  ("least-negative-single-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-double-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-long-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-normalized-double-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-normalized-long-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-normalized-short-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-normalized-single-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-short-float" "convar_most-p_d-long-float.html")
-	  ("least-positive-single-float" "convar_most-p_d-long-float.html")
-	  ("length" "fun_length.html")
-	  ("let" "speope_letcm_letst.html")
-	  ("let*" "speope_letcm_letst.html")
-	  ("lisp-implementation-type" "fun_lisp-impl_tion-version.html")
-	  ("lisp-implementation-version" "fun_lisp-impl_tion-version.html")
-	  ("list" "fun_listcm_listst.html")
-	  ("list" "syscla_list.html")
-	  ("list*" "fun_listcm_listst.html")
-	  ("list-all-packages" "fun_list-all-packages.html")
-	  ("list-length" "fun_list-length.html")
-	  ("listen" "fun_listen.html")
-	  ("listp" "fun_listp.html")
-	  ("load" "fun_load.html")
-	  ("load-logical-pathname-translations" "fun_load-logi_translations.html")
-	  ("load-time-value" "speope_load-time-value.html")
-	  ("locally" "speope_locally.html")
-	  ("log" "fun_log.html")
-	  ("logand" "fun_logandcm__rc2cm_logxor.html")
-	  ("logandc1" "fun_logandcm__rc2cm_logxor.html")
-	  ("logandc2" "fun_logandcm__rc2cm_logxor.html")
-	  ("logbitp" "fun_logbitp.html")
-	  ("logcount" "fun_logcount.html")
-	  ("logeqv" "fun_logandcm__rc2cm_logxor.html")
-	  ("logical-pathname" "fun_logical-pathname.html")
-	  ("logical-pathname" "syscla_logical-pathname.html")
-	  ("logical-pathname-translations" "acc_logical-p_translations.html")
-	  ("logior" "fun_logandcm__rc2cm_logxor.html")
-	  ("lognand" "fun_logandcm__rc2cm_logxor.html")
-	  ("lognor" "fun_logandcm__rc2cm_logxor.html")
-	  ("lognot" "fun_logandcm__rc2cm_logxor.html")
-	  ("logorc1" "fun_logandcm__rc2cm_logxor.html")
-	  ("logorc2" "fun_logandcm__rc2cm_logxor.html")
-	  ("logtest" "fun_logtest.html")
-	  ("logxor" "fun_logandcm__rc2cm_logxor.html")
-	  ("long-float" "typ_short-flo_m_long-float.html")
-	  ("long-float-epsilon" "convar_short-_tive-epsilon.html")
-	  ("long-float-negative-epsilon" "convar_short-_tive-epsilon.html")
-	  ("long-site-name" "fun_short-sit_ng-site-name.html")
-	  ("loop" "mac_loop.html")
-	  ("loop-finish" "locmac_loop-finish.html")
-	  ("lower-case-p" "fun_upper-cas__both-case-p.html")
-	  ("machine-instance" "fun_machine-instance.html")
-	  ("machine-type" "fun_machine-type.html")
-	  ("machine-version" "fun_machine-version.html")
-	  ("macro-function" "acc_macro-function.html")
-	  ("macroexpand" "fun_macroexpa_acroexpand-1.html")
-	  ("macroexpand-1" "fun_macroexpa_acroexpand-1.html")
-	  ("macrolet" "speope_fletcm_scm_macrolet.html")
-	  ("make-array" "fun_make-array.html")
-	  ("make-broadcast-stream" "fun_make-broadcast-stream.html")
-	  ("make-concatenated-stream" "fun_make-conc_nated-stream.html")
-	  ("make-condition" "fun_make-condition.html")
-	  ("make-dispatch-macro-character" "fun_make-disp_ro-character.html")
-	  ("make-echo-stream" "fun_make-echo-stream.html")
-	  ("make-hash-table" "fun_make-hash-table.html")
-	  ("make-instance" "stagenfun_make-instance.html")
-	  ("make-instances-obsolete" "stagenfun_mak_ces-obsolete.html")
-	  ("make-list" "fun_make-list.html")
-	  ("make-load-form" "stagenfun_make-load-form.html")
-	  ("make-load-form-saving-slots" "fun_make-load_saving-slots.html")
-	  ("make-method" "locmac_call-m__make-method.html")
-	  ("make-package" "fun_make-package.html")
-	  ("make-pathname" "fun_make-pathname.html")
-	  ("make-random-state" "fun_make-random-state.html")
-	  ("make-sequence" "fun_make-sequence.html")
-	  ("make-string" "fun_make-string.html")
-	  ("make-string-input-stream" "fun_make-stri_input-stream.html")
-	  ("make-string-output-stream" "fun_make-stri_utput-stream.html")
-	  ("make-symbol" "fun_make-symbol.html")
-	  ("make-synonym-stream" "fun_make-synonym-stream.html")
-	  ("make-two-way-stream" "fun_make-two-way-stream.html")
-	  ("makunbound" "fun_makunbound.html")
-	  ("map" "fun_map.html")
-	  ("map-into" "fun_map-into.html")
-	  ("mapc" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("mapcan" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("mapcar" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("mapcon" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("maphash" "fun_maphash.html")
-	  ("mapl" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("maplist" "fun_mapccm_ma_istcm_mapcon.html")
-	  ("mask-field" "acc_mask-field.html")
-	  ("max" "fun_maxcm_min.html")
-	  ("member" "fun_membercm__ember-if-not.html")
-	  ("member" "typspe_member.html")
-	  ("member-if" "fun_membercm__ember-if-not.html")
-	  ("member-if-not" "fun_membercm__ember-if-not.html")
-	  ("merge" "fun_merge.html")
-	  ("merge-pathnames" "fun_merge-pathnames.html")
-	  ("method" "syscla_method.html")
-	  ("method-combination" "stagenfun_doc_umentationcp.html")
-	  ("method-combination" "syscla_method-combination.html")
-	  ("method-combination-error" "fun_method-co_nation-error.html")
-	  ("method-qualifiers" "stagenfun_met_d-qualifiers.html")
-	  ("min" "fun_maxcm_min.html")
-	  ("minusp" "fun_minuspcm_plusp.html")
-	  ("mismatch" "fun_mismatch.html")
-	  ("mod" "fun_modcm_rem.html")
-	  ("mod" "typspe_mod.html")
-	  ("most-negative-double-float" "convar_most-p_d-long-float.html")
-	  ("most-negative-fixnum" "convar_most-p_ative-fixnum.html")
-	  ("most-negative-long-float" "convar_most-p_d-long-float.html")
-	  ("most-negative-short-float" "convar_most-p_d-long-float.html")
-	  ("most-negative-single-float" "convar_most-p_d-long-float.html")
-	  ("most-positive-double-float" "convar_most-p_d-long-float.html")
-	  ("most-positive-fixnum" "convar_most-p_ative-fixnum.html")
-	  ("most-positive-long-float" "convar_most-p_d-long-float.html")
-	  ("most-positive-short-float" "convar_most-p_d-long-float.html")
-	  ("most-positive-single-float" "convar_most-p_d-long-float.html")
-	  ("muffle-warning" "fun_abortcm_c_cm_use-value.html")
-	  ("muffle-warning" "res_muffle-warning.html")
-	  ("multiple-value-bind" "mac_multiple-value-bind.html")
-	  ("multiple-value-call" "speope_multiple-value-call.html")
-	  ("multiple-value-list" "mac_multiple-value-list.html")
-	  ("multiple-value-prog1" "speope_multip_-value-prog1.html")
-	  ("multiple-value-setq" "mac_multiple-value-setq.html")
-	  ("multiple-values-limit" "convar_multip_values-limit.html")
-	  ("name-char" "fun_name-char.html")
-	  ("namestring" "fun_namestrin_h-namestring.html")
-	  ("nbutlast" "fun_butlastcm_nbutlast.html")
-	  ("nconc" "fun_nconc.html")
-	  ("next-method-p" "locfun_next-method-p.html")
-	  ("nil" "convar_nil.html")
-	  ("nil" "typ_nil.html")
-	  ("nintersection" "fun_intersect_intersection.html")
-	  ("ninth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("no-applicable-method" "stagenfun_no-_cable-method.html")
-	  ("no-next-method" "stagenfun_no-next-method.html")
-	  ("not" "fun_not.html")
-	  ("not" "typspe_not.html")
-	  ("notany" "fun_everycm_s_erycm_notany.html")
-	  ("notevery" "fun_everycm_s_erycm_notany.html")
-	  ("notinline" "dec_inlinecm_notinline.html")
-	  ("nreconc" "fun_revappendcm_nreconc.html")
-	  ("nreverse" "fun_reversecm_nreverse.html")
-	  ("nset-difference" "fun_set-diffe_t-difference.html")
-	  ("nset-exclusive-or" "fun_set-exclu_exclusive-or.html")
-	  ("nstring-capitalize" "fun_string-up_g-capitalize.html")
-	  ("nstring-downcase" "fun_string-up_g-capitalize.html")
-	  ("nstring-upcase" "fun_string-up_g-capitalize.html")
-	  ("nsublis" "fun_subliscm_nsublis.html")
-	  ("nsubst" "fun_substcm_s_subst-if-not.html")
-	  ("nsubst-if" "fun_substcm_s_subst-if-not.html")
-	  ("nsubst-if-not" "fun_substcm_s_subst-if-not.html")
-	  ("nsubstitute" "fun_substitut_itute-if-not.html")
-	  ("nsubstitute-if" "fun_substitut_itute-if-not.html")
-	  ("nsubstitute-if-not" "fun_substitut_itute-if-not.html")
-	  ("nth" "acc_nth.html")
-	  ("nth-value" "mac_nth-value.html")
-	  ("nthcdr" "fun_nthcdr.html")
-	  ("null" "fun_null.html")
-	  ("null" "syscla_null.html")
-	  ("number" "syscla_number.html")
-	  ("numberp" "fun_numberp.html")
-	  ("numerator" "fun_numerator__denominator.html")
-	  ("nunion" "fun_unioncm_nunion.html")
-	  ("oddp" "fun_evenpcm_oddp.html")
-	  ("open" "fun_open.html")
-	  ("open-stream-p" "fun_open-stream-p.html")
-	  ("optimize" "dec_optimize.html")
-	  ("or" "mac_or.html")
-	  ("or" "typspe_or.html")
-	  ("otherwise" "mac_casecm_ccasecm_ecase.html")
-	  ("output-stream-p" "fun_input-str_put-stream-p.html")
-	  ("package" "syscla_package.html")
-	  ("package-error" "contyp_package-error.html")
-	  ("package-error-package" "fun_package-error-package.html")
-	  ("package-name" "fun_package-name.html")
-	  ("package-nicknames" "fun_package-nicknames.html")
-	  ("package-shadowing-symbols" "fun_package-s_wing-symbols.html")
-	  ("package-use-list" "fun_package-use-list.html")
-	  ("package-used-by-list" "fun_package-used-by-list.html")
-	  ("packagep" "fun_packagep.html")
-	  ("pairlis" "fun_pairlis.html")
-	  ("parse-error" "contyp_parse-error.html")
-	  ("parse-integer" "fun_parse-integer.html")
-	  ("parse-namestring" "fun_parse-namestring.html")
-	  ("pathname" "fun_pathname.html")
-	  ("pathname" "syscla_pathname.html")
-	  ("pathname-device" "fun_pathname-_name-version.html")
-	  ("pathname-directory" "fun_pathname-_name-version.html")
-	  ("pathname-host" "fun_pathname-_name-version.html")
-	  ("pathname-match-p" "fun_pathname-match-p.html")
-	  ("pathname-name" "fun_pathname-_name-version.html")
-	  ("pathname-type" "fun_pathname-_name-version.html")
-	  ("pathname-version" "fun_pathname-_name-version.html")
-	  ("pathnamep" "fun_pathnamep.html")
-	  ("peek-char" "fun_peek-char.html")
-	  ("phase" "fun_phase.html")
-	  ("pi" "convar_pi.html")
-	  ("plusp" "fun_minuspcm_plusp.html")
-	  ("pop" "mac_pop.html")
-	  ("position" "fun_positionc_ition-if-not.html")
-	  ("position-if" "fun_positionc_ition-if-not.html")
-	  ("position-if-not" "fun_positionc_ition-if-not.html")
-	  ("pprint" "fun_writecm_p_rintcm_princ.html")
-	  ("pprint-dispatch" "fun_pprint-dispatch.html")
-	  ("pprint-exit-if-list-exhausted" "locmac_pprint_st-exhausted.html")
-	  ("pprint-fill" "fun_pprint-fi_rint-tabular.html")
-	  ("pprint-indent" "fun_pprint-indent.html")
-	  ("pprint-linear" "fun_pprint-fi_rint-tabular.html")
-	  ("pprint-logical-block" "mac_pprint-logical-block.html")
-	  ("pprint-newline" "fun_pprint-newline.html")
-	  ("pprint-pop" "locmac_pprint-pop.html")
-	  ("pprint-tab" "fun_pprint-tab.html")
-	  ("pprint-tabular" "fun_pprint-fi_rint-tabular.html")
-	  ("prin1" "fun_writecm_p_rintcm_princ.html")
-	  ("prin1-to-string" "fun_write-to-_nc-to-string.html")
-	  ("princ" "fun_writecm_p_rintcm_princ.html")
-	  ("princ-to-string" "fun_write-to-_nc-to-string.html")
-	  ("print" "fun_writecm_p_rintcm_princ.html")
-	  ("print-not-readable" "contyp_print-not-readable.html")
-	  ("print-not-readable-object" "fun_print-not_dable-object.html")
-	  ("print-object" "stagenfun_print-object.html")
-	  ("print-unreadable-object" "mac_print-unr_dable-object.html")
-	  ("probe-file" "fun_probe-file.html")
-	  ("proclaim" "fun_proclaim.html")
-	  ("prog" "mac_progcm_progst.html")
-	  ("prog*" "mac_progcm_progst.html")
-	  ("prog1" "mac_prog1cm_prog2.html")
-	  ("prog2" "mac_prog1cm_prog2.html")
-	  ("progn" "speope_progn.html")
-	  ("program-error" "contyp_program-error.html")
-	  ("progv" "speope_progv.html")
-	  ("provide" "fun_providecm_require.html")
-	  ("psetf" "mac_setfcm_psetf.html")
-	  ("psetq" "mac_psetq.html")
-	  ("push" "mac_push.html")
-	  ("pushnew" "mac_pushnew.html")
-	  ("quote" "speope_quote.html")
-	  ("random" "fun_random.html")
-	  ("random-state" "syscla_random-state.html")
-	  ("random-state-p" "fun_random-state-p.html")
-	  ("rassoc" "fun_rassoccm__assoc-if-not.html")
-	  ("rassoc-if" "fun_rassoccm__assoc-if-not.html")
-	  ("rassoc-if-not" "fun_rassoccm__assoc-if-not.html")
-	  ("ratio" "syscla_ratio.html")
-	  ("rational" "fun_rationalcm_rationalize.html")
-	  ("rational" "syscla_rational.html")
-	  ("rationalize" "fun_rationalcm_rationalize.html")
-	  ("rationalp" "fun_rationalp.html")
-	  ("read" "fun_readcm_re_g-whitespace.html")
-	  ("read-byte" "fun_read-byte.html")
-	  ("read-char" "fun_read-char.html")
-	  ("read-char-no-hang" "fun_read-char-no-hang.html")
-	  ("read-delimited-list" "fun_read-delimited-list.html")
-	  ("read-from-string" "fun_read-from-string.html")
-	  ("read-line" "fun_read-line.html")
-	  ("read-preserving-whitespace" "fun_readcm_re_g-whitespace.html")
-	  ("read-sequence" "fun_read-sequence.html")
-	  ("reader-error" "contyp_reader-error.html")
-	  ("readtable" "syscla_readtable.html")
-	  ("readtable-case" "acc_readtable-case.html")
-	  ("readtablep" "fun_readtablep.html")
-	  ("real" "syscla_real.html")
-	  ("realp" "fun_realp.html")
-	  ("realpart" "fun_realpartcm_imagpart.html")
-	  ("reduce" "fun_reduce.html")
-	  ("reinitialize-instance" "stagenfun_rei_ize-instance.html")
-	  ("rem" "fun_modcm_rem.html")
-	  ("remf" "mac_remf.html")
-	  ("remhash" "fun_remhash.html")
-	  ("remove" "fun_removecm__elete-if-not.html")
-	  ("remove-duplicates" "fun_remove-du_e-duplicates.html")
-	  ("remove-if" "fun_removecm__elete-if-not.html")
-	  ("remove-if-not" "fun_removecm__elete-if-not.html")
-	  ("remove-method" "stagenfun_remove-method.html")
-	  ("remprop" "fun_remprop.html")
-	  ("rename-file" "fun_rename-file.html")
-	  ("rename-package" "fun_rename-package.html")
-	  ("replace" "fun_replace.html")
-	  ("require" "fun_providecm_require.html")
-	  ("rest" "acc_rest.html")
-	  ("restart" "syscla_restart.html")
-	  ("restart-bind" "mac_restart-bind.html")
-	  ("restart-case" "mac_restart-case.html")
-	  ("restart-name" "fun_restart-name.html")
-	  ("return" "mac_return.html")
-	  ("return-from" "speope_return-from.html")
-	  ("revappend" "fun_revappendcm_nreconc.html")
-	  ("reverse" "fun_reversecm_nreverse.html")
-	  ("room" "fun_room.html")
-	  ("rotatef" "mac_rotatef.html")
-	  ("round" "fun_floorcm_f_undcm_fround.html")
-	  ("row-major-aref" "acc_row-major-aref.html")
-	  ("rplaca" "fun_rplacacm_rplacd.html")
-	  ("rplacd" "fun_rplacacm_rplacd.html")
-	  ("safety" "dec_optimize.html")
-	  ("satisfies" "typspe_satisfies.html")
-	  ("sbit" "acc_bitcm_sbit.html")
-	  ("scale-float" "fun_decode-fl_decode-float.html")
-	  ("schar" "acc_charcm_schar.html")
-	  ("search" "fun_search.html")
-	  ("second" "acc_firstcm_s_inthcm_tenth.html")
-	  ("sequence" "syscla_sequence.html")
-	  ("serious-condition" "contyp_serious-condition.html")
-	  ("set" "fun_set.html")
-	  ("set-difference" "fun_set-diffe_t-difference.html")
-	  ("set-dispatch-macro-character" "fun_set-dispa_ro-character.html")
-	  ("set-exclusive-or" "fun_set-exclu_exclusive-or.html")
-	  ("set-macro-character" "fun_set-macro_ro-character.html")
-	  ("set-pprint-dispatch" "fun_set-pprint-dispatch.html")
-	  ("set-syntax-from-char" "fun_set-syntax-from-char.html")
-	  ("setf" "mac_setfcm_psetf.html")
-	  ("setf" "stagenfun_doc_umentationcp.html")
-	  ("setq" "spefor_setq.html")
-	  ("seventh" "acc_firstcm_s_inthcm_tenth.html")
-	  ("shadow" "fun_shadow.html")
-	  ("shadowing-import" "fun_shadowing-import.html")
-	  ("shared-initialize" "stagenfun_sha_d-initialize.html")
-	  ("shiftf" "mac_shiftf.html")
-	  ("short-float" "typ_short-flo_m_long-float.html")
-	  ("short-float-epsilon" "convar_short-_tive-epsilon.html")
-	  ("short-float-negative-epsilon" "convar_short-_tive-epsilon.html")
-	  ("short-site-name" "fun_short-sit_ng-site-name.html")
-	  ("signal" "fun_signal.html")
-	  ("signed-byte" "typ_signed-byte.html")
-	  ("signum" "fun_signum.html")
-	  ("simple-array" "typ_simple-array.html")
-	  ("simple-base-string" "typ_simple-base-string.html")
-	  ("simple-bit-vector" "typ_simple-bit-vector.html")
-	  ("simple-bit-vector-p" "fun_simple-bit-vector-p.html")
-	  ("simple-condition" "contyp_simple-condition.html")
-	  ("simple-condition-format-arguments" "fun_simple-co_at-arguments.html")
-	  ("simple-condition-format-control" "fun_simple-co_at-arguments.html")
-	  ("simple-error" "contyp_simple-error.html")
-	  ("simple-string" "typ_simple-string.html")
-	  ("simple-string-p" "fun_simple-string-p.html")
-	  ("simple-type-error" "contyp_simple-type-error.html")
-	  ("simple-vector" "typ_simple-vector.html")
-	  ("simple-vector-p" "fun_simple-vector-p.html")
-	  ("simple-warning" "contyp_simple-warning.html")
-	  ("sin" "fun_sincm_coscm_tan.html")
-	  ("single-float" "typ_short-flo_m_long-float.html")
-	  ("single-float-epsilon" "convar_short-_tive-epsilon.html")
-	  ("single-float-negative-epsilon" "convar_short-_tive-epsilon.html")
-	  ("sinh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("sixth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("sleep" "fun_sleep.html")
-	  ("slot-boundp" "fun_slot-boundp.html")
-	  ("slot-exists-p" "fun_slot-exists-p.html")
-	  ("slot-makunbound" "fun_slot-makunbound.html")
-	  ("slot-missing" "stagenfun_slot-missing.html")
-	  ("slot-unbound" "stagenfun_slot-unbound.html")
-	  ("slot-value" "fun_slot-value.html")
-	  ("software-type" "fun_software-_ware-version.html")
-	  ("software-version" "fun_software-_ware-version.html")
-	  ("some" "fun_everycm_s_erycm_notany.html")
-	  ("sort" "fun_sortcm_stable-sort.html")
-	  ("space" "dec_optimize.html")
-	  ("special" "dec_special.html")
-	  ("special-operator-p" "fun_special-operator-p.html")
-	  ("speed" "dec_optimize.html")
-	  ("sqrt" "fun_sqrtcm_isqrt.html")
-	  ("stable-sort" "fun_sortcm_stable-sort.html")
-	  ("standard" "sec_7-6-6-2.html")
-	  ("standard-char" "typ_standard-char.html")
-	  ("standard-char-p" "fun_standard-char-p.html")
-	  ("standard-class" "syscla_standard-class.html")
-	  ("standard-generic-function" "syscla_standa_ric-function.html")
-	  ("standard-method" "syscla_standard-method.html")
-	  ("standard-object" "cla_standard-object.html")
-	  ("step" "mac_step.html")
-	  ("storage-condition" "contyp_storage-condition.html")
-	  ("store-value" "fun_abortcm_c_cm_use-value.html")
-	  ("store-value" "res_store-value.html")
-	  ("stream" "syscla_stream.html")
-	  ("stream-element-type" "fun_stream-element-type.html")
-	  ("stream-error" "contyp_stream-error.html")
-	  ("stream-error-stream" "fun_stream-error-stream.html")
-	  ("stream-external-format" "fun_stream-external-format.html")
-	  ("streamp" "fun_streamp.html")
-	  ("string" "fun_string.html")
-	  ("string" "syscla_string.html")
-	  ("string-capitalize" "fun_string-up_g-capitalize.html")
-	  ("string-downcase" "fun_string-up_g-capitalize.html")
-	  ("string-equal" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-greaterp" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-left-trim" "fun_string-tr_g-right-trim.html")
-	  ("string-lessp" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-not-equal" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-not-greaterp" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-not-lessp" "fun_stringeqc_ng-not-lessp.html")
-	  ("string-right-trim" "fun_string-tr_g-right-trim.html")
-	  ("string-stream" "syscla_string-stream.html")
-	  ("string-trim" "fun_string-tr_g-right-trim.html")
-	  ("string-upcase" "fun_string-up_g-capitalize.html")
-	  ("string/=" "fun_stringeqc_ng-not-lessp.html")
-	  ("string<" "fun_stringeqc_ng-not-lessp.html")
-	  ("string<=" "fun_stringeqc_ng-not-lessp.html")
-	  ("string=" "fun_stringeqc_ng-not-lessp.html")
-	  ("string>" "fun_stringeqc_ng-not-lessp.html")
-	  ("string>=" "fun_stringeqc_ng-not-lessp.html")
-	  ("stringp" "fun_stringp.html")
-	  ("structure" "stagenfun_doc_umentationcp.html")
-	  ("structure-class" "syscla_structure-class.html")
-	  ("structure-object" "cla_structure-object.html")
-	  ("style-warning" "contyp_style-warning.html")
-	  ("sublis" "fun_subliscm_nsublis.html")
-	  ("subseq" "acc_subseq.html")
-	  ("subsetp" "fun_subsetp.html")
-	  ("subst" "fun_substcm_s_subst-if-not.html")
-	  ("subst-if" "fun_substcm_s_subst-if-not.html")
-	  ("subst-if-not" "fun_substcm_s_subst-if-not.html")
-	  ("substitute" "fun_substitut_itute-if-not.html")
-	  ("substitute-if" "fun_substitut_itute-if-not.html")
-	  ("substitute-if-not" "fun_substitut_itute-if-not.html")
-	  ("subtypep" "fun_subtypep.html")
-	  ("svref" "acc_svref.html")
-	  ("sxhash" "fun_sxhash.html")
-	  ("symbol" "syscla_symbol.html")
-	  ("symbol-function" "acc_symbol-function.html")
-	  ("symbol-macrolet" "speope_symbol-macrolet.html")
-	  ("symbol-name" "fun_symbol-name.html")
-	  ("symbol-package" "fun_symbol-package.html")
-	  ("symbol-plist" "acc_symbol-plist.html")
-	  ("symbol-value" "acc_symbol-value.html")
-	  ("symbolp" "fun_symbolp.html")
-	  ("synonym-stream" "syscla_synonym-stream.html")
-	  ("synonym-stream-symbol" "fun_synonym-stream-symbol.html")
-	  ("t" "convar_t.html")
-	  ("t" "syscla_t.html")
-	  ("t" "stagenfun_doc_umentationcp.html")
-	  ("tagbody" "speope_tagbody.html")
-	  ("tailp" "fun_ldiffcm_tailp.html")
-	  ("tan" "fun_sincm_coscm_tan.html")
-	  ("tanh" "fun_sinhcm_co_coshcm_atanh.html")
-	  ("tenth" "acc_firstcm_s_inthcm_tenth.html")
-	  ("terpri" "fun_terpricm_fresh-line.html")
-	  ("the" "speope_the.html")
-	  ("third" "acc_firstcm_s_inthcm_tenth.html")
-	  ("throw" "speope_throw.html")
-	  ("time" "mac_time.html")
-	  ("trace" "mac_tracecm_untrace.html")
-	  ("translate-logical-pathname" "fun_translate_cal-pathname.html")
-	  ("translate-pathname" "fun_translate-pathname.html")
-	  ("tree-equal" "fun_tree-equal.html")
-	  ("truename" "fun_truename.html")
-	  ("truncate" "fun_floorcm_f_undcm_fround.html")
-	  ("two-way-stream" "syscla_two-way-stream.html")
-	  ("two-way-stream-input-stream" "fun_two-way-s_utput-stream.html")
-	  ("two-way-stream-output-stream" "fun_two-way-s_utput-stream.html")
-	  ("type" "dec_type.html")
-	  ("type" "stagenfun_doc_umentationcp.html")
-	  ("type-error" "contyp_type-error.html")
-	  ("type-error-datum" "fun_type-erro_xpected-type.html")
-	  ("type-error-expected-type" "fun_type-erro_xpected-type.html")
-	  ("type-of" "fun_type-of.html")
-	  ("typecase" "mac_typecasec_cm_etypecase.html")
-	  ("typep" "fun_typep.html")
-	  ("unbound-slot" "contyp_unbound-slot.html")
-	  ("unbound-slot-instance" "fun_unbound-slot-instance.html")
-	  ("unbound-variable" "contyp_unbound-variable.html")
-	  ("undefined-function" "contyp_undefined-function.html")
-	  ("unexport" "fun_unexport.html")
-	  ("unintern" "fun_unintern.html")
-	  ("union" "fun_unioncm_nunion.html")
-	  ("unless" "mac_whencm_unless.html")
-	  ("unread-char" "fun_unread-char.html")
-	  ("unsigned-byte" "typ_unsigned-byte.html")
-	  ("untrace" "mac_tracecm_untrace.html")
-	  ("unuse-package" "fun_unuse-package.html")
-	  ("unwind-protect" "speope_unwind-protect.html")
-	  ("update-instance-for-different-class" "stagenfun_upd_ferent-class.html")
-	  ("update-instance-for-redefined-class" "stagenfun_upd_efined-class.html")
-	  ("upgraded-array-element-type" "fun_upgraded-_element-type.html")
-	  ("upgraded-complex-part-type" "fun_upgraded-_ex-part-type.html")
-	  ("upper-case-p" "fun_upper-cas__both-case-p.html")
-	  ("use-package" "fun_use-package.html")
-	  ("use-value" "fun_abortcm_c_cm_use-value.html")
-	  ("use-value" "res_use-value.html")
-	  ("user-homedir-pathname" "fun_user-homedir-pathname.html")
-	  ("values" "acc_values.html")
-	  ("values" "typspe_values.html")
-	  ("values-list" "fun_values-list.html")
-	  ("variable" "stagenfun_doc_umentationcp.html")
-	  ("vector" "fun_vector.html")
-	  ("vector" "syscla_vector.html")
-	  ("vector-pop" "fun_vector-pop.html")
-	  ("vector-push" "fun_vector-pu_-push-extend.html")
-	  ("vector-push-extend" "fun_vector-pu_-push-extend.html")
-	  ("vectorp" "fun_vectorp.html")
-	  ("warn" "fun_warn.html")
-	  ("warning" "contyp_warning.html")
-	  ("when" "mac_whencm_unless.html")
-	  ("wild-pathname-p" "fun_wild-pathname-p.html")
-	  ("with-accessors" "mac_with-accessors.html")
-	  ("with-compilation-unit" "mac_with-compilation-unit.html")
-	  ("with-condition-restarts" "mac_with-cond_ion-restarts.html")
-	  ("with-hash-table-iterator" "mac_with-hash_ble-iterator.html")
-	  ("with-input-from-string" "mac_with-input-from-string.html")
-	  ("with-open-file" "mac_with-open-file.html")
-	  ("with-open-stream" "mac_with-open-stream.html")
-	  ("with-output-to-string" "mac_with-output-to-string.html")
-	  ("with-package-iterator" "mac_with-package-iterator.html")
-	  ("with-simple-restart" "mac_with-simple-restart.html")
-	  ("with-slots" "mac_with-slots.html")
-	  ("with-standard-io-syntax" "mac_with-stan_rd-io-syntax.html")
-	  ("write" "fun_writecm_p_rintcm_princ.html")
-	  ("write-byte" "fun_write-byte.html")
-	  ("write-char" "fun_write-char.html")
-	  ("write-line" "fun_write-str_m_write-line.html")
-	  ("write-sequence" "fun_write-sequence.html")
-	  ("write-string" "fun_write-str_m_write-line.html")
-	  ("write-to-string" "fun_write-to-_nc-to-string.html")
-	  ("y-or-n-p" "fun_y-or-n-pcm_yes-or-no-p.html")
-	  ("yes-or-no-p" "fun_y-or-n-pcm_yes-or-no-p.html")
-	  ("zerop" "fun_zerop.html")))
-
-
-;; fill the hashtable from the alist
-(eval-when (:load-toplevel :execute)
-  (loop :for (term fname) in *hyperspec-alist* :do
-        (setf (gethash term *hyperspec-filenames*) fname)))
-
-(defun hyperspec-url (term)
-  "Returns the URL of a HyperSpec description of TERM."
-  (let* ((term-string (etypecase term
-                        (string (string-downcase term))
-                        (symbol (string-downcase (symbol-name term)))))
-         (filename (gethash term-string *hyperspec-filenames*)))
-    (when filename
-      (concatenate 'string *hyperspec-base-url* filename))))
-
-;; EOF
diff --git a/cl-posix/cliki/index.lisp b/cl-posix/cliki/index.lisp
deleted file mode 100644
index 1202fb3..0000000
--- a/cl-posix/cliki/index.lisp
+++ /dev/null
@@ -1,265 +0,0 @@
-(in-package :cliki)
-
-;;;; we do all indices for a page in a single pass here.  The protocol
-;;;; is extensible to new indices: look at
-;;;; make-index-for-page
-;;;; add-to-index-for-page
-;;;; compute-index-for-page
-
-;;; This gets called once per page and calls the gfs for the methods
-;;; below
-
-;;; XXX need some way to add contents of special tags to the tf
-;;; indexing, ideally in a way that each tag can define its importance.
-;;; This would be most useful if it could be called from
-;;; add-to-index-for-page
-
-;;; the problem with the preceding is that the indices we want to
-;;; update are not accessible from the page itself yet as we're still
-;;; creating them at this time.  So, how can add-to-index-for-page get
-;;; hold of the tf index?
-
-(defun read-sentence (stream)
-  "Read until first #\. or non-graphic character outside of an HTML tag"
-  (with-output-to-string (o)
-    (let (c in-tag)
-      (loop
-       (setf c (read-char stream nil nil))
-       (when (and (not in-tag)
-		  (or (not c)
-		      (not (graphic-char-p c))
-		      (eql c #\.))) (return))
-       (if (and (not in-tag) (eql c #\<)) (setf in-tag t))
-       (unless in-tag (princ c o))
-       (if (and in-tag (eql c #\>)) (setf in-tag nil))))))
-
-(defgeneric update-page-indices (cliki page))
-(defmethod update-page-indices ((cliki cliki-instance) (page cliki-page))
-  (let ((indices nil)
-	(word-chars nil))
-    (labels ((index-for (c)
-	       (unless (assoc c indices)
-		 (push (cons c (make-index-for-page cliki page c)) indices))
-	       (assoc c indices))
-	     (update (token &rest args)
-	       (let ((i (index-for token)))
-		 (setf (cdr i)
-		       (add-to-index-for-page cliki page token (cdr i)
-					      (lambda (x w)
-						(update :tf x :weight w))
-					      args))))
-	     (dispatch (token arg)
-	       (destructuring-bind (token &rest args) (long-form-for token arg)
-		 (apply #'update token args)))
-	     (process-word (chars)
-	       (let ((word (coerce (nreverse chars) 'string)))
-		 (update :tf word)))
-	     (do-body-words (c)
-	       (cond ((and (not word-chars) (word-char-p c))
-		      (push c word-chars))
-		     ((and word-chars  (not (word-char-p c)))
-		      (process-word word-chars)
-		      (setf word-chars nil))
-		     (word-chars
-		      (push c word-chars)))))
-      (dolist (w (araneida:split (page-title page)))
-	(update :tf  w :weight 6))
-      (with-open-file (in-stream (page-pathname page))
-	(let* ((start (file-position in-stream)))
-	  (setf (page-first-sentence page) (read-sentence in-stream))
-	  (file-position in-stream start)) ; rewind
-	(scan-stream (cliki-short-forms cliki)
-		     in-stream #'do-body-words #'dispatch))
-      (setf (page-indices page) indices)
-      (loop for i in indices
-	    for (n . v) = i
-	    do (setf (cdr i) (compute-index-for-page cliki page n v))))))
-
-
-;;; default methods are tuned to an index which is basically a list of all
-;;; the arguments from each time the term occurs,  so
-
-(defgeneric make-index-for-page (cliki page index-name))
-(defgeneric add-to-index-for-page
-    (cliki page index-name index fulltext-fn arguments))
-(defgeneric compute-index-for-page (cliki page index-name index))
-
-
-(defmethod make-index-for-page ((cliki cliki-instance) (page cliki-page)
-				(index-name t))
-  nil)
-
-(defmethod add-to-index-for-page ((cliki cliki-instance) (page cliki-page)
-				  (index-name t) index fulltext-fn arguments)
-  (cons arguments index))
-
-(defmethod add-to-index-for-page ((cliki cliki-instance) (page cliki-page)
-				  (index-name (eql :clhs)) index
-				  fulltext-fn arguments)
-  (dolist (w arguments)
-    (funcall fulltext-fn w 3))
-  (call-next-method))
-
-;;; this is a crap name.  should be something like 'finalize', but not
-;;; that word exactly because it has been stolen from general use by GC
-
-(defmethod compute-index-for-page ((cliki cliki-instance) (page cliki-page)
-				  (index-name t) index)
-  index)
-
-;;; the backlinks and topic indices are special, because they're
-;;; updated on the "other" page: i.e. if Foo contains the marker
-;;; _(Bar), it is Bar which will be updated.  So we use this mechanism
-;;; to collect the pages to index, then when we have the full list of
-;;; referenced pages we loop over the collection and update all the
-;;; relevant links
-
-(defmethod compute-index-for-page ((cliki cliki-instance)
-				   (source-page cliki-page)
-				   (index-name (eql :topic)) index)
-  ;; (1) find the previous set of links from this page (if any);
-  ;; for each of the pages, delete references to SOURCE-PAGE
-  ;; (2) for each of the page titles in INDEX, find its page,
-  ;; add link to SOURCE-PAGE
-  (labels ((fp (x) (find-page-or-placeholder cliki (list (car x)))))
-    (dolist (target-page (mapcar #'fp (page-index source-page :topic)))
-      (when target-page
-	(setf (page-topics target-page)
-	      (remove (page-title source-page) (page-topics target-page)
-		      :key #'page-title :test #'equal))))
-     (dolist (target-page (mapcar #'fp index))
-       (when target-page
-	 (pushnew source-page (page-topics target-page)))))
-   index)
-
- ;;; same again
- (defmethod compute-index-for-page ((cliki cliki-instance)
-				    (source-page cliki-page)
-				    (index-name (eql :link)) index)
-   (labels ((fp (x) (find-page-or-placeholder cliki (list (car x)))))
-     (dolist (target-page (mapcar #'fp (page-index source-page :link)))
-       (when target-page
-	 (setf (page-backlinks target-page)
-	       (remove (page-title source-page) (page-backlinks target-page)
-		       :key #'page-title
-		       :test #'equal))))
-     (dolist (target-page (mapcar #'fp index))
-       (when target-page
-	 (pushnew source-page (page-backlinks target-page)))))
-   index)
-
-
-
-;;; Term Frequency indexing
-
-;;; Stop words.  Note that it ignores all words < 3 characters long,
-;;; so this list is considerably shorter than it might have to be
-
-(defparameter *stop-words*
-  (list "http" "href" "that" "quot" "with" "may" "the" "don" "can" "non"
-	"but" "not" "will" "use" "from" "there" "for" "and"
-	"any" "are" "which" "etc" "them"))
-
-;;; Is this the best selection of word constituents?
-(defun word-char-p (c) (or (alpha-char-p c) (digit-char-p c)))
-
-(defun interesting-word-p (word)
-  (not (or (< (length word) 3)
-	   (member (string-downcase word)
-		   *stop-words* :test #'equal))))
-
-(defun stem-for-word (word)
-  "Return the stem of WORD.  Note: doesn't presently do it very well"
-  (string-right-trim "s." (string-downcase word)))
-
-
-(defmethod  make-index-for-page ((cliki cliki-instance) (page cliki-page)
-				(index-name (eql :tf)))
-  (make-hash-table :test #'equal))
-
-(defmethod add-to-index-for-page ((cliki cliki-instance) (page cliki-page)
-				  (index-name (eql :tf)) table
-				  fulltext-fn arguments)
-  (destructuring-bind (word &key (weight 1) &allow-other-keys) arguments
-    (let ((stem (stem-for-word word)))
-      (when (interesting-word-p stem)
-	(let ((n (gethash stem  table)))
-	  (if (numberp n) (setf (gethash stem table) (+ weight n))
-	      (setf (gethash stem table) weight)))))
-    table))
-
-(defmethod compute-index-for-page ((cliki cliki-instance) (page cliki-page)
-				  (index-name (eql :tf)) table)
-  ;; we actually want a list of words rather than a hash table, to work
-  ;; with the search routines.  XXX would it help to sort the list?
-  (let ((ret nil))
-    (with-hash-table-iterator (generator-fn table)
-      (loop
-       (multiple-value-bind (more? k v) (generator-fn)
-	 (unless more? (return))
-	 (push (cons k v) ret))))
-    ret))
-
-
-
-;;; if we kept our document vectors as _real_ vectors they'd probably
-;;; be incredibly sparse for the most part.  So we have lists of
-;;; ((term . freq) (term . freq) ...)
-
-(defun document-vector-+ (x y)
-  "Add document vectors X and Y"
-  ;; ensure that x is the longer vector
-  (if (< (length x) (length y)) (rotatef x y))
-  (let ((ret (copy-list x)))
-    (dolist (dimension y)
-      (let ((place (assoc (car dimension) ret :test #'equal)))
-	(if place
-	    (incf (cdr place) (cdr dimension))
-	    (push dimension ret))))
-    ret))
-
-(defun document-vector-cosine (x y)
-  "Return the cosine of the angle between vectors X and Y"
-  ;; we don't ever need the dot product directly, so we might as
-  ;; well normalise the length while we're here given that we have
-  ;; to iterate over at least one of the vectors anyway
-  ;;(declare (optimize (speed 3)))
-  (if (< (length x) (length y)) (rotatef x y))
-  (let ((mag2-x 0) (mag2-y 0) (dot 0))
-    (dolist (term y)
-      (incf dot (* (cdr term)
-		   (or (cdr (assoc (car term) x :test #'equal)) 0)))
-      (incf mag2-y (* (cdr term) (cdr term))))
-    (dolist (term x)
-      (incf mag2-x (* (cdr term) (cdr term))))
-    (/ dot (* (sqrt mag2-x) (sqrt mag2-y)))))
-
-#|
-idf(term) is log(number of documents/number of documents it occurs in)
-
-each document is an n-dimensional vector where each term is a dimension, and
-the size in that dimension is (tf document term) (idf term)
-
-then we turn our search term into a similar vector with 1 on each axis for a
-supplied term
-
-then we do dot product between search term and each other document to find
-the docs with closest angle (biggest cos theta)
-|#
-
-(defun hash-table-values (table)
-  (loop for d being the hash-values of table collect d))
-
-
-
-(defun search-for-string (cliki string)
-  (let ((terms (mapcar
-		(lambda (x) (cons (stem-for-word x) 1))
-		(remove-if-not #'interesting-word-p
-			       (araneida:split string)))))
-    (sort (loop for document being the hash-values of (cliki-pages cliki)
-		for doc-terms = (page-tfidf document)
-		for cos = (document-vector-cosine terms doc-terms)
-		if (>  cos 0)
-		collect (cons document cos))
-	  #'> :key #'cdr)))
diff --git a/cl-posix/cliki/link-checker.lisp b/cl-posix/cliki/link-checker.lisp
deleted file mode 100644
index fadb96c..0000000
--- a/cl-posix/cliki/link-checker.lisp
+++ /dev/null
@@ -1,125 +0,0 @@
-(in-package :cliki)
-
-;;; CLiki external link checker
-
-#+cmu
-(progn
-  (alien:def-alien-routine alarm c-call:void (seconds alien:integer :in))
-  (defmacro with-enabled-interrupts (&rest args)
-    `(system:with-enabled-interrupts ,@args)))
-
-#+sbcl
-(progn
-  (sb-alien:def-alien-routine alarm sb-c-call:void
-			      (seconds sb-alien:integer :in))
-  (defmacro with-enabled-interrupts (&rest args)
-    `(sb-sys:with-enabled-interrupts ,@args)))
-
-
-;;; It's network code, so there's a billion ways it could go wrong.
-;;; For the record:
-
-;;; - If the url scheme is not http, or the port is non-standard => still there
-;;; - can't parse the URL => dead
-;;; - dns `permanent' error => dead
-;;; - dns `retry later' error => transient fault
-;;; - 4xx or 5xx => dead
-;;; - 2xx or 3xx => still there (we don't follow redirects, cos we're lazy)
-;;; - network timeout => transient fault
-
-;;; - transient fault lasting longer than a week => dead
-
-;;; we return (values (or t :transient nil) error-string)
-
-(defun get-http-response (urlstring)
-  (unless (and (> (length urlstring) 5) (string-equal urlstring "http:" :end1 5))
-    (return-from get-http-response t))
-  (handler-case
-   (let* ((url (araneida:parse-urlstring urlstring nil))
-          (host (and url (url-host url)))
-          (port (and url (url-port url))))
-     (unless url (return-from get-http-response (values nil "Unparseable URL")))
-     (unless (and (string-equal (url-scheme url) "HTTP")
-                  (member port '(80 81 8080 8000 8001)))
-       (return-from get-http-response t))
-     (let ((s (make-inet-socket :stream :tcp)))
-       (with-enabled-interrupts
-        ((14 (lambda (a b c) (sockets::socket-error "alarm timed out"))))
-        (unwind-protect
-            (progn
-              (alarm 10)
-              (socket-connect
-               s (car (host-ent-addresses (get-host-by-name host))) port)
-              (let ((stream (socket-make-stream s :input t :output t :buffering :full)))
-                (format stream "HEAD ~A HTTP/1.0~%Host: ~A:~A~%~%"
-                        ;; XXX this is actually broken for URLs with
-                        ;; query strings
-                        (url-path url) host port)
-                (force-output stream)
-                (format t "HEAD ~A HTTP/1.0~%Host: ~A:~A~%~%"
-                        ;; XXX this is actually broken for URLs with
-                        ;; query strings
-                        (url-path url) host port)
-                (destructuring-bind (protocol code &optional text)
-                    (araneida::split (read-line stream) 3)
-                  (declare (ignore protocol))
-                  (let ((number (parse-integer code :junk-allowed t)))
-                    (if (<= 200 number 399) t
-                      (values nil (format nil "~A ~A" number (or text ""))))))))
-          (socket-close s)
-          (alarm 0))))
-     ;; don't process if non-standard port, just return "success"
-     t)
-   (sockets::socket-error (c) (values :transient (symbol-name (type-of c))))
-   ;; name service errors which are likely to be (a) transient or (b) our fault
-   (sockets::netdb-internal-error (c) (values :transient (symbol-name (type-of c))))
-   (sockets::try-again-error (c) (values :transient (symbol-name (type-of c))))
-   ;; other kinds of error
-   (sockets::host-not-found-error (c) (values nil (symbol-name (type-of c))))
-   (sockets::name-service-error (c) (values nil (symbol-name (type-of c))))))
-
-
-;;; note that we manage to lose any "exciting" attributes on A that we
-;;; notice are dead.  People shouldn't be using them anyway, so we
-;;; can reasonably claim that's policy
-(defun check-link (a)
-  (destructuring-bind ((name &key href class &allow-other-keys) &body body) a
-    (declare (ignore name))
-    (unless (string-equal class "DEAD")
-      (multiple-value-bind (success reason) (get-http-response href)
-        (unless success
-          (values
-           `((:a :href ,href :class "DEAD") ,@body)
-           reason))))))
-
-(defun traverse-tree (tree test)
-  (when tree
-    (when (consp tree)
-      (traverse-tree (car tree) test)
-      (traverse-tree (cdr tree) test))
-    (funcall test tree))
-  tree)
-
-(defun annotate-links-on-page (title root)
-  (let* ((pathname (merge-pathnames title root))
-         (document
-          (with-open-file (in pathname :direction :input)
-            (net.html.parser:parse-html in))))
-    (traverse-tree document
-                   (lambda (el)
-                     (when (consp el)
-                       (let ((a (car el)))
-                         (when (and (consp a) (consp (car a)) (eq (caar a) :A))
-                           (multiple-value-bind (bad why) (check-link a)
-                             (when bad
-                               (setf (car el) bad)
-                               (setf (cdr el)
-                                     (cons
-                                      `(:i "(*(dead link) ["  ,why "] "
-                                           ,(araneida::universal-time-to-rfc-date
-                                             (get-universal-time))
-                                           ")")
-                                      (cdr el))))))))))
-    (with-open-file (out pathname :direction :output)
-      (dolist (tree document)
-        (araneida::html-stream out tree)))))
diff --git a/cl-posix/cliki/make-TODO.pl b/cl-posix/cliki/make-TODO.pl
deleted file mode 100644
index e96b8b5..0000000
--- a/cl-posix/cliki/make-TODO.pl
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/perl -w
-
-# for each line containing XXX or TODO, print it and all the
-# immediately following lines that have the same comment introducer
-
-my $introducer=undef;
-while(<>) {
-    if(/(XXX|TODO)/) {
-	($introducer)=m/(;+\s*)/;
-	print "\n";
-    };
-    if((defined $introducer) && /$introducer/) {
-	print "$ARGV:$.:$_";
-    } else {
-	$introducer=undef;
-    }
-} continue {
-    # reset line numbers between files
-    close ARGV  if eof;     # Not eof()!
-}
-
diff --git a/cl-posix/cliki/recent-changes.lisp b/cl-posix/cliki/recent-changes.lisp
deleted file mode 100644
index a31095c..0000000
--- a/cl-posix/cliki/recent-changes.lisp
+++ /dev/null
@@ -1,159 +0,0 @@
-(in-package :cliki)
-
-(defun restore-recent-changes (cliki &optional max-entries)
-  (let ((path (merge-pathnames "admin/recent-changes.dat"
-			       (cliki-data-directory cliki))))
-    (ensure-directories-exist path)
-    (with-open-file (in path
-			:if-does-not-exist :create
-			:direction :input)
-      (loop for entry = (read in nil nil)
-	    while (and entry (or (not max-entries) (> max-entries 0)))
-	    if max-entries do (decf max-entries)
-	    do (push entry (cliki-recent-changes cliki))))))
-
-(defun add-recent-change (cliki date title user &optional description)
-  (let* ((entry (list date title user description))
-	 (changes (cliki-recent-changes cliki))
-	 (preceding (find-if (lambda (x) (string= (second x) title))
-			     changes)))
-    ;; if the description is empty and a recent preceding recent changes
-    ;; entry for the same title has the same user name, don't add this one
-    (unless (and (string= description "")
-		 (string= (third preceding) user)
-		 (> (+ (first preceding) 600) (get-universal-time)))
-      (push entry (cliki-recent-changes cliki))
-      (with-open-file (out (merge-pathnames #p"admin/recent-changes.dat"
-					    (cliki-data-directory cliki))
-			   :direction :output :if-exists :append
-			   :if-does-not-exist :create)
-	  (with-standard-io-syntax (print entry out))))))
-
-(defun find-recent-change (cliki title)
-  (loop for entry in (cliki-recent-changes cliki)
-	for (date title- user description) = entry
-	when (string-equal title title-)
-	return entry))
-
-(defun same-day-p (date1 date2)
-  (= (floor date1 86400) (floor date2 86400)))
-
-(defun view-recent-changes (request)
-  (let* ((out  (request-stream request))
-	 (cliki (request-cliki request))
-	 (changes (cliki-recent-changes cliki))
-	 (start
-	  (parse-integer
-	   (or (car (url-query-param (request-url request) "start")) "0")
-	   :junk-allowed t))
-	 (number 30))
-    (request-send-headers request :last-modified (caar changes))
-    (with-page-surround (cliki request "Recent Changes")
-      (if (= start 0)
-	  (format out
-		  "<blockquote>This page is updated automatically.  There's also an <a href=\"~A\">RSS 0.91</a> RDF feed"
-		  (urlstring
-		   (merge-url (request-url request) "recent-changes.rdf")))
-	  (format out "<p>Older entries (starting at ~D)</p>~%" start))
-      (loop for (this-date title user . description)
-	    in (subseq changes start
-		       (min (+ start number) (length changes)))
-	    and old-date = 0 then this-date
-	    if (and title description user)
-	    unless (same-day-p this-date old-date)
-	    do (with-date this-date 0
-			  (format out
-				  "</blockquote>
-<a name=~D><h3>~/cliki:dayname/ ~A ~/cliki:monthname/ ~A</h3></a>
-<blockquote>"
-				  this-date day-of-week day-of-month month year))
-	    if (and title description user)
-	    do (with-date this-date 0
-			  (format out "<br> ~D:~2,'0D <b>~A</b> : ~A -- ~A ~%"
-				  hour minute
-				  (write-a-href cliki title nil)
-				  (car description)
-				  (write-a-href cliki user nil))))
-      (princ "</blockquote><p>" out)
-      (print-page-selector out start number (length changes)
-			   (format nil "~A?start="
-				   (url-path (request-url request))))
-      )))
-
-(defun rss-recent-changes-stream (cliki stream)
-  (let ((seen-titles nil)
-	(changes (cliki-recent-changes cliki)))
-    (labels ((datefmt (date)
-	       (with-date date 0
-			  (format nil "~/cliki:dayname/ ~A ~/cliki:monthname/"
-				  day-of-week day-of-month month))))
-      (loop for (date title user . description)
-	    in changes
-	    if (> (length seen-titles) 15) return nil end
-	    do (push (list title date description) seen-titles))
-      (let ((items
-	     (loop for (title date description)
-		   in (nreverse seen-titles)
-		   for f-date = (datefmt date)
-                   for page = (find-page cliki title)
-                   for newest = (car (page-versions page))
-                   for new-pathname = (page-pathname page)
-                   for old-pathname = (page-pathname page :version (1- newest))
-		   for descr = (car description)
-		   for url = (urlstring (merge-url (cliki-url-root cliki)
-						   (urlstring-escape title)))
-		   collect `("item" ()
-				    ("title" () ,title" : " ,descr)
-				    ("pubDate" () ,(date:universal-time-to-http-date date))
-				    ("link" ()  ,url)
-			     ("description" ()
-                              ,(if (probe-file old-pathname)
-				   (with-output-to-string (s)
-				     (write-sequence "<pre>" s)
-				     (or
-				      (ignore-errors
-				        (diff::print-unified-diff
-					 old-pathname new-pathname s))
-				      (format s "(diff failed)"))
-				     (write-sequence "</pre>" s))
-				   "New page"))))))
-	(format stream "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>~%")
-	(xmls:write-xml
-	 `("rss" (("version" "0.92"))
-		 ("channel"
-		  ()
-		  ("title"
-		   ()
-		   ,(cliki-title cliki) " Recent Changes" )
-		  ("link" () ,(urlstring (cliki-url-root cliki)) "Recent%20Changes")
-		  ("description" () ,(cliki-title cliki) " Recent Changes" )
-		  ,@items
-		  ("textInput"
-		   ()
-		   ("title" () ,(cliki-title cliki) " Search")
-		   ("description" () "Search all pages")
-		   ("name" () "words")
-		   ("link" () ,(urlstring (cliki-url-root cliki))
-			   "admin/search"))))
-       	 stream)
-	t))))
-
-(defun rdf-recent-changes (request)
-  (let* ((out  (request-stream request))
-	 (cliki (request-cliki request))
-	 (changes (cliki-recent-changes cliki)))
-    (request-send-headers request :content-type "text/xml"
-			  :conditional t
-			  :expires (+ (get-universal-time) 300)
-			  :last-modified (caar changes))
-    (rss-recent-changes-stream cliki out)))
-
-(defun sexp-recent-changes (request)
-  (let* ((out  (request-stream request))
-	 (cliki (request-cliki request))
-	 (changes (cliki-recent-changes cliki)))
-    (request-send-headers request :content-type "text/plain"
-			  :conditional t
-			  :last-modified (caar changes))
-    (print (subseq changes 0 200) out)
-    t))
diff --git a/cl-posix/cliki/search.lisp b/cl-posix/cliki/search.lisp
deleted file mode 100644
index 75112d1..0000000
--- a/cl-posix/cliki/search.lisp
+++ /dev/null
@@ -1,158 +0,0 @@
-(in-package :cliki)
-
-;;; generalised topic searching
-
-(defmethod search-term-relevance ((cliki cliki-view) page
-				  (term (eql :or)) &rest args)
-  (/ (apply #'+ (mapcar (lambda (x)
-			  (apply #'search-term-relevance cliki page x))
-			args)) 2))
-
-(defmethod search-term-summary ((cliki cliki-view) page
-				  (term (eql :or)) &rest args)
-  (loop for p in args
-	if (> (apply #'search-term-relevance cliki page p) 0)
-	append (apply #'search-term-summary cliki page  p)))
-
-(defmethod search-term-relevance ((cliki cliki-view) page
-				  (term (eql :and)) &rest args)
-  (apply #'* (mapcar (lambda (x)
-		       (apply #'search-term-relevance cliki page x))
-		     args)))
-
-(defmethod search-term-summary ((cliki cliki-view) page
-				  (term (eql :and)) &rest args)
-  (if (> (apply #'search-term-relevance cliki page term args) 0)
-      (loop for p in args
-	    append (apply #'search-term-summary cliki page p))))
-
-(defmethod search-term-relevance ((cliki cliki-view) page
-				  (term (eql :not)) &rest args)
-  (- 1 (apply #'search-term-relevance cliki page (car args))))
-
-(defmethod search-term-summary ((cliki cliki-view) page
-				  (term (eql :not)) &rest args)
-  nil)
-
-(defmethod search-term-relevance ((cliki cliki-view) page
-				  (term (eql :body)) &rest args)
-  (let ((doc-terms (page-tfidf page))
-	(terms (loop for word in (araneida:split (car args))
-		     for stem = (stem-for-word word)
-		     when (interesting-word-p stem)
-		     collect (cons stem 1))))
-    (if (and doc-terms terms)
-	(document-vector-cosine terms doc-terms)
-	0)))
-
-(defmethod search-term-summary ((cliki cliki-view) page
-				(term (eql :body)) &rest args)
-  (list
-   (with-output-to-string (o)
-     (let* ((e-stream (make-instance 'elided-stream
-				     :important-words
-				     (araneida:split (car args))
-				     :output-stream o))
-	    (h-stream (make-instance 'strip-html-stream
-				     :output-stream  e-stream)))
-       (labels ((dispatch (token arg)
-		  (apply #'html-for-keyword
-			 cliki h-stream (long-form-for token arg)))
-		(output (c)
-		  (write-char (if (graphic-char-p c) c #\Space) h-stream)))
-	 (with-open-file (in-stream (page-pathname page) :direction :input)
-	   (scan-stream (cliki-short-forms cliki)
-			in-stream
-			#'output #'dispatch))
-	 (close h-stream)
-	 (close e-stream))))))
-
-;;; default method: for (foo "bar" "baz"), return 1 iff the search
-;;; term is (foo "bar"), (foo "baz") or (foo)
-
-(defmethod search-term-relevance ((cliki cliki-view) page
-				  term &rest args)
-  (if
-   (cond (args
-	  (member (car args) (cadr (assoc term (page-indices page)))
-		  :test (lambda (x y)
-			  (string-equal (princ-to-string x)
-					(princ-to-string y)))))
-	 (t (assoc term (page-indices page))))
-   1 0))
-
-(defmethod search-term-summary ((cliki cliki-view) page
-				  term &rest args)
-  (if (> (apply #'search-term-relevance cliki page term args) 0)
-      (list (format nil "<b>~A</b>: ~A<br>"
-		    term (car args)))))
-
-(defmethod search-results-blurb ((cliki cliki-view) stream)
-  nil)
-
-
-;;; old search for stuff.  This is the /(...) searching: the full-text
-;;; search is in index.lisp
-
-;;; XXX this shows all the signs of wanting to be a
-;;; multiply-dispatched method on (attribute match)
-
-;;; XXX is there a standard term for :case-sensitive in CLHS?
-
-;;; TODO syntax errors and so forth should throw something
-;;; standardised which write-stream-to-stream can catch (so fix search-error)
-
-(defun legacy-search-pages
-    (cliki term &key (attribute :body) (match :substring)
-     (case-sensitive nil))
-  "Search pages in PATHNAME for TERM according to the criteria in the keyword
-arguments.  Returns a list of pages.
-ATTRIBUTE is (or :title :topic :body)
-MATCH is (or :exact :substring :regular-expression)
-CASE-SENSITIVE is (or t nil)"
-  (sort
-   (case attribute
-     (:body (search-page-bodies cliki term match case-sensitive))
-     (:title (search-page-titles cliki term match case-sensitive))
-     (:topic (search-page-topics cliki term match case-sensitive))
-     (t (search-error "Unknown search attribute")))
-   #'string-lessp :key #'page-title))
-
-
-(defun search-error (&rest args) (apply #'error args))
-
-(defun search-predicate (match case-p)
-  (cond
-   ((and (eql match :substring) case-p)
-    (lambda (term x) (search term x)))
-   ((eql match :substring)
-    (lambda (term x) (search term x :test #'char-equal)))
-   ((and (eql match :exact) case-p)
-    #'string=)
-   ((eql match :exact)
-    #'string-equal)
-   (t (search-error "Unknown search match criterion"))))
-
-(defun search-page-titles (cliki term match case-sensitive)
-  (let ((pred (search-predicate match case-sensitive)))
-    (loop for page being the hash-values of (cliki-pages cliki)
-	  if (funcall pred term (page-title page))
-	  collect page)))
-
-(defun search-page-bodies (cliki term match case-sensitive)
-  (declare (ignorable term pathname match case-sensitive))
-  ;; need to do this based on the tfidf stuff
-  (search-error "Full body searching not yet implemented.  Sorry."))
-
-(defun search-page-topics (cliki term match case-sensitive)
-  (let ((pred (search-predicate match case-sensitive)))
-    (remove-duplicates
-     (sort
-      (loop for page being the hash-values of (cliki-pages cliki)
-	    if (member term (page-index page :topic) :test pred :key #'car)
-	    collect page)
-      #'string-lessp
-      :key #'page-title))))
-
-
-
\ No newline at end of file
diff --git a/cl-posix/cliki/strip-html-stream.lisp b/cl-posix/cliki/strip-html-stream.lisp
deleted file mode 100644
index a5f2a65..0000000
--- a/cl-posix/cliki/strip-html-stream.lisp
+++ /dev/null
@@ -1,66 +0,0 @@
-(in-package :cliki)
-
-(defclass strip-html-stream (buffered-output-stream)
-  ((output-stream :initarg :output-stream
-		  :accessor strip-html-stream-output-stream)))
-
-(defun end-of-tag (buffer start)
-  (let ((in-string-p nil) (escaped-p nil))
-    (loop for i from start below (length buffer)
-	  for c = (elt buffer i)
-	  do
-	  (cond
-	    (escaped-p
-	     (setf escaped-p nil))
-	    ((and in-string-p (eql c #\"))
-	     (setf in-string-p nil))
-	    (in-string-p
-	     nil)
-	    ((eql c #\>)
-	     (return  (1+ i)))
-	    ((eql c #\")
-	     (setf in-string-p t))))))
-
-(defun write-sequence-graphic-chars (b stream &key (start 0) end)
-  (let ((end (or end (length b))))
-    (loop
-     (let* ((w-pos (position-if-not #'graphic-char-p b :start start :end end))
-	    (w-end (and w-pos (position-if
-			       #'graphic-char-p b :start w-pos :end end))))
-       (unless (< start end) (return))
-       (write-sequence b stream :start start :end (or w-pos end))
-       (unless (and w-pos w-end) (return))
-       (princ #\Space stream)
-       (setf start w-end)))))
-
-(defmethod buffered-output-stream-write-buffer ((stream strip-html-stream)
-						&optional force-p)
-  (let* ((b (buffered-output-stream-buffer stream))
-	 (out (strip-html-stream-output-stream stream))
-	 (start 0) (open 0) (close 0))
-    (loop
-     (setf open (position #\< b :start start))
-     (write-sequence-graphic-chars b out :start start :end open)
-     (unless open (return (length b)))
-     (setf close (end-of-tag b open))
-     (let ((name (subseq b open (position #\Space b :start open))))
-       (if (member name
-		   '("br" "hr" "h1" "h2" "h3" "h4" "h5" "h6" "p" "div")
-		   :test #'string-equal)
-	   (terpri out)
-	   (princ #\Space out)))
-     (unless close
-       (if force-p
-	   (setf close (length b)) ;exit
-	   (return open)))
-     (setf start close))))
-
-
-#|
-(with-open-file (i "/var/www/cliki/cirCLe")
-  (let ((o (make-instance 'strip-html-stream :output-stream *standard-output*)))
-    (do ((c (read-char i nil nil)  (read-char i nil nil)))
-	((null c) nil)
-      (write-char c o))
-    (close o)))
-|#
diff --git a/cl-posix/cliki/utilities.lisp b/cl-posix/cliki/utilities.lisp
deleted file mode 100644
index 41e696c..0000000
--- a/cl-posix/cliki/utilities.lisp
+++ /dev/null
@@ -1,17 +0,0 @@
-(in-package :cliki)
-
-(defmacro aif (test then else)
-  `(let ((it ,test)) (if it ,then ,else)))
-
-(defun integer-for (thing &key (default 0) (start 0) end)
-  (or (parse-integer (or thing "") :start start :end end :junk-allowed t)
-      default))
-
-(defun string-prefix-p (short long)
-  (let ((m (mismatch short long)))
-    (or (not m) (= m (length short)))))
-
-(defmacro with-page-surround ((cliki request title &optional head) &body forms)
-  `(cliki-page-surround ,cliki ,request
-			(lambda (out) ,@forms)
-			:title ,title :head ,head))
diff --git a/cl-posix/cliki/versions.lisp b/cl-posix/cliki/versions.lisp
deleted file mode 100644
index 20977cd..0000000
--- a/cl-posix/cliki/versions.lisp
+++ /dev/null
@@ -1,27 +0,0 @@
-(in-package :cliki)
-
-(defun version-open-p (cliki page version user)
-  (and (eql version (Car (page-versions page)))
-       (> (file-write-date (page-pathname page :version version))
-	  (- (get-universal-time) (* 5 60)))
-       (destructuring-bind (date title user- descr)
-	   (find-recent-change  cliki (page-title page))
-	 (declare (ignore date title descr))
-	 (string= user user-))))
-
-(defmethod check-page-save-allowed ((cliki cliki-instance) page version user)
-  (unless
-      (or (not (page-versions page))
-	  (version-open-p cliki page version user)
-	  (= version (1+ (car (page-versions page)))))
-    (signal 'cliki-page-save-rejected
-	    :client-message
-	    "Simultaneous edit: a newer version of this page already exists")))
-
-(defun can-save-as-version-p (cliki page version user)
-  (handler-case
-      (progn (check-page-save-allowed cliki page version user) t)
-    (cliki-page-save-rejected () nil)))
-
-
-
diff --git a/cl-posix/cliki/view-source.lisp b/cl-posix/cliki/view-source.lisp
deleted file mode 100644
index eabd0a9..0000000
--- a/cl-posix/cliki/view-source.lisp
+++ /dev/null
@@ -1,16 +0,0 @@
-(in-package :cliki)
-
-(defun view-page-source (request page title &key (version :newest))
-  (let ((out (request-stream request)))
-    (handler-case
-     (with-open-file (in (page-pathname page :version version)
-			 :direction :input)
-       (request-send-headers request
-                             :content-type "text/plain"
-			     :conditional t
-			     :last-modified (file-write-date in)
-                             :expires (get-universal-time))
-       (araneida::copy-stream in out)
-       t)
-      (error (e) ;; probably it just doesn't exist: not actually an error
-	(request-send-error request 404 "Can't send file: ~A" e)))))
diff --git a/cl-posix/cliki/view.lisp b/cl-posix/cliki/view.lisp
deleted file mode 100644
index 8395c77..0000000
--- a/cl-posix/cliki/view.lisp
+++ /dev/null
@@ -1,356 +0,0 @@
-(in-package :cliki)
-
-(defmethod cliki-page-surround  ((cliki cliki-view) request function
-                                 &key title head)
-  (cliki-page-header cliki request title head)
-  (prog1
-      (funcall function (request-stream request))
-    (cliki-page-footer cliki request title)))
-
-
-(defmethod cliki-page-header ((cliki cliki-view) request title &optional head)
-  (let* ((stream (request-stream request))
-         (home (cliki-url-root cliki)))
-    (labels ((ahref (l) (urlstring (araneida:merge-url home l))))
-      (let ((out
-             (html
-                 `(html
-                      (head (title ,(format nil "CLiki : ~A" title))
-                        ,@head
-                        ((link :rel "alternate"
-                               :type "application/rss+xml"
-                               :title "Recent Changes"
-                               :href ,(ahref  "recent-changes.rdf")))
-                        ((link :rel "stylesheet" :href ,(ahref "admin/cliki.css"))))
-                    (body
-                        ((div :id "banner")
-                         ((a :title "CLiki home page" :class "logo" :href ,(ahref nil))
-                          "CL" ((span :class "sub") "iki"))
-                         (span "the common lisp wiki")
-
-                         ((div :id "navbar")
-                          ((a :href ,(ahref (cliki-default-page-name cliki)) )
-                           "Home")
-                          ((a :href ,(ahref "Recent%20Changes")) "Recent Changes")
-                          ((a :href ,(ahref "CLiki")) "About CLiki")
-                          ((a :href ,(ahref "Text%20Formatting")) "Text Formatting")
-                          ((a :onclick ,(format nil "if(name=window.prompt('New page name ([A-Za-z0-9 ])')) document.location='~a'+name ;return false;" (urlstring (merge-url home "edit/" ))) :href "#" )
-                           "Create New Page")))
-
-                      (h1 ,title)
-                      (deleteme))))))
-        (format stream
-          "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">~%")
-        (write-sequence
-         (subseq out 0 (search "<DELETEME>" out))
-         stream)))))
-
-(defun request-for-version (page request)
-  (let ((u (request-url request)))
-    (integer-for (car (url-query-param u "v"))
-                 :default (car (page-versions page)))))
-
-(defun version-links (cliki page request)
-  (let ((ver (request-for-version page request)))
-    (loop for v in (reverse
-                    (subseq (page-versions page)
-                            0 (min 5 (length (page-versions page)))))
-          if (= ver v)
-          collect `((b :title
-                       ,(universal-time-to-http-date
-                         (file-write-date (page-pathname page :version ver))))
-                    ,ver)
-          else
-          collect `((a :href ,(format nil "~A?v=~A"
-                                      (urlstring (page-url cliki page))  v)
-                       :title
-                       ,(universal-time-to-http-date
-                         (file-write-date (page-pathname page :version v))))
-                    ,v))))
-
-(defmethod cliki-page-footer
-  ((cliki cliki-view) request title)
-  (let* ((page (find-page cliki title))
-         (out (request-stream request))
-         (text
-          (format nil
-            "<a href=\"edit/~A\">Edit page</a> | <a href=\"~A?source\">View source</a> | Revisions: "
-            (urlstring-escape title) (urlstring-escape title))))
-    (html-stream out
-                 `((form  :action ,(urlstring (merge-url (cliki-url-root cliki)
-                                                         "admin/search")))
-                   ((div :id "footer")
-                    ,text
-                    ,@(and page (version-links cliki page request))
-                    ((input :name "words" :size "30"))
-                    ((input :type "submit" :value "search")))))
-    (format out "<p>CLiki pages can be edited by anyone at any time.  Imagine a fearsomely comprehensive disclaimer of liability.  Now fear, comprehensively")
-    ))
-
-
-(defun print-page-selector
-  (stream start-of-page number-on-page total-length urlstring-stub)
-  "Print result page selector with `previous', `next', and numbered links to each result page. Form links by glomming offset to URLSTRING-STUB"
-  (labels ((url (name offset)
-                (format stream "~&<td><a href=\"~A~A\">~A</a></td>"
-                        urlstring-stub offset name)))
-    (princ "<center><table><tr><td>Result page:  </td><td> </td>" stream)
-    (let ((first-on-screen
-           (* (floor start-of-page number-on-page) number-on-page)))
-      (if (> first-on-screen 0)
-        (url "Previous"
-             (- first-on-screen number-on-page)))
-      (loop for i from 0 to total-length by number-on-page
-            for j = 1 then (1+ j)
-            if (<= i start-of-page (+ i number-on-page -1))
-            do (format stream "~&<td>~A</td>" j)
-            else do (url j i))
-      (if (< (+ first-on-screen number-on-page) total-length)
-        (url "Next" (+ first-on-screen number-on-page)))
-      (princ "</tr></table></center>" stream))))
-
-
-(defun long-form-for (token arg)
-  (let ((*read-eval* nil)
-        (*package* (find-package "KEYWORD")))
-    (if (eq token :long-form)
-      (multiple-value-bind (r e)
-          (ignore-errors (values (read-from-string arg)))
-        (if e (list :error (format nil "~A" e) arg)  r))
-      (list (intern (string-upcase token) :keyword)
-            (strip-outer-parens arg)))))
-
-(defun subst-markup-in-stream (cliki in-stream out-stream)
-  "Read the file for PAGE and write to OUT-STREAM, substituting weird markup language elements as we go. "
-  (let ((newlines 0)
-        (returns 0))
-    (labels ((dispatch (token arg)
-                       (apply #'html-for-keyword
-                              cliki out-stream (long-form-for token arg)))
-             (output (c)
-                     (cond
-                      ((and (or (> newlines 1) (> returns 1))
-                            (member c '(#\Newline #\Return)))
-                       (write-sequence "<p>" out-stream)
-                       (setf newlines 0 returns 0))
-                      ((eql c #\Newline)
-                       (incf newlines)
-                       (write-char c out-stream))
-                      ((eql c #\Return)
-                       (incf returns)
-                       (write-char c out-stream))
-                      (t
-                       (setf newlines 0 returns 0)
-                       (write-char c out-stream)))))
-      (scan-stream (cliki-short-forms cliki)
-                   in-stream
-                   #'output #'dispatch))))
-
-(defun subst-markup-in-string (cliki in-string)
-  (with-output-to-string (o)
-    (with-input-from-string (in in-string)
-      (subst-markup-in-stream cliki in o))))
-
-(defun write-page-contents-to-stream (cliki page out-stream
-                                            &key (version :newest))
-  "Read the file for PAGE and write to OUT-STREAM, substituting weird markup language elements as we go. "
-  (if (page-pathname page)
-    (with-open-file (in-stream (page-pathname page :version version)
-                               :direction :input)
-      (subst-markup-in-stream cliki in-stream out-stream))
-    (format out-stream
-      "This page doesn't exist yet.  Please create it if you want to")))
-
-(defun view-page (cliki request page title &key (version :newest))
-  (let ((lmtime (if page (page-last-modified page) (get-universal-time)))
-        (google (and page (googlable-p page version))))
-    (request-send-headers request :conditional t :last-modified lmtime)
-    (with-page-surround (cliki request title
-                               (unless google
-                                 '(((META :NAME "ROBOTS" :CONTENT "NOFOLLOW")))))
-                        (if page
-                          (progn
-                            (let* ((topics
-                                    (sort (delete page (copy-list (page-topics page)))
-                                          #'string-lessp
-                                          :key #'page-title))
-                                   (backlinks
-                                    (sort (set-difference
-                                           (delete page (copy-list (page-backlinks page)))
-                                           topics)
-                                          #'string-lessp :key #'page-title)))
-                              (write-page-contents-to-stream cliki page out :version version)
-                              (when topics
-                                (format out "<hr><p><b>Page~p in this topic: </b> "
-                                        (length topics))
-                                (dolist (c topics)
-                                  (format out "~A &nbsp; "
-                                          (write-a-href cliki (page-title c) nil))))
-                              (when backlinks
-                                (format out "<hr><p><b>~A linked from: </b> "
-                                        (if topics "Also" "This page is"))
-                                (dolist (c backlinks)
-                                  (format out "~A &nbsp; "
-                                          (write-a-href cliki (page-title c) nil))))))
-                          (format out
-                            "This page doesn't exist yet.  Please create it if you want to"))))
-
-  t)
-
-
-(defgeneric html-for-keyword (cliki stream keyword &rest rest))
-
-(defmethod html-for-keyword ((cliki cliki-view)
-                             stream (keyword t) &rest args)
-  (format stream "<b> [unrecognised ~A keyword occurred here: args ~S] </b>"
-          keyword args))
-
-(defmethod html-for-keyword ((cliki cliki-view)
-                             stream (keyword (eql :error)) &rest args)
-  (destructuring-bind (error form) args
-    (format stream "<b> [Syntax error in tag: </b><br>~A<pre>~S</pre><b>] </b>"
-            form (html-escape error))))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :topic))
-                             &rest args &aux (arg (car args)))
-  (write-a-href cliki arg stream))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :link))
-                             &rest args &aux (arg (car args)))
-  (write-a-href cliki arg stream))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :legacy-search))
-                             &rest args &aux (arg (car args)))
-  (legacy-search-result cliki arg stream))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :search))
-                             &rest args)
-  (destructuring-bind
-      (&key title
-            (no-results-message "No results from search")
-            term show-relevance-p &allow-other-keys) args
-    (let ((pages
-           (sort
-            (loop for page being the hash-values of (cliki-pages cliki)
-                  for r = (apply #'search-term-relevance cliki page term)
-                  if (> r 0)
-                  collect (list r page))
-            #'>
-            :key #'car)))
-      (cond (pages
-             (format stream "~A<ul>" title)
-             (dolist (p pages)
-               (format stream
-                 (if show-relevance-p "<li>~A (~A)</li>"
-                     "<li>~A</li>")
-                 (write-a-href cliki (page-title (cadr p)) nil)
-                 (car p)))
-             (format stream "</ul>"))
-            (t (princ no-results-message stream))))))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :clhs))
-                             &rest args &aux (arg (car args)))
-  (let* ((url (hyperspec-url arg)))
-    (if url
-      (format stream
-		"<a class=\"hyperspec\" href = \"~a\"><b>~a</b></a>"
-		url arg)
-      (princ arg stream))))
-
-(defmethod html-for-download-link ((cliki cliki-view) stream
-                                   (from (eql :cclan)) name)
-  (format stream
-    "<a class=\"download\" href=\"http://ww.telent.net/cclan/~A\"
-><b>Download CCLAN package ~A</b></a>"
-    name name))
-
-(defmethod html-for-download-link ((cliki cliki-view) stream
-                                   (from t) name)
-  (format stream
-    "<a class=\"download\" href=\"~A\"
-><b>Download from ~A</b></a>"
-    name name))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :download))
-                             &rest args)
-  (destructuring-bind (name &key (from :unknown) &allow-other-keys) args
-    (html-for-download-link cliki stream from name)))
-
-(defmethod html-for-keyword ((cliki cliki-view) stream
-                             (keyword (eql :package))
-                             &rest args)
-  (let ((merged
-         (urlstring (merge-url (parse-urlstring "http://ww.telent.net/cclan/")
-                               (car args)))))
-    (format stream
-      "<a class=\"download\" href=\"~A\"
-><b>Download ASDF package from ~A</b></a>"
-      merged merged )))
-
-
-
-(defun legacy-search-result (cliki string stream)
-  ;; this business with read-from-string is a hangover from Ye Olde
-  ;; search syntax
-  (let* ((*read-eval* nil)
-         (form (read-from-string (format nil "( ~A )" string) nil nil)))
-    (destructuring-bind (term &key attribute match case-sensitive) form
-      (let ((pages
-             (legacy-search-pages
-              cliki term :attribute attribute
-              :match match :case-sensitive case-sensitive)))
-        (html-stream
-         stream
-         `(ul
-              ,@(mapcar
-                 (lambda (x)
-                   (let ((title (page-title x))
-                         (sentence (or (page-first-sentence x) "(no summary)")))
-                     `(li ,(write-a-href cliki title nil)
-                        " - "
-                        ,(subst-markup-in-string cliki sentence))))
-                 pages)))))))
-
-(defun strip-outer-parens (string)
-  (and (eql (elt string 0) #\()
-       (subseq string 1 (- (length string) 1))))
-
-
-(defgeneric write-a-href (cliki-view title stream))
-(defmethod write-a-href ((cliki cliki-view) title stream)
-  "Write an A HREF element for the CLiki page TITLE.  STREAM may be an open stream or T or NIL, a la FORMAT"
-  (let ((escaped (urlstring-escape title))
-        (p (find-page cliki title)))
-    (if (and p (page-pathname p))
-      (format stream "<a class=\"internal\" href=\"~A\" >~A</a>" escaped title)
-      (format stream "~A<a class=\"internal\" href=\"edit/~A\" >?</a>" title escaped))))
-
-(defun read-matched-parens (stream)
-  "Read from STREAM until we have seen as many #\) as #\(, returning
-the string read.  Characters may be escaped by a preceding backslash;
-this is left in the output but not counted by the bracket matcher"
-  (let ((eof (gensym))
-        (nesting 0))
-    (with-output-to-string (out)
-      (loop
-       (let ((c (read-char stream nil eof)))
-         (if (eql c eof) (return out))
-         (if (eql c #\\)
-           (progn
-             (write-char c out)
-             (setf c (read-char stream nil eof)))
-           (progn
-             (if (eql c #\() (incf nesting))
-             (if (eql c #\)) (decf nesting))))
-         (write-char c out)
-         (if (eql nesting 0) (return out))
-         )))))
-
-
-
diff --git a/cl-posix/susv3.lisp b/cl-posix/susv3.lisp
index 5230856..7706192 100644
--- a/cl-posix/susv3.lisp
+++ b/cl-posix/susv3.lisp
@@ -28,34 +28,31 @@
 ;;;;
 ;;;;
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2003 - 2003
-;;;;    mailto:pjb@informatimago.com
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************


-(defPACKAGE "COM.INFORMATIMAGO.CLISP.SUSV3"
-  (:DOCUMENTATION "This packages exports SUSV3 functions.
+(defpackage "COM.INFORMATIMAGO.CLISP.SUSV3"
+  (:documentation "This packages exports SUSV3 functions.
     This is the CLISP specific implementation of the SUSV3 API.")
   (:use "COMMON-LISP"
         "EXT" "LINUX")
-  (:EXPORT
+  (:export

    ;; NOT IN SUSV3 API (Lisp/C support stuff):
    "BOUND-STRING" ;; type (BOUND-STRING min max)
@@ -93,29 +90,29 @@
 ;; Lisp/C support stuff


-(DEFTYPE BOUND-STRING (MIN MAX)
+(deftype bound-string (min max)
   "A TYPE REPRESENTING STRINGS OF MINIMUM SIZE MIN AND MAXIMUM SIZE MAX."
-  (IF (= (EVAL MIN) (EVAL MAX))
-    `(STRING ,(EVAL MIN))
-    `STRING) ;; TODO: (OR (STRING MIN) (STRING (1+ MIN)) ... (STRING MAX))
+  (if (= (eval min) (eval max))
+    `(string ,(eval min))
+    `string) ;; TODO: (OR (STRING MIN) (STRING (1+ MIN)) ... (STRING MAX))
   );;BOUND-STRING


-(DEFINE-CONDITION SUSV3-ERROR ()
+(define-condition susv3-error ()
   (
-   (ERRNO :INITARG :ERRNO
-          :ACCESSOR ERRNO
-          :TYPE (SIGNED-BYTE 32))
+   (errno :initarg :errno
+          :accessor errno
+          :type (signed-byte 32))
    ));;SUSV3-ERROR


-(DEFMACRO CHECK-ERRNO (&BODY BODY)
-  `(PROGN
-     (SETQ LINUX:|errno| 0)
-     (LET ((RESULT (PROGN ,@BODY)))
-       (IF (/= 0 LINUX:|errno|)
-         (SIGNAL (MAKE-CONDITION 'SUSV3-ERROR  :ERRNO LINUX:|errno|))
-         RESULT)))
+(defmacro check-errno (&body body)
+  `(progn
+     (setq linux:|errno| 0)
+     (let ((result (progn ,@body)))
+       (if (/= 0 linux:|errno|)
+         (signal (make-condition 'susv3-error  :errno linux:|errno|))
+         result)))
   );;CHECK-ERRNO


@@ -124,15 +121,15 @@
 ;; ???


-(DECLARE (FTYPE (FUNCTION (STRING) (OR NULL STRING)) GETENV))
+(declare (ftype (function (string) (or null string)) getenv))


-(DEFUN GETENV (NAME)
+(defun getenv (name)
   "
 URL:        http://www.opengroup.org/onlinepubs/007904975/functions/getenv.html
 RETURN:     NIL or the value of the environment variable named NAME.
 "
-  (EXT:GETENV NAME)
+  (ext:getenv name)
   );;GETENV


@@ -140,45 +137,45 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; sys/types.h


-(DEFTYPE INO-T ()
+(deftype ino-t ()
   "The type of file serial numbers."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;INO-T


-(DEFTYPE DEV-T ()
+(deftype dev-t ()
   "Device ID."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;DEV-T


-(DEFTYPE MODE-T ()
+(deftype mode-t ()
   "Mode of file."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;MODE-T


-(DEFTYPE NLINK-T ()
+(deftype nlink-t ()
   "Number of hard links to the file."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;NLINK-T


-(DEFTYPE UID-T ()
+(deftype uid-t ()
   "User ID."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;UID-T


-(DEFTYPE GID-T ()
+(deftype gid-t ()
   "Group ID."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;GID-T


-(DEFTYPE TIME-T ()
+(deftype time-t ()
   "Time in seconds since epoch."
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;TIME-T


@@ -187,41 +184,41 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; sys/stat.h


-(DEFTYPE BLKSIZE-T
+(deftype blksize-t
   ""
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;BLKSIZE-T


-(DEFTYPE BLKCNT-T
+(deftype blkcnt-t
   ""
-  `(UNSIGNED-BYTE 32)
+  `(unsigned-byte 32)
   );;BLKCNT-T



-(DEFSTRUCT STAT
-  (DEV     0 :TYPE DEV-T) ;; Device ID of device containing file.
-  (INO     0 :TYPE INO-T) ;; File serial number.
-  (MODE    0 :TYPE MODE-T) ;; Mode of file (see below).
-  (NLINK   0 :TYPE NLINK-T) ;; Number of hard links to the file.
-  (UID     0 :TYPE UID-T) ;; User ID of file.
-  (GID     0 :TYPE GID-T) ;; Group ID of file.
-  (RDEV    0 :TYPE DEV-T) ;; XSI: Device ID (if file is char or block special).
-  (SIZE    0 :TYPE OFF-T) ;; For regular files, the file size in bytes.
+(defstruct stat
+  (dev     0 :type dev-t) ;; Device ID of device containing file.
+  (ino     0 :type ino-t) ;; File serial number.
+  (mode    0 :type mode-t) ;; Mode of file (see below).
+  (nlink   0 :type nlink-t) ;; Number of hard links to the file.
+  (uid     0 :type uid-t) ;; User ID of file.
+  (gid     0 :type gid-t) ;; Group ID of file.
+  (rdev    0 :type dev-t) ;; XSI: Device ID (if file is char or block special).
+  (size    0 :type off-t) ;; For regular files, the file size in bytes.
   ;;                      For symbolic links, the length in bytes of the
   ;;                      pathname contained in the symbolic link.
   ;;                      SHM: For a shared memory object, the length in bytes.
   ;;                      TYM: For a typed memory object, the length in bytes.
   ;;                      For other file types, the use of this field is
   ;;                      unspecified.
-  (ATIME   0 :TYPE TIME-T) ;; Time of last access.
-  (MTIME   0 :TYPE TIME-T) ;; Time of last data modification.
-  (CTIME   0 :TYPE TIME-T) ;; Time of last status change.
-  (BLKSIZE 0 :TYPE BLKSIZE-T) ;; XSI: A file system-specific preferred I/O
+  (atime   0 :type time-t) ;; Time of last access.
+  (mtime   0 :type time-t) ;; Time of last data modification.
+  (ctime   0 :type time-t) ;; Time of last status change.
+  (blksize 0 :type blksize-t) ;; XSI: A file system-specific preferred I/O
   ;;                      block size for this object. In some file system
   ;;                      types, this may vary from file to file.
-  (BLOCKS  0 :TYPE BLKCNT-T) ;; XSI: Num. of blocks allocated for this object.
+  (blocks  0 :type blkcnt-t) ;; XSI: Num. of blocks allocated for this object.
   );;STAT


@@ -263,14 +260,14 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;;     Symbolic link.S_IFSOCK
 ;;     Socket. [Option End]

-(DEFCONSTANT S-IFMT  #O0170000)
-(DEFCONSTANT S-IFDIR  #O040000)
-(DEFCONSTANT S-IFCHR  #O020000)
-(DEFCONSTANT S-IFBLK  #O060000)
-(DEFCONSTANT S-IFREG  #O100000)
-(DEFCONSTANT S-IFIFO  #O010000)
-(DEFCONSTANT S-IFLNK  #O120000)
-(DEFCONSTANT S-IFSOCK #O140000)
+(defconstant s-ifmt  #o0170000)
+(defconstant s-ifdir  #o040000)
+(defconstant s-ifchr  #o020000)
+(defconstant s-ifblk  #o060000)
+(defconstant s-ifreg  #o100000)
+(defconstant s-ififo  #o010000)
+(defconstant s-iflnk  #o120000)
+(defconstant s-ifsock #o140000)


 ;; File mode bits:
@@ -318,26 +315,26 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO.


-(DEFCONSTANT S-ISUID  #O004000)
-(DEFCONSTANT S-ISGID  #O002000)
-(DEFCONSTANT S-ISVTX  #O001000)
+(defconstant s-isuid  #o004000)
+(defconstant s-isgid  #o002000)
+(defconstant s-isvtx  #o001000)

-(DEFINE-SYMBOL-MACRO S-IREAD S-IRUSR)
-(DEFINE-SYMBOL-MACRO S-IWRITE S-IWUSR)
-(DEFINE-SYMBOL-MACRO S-IEXEC S-IXUSR)
+(define-symbol-macro s-iread s-irusr)
+(define-symbol-macro s-iwrite s-iwusr)
+(define-symbol-macro s-iexec s-ixusr)

-(DEFCONSTANT S-IRUSR  #O000400)
-(DEFCONSTANT S-IWUSR  #O000200)
-(DEFCONSTANT S-IXUSR  #O000100)
-(DEFCONSTANT S-IRWXU  (LOGIOR S-IRUSR S-IWUSR S-IXUSR))
-(DEFCONSTANT S-IRGRP  #O000040)
-(DEFCONSTANT S-IWGRP  #O000020)
-(DEFCONSTANT S-IXGRP  #O000010)
-(DEFCONSTANT S-IRWXG  (LOGIOR S-IRGRP S-IWGRP S-IXGRP))
-(DEFCONSTANT S-IROTH  #O000004)
-(DEFCONSTANT S-IWOTH  #O000002)
-(DEFCONSTANT S-IXOTH  #O000001)
-(DEFCONSTANT S-IRWXO  (LOGIOR S-IROTH S-IWOTH S-IXOTH))
+(defconstant s-irusr  #o000400)
+(defconstant s-iwusr  #o000200)
+(defconstant s-ixusr  #o000100)
+(defconstant s-irwxu  (logior s-irusr s-iwusr s-ixusr))
+(defconstant s-irgrp  #o000040)
+(defconstant s-iwgrp  #o000020)
+(defconstant s-ixgrp  #o000010)
+(defconstant s-irwxg  (logior s-irgrp s-iwgrp s-ixgrp))
+(defconstant s-iroth  #o000004)
+(defconstant s-iwoth  #o000002)
+(defconstant s-ixoth  #o000001)
+(defconstant s-irwxo  (logior s-iroth s-iwoth s-ixoth))


 ;; The following macros shall be provided to test whether a file is of
@@ -355,13 +352,13 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; Test for a symbolic link.S_ISSOCK(m)
 ;; Test for a socket.

-(DEFMACRO S-ISDIR  (M) `(= (LOGAND ,M S-IFMT) S-IFDIR))
-(DEFMACRO S-ISCHR  (M) `(= (LOGAND ,M S-IFMT) S-IFCHR))
-(DEFMACRO S-ISBLK  (M) `(= (LOGAND ,M S-IFMT) S-IFBLK))
-(DEFMACRO S-ISREG  (M) `(= (LOGAND ,M S-IFMT) S-IFREG))
-(DEFMACRO S-ISFIFO (M) `(= (LOGAND ,M S-IFMT) S-IFFIFO))
-(DEFMACRO S-ISLNK  (M) `(= (LOGAND ,M S-IFMT) S-IFLNK))
-(DEFMACRO S-ISSOCK (M) `(= (LOGAND ,M S-IFMT) S-IFSOCK))
+(defmacro s-isdir  (m) `(= (logand ,m s-ifmt) s-ifdir))
+(defmacro s-ischr  (m) `(= (logand ,m s-ifmt) s-ifchr))
+(defmacro s-isblk  (m) `(= (logand ,m s-ifmt) s-ifblk))
+(defmacro s-isreg  (m) `(= (logand ,m s-ifmt) s-ifreg))
+(defmacro s-isfifo (m) `(= (logand ,m s-ifmt) s-iffifo))
+(defmacro s-islnk  (m) `(= (logand ,m s-ifmt) s-iflnk))
+(defmacro s-issock (m) `(= (logand ,m s-ifmt) s-ifsock))


 ;; The implementation may implement message queues, semaphores, or
@@ -406,92 +403,92 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; int    stat(const char *restrict, struct stat *restrict);
 ;; mode_t umask(mode_t);

-(DECLARE
- (FTYPE (FUNCTION (STRING MODE-T)  NIL)    CHMOD)
- (FTYPE (FUNCTION (INTEGER MODE-T) NIL)    FCHMOD)
- (FTYPE (FUNCTION (INTEGER)        STAT)   FSTAT)
- (FTYPE (FUNCTION (STRING)         STAT)   LSTAT)
- (FTYPE (FUNCTION (STRING)         STAT)   STAT)
- (FTYPE (FUNCTION (STRING MODE-T)  NIL)    MKDIR)
- (FTYPE (FUNCTION (STRING MODE-T)  NIL)    MKFIFO)
- (FTYPE (FUNCTION (MODE-T)         MODE-T) UMASK)
+(declare
+ (ftype (function (string mode-t)  nil)    chmod)
+ (ftype (function (integer mode-t) nil)    fchmod)
+ (ftype (function (integer)        stat)   fstat)
+ (ftype (function (string)         stat)   lstat)
+ (ftype (function (string)         stat)   stat)
+ (ftype (function (string mode-t)  nil)    mkdir)
+ (ftype (function (string mode-t)  nil)    mkfifo)
+ (ftype (function (mode-t)         mode-t) umask)
  )

-(DECLARE ;; XSI
- (FTYPE (FUNCTION (STRING MODE-T DEV-T) NIL) MKNOD)
+(declare ;; XSI
+ (ftype (function (string mode-t dev-t) nil) mknod)
 )



-(DEFUN CHMOD (PATH MODE)
-  (CHECK-ERRNO (LINUX:|chmod| PATH MODE))
-  (VALUES)
+(defun chmod (path mode)
+  (check-errno (linux:|chmod| path mode))
+  (values)
   );;CHMOD


-(DEFUN FCHMOD (FD MODE)
-  (CHECK-ERRNO (LINUX:|fchmod| FD MODE))
-  (VALUES)
+(defun fchmod (fd mode)
+  (check-errno (linux:|fchmod| fd mode))
+  (values)
   );;FCHMOD


-(DEFMACRO LINUX-STAT->SUSV3-STAT (SB)
+(defmacro linux-stat->susv3-stat (sb)
   "
 PRIVATE
 "
-  `(MAKE-STAT
-    :DEV (LINUX:|stat-st_dev| ,SB)
-    :INO (LINUX:|stat-st_ino| ,SB)
-    :MODE (LINUX:|stat-st_mode| ,SB)
-    :NLINK (LINUX:|stat-st_nlink| ,SB)
-    :UID (LINUX:|stat-st_uid| ,SB)
-    :GID (LINUX:|stat-st_gid| ,SB)
-    :RDEV (LINUX:|stat-st_rdev| ,SB)
-    :SIZE (LINUX:|stat-st_size| ,SB)
-    :ATIME (LINUX:|stat-st_atime| ,SB)
-    :MTIME (LINUX:|stat-st_mtime| ,SB)
-    :CTIME (LINUX:|stat-st_ctime| ,SB)
-    :BLKSIZE (LINUX:|stat-st_blksize| ,SB)
-    :BLOCKS (LINUX:|stat-st_blocks| ,SB))
+  `(make-stat
+    :dev (linux:|stat-st_dev| ,sb)
+    :ino (linux:|stat-st_ino| ,sb)
+    :mode (linux:|stat-st_mode| ,sb)
+    :nlink (linux:|stat-st_nlink| ,sb)
+    :uid (linux:|stat-st_uid| ,sb)
+    :gid (linux:|stat-st_gid| ,sb)
+    :rdev (linux:|stat-st_rdev| ,sb)
+    :size (linux:|stat-st_size| ,sb)
+    :atime (linux:|stat-st_atime| ,sb)
+    :mtime (linux:|stat-st_mtime| ,sb)
+    :ctime (linux:|stat-st_ctime| ,sb)
+    :blksize (linux:|stat-st_blksize| ,sb)
+    :blocks (linux:|stat-st_blocks| ,sb))
   );;LINUX-STAT->SUSV3-STAT


-(DEFUN STAT (PATH)
-    (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|stat| PATH)))
+(defun stat (path)
+    (linux-stat->susv3-stat (check-errno (linux:|stat| path)))
   );;STAT


-(DEFUN LSTAT (PATH)
-    (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|lstat| PATH)))
+(defun lstat (path)
+    (linux-stat->susv3-stat (check-errno (linux:|lstat| path)))
   );;LSTAT


-(DEFUN FSTAT (FD)
-    (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|fstat| FD)))
+(defun fstat (fd)
+    (linux-stat->susv3-stat (check-errno (linux:|fstat| fd)))
   );;FSTAT


-(DEFUN MKDIR (PATH MODE)
-  (CHECK-ERRNO (LINUX:|mkdir| PATH MODE))
-  (VALUES)
+(defun mkdir (path mode)
+  (check-errno (linux:|mkdir| path mode))
+  (values)
   );;MKDIR


-(DEFUN MKFIFO (PATH MODE)
-  (CHECK-ERRNO (LINUX:|mkfifo| PATH MODE))
-  (VALUES)
+(defun mkfifo (path mode)
+  (check-errno (linux:|mkfifo| path mode))
+  (values)
   );;MKFIFO


-(DEFUN UMASK (MODE)
-  (LINUX:|umask| MODE)
+(defun umask (mode)
+  (linux:|umask| mode)
   );;UMASK


   ;;XSI
-(DEFUN MKNOD (PATH MODE DEVICE)
-  (CHECK-ERRNO (LINUX:|mknod| PATH MODE DEVICE))
-  (VALUES)
+(defun mknod (path mode device)
+  (check-errno (linux:|mknod| path mode device))
+  (values)
   );;MKNOD


@@ -499,78 +496,78 @@ PRIVATE
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; dirent.h

-(DEFCONSTANT +NAME-MAX+ 255)
+(defconstant +name-max+ 255)


-(DEFTYPE DIR ()
+(deftype dir ()
   "A type representing a directory stream."
-  `T
+  `t
   );;DIR


-(DEFSTRUCT DIRENT
-  (INO  0  :TYPE INO-T) ;; File serial number
-  (NAME "" :TYPE (BOUND-STRING 0 +NAME-MAX+)) ;; Name of entry
+(defstruct dirent
+  (ino  0  :type ino-t) ;; File serial number
+  (name "" :type (bound-string 0 +name-max+)) ;; Name of entry
   );;DIRENT


-(DECLAIM
- (FTYPE (FUNCTION (DIR)    INTEGER)          CLOSEDIR)
- (FTYPE (FUNCTION (STRING) (OR NULL DIR))    OPENDIR)
- (FTYPE (FUNCTION (DIR)    (OR NULL DIRENT)) READDIR)
- (FTYPE (FUNCTION (DIR)    NIL)              REWINDDIR)
+(declaim
+ (ftype (function (dir)    integer)          closedir)
+ (ftype (function (string) (or null dir))    opendir)
+ (ftype (function (dir)    (or null dirent)) readdir)
+ (ftype (function (dir)    nil)              rewinddir)
  )


-(DECLAIM ;; XSI
- (FTYPE (FUNCTION (DIR INTEGER) NIL)         SEEKDIR)
- (FTYPE (FUNCTION (DIR)         INTEGER)     TELLDIR)
+(declaim ;; XSI
+ (ftype (function (dir integer) nil)         seekdir)
+ (ftype (function (dir)         integer)     telldir)
  )


-(DEFUN OPENDIR (PATH)
-  (CHECK-ERRNO (LINUX:|opendir| PATH))
+(defun opendir (path)
+  (check-errno (linux:|opendir| path))
   );;OPENDIR


-(DEFUN CLOSEDIR (DIR-STREAM)
-  (CHECK-ERRNO (LINUX:|closedir| DIR-STREAM))
+(defun closedir (dir-stream)
+  (check-errno (linux:|closedir| dir-stream))
   );;CLOSEDIR


-(DEFUN READDIR (DIR-STREAM)
-  (LET ((C-DIRENT (CHECK-ERRNO (LINUX:|readdir| DIR-STREAM))))
-    (AND C-DIRENT
-         (MAKE-DIRENT :INO (LINUX::|dirent-d_ino| C-DIRENT)
-                      :NAME (LINUX::|dirent-d_name| C-DIRENT))))
+(defun readdir (dir-stream)
+  (let ((c-dirent (check-errno (linux:|readdir| dir-stream))))
+    (and c-dirent
+         (make-dirent :ino (linux::|dirent-d_ino| c-dirent)
+                      :name (linux::|dirent-d_name| c-dirent))))
   );;READDIR


-(DEFUN REWINDDIR (DIR-STREAM)
-  (CHECK-ERRNO (LINUX:|rewinddir| DIR-STREAM))
-  (VALUES)
+(defun rewinddir (dir-stream)
+  (check-errno (linux:|rewinddir| dir-stream))
+  (values)
   );;REWINDDIR



-(DEFUN SEEKDIR (DIR-STREAM POSITION)
-  (CHECK-ERRNO (LINUX:|seekdir| DIR-STREAM POSITION))
-  (VALUES)
+(defun seekdir (dir-stream position)
+  (check-errno (linux:|seekdir| dir-stream position))
+  (values)
   );;SEEKDIR


-(DEFUN TELLDIR (DIR-STREAM)
-  (CHECK-ERRNO (LINUX:|telldir| DIR-STREAM))
+(defun telldir (dir-stream)
+  (check-errno (linux:|telldir| dir-stream))
   );;TELLDIR




-(DEFUN DIRENT-TEST ()
-  (DO* ((DIR-STREAM (OPENDIR "/tmp"))
-        (ENTRY (READDIR DIR-STREAM) (READDIR DIR-STREAM)))
-      ((NULL ENTRY))
-    (FORMAT T "entry: ~8D ~S~%" (DIRENT-INO ENTRY) (DIRENT-NAME ENTRY)))
+(defun dirent-test ()
+  (do* ((dir-stream (opendir "/tmp"))
+        (entry (readdir dir-stream) (readdir dir-stream)))
+      ((null entry))
+    (format t "entry: ~8D ~S~%" (dirent-ino entry) (dirent-name entry)))
   );;DIRENT-TEST


diff --git a/clext/character-sets.lisp b/clext/character-sets.lisp
index 0fd0814..631d398 100644
--- a/clext/character-sets.lisp
+++ b/clext/character-sets.lisp
@@ -33,12 +33,12 @@
 ;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;**************************************************************************

-(IN-PACKAGE "COMMON-LISP-USER")
-(DEFPACKAGE "COM.INFORMATIMAGO.CLEXT.CHARACTER-SETS"
-  (:USE "COMMON-LISP"
+(in-package "COMMON-LISP-USER")
+(defpackage "COM.INFORMATIMAGO.CLEXT.CHARACTER-SETS"
+  (:use "COMMON-LISP"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.CHARACTER-SETS")
-  (:EXPORT
+  (:export
    "MAKE-EXTERNAL-FORMAT"
    "EXTERNAL-FORMAT-CHARACTER-ENCODING"
    "EXTERNAL-FORMAT-LINE-TERMINATION"
@@ -47,7 +47,7 @@
    "CHARACTER-SET-TO-EMACS-ENCODING"
    "CHARACTER-SET-FROM-EMACS-ENCODING"
    "EMACS-ENCODING-TO-LISP-EXTERNAL-FORMAT")
-  (:DOCUMENTATION "
+  (:documentation "
 This package exports functions to manage character-sets,
 character encodings, coding systems and external format.
 It's all the same, but everyone likes to have his own terms...
@@ -56,7 +56,7 @@ Copyright Pascal J. Bourguignon 2005 - 2012
 This package is provided under the GNU General Public Licence.
 See the source file for details.
 "))
-(IN-PACKAGE "COM.INFORMATIMAGO.CLEXT.CHARACTER-SETS")
+(in-package "COM.INFORMATIMAGO.CLEXT.CHARACTER-SETS")


 (defparameter *aliases*
@@ -130,74 +130,74 @@ RETURN:     A new list of name and aliases, with the ALIASES added, if

   #+(and ccl (not ccl-1.6))
   (mapcar (lambda (x) (mapcar (function string-upcase) x))
-          '((:ISO-8859-1 :ISO_8859-1 :LATIN1 :L1 :IBM819 :CP819 :CSISOLATIN1)
-            (:ISO-8859-2 :ISO_8859-2 :LATIN-2 :L2 :CSISOLATIN2)
-            (:ISO-8859-3 :ISO_8859-3 :LATIN3 :L3 :CSISOLATIN3)
-            (:ISO-8859-4 :ISO_8859-4 :LATIN4 :L4 :CSISOLATIN4)
-            (:ISO-8859-5 :ISO_8859-5 :CYRILLIC :CSISOLATINCYRILLIC :ISO-IR-144)
-            (:ISO-8859-6 :ISO_8859-6 :ARABIC :CSISOLATINARABIC :ISO-IR-127)
-            (:ISO-8859-7 :ISO_8859-7 :GREEK :GREEK8 :CSISOLATINGREEK :ISO-IR-126 :ELOT_928 :ECMA-118)
-            (:ISO-8859-8 :ISO_8859-8 :HEBREW :CSISOLATINHEBREW :ISO-IR-138)
-            (:ISO-8859-9 :ISO_8859-9 :LATIN5 :CSISOLATIN5 :ISO-IR-148)
-            (:ISO-8859-10 :ISO_8859-10 :LATIN6 :CSISOLATIN6 :ISO-IR-157)
-            (:ISO-8859-11)
-            (:ISO-8859-13)
-            (:ISO-8859-14 :ISO_8859-14 :ISO-IR-199 :LATIN8 :L8 :ISO-CELTIC)
-            (:ISO-8859-15 :ISO_8859-15 :LATIN9)
-            (:ISO-8859-16 :ISO_8859-16 :ISO-IR-199 :LATIN8 :L8 :ISO-CELTIC)
-            (:MACINTOSH :MACOS-ROMAN :MACOSROMAN :MAC-ROMAN :MACROMAN)
-            (:UCS-2)
-            (:UCS-2BE)
-            (:UCS-2LE)
-            (:US-ASCII :CSASCII :CP637 :IBM637 :US :ISO646-US :ASCII :ISO-IR-6)
-            (:UTF-16)
-            (:UTF-16BE)
-            (:UTF-16LE)
-            (:UTF-32 :UTF-4)
-            (:UTF-32BE :UCS-4BE)
-            (:UTF-8)
-            (:UTF-32LE :UCS-4LE)
-            (:Windows-31j  :CP932 :CSWINDOWS31J)
-            (:EUC-JP :EUCJP)))
+          '((:iso-8859-1 :iso_8859-1 :latin1 :l1 :ibm819 :cp819 :csisolatin1)
+            (:iso-8859-2 :iso_8859-2 :latin-2 :l2 :csisolatin2)
+            (:iso-8859-3 :iso_8859-3 :latin3 :l3 :csisolatin3)
+            (:iso-8859-4 :iso_8859-4 :latin4 :l4 :csisolatin4)
+            (:iso-8859-5 :iso_8859-5 :cyrillic :csisolatincyrillic :iso-ir-144)
+            (:iso-8859-6 :iso_8859-6 :arabic :csisolatinarabic :iso-ir-127)
+            (:iso-8859-7 :iso_8859-7 :greek :greek8 :csisolatingreek :iso-ir-126 :elot_928 :ecma-118)
+            (:iso-8859-8 :iso_8859-8 :hebrew :csisolatinhebrew :iso-ir-138)
+            (:iso-8859-9 :iso_8859-9 :latin5 :csisolatin5 :iso-ir-148)
+            (:iso-8859-10 :iso_8859-10 :latin6 :csisolatin6 :iso-ir-157)
+            (:iso-8859-11)
+            (:iso-8859-13)
+            (:iso-8859-14 :iso_8859-14 :iso-ir-199 :latin8 :l8 :iso-celtic)
+            (:iso-8859-15 :iso_8859-15 :latin9)
+            (:iso-8859-16 :iso_8859-16 :iso-ir-199 :latin8 :l8 :iso-celtic)
+            (:macintosh :macos-roman :macosroman :mac-roman :macroman)
+            (:ucs-2)
+            (:ucs-2be)
+            (:ucs-2le)
+            (:us-ascii :csascii :cp637 :ibm637 :us :iso646-us :ascii :iso-ir-6)
+            (:utf-16)
+            (:utf-16be)
+            (:utf-16le)
+            (:utf-32 :utf-4)
+            (:utf-32be :ucs-4be)
+            (:utf-8)
+            (:utf-32le :ucs-4le)
+            (:windows-31j  :cp932 :cswindows31j)
+            (:euc-jp :eucjp)))

   #+(and ccl ccl-1.6)
   (mapcar (lambda (x) (mapcar (function string-upcase) x))
-          '((:ISO-8859-1 :ISO_8859-1  :LATIN1  :L1  :IBM819  :CP819  :CSISOLATIN1)
-            (:ISO-8859-2 :ISO_8859-2  :LATIN-2  :L2  :CSISOLATIN2)
-            (:ISO-8859-3 :ISO_8859-3  :LATIN3 :L3  :CSISOLATIN3)
-            (:ISO-8859-4 :ISO_8859-4  :LATIN4  :L4  :CSISOLATIN4)
-            (:ISO-8859-5 :ISO_8859-5  :CYRILLIC  :CSISOLATINCYRILLIC  :ISO-IR-144)
-            (:ISO-8859-6 :ISO_8859-6  :ARABIC  :CSISOLATINARABIC  :ISO-IR-127)
-            (:ISO-8859-7 :ISO_8859-7  :GREEK  :GREEK8  :CSISOLATINGREEK  :ISO-IR-126  :ELOT_928  :ECMA-118)
-            (:ISO-8859-8 :ISO_8859-8  :HEBREW  :CSISOLATINHEBREW  :ISO-IR-138)
-            (:ISO-8859-9 :ISO_8859-9  :LATIN5  :CSISOLATIN5  :ISO-IR-148)
-            (:ISO-8859-10 :ISO_8859-10  :LATIN6  :CSISOLATIN6  :ISO-IR-157)
-            (:ISO-8859-11)
-            (:ISO-8859-13)
-            (:ISO-8859-14 :ISO_8859-14  :ISO-IR-199  :LATIN8  :L8  :ISO-CELTIC)
-            (:ISO-8859-15 :ISO_8859-15  :LATIN9)
-            (:ISO-8859-16 :ISO_8859-16  :ISO-IR-199  :LATIN8  :L8  :ISO-CELTIC)
-            (:MACINTOSH :MACOS-ROMAN  :MACOSROMAN  :MAC-ROMAN  :MACROMAN)
-            (:UCS-2)
-            (:UCS-2BE)
-            (:UCS-2LE)
-            (:US-ASCII :CSASCII  :CP637 :IBM637  :US  :ISO646-US  :ASCII  :ISO-IR-6)
-            (:UTF-16)
-            (:UTF-16BE)
-            (:UTF-16LE)
-            (:UTF-32 :UTF-4)
-            (:UTF-32BE :UCS-4BE)
-            (:UTF-8)
-            (:UTF-32LE :UCS-4LE)
-            (:Windows-31j :CP932  :CSWINDOWS31J)
-            (:EUC-JP :EUCJP)
-            (:GB2312 :GB2312-80 :GB2312-1980 :EUC-CN :EUCCN)
-            (:CP936 :GBK :MS936 :WINDOWS-936)))
+          '((:iso-8859-1 :iso_8859-1  :latin1  :l1  :ibm819  :cp819  :csisolatin1)
+            (:iso-8859-2 :iso_8859-2  :latin-2  :l2  :csisolatin2)
+            (:iso-8859-3 :iso_8859-3  :latin3 :l3  :csisolatin3)
+            (:iso-8859-4 :iso_8859-4  :latin4  :l4  :csisolatin4)
+            (:iso-8859-5 :iso_8859-5  :cyrillic  :csisolatincyrillic  :iso-ir-144)
+            (:iso-8859-6 :iso_8859-6  :arabic  :csisolatinarabic  :iso-ir-127)
+            (:iso-8859-7 :iso_8859-7  :greek  :greek8  :csisolatingreek  :iso-ir-126  :elot_928  :ecma-118)
+            (:iso-8859-8 :iso_8859-8  :hebrew  :csisolatinhebrew  :iso-ir-138)
+            (:iso-8859-9 :iso_8859-9  :latin5  :csisolatin5  :iso-ir-148)
+            (:iso-8859-10 :iso_8859-10  :latin6  :csisolatin6  :iso-ir-157)
+            (:iso-8859-11)
+            (:iso-8859-13)
+            (:iso-8859-14 :iso_8859-14  :iso-ir-199  :latin8  :l8  :iso-celtic)
+            (:iso-8859-15 :iso_8859-15  :latin9)
+            (:iso-8859-16 :iso_8859-16  :iso-ir-199  :latin8  :l8  :iso-celtic)
+            (:macintosh :macos-roman  :macosroman  :mac-roman  :macroman)
+            (:ucs-2)
+            (:ucs-2be)
+            (:ucs-2le)
+            (:us-ascii :csascii  :cp637 :ibm637  :us  :iso646-us  :ascii  :iso-ir-6)
+            (:utf-16)
+            (:utf-16be)
+            (:utf-16le)
+            (:utf-32 :utf-4)
+            (:utf-32be :ucs-4be)
+            (:utf-8)
+            (:utf-32le :ucs-4le)
+            (:windows-31j :cp932  :cswindows31j)
+            (:euc-jp :eucjp)
+            (:gb2312 :gb2312-80 :gb2312-1980 :euc-cn :euccn)
+            (:cp936 :gbk :ms936 :windows-936)))

   #+clisp
   (let ((h (make-hash-table)))
     (do-external-symbols (s "CHARSET")
-      (push (string-upcase s) (gethash (EXT:ENCODING-CHARSET s) h)))
+      (push (string-upcase s) (gethash (ext:encoding-charset s) h)))
     (let ((r '()))
       (maphash (lambda (k v) (declare (ignore k)) (push  v r)) h)
       r))
@@ -208,16 +208,16 @@ RETURN:     A new list of name and aliases, with the ALIASES added, if
             #+unicode ("UTF-8"))

   #+sbcl
-  (etypecase SB-IMPL::*EXTERNAL-FORMATS*
+  (etypecase sb-impl::*external-formats*
     (hash-table (let ((result '()))
                   (maphash (lambda (name encoding) (pushnew encoding result))
-                           SB-IMPL::*EXTERNAL-FORMATS*)
+                           sb-impl::*external-formats*)
                   (mapcar (lambda (encoding)
                             (mapcar (function string-upcase)
-                                    (slot-value encoding 'SB-IMPL::names)))
+                                    (slot-value encoding 'sb-impl::names)))
                           result)))
     (list (mapcar (lambda (x) (mapcar (function string-upcase) (first x)))
-                  SB-IMPL::*EXTERNAL-FORMATS*)))
+                  sb-impl::*external-formats*)))

   #-(or ccl clisp cmu sbcl)
   (progn
@@ -605,7 +605,7 @@ DO:     Read the character-set file and build the *character-sets* list,
         and character set ranges (found in clisp).
 RETURN: *character-sets*
 "
-  (setf *CHARACTER-SETS* (READ-CHARACTER-SETS-FILE "character-sets"))
+  (setf *character-sets* (read-character-sets-file "character-sets"))
   (fill-character-set-emacs-encoding)
   (fill-character-set-lisp-encoding)
   (dolist (cs *character-sets*)
@@ -616,7 +616,7 @@ RETURN: *character-sets*
                           (cl:find-symbol "GET-CHARSET-RANGE" "SYSTEM"))
                          '(:and) '(:or))
               (map 'vector (function char-code)
-                   (SYSTEM::GET-CHARSET-RANGE charset))
+                   (system::get-charset-range charset))
               #-#.(cl:if (cl:ignore-errors
                           (cl:find-symbol "GET-CHARSET-RANGE" "SYSTEM"))
                          '(:and) '(:or))
@@ -638,7 +638,7 @@ RETURN: *character-sets*
                                   :do (incf i)
                                   :finally (return (1- i)))))
                'vector)))))
-  *CHARACTER-SETS*)
+  *character-sets*)


 ;;; Provide a default value for  *CHARACTER-SETS*
diff --git a/clext/closer-weak-test.lisp b/clext/closer-weak-test.lisp
index 2496490..1e89f72 100644
--- a/clext/closer-weak-test.lisp
+++ b/clext/closer-weak-test.lisp
@@ -14,8 +14,8 @@


 #+clisp(import '(ext:gc))
-#+sbcl (defun gc () (sb-ext:GC :full t))
-#+cmu  (import '(EXTENSIONS:GC))
+#+sbcl (defun gc () (sb-ext:gc :full t))
+#+cmu  (import '(extensions:gc))

 (defvar tab)

diff --git a/clext/closer-weak.lisp b/clext/closer-weak.lisp
index 6747579..6b940c7 100644
--- a/clext/closer-weak.lisp
+++ b/clext/closer-weak.lisp
@@ -32,24 +32,22 @@
 ;;;;    2006-05-19 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2006 - 2006
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;**************************************************************************

 ;;; (push :debug-weak *features*) in clisp to have it on clisp for debugging...
@@ -77,9 +75,9 @@
    as published by the Free Software Foundation; either version
    2 of the License, or (at your option) any later version.
    ")
-  (:USE "COMMON-LISP")
+  (:use "COMMON-LISP")
   #-(and clisp (not debug-weak))
-  (:SHADOW "HASH-TABLE" "MAKE-HASH-TABLE"
+  (:shadow "HASH-TABLE" "MAKE-HASH-TABLE"
            "HASH-TABLE-P" "HASH-TABLE-COUNT" "HASH-TABLE-REHASH-SIZE"
            "HASH-TABLE-REHASH-THRESHOLD" "HASH-TABLE-SIZE" "HASH-TABLE-TEST"
            "GETHASH" "REMHASH" "MAPHASH" "WITH-HASH-TABLE-ITERATOR" "CLRHASH")
@@ -142,8 +140,8 @@

 (defpackage "COM.INFORMATIMAGO.CLEXT.CLOSER-WEAK-USER"
   (:nicknames "CLOSER-WEAK-USER" "C2WEAK-USER")
-  (:USE "COMMON-LISP" "COM.INFORMATIMAGO.CLEXT.CLOSER-WEAK")
-  (:SHADOWING-IMPORT-FROM
+  (:use "COMMON-LISP" "COM.INFORMATIMAGO.CLEXT.CLOSER-WEAK")
+  (:shadowing-import-from
    "COM.INFORMATIMAGO.CLEXT.CLOSER-WEAK"
    "HASH-TABLE" "MAKE-HASH-TABLE"
    "HASH-TABLE-P" "HASH-TABLE-COUNT" "HASH-TABLE-REHASH-SIZE"
@@ -154,8 +152,8 @@

 ;; When testing, we call the garbage collector soon to be more precisely weak.
 #+(and weak-test clisp)(import '(ext:gc))
-#+(and weak-test sbcl) (defun gc () (sb-ext:GC :full t))
-#+(and weak-test cmu)  (import '(EXTENSIONS:GC))
+#+(and weak-test sbcl) (defun gc () (sb-ext:gc :full t))
+#+(and weak-test cmu)  (import '(extensions:gc))



@@ -167,19 +165,19 @@
 #+cmu
 (defun weak-pointer-p (object)
   "Returns true if the object is of type WEAK-POINTER."
-  (typep object 'EXTENSIONS:WEAK-POINTER))
+  (typep object 'extensions:weak-pointer))


 #+sbcl
 (defun weak-pointer-p (object)
   "Returns true if the object is of type WEAK-POINTER."
-  (typep object 'SB-EXT:WEAK-POINTER))
+  (typep object 'sb-ext:weak-pointer))


 #+(and clisp debug-weak)
 (defun weak-pointer-p (object)
   "Returns true if the object is of type WEAK-POINTER."
-  (EXT:WEAK-POINTER-P object))
+  (ext:weak-pointer-p object))



@@ -824,7 +822,7 @@ It has no effect when some key has already been garbage-collected.")
   self)

 #-(and clisp (not debug-weak))
-(defun HASH-TABLE-WEAK-P (object)
+(defun hash-table-weak-p (object)
   "http://clisp.cons.org/impnotes/hash-dict.html#make-hash"
   (and (typep object 'weak-hash-table) (wht-pair-type object)))

@@ -845,10 +843,10 @@ It has no effect when some key has already been garbage-collected.")

 #-(and clisp (not debug-weak))
 (defmethod initialize-instance ((self weak-hash-table)
-                                &KEY (TEST (function eql) testp)
-                                (SIZE 37)
+                                &key (test (function eql) testp)
+                                (size 37)
                                 (rehash-size 2.0)
-                                (REHASH-THRESHOLD 0.90)
+                                (rehash-threshold 0.90)
                                 (weak :key)
                                 (initial-contents nil)
                                 &allow-other-keys)
@@ -1097,11 +1095,11 @@ It has no effect when some key has already been garbage-collected.")


 #-(and clisp (not debug-weak))
-(defun MAKE-HASH-TABLE (&rest other-keys
-                        &KEY (TEST (function eql) testp)
-                        (SIZE nil sizep)
+(defun make-hash-table (&rest other-keys
+                        &key (test (function eql) testp)
+                        (size nil sizep)
                         (rehash-size nil rehash-size-p)
-                        (REHASH-THRESHOLD nil REHASH-THRESHOLD-p)
+                        (rehash-threshold nil rehash-threshold-p)
                         (weak nil #|:KEY :VALUE :KEY-AND-VALUE :KEY-OR-VALUE|#)
                         ;; implementation dependant:
                         &allow-other-keys)
diff --git a/clext/init.lisp b/clext/init.lisp
index 4919e05..2cdd68d 100644
--- a/clext/init.lisp
+++ b/clext/init.lisp
@@ -19,32 +19,30 @@
 ;;;;    2006-06-05 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2006 - 2006
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(SETQ *LOAD-VERBOSE* NIL)
+(setq *load-verbose* nil)

 ;; clean the imported packages:
-(MAPC (LAMBDA (USED) (UNUSE-PACKAGE USED "COMMON-LISP-USER"))
-      (REMOVE (FIND-PACKAGE "COMMON-LISP")
-              (COPY-SEQ (PACKAGE-USE-LIST "COMMON-LISP-USER"))))
+(mapc (lambda (used) (unuse-package used "COMMON-LISP-USER"))
+      (remove (find-package "COMMON-LISP")
+              (copy-seq (package-use-list "COMMON-LISP-USER"))))


 (progn
@@ -67,9 +65,9 @@


 #+clisp
-(when (string= (LISP-IMPLEMENTATION-VERSION)  "2.33.83"
-               :end1 (min (length (LISP-IMPLEMENTATION-VERSION)) 7))
-  (EXT:WITHOUT-PACKAGE-LOCK ("COMMON-LISP")
+(when (string= (lisp-implementation-version)  "2.33.83"
+               :end1 (min (length (lisp-implementation-version)) 7))
+  (ext:without-package-lock ("COMMON-LISP")
     (let ((oldload (function cl:load)))
       (fmakunbound 'cl:load)
       (defun cl:load (filespec &key (verbose *load-verbose*)
@@ -79,7 +77,7 @@
         (handler-case (funcall oldload filespec :verbose verbose
                                :print print :if-does-not-exist if-does-not-exist
                                :external-format external-format)
-          (SYSTEM::SIMPLE-PARSE-ERROR
+          (system::simple-parse-error
               ()
             (funcall oldload (translate-logical-pathname filespec)
                      :verbose verbose
@@ -119,14 +117,14 @@
      ((:name :wild :type nil   :version nil)   "*"))
    #+sbcl
    '(((:name :wild :type :wild :version :wild)  "*.*"))
-   #-(OR CLISP sbcl)
+   #-(or clisp sbcl)
    '(((:name :wild :type nil   :version nil)   "*")
      ((:name :wild :type :wild :version nil)   "*.*")
      ((:name :wild :type :wild :version :wild) "*.*"))))


-(setf (LOGICAL-PATHNAME-TRANSLATIONS "PACKAGES") NIL
-      (LOGICAL-PATHNAME-TRANSLATIONS "PACKAGES")
+(setf (logical-pathname-translations "PACKAGES") nil
+      (logical-pathname-translations "PACKAGES")
       (append
        (make-translations "PACKAGES" '("COM" "INFORMATIMAGO" "CLEXT")
                           *project-directory*)
@@ -134,10 +132,10 @@
        ;; but compile.lisp uses com.informatimago.common-lisp.make-depends.make-depends
        (make-translations "PACKAGES" '() (get-directory :share-lisp "packages/"))))

-(HANDLER-CASE (LOAD "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE")
-  (T ()       (LOAD "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE.LISP")))
+(handler-case (load "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE")
+  (t ()       (load "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE.LISP")))

-(IMPORT 'PACKAGE:DEFINE-PACKAGE)
+(import 'package:define-package)


 ;;;; init.lisp                        --                     --          ;;;;
diff --git a/clext/tests.lisp b/clext/tests.lisp
index 71b07da..5a32ca8 100644
--- a/clext/tests.lisp
+++ b/clext/tests.lisp
@@ -9,7 +9,7 @@

 (defun princ-error (c) (format t "~&[~A]: ~A~%" (type-of c) c))

-#+OLD-CLISP
+#+old-clisp
 ;; Binding *ERROR-HANDLER* is a hammer technique for catching errors. It also
 ;; disables CLCS processing and thus breaks tests that rely on the condition
 ;; system, such as:
@@ -17,9 +17,9 @@
 ;;   - all tests that use IGNORE-ERRORS
 (defmacro with-ignored-errors (&rest forms)
   (let ((b (gensym)))
-    `(BLOCK ,b
-       (LET ((*ERROR-HANDLER*
-              #'(LAMBDA (&REST ARGS)
+    `(block ,b
+       (let ((*error-handler*
+              #'(lambda (&rest args)
                   (with-standard-io-syntax
                     (let* ((*print-readably* nil)
                            (error-message (apply #'format nil (cdr args))))
@@ -27,32 +27,32 @@
                       (return-from ,b (values 'error error-message)))))))
          ,@forms))))

-#+(or (and AKCL (not GCL)) ECL)
+#+(or (and akcl (not gcl)) ecl)
 (defmacro with-ignored-errors (&rest forms)
   (let ((b (gensym))
         (h (gensym)))
-    `(BLOCK ,b
-       (LET ((,h (SYMBOL-FUNCTION 'SYSTEM:UNIVERSAL-ERROR-HANDLER)))
-         (UNWIND-PROTECT
-              (PROGN (SETF (SYMBOL-FUNCTION 'SYSTEM:UNIVERSAL-ERROR-HANDLER)
-                           #'(LAMBDA (&REST ARGS) (RETURN-FROM ,b 'ERROR)))
+    `(block ,b
+       (let ((,h (symbol-function 'system:universal-error-handler)))
+         (unwind-protect
+              (progn (setf (symbol-function 'system:universal-error-handler)
+                           #'(lambda (&rest args) (return-from ,b 'error)))
                      ,@forms)
-           (SETF (SYMBOL-FUNCTION 'SYSTEM:UNIVERSAL-ERROR-HANDLER) ,h))))))
+           (setf (symbol-function 'system:universal-error-handler) ,h))))))

-#+ALLEGRO
+#+allegro
 (defmacro with-ignored-errors (&rest forms)
   (let ((r (gensym)))
-    `(LET ((,r (MULTIPLE-VALUE-LIST (EXCL:ERRORSET (PROGN ,@forms)))))
-       (IF (CAR ,r) (VALUES-LIST (CDR ,r)) 'ERROR))))
+    `(let ((,r (multiple-value-list (excl:errorset (progn ,@forms)))))
+       (if (car ,r) (values-list (cdr ,r)) 'error))))

-#-(or OLD-CLISP (and AKCL (not GCL)) ECL ALLEGRO)
+#-(or old-clisp (and akcl (not gcl)) ecl allegro)
 (defmacro with-ignored-errors (&rest forms)
   (let ((b (gensym)))
-    `(BLOCK ,b
-       (HANDLER-BIND
-           ((ERROR #'(LAMBDA (CONDITION)
-                       (PRINC-ERROR CONDITION)
-                       (RETURN-FROM ,b (values 'ERROR
+    `(block ,b
+       (handler-bind
+           ((error #'(lambda (condition)
+                       (princ-error condition)
+                       (return-from ,b (values 'error
                                                (princ-to-string condition))))))
          ,@forms))))

@@ -62,8 +62,8 @@
 ;; (lisp-implementation-type) may return something quite long, e.g.,
 ;; on CMUCL it returns "CMU Common Lisp".
 (defvar lisp-implementation
-  #+CLISP "CLISP" #+(and AKCL (not GCL)) "AKCL" #+GCL "GCL" #+ECL "ECL" #+ALLEGRO "ALLEGRO" #+CMU "CMUCL"
-  #-(or CLISP AKCL GCL ECL ALLEGRO CMU) (lisp-implementation-type))
+  #+clisp "CLISP" #+(and akcl (not gcl)) "AKCL" #+gcl "GCL" #+ecl "ECL" #+allegro "ALLEGRO" #+cmu "CMUCL"
+  #-(or clisp akcl gcl ecl allegro cmu) (lisp-implementation-type))

 (defvar *eval-method* :eval)
 (defvar *eval-out* nil)
@@ -228,9 +228,9 @@ NIL: sacla-style: forms should evaluate to non-NIL.")
     (setq *run-test-truename* (truename s))
     (format t "~&~s: started ~s~%" 'run-test s)
     (with-open-file (log logfile :direction :output
-                         #+(or CMU SBCL) :if-exists
-                         #+(or CMU SBCL) :supersede
-                         #+ANSI-CL :if-exists #+ANSI-CL :new-version)
+                         #+(or cmu sbcl) :if-exists
+                         #+(or cmu sbcl) :supersede
+                         #+ansi-cl :if-exists #+ansi-cl :new-version)
       (setq logfile (truename log))
       (let* ((*package* *package*) (*print-circle* t) (*print-pretty* nil)
              (*eval-err* (make-string-output-stream))
@@ -272,18 +272,18 @@ NIL: sacla-style: forms should evaluate to non-NIL.")
 (defun run-all-tests (&key (disable-risky t)
                       ((:eval-method *eval-method*) *eval-method*))
   (let ((res ())
-        #+CLISP (custom:*load-paths* nil)
+        #+clisp (custom:*load-paths* nil)
         (*features* (if disable-risky *features*
                         (cons :enable-risky-tests *features*))))
     ;; Since weakptr can run on #+cmu, we should run
     ;; the other too with CLOSER-WEAK.
-    (dolist (ff '(#+(or CLISP CMU SBCL)                           "weak-oid"
-                  #+(or CLISP CMU SBCL)                           "weak"
-                  #+(or CLISP CMU SBCL ALLEGRO OpenMCL LISPWORKS) "weakhash"
-                  #+(or CLISP CMU SBCL LISPWORKS)                 "weakhash2"
+    (dolist (ff '(#+(or clisp cmu sbcl)                           "weak-oid"
+                  #+(or clisp cmu sbcl)                           "weak"
+                  #+(or clisp cmu sbcl allegro openmcl lispworks) "weakhash"
+                  #+(or clisp cmu sbcl lispworks)                 "weakhash2"
                   ))
       (push (run-test ff) res))
-    #+(or CLISP CMU SBCL ALLEGRO LISPWORKS)
+    #+(or clisp cmu sbcl allegro lispworks)
     (let ((tmp (list "weakptr" 0 0)))
       (push tmp res)
       (dotimes (i 20)
diff --git a/clisp/Makefile b/clisp/Makefile
index 1079bec..37e31fc 100644
--- a/clisp/Makefile
+++ b/clisp/Makefile
@@ -14,25 +14,22 @@
 #    2003-05-04 <PJB> Added this header.
 #BUGS
 #LEGAL
-#    GPL
+#    AGPL3
 #
 #    Copyright Pascal Bourguignon 2003 - 2010
-#    mailto:pjb@informatimago.com
 #
-#    This program is free software; you can redistribute it and/or
-#    modify it under the terms of the GNU General Public License
-#    as published by the Free Software Foundation; either version
-#    2 of the License, or (at your option) any later version.
+#    This program is free software: you can redistribute it and/or modify
+#    it under the terms of the GNU Affero General Public License as published by
+#    the Free Software Foundation, either version 3 of the License, or
+#    (at your option) any later version.
 #
-#    This program is distributed in the hope that it will be
-#    useful, but WITHOUT ANY WARRANTY; without even the implied
-#    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-#    PURPOSE.  See the GNU General Public License for more details.
+#    This program is distributed in the hope that it will be useful,
+#    but WITHOUT ANY WARRANTY; without even the implied warranty of
+#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+#    GNU Affero General Public License for more details.
 #
-#    You should have received a copy of the GNU General Public
-#    License along with this program; if not, write to the Free
-#    Software Foundation, Inc., 59 Temple Place, Suite 330,
-#    Boston, MA 02111-1307 USA
+#    You should have received a copy of the GNU Affero General Public License
+#    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 #*****************************************************************************
 PREFIX = /usr/local

diff --git a/clisp/binio.lisp b/clisp/binio.lisp
index 21050aa..eb4e5fb 100644
--- a/clisp/binio.lisp
+++ b/clisp/binio.lisp
@@ -15,29 +15,27 @@
 ;;;;    2005-09-03 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2005 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.BINIO"
+(defpackage "COM.INFORMATIMAGO.CLISP.BINIO"
   ;;(:NICKNAMES "BINIO")
-  (:DOCUMENTATION "
+  (:documentation "
    This package exports clisp specific, binary I/O functions, including:
    - reading and writing encoded text from/to binary streams.
    - reading and writing byte from/to text streams.
@@ -50,12 +48,12 @@
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ECMA048")
-  (:SHADOW
+  (:shadow
    "READ-BYTE"  "WRITE-BYTE" "PEEK-CHAR" "READ-CHAR" "READ-CHAR-NO-HANG"
    "TERPRI" "UNREAD-CHAR" "WRITE-CHAR" "READ-LINE" "WRITE-STRING"
    "READ-SEQUENCE" "WRITE-SEQUENCE" "LISTEN"  "Y-OR-N-P" "YES-OR-NO-P"
    "FORMAT")
-  (:EXPORT
+  (:export
    "READ-BYTE"  "WRITE-BYTE" "PEEK-CHAR" "READ-CHAR" "READ-CHAR-NO-HANG"
    "TERPRI" "UNREAD-CHAR" "WRITE-CHAR" "READ-LINE" "WRITE-STRING"
    "READ-SEQUENCE" "WRITE-SEQUENCE" "LISTEN"  "Y-OR-N-P" "YES-OR-NO-P"
@@ -81,7 +79,7 @@


 (defun eoln-bytes (stream)
-(ecase (EXT:ENCODING-LINE-TERMINATOR
+(ecase (ext:encoding-line-terminator
         (stream-external-format stream))
   (:unix #.(vector lf))
   (:mac  #.(vector cr))
@@ -93,8 +91,8 @@
 (defun listen (&optional (stream *input-stream*))
   ;; TODO: write a better version comparison function
 #+#.(cl:when (cl:string<=
-              (cl:LISP-IMPLEMENTATION-VERSION)  "2.35"
-              :end1 (cl:min (cl:length (cl:LISP-IMPLEMENTATION-VERSION)) 4))
+              (cl:lisp-implementation-version)  "2.35"
+              :end1 (cl:min (cl:length (cl:lisp-implementation-version)) 4))
       :clisp)
 (if (socket:socketp stream)
     (case (socket:socket-status stream 0)
@@ -102,8 +100,8 @@
       (otherwise    nil))
     (common-lisp:listen stream))
 #-#.(cl:when (cl:string<=
-              (cl:LISP-IMPLEMENTATION-VERSION)  "2.35"
-              :end1 (cl:min (cl:length (cl:LISP-IMPLEMENTATION-VERSION)) 4))
+              (cl:lisp-implementation-version)  "2.35"
+              :end1 (cl:min (cl:length (cl:lisp-implementation-version)) 4))
       :clisp)
 (common-lisp:listen stream))

@@ -175,12 +173,12 @@

 (defun peek-char (&optional (peek-type nil) (input-stream *standard-input*)
                   (eof-error-p t) (eof-value nil) (recursive-p nil))
-(if (subtypep (stream-element-type stream) 'character)
-    (common-lisp:peek-char peek-type input-stream
-                           eof-error-p eof-value recursive-p)
-    (or (get-peek-byte stream)
-        (progn
-          )))
+  (if (subtypep (stream-element-type stream) 'character)
+      (common-lisp:peek-char peek-type input-stream
+                             eof-error-p eof-value recursive-p)
+      (or (get-peek-byte stream)
+          (progn
+            ))))

 (defun read-char ()
   )
@@ -235,7 +233,7 @@

         )))

-(DEFUN READ-LINE (&optional (input-stream *standard-input*) (eof-error-p t)
+(defun read-line (&optional (input-stream *standard-input*) (eof-error-p t)
                   (eof-value nil) (recursive-p nil))
   "
 NEWLINE:  nil   <=> accepts any CR, LF, or CRLF as a new-line.
@@ -253,15 +251,15 @@ NEWLINE:  nil   <=> accepts any CR, LF, or CRLF as a new-line.
                (cond
                  ((and missing-newline-p eof-error-p)
                   (error (make-condition
-                          'SYSTEM::SIMPLE-END-OF-FILE
+                          'system::simple-end-of-file
                           :stream input-stream
                           :format-control "~S: input stream ~S has reached its end"
-                          :format-ARGUMENTS (list 'READ input-stream))))
+                          :format-arguments (list 'read input-stream))))
                  ((and missing-newline-p (zerop (length buffer)))
                   (values eof-value missing-newline-p))
                  (t
                   (values (ext:convert-string-from-bytes
-                           buffer custom:*DEFAULT-FILE-ENCODING*)
+                           buffer custom:*default-file-encoding*)
                           missing-newline-p)))))
         (loop with buffer = (make-array '(4094) :element-type '(unsigned-byte 8)
                                         :initial-element 0
@@ -318,7 +316,7 @@ NEWLINE:  nil   <=> accepts any CR, LF, or CRLF as a new-line.
 (defun write-line (string &optional (output-stream *standard-output*)
                    &key (start 0) (end nil))
   )
-v
+

 (defun y-or-n-p (&optional control &rest arguments)
   )
@@ -342,7 +340,7 @@ v
   )


-(DEFUN FORMAT (dest ctrl &rest args)
+(defun format (dest ctrl &rest args)
   (when (eq t dest)
     (setf dest *standard-output*))
   (if (or (null dest)
@@ -357,7 +355,7 @@ v



-(IN-PACKAGE "COMMON-LISP-USER")
+(in-package "COMMON-LISP-USER")

 (setf custom:*default-file-encoding* (ext:make-encoding
                                       :charset charset:iso-8859-1
@@ -382,16 +380,16 @@ v

 (defparameter +ascii+
   #(
-    NUL SOH STX ETX EOT ENQ ACK BEL BS TAB LF VT FF CR SO SI
-    DLE DC1 DC2 DC3 DC4 NAK SYN ETB CAN EM SUB ESC FS GS RS US
-    SP nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
+    nul soh stx etx eot enq ack bel bs tab lf vt ff cr so si
+    dle dc1 dc2 dc3 dc4 nak syn etb can em sub esc fs gs rs us
+    sp nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
+    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
+    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
     nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
-    nil NIL NIL NIL NIL NIL NIL NIL NIL nil NIL NIL NIL NIL NIL NIL
-    NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL NIL nil nil nil nil nil
     nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil
-    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil DEL
-    PAD HOP BPH NBH IND NEL SSA ESA HTS HTJ VTS PLD PLU RI SS2 SS3
-    DCS PU1 PU2 STS CCH MW SPA EPA SOS SGCI SCI CSI ST OSC PM APC))
+    nil nil nil nil nil nil nil nil nil nil nil nil nil nil nil del
+    pad hop bph nbh ind nel ssa esa hts htj vts pld plu ri ss2 ss3
+    dcs pu1 pu2 sts cch mw spa epa sos sgci sci csi st osc pm apc))

 (defun show-all (string &optional (out t))
   (loop for ch across string
diff --git a/clisp/disk.lisp b/clisp/disk.lisp
index 159e424..0beb5ab 100644
--- a/clisp/disk.lisp
+++ b/clisp/disk.lisp
@@ -17,29 +17,26 @@
 ;;;;    2002-10-?? <PJB> Creation.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
+;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2002 - 2010
-;;;;
-;;;;    This file is part of PJB Clisp Utilities.
-;;;;
-;;;;    This  program is  free software;  you can  redistribute  it and/or
-;;;;    modify it  under the  terms of the  GNU General Public  License as
-;;;;    published by the Free Software Foundation; either version 2 of the
-;;;;    License, or (at your option) any later version.
-;;;;
-;;;;    This program  is distributed in the  hope that it  will be useful,
-;;;;    but  WITHOUT ANY WARRANTY;  without even  the implied  warranty of
-;;;;    MERCHANTABILITY or FITNESS FOR  A PARTICULAR PURPOSE.  See the GNU
-;;;;    General Public License for more details.
-;;;;
-;;;;    You should have received a  copy of the GNU General Public License
-;;;;    along with  this program; see the  file COPYING; if  not, write to
-;;;;    the Free  Software Foundation, Inc.,  59 Temple Place,  Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.DISK"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.DISK"
+  (:documentation
    "This package exports disk management functions.

     Copyright Pascal J. Bourguignon 2002 - 2003
@@ -49,70 +46,70 @@
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STREAM"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY")
-  (:EXPORT "VOLINFO" "VOLINFO-PATH" "VOLINFO-FS-TYPE"  "VOLINFO-SIZE"
+  (:export "VOLINFO" "VOLINFO-PATH" "VOLINFO-FS-TYPE"  "VOLINFO-SIZE"
            "VOLINFO-USED" "VOLINFO-AVAILABLE" "VOLINFO-MOUNT-POINT"
            "DF" "DU" ))
 (in-package  "COM.INFORMATIMAGO.CLISP.DISK")


-(DEFUN OLD-DF ()
+(defun old-df ()
   "
 RETURN:  A list of sublists each containing:
            (device size used available mount-point)
 "
-  (MAPCAR
-   (LAMBDA (LINE) (SPLIT-STRING LINE " "))
-   (STREAM-TO-STRING-LIST
-    (EXT:RUN-SHELL-COMMAND
+  (mapcar
+   (lambda (line) (split-string line " "))
+   (stream-to-string-list
+    (ext:run-shell-command
      "/bin/df -T|postodax|/bin/awk '/Available/{next;}{print $1,$2,$3,$4,$5,$7;}'"
-     :OUTPUT :STREAM))))
+     :output :stream))))


-(DEFSTRUCT VOLINFO
-  (PATH        "" :TYPE STRING)
-  (FS-TYPE     "" :TYPE STRING)
-  (SIZE        0  :TYPE NUMBER)
-  (USED        0  :TYPE NUMBER)
-  (AVAILABLE   0  :TYPE NUMBER)
-  (MOUNT-POINT "" :TYPE STRING)
+(defstruct volinfo
+  (path        "" :type string)
+  (fs-type     "" :type string)
+  (size        0  :type number)
+  (used        0  :type number)
+  (available   0  :type number)
+  (mount-point "" :type string)
   ) ;;VOLINFO


-(DEFUN DF (&OPTIONAL PATH)
+(defun df (&optional path)
   "
 RETURN:  A list of volinfo structures.
 "
-  (UNLESS PATH (SETQ PATH ""))
-  (MAPCAR
-   (LAMBDA (LINE)
-     (LET ((DATA (SPLIT-STRING LINE " \\+")))
-       (MAKE-VOLINFO :PATH (NTH 0 DATA)
-                     :FS-TYPE (NTH 1 DATA)
-                     :SIZE (* 1024 (READ-FROM-STRING (NTH 2 DATA)))
-                     :USED (* 1024 (READ-FROM-STRING (NTH 3 DATA)))
-                     :AVAILABLE (* 1024 (READ-FROM-STRING (NTH 4 DATA)))
-                     :MOUNT-POINT (NTH 5 DATA))))
-   (STREAM-TO-STRING-LIST
-    (EXT:RUN-SHELL-COMMAND
-     (FORMAT
-      NIL "df -k -T ~A|postodax|/bin/awk '/Available/{next;}{print $1,$2,$3,$4,$5,$7;}'"
-      PATH)
-     :OUTPUT :STREAM))))
+  (unless path (setq path ""))
+  (mapcar
+   (lambda (line)
+     (let ((data (split-string line " \\+")))
+       (make-volinfo :path (nth 0 data)
+                     :fs-type (nth 1 data)
+                     :size (* 1024 (read-from-string (nth 2 data)))
+                     :used (* 1024 (read-from-string (nth 3 data)))
+                     :available (* 1024 (read-from-string (nth 4 data)))
+                     :mount-point (nth 5 data))))
+   (stream-to-string-list
+    (ext:run-shell-command
+     (format
+      nil "df -k -T ~A|postodax|/bin/awk '/Available/{next;}{print $1,$2,$3,$4,$5,$7;}'"
+      path)
+     :output :stream))))


-(DEFUN DU (&OPTIONAL (PATH (EXT:CD)))
+(defun du (&optional (path (ext:cd)))
   "
 RETURN:  The Disk Usage of the given PATH (or the current directory).
          It's given as the underlying du command gives it, either in
          blocks of 1KB or of 512 B.
 "
-  (VALUES
-   (READ-FROM-STRING
-    (CAAR
-     (MAPCAR (LAMBDA (LINE) (SPLIT-STRING LINE #.(string (CODE-CHAR 9))))
-             (STREAM-TO-STRING-LIST
-              (EXT:RUN-PROGRAM "du"
-                               :ARGUMENTS (LIST "-s" PATH) :OUTPUT :STREAM)))))))
+  (values
+   (read-from-string
+    (caar
+     (mapcar (lambda (line) (split-string line #.(string (code-char 9))))
+             (stream-to-string-list
+              (ext:run-program "du"
+                               :arguments (list "-s" path) :output :stream)))))))


 ;;;; THE END ;;;;
diff --git a/clisp/fifo-stream.lisp b/clisp/fifo-stream.lisp
index e60d267..57f53b4 100644
--- a/clisp/fifo-stream.lisp
+++ b/clisp/fifo-stream.lisp
@@ -14,63 +14,61 @@
 ;;;;    2003-09-11 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (defpackage "COM.INFORMATIMAGO.CLISP.FIFO-STREAM"
   (:use "COMMON-LISP" "GRAY")
   (:export "FIFO-STREAM")
-  (:DOCUMENTATION
+  (:documentation
    "
     A fifo stream: all input is buffered and restituted as output.

     Copyright Pascal J. Bourguignon 2003 - 2003
 "))
-(IN-PACKAGE "COM.INFORMATIMAGO.CLISP.FIFO-STREAM")
+(in-package "COM.INFORMATIMAGO.CLISP.FIFO-STREAM")


-(DEFUN MAKE-FIFO ()
+(defun make-fifo ()
   ;; (VALUES INPUT-STREAM OUTPUT-STREAM)
   (values nil nil))



-(DEFCONSTANT +CHUNK-SIZE+ 4096 "Size of one buffer string.")
+(defconstant +chunk-size+ 4096 "Size of one buffer string.")

-(DEFCLASS FIFO-STREAM (FUNDAMENTAL-INPUT-STREAM
-                       FUNDAMENTAL-OUTPUT-STREAM
-                       FUNDAMENTAL-CHARACTER-STREAM)
-  ((OUTPUT
-    :INITform '()
-    :initarg :OUTPUT
+(defclass fifo-stream (fundamental-input-stream
+                       fundamental-output-stream
+                       fundamental-character-stream)
+  ((output
+    :initform '()
+    :initarg :output
     :accessor output
-    :TYPE     LIST
-    :DOCUMENTATION "The head of the FIFO buffer list.")
-   (INPUT
+    :type     list
+    :documentation "The head of the FIFO buffer list.")
+   (input
      :initform '()
-     :initarg :INPUT
+     :initarg :input
      :accessor input
-     :TYPE     LIST
-     :DOCUMENTATION "The tail of the FIFO buffer list.")
+     :type     list
+     :documentation "The tail of the FIFO buffer list.")
    )
-  (:DOCUMENTATION
+  (:documentation
    "A fifo stream: all input is buffered and restituted as output.")
   )

@@ -86,15 +84,15 @@
 ;;;
 ;;; We could use the fill-pointer for the input.

-(DEFUN MAKE-BUFFER ()
-  (LIST (MAKE-STRING +CHUNK-SIZE+) 0 0 NIL))
+(defun make-buffer ()
+  (list (make-string +chunk-size+) 0 0 nil))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;;
 ;;; general generic functions defined on streams
 ;;;

-(DEFMETHOD CLOSE ((STREAM FIFO-STREAM) &KEY ABORT)
+(defmethod close ((stream fifo-stream) &key abort)
   "
 Closes the stream and flushes any associated buffers.
 "
@@ -102,7 +100,7 @@ Closes the stream and flushes any associated buffers.
   ;; When you define a primary method on this function, do not forget to
   ;; CALL-NEXT-METHOD.
   ;; TODO: (SETF (BUFFERS STREAM) 'NIL)
-  (CALL-NEXT-METHOD))
+  (call-next-method))


 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -111,42 +109,42 @@ Closes the stream and flushes any associated buffers.
 ;;;


-(defmethod STREAM-READ-CHAR ((STREAM FIFO-STREAM))
+(defmethod stream-read-char ((stream fifo-stream))
   "
 If a character was pushed back using DEFUN STREAM-UNREAD-CHAR, returns
 and consumes it. Otherwise returns and consumes the next character
 from the stream. Returns :EOF if the end-of-stream is reached.
 "
-  (LET ((BUFFER (CAR (OUTPUT STREAM))))
-    (IF BUFFER
-        (LET* ((STR (POP BUFFER))
-               (OUT (POP BUFFER))
-               (INP (POP BUFFER))
-               (CLOSED (POP BUFFER)))
-          (COND
-            ((< OUT INP)
-             (INCF (SECOND BUFFER))
-             (CHAR STR OUT))
-            (CLOSED
-             :EOF)
-            (T
-             (POP (OUTPUT STREAM))
-             (STREAM-READ-CHAR STREAM))))
-        :EOF)))
-
-
-(defmethod STREAM-UNREAD-CHAR ((STREAM FIFO-STREAM) (CHAR CHARACTER))
+  (let ((buffer (car (output stream))))
+    (if buffer
+        (let* ((str (pop buffer))
+               (out (pop buffer))
+               (inp (pop buffer))
+               (closed (pop buffer)))
+          (cond
+            ((< out inp)
+             (incf (second buffer))
+             (char str out))
+            (closed
+             :eof)
+            (t
+             (pop (output stream))
+             (stream-read-char stream))))
+        :eof)))
+
+
+(defmethod stream-unread-char ((stream fifo-stream) (char character))
   "
 Pushes char, which must be the last character read from the stream,
 back onto the front of the stream.
 "
-  (SETF (OUTPUT STREAM) (CONS (LIST (MAKE-STRING 1 :INITIAL-ELEMENT CHAR) 0 1 T)
-                              (OUTPUT STREAM)))
-  (UNLESS (INPUT STREAM) (SETF (INPUT STREAM) (OUTPUT STREAM)))
-  NIL)
+  (setf (output stream) (cons (list (make-string 1 :initial-element char) 0 1 t)
+                              (output stream)))
+  (unless (input stream) (setf (input stream) (output stream)))
+  nil)


-(defmethod STREAM-READ-CHAR-NO-HANG ((STREAM FIFO-STREAM))
+(defmethod stream-read-char-no-hang ((stream fifo-stream))
   "
 Returns a character or :EOF, like DEFUN STREAM-READ-CHAR, if that
 would return immediately. If DEFUN STREAM-READ-CHAR's value is not
@@ -159,7 +157,7 @@ blocks.
   )


-(defmethod STREAM-PEEK-CHAR ((STREAM FIFO-STREAM))
+(defmethod stream-peek-char ((stream fifo-stream))
   "
 If a character was pushed back using DEFUN STREAM-UNREAD-CHAR, returns
 it. Otherwise returns the next character from the stream, avoiding any
@@ -173,7 +171,7 @@ STREAM-READ-CHAR method has no side-effects.
   )


-(defmethod STREAM-LISTEN ((STREAM FIFO-STREAM))
+(defmethod stream-listen ((stream fifo-stream))
   "
 If a character was pushed back using DEFUN STREAM-UNREAD-CHAR, returns it. Otherwise returns the next character from the stream, if already available. If no character is available immediately, or if end-of-stream is reached, returns NIL.

@@ -182,7 +180,7 @@ The default method calls DEFUN STREAM-READ-CHAR-NO-HANG and DEFUN STREAM-UNREAD-
   )


-(defmethod STREAM-READ-CHAR-WILL-HANG-P ((STREAM FIFO-STREAM))
+(defmethod stream-read-char-will-hang-p ((stream fifo-stream))
   "
 Returns NIL if DEFUN STREAM-READ-CHAR will return immediately. Otherwise it returns true.

@@ -193,8 +191,8 @@ This function is a CLISP extension (see EXT:READ-CHAR-WILL-HANG-P).
   )


-(defmethod STREAM-READ-CHAR-SEQUENCE ((STREAM FIFO-STREAM)
-                                      SEQUENCE &OPTIONAL (START 0) (END NIL))
+(defmethod stream-read-char-sequence ((stream fifo-stream)
+                                      sequence &optional (start 0) (end nil))
   "
 Fills the subsequence of sequence specified by :START and :END with
 characters consecutively read from stream. Returns the index of the
@@ -214,7 +212,7 @@ This function is a CLISP extension (see EXT:READ-CHAR-SEQUENCE)
   0)


-(DEFMETHOD STREAM-READ-LINE ((STREAM FIFO-STREAM))
+(defmethod stream-read-line ((stream fifo-stream))
   "
 Reads a line of characters, and return two values: the line (a string, without the terminating #\Newline character), and a boolean value which is true if the line was terminated by end-of-stream instead of #\Newline.

@@ -224,7 +222,7 @@ The default method repeatedly calls DEFUN STREAM-READ-CHAR; this is always suffi
   )


-(DEFMETHOD STREAM-CLEAR-INPUT ((STREAM FIFO-STREAM))
+(defmethod stream-clear-input ((stream fifo-stream))
   "
 Clears all pending interactive input from the stream, and returns true if some pending input was removed.

@@ -239,7 +237,7 @@ The default method does nothing and returns NIL; this is sufficient for non-inte
 ;;; generic functions for character output
 ;;;

-(DEFMETHOD STREAM-WRITE-CHAR ((STREAM FIFO-STREAM) (CHAR CHARACTER))
+(defmethod stream-write-char ((stream fifo-stream) (char character))
   "
 Writes char.

@@ -248,7 +246,7 @@ You must define a method for this function.
   )


-(DEFMETHOD STREAM-LINE-COLUMN ((STREAM FIFO-STREAM))
+(defmethod stream-line-column ((stream fifo-stream))
   "
 Returns the column number where the next character would be written (0 stands for the first column), or NIL if that is not meaningful for this stream.

diff --git a/clisp/init.lisp b/clisp/init.lisp
index 6d97e48..1702713 100644
--- a/clisp/init.lisp
+++ b/clisp/init.lisp
@@ -19,32 +19,30 @@
 ;;;;    2004-01-20 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(SETQ *LOAD-VERBOSE* NIL)
+(setq *load-verbose* nil)

 ;; clean the imported packages:
-(MAPC (LAMBDA (USED) (UNUSE-PACKAGE USED "COMMON-LISP-USER"))
-      (REMOVE (FIND-PACKAGE "COMMON-LISP")
-              (COPY-SEQ (PACKAGE-USE-LIST "COMMON-LISP-USER"))))
+(mapc (lambda (used) (unuse-package used "COMMON-LISP-USER"))
+      (remove (find-package "COMMON-LISP")
+              (copy-seq (package-use-list "COMMON-LISP-USER"))))

 (progn
   (defvar *directories*  '())
@@ -65,9 +63,9 @@


 #+clisp
-(when (string= (LISP-IMPLEMENTATION-VERSION)  "2.33.83"
-               :end1 (min (length (LISP-IMPLEMENTATION-VERSION)) 7))
-  (EXT:WITHOUT-PACKAGE-LOCK ("COMMON-LISP")
+(when (string= (lisp-implementation-version)  "2.33.83"
+               :end1 (min (length (lisp-implementation-version)) 7))
+  (ext:without-package-lock ("COMMON-LISP")
     (let ((oldload (function cl:load)))
       (fmakunbound 'cl:load)
       (defun cl:load (filespec &key (verbose *load-verbose*)
@@ -77,7 +75,7 @@
         (handler-case (funcall oldload filespec :verbose verbose
                                :print print :if-does-not-exist if-does-not-exist
                                :external-format external-format)
-          (SYSTEM::SIMPLE-PARSE-ERROR
+          (system::simple-parse-error
               ()
             (funcall oldload (translate-logical-pathname filespec)
                      :verbose verbose
@@ -95,25 +93,25 @@
 ;; (HANDLER-CASE (LOAD (get-directory :share-lisp "packages/com/informatimago/common-lisp/package"))
 ;;   (T ()       (LOAD (get-directory :share-lisp "packages/com/informatimago/common-lisp/package.lisp"))))

-(SETF (logical-pathname-translations "PACKAGES") nil
-      (LOGICAL-PATHNAME-TRANSLATIONS "PACKAGES")
+(setf (logical-pathname-translations "PACKAGES") nil
+      (logical-pathname-translations "PACKAGES")
       (list
-       (LIST "PACKAGES:**;*"
+       (list "PACKAGES:**;*"
              (get-directory :share-lisp "packages/**/*"))
-       (LIST "PACKAGES:**;*.*"
+       (list "PACKAGES:**;*.*"
              (get-directory :share-lisp "packages/**/*.*"))
-       (LIST "PACKAGES:**;*.*.*"
+       (list "PACKAGES:**;*.*.*"
              (get-directory :share-lisp "packages/**/*.*.*"))))


-(HANDLER-CASE (LOAD "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE")
-  (T ()       (LOAD "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE.LISP")))
+(handler-case (load "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE")
+  (t ()       (load "PACKAGES:COM;INFORMATIMAGO;COMMON-LISP;PACKAGE.LISP")))

 ;; Import DEFINE-PACKAGE, and add translations:
-(IMPORT 'PACKAGE:DEFINE-PACKAGE)
+(import 'package:define-package)

-(PACKAGE:ADD-TRANSLATIONS
- (LIST "PACKAGES:COM;INFORMATIMAGO;CLISP;**;*.*.*"  "**/*.*.*"))
+(package:add-translations
+ (list "PACKAGES:COM;INFORMATIMAGO;CLISP;**;*.*.*"  "**/*.*.*"))

 ;;        (make-pathname
 ;;         :directory (append (pathname-directory *DEFAULT-PATHNAME-DEFAULTS*)
diff --git a/clisp/iotask.lisp b/clisp/iotask.lisp
index 9c85301..182e4ce 100644
--- a/clisp/iotask.lisp
+++ b/clisp/iotask.lisp
@@ -16,28 +16,26 @@
 ;;;;TODO merge with pollio?
 ;;;;
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2005 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.IOTASK"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.IOTASK"
+  (:documentation
    "This package exports a sheduler encapsulating clisp SOCKET:SOCKET-STATUS
     which itself encapsulate select(2)/poll(2).

@@ -50,7 +48,7 @@
          "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
          "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST")
   (:shadowing-import-from "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ECMA048" "ED")
-  (:EXPORT
+  (:export
    "IOTASK" "IOTASK-ENQUEUE" "IOTASK-ENQUEUE-STREAM" "IOTASK-DEQUEUE"
    "IOTASK-POLL" "IOTASK-SCHEDULE"
    "MAKE-BUFFERED-DISCIPLINE" "MAKE-KEYBOARD-DISCIPLINE"))
@@ -183,18 +181,18 @@
                (ch  (system::input-character-char ich)))
           (cond
             ((null ch))
-            ((= (char-code ch) COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ecma048:CR)
+            ((= (char-code ch) com.informatimago.common-lisp.cesarum.ecma048:cr)
              (terpri)
              (finish-output)
              (funcall process-input
                       task (subseq buffer 0 (fill-pointer buffer)))
              (setf (fill-pointer buffer) 0))
-            ((or (= (char-code ch) COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ecma048:BS)
-                 (= (char-code ch) COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ecma048::DEL))
+            ((or (= (char-code ch) com.informatimago.common-lisp.cesarum.ecma048:bs)
+                 (= (char-code ch) com.informatimago.common-lisp.cesarum.ecma048::del))
              (when (< 0 (fill-pointer buffer))
-               (princ (code-char COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ecma048:BS))
+               (princ (code-char com.informatimago.common-lisp.cesarum.ecma048:bs))
                (princ " ")
-               (princ (code-char COM.INFORMATIMAGO.COMMON-LISP.CESARUM.ecma048:BS))
+               (princ (code-char com.informatimago.common-lisp.cesarum.ecma048:bs))
                (finish-output)
                (decf (fill-pointer buffer))))
             (t
diff --git a/clisp/make-volumes.lisp b/clisp/make-volumes.lisp
index 84e2730..218e45b 100644
--- a/clisp/make-volumes.lisp
+++ b/clisp/make-volumes.lisp
@@ -16,28 +16,26 @@
 ;;;;    2003-06-10 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.MAKE-VOLUMES"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.MAKE-VOLUMES"
+  (:documentation
    "This package exports a function to tally a directory tree and make if it
     'volumes' of a given maximum size.")
   (:use "COMMON-LISP"
@@ -45,7 +43,7 @@
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING"
         "COM.INFORMATIMAGO.CLISP.SUSV3")
-  (:EXPORT  "MAIN" "MAKE-VOLUMES"))
+  (:export  "MAIN" "MAKE-VOLUMES"))
 (in-package  "COM.INFORMATIMAGO.CLISP.MAKE-VOLUMES")


@@ -55,7 +53,7 @@
 ;;


-(DEFUN DEEP-COPY-TREE (TREE)
+(defun deep-copy-tree (tree)
   "
 NOTE:           COPY-TREE ONLY DUPLICATES THE CONS, NOT THE OBJECTS.
                 THIS IS UNFORTUNATE, BECAUSE WE OFTEN NEED TO DUPLICATE
@@ -63,11 +61,11 @@ NOTE:           COPY-TREE ONLY DUPLICATES THE CONS, NOT THE OBJECTS.
                 MUTABLE/IMMUTABLE PROBLEM.
 DO:             MAKES A COPY OF THE TREE, COPYING THE LEAF OBJECTS TOO.
 "
-  (COND
-    ((CONSP TREE)   (CONS (DEEP-COPY-TREE (CAR TREE))
-                          (DEEP-COPY-TREE (CDR TREE))))
-    ((VECTORP TREE) (COPY-SEQ TREE))
-    (T              TREE)))
+  (cond
+    ((consp tree)   (cons (deep-copy-tree (car tree))
+                          (deep-copy-tree (cdr tree))))
+    ((vectorp tree) (copy-seq tree))
+    (t              tree)))

 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;;
@@ -79,55 +77,55 @@ DO:             MAKES A COPY OF THE TREE, COPYING THE LEAF OBJECTS TOO.
 ;; BE USELESS).


-(DEFUN MAKE-LIST-ENUMERATOR (LIST)
+(defun make-list-enumerator (list)
   "
 RETURN:         A ENUMERATOR FUNCTION FOR THE LIST.
 NOTE:           THE ENUMERATOR FUNCTION RETURNS IN TURN EACH ELEMENT OF THE
                 LIST AS FIRST VALUE AND A BOOLEAN T UNLESS THE END OF THE
                 LIST IS REACHED AS SECOND VALUE.
 "
-  (LAMBDA ()
-    (MULTIPLE-VALUE-PROG1
-        (VALUES (CAR LIST) (NOT (NULL LIST)))
-      (SETQ LIST (CDR LIST)))))
+  (lambda ()
+    (multiple-value-prog1
+        (values (car list) (not (null list)))
+      (setq list (cdr list)))))



-(DEFUN APPEND-ENUMERATORS (&REST ENUMERATORS)
+(defun append-enumerators (&rest enumerators)
   "
 RETURN:        An enumerator that enumerates all the enumerators in turn.
 "
-  (LAMBDA ()
-    (BLOCK :META-ENUM
-      (LOOP
-         (IF (NULL ENUMERATORS)
-             (RETURN-FROM :META-ENUM (VALUES NIL NIL))
-             (MULTIPLE-VALUE-BIND (VAL IND) (FUNCALL (CAR ENUMERATORS))
-               (IF IND
-                   (RETURN-FROM :META-ENUM (VALUES VAL IND))
-                   (POP ENUMERATORS))))))))
+  (lambda ()
+    (block :meta-enum
+      (loop
+         (if (null enumerators)
+             (return-from :meta-enum (values nil nil))
+             (multiple-value-bind (val ind) (funcall (car enumerators))
+               (if ind
+                   (return-from :meta-enum (values val ind))
+                   (pop enumerators))))))))



-(DEFUN COLLECT-ENUMERATOR (ENUMERATOR)
-  (DO ((RESULT '())
-       (DONE NIL))
-      (DONE RESULT)
-    (MULTIPLE-VALUE-BIND (VAL IND) (FUNCALL ENUMERATOR)
-      (IF IND
-          (PUSH VAL RESULT)
-          (SETQ DONE T)))))
+(defun collect-enumerator (enumerator)
+  (do ((result '())
+       (done nil))
+      (done result)
+    (multiple-value-bind (val ind) (funcall enumerator)
+      (if ind
+          (push val result)
+          (setq done t)))))



-(DEFUN MAP-ENUMERATOR (LAMBDA-EXPR ENUMERATOR)
-  (DO ((RESULT '())
-       (DONE NIL))
-      (DONE (NREVERSE RESULT))
-    (MULTIPLE-VALUE-BIND (VAL IND) (FUNCALL ENUMERATOR)
-      (IF IND
-          (PUSH (FUNCALL LAMBDA-EXPR VAL) RESULT)
-          (SETQ DONE T)))))
+(defun map-enumerator (lambda-expr enumerator)
+  (do ((result '())
+       (done nil))
+      (done (nreverse result))
+    (multiple-value-bind (val ind) (funcall enumerator)
+      (if ind
+          (push (funcall lambda-expr val) result)
+          (setq done t)))))



@@ -135,20 +133,20 @@ RETURN:        An enumerator that enumerates all the enumerators in turn.
 ;;
 ;; UNIX PATHNAMES

-(DEFUN BASENAME (UNIX-PATH)
+(defun basename (unix-path)
   "
 UNIX-PATH:  A STRING CONTAINING A UNIX PATH.
 RETURN:         THE BASENAME, THAT IS, THE LAST COMPONENT OF THE PATH.
                 TRAILING '/'S ARE REMOVED FIRST.
 "
-  (DO* ((END (DO ((END (1- (LENGTH UNIX-PATH)) (1- END)))
-                 ((OR (< END 0)
-                      (CHAR/= (CHARACTER "/") (CHAR UNIX-PATH END)))
-                  (1+ END))))
-        (START (1- END) (1- START)))
-       ((OR (< START 0)
-            (CHAR= (CHARACTER "/") (CHAR UNIX-PATH START)))
-        (SUBSEQ UNIX-PATH (1+ START) END))))
+  (do* ((end (do ((end (1- (length unix-path)) (1- end)))
+                 ((or (< end 0)
+                      (char/= (character "/") (char unix-path end)))
+                  (1+ end))))
+        (start (1- end) (1- start)))
+       ((or (< start 0)
+            (char= (character "/") (char unix-path start)))
+        (subseq unix-path (1+ start) end))))



@@ -159,42 +157,42 @@ RETURN:         THE BASENAME, THAT IS, THE LAST COMPONENT OF THE PATH.



-(DEFUN UNIX-FS-NODE-NAME (NODE) ;; --> NAME
+(defun unix-fs-node-name (node) ;; --> NAME
   (declare (ignore node)))
-(DEFUN UNIX-FS-NODE-KIND (NODE)
+(defun unix-fs-node-kind (node)
   (declare (ignore node)))
-(DEFUN UNIX-FS-NODE-DIRECTORY-PATH (NODE) ;; --> "/DIR/PATH"
+(defun unix-fs-node-directory-path (node) ;; --> "/DIR/PATH"
   (declare (ignore node)))
-(DEFUN UNIX-FS-NODE-PATH (NODE) ;; --> /DIR/PATH/NAME
+(defun unix-fs-node-path (node) ;; --> /DIR/PATH/NAME
   (declare (ignore node)))

-(defun LOGICAL-PATHNAME-NAMESTRING-P (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
-(defun PARSE-LOGICAL-PATHNAME-NAMESTRING (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
-(defun PARSE-UNIX-PATHNAME-NAMESTRING (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
-(defun SAFE-MAKE-PATHNAME (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
-(defun SAFE-DIRECTORY (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
+(defun logical-pathname-namestring-p (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
+(defun parse-logical-pathname-namestring (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
+(defun parse-unix-pathname-namestring (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
+(defun safe-make-pathname (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))
+(defun safe-directory (&rest arguments) (declare (ignore arguments)) (error "NOT IMPLEMENTED YET"))


-(DEFUN MAKE-VOLUMES (ROOT-DIR)
-  (LET ((ROOT-APATH
+(defun make-volumes (root-dir)
+  (let ((root-apath
          ;; TODO: WHAT IF NOT UNIX?
-         (IF (LOGICAL-PATHNAME-NAMESTRING-P  ROOT-DIR)
-             (PARSE-LOGICAL-PATHNAME-NAMESTRING ROOT-DIR)
-             (PARSE-UNIX-PATHNAME-NAMESTRING ROOT-DIR)))
-        PATHSPEC)
-    (WHEN (EQ :ERROR ROOT-APATH)
-      (ERROR "BAD PATHNAME ~S." ROOT-DIR))
-    (SETQ PATHSPEC (SAFE-MAKE-PATHNAME
-                    :HOST      (AGET ROOT-APATH :HOST)
-                    :DEVICE    (AGET ROOT-APATH :DEVICE)
-                    :DIRECTORY (APPEND (AGET ROOT-APATH :DIRECTORY)
-                                       (LIST :WILD-INFERIORS))
-                    :NAME :WILD
-                    :TYPE :WILD
-                    :VERSION NIL
-                    :CASE :COMMON))
-    (FORMAT T "PATHSPEC=~S~%" PATHSPEC)
-    (SAFE-DIRECTORY PATHSPEC)))
+         (if (logical-pathname-namestring-p  root-dir)
+             (parse-logical-pathname-namestring root-dir)
+             (parse-unix-pathname-namestring root-dir)))
+        pathspec)
+    (when (eq :error root-apath)
+      (error "BAD PATHNAME ~S." root-dir))
+    (setq pathspec (safe-make-pathname
+                    :host      (aget root-apath :host)
+                    :device    (aget root-apath :device)
+                    :directory (append (aget root-apath :directory)
+                                       (list :wild-inferiors))
+                    :name :wild
+                    :type :wild
+                    :version nil
+                    :case :common))
+    (format t "PATHSPEC=~S~%" pathspec)
+    (safe-directory pathspec)))

 #||
 (LOAD "PACKAGES:COM;INFORMATIMAGO;ENCOURS;MAKE-VOLUMES")
diff --git a/clisp/mysql.lisp b/clisp/mysql.lisp
index 97fdfbe..204e789 100644
--- a/clisp/mysql.lisp
+++ b/clisp/mysql.lisp
@@ -15,28 +15,26 @@
 ;;;;    2006-04-21 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2006 - 2006
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;**************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.MYSQL"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.MYSQL"
+  (:documentation
    "This package exports mysql functions.

     Copyright Pascal J. Bourguignon 2006 - 2006
@@ -44,7 +42,7 @@
     See the source file for details.")
   (:use "COMMON-LISP"
          "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY")
-  (:EXPORT ))
+  (:export ))
 (in-package "COM.INFORMATIMAGO.CLISP.MYSQL")


@@ -57,81 +55,81 @@
 (ffi:def-c-type my-socket ffi:int)

 (defconstant +name-len+                    64 "Field/table name length")
-(defconstant +HOSTNAME-LENGTH+             60)
-(defconstant +USERNAME-LENGTH+             16)
-(defconstant +SERVER-VERSION-LENGTH        60)
-(defconstant +LOCAL-HOST+             "localhost")
-(defconstant +LOCAL-HOST-NAMEDPIPE+   ".")
+(defconstant +hostname-length+             60)
+(defconstant +username-length+             16)
+(defconstant +server-version-length        60)
+(defconstant +local-host+             "localhost")
+(defconstant +local-host-namedpipe+   ".")


 (defenum enum-server-command
-  +COM-SLEEP+ +COM-QUIT+ +COM-INIT-DB+ +COM-QUERY+ +COM-FIELD-LIST+
-  +COM-CREATE-DB+ +COM-DROP-DB+ +COM-REFRESH+ +COM-SHUTDOWN+
-  +COM-STATISTICS+ +COM-PROCESS-INFO+ +COM-CONNECT+
-  +COM-PROCESS-KILL+ +COM-DEBUG+ +COM-PING+ +COM-TIME+
-  +COM-DELAYED-INSERT+ +COM-CHANGE-USER+ +COM-BINLOG-DUMP+
-  +COM-TABLE-DUMP+ +COM-CONNECT-OUT+)
-
-
-(defconstant +NOT-NULL-FLAG+                1 "Field can't be NULL")
-(defconstant +PRI-KEY-FLAG+                 2 "Field is part of a primary key")
-(defconstant +UNIQUE-KEY-FLAG+              4 "Field is part of a unique key")
-(defconstant +MULTIPLE-KEY-FLAG+            8 "Field is part of a key")
-(defconstant +BLOB-FLAG+                   16 "Field is a blob")
-(defconstant +UNSIGNED-FLAG+               32 "Field is unsigned")
-(defconstant +ZEROFILL-FLAG+               64 "Field is zerofill")
-(defconstant +BINARY-FLAG+                128 "")
+  +com-sleep+ +com-quit+ +com-init-db+ +com-query+ +com-field-list+
+  +com-create-db+ +com-drop-db+ +com-refresh+ +com-shutdown+
+  +com-statistics+ +com-process-info+ +com-connect+
+  +com-process-kill+ +com-debug+ +com-ping+ +com-time+
+  +com-delayed-insert+ +com-change-user+ +com-binlog-dump+
+  +com-table-dump+ +com-connect-out+)
+
+
+(defconstant +not-null-flag+                1 "Field can't be NULL")
+(defconstant +pri-key-flag+                 2 "Field is part of a primary key")
+(defconstant +unique-key-flag+              4 "Field is part of a unique key")
+(defconstant +multiple-key-flag+            8 "Field is part of a key")
+(defconstant +blob-flag+                   16 "Field is a blob")
+(defconstant +unsigned-flag+               32 "Field is unsigned")
+(defconstant +zerofill-flag+               64 "Field is zerofill")
+(defconstant +binary-flag+                128 "")
 ;; The following are only sent to new clients
-(defconstant +ENUM-FLAG+                  256 "field is an enum")
-(defconstant +AUTO-INCREMENT-FLAG+        512 "field is a autoincrement field")
-(defconstant +TIMESTAMP-FLAG+            1024 "Field is a timestamp")
-(defconstant +SET-FLAG+                  2048 "field is a set")
-(defconstant +NUM-FLAG+                 32768 "Field is num (for clients)")
-(defconstant +PART-KEY-FLAG+            16384 "Intern; Part of some key")
-(defconstant +GROUP-FLAG+               32768 "Intern: Group field")
-(defconstant +UNIQUE-FLAG+              65536 "Intern: Used by sql-yacc")
-
-(defconstant +REFRESH-GRANT+                1 "Refresh grant tables")
-(defconstant +REFRESH-LOG+                  2 "Start on new log file")
-(defconstant +REFRESH-TABLES+               4 "close all tables")
-(defconstant +REFRESH-HOSTS+                8 "Flush host cache")
-(defconstant +REFRESH-STATUS+              16 "Flush status variables")
-(defconstant +REFRESH-THREADS+             32 "Flush thread cache")
-(defconstant +REFRESH-SLAVE+               64
+(defconstant +enum-flag+                  256 "field is an enum")
+(defconstant +auto-increment-flag+        512 "field is a autoincrement field")
+(defconstant +timestamp-flag+            1024 "Field is a timestamp")
+(defconstant +set-flag+                  2048 "field is a set")
+(defconstant +num-flag+                 32768 "Field is num (for clients)")
+(defconstant +part-key-flag+            16384 "Intern; Part of some key")
+(defconstant +group-flag+               32768 "Intern: Group field")
+(defconstant +unique-flag+              65536 "Intern: Used by sql-yacc")
+
+(defconstant +refresh-grant+                1 "Refresh grant tables")
+(defconstant +refresh-log+                  2 "Start on new log file")
+(defconstant +refresh-tables+               4 "close all tables")
+(defconstant +refresh-hosts+                8 "Flush host cache")
+(defconstant +refresh-status+              16 "Flush status variables")
+(defconstant +refresh-threads+             32 "Flush thread cache")
+(defconstant +refresh-slave+               64
   "Reset master info and restart slave thread")
-(defconstant +REFRESH-MASTER+             128
+(defconstant +refresh-master+             128
   "Remove all bin logs in the index and truncate the index")

 ;; The following can't be set with mysql-refresh()
-(defconstant +REFRESH-READ-LOCK+        16384 "Lock tables for read")
-(defconstant +REFRESH-FAST+             32768 "Intern flag")
-
-(defconstant +CLIENT-LONG-PASSWORD+         1 "new more secure passwords")
-(defconstant +CLIENT-FOUND-ROWS+            2 "Found instead of affected rows")
-(defconstant +CLIENT-LONG-FLAG+             4 "Get all column flags")
-(defconstant +CLIENT-CONNECT-WITH-DB+       8 "One can specify db on connect")
-(defconstant +CLIENT-NO-SCHEMA+            16 "Don't allow database.table.column")
-(defconstant +CLIENT-COMPRESS+             32 "Can use compression protocol")
-(defconstant +CLIENT-ODBC+                 64 "Odbc client")
-(defconstant +CLIENT-LOCAL-FILES+         128 "Can use LOAD DATA LOCAL")
-(defconstant +CLIENT-IGNORE-SPACE+        256 "Ignore spaces before '('")
-(defconstant +CLIENT-CHANGE-USER+         512 "Support the mysql-change-user()")
-(defconstant +CLIENT-INTERACTIVE+        1024 "This is an interactive client")
-(defconstant +CLIENT-SSL+                2048 "Switch to SSL after handshake")
-(defconstant +CLIENT-IGNORE-SIGPIPE+     4096 "IGNORE sigpipes")
-(defconstant +CLIENT-TRANSACTIONS+       8192 "Client knows about transactions")
-
-(defconstant +SERVER-STATUS-IN-TRANS+       1 "Transaction has started")
-(defconstant +SERVER-STATUS-AUTOCOMMIT+     2 "Server in auto-commit mode")
-
-(defconstant +MYSQL-ERRMSG-SIZE+          200)
-(defconstant +NET-READ-TIMEOUT+            30 "Timeout on read")
-(defconstant +NET-WRITE-TIMEOUT+           60 "Timeout on write")
-(defconstant +NET-WAIT-TIMEOUT+   (* 8 60 60) "Wait for new query")
-
-
-(defconstant +MAX-CHAR-WIDTH+             255 "Max length for a CHAR colum")
-(defconstant +MAX-BLOB-WIDTH+            8192 "Default width for blob")
+(defconstant +refresh-read-lock+        16384 "Lock tables for read")
+(defconstant +refresh-fast+             32768 "Intern flag")
+
+(defconstant +client-long-password+         1 "new more secure passwords")
+(defconstant +client-found-rows+            2 "Found instead of affected rows")
+(defconstant +client-long-flag+             4 "Get all column flags")
+(defconstant +client-connect-with-db+       8 "One can specify db on connect")
+(defconstant +client-no-schema+            16 "Don't allow database.table.column")
+(defconstant +client-compress+             32 "Can use compression protocol")
+(defconstant +client-odbc+                 64 "Odbc client")
+(defconstant +client-local-files+         128 "Can use LOAD DATA LOCAL")
+(defconstant +client-ignore-space+        256 "Ignore spaces before '('")
+(defconstant +client-change-user+         512 "Support the mysql-change-user()")
+(defconstant +client-interactive+        1024 "This is an interactive client")
+(defconstant +client-ssl+                2048 "Switch to SSL after handshake")
+(defconstant +client-ignore-sigpipe+     4096 "IGNORE sigpipes")
+(defconstant +client-transactions+       8192 "Client knows about transactions")
+
+(defconstant +server-status-in-trans+       1 "Transaction has started")
+(defconstant +server-status-autocommit+     2 "Server in auto-commit mode")
+
+(defconstant +mysql-errmsg-size+          200)
+(defconstant +net-read-timeout+            30 "Timeout on read")
+(defconstant +net-write-timeout+           60 "Timeout on write")
+(defconstant +net-wait-timeout+   (* 8 60 60) "Wait for new query")
+
+
+(defconstant +max-char-width+             255 "Max length for a CHAR colum")
+(defconstant +max-blob-width+            8192 "Default width for blob")

 (ffi:def-c-type net
   (vio                ffi:c-pointer)
@@ -141,7 +139,7 @@
   (buff-end           ffi:c-pointer)
   (write-pos          ffi:c-pointer)
   (read-pos           ffi:c-pointer)
-  (last-error        (ffi:c-array-max ffi:char +MYSQL-ERRMSG-SIZE+))
+  (last-error        (ffi:c-array-max ffi:char +mysql-errmsg-size+))
   (last-errno         ffi:uint)
   (max-packet         ffi:uint)
   (timeout            ffi:uint)
@@ -163,32 +161,32 @@
 (defconstant +packet-error+ #xffffffff)

 (defenum enum-field-types
-  +FIELD-TYPE-DECIMAL+
-  +FIELD-TYPE-TINY+
-  +FIELD-TYPE-SHORT+
-  +FIELD-TYPE-LONG+
-  +FIELD-TYPE-FLOAT+
-  +FIELD-TYPE-DOUBLE+
-  +FIELD-TYPE-NULL+
-  +FIELD-TYPE-TIMESTAMP+
-  +FIELD-TYPE-LONGLONG+
-  +FIELD-TYPE-INT24+
-  +FIELD-TYPE-DATE+
-  +FIELD-TYPE-TIME+
-  +FIELD-TYPE-DATETIME+
-  +FIELD-TYPE-YEAR+
-  +FIELD-TYPE-NEWDATE+
-  (+FIELD-TYPE-ENUM+        247)
-  (+FIELD-TYPE-SET+         248)
-  (+FIELD-TYPE-TINY-BLOB+   249)
-  (+FIELD-TYPE-MEDIUM-BLOB+ 250)
-  (+FIELD-TYPE-LONG-BLOB+   251)
-  (+FIELD-TYPE-BLOB+        252)
-  (+FIELD-TYPE-VAR-STRING+  253)
-  (+FIELD-TYPE-STRING+      254))
-
-(defconstant +FIELD-TYPE-CHAR+        +FIELD-TYPE-TINY+ "For compability")
-(defconstant +FIELD-TYPE-INTERVAL+    +FIELD-TYPE-ENUM+ "For compability")
+  +field-type-decimal+
+  +field-type-tiny+
+  +field-type-short+
+  +field-type-long+
+  +field-type-float+
+  +field-type-double+
+  +field-type-null+
+  +field-type-timestamp+
+  +field-type-longlong+
+  +field-type-int24+
+  +field-type-date+
+  +field-type-time+
+  +field-type-datetime+
+  +field-type-year+
+  +field-type-newdate+
+  (+field-type-enum+        247)
+  (+field-type-set+         248)
+  (+field-type-tiny-blob+   249)
+  (+field-type-medium-blob+ 250)
+  (+field-type-long-blob+   251)
+  (+field-type-blob+        252)
+  (+field-type-var-string+  253)
+  (+field-type-string+      254))
+
+(defconstant +field-type-char+        +field-type-tiny+ "For compability")
+(defconstant +field-type-interval+    +field-type-enum+ "For compability")

 (ffi:def-c-var max-allowed-packet
     (:name "max_allowed_packet")
@@ -266,9 +264,9 @@
 ;; The following is for user defined functions

 (defenum item-result
-  +STRING-RESULT+
-  +REAL-RESULT+
-  +INT-RESULT+)
+  +string-result+
+  +real-result+
+  +int-result+)

 (ffi:def-c-type udf-args
   (arg-count   ffi:uint)                     ; Number of arguments
@@ -287,8 +285,8 @@
   (const-item  my-bool))   ;  0 if result is independent of arguments

 ;; Constants when using compression
-(defconstant +NET-HEADER-SIZE+              4 "standard header size")
-(defconstant +COMP-HEADER-SIZE+             3 "compression header extra size")
+(defconstant +net-header-size+              4 "standard header size")
+(defconstant +comp-header-size+             3 "compression header extra size")

 ;; Prototypes to password functions

diff --git a/clisp/objc.lisp b/clisp/objc.lisp
index b382629..1b39e91 100644
--- a/clisp/objc.lisp
+++ b/clisp/objc.lisp
@@ -15,31 +15,29 @@
 ;;;;    2003-05-30 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

-(defPACKAGE "COM.INFORMATIMAGO.CLISP.OBJC"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.OBJC"
+  (:documentation
    "This module exports a reader macro for Objective-C messaging.")
   (:use "COMMON-LISP")
-  (:EXPORT
+  (:export
    ))

 ;; [object met:arg hod:arg:arg:arg]
diff --git a/clisp/raw-memory.lisp b/clisp/raw-memory.lisp
index 93bf3bb..66dc0ac 100644
--- a/clisp/raw-memory.lisp
+++ b/clisp/raw-memory.lisp
@@ -14,24 +14,22 @@
 ;;;;    2004-11-30 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (eval-when (:compile-toplevel :load-toplevel :execute) (require "linux"))
@@ -40,10 +38,10 @@
 (declaim (declaration also-use-packages))
 (declaim (also-use-packages "LINUX"))
 (defpackage "COM.INFORMATIMAGO.CLISP.RAW-MEMORY"
-  (:DOCUMENTATION "Peek and Poke.")
+  (:documentation "Peek and Poke.")
   (:use "COMMON-LISP" "FFI")
   (:shadowing-import-from "FFI" "SIN")
-  (:EXPORT
+  (:export
    "*LIBRARY*"
    "PEEK" "POKE" "DUMP"
    "WITH-SIGSEG-HANDLER"
diff --git a/clisp/rfc1413.lisp b/clisp/rfc1413.lisp
index b771189..d2108f9 100644
--- a/clisp/rfc1413.lisp
+++ b/clisp/rfc1413.lisp
@@ -14,35 +14,33 @@
 ;;;;    2005-08-31 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2005 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
-(DECLAIM (DECLARATION ALSO-USE-PACKAGES))
-(declaim (ALSO-USE-PACKAGES "SOCKET" "REGEXP" "COM.INFORMATIMAGO.CLISP.IOTASK"))
+(declaim (declaration also-use-packages))
+(declaim (also-use-packages "SOCKET" "REGEXP" "COM.INFORMATIMAGO.CLISP.IOTASK"))
 (defpackage "COM.INFORMATIMAGO.CLISP.RFC1413"
-  (:NICKNAMES "COM.INFORMATIMAGO.CLISP.IDENT" "IDENT-CLIENT" "RFC1413")
-  (:DOCUMENTATION "Implements a ident protocol client.")
+  (:nicknames "COM.INFORMATIMAGO.CLISP.IDENT" "IDENT-CLIENT" "RFC1413")
+  (:documentation "Implements a ident protocol client.")
   (:use "COMMON-LISP"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.CHARACTER-SETS")
-  (:EXPORT "CHARSET-MAP" "GET-PORT-FOR-SERVICE" "BINARY-STREAM-LISTEN"
+  (:export "CHARSET-MAP" "GET-PORT-FOR-SERVICE" "BINARY-STREAM-LISTEN"
            "IDENT-PARSE-RESPONSE" "IDENT-FORMAT-REQUEST"
            "BATCH-REQUEST-IDENTS" "REQUEST-IDENT"
            "BATCH-REQUEST-IDENTS/IOTASK" "REQUEST-IDENT/IOTASK"))
diff --git a/clisp/script.lisp b/clisp/script.lisp
index bbf0f9c..54346c9 100644
--- a/clisp/script.lisp
+++ b/clisp/script.lisp
@@ -14,35 +14,32 @@
 ;;;;    2003-01-29 <PJB> Creation.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
+;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
-;;;;
-;;;;    This file is part of PJB Clisp Scripts.
-;;;;
-;;;;    This  program is  free software;  you can  redistribute  it and/or
-;;;;    modify it  under the  terms of the  GNU General Public  License as
-;;;;    published by the Free Software Foundation; either version 2 of the
-;;;;    License, or (at your option) any later version.
-;;;;
-;;;;    This program  is distributed in the  hope that it  will be useful,
-;;;;    but  WITHOUT ANY WARRANTY;  without even  the implied  warranty of
-;;;;    MERCHANTABILITY or FITNESS FOR  A PARTICULAR PURPOSE.  See the GNU
-;;;;    General Public License for more details.
-;;;;
-;;;;    You should have received a  copy of the GNU General Public License
-;;;;    along with  this program; see the  file COPYING; if  not, write to
-;;;;    the Free  Software Foundation, Inc.,  59 Temple Place,  Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;*****************************************************************************
 (in-package "COMMON-LISP-USER")
 (declaim (declaration also-use-packages))
 (declaim (also-use-packages "SYS" "EXT"))
 (defpackage "COM.INFORMATIMAGO.CLISP.SCRIPT"
-  (:DOCUMENTATION
+  (:documentation
    "This package exports script functions.")
   (:use "COMMON-LISP"
         "COM.INFORMATIMAGO.CLISP.STRING")
-  (:EXPORT  "INITIALIZE"
+  (:export  "INITIALIZE"
             "PERROR" "PMESSAGE" "PQUERY"
             "*INITIAL-WORKING-DIRECTORY*" "IS-RUNNING"
             "*PATH*" "*NAME*" "*ARGUMENTS*" "*TESTING*" "PID"
@@ -60,14 +57,14 @@

 ;;----------------------------------------------------------------------

-(DEFPARAMETER *INITIAL-WORKING-DIRECTORY*  NIL
+(defparameter *initial-working-directory*  nil
   "
 The path to the initial working directory.
 BUG: This is the value of (EXT:CD) when INITIALIZE is called.
 ")


-(DEFPARAMETER *PATH*     NIL
+(defparameter *path*     nil
   "
 The *path* of the script.  Possibly this is not the absolute *path*, but only a
 relative *path* from the INITIAL-WORKING-DIRECTORY.
@@ -75,20 +72,20 @@ BUG: This is the value of *LOAD-PATHNAME* when INITIALIZE is called.
 ")


-(DEFPARAMETER *NAME*     NIL
+(defparameter *name*     nil
   "
 The name of the script.
 BUG: It's derived from the value of *LOAD-PATHNAME* when INITIALIZE is called.
 ")


-(DEFPARAMETER *ARGUMENTS* EXT:*ARGS*
+(defparameter *arguments* ext:*args*
   "
 The list of strings containing the arguments passed to the script.
 ")


-(DEFPARAMETER *TESTING*   NIL
+(defparameter *testing*   nil
   "
 Whether we're only testing the script.
 In this package, this will make END-WITH-STATUS THROW :EXIT instead of exiting.
@@ -97,49 +94,49 @@ NOTE:   This variable can be set by the client script (for example,
 ")


-(DEFUN INITIALIZE ()
+(defun initialize ()
   "
 DO:     Initialize this package.
         This function MUST be called from the  script itself to get the
         correct PNAME.
 "
-  (SETQ *INITIAL-WORKING-DIRECTORY* (EXT:CD)
-        *PATH* *LOAD-PATHNAME*
-        *NAME* (FILE-NAMESTRING *LOAD-PATHNAME*)
-        *ARGUMENTS* (COPY-SEQ EXT:*ARGS*)))
+  (setq *initial-working-directory* (ext:cd)
+        *path* *load-pathname*
+        *name* (file-namestring *load-pathname*)
+        *arguments* (copy-seq ext:*args*)))





-(DEFUN PERROR (FORMAT-STRING &REST ARGS)
+(defun perror (format-string &rest args)
   "
 DO:     Writes a message on the error output in the name of the script.
 "
-  (FORMAT *ERROR-OUTPUT* "~&~A: " *NAME*)
-  (APPLY (FUNCTION FORMAT) *ERROR-OUTPUT* FORMAT-STRING ARGS)
-  (FINISH-OUTPUT *ERROR-OUTPUT*))
+  (format *error-output* "~&~A: " *name*)
+  (apply (function format) *error-output* format-string args)
+  (finish-output *error-output*))


-(DEFUN PMESSAGE (FORMAT-STRING &REST ARGS)
+(defun pmessage (format-string &rest args)
   "
 DO:     Writes a message on the standard output in the name of the script.
 "
-  (FORMAT *STANDARD-OUTPUT* "~&~A: " *NAME*)
-  (APPLY (FUNCTION FORMAT) *STANDARD-OUTPUT* FORMAT-STRING ARGS)
-  (FINISH-OUTPUT *STANDARD-OUTPUT*))
+  (format *standard-output* "~&~A: " *name*)
+  (apply (function format) *standard-output* format-string args)
+  (finish-output *standard-output*))


-(DEFUN PQUERY (FORMAT-STRING &REST ARGS)
+(defun pquery (format-string &rest args)
   "
 DO:     Writes a message on the query I/O in the name of the script, and
         read a response line.
 RETURN: A string containing the response line.
 "
-  (FORMAT *QUERY-IO* "~&~A: " *NAME*)
-  (APPLY (FUNCTION FORMAT) *QUERY-IO* FORMAT-STRING ARGS)
-  (FINISH-OUTPUT *QUERY-IO*)
-  (READ-LINE *QUERY-IO*))
+  (format *query-io* "~&~A: " *name*)
+  (apply (function format) *query-io* format-string args)
+  (finish-output *query-io*)
+  (read-line *query-io*))



@@ -148,59 +145,59 @@ RETURN: A string containing the response line.
 ;; (DEFUN EXECUTABLE-READER (A B C) (SYS::UNIX-EXECUTABLE-READER A B C))
 ;; (SET-DISPATCH-MACRO-CHARACTER #\# #\! #EXECUTABLE-READER)

-(DEFUN IS-RUNNING ()
+(defun is-running ()
   "
 RETURN:  Whether we're running as a script. (Otherwise, we're just loading).
 "
-  (EQ (GET-DISPATCH-MACRO-CHARACTER #\# #\!) #'SYS::UNIX-EXECUTABLE-READER))
+  (eq (get-dispatch-macro-character #\# #\!) #'sys::unix-executable-reader))


-(DEFUN PID ()
-  (LINUX:|getpid|))
+(defun pid ()
+  (linux:|getpid|))



-(DEFUN SHELL-QUOTE-ARGUMENT (ARGUMENT)
+(defun shell-quote-argument (argument)
   "
 DO:      Quote an argument for passing as argument to an inferior shell.
 RETURN:  A string containing the quoted argument.
 "
-  (DO ((I 0 (1+ I))
-       (CH)
-       (RESULT '()))
-      ((<= (LENGTH ARGUMENT) I) (COERCE (NREVERSE RESULT) 'STRING))
-    (SETQ CH (CHAR ARGUMENT I))
-    (UNLESS (OR (CHAR= (CHARACTER "-") CH)
-                (CHAR= (CHARACTER ".") CH)
-                (CHAR= (CHARACTER "/") CH)
-                (AND (CHAR<= (CHARACTER "A") CH) (CHAR<= CH (CHARACTER "Z")))
-                (AND (CHAR<= (CHARACTER "a") CH) (CHAR<= CH (CHARACTER "z")))
-                (AND (CHAR<= (CHARACTER "0") CH) (CHAR<= CH (CHARACTER "9"))))
-      (PUSH (CHARACTER "\\") RESULT))
-    (PUSH CH RESULT)))
-
-
-(DEFUN SHELL   (COMMAND)
+  (do ((i 0 (1+ i))
+       (ch)
+       (result '()))
+      ((<= (length argument) i) (coerce (nreverse result) 'string))
+    (setq ch (char argument i))
+    (unless (or (char= (character "-") ch)
+                (char= (character ".") ch)
+                (char= (character "/") ch)
+                (and (char<= (character "A") ch) (char<= ch (character "Z")))
+                (and (char<= (character "a") ch) (char<= ch (character "z")))
+                (and (char<= (character "0") ch) (char<= ch (character "9"))))
+      (push (character "\\") result))
+    (push ch result)))
+
+
+(defun shell   (command)
   "
 SEE ALSO:    EXECUTE.
 "
-  (EXT:SHELL COMMAND))
+  (ext:shell command))




-(DEFUN EXECUTE (&REST COMMAND)
+(defun execute (&rest command)
   "
 RETURN:     The status returned by the command.
 SEE ALSO:   SHELL
 "
-  (EXT:RUN-PROGRAM (CAR COMMAND)
-    :ARGUMENTS (CDR COMMAND)
-    :INPUT :TERMINAL :OUTPUT :TERMINAL))
+  (ext:run-program (car command)
+    :arguments (cdr command)
+    :input :terminal :output :terminal))



-(DEFUN COPY-FILE (FILE NEWNAME &optional OK-IF-ALREADY-EXISTS KEEP-TIME)
+(defun copy-file (file newname &optional ok-if-already-exists keep-time)
   "
 IMPLEMENTATION: The optional argument is not implemented.

@@ -214,11 +211,11 @@ Fourth arg KEEP-TIME non-nil means give the new file the same
 last-modified time as the old one.  (This works on only some systems.)
 A prefix arg makes KEEP-TIME non-nil.
 "
-  (declare (ignore OK-IF-ALREADY-EXISTS KEEP-TIME))
-  (EXECUTE "cp" (SHELL-QUOTE-ARGUMENT FILE)  (SHELL-QUOTE-ARGUMENT NEWNAME)))
+  (declare (ignore ok-if-already-exists keep-time))
+  (execute "cp" (shell-quote-argument file)  (shell-quote-argument newname)))


-(DEFUN MAKE-SYMBOLIC-LINK (FILENAME LINKNAME &optional OK-IF-ALREADY-EXISTS)
+(defun make-symbolic-link (filename linkname &optional ok-if-already-exists)
   "
 IMPLEMENTATION: The optional argument is not implemented.

@@ -227,121 +224,121 @@ Signals a `file-already-exists' error if a file LINKNAME already exists
 unless optional third argument OK-IF-ALREADY-EXISTS is non-nil.
 A number as third arg means request confirmation if LINKNAME already exists.
 "
-  (declare (ignore OK-IF-ALREADY-EXISTS))
-  (/= 0 (LINUX:|symlink| FILENAME LINKNAME)))
+  (declare (ignore ok-if-already-exists))
+  (/= 0 (linux:|symlink| filename linkname)))


-(DEFUN MAKE-DIRECTORY (*PATH* &OPTIONAL (PARENTS NIL))
+(defun make-directory (*path* &optional (parents nil))
   "
 Create the directory *PATH* and any optionally nonexistent parents dirs.
 The second (optional) argument PARENTS says whether
 to create parents directories if they don't exist.
 "
-  (IF PARENTS
-      (ENSURE-DIRECTORIES-EXIST (CONCATENATE 'STRING *PATH* "/.") :VERBOSE NIL)
-      (LINUX:|mkdir| *PATH*  511 #| #o777 |# ))
-  (EXT:PROBE-DIRECTORY (IF (CHAR= (CHAR *PATH* (1- (LENGTH *PATH*)))
-                                  (CHARACTER "/"))
-                           *PATH* (CONCATENATE 'STRING *PATH* "/"))))
+  (if parents
+      (ensure-directories-exist (concatenate 'string *path* "/.") :verbose nil)
+      (linux:|mkdir| *path*  511 #| #o777 |# ))
+  (ext:probe-directory (if (char= (char *path* (1- (length *path*)))
+                                  (character "/"))
+                           *path* (concatenate 'string *path* "/"))))




 ;; From /usr/include/sysexists.h (Linux)

-(DEFCONSTANT EX-OK            0   "successful termination")
+(defconstant ex-ok            0   "successful termination")


-(DEFCONSTANT EX--BASE         64  "base value for error messages")
+(defconstant ex--base         64  "base value for error messages")


-(DEFCONSTANT EX-USAGE         64  "command line usage error
+(defconstant ex-usage         64  "command line usage error
     The command was used incorrectly, e.g., with
     the wrong number of arguments, a bad flag, a bad
     syntax in a parameter, or whatever.")

-(DEFCONSTANT EX-DATAERR       65  "data format error
+(defconstant ex-dataerr       65  "data format error
     The input data was incorrect in some way.
     This should only be used for user's data & not
     system files.")

-(DEFCONSTANT EX-NOINPUT       66  "cannot open input
+(defconstant ex-noinput       66  "cannot open input
     An input file (not a system file) did not
     exist or was not readable.  This could also include
     errors like \"No message\" to a mailer (if it cared
     to catch it).")

-(DEFCONSTANT EX-NOUSER        67  "addressee unknown
+(defconstant ex-nouser        67  "addressee unknown
     The user specified did not exist.  This might
     be used for mail addresses or remote logins.
     ")

-(DEFCONSTANT EX-NOHOST        68  "host name unknown
+(defconstant ex-nohost        68  "host name unknown
     The host specified did not exist.  This is used
     in mail addresses or network requests.")

-(DEFCONSTANT EX-UNAVAILABLE   69  "service unavailable
+(defconstant ex-unavailable   69  "service unavailable
     A service is unavailable.  This can occur
     if a support program or file does not exist.  This
     can also be used as a catchall message when something
     you wanted to do doesn't work, but you don't know
     why.")

-(DEFCONSTANT EX-SOFTWARE      70  "internal software error
+(defconstant ex-software      70  "internal software error
     An internal software error has been detected.
     This should be limited to non-operating system related
     errors as possible.")

-(DEFCONSTANT EX-OSERR         71  "system error (e.g., can't fork)
+(defconstant ex-oserr         71  "system error (e.g., can't fork)
     An operating system error has been detected.
     This is intended to be used for such things as \"cannot
     fork\", \"cannot create pipe\", or the like.  It includes
     things like getuid returning a user that does not
     exist in the passwd file.")

-(DEFCONSTANT EX-OSFILE        72  "critical OS file missing
+(defconstant ex-osfile        72  "critical OS file missing
     Some system file (e.g., /etc/passwd, /etc/utmp,
     etc.) does not exist, cannot be opened, or has some
     sort of error (e.g., syntax error).")

-(DEFCONSTANT EX-CANTCREAT     73  "can't create (user) output file
+(defconstant ex-cantcreat     73  "can't create (user) output file
     A (user specified) output file cannot be created.")

-(DEFCONSTANT EX-IOERR         74  "input/output error
+(defconstant ex-ioerr         74  "input/output error
      An error occurred while doing I/O on some file.")

-(DEFCONSTANT EX-TEMPFAIL      75  "temp failure; user is invited to retry
+(defconstant ex-tempfail      75  "temp failure; user is invited to retry
     temporary failure, indicating something that
     is not really an error.  In sendmail, this means
     that a mailer (e.g.) could not create a connection,
     and the request should be reattempted later.")

-(DEFCONSTANT EX-PROTOCOL      76  "remote error in protocol
+(defconstant ex-protocol      76  "remote error in protocol
     the remote system returned something that
     was \"not possible\" during a protocol exchange.")

-(DEFCONSTANT EX-NOPERM        77  "permission denied
+(defconstant ex-noperm        77  "permission denied
     You did not have sufficient permission to
     perform the operation.  This is not intended for
     file system problems, which should use NOINPUT or
     CANTCREAT, but rather for higher level permissions.")

-(DEFCONSTANT EX-CONFIG        78  "configuration error")
+(defconstant ex-config        78  "configuration error")


-(DEFCONSTANT EX--MAX          78  "maximum listed value")
+(defconstant ex--max          78  "maximum listed value")



-(DEFUN EXIT (&OPTIONAL (STATUS 0))
+(defun exit (&optional (status 0))
   "
 DO:      Exit the script.
          If we are testing, then use throw to jump back to the caller.
 "
-  (WHEN (IS-RUNNING)
-    (IF *TESTING*
-        (THROW :EXIT STATUS)
-        (EXT:EXIT STATUS))))
+  (when (is-running)
+    (if *testing*
+        (throw :exit status)
+        (ext:exit status))))
 ;; when loading, we don't exit, could we?

 ;;;; THE END ;;;;
diff --git a/clisp/shell.lisp b/clisp/shell.lisp
index a8c0b74..77c9631 100644
--- a/clisp/shell.lisp
+++ b/clisp/shell.lisp
@@ -16,35 +16,32 @@
 ;;;;    2002-12-10 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;
-;;;;    GPL
-;;;;
+;;;;    AGPL3
+;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2002 - 2002
-;;;;
-;;;;    This script is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU  General Public
-;;;;    License as published by the Free Software Foundation; either
-;;;;    version 2 of the License, or (at your option) any later version.
-;;;;
-;;;;    This script is distributed in the hope that it will be useful,
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
 ;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-;;;;    General Public License for more details.
-;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this library; see the file COPYING.LIB.
-;;;;    If not, write to the Free Software Foundation,
-;;;;    59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************
 (in-package "COMMON-LISP-USER")
 (declaim (declaration also-use-packages))
 (declaim (also-use-packages "FFI"  "LINUX"))
 (eval-when (:compile-toplevel :load-toplevel :execute) (require "linux"))
-(defPACKAGE "COM.INFORMATIMAGO.CLISP.SHELL"
-  (:DOCUMENTATION
+(defpackage "COM.INFORMATIMAGO.CLISP.SHELL"
+  (:documentation
    "This package export shell primitives (fork, pipe, redirections, exec).")
   (:use "COMMON-LISP")
-  (:EXPORT
+  (:export
    ;; variables:
    "*TEMPORARY-PATHNAME*" ;; pathname of the temporary directory.
    ;; macro API:
@@ -56,7 +53,7 @@



-(DEFVAR *TEMPORARY-PATHNAME* "/tmp" "A path to a temporary directory.")
+(defvar *temporary-pathname* "/tmp" "A path to a temporary directory.")



@@ -109,7 +106,7 @@
 ;;;   );;EXECL


-(DEFMACRO EXECL (PATH &REST ARGV)
+(defmacro execl (path &rest argv)
   "
 DO:         Execute the program at path, passing the arguments argv.
 EXAMPLE:    (execl \"/bin/ls\" \"ls\" \"-l\" \"-F\" \"/tmp\")
@@ -117,25 +114,25 @@ PRE:        (<= 1 (length argv))
 NOTE:       Doesn't return!  The current process image is replaced by
             the executed program.
 "
-  (LET* ((ARGC (1- (LENGTH ARGV)))
-         (EXEC (INTERN (with-standard-io-syntax (FORMAT NIL "EXECL~D" ARGC)))))
-    (IF (FBOUNDP EXEC)
-        `(,EXEC ,PATH ,@ARGV NIL)
-        `(PROGN
-           (FFI:DEF-CALL-OUT
-               ,EXEC
-               (:LANGUAGE :STDC)
-             (:ARGUMENTS
-              (PATH FFI:C-STRING)
-              ,@(DO ((I 0 (1+ I))
-                     (ARGUMENTS NIL (CONS (LIST (INTERN (with-standard-io-syntax
-                                                          (FORMAT NIL "ARGV~D" I)))
-                                                'FFI:C-STRING) ARGUMENTS)) )
-                    ((< ARGC I) (NREVERSE ARGUMENTS)))
-              (NULL FFI:C-STRING))
-             (:RETURN-TYPE FFI:INT)
-             (:NAME "execl"))
-           (,EXEC ,PATH ,@ARGV NIL)))))
+  (let* ((argc (1- (length argv)))
+         (exec (intern (with-standard-io-syntax (format nil "EXECL~D" argc)))))
+    (if (fboundp exec)
+        `(,exec ,path ,@argv nil)
+        `(progn
+           (ffi:def-call-out
+               ,exec
+               (:language :stdc)
+             (:arguments
+              (path ffi:c-string)
+              ,@(do ((i 0 (1+ i))
+                     (arguments nil (cons (list (intern (with-standard-io-syntax
+                                                          (format nil "ARGV~D" i)))
+                                                'ffi:c-string) arguments)) )
+                    ((< argc i) (nreverse arguments)))
+              (null ffi:c-string))
+             (:return-type ffi:int)
+             (:name "execl"))
+           (,exec ,path ,@argv nil)))))



@@ -147,83 +144,83 @@ NOTE:       Doesn't return!  The current process image is replaced by
 ;; pipe-and-exec
 ;; -------------

-(DEFUN CHECK-PROCESS-LIST (PROCESS-LIST)
+(defun check-process-list (process-list)
   "PRIVATE.
 DO:         Checks and evaluates the process-list.
 RETURN:     An evaluated process-list.
 "
-  (MAPCAR
-   (LAMBDA (PROCESS)
-     (COND
-       ((ATOM PROCESS)
-        (ERROR "Invalid process ~S." PROCESS))
-       ((NOT (KEYWORDP (CAR PROCESS)))
-        (ERROR "Invalid tag for process ~S." PROCESS))
-       ((EQ :BEGIN (CADR PROCESS)) PROCESS)
-       (T (CONS (CAR PROCESS)
-                (MAPCAR (LAMBDA (ITEM)
-                          (IF (STRINGP ITEM)
-                              ITEM
-                              (FORMAT NIL "~A" (EVAL ITEM))))
-                        (CDR PROCESS))))))
-   PROCESS-LIST))
-
-
-(DEFUN CHECK-PROCESS-TAG (PROCESS-LIST TAG)
+  (mapcar
+   (lambda (process)
+     (cond
+       ((atom process)
+        (error "Invalid process ~S." process))
+       ((not (keywordp (car process)))
+        (error "Invalid tag for process ~S." process))
+       ((eq :begin (cadr process)) process)
+       (t (cons (car process)
+                (mapcar (lambda (item)
+                          (if (stringp item)
+                              item
+                              (format nil "~A" (eval item))))
+                        (cdr process))))))
+   process-list))
+
+
+(defun check-process-tag (process-list tag)
   "PRIVATE.
 DO:         Check the process tag.
 "
-  (UNLESS (MEMBER TAG PROCESS-LIST
-                  :TEST (FUNCTION EQ)
-                  :KEY  (FUNCTION CAR))
-    (ERROR "Tag ~S is not in the process-list." TAG)))
+  (unless (member tag process-list
+                  :test (function eq)
+                  :key  (function car))
+    (error "Tag ~S is not in the process-list." tag)))


-(DEFUN CHECK-PROCESS-FDES (PROCESS-LIST PROCESS-FDES &OPTIONAL TRIPLET)
+(defun check-process-fdes (process-list process-fdes &optional triplet)
   "PRIVATE.
 DO:         Checks and evaluates the process fdes.
 RETURN:     An evaluated process-fdes.
 "
-  (WHEN (ATOM PROCESS-FDES)
-    (ERROR "Invalid file descriptor specification ~S (must be a list)."
-           PROCESS-FDES))
-  (LET ((TAG (CAR PROCESS-FDES)))
-    (CHECK-PROCESS-TAG PROCESS-LIST TAG)
-    (COND
-      ((= 2 (LENGTH PROCESS-FDES))
-       (WHEN TRIPLET
-         (ERROR
+  (when (atom process-fdes)
+    (error "Invalid file descriptor specification ~S (must be a list)."
+           process-fdes))
+  (let ((tag (car process-fdes)))
+    (check-process-tag process-list tag)
+    (cond
+      ((= 2 (length process-fdes))
+       (when triplet
+         (error
           "Invalid file descriptor specification ~S (must have 3 elements)."
-          PROCESS-FDES))
-       (LET ((FDES (NTH 1 PROCESS-FDES)))
-         (UNLESS (INTEGERP FDES)
-           (SETQ FDES (EVAL FDES)))
-         (UNLESS (INTEGERP FDES)
-           (ERROR "Invalid file descriptor specification ~S (~S should evaluate to an integer)." PROCESS-FDES (NTH 1 PROCESS-FDES)))
-         (LIST TAG FDES)))
-      ((= 3 (LENGTH PROCESS-FDES))
-       (UNLESS TRIPLET
-         (ERROR
+          process-fdes))
+       (let ((fdes (nth 1 process-fdes)))
+         (unless (integerp fdes)
+           (setq fdes (eval fdes)))
+         (unless (integerp fdes)
+           (error "Invalid file descriptor specification ~S (~S should evaluate to an integer)." process-fdes (nth 1 process-fdes)))
+         (list tag fdes)))
+      ((= 3 (length process-fdes))
+       (unless triplet
+         (error
           "Invalid file descriptor specification ~S (must have 2 elements)."
-          PROCESS-FDES))
-       (LET ((FDES1 (NTH 1 PROCESS-FDES))
-             (FDES2 (NTH 2 PROCESS-FDES)))
-         (UNLESS (INTEGERP FDES1)
-           (SETQ FDES1 (EVAL FDES1)))
-         (UNLESS (INTEGERP FDES1)
-           (ERROR "Invalid file descriptor specification ~S (~S should evaluate to an integer)." PROCESS-FDES (NTH 1 PROCESS-FDES)))
-         (UNLESS (INTEGERP FDES2)
-           (SETQ FDES2 (EVAL FDES2)))
-         (UNLESS (INTEGERP FDES2)
-           (ERROR "Invalid file descriptor specification ~S (~S should evaluate to an integer)." PROCESS-FDES (NTH 2 PROCESS-FDES)))
-         (LIST TAG FDES1 FDES2)))
-      (T
-       (ERROR
+          process-fdes))
+       (let ((fdes1 (nth 1 process-fdes))
+             (fdes2 (nth 2 process-fdes)))
+         (unless (integerp fdes1)
+           (setq fdes1 (eval fdes1)))
+         (unless (integerp fdes1)
+           (error "Invalid file descriptor specification ~S (~S should evaluate to an integer)." process-fdes (nth 1 process-fdes)))
+         (unless (integerp fdes2)
+           (setq fdes2 (eval fdes2)))
+         (unless (integerp fdes2)
+           (error "Invalid file descriptor specification ~S (~S should evaluate to an integer)." process-fdes (nth 2 process-fdes)))
+         (list tag fdes1 fdes2)))
+      (t
+       (error
         "Invalid file descriptor specification ~S (must have ~D elements)."
-        PROCESS-FDES (IF TRIPLET 3 2))))))
+        process-fdes (if triplet 3 2))))))


-(DEFUN CHECK-EDGE-LIST (PROCESS-LIST EDGE-LIST)
+(defun check-edge-list (process-list edge-list)
   "PRIVATE.
 DO:         Checks the syntax of the edge-list and evalutes file names
             and descriptors. Issue error calls.
@@ -246,98 +243,98 @@ EDGE-LIST:  specifies the pipe and input or output as:
             close-fdes    (close (process-tag fdes)...)
             dup2-fdes     (dup2  (process-tag tfdes sfdes)...)
 "
-  (MAPCAR
-   (LAMBDA (EDGE)
-     (COND
-       ((ATOM EDGE)
-        (ERROR "An edge must be a list, not ~S." EDGE))
+  (mapcar
+   (lambda (edge)
+     (cond
+       ((atom edge)
+        (error "An edge must be a list, not ~S." edge))
        ;; ------------
        ;; a close edge
        ;; ------------
-       ((EQ :CLOSE (CAR EDGE))
-        (CONS :CLOSE
-              (MAPCAR (LAMBDA (PF) (CHECK-PROCESS-FDES PROCESS-LIST PF NIL))
-                      (CDR EDGE))) )
+       ((eq :close (car edge))
+        (cons :close
+              (mapcar (lambda (pf) (check-process-fdes process-list pf nil))
+                      (cdr edge))) )
        ;; -----------
        ;; a dup2 edge
        ;; -----------
-       ((EQ :DUPLICATE (CAR EDGE))
-        (CONS :DUPLICATE
-              (MAPC (LAMBDA (PF) (CHECK-PROCESS-FDES PROCESS-LIST PF T))
-                    (CDR EDGE))))
-       ((/= 2 (LENGTH EDGE))
-        (ERROR "Invalid edge ~S (must have two nodes)." EDGE))
+       ((eq :duplicate (car edge))
+        (cons :duplicate
+              (mapc (lambda (pf) (check-process-fdes process-list pf t))
+                    (cdr edge))))
+       ((/= 2 (length edge))
+        (error "Invalid edge ~S (must have two nodes)." edge))
        ;; -----------
        ;; a data edge
        ;; -----------
-       ((AND (CONSP (CAR EDGE)) (EQ :DATA (CAAR EDGE)))
-        (UNLESS (= 2 (LENGTH (CAR EDGE)))
-          (ERROR "Invalid data node ~S. Expected (:data form)."  (CAR EDGE)))
-        (CHECK-PROCESS-FDES PROCESS-LIST (CADR EDGE))
-        (LIST :DATA
-              (CADAR EDGE)
-              (CHECK-PROCESS-FDES PROCESS-LIST (CADR EDGE))) )
+       ((and (consp (car edge)) (eq :data (caar edge)))
+        (unless (= 2 (length (car edge)))
+          (error "Invalid data node ~S. Expected (:data form)."  (car edge)))
+        (check-process-fdes process-list (cadr edge))
+        (list :data
+              (cadar edge)
+              (check-process-fdes process-list (cadr edge))) )
        ;; -----------------
        ;; a file input edge
        ;; -----------------
-       ((STRINGP (CAR EDGE))
-        (LIST :INPUT
-              (LIST :FILE (CAR EDGE))
-              (CHECK-PROCESS-FDES PROCESS-LIST (CADR EDGE))) )
-       ((AND (CONSP (CAR EDGE))
-             (EQ :FILE (CAAR EDGE)))
-        (UNLESS (= 2 (LENGTH (CAR EDGE)))
-          (ERROR "Invalid input file specification ~S. Expected (:FILE fname)."
-                 (CAR EDGE)))
-        (LET ((FNAME (CADAR EDGE)) )
-          (SETQ FNAME (IF (STRINGP FNAME) FNAME
-                          (FORMAT NIL "~A" (EVAL FNAME))))
-          (LIST :INPUT
-                (LIST :FILE FNAME)
-                (CHECK-PROCESS-FDES PROCESS-LIST (CADR EDGE)))))
+       ((stringp (car edge))
+        (list :input
+              (list :file (car edge))
+              (check-process-fdes process-list (cadr edge))) )
+       ((and (consp (car edge))
+             (eq :file (caar edge)))
+        (unless (= 2 (length (car edge)))
+          (error "Invalid input file specification ~S. Expected (:FILE fname)."
+                 (car edge)))
+        (let ((fname (cadar edge)) )
+          (setq fname (if (stringp fname) fname
+                          (format nil "~A" (eval fname))))
+          (list :input
+                (list :file fname)
+                (check-process-fdes process-list (cadr edge)))))
        ;; ----------------------------
        ;; a file output or append edge
        ;; ----------------------------
-       ((STRINGP (CADR EDGE))
-        (LIST :OUTPUT
-              (CHECK-PROCESS-FDES PROCESS-LIST (CAR EDGE))
-              (LIST :FILE (CADR EDGE))))
-       ((AND (CONSP (CADR EDGE))
-             (EQ :FILE (CAADR EDGE)))
-        (UNLESS (OR (= 2 (LENGTH (CADR EDGE)))
-                    (AND (= 3 (LENGTH (CADR EDGE)))
-                         (EQ :APPEND (NTH 2 (CADR EDGE)))))
-          (ERROR (CONCATENATE 'STRING
+       ((stringp (cadr edge))
+        (list :output
+              (check-process-fdes process-list (car edge))
+              (list :file (cadr edge))))
+       ((and (consp (cadr edge))
+             (eq :file (caadr edge)))
+        (unless (or (= 2 (length (cadr edge)))
+                    (and (= 3 (length (cadr edge)))
+                         (eq :append (nth 2 (cadr edge)))))
+          (error (concatenate 'string
                    "Invalid output file specification ~S. "
                    "Expected (LFILE fname [:APPEND]).")
-                 (CADR EDGE)))
-        (LET ((FNAME  (CADAR EDGE))
-              (APPEND (MEMBER :APPEND (CADR EDGE) :TEST (FUNCTION EQ))) )
-          (SETQ FNAME (IF (STRINGP FNAME) FNAME
-                          (FORMAT NIL "~A" (EVAL FNAME))))
-          (LIST :OUTPUT
-                (CHECK-PROCESS-FDES PROCESS-LIST (CAR EDGE))
-                (IF APPEND
-                    (LIST :FILE  FNAME :APPEND)
-                    (LIST :FILE  FNAME)))))
+                 (cadr edge)))
+        (let ((fname  (cadar edge))
+              (append (member :append (cadr edge) :test (function eq))) )
+          (setq fname (if (stringp fname) fname
+                          (format nil "~A" (eval fname))))
+          (list :output
+                (check-process-fdes process-list (car edge))
+                (if append
+                    (list :file  fname :append)
+                    (list :file  fname)))))
        ;; -----------
        ;; a pipe edge
        ;; -----------
-       ((AND (CONSP (NTH 0 EDGE))
-             (CONSP (NTH 1 EDGE)))
-        (LIST :PIPE
-              (CHECK-PROCESS-FDES PROCESS-LIST (NTH 0 EDGE))
-              (CHECK-PROCESS-FDES PROCESS-LIST (NTH 1 EDGE))))
+       ((and (consp (nth 0 edge))
+             (consp (nth 1 edge)))
+        (list :pipe
+              (check-process-fdes process-list (nth 0 edge))
+              (check-process-fdes process-list (nth 1 edge))))
        ;; -----------
        ;; other edges
        ;; -----------
-       (T (ERROR "Invalid edge ~S." EDGE))
+       (t (error "Invalid edge ~S." edge))
        ))
-   EDGE-LIST))
+   edge-list))



-(DEFUN CREATE-DATAFILES-AND-PIPES (EDGE-LIST)
+(defun create-datafiles-and-pipes (edge-list)
   "PRIVATE.
 "
   ;; pre-process edge-list:
@@ -352,47 +349,47 @@ EDGE-LIST:  specifies the pipe and input or output as:
   ;; (pipe (process-tag fdes) (process-tag fdes))
   ;; --> (pipe in-fdes out-fdes (process-tag fdes) (process-tag fdes))
   ;;
-  (MAPCAR
-   (LAMBDA (EDGE)
-     (COND
+  (mapcar
+   (lambda (edge)
+     (cond
        ;; ------------------------------- ;;
        ;; create the temporary file
        ;; data: mkstemp;open;write;open;unlink;close
-       ((EQ :DATA (CAR EDGE))
-        (MULTIPLE-VALUE-BIND
-              (FDESC FPATH)
-            (LINUX:|mkstemp| (FORMAT NIL "~a/lisp-inline-data-XXXXXX"
-                                     *TEMPORARY-PATHNAME*))
-          (WHEN (< FDESC 0)
-            (ERROR "LINUX:mkstemp reported error errno=~a." LINUX::|errno|))
+       ((eq :data (car edge))
+        (multiple-value-bind
+              (fdesc fpath)
+            (linux:|mkstemp| (format nil "~a/lisp-inline-data-XXXXXX"
+                                     *temporary-pathname*))
+          (when (< fdesc 0)
+            (error "LINUX:mkstemp reported error errno=~a." linux::|errno|))
           ;; fill the temporary file
-          (WITH-OPEN-FILE (DATA FPATH
-                                :DIRECTION :OUTPUT
-                                :IF-EXISTS :OVERWRITE
-                                :IF-DOES-NOT-EXIST :CREATE)
-            (FORMAT NIL "~A" (NTH 1 EDGE)))
-          (PROG1
-              (LIST :DATA (LINUX:|open| FPATH LINUX:O_RDONLY 0)
-                    FPATH (NTH 2 EDGE))
+          (with-open-file (data fpath
+                                :direction :output
+                                :if-exists :overwrite
+                                :if-does-not-exist :create)
+            (format nil "~A" (nth 1 edge)))
+          (prog1
+              (list :data (linux:|open| fpath linux:o_rdonly 0)
+                    fpath (nth 2 edge))
             ;; close and delete the temporary file (we keep an input fd).
-            (DELETE-FILE FPATH)
-            (LINUX:|close| FDESC))))
+            (delete-file fpath)
+            (linux:|close| fdesc))))
        ;; ------------------------------- ;;
        ;; create the pipe
        ;; pipe: pipe
-       ((EQ :PIPE (CAR EDGE))
-        (MULTIPLE-VALUE-BIND (RESULT FDESCS) (LINUX:|pipe|)
-          (WHEN (/= 0 RESULT)
-            (ERROR "LINUX:pipe returned ~S." RESULT))
-          (CONS :PIPE (CONS (AREF FDESCS 0) (CONS (AREF FDESCS 1)
-                                                  (CDR EDGE))))))
+       ((eq :pipe (car edge))
+        (multiple-value-bind (result fdescs) (linux:|pipe|)
+          (when (/= 0 result)
+            (error "LINUX:pipe returned ~S." result))
+          (cons :pipe (cons (aref fdescs 0) (cons (aref fdescs 1)
+                                                  (cdr edge))))))
        ;; ------------------------------- ;;
        ;; don't do anything.
-       (T EDGE)))
-   EDGE-LIST))
+       (t edge)))
+   edge-list))


-(DEFUN PREPARE-FD (PROCESS EDGE-LIST)
+(defun prepare-fd (process edge-list)
   "PRIVATE.
 NOTE:       called in the child process `PROCESS'.
 DO:         open files, assign pipe descriptors, close file descriptors,
@@ -404,94 +401,94 @@ DO:         open files, assign pipe descriptors, close file descriptors,
   ;; 3.2. assign the pipe descriptor, or
   ;; 3.3. close the file descriptor, or
   ;; 3.4. dup2 the file decriptor.
-  (LET ((TAG (CAR PROCESS)))
-    (MAPC
-     (LAMBDA (EDGE)
-       (COND
+  (let ((tag (car process)))
+    (mapc
+     (lambda (edge)
+       (cond
          ;; ---------------------------------------- ;;
          ;; (:data ddes dname (:tag fdes))
-         ((AND (EQ :DATA (CAR EDGE))
-               (EQ TAG (CAR (NTH 3 EDGE)) ))
-          (LET* ((DDES  (NTH 1 EDGE))
-                 (FDES  (CADR (NTH 3 EDGE))) )
-            (WHEN (/= DDES FDES)
-              (LINUX:|dup2| DDES FDES)
-              (LINUX:|close| DDES)))) ;; "inline" data file.
+         ((and (eq :data (car edge))
+               (eq tag (car (nth 3 edge)) ))
+          (let* ((ddes  (nth 1 edge))
+                 (fdes  (cadr (nth 3 edge))) )
+            (when (/= ddes fdes)
+              (linux:|dup2| ddes fdes)
+              (linux:|close| ddes)))) ;; "inline" data file.
          ;; ---------------------------------------- ;;
          ;; (:input (file fname) (:tag fdes))
-         ((AND (EQ :INPUT (CAR EDGE))
-               (EQ (CAR (NTH 2 EDGE)) TAG))
-          (LET* ((FNAME (CADR (NTH 1 EDGE)))
-                 (FDES  (CADR (NTH 2 EDGE)))
-                 (ODES  (LINUX:|open| FNAME LINUX:O_RDONLY 0)) )
-            (WHEN (< ODES 0)
-              (ERROR "Can't open ~S for reading." FNAME))
-            (WHEN (/= ODES FDES)
-              (LINUX:|dup2| ODES FDES)
-              (LINUX:|close| ODES)))) ;; input data file
+         ((and (eq :input (car edge))
+               (eq (car (nth 2 edge)) tag))
+          (let* ((fname (cadr (nth 1 edge)))
+                 (fdes  (cadr (nth 2 edge)))
+                 (odes  (linux:|open| fname linux:o_rdonly 0)) )
+            (when (< odes 0)
+              (error "Can't open ~S for reading." fname))
+            (when (/= odes fdes)
+              (linux:|dup2| odes fdes)
+              (linux:|close| odes)))) ;; input data file
          ;; ---------------------------------------- ;;
          ;; (:output  (:tag fdes) (file fname [:append]))
-         ((AND (EQ :OUTPUT (CAR EDGE))
-               (EQ (CAR (NTH 1 EDGE)) TAG))
-          (LET* ((FDES   (CADR (NTH 1 EDGE)))
-                 (FNAME  (CADR (NTH 2 EDGE)))
-                 (APPEND (MEMBER :APPEND (NTH 2 EDGE) :TEST (FUNCTION EQ)))
-                 (ODES (LINUX:|open| FNAME
-                              (+ LINUX:O_WRONLY linux:O_CREAT
-                                 (IF APPEND LINUX:O_APPEND LINUX:O_TRUNC))
+         ((and (eq :output (car edge))
+               (eq (car (nth 1 edge)) tag))
+          (let* ((fdes   (cadr (nth 1 edge)))
+                 (fname  (cadr (nth 2 edge)))
+                 (append (member :append (nth 2 edge) :test (function eq)))
+                 (odes (linux:|open| fname
+                              (+ linux:o_wronly linux:o_creat
+                                 (if append linux:o_append linux:o_trunc))
                               438)) )
-            (WHEN (< ODES 0)
-              (ERROR "Can't open ~S for writting." FNAME))
-            (WHEN (/= ODES FDES)
-              (LINUX:|dup2| ODES FDES)
-              (LINUX:|close| ODES)))) ;; output data file
+            (when (< odes 0)
+              (error "Can't open ~S for writting." fname))
+            (when (/= odes fdes)
+              (linux:|dup2| odes fdes)
+              (linux:|close| odes)))) ;; output data file
          ;; ---------------------------------------- ;;
          ;; (:pipe ifdes ofdes (:tag fdes) (:tag fdes)) output pipe
-         ((AND (EQ :PIPE (CAR EDGE))
-               (EQ TAG (CAR (NTH 3 EDGE))))
-          (LET* ((IFDES (NTH 1 EDGE))
-                 (OFDES (NTH 2 EDGE))
-                 (FDES (CADR (NTH 3 EDGE))))
-            (WHEN (/= OFDES FDES)
-              (LINUX:|dup2| OFDES FDES)
-              (LINUX:|close| IFDES)
-              (LINUX:|close| OFDES)))) ;; output pipe
+         ((and (eq :pipe (car edge))
+               (eq tag (car (nth 3 edge))))
+          (let* ((ifdes (nth 1 edge))
+                 (ofdes (nth 2 edge))
+                 (fdes (cadr (nth 3 edge))))
+            (when (/= ofdes fdes)
+              (linux:|dup2| ofdes fdes)
+              (linux:|close| ifdes)
+              (linux:|close| ofdes)))) ;; output pipe
          ;; ---------------------------------------- ;;
          ;; (:pipe ifdes ofdes (:tag fdes) (:tag fdes)) input pipe
-         ((AND (EQ :PIPE (CAR EDGE) )
-               (EQ TAG (CAR (NTH 4 EDGE)) ))
-          (LET* ((IFDES (NTH 1 EDGE))
-                 (OFDES (NTH 2 EDGE))
-                 (FDES (CADR (NTH 4 EDGE))))
-            (WHEN (/= IFDES FDES)
-              (LINUX:|dup2| IFDES FDES)
-              (LINUX:|close| IFDES)
-              (LINUX:|close| OFDES)))) ;; input pipe
+         ((and (eq :pipe (car edge) )
+               (eq tag (car (nth 4 edge)) ))
+          (let* ((ifdes (nth 1 edge))
+                 (ofdes (nth 2 edge))
+                 (fdes (cadr (nth 4 edge))))
+            (when (/= ifdes fdes)
+              (linux:|dup2| ifdes fdes)
+              (linux:|close| ifdes)
+              (linux:|close| ofdes)))) ;; input pipe
          ;; ---------------------------------------- ;;
          ;; (:close (:tag fdes)...)
-         ((EQ :CLOSE (CAR EDGE))
-          (MAPC (LAMBDA (TAG-FDES)
-                  (WHEN (EQ (CAR TAG-FDES) TAG)
-                    (LINUX:|close| (CADR TAG-FDES))))
-                (CDR EDGE)))
+         ((eq :close (car edge))
+          (mapc (lambda (tag-fdes)
+                  (when (eq (car tag-fdes) tag)
+                    (linux:|close| (cadr tag-fdes))))
+                (cdr edge)))
          ;; ---------------------------------------- ;;
          ;; (:duplicate (:tag dfdes sfdes)...)
-         ((EQ :DUPLICATE (CAR EDGE))
-          (MAPC (LAMBDA (TAG-D-S)
-                  (WHEN (EQ (CAR TAG-D-S) TAG)
-                    (LET ((DST (NTH 1 TAG-D-S))
-                          (SRC (NTH 2 TAG-D-S)))
-                      (LINUX:|dup2| SRC DST)
+         ((eq :duplicate (car edge))
+          (mapc (lambda (tag-d-s)
+                  (when (eq (car tag-d-s) tag)
+                    (let ((dst (nth 1 tag-d-s))
+                          (src (nth 2 tag-d-s)))
+                      (linux:|dup2| src dst)
                       ;; we don't close the src, we leave that to the client.
                       )))
-                (CDR EDGE)))
+                (cdr edge)))
          ;; ---------------------------------------- ;;
-         (T (ERROR "Unknown edge type ~S." EDGE))))
-     EDGE-LIST)))
+         (t (error "Unknown edge type ~S." edge))))
+     edge-list)))



-(DEFUN PIPE-AND-EXEC (PROCESS-LIST EDGE-LIST &KEY WAIT)
+(defun pipe-and-exec (process-list edge-list &key wait)
   "
 RETURN:         NOT UP TO DATE a list of processes
                 (:tag status :begin form...) or
@@ -541,106 +538,106 @@ EDGE-LIST:      specifies the pipe and input or output as:
   ;; 6. in parent, wait for all the children.
   ;;
   ;; check the syntax, and evalutate process-list:
-  (SETQ PROCESS-LIST (CHECK-PROCESS-LIST PROCESS-LIST))
+  (setq process-list (check-process-list process-list))
   ;; check the syntax, and evaluate edge-list and canonize:
-  (SETQ EDGE-LIST (CHECK-EDGE-LIST PROCESS-LIST EDGE-LIST))
+  (setq edge-list (check-edge-list process-list edge-list))
   ;; 0. input-data must be evaluated and written to temporary files.
   ;; 1. create all the pipes
-  (SETQ EDGE-LIST (CREATE-DATAFILES-AND-PIPES EDGE-LIST))
+  (setq edge-list (create-datafiles-and-pipes edge-list))

   ;; 2. fork the processes.
-  (SETQ PROCESS-LIST
-        (MAPCAR
-         (LAMBDA (PROCESS)
-           (LET ((PID (LINUX:|fork|)))
-             (COND
-               ((< PID 0)
+  (setq process-list
+        (mapcar
+         (lambda (process)
+           (let ((pid (linux:|fork|)))
+             (cond
+               ((< pid 0)
                 ;; --------------------------------------------- error
                 ;; TODO: We should keep the errno along with the process.
-                (LIST :FORK-SUCCESS NIL
-                      :FORK-ERRNO LINUX::|errno|
-                      :PROCESS PROCESS))
-               ((= PID 0)
+                (list :fork-success nil
+                      :fork-errno linux::|errno|
+                      :process process))
+               ((= pid 0)
                 ;; --------------------------------------------- child
                 ;; 3. in each child in the order specified,
                 ;; 3.1. open the file, or
                 ;; 3.2. assign the pipe descriptor, or
                 ;; 3.3. close the file descriptor, or
                 ;; 3.4. dup2 the file decriptor.
-                (LET ((STATUS 69)) ;; EX_UNAVAILABLE
-                  (UNWIND-PROTECT
-                       (PROGN
-                         (PREPARE-FD PROCESS EDGE-LIST)
+                (let ((status 69)) ;; EX_UNAVAILABLE
+                  (unwind-protect
+                       (progn
+                         (prepare-fd process edge-list)
                          ;; 4. exec the program or run the lisp form, then exit.
-                         (IF (EQ :BEGIN (NTH 1 PROCESS))
+                         (if (eq :begin (nth 1 process))
                              ;; lisp form
-                             (SETQ STATUS (EVAL (CONS 'PROGN (CDDR PROCESS))))
+                             (setq status (eval (cons 'progn (cddr process))))
                              ;; program process
-                             (EVAL (CONS 'EXECL (CONS (NTH 1 PROCESS)
-                                                      (CDR PROCESS))))
+                             (eval (cons 'execl (cons (nth 1 process)
+                                                      (cdr process))))
                              ))
                     ;; no clean up
                     )
-                  (EXT:EXIT STATUS)))
-               (T
+                  (ext:exit status)))
+               (t
                 ;; --------------------------------------------- parent
-                (LIST :FORK-SUCCESS T
-                      :CHILD-PID PID
-                      :PROCESS PROCESS)) ) ;;COND
+                (list :fork-success t
+                      :child-pid pid
+                      :process process)) ) ;;COND
              ))                            ;;LAMBDA
-         PROCESS-LIST))
+         process-list))
   ;; 5. in parent, close the pipes
-  (MAPC (LAMBDA (EDGE)
-          (COND
-            ((EQ :DATA (CAR EDGE))
-             (LINUX:|close| (NTH 1 EDGE))) ;; input fd we kept.
-            ((EQ :PIPE (CAR EDGE))
-             (LET* ((P1 (NTH 1 EDGE))
-                    (P2 (NTH 2 EDGE)))
-               (LINUX:|close| P1)
-               (LINUX:|close| P2))) ;; pipe open in parent, used by children.
+  (mapc (lambda (edge)
+          (cond
+            ((eq :data (car edge))
+             (linux:|close| (nth 1 edge))) ;; input fd we kept.
+            ((eq :pipe (car edge))
+             (let* ((p1 (nth 1 edge))
+                    (p2 (nth 2 edge)))
+               (linux:|close| p1)
+               (linux:|close| p2))) ;; pipe open in parent, used by children.
             ))                      ;;LAMBDA
-        EDGE-LIST)
-  (WHEN WAIT
+        edge-list)
+  (when wait
     ;; 6. wait for all the children.
-    (DO ((CHILD-COUNT (DO* ((PROCESSES PROCESS-LIST (CDR PROCESSES))
-                            (COUNT 0) )
-                           ((NULL PROCESSES) COUNT)
-                        (SETQ COUNT (IF (GETF (CAR PROCESSES) :FORK-SUCCESS)
-                                        (1+ COUNT) COUNT))))
+    (do ((child-count (do* ((processes process-list (cdr processes))
+                            (count 0) )
+                           ((null processes) count)
+                        (setq count (if (getf (car processes) :fork-success)
+                                        (1+ count) count))))
          )
-        ((= 0 CHILD-COUNT))
-      (MULTIPLE-VALUE-BIND (PID STATUS) (LINUX:|wait|)
-        (WHEN (< 0 PID)
-          (LET* ((PROCESS-PLACE (MEMBER
-                                 PID PROCESS-LIST
-                                 :KEY (LAMBDA (PROCESS)
-                                        (GETF PROCESS :CHILD-PID))))
-                 (PROCESS (CAR PROCESS-PLACE)))
-            (WHEN PROCESS
-              (SETF (GETF PROCESS :CHILD-STATUS) STATUS)
-              (SETF (CAR PROCESS-PLACE) PROCESS)
-              (SETQ CHILD-COUNT (1- CHILD-COUNT))))))))
-  PROCESS-LIST)
+        ((= 0 child-count))
+      (multiple-value-bind (pid status) (linux:|wait|)
+        (when (< 0 pid)
+          (let* ((process-place (member
+                                 pid process-list
+                                 :key (lambda (process)
+                                        (getf process :child-pid))))
+                 (process (car process-place)))
+            (when process
+              (setf (getf process :child-status) status)
+              (setf (car process-place) process)
+              (setq child-count (1- child-count))))))))
+  process-list)



-(DEFUN PIPE (PROCESS-LIST &KEY WAIT)
-  (LET ((TAG-NUM 0))
-    (SETQ PROCESS-LIST
-          (MAPCAR (LAMBDA (PROCESS)
-                    (SETQ TAG-NUM (1+ TAG-NUM))
-                    (CONS (INTERN (with-standard-io-syntax (FORMAT NIL "PROCESS-~A" TAG-NUM))
-                                  (FIND-PACKAGE "KEYWORD")) PROCESS))
-                  PROCESS-LIST))
-    (PIPE-AND-EXEC PROCESS-LIST
-                   (DO ((PREVIOUS (CAAR PROCESS-LIST) (CAAR PROCESS))
-                        (PROCESS  (CDR PROCESS-LIST)  (CDR PROCESS))
-                        (EDGES NIL
-                               (CONS (LIST (LIST PREVIOUS 1)
-                                           (LIST (CAAR PROCESS) 0)) EDGES)))
-                       ((NULL PROCESS) (NREVERSE EDGES)))
-                   :WAIT WAIT)))
+(defun pipe (process-list &key wait)
+  (let ((tag-num 0))
+    (setq process-list
+          (mapcar (lambda (process)
+                    (setq tag-num (1+ tag-num))
+                    (cons (intern (with-standard-io-syntax (format nil "PROCESS-~A" tag-num))
+                                  (find-package "KEYWORD")) process))
+                  process-list))
+    (pipe-and-exec process-list
+                   (do ((previous (caar process-list) (caar process))
+                        (process  (cdr process-list)  (cdr process))
+                        (edges nil
+                               (cons (list (list previous 1)
+                                           (list (caar process) 0)) edges)))
+                       ((null process) (nreverse edges)))
+                   :wait wait)))


 ;;; ;; pipe          ((process-tag fdes) (process-tag fdes))
@@ -711,30 +708,30 @@ EDGE-LIST:      specifies the pipe and input or output as:



-(DEFUN FORK (BODY-FUN)
+(defun fork (body-fun)
   "
 RETURN:  pid of child in parent ;
          never in child (exit with result of body-fun as status).
 "
-  (LET ((PID (LINUX:|fork|)))
-    (IF (= 0 PID)
+  (let ((pid (linux:|fork|)))
+    (if (= 0 pid)
         ;; child
-        (LET ((RESULT (FUNCALL BODY-FUN)))
-          (EXT:EXIT
-           (COND
-             ((NUMBERP RESULT) (LOGAND 255 RESULT))
-             ((NULL    RESULT) 1)
-             ((EQ T    RESULT) 0)
-             (T               0))))
+        (let ((result (funcall body-fun)))
+          (ext:exit
+           (cond
+             ((numberp result) (logand 255 result))
+             ((null    result) 1)
+             ((eq t    result) 0)
+             (t               0))))
         ;; parent
-        PID)))
+        pid)))


-(DEFUN WAIT (PID)
+(defun wait (pid)
   "
 RETURN:  pid;status
 "
-  (LINUX:|waitpid| PID 0)) ; options: (LOGIOR LINUX:WNOHANG LINUX:WUNTRACED)
+  (linux:|waitpid| pid 0)) ; options: (LOGIOR LINUX:WNOHANG LINUX:WUNTRACED)



@@ -780,50 +777,50 @@ RETURN:  pid;status



-(DEFMACRO EXEC-PATH (&REST COMMAND)
-  (WHEN (/= 1 (LENGTH COMMAND))
-    (SIGNAL 'WRONG-NUMBER-OF-ARGUMENTS 'EXEC-PATH (LENGTH COMMAND)))
-  (SETQ COMMAND
-        (MAPCAR (LAMBDA (ITEM)
-                  (COND
-                    ((SYMBOLP ITEM)
-                     (SETQ ITEM (SYMBOL-NAME ITEM))
-                     (LET ((UTEM (STRING-UPCASE ITEM)))
+(defmacro exec-path (&rest command)
+  (when (/= 1 (length command))
+    (signal 'wrong-number-of-arguments 'exec-path (length command)))
+  (setq command
+        (mapcar (lambda (item)
+                  (cond
+                    ((symbolp item)
+                     (setq item (symbol-name item))
+                     (let ((utem (string-upcase item)))
                        ;;(SHOW UTEM ITEM)
-                       (IF (STRING= UTEM ITEM)
-                           (STRING-DOWNCASE ITEM)
-                           ITEM)))
-                    (T (FORMAT NIL  "~a" ITEM))))
-                (CAR COMMAND)))
-  `(EXT:RUN-PROGRAM ,(CAR COMMAND)
-     :ARGUMENTS (QUOTE ,(CDR COMMAND))
-     :INPUT :TERMINAL
-     :OUTPUT :TERMINAL
-     :IF-OUTPUT-EXISTS :OVERWRITE
-     :WAIT T))
+                       (if (string= utem item)
+                           (string-downcase item)
+                           item)))
+                    (t (format nil  "~a" item))))
+                (car command)))
+  `(ext:run-program ,(car command)
+     :arguments (quote ,(cdr command))
+     :input :terminal
+     :output :terminal
+     :if-output-exists :overwrite
+     :wait t))


-(DEFMACRO EXEC-EPF (&REST EPF)
-  (LET ((PF (CAR EPF))
-        (REDIRECTIONS (CDR EPF)) )
-    (DECLARE (IGNORE PF REDIRECTIONS)) (ERROR "NOT IMPLEMENTED YET")
-    `( ,@(CAR EPF) )))
+(defmacro exec-epf (&rest epf)
+  (let ((pf (car epf))
+        (redirections (cdr epf)) )
+    (declare (ignore pf redirections)) (error "NOT IMPLEMENTED YET")
+    `( ,@(car epf) )))




-(DEFMACRO & (&REST EPF)   `(FORK (LAMBDA () (EXEC-EPF ,@EPF))))
+(defmacro & (&rest epf)   `(fork (lambda () (exec-epf ,@epf))))


-(DEFMACRO RUN (&REST EPF)  `(WAIT (& ,@EPF)))
+(defmacro run (&rest epf)  `(wait (& ,@epf)))


-(DEFMACRO OR-ELSE (&REST PF-LIST)
-  (DECLARE (IGNORE PF-LIST)) (ERROR "NOT IMPLEMENTED YET"))
+(defmacro or-else (&rest pf-list)
+  (declare (ignore pf-list)) (error "NOT IMPLEMENTED YET"))


-(DEFMACRO AND-THEN (&REST PF-LIST)
-  (DECLARE (IGNORE PF-LIST)) (ERROR "NOT IMPLEMENTED YET"))
+(defmacro and-then (&rest pf-list)
+  (declare (ignore pf-list)) (error "NOT IMPLEMENTED YET"))


 ;;;; THE END ;;;;
diff --git a/clisp/string.lisp b/clisp/string.lisp
index 4551c6a..406a297 100644
--- a/clisp/string.lisp
+++ b/clisp/string.lisp
@@ -14,35 +14,32 @@
 ;;;;    2003-01-30 <PJB> Creation.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
+;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
-;;;;
-;;;;    This file is part of PJB Clisp Utilities.
-;;;;
-;;;;    This  program is  free software;  you can  redistribute  it and/or
-;;;;    modify it  under the  terms of the  GNU General Public  License as
-;;;;    published by the Free Software Foundation; either version 2 of the
-;;;;    License, or (at your option) any later version.
-;;;;
-;;;;    This program  is distributed in the  hope that it  will be useful,
-;;;;    but  WITHOUT ANY WARRANTY;  without even  the implied  warranty of
-;;;;    MERCHANTABILITY or FITNESS FOR  A PARTICULAR PURPOSE.  See the GNU
-;;;;    General Public License for more details.
-;;;;
-;;;;    You should have received a  copy of the GNU General Public License
-;;;;    along with  this program; see the  file COPYING; if  not, write to
-;;;;    the Free  Software Foundation, Inc.,  59 Temple Place,  Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;*****************************************************************************


-(defPACKAGE "COM.INFORMATIMAGO.CLISP.STRING"
-  (:DOCUMENTATION "This module exports string functions.")
+(defpackage "COM.INFORMATIMAGO.CLISP.STRING"
+  (:documentation "This module exports string functions.")
   (:use "COMMON-LISP"
         "REGEXP"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST"
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING")
-  (:EXPORT "SPLIT-STRING" "UNSPLIT-STRING"
+  (:export "SPLIT-STRING" "UNSPLIT-STRING"
            "STRING-MATCH" "STRING-TO-NUMBER"
            "CAPITALIZATION" "REPLACE-REGEXP-IN-STRING"
            "SUBSTRING"))
@@ -53,43 +50,43 @@
 ;; We have our own implementation of SPLIT-STRING using REGEXP,
 ;; specific to CLISP.

-(DEFPARAMETER SPLIT-STRING-DEFAULT-SEPARATORS
-  (FORMAT NIL "[ ~C~C~C~C~C]\\+"
-          (CODE-CHAR 9) (CODE-CHAR 10) (CODE-CHAR 11) (CODE-CHAR 12)
-          (CODE-CHAR 13))
+(defparameter split-string-default-separators
+  (format nil "[ ~C~C~C~C~C]\\+"
+          (code-char 9) (code-char 10) (code-char 11) (code-char 12)
+          (code-char 13))
   "The default separators for split-string (HT, LF, VT, FF, CR, SP)")


-(DEFUN SPLIT-STRING (STRING &OPTIONAL SEPARATORS)
+(defun split-string (string &optional separators)
   "
 NOTE:   This implementation uses he REGEXP package.
 "
-  (UNLESS SEPARATORS (SETQ SEPARATORS SPLIT-STRING-DEFAULT-SEPARATORS))
-  (LET ((RESULT (REGEXP:REGEXP-SPLIT SEPARATORS STRING)))
-    (IF (STRING= "" (CAR RESULT))
-        (SETQ RESULT (CDR RESULT)))
-    (IF (STRING= "" (CAR (LAST RESULT)))
-        (SETQ RESULT (NBUTLAST RESULT)))
-    RESULT))
+  (unless separators (setq separators split-string-default-separators))
+  (let ((result (regexp:regexp-split separators string)))
+    (if (string= "" (car result))
+        (setq result (cdr result)))
+    (if (string= "" (car (last result)))
+        (setq result (nbutlast result)))
+    result))

 ;; But we inherit UNSPLIT-STRING from COM.INFORMATIMAGO.COMMON-LISP.CESARUM.STRING.


-(DEFUN STRING-MATCH (REGEXP STRING &KEY (START 0) (END NIL)
-                     (CASE-SENSITIVE NIL)
-                     (EXTENDED NIL)
-                     (NEWLINE NIL)
-                     (NOSUB NIL))
+(defun string-match (regexp string &key (start 0) (end nil)
+                     (case-sensitive nil)
+                     (extended nil)
+                     (newline nil)
+                     (nosub nil))
   "An alias for REGEXP:MATCH."
-  (REGEXP:MATCH REGEXP STRING
-                :START START :END END
-                :IGNORE-CASE (NOT CASE-SENSITIVE)
-                :EXTENDED EXTENDED
-                :NEWLINE NEWLINE :NOSUB NOSUB))
+  (regexp:match regexp string
+                :start start :end end
+                :ignore-case (not case-sensitive)
+                :extended extended
+                :newline newline :nosub nosub))



-(DEFVAR *CASE-FOLD-SEARCH* NIL
+(defvar *case-fold-search* nil
   "Whether searches and matches should ignore case.
 Used by: REPLACE-REGEXP-IN-STRING.
 ")
@@ -139,9 +136,9 @@ Used by: REPLACE-REGEXP-IN-STRING.
 ;;;   (( T  NO) SP) --> (NIL SP)
 ;;;    ( T  SP) is impossible.

-(DEFPARAMETER +CAPITALIZATION-TRANSITIONS+
-  (MAKE-ARRAY '(2 4 4)
-              :INITIAL-CONTENTS
+(defparameter +capitalization-transitions+
+  (make-array '(2 4 4)
+              :initial-contents
               '((( (0 0 3)
                   (0 1 3 0)
                   (0 2 3)
@@ -177,65 +174,65 @@ Used by: REPLACE-REGEXP-IN-STRING.



-(DEFUN CAPITALIZATION (STRING)
+(defun capitalization (string)
   "
 RETURN:  :LOWER :UPPER :CAPITALIZED or :WHATEVER
 "
-  (LET ((ALL-UPCASE 0)
-        (ALL-LOCASE 1)
-        (ALL-CAPITA 2)
-        (NO-2C-WORD 3)
-        (RESULT     (MAKE-ARRAY '(4) :INITIAL-ELEMENT T))
-        (STATE      (CONS 0 3)) )
-    (MAP NIL (LAMBDA (CH)
-               (LET ((NEW-STATE (AREF +CAPITALIZATION-TRANSITIONS+
-                                      (CAR STATE) (CDR STATE)
-                                      (COND
-                                        ((NOT (ALPHA-CHAR-P CH)) 3)
-                                        ((UPPER-CASE-P CH)       0)
-                                        ((LOWER-CASE-P CH)       1)
-                                        (T                       2)))))
-                 (SETF (CAR STATE) (POP NEW-STATE))
-                 (SETF (CDR STATE) (POP NEW-STATE))
-                 (MAPC (LAMBDA (SYM) (SETF (AREF RESULT SYM) NIL)) NEW-STATE)
+  (let ((all-upcase 0)
+        (all-locase 1)
+        (all-capita 2)
+        (no-2c-word 3)
+        (result     (make-array '(4) :initial-element t))
+        (state      (cons 0 3)) )
+    (map nil (lambda (ch)
+               (let ((new-state (aref +capitalization-transitions+
+                                      (car state) (cdr state)
+                                      (cond
+                                        ((not (alpha-char-p ch)) 3)
+                                        ((upper-case-p ch)       0)
+                                        ((lower-case-p ch)       1)
+                                        (t                       2)))))
+                 (setf (car state) (pop new-state))
+                 (setf (cdr state) (pop new-state))
+                 (mapc (lambda (sym) (setf (aref result sym) nil)) new-state)
                  ))
-         STRING)
-    (COND ((AREF RESULT NO-2C-WORD) :WHATEVER)
-          ((AREF RESULT ALL-UPCASE) :UPPER)
-          ((AREF RESULT ALL-LOCASE) :LOWER)
-          ((AREF RESULT ALL-CAPITA) :CAPITALIZED)
-          (T                        :WHATEVER))))
+         string)
+    (cond ((aref result no-2c-word) :whatever)
+          ((aref result all-upcase) :upper)
+          ((aref result all-locase) :lower)
+          ((aref result all-capita) :capitalized)
+          (t                        :whatever))))





-(DEFUN EMACS-BUGGED-STRING-CAPITALIZE (STRING)
+(defun emacs-bugged-string-capitalize (string)
   "
 The string-capitalized that emacs implements in its replace-regexp-in-string
 which is not even its capitalize (which is correct)!
 Namely, it seems to  touch only the first character of each word.
 "
-  (DO ((RESULT (COPY-SEQ STRING))
-       (I 0 (1+ I))
-       (SP T)
-       (CH) )
-      ((<= (LENGTH RESULT) I) RESULT)
-    (SETQ CH (CHAR RESULT I))
-    (IF SP
-        (WHEN (ALPHA-CHAR-P CH)
-          (SETF (CHAR RESULT I) (CHAR-UPCASE CH))
-          (SETQ SP NIL))
-        (WHEN (NOT (ALPHANUMERICP CH))
-          (SETQ SP T)))))
-
-
-
-(DEFUN REPLACE-REGEXP-IN-STRING
-    (REGEXP REP STRING
-     &OPTIONAL (FIXEDCASE NIL) (LITERAL NIL) (SUBEXP 0) (START 0)
-     &KEY (CASE-SENSITIVE (NOT *CASE-FOLD-SEARCH*))
-     (EXTENDED NIL) (NEWLINE NIL) (NOSUB NIL))
+  (do ((result (copy-seq string))
+       (i 0 (1+ i))
+       (sp t)
+       (ch) )
+      ((<= (length result) i) result)
+    (setq ch (char result i))
+    (if sp
+        (when (alpha-char-p ch)
+          (setf (char result i) (char-upcase ch))
+          (setq sp nil))
+        (when (not (alphanumericp ch))
+          (setq sp t)))))
+
+
+
+(defun replace-regexp-in-string
+    (regexp rep string
+     &optional (fixedcase nil) (literal nil) (subexp 0) (start 0)
+     &key (case-sensitive (not *case-fold-search*))
+     (extended nil) (newline nil) (nosub nil))
   "
 NOTE:       emacs regexps are a mix between POSIX basic regexps
             and POSIX extended regexps.
@@ -301,79 +298,79 @@ since only regular expressions have distinguished subexpressions.
 ;;; LITERAL     NIL       substitute \&, \N, \\ and \x.
 ;;;
 ;;; SUBEXP      N         replaces only \N instead of \0
-  (DO ((DONE NIL)
-       (PIECES '())
-       (POS 0)
-       (REPLACEMENT)
-       (REPLACED-MATCH)
-       (MATCHES))
-      (DONE
-       (PROGN (PUSH (SUBSEQ STRING POS) PIECES)
-              (APPLY (FUNCTION CONCATENATE) 'STRING (NREVERSE PIECES))))
-    (SETQ MATCHES (MULTIPLE-VALUE-LIST
-                   (REGEXP:MATCH REGEXP STRING
-                                 :START START
-                                 :IGNORE-CASE (NOT CASE-SENSITIVE)
-                                 :EXTENDED EXTENDED
-                                 :NEWLINE NEWLINE
-                                 :NOSUB NOSUB)))
-    (IF (AND MATCHES (CAR MATCHES))
-        (PROGN
+  (do ((done nil)
+       (pieces '())
+       (pos 0)
+       (replacement)
+       (replaced-match)
+       (matches))
+      (done
+       (progn (push (subseq string pos) pieces)
+              (apply (function concatenate) 'string (nreverse pieces))))
+    (setq matches (multiple-value-list
+                   (regexp:match regexp string
+                                 :start start
+                                 :ignore-case (not case-sensitive)
+                                 :extended extended
+                                 :newline newline
+                                 :nosub nosub)))
+    (if (and matches (car matches))
+        (progn
           ;; -1- Find the replacement:
-          (SETQ REPLACEMENT
-                (IF (FUNCTIONP REP)
-                    (FUNCALL REP (REGEXP:MATCH-STRING STRING (CAR MATCHES)))
-                    REP))
+          (setq replacement
+                (if (functionp rep)
+                    (funcall rep (regexp:match-string string (car matches)))
+                    rep))
           ;; -2- Process FIXEDCASE
-          (WHEN (OR (< SUBEXP 0) (<= (LENGTH MATCHES) SUBEXP))
-            (ERROR "Argument out of range SUBEXP=~A." SUBEXP))
-          (SETQ REPLACED-MATCH (NTH SUBEXP MATCHES))
-          (UNLESS FIXEDCASE
-            (LET ((CAP (CAPITALIZATION
-                        (REGEXP:MATCH-STRING STRING REPLACED-MATCH))) )
-              (SETQ REPLACEMENT
-                    (FUNCALL
-                     (COND
-                       ((EQ CAP :UPPER) (FUNCTION STRING-UPCASE))
-                       ((EQ CAP :LOWER) (FUNCTION IDENTITY))
+          (when (or (< subexp 0) (<= (length matches) subexp))
+            (error "Argument out of range SUBEXP=~A." subexp))
+          (setq replaced-match (nth subexp matches))
+          (unless fixedcase
+            (let ((cap (capitalization
+                        (regexp:match-string string replaced-match))) )
+              (setq replacement
+                    (funcall
+                     (cond
+                       ((eq cap :upper) (function string-upcase))
+                       ((eq cap :lower) (function identity))
                        ;;                That's what emacs does...
-                       ((EQ CAP :CAPITALIZED)
-                        (FUNCTION EMACS-BUGGED-STRING-CAPITALIZE))
-                       (T               (FUNCTION IDENTITY)))
-                     REPLACEMENT))))
+                       ((eq cap :capitalized)
+                        (function emacs-bugged-string-capitalize))
+                       (t               (function identity)))
+                     replacement))))
           ;; -3- Process LITERAL
-          (UNLESS LITERAL
+          (unless literal
             ;; substitute \&, \N and \\.
-            (SETQ REPLACEMENT
-                  (REPLACE-REGEXP-IN-STRING
+            (setq replacement
+                  (replace-regexp-in-string
                    "\\\\\\(.\\)"
-                   (LAMBDA (SUBSTR)
-                     (COND
-                       ((CHAR= (CHAR SUBSTR 1) (CHARACTER "&"))
-                        (REGEXP:MATCH-STRING STRING (CAR MATCHES)) )
-                       ((DIGIT-CHAR-P (CHAR SUBSTR 1))
-                        (LET ((N (PARSE-INTEGER SUBSTR :START 1)))
-                          (IF (<= (LENGTH MATCHES) N)
-                              SUBSTR ;; How coherent emacs is!
-                              (REGEXP:MATCH-STRING STRING (NTH N MATCHES)))) )
-                       ((CHAR= (CHARACTER "\\") (CHAR SUBSTR 1))
-                        (SUBSEQ SUBSTR 1) )
-                       (T
-                        (ERROR "Invalid use of '\\' in replacement text ~W."
-                               SUBSTR) )))
-                   REPLACEMENT T T)) )
+                   (lambda (substr)
+                     (cond
+                       ((char= (char substr 1) (character "&"))
+                        (regexp:match-string string (car matches)) )
+                       ((digit-char-p (char substr 1))
+                        (let ((n (parse-integer substr :start 1)))
+                          (if (<= (length matches) n)
+                              substr ;; How coherent emacs is!
+                              (regexp:match-string string (nth n matches)))) )
+                       ((char= (character "\\") (char substr 1))
+                        (subseq substr 1) )
+                       (t
+                        (error "Invalid use of '\\' in replacement text ~W."
+                               substr) )))
+                   replacement t t)) )
           ;; -4- Replace.
-          (PUSH (SUBSEQ STRING POS
-                        (REGEXP:MATCH-START (NTH SUBEXP MATCHES))) PIECES)
-          (PUSH REPLACEMENT PIECES)
-          (SETQ START
-                (IF (= 0 (LENGTH REGEXP))
-                    (1+ START)
-                    (REGEXP:MATCH-END (CAR MATCHES))))
-          (SETQ POS (REGEXP:MATCH-END (NTH SUBEXP MATCHES)))
-          (SETQ DONE (<= (LENGTH STRING) START)) )
-        (PROGN
-          (SETQ DONE T) ))))
+          (push (subseq string pos
+                        (regexp:match-start (nth subexp matches))) pieces)
+          (push replacement pieces)
+          (setq start
+                (if (= 0 (length regexp))
+                    (1+ start)
+                    (regexp:match-end (car matches))))
+          (setq pos (regexp:match-end (nth subexp matches)))
+          (setq done (<= (length string) start)) )
+        (progn
+          (setq done t) ))))



@@ -467,17 +464,17 @@ Test cases for REPLACE-REGEXP-IN-STRING
 ;; (replace-regexp-in-string "blue" "\\\\b\\X\\&" "blue box and bluetooth")


-(DEFUN STRING-TO-NUMBER (STRING &KEY (BASE 10) (START 0) (END NIL))
+(defun string-to-number (string &key (base 10) (start 0) (end nil))
   "
 DO:         Converts the string to a number.
 RETURN:     A number.
 "
   ;; PARSE-INTEGER is for integers...
-  (LET ((RESULT  (WITH-INPUT-FROM-STRING
-                     (STREAM STRING :START START :END END)
-                   (LET ((*READ-BASE* BASE)) (READ STREAM)))))
-    (UNLESS (NUMBERP RESULT)
-      (ERROR "Expected a number, not ~S." RESULT))
-    RESULT))
+  (let ((result  (with-input-from-string
+                     (stream string :start start :end end)
+                   (let ((*read-base* base)) (read stream)))))
+    (unless (numberp result)
+      (error "Expected a number, not ~S." result))
+    result))

 ;;;; THE END ;;;;
diff --git a/clisp/susv3-mc3.lisp b/clisp/susv3-mc3.lisp
index ce8bdd7..8aea3bc 100644
--- a/clisp/susv3-mc3.lisp
+++ b/clisp/susv3-mc3.lisp
@@ -17,42 +17,40 @@
 ;;;;    2004-11-29 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************


 (in-package "COMMON-LISP-USER")
-(DECLAIM (DECLARATION ALSO-USE-PACKAGES))
-(declaim (ALSO-USE-PACKAGES "FFI" "LINUX"))
+(declaim (declaration also-use-packages))
+(declaim (also-use-packages "FFI" "LINUX"))
 (eval-when (:compile-toplevel :load-toplevel :execute) (require "linux"))
 (defpackage "COM.INFORMATIMAGO.CLISP.SUSV3-MC3"
   (:use "COMMON-LISP"
         "COM.INFORMATIMAGO.CLISP.SUSV3")
-  (:EXPORT
+  (:export
    "PROT-NONE" "PROT-READ" "PROT-WRITE" "PROT-EXEC"
    "MAP-SHARED" "MAP-PRIVATE" "MAP-FIXED" "MAP-FILE"
    "MAP-ANONYMOUS" "MAP-GROWSDOWN" "MAP-DENYWRITE"
    "MAP-EXECUTABLE" "MAP-LOCKED" "MAP-NORESERVE"
    "MAP-FAILED"
    "MMAP" "MUNMAP")
-  (:DOCUMENTATION "
+  (:documentation "
     An implementation of SUSV3-MC3 for clisp.

     Implemented:
@@ -80,23 +78,23 @@



-(defconstant PROT-NONE  0 "Page can not be accessed.")
-(defconstant PROT-READ  1	"Page can be read.")
-(defconstant PROT-WRITE 2 "Page can be written.")
-(defconstant PROT-EXEC  4 "Page can be executed.")
+(defconstant prot-none  0 "Page can not be accessed.")
+(defconstant prot-read  1	"Page can be read.")
+(defconstant prot-write 2 "Page can be written.")
+(defconstant prot-exec  4 "Page can be executed.")

-(defconstant MAP-SHARED       #x01 "Share changes. ")
-(defconstant MAP-PRIVATE      #x02 "Changes are private. ")
-(defconstant MAP-FIXED        #x10 "Interpret addr exactly. ")
-(defconstant MAP-FILE            0)
-(defconstant MAP-ANONYMOUS    #x20 "Don't use a file. ")
-(defconstant MAP-GROWSDOWN  #x0100 "Stack-like segment. ")
-(defconstant MAP-DENYWRITE  #x0800 "ETXTBSY")
-(defconstant MAP-EXECUTABLE #x1000 "Mark it as an executable. ")
-(defconstant MAP-LOCKED     #x2000 "Lock the mapping. ")
-(defconstant MAP-NORESERVE  #x4000 "Don't check for reservations. ")
+(defconstant map-shared       #x01 "Share changes. ")
+(defconstant map-private      #x02 "Changes are private. ")
+(defconstant map-fixed        #x10 "Interpret addr exactly. ")
+(defconstant map-file            0)
+(defconstant map-anonymous    #x20 "Don't use a file. ")
+(defconstant map-growsdown  #x0100 "Stack-like segment. ")
+(defconstant map-denywrite  #x0800 "ETXTBSY")
+(defconstant map-executable #x1000 "Mark it as an executable. ")
+(defconstant map-locked     #x2000 "Lock the mapping. ")
+(defconstant map-noreserve  #x4000 "Don't check for reservations. ")

-(defconstant MAP-FAILED     #xffffffff) ; -1
+(defconstant map-failed     #xffffffff) ; -1


 (ffi:def-c-type pointer ffi:ulong)
diff --git a/clisp/susv3-xsi.lisp b/clisp/susv3-xsi.lisp
index eff8149..8f56fa1 100644
--- a/clisp/susv3-xsi.lisp
+++ b/clisp/susv3-xsi.lisp
@@ -35,36 +35,34 @@
 ;;;;    of here.
 ;;;;
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2004 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
-(DECLAIM (DECLARATION ALSO-USE-PACKAGES))
-(declaim (ALSO-USE-PACKAGES "FFI" "LINUX"))
+(declaim (declaration also-use-packages))
+(declaim (also-use-packages "FFI" "LINUX"))
 (eval-when (:compile-toplevel :load-toplevel :execute) (require "linux"))
-(defPACKAGE "COM.INFORMATIMAGO.CLISP.SUSV3-XSI"
-  (:DOCUMENTATION "This packages exports SUSV3 XSI functions.
+(defpackage "COM.INFORMATIMAGO.CLISP.SUSV3-XSI"
+  (:documentation "This packages exports SUSV3 XSI functions.
     This is the CLISP specific implementation of the SUSV3 XSI API.")
   (:use "COMMON-LISP"
         "COM.INFORMATIMAGO.CLISP.SUSV3")
-  (:EXPORT
+  (:export
    ;; FTW
    "+FTW-F+" "+FTW-D+" "+FTW-DNR+" "+FTW-DP+" "+FTW-NS+" "+FTW-SL+"
    "+FTW-SLN+" "+FTW-PHYS+" "+FTW-MOUNT+" "+FTW-DEPTH+" "+FTW-CHDIR+"
@@ -127,40 +125,40 @@
 ;;


-(DEFCONSTANT +FTW-F+   0 "File.")
-(DEFCONSTANT +FTW-D+   1 "Directory.")
-(DEFCONSTANT +FTW-DNR+ 2 "Directory without read permission.")
-(DEFCONSTANT +FTW-DP+  3 "Directory with subdirectories visited.")
-(DEFCONSTANT +FTW-NS+  4 "Unknown type; stat() failed.")
-(DEFCONSTANT +FTW-SL+  5 "Symbolic link.")
-(DEFCONSTANT +FTW-SLN+ 6 "Symbolic link that names a nonexistent file.")
+(defconstant +ftw-f+   0 "File.")
+(defconstant +ftw-d+   1 "Directory.")
+(defconstant +ftw-dnr+ 2 "Directory without read permission.")
+(defconstant +ftw-dp+  3 "Directory with subdirectories visited.")
+(defconstant +ftw-ns+  4 "Unknown type; stat() failed.")
+(defconstant +ftw-sl+  5 "Symbolic link.")
+(defconstant +ftw-sln+ 6 "Symbolic link that names a nonexistent file.")


-(DEFCONSTANT +FTW-PHYS+ 1
+(defconstant +ftw-phys+ 1
   "Physical walk, does not follow symbolic links. Otherwise, NFTW
 follows links but does not walk down any path that crosses itself.")

-(DEFCONSTANT +FTW-MOUNT+ 2 "The walk does not cross a mount point.")
-(DEFCONSTANT +FTW-DEPTH+ 4
+(defconstant +ftw-mount+ 2 "The walk does not cross a mount point.")
+(defconstant +ftw-depth+ 4
   "All subdirectories are visited before the directory itself.")
-(DEFCONSTANT +FTW-CHDIR+ 8
+(defconstant +ftw-chdir+ 8
   "The walk changes to each directory before reading it.")


-(DEFSTRUCT FTW
-  (BASE  0 :TYPE INTEGER)
-  (LEVEL 0 :TYPE INTEGER))
+(defstruct ftw
+  (base  0 :type integer)
+  (level 0 :type integer))


-(DEFTYPE FTW-FILTER  ()
-  '(FUNCTION (SIMPLE-STRING STAT INTEGER)     INTEGER))
-(DEFTYPE NFTW-FILTER ()
-  '(FUNCTION (SIMPLE-STRING STAT INTEGER FTW) INTEGER))
+(deftype ftw-filter  ()
+  '(function (simple-string stat integer)     integer))
+(deftype nftw-filter ()
+  '(function (simple-string stat integer ftw) integer))


 (declaim
- (FTYPE (FUNCTION (SIMPLE-STRING FTW-FILTER  INTEGER)         INTEGER) FTW)
- (FTYPE (FUNCTION (SIMPLE-STRING NFTW-FILTER INTEGER INTEGER) INTEGER) NFTW))
+ (ftype (function (simple-string ftw-filter  integer)         integer) ftw)
+ (ftype (function (simple-string nftw-filter integer integer) integer) nftw))


 ;; ISSUE:  SHOULD THE FILTER RETURN NIL/T OR ZEROP/NOT ZEROP?
@@ -181,54 +179,54 @@ follows links but does not walk down any path that crosses itself.")
 ;;         in SUSv3).


-(DEFUN FTW (PATH FILTER NDIRS)
+(defun ftw (path filter ndirs)
   "
 URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
 "
-  (DECLARE (TYPE (INTEGER 1 #|+OPEN-MAX+|#) NDIRS))
+  (declare (type (integer 1 #|+OPEN-MAX+|#) ndirs))
   (declare (ignore ndirs))
   ;; We'll have always only one DIR-STREAM open: we keep the list of
   ;; subdirectories in memory and process them after having read the directory.
-  (LET ((DIR-STREAM (OPENDIR PATH)))
-    (UNWIND-PROTECT
-         (DO* ((ENTRY (READDIR DIR-STREAM) (READDIR DIR-STREAM))
-               (DIRECTORIES '())
-               SUBPATH STAT FLAG
-               (RESULT 0))
-              ((OR (NULL ENTRY) (/= 0 RESULT)) DIRECTORIES)
-           (UNLESS (OR (STRING= (DIRENT-NAME ENTRY) "..")
-                       (STRING= (DIRENT-NAME ENTRY) "."))
-             (SETQ SUBPATH (CONCATENATE 'STRING PATH "/"
-                                        (DIRENT-NAME ENTRY)))
-             (HANDLER-CASE (SETQ STAT (LSTAT SUBPATH))
-               (T () (SETQ STAT NIL)))
-             (COND
-               ((NULL STAT)
-                (SETQ FLAG +FTW-NS+))
-               ((S-ISREG (STAT-MODE STAT))
-                (SETQ FLAG +FTW-F+))
-               ((S-ISDIR (STAT-MODE STAT))
-                (PUSH SUBPATH DIRECTORIES)
-                (SETQ FLAG +FTW-F+))
-               ((S-ISLNK (STAT-MODE STAT))
-                (HANDLER-CASE (SETQ STAT (STAT SUBPATH)
-                                    FLAG +FTW-SL+)))
-               (T () (SETQ STAT NIL
-                           FLAG +FTW-SLN+)))
-             (SETQ RESULT
-                   (HANDLER-CASE
-                       (funcall FILTER (DIRENT-NAME ENTRY) STAT FLAG)
-                     (T () -1)))))
-      (CLOSEDIR DIR-STREAM))))
+  (let ((dir-stream (opendir path)))
+    (unwind-protect
+         (do* ((entry (readdir dir-stream) (readdir dir-stream))
+               (directories '())
+               subpath stat flag
+               (result 0))
+              ((or (null entry) (/= 0 result)) directories)
+           (unless (or (string= (dirent-name entry) "..")
+                       (string= (dirent-name entry) "."))
+             (setq subpath (concatenate 'string path "/"
+                                        (dirent-name entry)))
+             (handler-case (setq stat (lstat subpath))
+               (t () (setq stat nil)))
+             (cond
+               ((null stat)
+                (setq flag +ftw-ns+))
+               ((s-isreg (stat-mode stat))
+                (setq flag +ftw-f+))
+               ((s-isdir (stat-mode stat))
+                (push subpath directories)
+                (setq flag +ftw-f+))
+               ((s-islnk (stat-mode stat))
+                (handler-case (setq stat (stat subpath)
+                                    flag +ftw-sl+)))
+               (t () (setq stat nil
+                           flag +ftw-sln+)))
+             (setq result
+                   (handler-case
+                       (funcall filter (dirent-name entry) stat flag)
+                     (t () -1)))))
+      (closedir dir-stream))))


-(DEFCONSTANT +FTW-F+   0 "File.")
-(DEFCONSTANT +FTW-D+   1 "Directory.")
-(DEFCONSTANT +FTW-DNR+ 2 "Directory without read permission.")
-(DEFCONSTANT +FTW-DP+  3 "Directory with subdirectories visited.")
-(DEFCONSTANT +FTW-NS+  4 "Unknown type; stat() failed.")
-(DEFCONSTANT +FTW-SL+  5 "Symbolic link.")
-(DEFCONSTANT +FTW-SLN+ 6 "Symbolic link that names a nonexistent file.")
+(defconstant +ftw-f+   0 "File.")
+(defconstant +ftw-d+   1 "Directory.")
+(defconstant +ftw-dnr+ 2 "Directory without read permission.")
+(defconstant +ftw-dp+  3 "Directory with subdirectories visited.")
+(defconstant +ftw-ns+  4 "Unknown type; stat() failed.")
+(defconstant +ftw-sl+  5 "Symbolic link.")
+(defconstant +ftw-sln+ 6 "Symbolic link that names a nonexistent file.")


 ;; int ftw(const char *,int (*)(const char *,const struct stat *,int),int)
@@ -247,17 +245,17 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
 ;; ipc
 ;;----------------------------------------------------------------------

-(defconstant IPC_CREAT   #o01000 "Create key if key does not exist.")
-(defconstant IPC_EXCL    #o02000 "Fail if key exists.")
-(defconstant IPC_NOWAIT  #o04000 "Return error on wait.")
+(defconstant ipc_creat   #o01000 "Create key if key does not exist.")
+(defconstant ipc_excl    #o02000 "Fail if key exists.")
+(defconstant ipc_nowait  #o04000 "Return error on wait.")

 ;; Control commands for `msgctl', `semctl', and `shmctl'.
-(defconstant IPC_RMID    0       "Remove identifier.")
-(defconstant IPC_SET     1       "Set `ipc_perm' options.")
-(defconstant IPC_STAT    2       "Get `ipc_perm' options.")
-(defconstant IPC_INFO    3       "See ipcs.")
+(defconstant ipc_rmid    0       "Remove identifier.")
+(defconstant ipc_set     1       "Set `ipc_perm' options.")
+(defconstant ipc_stat    2       "Get `ipc_perm' options.")
+(defconstant ipc_info    3       "See ipcs.")

-(defconstant IPC_PRIVATE 0 "Private key.")
+(defconstant ipc_private 0 "Private key.")


 (ffi:def-c-struct ipc_perm
@@ -284,8 +282,8 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
 ;; msg
 ;;----------------------------------------------------------------------

-(defconstant MSG_NOERROR  #o010000 "no error if message is too big")
-(defconstant MSG_EXCEPT   #o020000 "recv any msg except of specified type")
+(defconstant msg_noerror  #o010000 "no error if message is too big")
+(defconstant msg_except   #o020000 "recv any msg except of specified type")

 ;; Types used in the structure definition.
 (ffi:def-c-type msgqnum_t ffi:ulong)
@@ -311,8 +309,8 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
   (__unused5   ffi:ulong))

 ;; ipcs ctl commands
-(defconstant MSG_STAT 11)
-(defconstant MSG_INFO 12)
+(defconstant msg_stat 11)
+(defconstant msg_info 12)


 ;; buffer for msgctl calls IPC_INFO, MSG_INFO
@@ -366,17 +364,17 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html


 ;; Permission flag for shmget.
-(defconstant SHM_R #o0400 "or S_IRUGO from <linux/stat.h> *")
-(defconstant SHM_W #o0200 "or S_IWUGO from <linux/stat.h> *")
+(defconstant shm_r #o0400 "or S_IRUGO from <linux/stat.h> *")
+(defconstant shm_w #o0200 "or S_IWUGO from <linux/stat.h> *")

 ;; Flags for `shmat'.
-(defconstant SHM_RDONLY #o010000 "attach read-only else read-write *")
-(defconstant SHM_RND    #o020000 "round attach address to SHMLBA *")
-(defconstant SHM_REMAP  #o040000 "take-over region on attach *")
+(defconstant shm_rdonly #o010000 "attach read-only else read-write *")
+(defconstant shm_rnd    #o020000 "round attach address to SHMLBA *")
+(defconstant shm_remap  #o040000 "take-over region on attach *")

 ;; Commands for `shmctl'.
-(defconstant SHM_LOCK   11 "lock segment (root only) *")
-(defconstant SHM_UNLOCK 12 "unlock segment (root only) *")
+(defconstant shm_lock   11 "lock segment (root only) *")
+(defconstant shm_unlock 12 "unlock segment (root only) *")


 (ffi:def-call-out getpagesize (:name "getpagesize")
@@ -385,7 +383,7 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
   (:library #.+libc+) (:language :stdc))


-(defun SHMLBA ()
+(defun shmlba ()
   "Segment low boundary address multiple. "
   (getpagesize))

@@ -467,24 +465,24 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html


 ;; Flags for `semop'.
-(defconstant SEM_UNDO   #x1000 "undo the operation on exit")
+(defconstant sem_undo   #x1000 "undo the operation on exit")

 ;; Commands for `semctl'.
-(defconstant  GETPID          11 "get sempid")
-(defconstant  GETVAL          12 "get semval")
-(defconstant  GETALL          13 "get all semval's")
-(defconstant  GETNCNT         14 "get semncnt")
-(defconstant  GETZCNT         15 "get semzcnt")
-(defconstant  SETVAL          16 "set semval")
-(defconstant  SETALL          17 "set all semval's")
-
-(defconstant SEMMNI  128         "<= IPCMNI  max # of semaphore identifiers")
-(defconstant SEMMSL  250         "<= 8 000 max num of semaphores per id")
-(defconstant SEMMNS  32000 #|(* SEMMNI SEMMSL)|#
+(defconstant  getpid          11 "get sempid")
+(defconstant  getval          12 "get semval")
+(defconstant  getall          13 "get all semval's")
+(defconstant  getncnt         14 "get semncnt")
+(defconstant  getzcnt         15 "get semzcnt")
+(defconstant  setval          16 "set semval")
+(defconstant  setall          17 "set all semval's")
+
+(defconstant semmni  128         "<= IPCMNI  max # of semaphore identifiers")
+(defconstant semmsl  250         "<= 8 000 max num of semaphores per id")
+(defconstant semmns  32000 #|(* SEMMNI SEMMSL)|#
   "<= INT_MAX max # of semaphores in system")
-(defconstant SEMOPM  32	         "<= 1 000 max num of ops per semop call")
-(defconstant SEMVMX  32767       "<= 32767 semaphore maximum value")
-(defconstant SEMAEM  32767 #|SEMVMX|#   "adjust on exit max value")
+(defconstant semopm  32	         "<= 1 000 max num of ops per semop call")
+(defconstant semvmx  32767       "<= 32767 semaphore maximum value")
+(defconstant semaem  32767 #|SEMVMX|#   "adjust on exit max value")


 (ffi:def-c-struct semid_ds
@@ -515,8 +513,8 @@ URL:        http://www.opengroup.org/onlinepubs/007904975/functions/ftw.html
 ;;    one must define the union or not.

 ;; ipcs ctl cmds
-(defconstant SEM_STAT 18)
-(defconstant SEM_INFO 19)
+(defconstant sem_stat 18)
+(defconstant sem_info 19)

 (ffi:def-c-struct seminfo
   (semmap ffi:int)
diff --git a/clisp/susv3.lisp b/clisp/susv3.lisp
index af9a613..94c68ad 100644
--- a/clisp/susv3.lisp
+++ b/clisp/susv3.lisp
@@ -48,33 +48,31 @@
 ;;;;    of here.
 ;;;;
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2004
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")

-(DECLAIM (DECLARATION ALSO-USE-PACKAGES))
-(declaim (ALSO-USE-PACKAGES "EXT" "FFI" "LINUX"))
+(declaim (declaration also-use-packages))
+(declaim (also-use-packages "EXT" "FFI" "LINUX"))
 (eval-when (:compile-toplevel :load-toplevel :execute) (require "linux"))
 (defpackage "COM.INFORMATIMAGO.CLISP.SUSV3"
-  (:DOCUMENTATION "
+  (:documentation "
     This packages exports SUSV3 functions.
     This is the CLISP specific implementation of the SUSV3 API.

@@ -85,8 +83,8 @@
     as published by the Free Software Foundation; either version
     2 of the License, or (at your option) any later version.
 ")
-  (:USE "COMMON-LISP")
-  (:EXPORT
+  (:use "COMMON-LISP")
+  (:export
    "UNIX-ERROR" "UNIX-ERROR-NUMBER" "UNIX-ERROR-MESSAGE"
    "UNIX-ERROR-FUNCTION" "UNIX-ERROR-ARGUMENTS" "UNIX-ERROR-CALLER"
    "CHECK-POINTER" "CHECK-ERRNO" "REPORT-ERROR"
@@ -252,130 +250,130 @@ be signaled (but that check-errno returns instead of nil).

 ;; ---------------------------- <asm/errno.h> ----------------------------------

-(defconstant EPERM           linux:|EPERM|)  ; Operation not permitted
-(defconstant ENOENT          linux:|ENOENT|) ; No such file or directory
-(defconstant ESRCH           linux:|ESRCH|)  ; No such process
-(defconstant EINTR           linux:|EINTR|)  ; Interrupted system call
-(defconstant EIO             linux:|EIO|)    ; I/O error
-(defconstant ENXIO           linux:|ENXIO|) ; No such device or address
-(defconstant E2BIG           linux:|E2BIG|) ; Arg list too long
-(defconstant ENOEXEC         linux:|ENOEXEC|) ; Exec format error
-(defconstant EBADF           linux:|EBADF|)   ; Bad file number
-(defconstant ECHILD          linux:|ECHILD|)  ; No child processes
-(defconstant EAGAIN          linux:|EAGAIN|)  ; Try again
-(defconstant ENOMEM          linux:|ENOMEM|)  ; Out of memory
-(defconstant EACCES          linux:|EACCES|)  ; Permission denied
-(defconstant EFAULT          linux:|EFAULT|)  ; Bad address
-(defconstant ENOTBLK         linux:|ENOTBLK|) ; Block device required
-(defconstant EBUSY           linux:|EBUSY|)  ; Device or resource busy
-(defconstant EEXIST          linux:|EEXIST|) ; File exists
-(defconstant EXDEV           linux:|EXDEV|)  ; Cross-device link
-(defconstant ENODEV          linux:|ENODEV|) ; No such device
-(defconstant ENOTDIR         linux:|ENOTDIR|) ; Not a directory
-(defconstant EISDIR          linux:|EISDIR|)  ; Is a directory
-(defconstant EINVAL          linux:|EINVAL|)  ; Invalid argument
-(defconstant ENFILE          linux:|ENFILE|)  ; File table overflow
-(defconstant EMFILE          linux:|EMFILE|)  ; Too many open files
-(defconstant ENOTTY          linux:|ENOTTY|)  ; Not a typewriter
-(defconstant ETXTBSY         linux:|ETXTBSY|) ; Text file busy
-(defconstant EFBIG           linux:|EFBIG|)   ; File too large
-(defconstant ENOSPC          linux:|ENOSPC|) ; No space left on device
-(defconstant ESPIPE          linux:|ESPIPE|) ; Illegal seek
-(defconstant EROFS           linux:|EROFS|)  ; Read-only file system
-(defconstant EMLINK          linux:|EMLINK|) ; Too many links
-(defconstant EPIPE           linux:|EPIPE|)  ; Broken pipe
-(defconstant EDOM            linux:|EDOM|) ; Math argument out of domain of func
-(defconstant ERANGE          linux:|ERANGE|) ; Math result not representable
-(defconstant EDEADLK         linux:|EDEADLK|) ; Resource deadlock would occur
-(defconstant ENAMETOOLONG    linux:|ENAMETOOLONG|) ; File name too long
-(defconstant ENOLCK          linux:|ENOLCK|) ; No record locks available
-(defconstant ENOSYS          linux:|ENOSYS|) ; Function not implemented
-(defconstant ENOTEMPTY       linux:|ENOTEMPTY|) ; Directory not empty
-(defconstant ELOOP           linux:|ELOOP|) ; Too many symbolic links encountered
-(defconstant EWOULDBLOCK     linux:|EWOULDBLOCK|) ; Operation would block
-(defconstant ENOMSG          linux:|ENOMSG|) ; No message of desired type
-(defconstant EIDRM           linux:|EIDRM|)  ; Identifier removed
-(defconstant ECHRNG          linux:|ECHRNG|) ; Channel number out of range
-(defconstant EL2NSYNC        linux:|EL2NSYNC|) ; Level 2 not synchronized
-(defconstant EL3HLT          linux:|EL3HLT|)   ; Level 3 halted
-(defconstant EL3RST          linux:|EL3RST|)   ; Level 3 reset
-(defconstant ELNRNG          linux:|ELNRNG|) ; Link number out of range
-(defconstant EUNATCH         linux:|EUNATCH|) ; Protocol driver not attached
-(defconstant ENOCSI          linux:|ENOCSI|) ; No CSI structure available
-(defconstant EL2HLT          linux:|EL2HLT|) ; Level 2 halted
-(defconstant EBADE           linux:|EBADE|)  ; Invalid exchange
-(defconstant EBADR           linux:|EBADR|) ; Invalid request descriptor
-(defconstant EXFULL          linux:|EXFULL|) ; Exchange full
-(defconstant ENOANO          linux:|ENOANO|) ; No anode
-(defconstant EBADRQC         linux:|EBADRQC|) ; Invalid request code
-(defconstant EBADSLT         linux:|EBADSLT|) ; Invalid slot
-(defconstant EDEADLOCK       linux:|EDEADLOCK|) ; File locking deadlock error
-(defconstant EBFONT          linux:|EBFONT|)    ; Bad font file format
-(defconstant ENOSTR          linux:|ENOSTR|)    ; Device not a stream
-(defconstant ENODATA         linux:|ENODATA|)   ; No data available
-(defconstant ETIME           linux:|ETIME|)     ; Timer expired
-(defconstant ENOSR           linux:|ENOSR|) ; Out of streams resources
-(defconstant ENONET          linux:|ENONET|) ; Machine is not on the network
-(defconstant ENOPKG          linux:|ENOPKG|) ; Package not installed
-(defconstant EREMOTE         linux:|EREMOTE|) ; Object is remote
-(defconstant ENOLINK         linux:|ENOLINK|) ; Link has been severed
-(defconstant EADV            linux:|EADV|)    ; Advertise error
-(defconstant ESRMNT          linux:|ESRMNT|)  ; Srmount error
-(defconstant ECOMM           linux:|ECOMM|) ; Communication error on send
-(defconstant EPROTO          linux:|EPROTO|)    ; Protocol error
-(defconstant EMULTIHOP       linux:|EMULTIHOP|) ; Multihop attempted
-(defconstant EDOTDOT         linux:|EDOTDOT|)   ; RFS specific error
-(defconstant EBADMSG         linux:|EBADMSG|)   ; Not a data message
-(defconstant EOVERFLOW       linux:|EOVERFLOW|) ; Value too large for defined data type
-(defconstant ENOTUNIQ        linux:|ENOTUNIQ|) ; Name not unique on network
-(defconstant EBADFD          linux:|EBADFD|) ; File descriptor in bad state
-(defconstant EREMCHG         linux:|EREMCHG|) ; Remote address changed
-(defconstant ELIBACC         linux:|ELIBACC|) ; Can not access a needed shared library
-(defconstant ELIBBAD         linux:|ELIBBAD|) ; Accessing a corrupted shared library
-(defconstant ELIBSCN         linux:|ELIBSCN|) ; .lib section in a.out corrupted
-(defconstant ELIBMAX         linux:|ELIBMAX|) ; Attempting to link in too many shared libraries
-(defconstant ELIBEXEC        linux:|ELIBEXEC|) ; Cannot exec a shared library directly
-(defconstant EILSEQ          linux:|EILSEQ|)   ; Illegal byte sequence
-(defconstant ERESTART        linux:|ERESTART|) ; Interrupted system call should be restarted
-(defconstant ESTRPIPE        linux:|ESTRPIPE|) ; Streams pipe error
-(defconstant EUSERS          linux:|EUSERS|)   ; Too many users
-(defconstant ENOTSOCK        linux:|ENOTSOCK|) ; Socket operation on non-socket
-(defconstant EDESTADDRREQ    linux:|EDESTADDRREQ|) ; Destination address required
-(defconstant EMSGSIZE        linux:|EMSGSIZE|)     ; Message too long
-(defconstant EPROTOTYPE      linux:|EPROTOTYPE|) ; Protocol wrong type for socket
-(defconstant ENOPROTOOPT     linux:|ENOPROTOOPT|) ; Protocol not available
-(defconstant EPROTONOSUPPORT linux:|EPROTONOSUPPORT|) ; Protocol not supported
-(defconstant ESOCKTNOSUPPORT linux:|ESOCKTNOSUPPORT|) ; Socket type not supported
-(defconstant EOPNOTSUPP      linux:|EOPNOTSUPP|) ; Operation not supported on transport endpoint
-(defconstant EPFNOSUPPORT    linux:|EPFNOSUPPORT|) ; Protocol family not supported
-(defconstant EAFNOSUPPORT    linux:|EAFNOSUPPORT|) ; Address family not supported by protocol
-(defconstant EADDRINUSE      linux:|EADDRINUSE|) ; Address already in use
-(defconstant EADDRNOTAVAIL   linux:|EADDRNOTAVAIL|) ; Cannot assign requested address
-(defconstant ENETDOWN        linux:|ENETDOWN|)      ; Network is down
-(defconstant ENETUNREACH     linux:|ENETUNREACH|) ; Network is unreachable
-(defconstant ENETRESET       linux:|ENETRESET|) ; Network dropped connection because of reset
-(defconstant ECONNABORTED    linux:|ECONNABORTED|) ; Software caused connection abort
-(defconstant ECONNRESET      linux:|ECONNRESET|) ; Connection reset by peer
-(defconstant ENOBUFS         linux:|ENOBUFS|) ; No buffer space available
-(defconstant EISCONN         linux:|EISCONN|) ; Transport endpoint is already connected
-(defconstant ENOTCONN        linux:|ENOTCONN|) ; Transport endpoint is not connected
-(defconstant ESHUTDOWN       linux:|ESHUTDOWN|) ; Cannot send after transport endpoint shutdown
-(defconstant ETOOMANYREFS    linux:|ETOOMANYREFS|) ; Too many references: cannot splice
-(defconstant ETIMEDOUT       linux:|ETIMEDOUT|) ; Connection timed out
-(defconstant ECONNREFUSED    linux:|ECONNREFUSED|) ; Connection refused
-(defconstant EHOSTDOWN       linux:|EHOSTDOWN|)    ; Host is down
-(defconstant EHOSTUNREACH    linux:|EHOSTUNREACH|) ; No route to host
-(defconstant EALREADY        linux:|EALREADY|) ; Operation already in progress
-(defconstant EINPROGRESS     linux:|EINPROGRESS|) ; Operation now in progress
-(defconstant ESTALE          linux:|ESTALE|)  ; Stale NFS file handle
-(defconstant EUCLEAN         linux:|EUCLEAN|) ; Structure needs cleaning
-(defconstant ENOTNAM         linux:|ENOTNAM|) ; Not a XENIX named type file
-(defconstant ENAVAIL         linux:|ENAVAIL|) ; No XENIX semaphores available
-(defconstant EISNAM          linux:|EISNAM|)  ; Is a named type file
-(defconstant EREMOTEIO       linux:|EREMOTEIO|) ; Remote I/O error
-(defconstant EDQUOT          linux:|EDQUOT|)    ; Quota exceeded
-(defconstant ENOMEDIUM       linux:|ENOMEDIUM|) ; No medium found
-(defconstant EMEDIUMTYPE     linux:|EMEDIUMTYPE|) ; Wrong medium type
+(defconstant eperm           linux:|EPERM|)  ; Operation not permitted
+(defconstant enoent          linux:|ENOENT|) ; No such file or directory
+(defconstant esrch           linux:|ESRCH|)  ; No such process
+(defconstant eintr           linux:|EINTR|)  ; Interrupted system call
+(defconstant eio             linux:|EIO|)    ; I/O error
+(defconstant enxio           linux:|ENXIO|) ; No such device or address
+(defconstant e2big           linux:|E2BIG|) ; Arg list too long
+(defconstant enoexec         linux:|ENOEXEC|) ; Exec format error
+(defconstant ebadf           linux:|EBADF|)   ; Bad file number
+(defconstant echild          linux:|ECHILD|)  ; No child processes
+(defconstant eagain          linux:|EAGAIN|)  ; Try again
+(defconstant enomem          linux:|ENOMEM|)  ; Out of memory
+(defconstant eacces          linux:|EACCES|)  ; Permission denied
+(defconstant efault          linux:|EFAULT|)  ; Bad address
+(defconstant enotblk         linux:|ENOTBLK|) ; Block device required
+(defconstant ebusy           linux:|EBUSY|)  ; Device or resource busy
+(defconstant eexist          linux:|EEXIST|) ; File exists
+(defconstant exdev           linux:|EXDEV|)  ; Cross-device link
+(defconstant enodev          linux:|ENODEV|) ; No such device
+(defconstant enotdir         linux:|ENOTDIR|) ; Not a directory
+(defconstant eisdir          linux:|EISDIR|)  ; Is a directory
+(defconstant einval          linux:|EINVAL|)  ; Invalid argument
+(defconstant enfile          linux:|ENFILE|)  ; File table overflow
+(defconstant emfile          linux:|EMFILE|)  ; Too many open files
+(defconstant enotty          linux:|ENOTTY|)  ; Not a typewriter
+(defconstant etxtbsy         linux:|ETXTBSY|) ; Text file busy
+(defconstant efbig           linux:|EFBIG|)   ; File too large
+(defconstant enospc          linux:|ENOSPC|) ; No space left on device
+(defconstant espipe          linux:|ESPIPE|) ; Illegal seek
+(defconstant erofs           linux:|EROFS|)  ; Read-only file system
+(defconstant emlink          linux:|EMLINK|) ; Too many links
+(defconstant epipe           linux:|EPIPE|)  ; Broken pipe
+(defconstant edom            linux:|EDOM|) ; Math argument out of domain of func
+(defconstant erange          linux:|ERANGE|) ; Math result not representable
+(defconstant edeadlk         linux:|EDEADLK|) ; Resource deadlock would occur
+(defconstant enametoolong    linux:|ENAMETOOLONG|) ; File name too long
+(defconstant enolck          linux:|ENOLCK|) ; No record locks available
+(defconstant enosys          linux:|ENOSYS|) ; Function not implemented
+(defconstant enotempty       linux:|ENOTEMPTY|) ; Directory not empty
+(defconstant eloop           linux:|ELOOP|) ; Too many symbolic links encountered
+(defconstant ewouldblock     linux:|EWOULDBLOCK|) ; Operation would block
+(defconstant enomsg          linux:|ENOMSG|) ; No message of desired type
+(defconstant eidrm           linux:|EIDRM|)  ; Identifier removed
+(defconstant echrng          linux:|ECHRNG|) ; Channel number out of range
+(defconstant el2nsync        linux:|EL2NSYNC|) ; Level 2 not synchronized
+(defconstant el3hlt          linux:|EL3HLT|)   ; Level 3 halted
+(defconstant el3rst          linux:|EL3RST|)   ; Level 3 reset
+(defconstant elnrng          linux:|ELNRNG|) ; Link number out of range
+(defconstant eunatch         linux:|EUNATCH|) ; Protocol driver not attached
+(defconstant enocsi          linux:|ENOCSI|) ; No CSI structure available
+(defconstant el2hlt          linux:|EL2HLT|) ; Level 2 halted
+(defconstant ebade           linux:|EBADE|)  ; Invalid exchange
+(defconstant ebadr           linux:|EBADR|) ; Invalid request descriptor
+(defconstant exfull          linux:|EXFULL|) ; Exchange full
+(defconstant enoano          linux:|ENOANO|) ; No anode
+(defconstant ebadrqc         linux:|EBADRQC|) ; Invalid request code
+(defconstant ebadslt         linux:|EBADSLT|) ; Invalid slot
+(defconstant edeadlock       linux:|EDEADLOCK|) ; File locking deadlock error
+(defconstant ebfont          linux:|EBFONT|)    ; Bad font file format
+(defconstant enostr          linux:|ENOSTR|)    ; Device not a stream
+(defconstant enodata         linux:|ENODATA|)   ; No data available
+(defconstant etime           linux:|ETIME|)     ; Timer expired
+(defconstant enosr           linux:|ENOSR|) ; Out of streams resources
+(defconstant enonet          linux:|ENONET|) ; Machine is not on the network
+(defconstant enopkg          linux:|ENOPKG|) ; Package not installed
+(defconstant eremote         linux:|EREMOTE|) ; Object is remote
+(defconstant enolink         linux:|ENOLINK|) ; Link has been severed
+(defconstant eadv            linux:|EADV|)    ; Advertise error
+(defconstant esrmnt          linux:|ESRMNT|)  ; Srmount error
+(defconstant ecomm           linux:|ECOMM|) ; Communication error on send
+(defconstant eproto          linux:|EPROTO|)    ; Protocol error
+(defconstant emultihop       linux:|EMULTIHOP|) ; Multihop attempted
+(defconstant edotdot         linux:|EDOTDOT|)   ; RFS specific error
+(defconstant ebadmsg         linux:|EBADMSG|)   ; Not a data message
+(defconstant eoverflow       linux:|EOVERFLOW|) ; Value too large for defined data type
+(defconstant enotuniq        linux:|ENOTUNIQ|) ; Name not unique on network
+(defconstant ebadfd          linux:|EBADFD|) ; File descriptor in bad state
+(defconstant eremchg         linux:|EREMCHG|) ; Remote address changed
+(defconstant elibacc         linux:|ELIBACC|) ; Can not access a needed shared library
+(defconstant elibbad         linux:|ELIBBAD|) ; Accessing a corrupted shared library
+(defconstant elibscn         linux:|ELIBSCN|) ; .lib section in a.out corrupted
+(defconstant elibmax         linux:|ELIBMAX|) ; Attempting to link in too many shared libraries
+(defconstant elibexec        linux:|ELIBEXEC|) ; Cannot exec a shared library directly
+(defconstant eilseq          linux:|EILSEQ|)   ; Illegal byte sequence
+(defconstant erestart        linux:|ERESTART|) ; Interrupted system call should be restarted
+(defconstant estrpipe        linux:|ESTRPIPE|) ; Streams pipe error
+(defconstant eusers          linux:|EUSERS|)   ; Too many users
+(defconstant enotsock        linux:|ENOTSOCK|) ; Socket operation on non-socket
+(defconstant edestaddrreq    linux:|EDESTADDRREQ|) ; Destination address required
+(defconstant emsgsize        linux:|EMSGSIZE|)     ; Message too long
+(defconstant eprototype      linux:|EPROTOTYPE|) ; Protocol wrong type for socket
+(defconstant enoprotoopt     linux:|ENOPROTOOPT|) ; Protocol not available
+(defconstant eprotonosupport linux:|EPROTONOSUPPORT|) ; Protocol not supported
+(defconstant esocktnosupport linux:|ESOCKTNOSUPPORT|) ; Socket type not supported
+(defconstant eopnotsupp      linux:|EOPNOTSUPP|) ; Operation not supported on transport endpoint
+(defconstant epfnosupport    linux:|EPFNOSUPPORT|) ; Protocol family not supported
+(defconstant eafnosupport    linux:|EAFNOSUPPORT|) ; Address family not supported by protocol
+(defconstant eaddrinuse      linux:|EADDRINUSE|) ; Address already in use
+(defconstant eaddrnotavail   linux:|EADDRNOTAVAIL|) ; Cannot assign requested address
+(defconstant enetdown        linux:|ENETDOWN|)      ; Network is down
+(defconstant enetunreach     linux:|ENETUNREACH|) ; Network is unreachable
+(defconstant enetreset       linux:|ENETRESET|) ; Network dropped connection because of reset
+(defconstant econnaborted    linux:|ECONNABORTED|) ; Software caused connection abort
+(defconstant econnreset      linux:|ECONNRESET|) ; Connection reset by peer
+(defconstant enobufs         linux:|ENOBUFS|) ; No buffer space available
+(defconstant eisconn         linux:|EISCONN|) ; Transport endpoint is already connected
+(defconstant enotconn        linux:|ENOTCONN|) ; Transport endpoint is not connected
+(defconstant eshutdown       linux:|ESHUTDOWN|) ; Cannot send after transport endpoint shutdown
+(defconstant etoomanyrefs    linux:|ETOOMANYREFS|) ; Too many references: cannot splice
+(defconstant etimedout       linux:|ETIMEDOUT|) ; Connection timed out
+(defconstant econnrefused    linux:|ECONNREFUSED|) ; Connection refused
+(defconstant ehostdown       linux:|EHOSTDOWN|)    ; Host is down
+(defconstant ehostunreach    linux:|EHOSTUNREACH|) ; No route to host
+(defconstant ealready        linux:|EALREADY|) ; Operation already in progress
+(defconstant einprogress     linux:|EINPROGRESS|) ; Operation now in progress
+(defconstant estale          linux:|ESTALE|)  ; Stale NFS file handle
+(defconstant euclean         linux:|EUCLEAN|) ; Structure needs cleaning
+(defconstant enotnam         linux:|ENOTNAM|) ; Not a XENIX named type file
+(defconstant enavail         linux:|ENAVAIL|) ; No XENIX semaphores available
+(defconstant eisnam          linux:|EISNAM|)  ; Is a named type file
+(defconstant eremoteio       linux:|EREMOTEIO|) ; Remote I/O error
+(defconstant edquot          linux:|EDQUOT|)    ; Quota exceeded
+(defconstant enomedium       linux:|ENOMEDIUM|) ; No medium found
+(defconstant emediumtype     linux:|EMEDIUMTYPE|) ; Wrong medium type



@@ -384,65 +382,65 @@ be signaled (but that check-errno returns instead of nil).
 ;; Lisp/C support stuff


-(DEFTYPE BOUND-STRING (MIN MAX)
+(deftype bound-string (min max)
   "A TYPE REPRESENTING STRINGS OF MINIMUM SIZE MIN AND MAXIMUM SIZE MAX."
-  (IF (= (EVAL MIN) (EVAL MAX))
-      `(STRING ,(EVAL MIN))
-      `STRING)) ;; TODO: (OR (STRING MIN) (STRING (1+ MIN)) ... (STRING MAX)))
+  (if (= (eval min) (eval max))
+      `(string ,(eval min))
+      `string)) ;; TODO: (OR (STRING MIN) (STRING (1+ MIN)) ... (STRING MAX)))


 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; ???


-(DECLAIM (FTYPE (FUNCTION (STRING) (OR NULL STRING)) GETENV))
+(declaim (ftype (function (string) (or null string)) getenv))


-(DEFUN GETENV (NAME)
+(defun getenv (name)
   "
 URL:        http://www.opengroup.org/onlinepubs/007904975/functions/getenv.html
 RETURN:     NIL or the value of the environment variable named NAME.
 "
-  (EXT:GETENV NAME))
+  (ext:getenv name))


 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; sys/types.h


-(DEFTYPE INO-T ()
+(deftype ino-t ()
   "The type of file serial numbers."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE DEV-T ()
+(deftype dev-t ()
   "Device ID."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE MODE-T ()
+(deftype mode-t ()
   "Mode of file."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE NLINK-T ()
+(deftype nlink-t ()
   "Number of hard links to the file."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE UID-T ()
+(deftype uid-t ()
   "User ID."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE GID-T ()
+(deftype gid-t ()
   "Group ID."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE TIME-T ()
+(deftype time-t ()
   "Time in seconds since epoch."
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))



@@ -450,39 +448,39 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; sys/stat.h


-(DEFTYPE BLKSIZE-T ()
+(deftype blksize-t ()
   ""
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))


-(DEFTYPE BLKCNT-T ()
+(deftype blkcnt-t ()
   ""
-  `(UNSIGNED-BYTE 32))
+  `(unsigned-byte 32))



-(DEFSTRUCT STAT
-  (DEV     0 :TYPE DEV-T) ;; Device ID of device containing file.
-  (INO     0 :TYPE INO-T) ;; File serial number.
-  (MODE    0 :TYPE MODE-T)  ;; Mode of file (see below).
-  (NLINK   0 :TYPE NLINK-T) ;; Number of hard links to the file.
-  (UID     0 :TYPE UID-T)   ;; User ID of file.
-  (GID     0 :TYPE GID-T)   ;; Group ID of file.
-  (RDEV    0 :TYPE DEV-T) ;; XSI: Device ID (if file is char or block special).
-  (SIZE    0 :TYPE OFF-T) ;; For regular files, the file size in bytes.
+(defstruct stat
+  (dev     0 :type dev-t) ;; Device ID of device containing file.
+  (ino     0 :type ino-t) ;; File serial number.
+  (mode    0 :type mode-t)  ;; Mode of file (see below).
+  (nlink   0 :type nlink-t) ;; Number of hard links to the file.
+  (uid     0 :type uid-t)   ;; User ID of file.
+  (gid     0 :type gid-t)   ;; Group ID of file.
+  (rdev    0 :type dev-t) ;; XSI: Device ID (if file is char or block special).
+  (size    0 :type off-t) ;; For regular files, the file size in bytes.
   ;;                      For symbolic links, the length in bytes of the
   ;;                      pathname contained in the symbolic link.
   ;;                      SHM: For a shared memory object, the length in bytes.
   ;;                      TYM: For a typed memory object, the length in bytes.
   ;;                      For other file types, the use of this field is
   ;;                      unspecified.
-  (ATIME   0 :TYPE TIME-T) ;; Time of last access.
-  (MTIME   0 :TYPE TIME-T) ;; Time of last data modification.
-  (CTIME   0 :TYPE TIME-T) ;; Time of last status change.
-  (BLKSIZE 0 :TYPE BLKSIZE-T) ;; XSI: A file system-specific preferred I/O
+  (atime   0 :type time-t) ;; Time of last access.
+  (mtime   0 :type time-t) ;; Time of last data modification.
+  (ctime   0 :type time-t) ;; Time of last status change.
+  (blksize 0 :type blksize-t) ;; XSI: A file system-specific preferred I/O
   ;;                      block size for this object. In some file system
   ;;                      types, this may vary from file to file.
-  (BLOCKS  0 :TYPE BLKCNT-T)) ;; XSI: Num. of blocks allocated for this object.)
+  (blocks  0 :type blkcnt-t)) ;; XSI: Num. of blocks allocated for this object.)


 ;; The st_ino and st_dev fields taken together uniquely identify the
@@ -523,14 +521,14 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;;     Symbolic link.S_IFSOCK
 ;;     Socket. [Option End]

-(DEFCONSTANT S-IFMT  #O0170000)
-(DEFCONSTANT S-IFDIR  #O040000)
-(DEFCONSTANT S-IFCHR  #O020000)
-(DEFCONSTANT S-IFBLK  #O060000)
-(DEFCONSTANT S-IFREG  #O100000)
-(DEFCONSTANT S-IFIFO  #O010000)
-(DEFCONSTANT S-IFLNK  #O120000)
-(DEFCONSTANT S-IFSOCK #O140000)
+(defconstant s-ifmt  #o0170000)
+(defconstant s-ifdir  #o040000)
+(defconstant s-ifchr  #o020000)
+(defconstant s-ifblk  #o060000)
+(defconstant s-ifreg  #o100000)
+(defconstant s-ififo  #o010000)
+(defconstant s-iflnk  #o120000)
+(defconstant s-ifsock #o140000)


 ;; File mode bits:
@@ -578,26 +576,26 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; bitwise-inclusive OR of S_IRWXU, S_IRWXG, and S_IRWXO.


-(DEFCONSTANT S-ISUID  #O004000)
-(DEFCONSTANT S-ISGID  #O002000)
-(DEFCONSTANT S-ISVTX  #O001000)
+(defconstant s-isuid  #o004000)
+(defconstant s-isgid  #o002000)
+(defconstant s-isvtx  #o001000)

-(DEFINE-SYMBOL-MACRO S-IREAD  S-IRUSR)
-(DEFINE-SYMBOL-MACRO S-IWRITE S-IWUSR)
-(DEFINE-SYMBOL-MACRO S-IEXEC  S-IXUSR)
+(define-symbol-macro s-iread  s-irusr)
+(define-symbol-macro s-iwrite s-iwusr)
+(define-symbol-macro s-iexec  s-ixusr)

-(DEFCONSTANT S-IRUSR  #O000400)
-(DEFCONSTANT S-IWUSR  #O000200)
-(DEFCONSTANT S-IXUSR  #O000100)
-(DEFCONSTANT S-IRWXU  (LOGIOR S-IRUSR S-IWUSR S-IXUSR))
-(DEFCONSTANT S-IRGRP  #O000040)
-(DEFCONSTANT S-IWGRP  #O000020)
-(DEFCONSTANT S-IXGRP  #O000010)
-(DEFCONSTANT S-IRWXG  (LOGIOR S-IRGRP S-IWGRP S-IXGRP))
-(DEFCONSTANT S-IROTH  #O000004)
-(DEFCONSTANT S-IWOTH  #O000002)
-(DEFCONSTANT S-IXOTH  #O000001)
-(DEFCONSTANT S-IRWXO  (LOGIOR S-IROTH S-IWOTH S-IXOTH))
+(defconstant s-irusr  #o000400)
+(defconstant s-iwusr  #o000200)
+(defconstant s-ixusr  #o000100)
+(defconstant s-irwxu  (logior s-irusr s-iwusr s-ixusr))
+(defconstant s-irgrp  #o000040)
+(defconstant s-iwgrp  #o000020)
+(defconstant s-ixgrp  #o000010)
+(defconstant s-irwxg  (logior s-irgrp s-iwgrp s-ixgrp))
+(defconstant s-iroth  #o000004)
+(defconstant s-iwoth  #o000002)
+(defconstant s-ixoth  #o000001)
+(defconstant s-irwxo  (logior s-iroth s-iwoth s-ixoth))


 ;; The following macros shall be provided to test whether a file is of
@@ -615,13 +613,13 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; Test for a symbolic link.S_ISSOCK(m)
 ;; Test for a socket.

-(DEFMACRO S-ISDIR  (M) `(= (LOGAND ,M S-IFMT) S-IFDIR))
-(DEFMACRO S-ISCHR  (M) `(= (LOGAND ,M S-IFMT) S-IFCHR))
-(DEFMACRO S-ISBLK  (M) `(= (LOGAND ,M S-IFMT) S-IFBLK))
-(DEFMACRO S-ISREG  (M) `(= (LOGAND ,M S-IFMT) S-IFREG))
-(DEFMACRO S-ISFIFO (M) `(= (LOGAND ,M S-IFMT) S-IFFIFO))
-(DEFMACRO S-ISLNK  (M) `(= (LOGAND ,M S-IFMT) S-IFLNK))
-(DEFMACRO S-ISSOCK (M) `(= (LOGAND ,M S-IFMT) S-IFSOCK))
+(defmacro s-isdir  (m) `(= (logand ,m s-ifmt) s-ifdir))
+(defmacro s-ischr  (m) `(= (logand ,m s-ifmt) s-ifchr))
+(defmacro s-isblk  (m) `(= (logand ,m s-ifmt) s-ifblk))
+(defmacro s-isreg  (m) `(= (logand ,m s-ifmt) s-ifreg))
+(defmacro s-isfifo (m) `(= (logand ,m s-ifmt) s-iffifo))
+(defmacro s-islnk  (m) `(= (logand ,m s-ifmt) s-iflnk))
+(defmacro s-issock (m) `(= (logand ,m s-ifmt) s-ifsock))


 ;; The implementation may implement message queues, semaphores, or
@@ -665,81 +663,81 @@ RETURN:     NIL or the value of the environment variable named NAME.
 ;; int    stat(const char *restrict, struct stat *restrict)
 ;; mode_t umask(mode_t)

-(DECLAIM (FTYPE (FUNCTION (STRING MODE-T)  NIL)    CHMOD))
-(DECLAIM (FTYPE (FUNCTION (INTEGER MODE-T) NIL)    FCHMOD))
-(DECLAIM (FTYPE (FUNCTION (INTEGER)        STAT)   FSTAT))
-(DECLAIM (FTYPE (FUNCTION (STRING)         STAT)   LSTAT))
-(DECLAIM (FTYPE (FUNCTION (STRING)         STAT)   STAT))
-(DECLAIM (FTYPE (FUNCTION (STRING MODE-T)  NIL)    MKDIR))
-(DECLAIM (FTYPE (FUNCTION (STRING MODE-T)  NIL)    MKFIFO))
-(DECLAIM (FTYPE (FUNCTION (MODE-T)         MODE-T) UMASK))
+(declaim (ftype (function (string mode-t)  nil)    chmod))
+(declaim (ftype (function (integer mode-t) nil)    fchmod))
+(declaim (ftype (function (integer)        stat)   fstat))
+(declaim (ftype (function (string)         stat)   lstat))
+(declaim (ftype (function (string)         stat)   stat))
+(declaim (ftype (function (string mode-t)  nil)    mkdir))
+(declaim (ftype (function (string mode-t)  nil)    mkfifo))
+(declaim (ftype (function (mode-t)         mode-t) umask))


-(DECLAIM ;; XSI
- '(FTYPE (FUNCTION (STRING MODE-T DEV-T) NIL) MKNOD))
+(declaim ;; XSI
+ '(ftype (function (string mode-t dev-t) nil) mknod))



-(DEFUN CHMOD (PATH MODE)
-  (CHECK-ERRNO (LINUX:|chmod| PATH MODE))
-  (VALUES))
+(defun chmod (path mode)
+  (check-errno (linux:|chmod| path mode))
+  (values))


-(DEFUN FCHMOD (FD MODE)
-  (CHECK-ERRNO (LINUX:|fchmod| FD MODE))
-  (VALUES))
+(defun fchmod (fd mode)
+  (check-errno (linux:|fchmod| fd mode))
+  (values))


-(DEFMACRO LINUX-STAT->SUSV3-STAT (SB)
+(defmacro linux-stat->susv3-stat (sb)
   "
 PRIVATE
 "
-  `(MAKE-STAT
-    :DEV (LINUX::|stat-st_dev| ,SB)
-    :INO (LINUX::|stat-st_ino| ,SB)
-    :MODE (LINUX::|stat-st_mode| ,SB)
-    :NLINK (LINUX::|stat-st_nlink| ,SB)
-    :UID (LINUX::|stat-st_uid| ,SB)
-    :GID (LINUX::|stat-st_gid| ,SB)
-    :RDEV (LINUX::|stat-st_rdev| ,SB)
-    :SIZE (LINUX::|stat-st_size| ,SB)
-    :ATIME (LINUX::|stat-st_atime| ,SB)
-    :MTIME (LINUX::|stat-st_mtime| ,SB)
-    :CTIME (LINUX::|stat-st_ctime| ,SB)
-    :BLKSIZE (LINUX::|stat-st_blksize| ,SB)
-    :BLOCKS (LINUX::|stat-st_blocks| ,SB)))
+  `(make-stat
+    :dev (linux::|stat-st_dev| ,sb)
+    :ino (linux::|stat-st_ino| ,sb)
+    :mode (linux::|stat-st_mode| ,sb)
+    :nlink (linux::|stat-st_nlink| ,sb)
+    :uid (linux::|stat-st_uid| ,sb)
+    :gid (linux::|stat-st_gid| ,sb)
+    :rdev (linux::|stat-st_rdev| ,sb)
+    :size (linux::|stat-st_size| ,sb)
+    :atime (linux::|stat-st_atime| ,sb)
+    :mtime (linux::|stat-st_mtime| ,sb)
+    :ctime (linux::|stat-st_ctime| ,sb)
+    :blksize (linux::|stat-st_blksize| ,sb)
+    :blocks (linux::|stat-st_blocks| ,sb)))


-(DEFUN STAT (PATH)
-  (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|stat| PATH))))
+(defun stat (path)
+  (linux-stat->susv3-stat (check-errno (linux:|stat| path))))


-(DEFUN LSTAT (PATH)
-  (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|lstat| PATH))))
+(defun lstat (path)
+  (linux-stat->susv3-stat (check-errno (linux:|lstat| path))))


-(DEFUN FSTAT (FD)
-  (LINUX-STAT->SUSV3-STAT (CHECK-ERRNO (LINUX:|fstat| FD))))
+(defun fstat (fd)
+  (linux-stat->susv3-stat (check-errno (linux:|fstat| fd))))


-(DEFUN MKDIR (PATH MODE)
-  (CHECK-ERRNO (LINUX:|mkdir| PATH MODE))
-  (VALUES))
+(defun mkdir (path mode)
+  (check-errno (linux:|mkdir| path mode))
+  (values))


-(DEFUN MKFIFO (PATH MODE)
-  (CHECK-ERRNO (LINUX:|mkfifo| PATH MODE))
-  (VALUES))
+(defun mkfifo (path mode)
+  (check-errno (linux:|mkfifo| path mode))
+  (values))


-(DEFUN UMASK (MODE)
-  (LINUX:|umask| MODE))
+(defun umask (mode)
+  (linux:|umask| mode))


 ;;XSI
-(DEFUN MKNOD (PATH MODE DEVICE)
-  (CHECK-ERRNO (LINUX:|mknod| PATH MODE DEVICE))
-  (VALUES))
+(defun mknod (path mode device)
+  (check-errno (linux:|mknod| path mode device))
+  (values))



@@ -747,7 +745,7 @@ PRIVATE
 ;; dirent.h

 (eval-when (:compile-toplevel :load-toplevel :execute)
-  (DEFCONSTANT NAME-MAX 255))
+  (defconstant name-max 255))


 (ffi:def-c-type dirp   pointer)
@@ -760,7 +758,7 @@ PRIVATE
   (d_off       off_t)
   (d_reclen    ffi:ushort)
   (d_type      ffi:uchar)
-  (d_name      (ffi:c-array ffi:char #.(1+ NAME-MAX))))
+  (d_name      (ffi:c-array ffi:char #.(1+ name-max))))
 (defmacro dirent-name (d) `(dirent-d_name ,d))
 (defmacro dirent-ino  (d) `(dirent-d_ino  ,d))

diff --git a/clisp/syslog.lisp b/clisp/syslog.lisp
index 4132fa0..80989af 100644
--- a/clisp/syslog.lisp
+++ b/clisp/syslog.lisp
@@ -17,33 +17,31 @@
 ;;;;    Not implemented as FFI, we're using the external program logger(1)
 ;;;;    in the mean time.
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2003
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")

 (defpackage "COM.INFORMATIMAGO.CLISP.SYSLOG"
-  (:DOCUMENTATION "This module exports unix syslog functions.
+  (:documentation "This module exports unix syslog functions.
 Since FFI is not always available with clisp, we rather use logger(1).")
   (:use "COMMON-LISP")
-  (:EXPORT
+  (:export
    "OPENLOG" "SYSLOG" "CLOSELOG"

    "+LOG-PID+" "+LOG-CONS+" "+LOG-ODELAY+" "+LOG-NDELAY+"
@@ -63,57 +61,57 @@ Since FFI is not always available with clisp, we rather use logger(1).")


 ;; options
-(DEFCONSTANT +LOG-PID+     1 "log the pid with each message ")
-(DEFCONSTANT +LOG-CONS+    2 "log on the console if errors in sending ")
-(DEFCONSTANT +LOG-ODELAY+  4 "delay open until first syslog() (default) ")
-(DEFCONSTANT +LOG-NDELAY+  8 "don't delay open ")
-(DEFCONSTANT +LOG-NOWAIT+ 16 "don't wait for console forks: DEPRECATED ")
-(DEFCONSTANT +LOG-PERROR+ 32 "log to stderr as well ")
+(defconstant +log-pid+     1 "log the pid with each message ")
+(defconstant +log-cons+    2 "log on the console if errors in sending ")
+(defconstant +log-odelay+  4 "delay open until first syslog() (default) ")
+(defconstant +log-ndelay+  8 "don't delay open ")
+(defconstant +log-nowait+ 16 "don't wait for console forks: DEPRECATED ")
+(defconstant +log-perror+ 32 "log to stderr as well ")

 ;; priorities
-(DEFCONSTANT +LOG-EMERG+   0 "system is unusable ")
-(DEFCONSTANT +LOG-ALERT+   1 "action must be taken immediately ")
-(DEFCONSTANT +LOG-CRIT+    2 "critical conditions ")
-(DEFCONSTANT +LOG-ERR+     3 "error conditions ")
-(DEFCONSTANT +LOG-WARNING+ 4 "warning conditions ")
-(DEFCONSTANT +LOG-NOTICE+  5 "normal but significant condition ")
-(DEFCONSTANT +LOG-INFO+    6 "informational ")
-(DEFCONSTANT +LOG-DEBUG+   7 "debug-level messages ")
+(defconstant +log-emerg+   0 "system is unusable ")
+(defconstant +log-alert+   1 "action must be taken immediately ")
+(defconstant +log-crit+    2 "critical conditions ")
+(defconstant +log-err+     3 "error conditions ")
+(defconstant +log-warning+ 4 "warning conditions ")
+(defconstant +log-notice+  5 "normal but significant condition ")
+(defconstant +log-info+    6 "informational ")
+(defconstant +log-debug+   7 "debug-level messages ")

 ;; facilities
-(DEFCONSTANT +LOG-KERN+       0 "kernel messages ")
-(DEFCONSTANT +LOG-USER+       8 "random user-level messages ")
-(DEFCONSTANT +LOG-MAIL+      16 "mail system ")
-(DEFCONSTANT +LOG-DAEMON+    24 "system daemons ")
-(DEFCONSTANT +LOG-AUTH+      32 "security/authorization messages ")
-(DEFCONSTANT +LOG-SYSLOG+    40 "messages generated internally by syslogd ")
-(DEFCONSTANT +LOG-LPR+       48 "line printer subsystem ")
-(DEFCONSTANT +LOG-NEWS+      56 "network news subsystem ")
-(DEFCONSTANT +LOG-UUCP+      64 "UUCP subsystem ")
-(DEFCONSTANT +LOG-CRON+      72 "clock daemon ")
-(DEFCONSTANT +LOG-AUTHPRIV+  80 "security/authorization messages (private) ")
-(DEFCONSTANT +LOG-FTP+       88 "ftp daemon ")
-(DEFCONSTANT +LOG-LOCAL0+   128 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL1+   136 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL2+   144 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL3+   152 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL4+   160 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL5+   168 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL6+   176 "reserved for local use ")
-(DEFCONSTANT +LOG-LOCAL7+   184 "reserved for local use ")
-
-
-
-
-
-(DEFVAR *IDENT*      "clisp")
-(DEFVAR *FACILITY*   +LOG-LOCAL0+)
-(DEFVAR *LOG-PID*    NIL "log the pid with each message ")
-(DEFVAR *LOG-CONS*   NIL "log on the console if errors in sending ")
-(DEFVAR *LOG-ODELAY* NIL "delay open until first syslog() (default) ")
-(DEFVAR *LOG-NDELAY* NIL "don't delay open ")
-(DEFVAR *LOG-NOWAIT* NIL "don't wait for console forks: DEPRECATED ")
-(DEFVAR *LOG-PERROR* NIL "log to stderr as well ")
+(defconstant +log-kern+       0 "kernel messages ")
+(defconstant +log-user+       8 "random user-level messages ")
+(defconstant +log-mail+      16 "mail system ")
+(defconstant +log-daemon+    24 "system daemons ")
+(defconstant +log-auth+      32 "security/authorization messages ")
+(defconstant +log-syslog+    40 "messages generated internally by syslogd ")
+(defconstant +log-lpr+       48 "line printer subsystem ")
+(defconstant +log-news+      56 "network news subsystem ")
+(defconstant +log-uucp+      64 "UUCP subsystem ")
+(defconstant +log-cron+      72 "clock daemon ")
+(defconstant +log-authpriv+  80 "security/authorization messages (private) ")
+(defconstant +log-ftp+       88 "ftp daemon ")
+(defconstant +log-local0+   128 "reserved for local use ")
+(defconstant +log-local1+   136 "reserved for local use ")
+(defconstant +log-local2+   144 "reserved for local use ")
+(defconstant +log-local3+   152 "reserved for local use ")
+(defconstant +log-local4+   160 "reserved for local use ")
+(defconstant +log-local5+   168 "reserved for local use ")
+(defconstant +log-local6+   176 "reserved for local use ")
+(defconstant +log-local7+   184 "reserved for local use ")
+
+
+
+
+
+(defvar *ident*      "clisp")
+(defvar *facility*   +log-local0+)
+(defvar *log-pid*    nil "log the pid with each message ")
+(defvar *log-cons*   nil "log on the console if errors in sending ")
+(defvar *log-odelay* nil "delay open until first syslog() (default) ")
+(defvar *log-ndelay* nil "don't delay open ")
+(defvar *log-nowait* nil "don't wait for console forks: DEPRECATED ")
+(defvar *log-perror* nil "log to stderr as well ")


 (defvar *loggers* (make-array '(256) :initial-element nil)
@@ -172,33 +170,33 @@ RETURN: A logger for the (facility priority) couple.



-(DEFUN OPENLOG (IDENT OPTION FACILITY)
-  (SETQ *IDENT*      IDENT
-        *FACILITY*   FACILITY
-        *LOG-PID*    (/= 0 (LOGAND OPTION +LOG-PID+))
-        *LOG-CONS*   (/= 0 (LOGAND OPTION +LOG-CONS+))
-        *LOG-ODELAY* (/= 0 (LOGAND OPTION +LOG-ODELAY+))
-        *LOG-NDELAY* (/= 0 (LOGAND OPTION +LOG-NDELAY+))
-        *LOG-NOWAIT* (/= 0 (LOGAND OPTION +LOG-NOWAIT+))
-        *LOG-PERROR* (/= 0 (LOGAND OPTION +LOG-PERROR+)))
-  (VALUES))
+(defun openlog (ident option facility)
+  (setq *ident*      ident
+        *facility*   facility
+        *log-pid*    (/= 0 (logand option +log-pid+))
+        *log-cons*   (/= 0 (logand option +log-cons+))
+        *log-odelay* (/= 0 (logand option +log-odelay+))
+        *log-ndelay* (/= 0 (logand option +log-ndelay+))
+        *log-nowait* (/= 0 (logand option +log-nowait+))
+        *log-perror* (/= 0 (logand option +log-perror+)))
+  (values))


-(DEFUN old-SYSLOG (PRIORITY FCTRL &REST ARGUMENTS)
-  (EXT:RUN-PROGRAM "logger"
-    :ARGUMENTS  (APPEND (WHEN *LOG-PID*    (LIST "-i"))
-                        (WHEN *LOG-PERROR* (LIST "-s"))
-                        (LIST "-p" (format nil "~D" (+ *facility* PRIORITY))
-                              "-t" *IDENT*
-                              "--" (APPLY (FUNCTION FORMAT) NIL FCTRL ARGUMENTS)))
-    :INPUT NIL :OUTPUT NIL :WAIT NIL)
-  (VALUES))
+(defun old-syslog (priority fctrl &rest arguments)
+  (ext:run-program "logger"
+    :arguments  (append (when *log-pid*    (list "-i"))
+                        (when *log-perror* (list "-s"))
+                        (list "-p" (format nil "~D" (+ *facility* priority))
+                              "-t" *ident*
+                              "--" (apply (function format) nil fctrl arguments)))
+    :input nil :output nil :wait nil)
+  (values))


 (defun newlinep (ch)
-  (member ch '(#\Newline #\Return #\Newline)))
+  (member ch '(#\newline #\return #\newline)))

-(DEFUN SYSLOG (PRIORITY FCTRL &REST ARGUMENTS)
+(defun syslog (priority fctrl &rest arguments)
   (let ((logger (get-logger *facility* priority)))
     (let ((lines (apply (function format) nil fctrl arguments)))
       (princ lines logger)
@@ -208,10 +206,10 @@ RETURN: A logger for the (facility priority) couple.
   (values))


-(DEFUN CLOSELOG ()
+(defun closelog ()
   (setf *loggers*
         (map 'array (lambda (logger) (when logger (close logger)) nil) *loggers*))
-  (VALUES))
+  (values))


 ;;;; THE END ;;;;
diff --git a/clisp/uffi-bsd.lisp b/clisp/uffi-bsd.lisp
index 3532f70..c897bd1 100644
--- a/clisp/uffi-bsd.lisp
+++ b/clisp/uffi-bsd.lisp
@@ -31,39 +31,22 @@
 ;;;;    of COMMON-LISP:DIRECTORY.  Only a unix implementation is provided.
 ;;;;
 ;;;;LEGAL
-;;;;    BSD
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2004
 ;;;;
-;;;;    Redistribution and use in source and binary forms, with or
-;;;;    without modification, are permitted provided that the following
-;;;;    conditions are met:
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;       1. Redistributions of source code must retain the above
-;;;;          copyright notice, this list of conditions and the
-;;;;          following disclaimer.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;       2. Redistributions in binary form must reproduce the above
-;;;;          copyright notice, this list of conditions and the
-;;;;          following disclaimer in the documentation and/or other
-;;;;          materials provided with the distribution.
-;;;;
-;;;;       3. The name of the author may not be used to endorse or
-;;;;          promote products derived from this software without
-;;;;          specific prior written permission.
-;;;;
-;;;;    THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY
-;;;;    EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
-;;;;    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
-;;;;    PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR
-;;;;    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-;;;;    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
-;;;;    TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-;;;;    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-;;;;    ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-;;;;    LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
-;;;;    IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
-;;;;    THE POSSIBILITY OF SUCH DAMAGE.
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
diff --git a/clisp/uffi-test.lisp b/clisp/uffi-test.lisp
index d9c84aa..e8aba41 100644
--- a/clisp/uffi-test.lisp
+++ b/clisp/uffi-test.lisp
@@ -26,8 +26,8 @@
        len))) ;;foreign-string-length


-(DEFUN CONVERT-FROM-FOREIGN-STRING (FOREIGN-STRING
-                                    &KEY LENGTH (NULL-TERMINATED-P T))
+(defun convert-from-foreign-string (foreign-string
+                                    &key length (null-terminated-p t))
   "
 DO:                 Builds a Lisp string from a foreign string.
                     Can translate ASCII and binary strings.
@@ -50,7 +50,7 @@ URL:        http://clisp.sourceforge.net/impnotes.html#encoding
     (dotimes (i (length byte-vector))
       (setf (aref byte-vector i)
             (ffi:element (ffi:foreign-value foreign-string) i)))
-    (EXT:CONVERT-STRING-FROM-BYTES byte-vector CUSTOM:*FOREIGN-ENCODING*)
+    (ext:convert-string-from-bytes byte-vector custom:*foreign-encoding*)
     )) ;;CONVERT-FROM-FOREIGN-STRING


@@ -127,7 +127,7 @@ uffi                 ffi-arg                      ffi-ret

 (defun h-record-out ()
   (ffi:with-foreign-object (result 'record-t)
-    (record-out (ffi:FOREIGN-ADDRESS result))
+    (record-out (ffi:foreign-address result))
     (make-record-t
      :character (ffi:slot (ffi:foreign-value result) 'character)
      :number (ffi:slot (ffi:foreign-value result) 'number)
diff --git a/clisp/uffi.lisp b/clisp/uffi.lisp
index e15c15f..27335e7 100644
--- a/clisp/uffi.lisp
+++ b/clisp/uffi.lisp
@@ -31,32 +31,28 @@
 ;;;;    of COMMON-LISP:DIRECTORY.  Only a unix implementation is provided.
 ;;;;
 ;;;;LEGAL
-;;;;    LGPL
-;;;;
+;;;;    AGPL3
+;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2003 - 2004
-;;;;
-;;;;    This library is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU Lesser General Public
-;;;;    License as published by the Free Software Foundation; either
-;;;;    version 2 of the License, or (at your option) any later
-;;;;    version.
-;;;;
-;;;;    This library is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU Lesser General Public License for more
-;;;;    details.
-;;;;
-;;;;    You should have received a copy of the GNU Lesser General
-;;;;    Public License along with this library; if not, write to the
-;;;;    Free Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
+;;;;
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
+;;;;
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
-(DEFPACKAGE "COM.INFORMATIMAGO.CLISP.UFFI"
-  (:NICKNAMES "UFFI")
-  (:DOCUMENTATION "
+(defpackage "COM.INFORMATIMAGO.CLISP.UFFI"
+  (:nicknames "UFFI")
+  (:documentation "
 This package implements over clisp native FFI the UFFI API as defined in
 'UFFI Reference Guide' by Kevin M. Rosenberg, Heart Hospital of New Mexico.

@@ -84,9 +80,9 @@ LEGAL:  Copyright Pascal J. Bourguignon 2003 - 2004
         Free Software Foundation, Inc., 59 Temple Place, Suite 330,
         Boston, MA 02111-1307 USA
 ")
-  (:USE "COMMON-LISP") ;; actually: FROM COMMON-LISP IMPORT ALL;
+  (:use "COMMON-LISP") ;; actually: FROM COMMON-LISP IMPORT ALL;
   ;; really: USE FFI,CUSTOM,EXT;
-  (:EXPORT
+  (:export

    ;; immediate types
    "DEF-TYPE"
@@ -143,7 +139,7 @@ LEGAL:  Copyright Pascal J. Bourguignon 2003 - 2004
    ;; not a UFFI.

    )) ;;COM.INFORMATIMAGO.CLISP.UFFI
-(IN-PACKAGE "COM.INFORMATIMAGO.CLISP.UFFI")
+(in-package "COM.INFORMATIMAGO.CLISP.UFFI")

 (provide :uffi) ;; Some client code use REQUIRE! Can you imagine that?

@@ -306,23 +302,23 @@ LEGAL:  Copyright Pascal J. Bourguignon 2003 - 2004
   uffi-type ffi-type cl-type)


-(DEFCONSTANT +TYPE-CONVERSION-LIST+
+(defconstant +type-conversion-list+
   '( ;; :UFFI                :FFI                    :CL
-    (:CHAR                  FFI:CHARACTER           CHARACTER)
-    (:UNSIGNED-CHAR         FFI:CHARACTER           CHARACTER)
-    (:BYTE                  FFI:SINT8               (SIGNED-BYTE    8))
-    (:UNSIGNED-BYTE         FFI:UINT8               (UNSIGNED-BYTE  9))
-    (:SHORT                 FFI:SINT16              (SIGNED-BYTE   16))
-    (:UNSIGNED-SHORT        FFI:UINT16              (UNSIGNED-BYTE 16))
-    (:INT                   FFI:SINT32              (SIGNED-BYTE   32))
-    (:UNSIGNED-INT          FFI:UINT32              (UNSIGNED-BYTE 32))
-    (:LONG                  FFI:SINT32              (SIGNED-BYTE   32))
-    (:UNSIGNED-LONG         FFI:UINT32              (UNSIGNED-BYTE 32))
-    (:FLOAT                 SINGLE-FLOAT            SINGLE-FLOAT)
-    (:DOUBLE                DOUBLE-FLOAT            DOUBLE-FLOAT)
-    (:CSTRING               FFI:C-POINTER           STRING)
-    (:POINTER-VOID          FFI:C-POINTER           T)
-    (:VOID                  NIL                     NIL)
+    (:char                  ffi:character           character)
+    (:unsigned-char         ffi:character           character)
+    (:byte                  ffi:sint8               (signed-byte    8))
+    (:unsigned-byte         ffi:uint8               (unsigned-byte  9))
+    (:short                 ffi:sint16              (signed-byte   16))
+    (:unsigned-short        ffi:uint16              (unsigned-byte 16))
+    (:int                   ffi:sint32              (signed-byte   32))
+    (:unsigned-int          ffi:uint32              (unsigned-byte 32))
+    (:long                  ffi:sint32              (signed-byte   32))
+    (:unsigned-long         ffi:uint32              (unsigned-byte 32))
+    (:float                 single-float            single-float)
+    (:double                double-float            double-float)
+    (:cstring               ffi:c-pointer           string)
+    (:pointer-void          ffi:c-pointer           t)
+    (:void                  nil                     nil)
 ;;;
 ;;; (:ENUM                  FFI:INT                 INTEGER)
 ;;; ((:STRUCT name)         FFI:C-STRUCT            STRUCTURE)
@@ -337,32 +333,32 @@ LEGAL:  Copyright Pascal J. Bourguignon 2003 - 2004
   ) ;;+TYPE-CONVERSION-LIST+


-(defvar +TYPE-CONVERSION-HASH+
-  (let ((table (MAKE-HASH-TABLE :SIZE 23)))
-    (DOLIST (RECORD +TYPE-CONVERSION-LIST+)
-      (SETF (GETHASH (UFFI-TYPE RECORD) table) RECORD))
+(defvar +type-conversion-hash+
+  (let ((table (make-hash-table :size 23)))
+    (dolist (record +type-conversion-list+)
+      (setf (gethash (uffi-type record) table) record))
     table)
   "A hash uffi-type --> (uffi-type  ffi-type  cl-type)."
   ) ;;+TYPE-CONVERSION-HASH+


-(PROCLAIM '(INLINE GET-TYPE-CONVERSION-RECORD))
-(DEFUN GET-TYPE-CONVERSION-RECORD (UFFI-TYPE)
+(proclaim '(inline get-type-conversion-record))
+(defun get-type-conversion-record (uffi-type)
   "
 PRIVATE
 RETURN:             THE RECORD FROM +TYPE-CONVERSION-HASH+ CORRESPONDING
                     TO UFFI-TYPE, OR NIL IF NONE EXISTS.
 "
-  (GETHASH UFFI-TYPE +TYPE-CONVERSION-HASH+)
+  (gethash uffi-type +type-conversion-hash+)
   ) ;;GET-TYPE-CONVERSION-RECORD


-(DEFVAR *FOREIGN-TYPES-HASH* (MAKE-HASH-TABLE :SIZE 23)
+(defvar *foreign-types-hash* (make-hash-table :size 23)
   "A HASH TABLE OF THE NAMED FOREIGN TYPES: NAME --> UFFI-TYPE."
   ) ;;*FOREIGN-TYPES-HASH*


-(DEFVAR *FOREIGN-STRUCTS-HASH* (MAKE-HASH-TABLE :SIZE 23)
+(defvar *foreign-structs-hash* (make-hash-table :size 23)
   "A HASH TABLE OF THE NAMED FOREIGN STRUCTS: NAME --> UFFI-STRUCT-TYPE."
   ) ;;*FOREIGN-STRUCTS-HASH*

@@ -380,7 +376,7 @@ RETURN:             THE RECORD FROM +TYPE-CONVERSION-HASH+ CORRESPONDING
 ;;; (:ARRAY     TYPE SIZE)


-(DEFUN CLEAN-UFFI-TYPE (UFFI-TYPE &OPTIONAL CURRENT-STRUCT)
+(defun clean-uffi-type (uffi-type &optional current-struct)
   "
 PRIVATE
 DO:                 REPLACE :POINTER-SELF BY (* (:STRUCT CURRENT-STRUCT),)
@@ -392,76 +388,76 @@ DO:                 REPLACE :POINTER-SELF BY (* (:STRUCT CURRENT-STRUCT),)
 RETURN:             A CLEANED UFFI-TYPE.
 TODO:               CHECK OF (STRUCT X (FIELD (STRUCT X))).
 "
-  (IF (ATOM UFFI-TYPE)
-      (IF (EQ UFFI-TYPE :POINTER-SELF)
-          (IF CURRENT-STRUCT
-              `(* (:STRUCT ,CURRENT-STRUCT))
-              (ERROR "FOUND :POINTER-SELF OUT OF A STRUCTURE."))
-          UFFI-TYPE)
-      (CASE (FIRST UFFI-TYPE)
-        (:STRUCT-POINTER
-         (UNLESS (= 2 (LENGTH UFFI-TYPE))
-           (ERROR "INVALID UFFI TYPE: ~S." UFFI-TYPE))
-         `(* ,(CLEAN-UFFI-TYPE (SECOND UFFI-TYPE))))
-        (:STRUCT
-            (COND
-              ((= 2 (LENGTH UFFI-TYPE))
-               (UNLESS (GETHASH (SECOND UFFI-TYPE) *FOREIGN-STRUCTS-HASH*)
-                 (ERROR "UNKNOWN STRUCT TYPE: ~S." UFFI-TYPE))
-               UFFI-TYPE)
-              ((< 2 (LENGTH UFFI-TYPE))
-               (LET ((STRUCT-NAME (SECOND UFFI-TYPE)))
-                 (UNLESS (SYMBOLP STRUCT-NAME)
-                   (ERROR "EXPECTED A SYMBOL AS STRUCT NAME INSTEAD OF ~S."
-                          STRUCT-NAME))
-                 `(:STRUCT ,STRUCT-NAME
-                    ,@(MAPCAR (LAMBDA (FIELD)
-                                (LET ((NAME (FIRST FIELD))
-                                      (TYPE (SECOND FIELD)))
-                                  (UNLESS (= 2 (LENGTH FIELD))
-                                    (ERROR "INVALID STRUCT FIELD ~S." FIELD))
-                                  (LIST NAME (CLEAN-UFFI-TYPE TYPE STRUCT-NAME))))
-                              (CDDR UFFI-TYPE)))))
-              (T
-               (ERROR "INVALID STRUCT TYPE: ~S." UFFI-TYPE))))
-        (COMMON-LISP:QUOTE
-         (CLEAN-UFFI-TYPE (SECOND UFFI-TYPE) CURRENT-STRUCT))
-        (:UNION
-         (UNLESS (< 2 (LENGTH UFFI-TYPE))
-           (ERROR "MISSING FIELDS IN UNION TYPE ~S." UFFI-TYPE))
-         `(:UNION ,(SECOND UFFI-TYPE)
-                  ,@(MAPCAR (LAMBDA (FIELD)
-                              (LET ((NAME (FIRST FIELD))
-                                    (TYPE (SECOND FIELD)))
-                                (UNLESS (= 2 (LENGTH FIELD))
-                                  (ERROR "INVALID UNION FIELD ~S." FIELD))
-                                (LIST NAME
-                                      (CLEAN-UFFI-TYPE TYPE CURRENT-STRUCT))))
-                            (CDDR UFFI-TYPE))))
-        (:ARRAY-PTR
-         (UNLESS (= 2 (LENGTH UFFI-TYPE))
-           (ERROR "INVALID ARRAY-PTR TYPE: ~S." UFFI-TYPE))
-         `(:ARRAY-PTR ,(CLEAN-UFFI-TYPE (SECOND UFFI-TYPE) CURRENT-STRUCT)))
-        (:ARRAY
-         (UNLESS (= 3 (LENGTH UFFI-TYPE))
-           (ERROR "INVALID ARRAY TYPE: ~S." UFFI-TYPE))
-         (LET ((SIZE (THIRD UFFI-TYPE)))
-           (UNLESS (AND (INTEGERP SIZE) (< 0 SIZE))
-             (ERROR "INVALID ARRAY SIZE: ~S." SIZE))
-           `(:ARRAY ,(CLEAN-UFFI-TYPE (SECOND UFFI-TYPE) CURRENT-STRUCT)
-                    ,SIZE)))
+  (if (atom uffi-type)
+      (if (eq uffi-type :pointer-self)
+          (if current-struct
+              `(* (:struct ,current-struct))
+              (error "FOUND :POINTER-SELF OUT OF A STRUCTURE."))
+          uffi-type)
+      (case (first uffi-type)
+        (:struct-pointer
+         (unless (= 2 (length uffi-type))
+           (error "INVALID UFFI TYPE: ~S." uffi-type))
+         `(* ,(clean-uffi-type (second uffi-type))))
+        (:struct
+            (cond
+              ((= 2 (length uffi-type))
+               (unless (gethash (second uffi-type) *foreign-structs-hash*)
+                 (error "UNKNOWN STRUCT TYPE: ~S." uffi-type))
+               uffi-type)
+              ((< 2 (length uffi-type))
+               (let ((struct-name (second uffi-type)))
+                 (unless (symbolp struct-name)
+                   (error "EXPECTED A SYMBOL AS STRUCT NAME INSTEAD OF ~S."
+                          struct-name))
+                 `(:struct ,struct-name
+                    ,@(mapcar (lambda (field)
+                                (let ((name (first field))
+                                      (type (second field)))
+                                  (unless (= 2 (length field))
+                                    (error "INVALID STRUCT FIELD ~S." field))
+                                  (list name (clean-uffi-type type struct-name))))
+                              (cddr uffi-type)))))
+              (t
+               (error "INVALID STRUCT TYPE: ~S." uffi-type))))
+        (common-lisp:quote
+         (clean-uffi-type (second uffi-type) current-struct))
+        (:union
+         (unless (< 2 (length uffi-type))
+           (error "MISSING FIELDS IN UNION TYPE ~S." uffi-type))
+         `(:union ,(second uffi-type)
+                  ,@(mapcar (lambda (field)
+                              (let ((name (first field))
+                                    (type (second field)))
+                                (unless (= 2 (length field))
+                                  (error "INVALID UNION FIELD ~S." field))
+                                (list name
+                                      (clean-uffi-type type current-struct))))
+                            (cddr uffi-type))))
+        (:array-ptr
+         (unless (= 2 (length uffi-type))
+           (error "INVALID ARRAY-PTR TYPE: ~S." uffi-type))
+         `(:array-ptr ,(clean-uffi-type (second uffi-type) current-struct)))
+        (:array
+         (unless (= 3 (length uffi-type))
+           (error "INVALID ARRAY TYPE: ~S." uffi-type))
+         (let ((size (third uffi-type)))
+           (unless (and (integerp size) (< 0 size))
+             (error "INVALID ARRAY SIZE: ~S." size))
+           `(:array ,(clean-uffi-type (second uffi-type) current-struct)
+                    ,size)))
         (*
          (unless (= 2 (length uffi-type))
            (error "INVALID POINTER TYPE: ~S." uffi-type))
-         `(* ,(CLEAN-UFFI-TYPE (SECOND UFFI-TYPE))))
+         `(* ,(clean-uffi-type (second uffi-type))))
         ;;(if (member (second uffi-type) '(:unsigned-char :char))
         ;;'FFI:C-POINTER
-        (OTHERWISE
-         (ERROR "INVALID TYPE: ~S." UFFI-TYPE))))
+        (otherwise
+         (error "INVALID TYPE: ~S." uffi-type))))
   ) ;;CLEAN-UFFI-TYPE


-(DEFUN CONVERT-FROM-UFFI-TYPE (UFFI-TYPE CONTEXT)
+(defun convert-from-uffi-type (uffi-type context)
   "
 PRIVATE
 DO:                 Converts from a uffi type to an implementation
@@ -471,73 +467,73 @@ CONTEXT:            :FFI OR :CL
 RETURN:             A FFI TYPE (C-TYPE), OR A COMMON-LISP TYPE,
                     DEPENDING ON THE CONTEXT.
 "
-  (UNLESS (OR (EQ CONTEXT :FFI) (EQ CONTEXT :CL))
-    (ERROR "UNEXPECTED CONTEXT ~S, SHOULD BE EITHER :FFI OR :CL." CONTEXT))
-  (IF (ATOM UFFI-TYPE)
-      (LET ((RECORD (GET-TYPE-CONVERSION-RECORD UFFI-TYPE)))
-        (IF RECORD
+  (unless (or (eq context :ffi) (eq context :cl))
+    (error "UNEXPECTED CONTEXT ~S, SHOULD BE EITHER :FFI OR :CL." context))
+  (if (atom uffi-type)
+      (let ((record (get-type-conversion-record uffi-type)))
+        (if record
             ;; primitive types
-            (IF (EQ CONTEXT :FFI)
-                (FFI-TYPE RECORD)
-                (CL-TYPE  RECORD))
+            (if (eq context :ffi)
+                (ffi-type record)
+                (cl-type  record))
             ;; named types
-            (LET ((TYPE (GETHASH UFFI-TYPE *FOREIGN-TYPES-HASH*)))
-              (IF TYPE
-                  (CONVERT-FROM-UFFI-TYPE TYPE CONTEXT)
-                  (ERROR "UNKNOWN UFFI TYPE ~S." UFFI-TYPE)))))
-      (LET ((SUB-TYPE (FIRST UFFI-TYPE)))
-        (CASE SUB-TYPE
-          (:STRUCT
-              (LET ((NAME (SECOND UFFI-TYPE))
-                    (FIELDS
-                     (MAPCAR
-                      (LAMBDA (FIELD)
-                        (LET ((NAME (FIRST FIELD))
-                              (TYPE (SECOND FIELD)))
-                          (LIST NAME (CONVERT-FROM-UFFI-TYPE TYPE CONTEXT))))
-                      (CDDR UFFI-TYPE))))
+            (let ((type (gethash uffi-type *foreign-types-hash*)))
+              (if type
+                  (convert-from-uffi-type type context)
+                  (error "UNKNOWN UFFI TYPE ~S." uffi-type)))))
+      (let ((sub-type (first uffi-type)))
+        (case sub-type
+          (:struct
+              (let ((name (second uffi-type))
+                    (fields
+                     (mapcar
+                      (lambda (field)
+                        (let ((name (first field))
+                              (type (second field)))
+                          (list name (convert-from-uffi-type type context))))
+                      (cddr uffi-type))))
                 ;; TODO: SEE GENERATION OF  (:STRUCT NAME)
                 ;;       VS. GENERATION OF: (:STRUCT NAME (FIELD TYPE)...)
-                (IF (NULL FIELDS)
-                    (LET ((TYPE (GETHASH NAME *FOREIGN-STRUCTS-HASH*)))
-                      (IF TYPE
-                          (IF (EQ CONTEXT :FFI)
-                              `(FFI:C-STRUCT ,NAME)
-                              NAME) ;; (CONVERT-FROM-UFFI-TYPE TYPE CONTEXT)
-                          (ERROR "UNKNOWN UFFI STRUCTURE ~S." NAME)))
-                    (IF (EQ CONTEXT :FFI)
-                        `(FFI:C-STRUCT ,NAME ,@FIELDS)
-                        `(DEFSTRUCT ,NAME ,@FIELDS)))))
-          (:UNION
-           (IF (EQ CONTEXT :FFI)
-               `(:C-UNION ,@(MAPCAR
-                             (LAMBDA (FIELD)
-                               (LET ((NAME (FIRST FIELD))
-                                     (TYPE (SECOND FIELD)))
-                                 (LIST NAME
-                                       (CONVERT-FROM-UFFI-TYPE TYPE CONTEXT))))
-                             (CDDR UFFI-TYPE)))
-               `(CONVERT-FROM-UFFI-TYPE (SECOND (SECOND UFFI-TYPE)) CONTEXT)))
-          (:ARRAY-PTR
-           (LET ((ELEMENT-TYPE
-                  (CONVERT-FROM-UFFI-TYPE  (SECOND UFFI-TYPE) CONTEXT)))
-             (IF (EQ CONTEXT :FFI)
-                 `(FFI:C-ARRAY-PTR ,ELEMENT-TYPE)
-                 `(ARRAY ,ELEMENT-TYPE *))))
-          (:ARRAY
-           (LET ((ELEMENT-TYPE
-                  (CONVERT-FROM-UFFI-TYPE (SECOND UFFI-TYPE) CONTEXT))
-                 (ARRAY-SIZE   (CDDR  UFFI-TYPE)))
-             (IF (EQ CONTEXT :FFI)
-                 `(FFI:C-ARRAY ,ELEMENT-TYPE ,ARRAY-SIZE)
-                 `(ARRAY ,ELEMENT-TYPE (,ARRAY-SIZE)))))
+                (if (null fields)
+                    (let ((type (gethash name *foreign-structs-hash*)))
+                      (if type
+                          (if (eq context :ffi)
+                              `(ffi:c-struct ,name)
+                              name) ;; (CONVERT-FROM-UFFI-TYPE TYPE CONTEXT)
+                          (error "UNKNOWN UFFI STRUCTURE ~S." name)))
+                    (if (eq context :ffi)
+                        `(ffi:c-struct ,name ,@fields)
+                        `(defstruct ,name ,@fields)))))
+          (:union
+           (if (eq context :ffi)
+               `(:c-union ,@(mapcar
+                             (lambda (field)
+                               (let ((name (first field))
+                                     (type (second field)))
+                                 (list name
+                                       (convert-from-uffi-type type context))))
+                             (cddr uffi-type)))
+               `(convert-from-uffi-type (second (second uffi-type)) context)))
+          (:array-ptr
+           (let ((element-type
+                  (convert-from-uffi-type  (second uffi-type) context)))
+             (if (eq context :ffi)
+                 `(ffi:c-array-ptr ,element-type)
+                 `(array ,element-type *))))
+          (:array
+           (let ((element-type
+                  (convert-from-uffi-type (second uffi-type) context))
+                 (array-size   (cddr  uffi-type)))
+             (if (eq context :ffi)
+                 `(ffi:c-array ,element-type ,array-size)
+                 `(array ,element-type (,array-size)))))
           (*
            (if (eq context :ffi)
                `(ffi:c-ptr ,(convert-from-uffi-type (second uffi-type) :ffi))
                ;;'FFI:C-POINTER
                (error "I don't know what a ~S is in Lisp.")))
-          (OTHERWISE
-           (ERROR "INVALID TYPE ~S." UFFI-TYPE)))))
+          (otherwise
+           (error "INVALID TYPE ~S." uffi-type)))))
   ) ;;CONVERT-FROM-UFFI-TYPE


@@ -547,7 +543,7 @@ RETURN:             A FFI TYPE (C-TYPE), OR A COMMON-LISP TYPE,
 ;;;;;;;;;;;;;;;;;;;;;


-(DEFMACRO DEF-TYPE (NAME TYPE)
+(defmacro def-type (name type)
   "
 DO:                 Defines a Common Lisp type based on a UFFI type.
 NAME:               A symbol naming the type
@@ -557,7 +553,7 @@ URL:                http://uffi.b9.com/manual/def-type.html
 URL:                http://www.lisp.org/HyperSpec/Body/mac_deftype.html
 "
   (setf type (clean-uffi-type type))
-  `(DEFTYPE ,NAME T ,(CONVERT-FROM-UFFI-TYPE TYPE :CL))) ;;DEF-TYPE
+  `(deftype ,name t ,(convert-from-uffi-type type :cl))) ;;DEF-TYPE



@@ -566,7 +562,7 @@ URL:                http://www.lisp.org/HyperSpec/Body/mac_deftype.html
 ;;;;;;;;;;;;;;;;;;;;;;;;;


-(DEFMACRO DEF-CONSTANT (NAME VALUE &KEY (EXPORT NIL))
+(defmacro def-constant (name value &key (export nil))
   "
 DO:                 This is a thin wrapper around defconstant.
                     It evaluates at compile-time and optionally
@@ -581,15 +577,15 @@ URL:                http://uffi.b9.com/manual/def-constant.html
 URL:                http://www.lisp.org/HyperSpec/Body/mac_defconstant.html
 URL:                http://www.lisp.org/HyperSpec/Body/fun_export.html
 "
-  `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-     (DEFCONSTANT ,NAME ,VALUE)
-     ,(WHEN EXPORT (LIST 'EXPORT `(QUOTE ,NAME)))
-     ',NAME)
+  `(eval-when (:compile-toplevel :load-toplevel :execute)
+     (defconstant ,name ,value)
+     ,(when export (list 'export `(quote ,name)))
+     ',name)
   ) ;;DEF-CONSTANT



-(DEFMACRO DEF-FOREIGN-TYPE (NAME TYPE)
+(defmacro def-foreign-type (name type)
   "
 DO:                 Defines a new foreign type.
 NAME:               A symbol naming the new foreign type.
@@ -598,16 +594,16 @@ VALUE:              A form that is not evaluated that defines
 URL:                http://uffi.b9.com/manual/def-foreign-type.html
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-type
 "
-  (LET* ((NAME NAME)
-         (UFFI-TYPE (CLEAN-UFFI-TYPE type NAME))
-         (FFI-TYPE  (CONVERT-FROM-UFFI-TYPE UFFI-TYPE :FFI)) )
-    `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-       (SETF (GETHASH ',NAME *FOREIGN-TYPES-HASH*) ',UFFI-TYPE)
-       (FFI:DEF-C-TYPE ,NAME ,FFI-TYPE)))) ;;DEF-FOREIGN-TYPE
+  (let* ((name name)
+         (uffi-type (clean-uffi-type type name))
+         (ffi-type  (convert-from-uffi-type uffi-type :ffi)) )
+    `(eval-when (:compile-toplevel :load-toplevel :execute)
+       (setf (gethash ',name *foreign-types-hash*) ',uffi-type)
+       (ffi:def-c-type ,name ,ffi-type)))) ;;DEF-FOREIGN-TYPE



-(DEFMACRO NULL-CHAR-P (VAL)
+(defmacro null-char-p (val)
   "
 DO:                 Tests if a character or integer is NULL.
                     This abstracts the difference in implementations where
@@ -617,18 +613,18 @@ CHAR:               A character or integer.
 RETURN:             A boolean flag indicating if char is a NULL value.
 URL:                http://uffi.b9.com/manual/null-char-p.html
 "
-  `(LET ((VAL ,VAL)) (IF (CHARACTERP VAL) (ZEROP (CHAR-CODE VAL)) (ZEROP VAL)))
+  `(let ((val ,val)) (if (characterp val) (zerop (char-code val)) (zerop val)))
   ) ;;NULL-CHAR-P



-(DEFUN MAKE-CONSTANT-NAME (ENUM-NAME SEPARATOR-STRING CONSTANT-ID)
+(defun make-constant-name (enum-name separator-string constant-id)
   "
 PRIVATE
 DO:                 Builds an enum constant name.
 "
-  (INTERN (with-standard-io-syntax
-            (FORMAT NIL "~A~A~A" ENUM-NAME SEPARATOR-STRING CONSTANT-ID))))
+  (intern (with-standard-io-syntax
+            (format nil "~A~A~A" enum-name separator-string constant-id))))



@@ -637,7 +633,7 @@ DO:                 Builds an enum constant name.
 ;;;;;;;;;;;;;;;;;;;;;;;;;;


-(DEFMACRO DEF-ENUM (NAME CONSTANTS &KEY (SEPARATOR-STRING "#"))
+(defmacro def-enum (name constants &key (separator-string "#"))
   "
 DO:                 Declares a C enumeration.
                     It generates constants with integer values for the
@@ -663,27 +659,27 @@ URL:                http://uffi.b9.com/manual/def-enum.html
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-enum
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-type
 "
-  (LET ((C-CONSTANTS
-         (MAPCAR
-          (LAMBDA (CONSTANT)
-            (COND
-              ((SYMBOLP CONSTANT)
-               (LIST (MAKE-CONSTANT-NAME NAME SEPARATOR-STRING CONSTANT))  )
-              ((AND (CONSP CONSTANT)
-                    (= 2 (LENGTH CONSTANT)) (INTEGERP (CADR CONSTANT)))
-               (LIST (MAKE-CONSTANT-NAME NAME SEPARATOR-STRING (CAR CONSTANT))
-                     (CADR CONSTANT)))
-              (T
-               (ERROR "INVALID ENUM CONSTANT SYNTAX: ~S." CONSTANT))))
-          CONSTANTS)))
-    `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-       (SETF (GETHASH ,NAME *FOREIGN-TYPES-HASH*) :INT)
-       (FFI:DEF-C-TYPE  ,NAME  ,(CONVERT-FROM-UFFI-TYPE :INT :FFI))
-       (FFI:DEF-C-ENUM  ,NAME  ,@C-CONSTANTS)))
+  (let ((c-constants
+         (mapcar
+          (lambda (constant)
+            (cond
+              ((symbolp constant)
+               (list (make-constant-name name separator-string constant))  )
+              ((and (consp constant)
+                    (= 2 (length constant)) (integerp (cadr constant)))
+               (list (make-constant-name name separator-string (car constant))
+                     (cadr constant)))
+              (t
+               (error "INVALID ENUM CONSTANT SYNTAX: ~S." constant))))
+          constants)))
+    `(eval-when (:compile-toplevel :load-toplevel :execute)
+       (setf (gethash ,name *foreign-types-hash*) :int)
+       (ffi:def-c-type  ,name  ,(convert-from-uffi-type :int :ffi))
+       (ffi:def-c-enum  ,name  ,@c-constants)))
   ) ;;DEF-ENUM


-(DEFMACRO DEF-STRUCT (NAME &REST FIELDS)
+(defmacro def-struct (name &rest fields)
   "
 DO:                 Declares a structure.
                     A special type is available as a slot in the field. It is
@@ -698,13 +694,13 @@ IMPLEMENTATION:     Generates a DEF-C-STRUCT which defines both a foreign
 URL:                http://uffi.b9.com/manual/def-struct.html
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-struct
 "
-  (LET* ((NAME NAME)
-         (UFFI-TYPE (CLEAN-UFFI-TYPE `(:STRUCT ,NAME ,@FIELDS) NAME))
-         (FFI-TYPE  (CONVERT-FROM-UFFI-TYPE UFFI-TYPE :FFI)) )
-    `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-       (SETF (GETHASH ',NAME *FOREIGN-TYPES-HASH*)
-             (SETF (GETHASH ',NAME *FOREIGN-STRUCTS-HASH*) ',UFFI-TYPE))
-       (FFI:DEF-C-STRUCT ,@(CDR FFI-TYPE))))
+  (let* ((name name)
+         (uffi-type (clean-uffi-type `(:struct ,name ,@fields) name))
+         (ffi-type  (convert-from-uffi-type uffi-type :ffi)) )
+    `(eval-when (:compile-toplevel :load-toplevel :execute)
+       (setf (gethash ',name *foreign-types-hash*)
+             (setf (gethash ',name *foreign-structs-hash*) ',uffi-type))
+       (ffi:def-c-struct ,@(cdr ffi-type))))
   ) ;;DEF-STRUCT

 ;; ,(CONVERT-FROM-UFFI-TYPE TYPE :CL)
@@ -712,7 +708,7 @@ URL:                http://clisp.sourceforge.net/impnotes.html#def-c-struct
 ;; (setf name 'ldap-error fields '((e_code :int) (e_reason (* :unsigned-char))))


-(DEFMACRO GET-SLOT-VALUE (OBJ TYPE FIELD)
+(defmacro get-slot-value (obj type field)
   "
 DO:                 Accesses a slot value from a structure.
 OBJ:                A pointer to foreign structure.
@@ -726,12 +722,12 @@ URL:                http://clisp.sourceforge.net/impnotes.html#slot
   (when (and (listp type) (eq 'quote (car type)))
     (setf type (second type)))
   ;; TODO: CHECK CONVERT TYPE.
-  `(FFI:SLOT (FFI:DEREF (FFI:CAST (ffi:foreign-value ,OBJ) (* ,TYPE)))
-             ,FIELD)) ;;GET-SLOT-VALUE
+  `(ffi:slot (ffi:deref (ffi:cast (ffi:foreign-value ,obj) (* ,type)))
+             ,field)) ;;GET-SLOT-VALUE



-(DEFMACRO GET-SLOT-POINTER (OBJ TYPE FIELD)
+(defmacro get-slot-pointer (obj type field)
   "
 DO:                 Accesses a slot value from a structure.
 OBJ:                A pointer to foreign structure.
@@ -745,12 +741,12 @@ URL:                http://uffi.b9.com/manual/get-slot-pointer.html
 URL:                http://clisp.sourceforge.net/impnotes.html#slot
 "
   ;; NO DIFFERENCE TO ACCESS POINTER FIELD THAN TO ACCESS VALUE FIELDS.
-  `(GET-SLOT-VALUE ,OBJ ,TYPE ,FIELD)
+  `(get-slot-value ,obj ,type ,field)
   ) ;;GET-SLOT-POINTER



-(DEFMACRO DEF-ARRAY-POINTER (NAME TYPE)
+(defmacro def-array-pointer (name type)
   "
 DO:                 Defines a type that is a pointer to an array of type.
 NAME:               A name of the new foreign type.
@@ -759,17 +755,17 @@ URL:                http://uffi.b9.com/manual/def-array-pointer.html
 URL:                http://clisp.sourceforge.net/impnotes.html#c-array-ptr
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-type
 "
-  (LET* ((NAME NAME)
-         (UFFI-TYPE (CLEAN-UFFI-TYPE `(:ARRAY-PTR ,TYPE)))
-         (FFI-TYPE  (CONVERT-FROM-UFFI-TYPE UFFI-TYPE :FFI)) )
-    `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-       (SETF (GETHASH ,NAME *FOREIGN-TYPES-HASH*) ,UFFI-TYPE)
-       (FFI:DEF-C-TYPE ,NAME ,FFI-TYPE)))
+  (let* ((name name)
+         (uffi-type (clean-uffi-type `(:array-ptr ,type)))
+         (ffi-type  (convert-from-uffi-type uffi-type :ffi)) )
+    `(eval-when (:compile-toplevel :load-toplevel :execute)
+       (setf (gethash ,name *foreign-types-hash*) ,uffi-type)
+       (ffi:def-c-type ,name ,ffi-type)))
   ) ;;DEF-ARRAY-POINTER



-(DEFMACRO DEF-UNION (NAME &REST FIELDS)
+(defmacro def-union (name &rest fields)
   "
 NAME:               A name of the new union type.
 FIELDS:             A list of fields of the union.
@@ -778,12 +774,12 @@ URL:                http://uffi.b9.com/manual/def-union.html
 URL:                http://clisp.sourceforge.net/impnotes.html#c-union
 URL:                http://clisp.sourceforge.net/impnotes.html#def-c-type
 "
-  (LET* ((NAME NAME)
-         (UFFI-TYPE (CLEAN-UFFI-TYPE `(:UNION ,NAME ,@FIELDS)))
-         (FFI-TYPE  (CONVERT-FROM-UFFI-TYPE UFFI-TYPE :FFI)) )
-    `(EVAL-WHEN (:COMPILE-TOPLEVEL :LOAD-TOPLEVEL :EXECUTE)
-       (SETF (GETHASH ,NAME *FOREIGN-TYPES-HASH*) ,UFFI-TYPE)
-       (FFI:DEF-C-TYPE ,NAME ,FFI-TYPE)))
+  (let* ((name name)
+         (uffi-type (clean-uffi-type `(:union ,name ,@fields)))
+         (ffi-type  (convert-from-uffi-type uffi-type :ffi)) )
+    `(eval-when (:compile-toplevel :load-toplevel :execute)
+       (setf (gethash ,name *foreign-types-hash*) ,uffi-type)
+       (ffi:def-c-type ,name ,ffi-type)))
   ) ;;DEF-UNION


@@ -793,23 +789,23 @@ URL:                http://clisp.sourceforge.net/impnotes.html#def-c-type
 ;;;;;;;;;;;;;;;;;


-(FFI:DEF-CALL-OUT MALLOC
-    (:NAME "malloc")
-  (:ARGUMENTS (SIZE FFI:UINT32 :IN))
-  (:RETURN-TYPE FFI:C-POINTER)
-  (:LANGUAGE :STDC)
+(ffi:def-call-out malloc
+    (:name "malloc")
+  (:arguments (size ffi:uint32 :in))
+  (:return-type ffi:c-pointer)
+  (:language :stdc)
   (:library "/lib/libc.so.6"))


-(FFI:DEF-CALL-OUT FREE
-    (:NAME "free")
-  (:ARGUMENTS (PTR FFI:C-POINTER :IN))
-  (:RETURN-TYPE NIL)
-  (:LANGUAGE :STDC)
+(ffi:def-call-out free
+    (:name "free")
+  (:arguments (ptr ffi:c-pointer :in))
+  (:return-type nil)
+  (:language :stdc)
   (:library "/lib/libc.so.6"))


-(DEFMACRO ALLOCATE-FOREIGN-OBJECT (TYPE &OPTIONAL (SIZE 1))
+(defmacro allocate-foreign-object (type &optional (size 1))
   "
 DO:                 Allocates an instance of a foreign object.
 TYPE:               The type of foreign object to allocate.
@@ -830,7 +826,7 @@ IMPLEMENTATION:
                          :count ,size)) ;;ALLOCATE-FOREIGN-OBJECT


-(DEFMACRO FREE-FOREIGN-OBJECT (PTR)
+(defmacro free-foreign-object (ptr)
   "
 DO:                 Frees the memory used by the allocation of a foreign
                     object.
@@ -843,7 +839,7 @@ IMPLEMENTATION:
   ) ;;FREE-FOREIGN-OBJECT


-(DEFMACRO WITH-FOREIGN-OBJECT ((VAR TYPE) &BODY BODY)
+(defmacro with-foreign-object ((var type) &body body)
   "
 DO:                 This function wraps the allocation, binding,
                     and destruction of a foreign object. On CMUCL and
@@ -857,14 +853,14 @@ RETURN:             The result of evaluating the body.
 URL:                http://uffi.b9.com/manual/with-foreign-object.html
 URL:
 "
-  `(LET ((,VAR (ALLOCATE-FOREIGN-OBJECT ,TYPE)))
-     (UNWIND-PROTECT
-          (PROGN ,@BODY)
-       (FREE-FOREIGN-OBJECT ,VAR)))
+  `(let ((,var (allocate-foreign-object ,type)))
+     (unwind-protect
+          (progn ,@body)
+       (free-foreign-object ,var)))
   ) ;;WITH-FOREIGN-OBJECT


-(DEFMACRO SIZE-OF-FOREIGN-TYPE (TYPE)
+(defmacro size-of-foreign-type (type)
   "
 FTYPE:              A foreign type specifier. This parameter is evaluated.
 RETURN:             The number of data bytes used by a foreign object type.
@@ -872,24 +868,24 @@ RETURN:             The number of data bytes used by a foreign object type.
 URL:                http://uffi.b9.com/manual/size-of-foreign-type.html
 URL:                http://clisp.sourceforge.net/impnotes.html#sizeof
 "
-  `(FFI:SIZEOF (CONVERT-FROM-UFFI-TYPE (CLEAN-UFFI-TYPE ,TYPE) :FFI))
+  `(ffi:sizeof (convert-from-uffi-type (clean-uffi-type ,type) :ffi))
   ) ;;SIZE-OF-FOREIGN-TYPE


-(DEFMACRO POINTER-ADDRESS (PTR)
+(defmacro pointer-address (ptr)
   "
 PTR:                A pointer to a foreign object.
 RETURN:             An integer representing the pointer's address.
 URL:                http://uffi.b9.com/manual/pointer-address.html
 URL:                http://clisp.sourceforge.net/impnotes.html#c-var-addr
 "
-  `(LET ((PTR ,PTR))
-     (DECLARE (TYPE 'FFI:FOREIGN-ADDRESS PTR))
-     (FFI::FOREIGN-ADDRESS-UNSIGNED PTR))
+  `(let ((ptr ,ptr))
+     (declare (type 'ffi:foreign-address ptr))
+     (ffi::foreign-address-unsigned ptr))
   ) ;;POINTER-ADDRESS


-(DEFMACRO DEREF-POINTER (PTR TYPE)
+(defmacro deref-pointer (ptr type)
   "
 PTR:                A pointer to a foreign object.
 TYPE:               A foreign type of the object being pointed to.
@@ -898,14 +894,14 @@ URL:                http://uffi.b9.com/manual/deref-pointer.html
 URL:                http://clisp.sourceforge.net/impnotes.html#deref
 NOTE:               This is an accessor and can be used with SETF .
 "
-  `(FFI:DEREF (FFI:CAST (ffi:foreign-value ,PTR)
-                        (CONVERT-FROM-UFFI-TYPE
-                         (CLEAN-UFFI-TYPE (LIST '* ,TYPE)) :FFI)
+  `(ffi:deref (ffi:cast (ffi:foreign-value ,ptr)
+                        (convert-from-uffi-type
+                         (clean-uffi-type (list '* ,type)) :ffi)
                         ))
   ) ;;DEREF-POINTER


-(DEFMACRO ENSURE-CHAR-CHARACTER (OBJECT)
+(defmacro ensure-char-character (object)
   "
 DO:                 Ensures that an object obtained by dereferencing
                     a :CHAR pointer is a character.
@@ -915,12 +911,12 @@ RETURN:             A character.
 URL:                http://uffi.b9.com/manual/ensure-char-character.html
 URL:
 "
-  `(LET ((OBJECT ,OBJECT))
-     (IF (CHARACTERP OBJECT) OBJECT (CODE-CHAR OBJECT)))
+  `(let ((object ,object))
+     (if (characterp object) object (code-char object)))
   ) ;;ENSURE-CHAR-CHARACTER


-(DEFMACRO ENSURE-CHAR-INTEGER (OBJECT)
+(defmacro ensure-char-integer (object)
   "
 DO:                 Ensures that an object obtained by dereferencing
                     a :CHAR pointer is an integer.
@@ -930,12 +926,12 @@ RETURN:             An integer.
 URL:                http://uffi.b9.com/manual/ensure-char-integer.html
 URL:
 "
-  `(LET ((OBJECT ,OBJECT))
-     (IF (CHARACTERP OBJECT) (CHAR-CODE OBJECT) OBJECT))
+  `(let ((object ,object))
+     (if (characterp object) (char-code object) object))
   ) ;;ENSURE-CHAR-INTEGER


-(DEFMACRO MAKE-NULL-POINTER (TYPE)
+(defmacro make-null-pointer (type)
   "
 DO:                 Creates a NULL pointer of a specified type.
 TYPE:               A type of object to which the pointer refers.
@@ -944,7 +940,7 @@ URL:                http://uffi.b9.com/manual/make-null-pointer.html
 URL:
 "
   (declare (ignore type))
-  (FFI::UNSIGNED-FOREIGN-ADDRESS 0)
+  (ffi::unsigned-foreign-address 0)
   ;;  `(FFI:CAST (ffi:foreign-value (FFI::UNSIGNED-FOREIGN-ADDRESS 0))
   ;;              (CONVERT-FROM-UFFI-TYPE
   ;;               (CLEAN-UFFI-TYPE (LIST '* ,TYPE)) :FFI))
@@ -952,7 +948,7 @@ URL:



-(DEFMACRO NULL-POINTER-P (PTR)
+(defmacro null-pointer-p (ptr)
   "
 DO:                 Tests if a pointer is has a NULL value.
 PTR:                A foreign object pointer.
@@ -960,12 +956,12 @@ RETURN:             Whether ptr is NULL.
 URL:                http://uffi.b9.com/manual/null-pointer-p.html
 URL:                http://clisp.sourceforge.net/impnotes.html#fa-null
 "
-  `(FFI:FOREIGN-ADDRESS-NULL ,PTR)
+  `(ffi:foreign-address-null ,ptr)
   ) ;;NULL-POINTER-P


-(DEFCONSTANT +NULL-CSTRING-POINTER+
-  (FFI::UNSIGNED-FOREIGN-ADDRESS 0)
+(defconstant +null-cstring-pointer+
+  (ffi::unsigned-foreign-address 0)
   ;;(FFI:CAST (ffi:foreign-value (FFI::UNSIGNED-FOREIGN-ADDRESS 0))
   ;;          (CONVERT-FROM-UFFI-TYPE (CLEAN-UFFI-TYPE :CSTRING) :FFI))
   "A NULL cstring pointer.
@@ -980,7 +976,7 @@ URL:                http://uffi.b9.com/manual/null-cstring-pointer.html
 ;;;;;;;;;;;;;;;;


-(DEFMACRO CONVERT-FROM-CSTRING (CSTRING)
+(defmacro convert-from-cstring (cstring)
   "
 CSTRING:            A cstring.
 RETURN:             A Lisp string.
@@ -990,12 +986,12 @@ DO:                 Converts a Lisp string to a cstring.
                     cstring.
 URL:                http://uffi.b9.com/manual/convert-from-cstring.html
 "
-  `,CSTRING
+  `,cstring
   ) ;;CONVERT-FROM-CSTRING



-(DEFMACRO CONVERT-TO-CSTRING (STRING)
+(defmacro convert-to-cstring (string)
   "
 STRING:             A Lisp string.
 RETURN:             A cstring.
@@ -1003,11 +999,11 @@ DO:                 Converts a Lisp string to a cstring.
                     The cstring should be freed with free-cstring.
 URL:                http://uffi.b9.com/manual/convert-to-cstring.html
 "
-  `,STRING
+  `,string
   ) ;;CONVERT-TO-CSTRING


-(DEFMACRO FREE-CSTRING (CSTRING)
+(defmacro free-cstring (cstring)
   "
 CSTRING:            A cstring.
 DO:                 Frees any memory possibly allocated by convert-to-cstring.
@@ -1019,7 +1015,7 @@ DO:                 Frees any memory possibly allocated by convert-to-cstring.
   ) ;;FREE-CSTRING


-(DEFMACRO WITH-CSTRING ((CSTRING STRING) &BODY BODY)
+(defmacro with-cstring ((cstring string) &body body)
   "
 CSTRING:            A symbol naming the cstring to be created.
 STRING:             A Lisp string that will be translated to a cstring.
@@ -1032,8 +1028,8 @@ URL:                http://uffi.b9.com/manual/with-cstring.html
   ;;    (unwind-protect
   ;;        (progn ,@body)
   ;;      (free-cstring ,cstring)))
-  `(LET ((,CSTRING ,STRING))
-     ,@BODY)
+  `(let ((,cstring ,string))
+     ,@body)
   ) ;;WITH-CSTRING


@@ -1043,8 +1039,8 @@ URL:                http://uffi.b9.com/manual/with-cstring.html
        len))) ;;foreign-string-length


-(DEFUN CONVERT-FROM-FOREIGN-STRING (FOREIGN-STRING
-                                    &KEY LENGTH (NULL-TERMINATED-P T))
+(defun convert-from-foreign-string (foreign-string
+                                    &key length (null-terminated-p t))
   "
 DO:                 Builds a Lisp string from a foreign string.
                     Can translate ASCII and binary strings.
@@ -1068,11 +1064,11 @@ URL:        http://clisp.sourceforge.net/impnotes.html#encoding
     (dotimes (i (length byte-vector))
       (setf (aref byte-vector i)
             (ffi:element (ffi:foreign-value foreign-string) i)))
-    (EXT:CONVERT-STRING-FROM-BYTES byte-vector CUSTOM:*FOREIGN-ENCODING*)
+    (ext:convert-string-from-bytes byte-vector custom:*foreign-encoding*)
     )) ;;CONVERT-FROM-FOREIGN-STRING


-(DEFUN CONVERT-TO-FOREIGN-STRING (STRING)
+(defun convert-to-foreign-string (string)
   "
 STRING:             A Lisp string.
 RETURN:             A foreign string.
@@ -1081,8 +1077,8 @@ DO:                 Converts a Lisp string to a foreign string.
 URL:        http://uffi.b9.com/manual/convert-to-foreign-string.html
 "
   (let* ((byte-vector
-          (EXT:CONVERT-STRING-TO-BYTES string CUSTOM:*FOREIGN-ENCODING*))
-         (result (ALLOCATE-FOREIGN-STRING (1+ (length byte-vector))))
+          (ext:convert-string-to-bytes string custom:*foreign-encoding*))
+         (result (allocate-foreign-string (1+ (length byte-vector))))
          (foreign-type `(ffi:c-array
                          ffi:uchar ,(list (1+ (length byte-vector))))))
     (declare (ignore foreign-type))     ; TODO!
@@ -1093,7 +1089,7 @@ URL:        http://uffi.b9.com/manual/convert-to-foreign-string.html
     result)) ;;CONVERT-TO-FOREIGN-STRING


-(DEFUN ALLOCATE-FOREIGN-STRING (SIZE &KEY (UNSIGNED T))
+(defun allocate-foreign-string (size &key (unsigned t))
   "
 SIZE:               The size of the space to be allocated in bytes.
 UNSIGNED:           A boolean flag with a default value of T.
@@ -1103,7 +1099,7 @@ DO:                 Allocates space for a foreign string.
                     Memory should be freed with free-foreign-object.
 URL:            http://uffi.b9.com/manual/allocate-foreign-string.html
 "
-  (ALLOCATE-FOREIGN-OBJECT (if unsigned ':unsigned-char ':char) size)
+  (allocate-foreign-object (if unsigned ':unsigned-char ':char) size)
   ) ;;ALLOCATE-FOREIGN-STRING


@@ -1112,11 +1108,11 @@ URL:            http://uffi.b9.com/manual/allocate-foreign-string.html
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


-(DEFPARAMETER *MODULES-TO-LIBRARY-MAP* (MAKE-HASH-TABLE :TEST (FUNCTION EQUAL))
+(defparameter *modules-to-library-map* (make-hash-table :test (function equal))
   "Maps module names to library paths.")


-(DEFMACRO DEF-FUNCTION (NAME ARGS &KEY MODULE RETURNING)
+(defmacro def-function (name args &key module returning)
   "
 DO:                 Declares a foreign function.
 NAME:               A string or list specifying the function name.
@@ -1145,27 +1141,27 @@ NOTE:               All Common-Lisp implementations are 'case-insensitive'.
                               (substitute (character "-") (character "_") name))))
         (setq c-name (first name)
               l-name (second name)))
-    `(FFI:DEF-CALL-OUT
+    `(ffi:def-call-out
          ,l-name
          (:name ,c-name)
        ,@(when args
                `((:arguments
                   ,@(mapcar (lambda (arg)
                               `(,(first arg)
-                                 ,(CONVERT-FROM-UFFI-TYPE
-                                   (clean-uffi-type (second arg)) :FFI)
+                                 ,(convert-from-uffi-type
+                                   (clean-uffi-type (second arg)) :ffi)
                                  :in))
                             args))))
        ,@(when returning
-               `((:return-type ,(CONVERT-FROM-UFFI-TYPE
-                                 (clean-uffi-type returning) :FFI))))
+               `((:return-type ,(convert-from-uffi-type
+                                 (clean-uffi-type returning) :ffi))))
        ,@(when module
-               (let ((library (gethash module *MODULES-TO-LIBRARY-MAP*)))
+               (let ((library (gethash module *modules-to-library-map*)))
                  `((:library  ,(or library module)))))
-       (:LANGUAGE :STDC)))) ;;DEF-FUNCTION
+       (:language :stdc)))) ;;DEF-FUNCTION


-(DEFUN LOAD-FOREIGN-LIBRARY (FILENAME &KEY MODULE SUPPORTING-LIBRARIES)
+(defun load-foreign-library (filename &key module supporting-libraries)
   "
 DO:                 Loads a foreign library. Applies a module name
                     to functions within the library. Ensures that
@@ -1188,39 +1184,39 @@ IMPLEMENTATION:     Loading the library is defered to the first function call.
                     the FILENAME.
 TODO:               Should we explicitely load the SUPPORTING-LIBRARIES too?
 "
-  (declare (ignore SUPPORTING-LIBRARIES))
+  (declare (ignore supporting-libraries))
   (when module
-    (setf (gethash module *MODULES-TO-LIBRARY-MAP*) (namestring filename)))
+    (setf (gethash module *modules-to-library-map*) (namestring filename)))
   t) ;;LOAD-FOREIGN-LIBRARY


-(DEFUN SPLIT-STRING (STRING &OPTIONAL (SEPARATORS " "))
+(defun split-string (string &optional (separators " "))
   "
 NOTE:   current implementation only accepts as separators
         a string containing literal characters.
 "
-  (UNLESS (SIMPLE-STRING-P STRING)     (SETQ STRING     (COPY-SEQ STRING)))
-  (UNLESS (SIMPLE-STRING-P SEPARATORS) (SETQ SEPARATORS (COPY-SEQ SEPARATORS)))
-  (LET ((CHUNKS  '())
-        (POSITION 0)
-        (NEXTPOS  0)
-        (STRLEN   (LENGTH STRING)) )
-    (DECLARE (TYPE SIMPLE-STRING STRING SEPARATORS))
-    (LOOP WHILE (< POSITION STRLEN)
-       DO
-       (LOOP WHILE (AND (< NEXTPOS STRLEN)
-                        (NOT (POSITION (CHAR STRING NEXTPOS) SEPARATORS)))
-          DO (SETQ NEXTPOS (1+ NEXTPOS))
+  (unless (simple-string-p string)     (setq string     (copy-seq string)))
+  (unless (simple-string-p separators) (setq separators (copy-seq separators)))
+  (let ((chunks  '())
+        (position 0)
+        (nextpos  0)
+        (strlen   (length string)) )
+    (declare (type simple-string string separators))
+    (loop while (< position strlen)
+       do
+       (loop while (and (< nextpos strlen)
+                        (not (position (char string nextpos) separators)))
+          do (setq nextpos (1+ nextpos))
           ) ;;loop
-       (PUSH (SUBSEQ STRING POSITION NEXTPOS) CHUNKS)
-       (SETQ POSITION (1+ NEXTPOS))
-       (SETQ NEXTPOS  POSITION)
+       (push (subseq string position nextpos) chunks)
+       (setq position (1+ nextpos))
+       (setq nextpos  position)
        ) ;;loop
-    (NREVERSE CHUNKS)
+    (nreverse chunks)
     )) ;;SPLIT-STRING


-(DEFUN FIND-FOREIGN-LIBRARY (NAMES DIRECTORIES &KEY DRIVE-LETTERS TYPES VERBOSE)
+(defun find-foreign-library (names directories &key drive-letters types verbose)
   "
 NAMES:              A string or list of strings containing the base name
                     of the library file.
diff --git a/clisp/xterm.lisp b/clisp/xterm.lisp
index 422041a..82753fe 100644
--- a/clisp/xterm.lisp
+++ b/clisp/xterm.lisp
@@ -14,31 +14,29 @@
 ;;;;    2005-01-06 <PJB> Created.
 ;;;;BUGS
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal J. Bourguignon 2005 - 2005
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;****************************************************************************

 (in-package "COMMON-LISP-USER")
-(declaim (declaration ALSO-USE-PACKAGES))
-(declaim (ALSO-USE-PACKAGES "EXT" "COM.INFORMATIMAGO.CLISP.SUSV3"))
+(declaim (declaration also-use-packages))
+(declaim (also-use-packages "EXT" "COM.INFORMATIMAGO.CLISP.SUSV3"))
 (defpackage "COM.INFORMATIMAGO.CLISP.XTERM"
-  (:DOCUMENTATION "
+  (:documentation "
     This package exports functions to open xterm streams.

     Copyright Pascal J. Bourguignon 2005 - 2005
@@ -50,7 +48,7 @@
         "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST")
   (:shadowing-import-from "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.UTILITY" "WITH-GENSYMS")
   (:shadowing-import-from "COM.INFORMATIMAGO.COMMON-LISP.CESARUM.LIST" "PROPER-LIST-P")
-  (:EXPORT
+  (:export
    "*XTERM-FONT*" "MAKE-XTERM-IO-STREAM" "SERVER-REPL"
    "XTERM-LISTENER" "FORK-XTERM-LISTENER"))
 (in-package "COM.INFORMATIMAGO.CLISP.XTERM")
@@ -163,9 +161,9 @@
                                      :external-format external-format)))
     (when xterm
       (unwind-protect
-           (let ((*QUERY-IO*        xterm)
-                 (*STANDARD-INPUT*  xterm)
-                 (*STANDARD-OUTPUT* xterm)
+           (let ((*query-io*        xterm)
+                 (*standard-input*  xterm)
+                 (*standard-output* xterm)
                  #||
                  (*ERROR-OUTPUT*    xterm)
                  (*DEBUG-IO*        xterm)
@@ -176,7 +174,7 @@


 (defun fork-xterm-listener (&key (display ":0.0"))
-  (when (zerop (COM.INFORMATIMAGO.CLISP.SUSV3:fork))
+  (when (zerop (com.informatimago.clisp.susv3:fork))
     (xterm-listener :display display)
     (ext:exit 0)))

diff --git a/clmisc/asdf-system-tarball-location.lisp b/clmisc/asdf-system-tarball-location.lisp
index e7d2b4f..c32cca9 100644
--- a/clmisc/asdf-system-tarball-location.lisp
+++ b/clmisc/asdf-system-tarball-location.lisp
@@ -55,24 +55,22 @@
 ;;;;    We should keep the last-modified date from the header.
 ;;;;
 ;;;;LEGAL
-;;;;    GPL
+;;;;    AGPL3
 ;;;;
 ;;;;    Copyright Pascal Bourguignon 2006 - 2006
 ;;;;
-;;;;    This program is free software; you can redistribute it and/or
-;;;;    modify it under the terms of the GNU General Public License
-;;;;    as published by the Free Software Foundation; either version
-;;;;    2 of the License, or (at your option) any later version.
+;;;;    This program is free software: you can redistribute it and/or modify
+;;;;    it under the terms of the GNU Affero General Public License as published by
+;;;;    the Free Software Foundation, either version 3 of the License, or
+;;;;    (at your option) any later version.
 ;;;;
-;;;;    This program is distributed in the hope that it will be
-;;;;    useful, but WITHOUT ANY WARRANTY; without even the implied
-;;;;    warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
-;;;;    PURPOSE.  See the GNU General Public License for more details.
+;;;;    This program is distributed in the hope that it will be useful,
+;;;;    but WITHOUT ANY WARRANTY; without even the implied warranty of
+;;;;    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;;;    GNU Affero General Public License for more details.
 ;;;;
-;;;;    You should have received a copy of the GNU General Public
-;;;;    License along with this program; if not, write to the Free
-;;;;    Software Foundation, Inc., 59 Temple Place, Suite 330,
-;;;;    Boston, MA 02111-1307 USA
+;;;;    You should have received a copy of the GNU Affero General Public License
+;;;;    along with this program.  If not, see <http://www.gnu.org/licenses/>.
 ;;;;***************************************************************************

 (unless (find-package :asdf-install)
@@ -85,12 +83,12 @@

 (in-package :asdf)
 ;; (cl:unless (cl:find-symbol "EXPORT") (cl:use-package :cl))
-(export '(SYSTEM-VERSION
+(export '(system-version
           ;; low level but usefull stuff:
-          PARSE-NAME-VERSION))
+          parse-name-version))


-(DEFUN PARSE-NAME-VERSION (NAME)
+(defun parse-name-version (name)
   "
 DO:      Parse the NAME with the regexp: \".*[-_]\([0-9]+\(\.[0-9]+\)+\)$\"
 RETURN:  a list containing the version numbers;
@@ -99,83 +97,83 @@ RETURN:  a list containing the version numbers;
          When a version cannot be scanned, the first two results are NIL,
          and the last is the suffix string down to the scanning error.
 "
-  (MACROLET ((COLLECT ()
-               `(HANDLER-CASE           ; check that at least on digit
+  (macrolet ((collect ()
+               `(handler-case           ; check that at least on digit
                                         ; is present between dots.
-                    (PROGN
-                      (PUSH (PARSE-INTEGER NAME :START (1+ P) :END E
-                                           :JUNK-ALLOWED NIL) N)
-                      (SETF E P))
-                  (PARSE-ERROR (ERR)
-                    (RETURN-FROM PARSE-NAME-VERSION
-                      (VALUES NIL NIL (SUBSEQ NAME P)))))))
-    (LOOP
-       :WITH N = '()
-       :WITH E =  (LENGTH NAME)
-       :FOR P :FROM (1- E) :DOWNTO 0
-       :FOR S = P
-       :FOR CH = (AREF NAME P)
-       :WHILE (OR (DIGIT-CHAR-P CH) (CHAR= #\. CH))
-       :DO (WHEN (CHAR= #\. CH) (COLLECT))
-       :FINALLY (RETURN (IF (OR (CHAR= #\_ CH) (CHAR= #\- CH))
-                            (PROGN (COLLECT)
-                                   (VALUES N (SUBSEQ NAME 0 S) (SUBSEQ NAME S)))
-                            (VALUES NIL NIL (SUBSEQ NAME S)))))))
-
-(DEFUN TEST-PARSE-VERSION ()
-  (DOLIST (TEST '(("abc-1.2.3"   (1 2 3) "abc" "-1.2.3")
+                    (progn
+                      (push (parse-integer name :start (1+ p) :end e
+                                           :junk-allowed nil) n)
+                      (setf e p))
+                  (parse-error (err)
+                    (return-from parse-name-version
+                      (values nil nil (subseq name p)))))))
+    (loop
+       :with n = '()
+       :with e =  (length name)
+       :for p :from (1- e) :downto 0
+       :for s = p
+       :for ch = (aref name p)
+       :while (or (digit-char-p ch) (char= #\. ch))
+       :do (when (char= #\. ch) (collect))
+       :finally (return (if (or (char= #\_ ch) (char= #\- ch))
+                            (progn (collect)
+                                   (values n (subseq name 0 s) (subseq name s)))
+                            (values nil nil (subseq name s)))))))
+
+(defun test-parse-version ()
+  (dolist (test '(("abc-1.2.3"   (1 2 3) "abc" "-1.2.3")
                   ("abc-123"     (123)   "abc" "-123")
                   ("-123"        (123)   ""    "-123")
                   ("abc_1.2.3"   (1 2 3) "abc" "_1.2.3")
                   ("abc_123"     (123)   "abc" "_123")
                   ("_123"        (123)   ""    "_123")
-                  ("abc_1.2.3p3" NIL     NIL   "p3")
-                  ("abc-1..3"    NIL     NIL   "..3")
-                  ("1.2.3"       NIL     NIL   "1.2.3")
-                  ("123"         NIL     NIL   "123")
+                  ("abc_1.2.3p3" nil     nil   "p3")
+                  ("abc-1..3"    nil     nil   "..3")
+                  ("1.2.3"       nil     nil   "1.2.3")
+                  ("123"         nil     nil   "123")
                   ))
-    (ASSERT (EQUALP (MULTIPLE-VALUE-LIST (PARSE-NAME-VERSION (FIRST TEST)))
-                    (REST TEST)))))
+    (assert (equalp (multiple-value-list (parse-name-version (first test)))
+                    (rest test)))))

-(DEFUN LASTCAR (X) (CAR (LAST X)))
+(defun lastcar (x) (car (last x)))

-(DEFUN SYSTEM-VERSION (SYSTEM-DESIGNATOR)
+(defun system-version (system-designator)
   "
 RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
          If the system doesn't have a version slot bound, we look
          at the pathname and extract the version from the directory name.
          If it has both and they don't match, a warning is issued.
 "
-  (LET* ((SYSTEM  (FIND-SYSTEM SYSTEM-DESIGNATOR))
-         (VERSION-IN-DIR
-          (MULTIPLE-VALUE-LIST
-           (PARSE-NAME-VERSION
-            (LASTCAR (PATHNAME-DIRECTORY
-                      (TRUENAME (SYSTEM-DEFINITION-PATHNAME SYSTEM)))))))
-         (VERSION-IN-ASD
-          (AND (SLOT-BOUNDP  SYSTEM 'VERSION)
-               (MULTIPLE-VALUE-LIST
-                (PARSE-NAME-VERSION
-                 (CONCATENATE 'STRING "-"
-                              (SLOT-VALUE SYSTEM 'VERSION)))))))
+  (let* ((system  (find-system system-designator))
+         (version-in-dir
+          (multiple-value-list
+           (parse-name-version
+            (lastcar (pathname-directory
+                      (truename (system-definition-pathname system)))))))
+         (version-in-asd
+          (and (slot-boundp  system 'version)
+               (multiple-value-list
+                (parse-name-version
+                 (concatenate 'string "-"
+                              (slot-value system 'version)))))))
     ;;     d   a   d=a
     ;;     nil nil t    no version
     ;;     v1  nil nil  v1
     ;;     nil v1  nil  v1
     ;;     v1  v1  t    v1
     ;;     v1  v2  nil  v1 warning
-    (COND ((AND (NULL (FIRST VERSION-IN-DIR))  (NULL (FIRST VERSION-IN-ASD)))
-           NIL)
-          ((AND (FIRST VERSION-IN-DIR) (FIRST VERSION-IN-ASD))
-           (UNLESS (EQUAL (FIRST VERSION-IN-DIR) (FIRST VERSION-IN-ASD))
-             (WARN "Version of ASD system ~A differs in ASD file (~A) from ~
+    (cond ((and (null (first version-in-dir))  (null (first version-in-asd)))
+           nil)
+          ((and (first version-in-dir) (first version-in-asd))
+           (unless (equal (first version-in-dir) (first version-in-asd))
+             (warn "Version of ASD system ~A differs in ASD file (~A) from ~
                     directory name (~A)"
-                   SYSTEM-DESIGNATOR
-                   (SUBSEQ (THIRD VERSION-IN-ASD) 1)
-                   (SUBSEQ (THIRD VERSION-IN-DIR) 1)))
-           (SUBSEQ (THIRD VERSION-IN-DIR) 1))
-          ((FIRST VERSION-IN-DIR) (SUBSEQ (THIRD VERSION-IN-DIR) 1))
-          (T                      (SUBSEQ (THIRD VERSION-IN-ASD) 1)))))
+                   system-designator
+                   (subseq (third version-in-asd) 1)
+                   (subseq (third version-in-dir) 1)))
+           (subseq (third version-in-dir) 1))
+          ((first version-in-dir) (subseq (third version-in-dir) 1))
+          (t                      (subseq (third version-in-asd) 1)))))


 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -284,15 +282,15 @@ RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
           (setf stream (make-stream-from-url (or *proxy* url)))
           (format stream
             "GET ~A HTTP/1.0~C~CHost: ~A~C~CCookie: CCLAN-SITE=~A~C~C"
-            (request-uri url) #\Return #\Linefeed
-            host #\Return #\Linefeed
-            *cclan-mirror* #\Return #\Linefeed)
+            (request-uri url) #\return #\linefeed
+            host #\return #\linefeed
+            *cclan-mirror* #\return #\linefeed)
           (when (and *proxy-passwd* *proxy-user*)
             (format stream "Proxy-Authorization: Basic ~A~C~C"
                     (base64-encode
                      (format nil "~A:~A" *proxy-user* *proxy-passwd*))
-                    #\Return #\Linefeed))
-          (format stream "~C~C" #\Return #\Linefeed)
+                    #\return #\linefeed))
+          (format stream "~C~C" #\return #\linefeed)
           (force-output stream)))
     (unless stream (error 'download-error :url url :response 404))
     (flet (#-:digitool
@@ -345,11 +343,11 @@ RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
                   (case byte
                     ((nil)
                      (return))
-                    ((#.(char-code #\Return)
-                        #.(char-code #\Linefeed))
+                    ((#.(char-code #\return)
+                        #.(char-code #\linefeed))
                      (case (setf byte (funcall reader arg))
-                       ((nil #.(char-code #\Return)
-                             #.(char-code #\Linefeed)))
+                       ((nil #.(char-code #\return)
+                             #.(char-code #\linefeed)))
                        (t (ccl:stream-untyi stream byte)))
                      (return))
                     (t
@@ -358,7 +356,7 @@ RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
                  line))))
       (list
        (let* ((l (read-header-line))
-              (space (position #\Space l)))
+              (space (position #\space l)))
          (parse-integer l :start (1+ space) :junk-allowed t))
        (loop for line = (read-header-line)
           until (or (null line)
@@ -367,7 +365,7 @@ RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
           collect
           (let ((colon (position #\: line)))
             (cons (intern (string-upcase (subseq line 0 colon)) :keyword)
-                  (string-trim (list #\Space (code-char 13))
+                  (string-trim (list #\space (code-char 13))
                                (subseq line (1+ colon))))))
        stream))))

@@ -391,7 +389,7 @@ RETURN:  A version for the system designated by SYSTEM-DESIGNATOR.
       (find-system-tarball-location package-name-or-url)
     (when (>= response 400)
       (error 'download-error :url url :response response))
-    (let ((length (parse-integer (or (cdr (assoc :CONTENT-LENGTH headers)) "")
+    (let ((length (parse-integer (or (cdr (assoc :content-length headers)) "")
                                  :junk-allowed t)))
       (when verbose
         (format t "Downloading ~:[some unknown number of ~;~:*~A~] ~
@@ -513,10 +511,10 @@ RETURN: A byte vector containing the contents of the resource
              (unless (member response '(301 302))
                (return-from got (list response headers stream)))
              (close stream)
-             (setf url (cdr (assoc :LOCATION headers))))))
+             (setf url (cdr (assoc :location headers))))))
     (when (>= response 400)
       (error 'download-error :url url :response response))
-    (let ((length (parse-integer (or (cdr (assoc :CONTENT-LENGTH headers)) "")
+    (let ((length (parse-integer (or (cdr (assoc :content-length headers)) "")
                                  :junk-allowed t)))
       (when verbose
         (format t "~&;;; Downloading ~A bytes~%;;;        from ~A~%"
@@ -569,7 +567,7 @@ RETURN: A list of system names found on cliki.
           (collect-nodes-tav
            (collect-nodes-tav
             (html-attributes
-             (PARSE-HTML-STRING
+             (parse-html-string
               (let ((data (fetch-url *asdf-system-list-url* :verbose verbose)))
                 (if (stringp data)
                     data
@@ -602,7 +600,7 @@ RETURN:   url ; headers ; stream
            (when stream (close stream))
            (unless (member response '(301 302))
              (return-from got (values url response headers)))
-           (setf url (cdr (assoc :LOCATION headers))))))
+           (setf url (cdr (assoc :location headers))))))



@@ -751,7 +749,7 @@ PACKAGE-NAME-OR-URL:  Either a http:// url,
                (unless (member response '(301 302))
                  (return-from got (values response headers stream url)))
                (close stream)
-               (setf url (cdr (assoc :LOCATION headers)))))))))
+               (setf url (cdr (assoc :location headers)))))))))


 (defun prepare-informations (pattern informations)
@@ -770,9 +768,9 @@ PACKAGE-NAME-OR-URL:  Either a http:// url,
           (if system
               (list
                (namestring
-                (truename (asdf:component-relative-PATHNAME system)))
+                (truename (asdf:component-relative-pathname system)))
                (namestring
-                (truename (asdf:SYSTEM-DEFINITION-PATHNAME system)))
+                (truename (asdf:system-definition-pathname system)))
                (or (asdf:system-version system)
                    "Unknown")
                (or (ignore-errors (asdf:system-author system))
@@ -949,7 +947,7 @@ RETURN: The date as a universal time.
   (print date)
   (destructuring-bind (dow day month year hour minute second zone)
       (split-sequence:split-sequence-if (lambda (x) (position x " ,:")) date
-                                        :REMOVE-EMPTY-SUBSEQS t)
+                                        :remove-empty-subseqs t)
     (declare (ignore dow zone))
     (encode-universal-time
      (parse-integer second)
@@ -967,14 +965,14 @@ RETURN: The date as a universal time.
   (let ((temp-tarball (merge-pathnames
                        (make-pathname :name "TEMP" :type "TGZ" :version nil
                                       :case :common
-                                      :defaults *ASDF-SYSTEM-CACHE-DIRECTORY*)
-                       *ASDF-SYSTEM-CACHE-DIRECTORY* nil))
+                                      :defaults *asdf-system-cache-directory*)
+                       *asdf-system-cache-directory* nil))
         (temp-dir     (merge-pathnames
                        (make-pathname :directory '(:relative "TEMP")
                                       :name nil :type nil :version nil
                                       :case :common
-                                      :defaults *ASDF-SYSTEM-CACHE-DIRECTORY*)
-                       *ASDF-SYSTEM-CACHE-DIRECTORY* nil)))
+                                      :defaults *asdf-system-cache-directory*)
+                       *asdf-system-cache-directo