Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /impnotes/modules.html [000000] .. [458129] Maximize Restore

  Switch to side-by-side view

--- a
+++ b/impnotes/modules.html
@@ -0,0 +1,5531 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
+<HTML
+><HEAD
+><TITLE
+>Extensions-2.2. External Modules</TITLE
+><META
+NAME="GENERATOR"
+CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
+"><LINK
+REV="MADE"
+HREF="mailto:clisp-list@sf.net"><LINK
+REL="HOME"
+TITLE="Implementation Notes for GNU CLISP."
+HREF="impnotes-top.html"><LINK
+REL="UP"
+TITLE="Extensions-2: Platform specific Extensions"
+HREF="platform.html"><LINK
+REL="PREVIOUS"
+TITLE="Extensions-2: Platform specific Extensions"
+HREF="platform.html"><LINK
+REL="NEXT"
+TITLE="Extensions-2.3. The Foreign Function Call Facility"
+HREF="dffi.html"><LINK
+REL="STYLESHEET"
+TYPE="text/css"
+HREF="impnotes.css"></HEAD
+><BODY
+CLASS="section"
+BGCOLOR="#FFFFFF"
+TEXT="#000000"
+LINK="#0000FF"
+VLINK="#840084"
+ALINK="#0000FF"
+><DIV
+CLASS="NAVHEADER"
+><TABLE
+SUMMARY="Header navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TH
+COLSPAN="3"
+ALIGN="center"
+>Implementation Notes for <A
+HREF="http://www.gnu.org"
+TARGET="_top"
+>GNU</A
+> <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>.: These notes document <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> version 2.31.</TH
+></TR
+><TR
+><TD
+WIDTH="10%"
+ALIGN="left"
+VALIGN="bottom"
+><A
+HREF="platform.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="80%"
+ALIGN="center"
+VALIGN="bottom"
+>Chapter 30. Extensions-2: Platform specific Extensions</TD
+><TD
+WIDTH="10%"
+ALIGN="right"
+VALIGN="bottom"
+><A
+HREF="dffi.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+></TABLE
+><HR
+ALIGN="LEFT"
+WIDTH="100%"></DIV
+><DIV
+CLASS="section"
+><H1
+CLASS="section"
+><A
+NAME="modules"
+></A
+>30.2. Extensions-2.2. External Modules</H1
+><FONT
+COLOR="RED"
+>Platform dependent: <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> and <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> platforms only.</FONT
+><DIV
+CLASS="note"
+><A
+NAME="mod-win32"
+></A
+><P
+></P
+><TABLE
+CLASS="note"
+WIDTH="100%"
+BORDER="0"
+><TR
+><TD
+WIDTH="25"
+ALIGN="CENTER"
+VALIGN="TOP"
+><IMG
+SRC="/usr/share/sgml/docbook/dsssl-stylesheets/images/note.gif"
+HSPACE="5"
+ALT="Note"></TD
+><TH
+ALIGN="LEFT"
+VALIGN="CENTER"
+><B
+>Modules on <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+>.</B
+></TH
+></TR
+><TR
+><TD
+>&nbsp;</TD
+><TD
+ALIGN="LEFT"
+VALIGN="TOP"
+><P
+>Everything described in the section will work verbatim on <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+>
+  when using <A
+HREF="http://cygwin.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Cygwin</B
+></A
+> or <A
+HREF="http://www.mingw.org/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>MinGW</B
+></A
+>, <I
+CLASS="emphasis"
+>except</I
+> for one
+  thing - you will need to replace the <TT
+CLASS="filename"
+>run</TT
+>
+  extension in <TT
+CLASS="filename"
+>lisp.run</TT
+> with the <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> executable
+  extension <TT
+CLASS="filename"
+>exe</TT
+>.</P
+><P
+>For historical reasons, all examples appear to assume <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> and
+  use the <TT
+CLASS="filename"
+>run</TT
+> file type (<SPAN
+CLASS="QUOTE"
+>"extension"</SPAN
+>)
+  for the <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> run-time.
+  This does <I
+CLASS="emphasis"
+>not</I
+> mean that they will not work on <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+>.</P
+></TD
+></TR
+></TABLE
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="mod-overview"
+></A
+>30.2.1. Overview</H2
+><P
+ALIGN="justify"
+><A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> has a facility for adding external modules (written in
+ <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+>, for example).  It is invoked through
+ <B
+CLASS="command"
+>clisp-link</B
+>.</P
+><P
+ALIGN="justify"
+>A <STRONG
+CLASS="FIRST"
+><I
+CLASS="firstterm"
+>module</I
+></STRONG
+> is a
+ piece of external code which defines extra Lisp objects, symbols and
+ functions.  A module name must consist of the characters
+ <TT
+CLASS="filename"
+>A</TT
+>-<TT
+CLASS="filename"
+>Z</TT
+>,
+ <TT
+CLASS="filename"
+>a</TT
+>-<TT
+CLASS="filename"
+>z</TT
+>, <TT
+CLASS="filename"
+>_</TT
+>,
+ <TT
+CLASS="filename"
+>0</TT
+>-<TT
+CLASS="filename"
+>9</TT
+>.
+ The module name <SPAN
+CLASS="QUOTE"
+>"clisp"</SPAN
+> is reserved.
+ Normally a module name is derived from the corresponding file name.</P
+><P
+ALIGN="justify"
+><B
+CLASS="command"
+>clisp-link</B
+> needs a directory containing:
+<P
+></P
+><UL
+><LI
+><P
+ALIGN="justify"
+><TT
+CLASS="filename"
+>modules.d</TT
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+><TT
+CLASS="filename"
+>modules.c</TT
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+><TT
+CLASS="filename"
+>clisp.h</TT
+></P
+></LI
+></UL
+>
+<B
+CLASS="command"
+>clisp-link</B
+> expects to find these files in a
+subdirectory <TT
+CLASS="filename"
+>linkkit/</TT
+> of the current directory.
+This can be overridden by the <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap08.html"
+TARGET="_top"
+>environment variable</A
+> <TT
+CLASS="envar"
+>CLISP_LINKKIT</TT
+>.</P
+><P
+ALIGN="justify"
+><B
+CLASS="command"
+>clisp-link</B
+> operates on <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> <A
+HREF="modules.html#linkset"
+>linking set</A
+>s and
+ on <A
+HREF="modules.html#modset"
+>module set</A
+>s.</P
+><DIV
+CLASS="formalpara"
+><P
+><A
+NAME="linkset"
+></A
+><B
+><A
+HREF="modules.html#linkset"
+>linking set</A
+>. </B
+>A <STRONG
+CLASS="FIRST"
+><I
+CLASS="firstterm"
+><A
+HREF="modules.html#linkset"
+>linking set</A
+></I
+></STRONG
+>
+   is a directory containing:
+<P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="filename"
+>makevars</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>some <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/utilities/sh.html"
+TARGET="_top"
+><B
+CLASS="command"
+>/bin/sh</B
+></A
+> commands, setting the variables
+<P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="envar"
+>CC</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> compiler
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>CFLAGS</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>flags for the <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> compiler, when compiling
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>CLFLAGS</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>flags for the <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> compiler, when linking
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>LIBS</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>libraries to use when linking
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>X_LIBS</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>additional <A
+HREF="http://www.x.org/"
+TARGET="_top"
+>X Window System</A
+> libraries to use
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>RANLIB</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the ranlib command
+   </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>FILES</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the list of files needed when linking
+   </P
+></DD
+></DL
+></DIV
+></P
+></DD
+><DT
+><TT
+CLASS="filename"
+>modules.h</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the list of modules contained in this <A
+HREF="modules.html#linkset"
+>linking set</A
+>
+  </P
+></DD
+><DT
+><TT
+CLASS="filename"
+>modules.o</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the compiled list of modules contained in this <A
+HREF="modules.html#linkset"
+>linking set</A
+>
+  </P
+></DD
+><DT
+>all the <TT
+CLASS="filename"
+>FILES</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>listed in <TT
+CLASS="filename"
+>makevars</TT
+>
+  </P
+></DD
+><DT
+><TT
+CLASS="filename"
+>lisp.run</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the executable</P
+></DD
+><DT
+><A
+HREF="p-indep.html#image"
+><TT
+CLASS="filename"
+>#P"lispinit.mem"</TT
+></A
+></DT
+><DD
+><P
+ALIGN="justify"
+>the <A
+HREF="p-indep.html#image"
+>memory image</A
+></P
+></DD
+></DL
+></DIV
+></P
+></DIV
+><P
+ALIGN="justify"
+>To run a <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> contained in some <A
+HREF="modules.html#linkset"
+>linking set</A
+>
+ <TT
+CLASS="filename"
+>dir</TT
+>, call
+ <B
+CLASS="command"
+><TT
+CLASS="replaceable"
+><I
+>dir</I
+></TT
+>/lisp.run -M
+ <TT
+CLASS="replaceable"
+><I
+>dir</I
+></TT
+>/lispinit.mem</B
+></P
+><DIV
+CLASS="formalpara"
+><P
+><A
+NAME="modset"
+></A
+><B
+><A
+HREF="modules.html#modset"
+>module set</A
+>. </B
+>A <STRONG
+CLASS="FIRST"
+><I
+CLASS="firstterm"
+><A
+HREF="modules.html#modset"
+>module set</A
+></I
+></STRONG
+>
+   is a directory containing:
+<P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><B
+CLASS="command"
+>link.sh</B
+></DT
+><DD
+><P
+ALIGN="justify"
+>some <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/utilities/sh.html"
+TARGET="_top"
+><B
+CLASS="command"
+>/bin/sh</B
+></A
+> commands, which prepare the directory
+  before linking, and set the variables <TT
+CLASS="envar"
+>NEW_FILES</TT
+>,
+  <TT
+CLASS="envar"
+>NEW_LIBS</TT
+>, <TT
+CLASS="envar"
+>NEW_MODULES</TT
+>, <TT
+CLASS="envar"
+>TO_LOAD</TT
+>
+  and optionally <TT
+CLASS="envar"
+>TO_PRELOAD</TT
+></P
+></DD
+><DT
+>and any other files</DT
+><DD
+><P
+ALIGN="justify"
+>needed by <B
+CLASS="command"
+>link.sh</B
+>
+ </P
+></DD
+></DL
+></DIV
+></P
+></DIV
+><P
+ALIGN="justify"
+>Note that in <B
+CLASS="command"
+>link.sh</B
+> the <A
+HREF="modules.html#modset"
+>module set</A
+> directory
+ is referred to as <TT
+CLASS="varname"
+>$modulename/</TT
+>.</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="envar"
+>NEW_FILES</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the space-separated list of files that
+  belong to the <A
+HREF="modules.html#modset"
+>module set</A
+> and will belong to every new <A
+HREF="modules.html#linkset"
+>linking set</A
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>NEW_LIBS</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the space-separated list of files or
+  <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> compiler switches that need to be passed to the <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+>
+  compiler when linking the lisp.run belonging to a new <A
+HREF="modules.html#linkset"
+>linking set</A
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>NEW_MODULES</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the space-separated list of the module names
+  belonging to the <A
+HREF="modules.html#modset"
+>module set</A
+>.  Normally, every <TT
+CLASS="filename"
+>#P".c"</TT
+> file in the
+  <A
+HREF="modules.html#modset"
+>module set</A
+> defines a module of its own.  The module name is derived
+  from the file name.</P
+></DD
+><DT
+><TT
+CLASS="envar"
+>TO_LOAD</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>the space-separated list of Lisp files to load
+  before building the <A
+HREF="p-indep.html#image"
+><TT
+CLASS="filename"
+>#P"lispinit.mem"</TT
+></A
+> belonging to a new <A
+HREF="modules.html#linkset"
+>linking set</A
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="envar"
+>TO_PRELOAD</TT
+> (optional)</DT
+><DD
+><P
+ALIGN="justify"
+>the space-separated list of Lisp files to load
+  into an intermediate <A
+HREF="p-indep.html#image"
+><TT
+CLASS="filename"
+>#P"lispinit.mem"</TT
+></A
+> file, before building the <A
+HREF="p-indep.html#image"
+><TT
+CLASS="filename"
+>#P"lispinit.mem"</TT
+></A
+>
+  belonging to a new <A
+HREF="modules.html#linkset"
+>linking set</A
+>.
+  This variable is usually used for defining Lisp packages which must be
+  present when the new <TT
+CLASS="filename"
+>#P".c"</TT
+> files are initialized.  E.g., the
+  <A
+HREF="dffi.html#def-call-in"
+><TT
+CLASS="function"
+>FFI:DEF-CALL-IN</TT
+></A
+> functions must reside in already defined packages;
+  see <A
+HREF="dffi.html#ex-call-in"
+>the call-in example</A
+>.
+ </P
+></DD
+></DL
+></DIV
+><P
+ALIGN="justify"
+>The command <B
+CLASS="command"
+>clisp-link create-module-set
+ <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+>
+ <TT
+CLASS="replaceable"
+><I
+>file1.c</I
+></TT
+> ...</B
+> creates a <A
+HREF="modules.html#modset"
+>module set</A
+>
+ in <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+> which refers (via symbolic
+ links) to <TT
+CLASS="replaceable"
+><I
+>file1.c</I
+></TT
+> etc.  The files are
+ expected to be modules of their own.</P
+><P
+ALIGN="justify"
+>The command <B
+CLASS="command"
+>clisp-link add-module-set
+ <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+>
+ <TT
+CLASS="replaceable"
+><I
+>source-dir</I
+></TT
+>
+ <TT
+CLASS="replaceable"
+><I
+>destination-dir</I
+></TT
+></B
+> combines a
+ <A
+HREF="modules.html#linkset"
+>linking set</A
+> in <TT
+CLASS="replaceable"
+><I
+>source-dir</I
+></TT
+> and a module in
+ <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+> to a new <A
+HREF="modules.html#linkset"
+>linking set</A
+>, in a
+ directory <TT
+CLASS="replaceable"
+><I
+>destination-dir</I
+></TT
+> which is newly
+ created.</P
+><P
+ALIGN="justify"
+>The command <B
+CLASS="command"
+>clisp-link run <TT
+CLASS="replaceable"
+><I
+>source-dir</I
+></TT
+>
+ <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+> ...</B
+> runs the <A
+HREF="modules.html#linkset"
+>linking set</A
+>
+ in <TT
+CLASS="replaceable"
+><I
+>source-dir</I
+></TT
+>, with the module in
+ <TT
+CLASS="replaceable"
+><I
+>module-dir</I
+></TT
+> loaded.  More than one module can
+ be specified.  If <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> has been built with the configuration option
+ <TT
+CLASS="option"
+>--with-dynamic-modules</TT
+>, the loading will be performed
+ through dynamic loading.  Otherwise - this is much slower - a temporary
+ <A
+HREF="modules.html#linkset"
+>linking set</A
+> will be created and deleted afterwards.  Note that dynamic
+ loading does not work on all operating systems, and that
+ <TT
+CLASS="option"
+>--with-dynamic-modules</TT
+> precludes some efficiency
+ optimizations which are enabled by default.</P
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="modinfo"
+></A
+>30.2.2. Function <A
+HREF="modules.html#modinfo"
+><TT
+CLASS="function"
+>EXT:MODULE-INFO</TT
+></A
+></H2
+><P
+ALIGN="justify"
+>Function <TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#modinfo"
+><TT
+CLASS="function"
+>EXT:MODULE-INFO</TT
+></A
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>
+  <TT
+CLASS="replaceable"
+><I
+>verbose</I
+></TT
+>)</TT
+> allows one to inquire
+ about what modules are available in the currently running image.
+ When called without arguments, it returns the list of module names,
+ starting with <SPAN
+CLASS="QUOTE"
+>"clisp"</SPAN
+>.  When <TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+> is supplied and
+ names a module, 3 values are returned - <TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>,
+ <TT
+CLASS="replaceable"
+><I
+>subr-count</I
+></TT
+>,
+ <TT
+CLASS="replaceable"
+><I
+>object-count</I
+></TT
+>.
+ When <TT
+CLASS="replaceable"
+><I
+>verbose</I
+></TT
+> is non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, the full list of
+ module lisp function names written in <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> (<SPAN
+CLASS="type"
+>Subr</SPAN
+>s) and
+ the full list of internal lisp objects available in <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> code
+ are additionally returned for the total of 5 values.</P
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="mod-dynload"
+></A
+>30.2.3. Function <A
+HREF="modules.html#mod-dynload"
+><TT
+CLASS="function"
+>SYS::DYNLOAD-MODULES</TT
+></A
+></H2
+><FONT
+COLOR="RED"
+>Platform dependent: some <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> platforms only, compiled <B
+CLASS="emphasis"
+>with</B
+>
+ compile-time flag <TT
+CLASS="option"
+>--with-dynamic-modules</TT
+>.</FONT
+><P
+ALIGN="justify"
+>Note that dynamic loading does not work on all operating systems
+ (<A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/dlopen.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>dlopen</TT
+></A
+> is required), and that <TT
+CLASS="option"
+>--with-dynamic-modules</TT
+>
+ precludes some efficiency optimizations which are on by default.</P
+><P
+ALIGN="justify"
+>Function <TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#mod-dynload"
+><TT
+CLASS="function"
+>SYS::DYNLOAD-MODULES</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>filename</I
+></TT
+>
+ ({<TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>}+))</TT
+> loads a shared object file or library
+ containing a number of named external <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> modules.
+ This facility cannot be used to <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/dlopen.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>dlopen</TT
+></A
+> and access arbitrary shared
+ libraries.</P
+><P
+ALIGN="justify"
+>External modules for <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> are those which contain a
+ <TT
+CLASS="literal"
+>module__<TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>__subr_tab</TT
+>, among others.
+ This serves to register external functions which operate on
+ Lisp-level structures with <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>.</P
+><P
+ALIGN="justify"
+>To use <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/dlopen.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>dlopen</TT
+></A
+> with modules, you should add
+ <TT
+CLASS="option"
+>-fPIC</TT
+> to the module's compilation options.
+ Something like <B
+CLASS="command"
+>cc -shared -o <TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>.so <TT
+CLASS="replaceable"
+><I
+>name</I
+></TT
+>.o</B
+>
+ may be needed to produce the shared object file.</P
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="mod-set-example"
+></A
+>30.2.4. Example</H2
+><P
+ALIGN="justify"
+>To link in the <A
+HREF="dffi.html"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"FFI"</SPAN
+></STRONG
+></A
+> bindings for the <A
+HREF="http://www.gnu.org"
+TARGET="_top"
+>GNU</A
+>/<A
+HREF="http://www.linux.org/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Linux</B
+></A
+> operating
+ system, the following steps are needed.  (Step 1 and step 2 need not be
+ executed in this order.)</P
+><P
+></P
+><OL
+TYPE="1"
+><LI
+><P
+ALIGN="justify"
+>Create a new <A
+HREF="modules.html#modset"
+>module set</A
+>:
+
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>$ clisp-link create-module-set linux /<TT
+CLASS="replaceable"
+><I
+>somewhere</I
+></TT
+>/bindings/linux.c</PRE
+></TD
+></TR
+></TABLE
+>
+
+ Modify the newly created <TT
+CLASS="filename"
+>linux/link.sh</TT
+> to add
+ <TT
+CLASS="option"
+>-lm</TT
+>; to the libraries: replace
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>NEW_LIBS="$file_list"</PRE
+></TD
+></TR
+></TABLE
+>
+   with
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>NEW_LIBS="$file_list -lm"</PRE
+></TD
+></TR
+></TABLE
+>
+
+   Modify the newly created <TT
+CLASS="filename"
+>linux/link.sh</TT
+> to load
+   <TT
+CLASS="filename"
+>linux.fas</TT
+> before saving the <A
+HREF="p-indep.html#image"
+>memory image</A
+>:
+   replace
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>TO_LOAD=''</PRE
+></TD
+></TR
+></TABLE
+>
+   with
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>TO_LOAD='/<TT
+CLASS="replaceable"
+><I
+>somewhere</I
+></TT
+>/bindings/linux.fas'</PRE
+></TD
+></TR
+></TABLE
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+>Compile <TT
+CLASS="filename"
+>linux.lisp</TT
+>, creating
+  <TT
+CLASS="filename"
+>linux.c</TT
+>:
+
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>$ clisp -c /<TT
+CLASS="replaceable"
+><I
+>somewhere</I
+></TT
+>/bindings/linux.lisp</PRE
+></TD
+></TR
+></TABLE
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+>Create a new <A
+HREF="modules.html#linkset"
+>linking set</A
+>:
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>$ clisp-link add-module-set linux base base+linux</PRE
+></TD
+></TR
+></TABLE
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+>Run and try it:
+
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>$ base+linux/lisp.run -M base+linux/lispinit.mem &#62; (linux::stat "/tmp")</PRE
+></TD
+></TR
+></TABLE
+></P
+></LI
+></OL
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="module-tools"
+></A
+>30.2.5. Module tools</H2
+><P
+ALIGN="justify"
+>There some tools to facilitate easy module writing.</P
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="modprep"
+></A
+>30.2.5.1. Modprep</H3
+><P
+ALIGN="justify"
+>If your module is written in <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+>, you can pre-process your
+ sources with <TT
+CLASS="filename"
+>modprep.lisp</TT
+> in the <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>
+ distribution and define lisp functions with the
+ <TT
+CLASS="function"
+>DEFUN</TT
+> macro:<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>&#13;DEFUN(MY-PACKAGE:MY-FUNCTION-NAME, arg1 arg2 <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> FOO BAR) {
+  if (!boundp(STACK_0)) STACK_0 = fixnum(0); /* BAR */
+  if (!boundp(STACK_1)) STACK_1 = fixnum(1); /* FOO */
+  pushSTACK(`MY-PACKAGE::SOME-SYMBOL`); /* create a symbol in the package */
+  pushSTACK(`#(:THIS :IS :A :VECTOR)`); /* some vector, created once */
+  pushSTACK(``MY-PACKAGE::MY-FUNCTION-NAME``); /* double '' means FUNCTION */
+  VALUES1(listof(7)); /* cons up a new list and clean up the STACK */
+}</PRE
+></TD
+></TR
+></TABLE
+>
+Then <TT
+CLASS="sexp"
+>(MY-PACKAGE:MY-FUNCTION-NAME 'A 12 :FOO
+ T)</TT
+> will return <TT
+CLASS="sexp"
+>(A 12 T 0
+ MY-PACKAGE::SOME-SYMBOL #(:THIS :IS :A :VECTOR)
+ #'MY-PACKAGE::MY-FUNCTION-NAME)</TT
+>.</P
+><P
+ALIGN="justify"
+>See <TT
+CLASS="filename"
+>modules/syscalls</TT
+> and other included
+ modules for more examples.</P
+></DIV
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="exporting"
+></A
+>30.2.5.2. Exporting</H3
+><P
+ALIGN="justify"
+>If your module uses <A
+HREF="dffi.html"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"FFI"</SPAN
+></STRONG
+></A
+> to interface to a <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> library,
+ you might want to make your module package
+ <A
+HREF="pack-dict.html#make-pack"
+>case-sensitive</A
+> and use
+ <TT
+CLASS="filename"
+>exporting.lisp</TT
+> in the <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> distribution to
+ make all <A
+HREF="dffi.html"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"FFI"</SPAN
+></STRONG
+></A
+> forms export the symbols they define.
+ See <TT
+CLASS="filename"
+>modules/netica</TT
+>
+ and <TT
+CLASS="filename"
+>modules/bindings/*</TT
+> for examples.</P
+></DIV
+></DIV
+><DIV
+CLASS="section"
+><H2
+CLASS="section"
+><A
+NAME="included-modules"
+></A
+>30.2.6. Modules included in the distribution.</H2
+><P
+ALIGN="justify"
+>The following modules come with the distribution of
+<A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>:</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+>bindings</DT
+><DD
+><P
+ALIGN="justify"
+>Call the operating system functions from <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>.
+    The following platforms are supported:
+   <P
+></P
+><UL
+><LI
+><P
+ALIGN="justify"
+><A
+HREF="http://www.amiga.org/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Amiga</B
+></A
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+><A
+HREF="http://www.linux.org/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Linux</B
+></A
+>/<A
+HREF="http://www.gnu.org"
+TARGET="_top"
+>GNU</A
+> <A
+HREF="http://www.gnu.org/software/libc/"
+TARGET="_top"
+>libc</A
+></P
+></LI
+><LI
+><P
+ALIGN="justify"
+><A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+></P
+></LI
+></UL
+></P
+></DD
+><DT
+><A
+HREF="http://www.cliki.net/CLX"
+TARGET="_top"
+><B
+CLASS="command"
+>CLX</B
+></A
+></DT
+><DD
+><P
+ALIGN="justify"
+>Call
+    <A
+HREF="http://www.the-labs.com/X11/XLib-Manual/"
+TARGET="_top"
+>Xlib</A
+>
+    functions from <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>.  Two implementations are supplied:
+   <P
+></P
+><UL
+><LI
+><P
+ALIGN="justify"
+>mit-clx, from MIT
+     <A
+HREF="ftp://ftp.x.org/R5contrib/CLX.R5.02.tar.Z"
+TARGET="_top"
+>ftp://ftp.x.org/R5contrib/CLX.R5.02.tar.Z</A
+>
+     - the standard implementation</P
+></LI
+><LI
+><P
+ALIGN="justify"
+>new-clx, by Gilbert Baumann
+      - faster, with additional features, but not quite complete yet.
+    </P
+></LI
+></UL
+></P
+></DD
+><DT
+>oracle</DT
+><DD
+><P
+ALIGN="justify"
+>Access
+    <A
+HREF="http://www.oracle.com/"
+TARGET="_top"
+>Oracle</A
+> from <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>;
+    by John Hinsdale.</P
+></DD
+><DT
+>fastcgi</DT
+><DD
+><P
+ALIGN="justify"
+>Access
+    <A
+HREF="http://www.fastcgi.com/"
+TARGET="_top"
+>FastCGI</A
+> from <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>;
+    by John Hinsdale.</P
+></DD
+><DT
+><A
+HREF="modules.html#netica"
+>netica</A
+></DT
+><DD
+><P
+ALIGN="justify"
+>Work with Bayesian belief networks and influence
+    diagrams using
+    <A
+HREF="http://norsys.com/netica_c_api.htm"
+TARGET="_top"
+>Netica</A
+>.
+ </P
+></DD
+><DT
+>postgresql</DT
+><DD
+><P
+ALIGN="justify"
+>Access
+    <A
+HREF="http://www.PostgreSQL.org/"
+TARGET="_top"
+>PostgreSQL</A
+> from <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+>.
+  </P
+></DD
+><DT
+>queens</DT
+><DD
+><P
+ALIGN="justify"
+>Compute the number of solutions to the n-queens
+    problem on a n*n checkboard (a toy example for the users to
+    explore).</P
+></DD
+><DT
+><A
+HREF="modules.html#dir-key"
+>dirkey</A
+></DT
+><DD
+><P
+ALIGN="justify"
+>Directory Access</P
+></DD
+><DT
+><A
+HREF="modules.html#regexp"
+>regexp</A
+></DT
+><DD
+><P
+ALIGN="justify"
+>The <A
+HREF="regexp.html"
+TARGET="_top"
+>POSIX Regular
+   Expressions</A
+> matching, compiling, executing.
+ </P
+></DD
+><DT
+><A
+HREF="modules.html#syscalls"
+>syscalls</A
+></DT
+><DD
+><P
+ALIGN="justify"
+>Use some system calls in a platform-independent way.
+ </P
+></DD
+><DT
+><A
+HREF="wildcard.html"
+TARGET="_top"
+>wildcard</A
+></DT
+><DD
+><P
+ALIGN="justify"
+>Shell (<A
+HREF="http://www.opengroup.org/onlinepubs/007904975/utilities/sh.html"
+TARGET="_top"
+><B
+CLASS="command"
+>/bin/sh</B
+></A
+>) globbing</P
+></DD
+></DL
+></DIV
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="netica"
+></A
+>30.2.6.1. Netica Interface</H3
+><P
+ALIGN="justify"
+>This is an interface to the
+ <A
+HREF="http://norsys.com/netica_c_api.htm"
+TARGET="_top"
+>Netica C API</A
+>.
+ The package <STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"NETICA"</SPAN
+></STRONG
+> is
+ <A
+HREF="pack-dict.html#make-pack"
+>case-sensitive</A
+>, you would write
+ <TT
+CLASS="sexp"
+>(netica:GetNodeExpectedUtils_bn ...)</TT
+>
+ when you need to call
+ <A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNodeExpectedUtils_bn.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>GetNodeExpectedUtils_bn()</TT
+></A
+>
+</P
+><P
+ALIGN="justify"
+>Additionally, some higher level functionality is available
+ (see <TT
+CLASS="filename"
+>modules/netica/demo.lisp</TT
+> for a sample
+ usage):</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="sexp"
+>(netica:start-netica <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :license :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Call
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/NewNeticaEnviron_ns.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>NewNeticaEnviron_ns()</TT
+></A
+> and
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/InitNetica_bn.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>InitNetica_bn()</TT
+></A
+>
+   and print some statistics; initialize
+   <TT
+CLASS="varname"
+>netica:*env*</TT
+>.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:check-errors <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :env :clear :severity)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Show and, optionally,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/ClearError_ns.html"
+TARGET="_top"
+>clear</A
+>, the errors of
+   the given <A
+HREF="http://norsys.com/onLineAPIManual/functions/ErrorSeverity_ns.html"
+TARGET="_top"
+>severity</A
+>
+   and above.  You should call this function
+   after <I
+CLASS="emphasis"
+>every</I
+> call to a Netica function.
+   Every wrapper function in this list calls it, so you do <I
+CLASS="emphasis"
+>not</I
+> need to
+   call it after a call to a wrapper function.
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:error-message
+   error)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Convert netica error to a <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_string.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>STRING</TT
+></A
+> containing
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/ErrorCategory_ns.html"
+TARGET="_top"
+>error category</A
+>,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/ErrorSeverity_ns.html"
+TARGET="_top"
+>error severity</A
+>,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/ErrorNumber_ns.html"
+TARGET="_top"
+>error number</A
+>,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/ErrorMessage_ns.html"
+TARGET="_top"
+>error message</A
+>.
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:close-netica <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Terminate the netica session.
+   Sets <TT
+CLASS="varname"
+>netica:*env*</TT
+> to <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+> when it was closed.
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:make-net <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :name
+   :comment :title :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Make a <A
+HREF="http://norsys.com/onLineAPIManual/functions/NewNet_bn.html"
+TARGET="_top"
+>new
+    network</A
+> with a given name,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/SetNetTitle_bn.html"
+TARGET="_top"
+>title</A
+> and
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/SetNetComment_bn.html"
+TARGET="_top"
+>comment</A
+>
+   and return it.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:net-info net)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Print some information about the net
+   (<A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNetName_bn.html"
+TARGET="_top"
+>name</A
+>,
+    <A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNetTitle_bn.html"
+TARGET="_top"
+>title</A
+>,
+    <A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNetComment_bn.html"
+TARGET="_top"
+>comment</A
+>,
+    <A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNetFileName_bn.html"
+TARGET="_top"
+>file name</A
+> and
+    <A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNetNodes_bn.html"
+TARGET="_top"
+>nodes</A
+>).
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:make-node <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :name :net :kind :levels :states :num-states :title :comment :parents
+   :cpt :x :y :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Make a <A
+HREF="http://norsys.com/onLineAPIManual/functions/NewNode_bn.html"
+TARGET="_top"
+>new
+    node</A
+> with the given name and many other parameters.
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:node-info node
+   <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :header)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Print some information about the node, preceded by
+   the header.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:get-beliefs node
+   <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://norsys.com/onLineAPIManual/functions/GetNodeBeliefs_bn.html"
+TARGET="_top"
+>Get
+    the belief vector</A
+> for the node.
+</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:enter-finding net node
+   state <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://norsys.com/onLineAPIManual/functions/EnterFinding_bn.html"
+TARGET="_top"
+>Enter a
+    finding</A
+> by
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/NodeNamed_bn.html"
+TARGET="_top"
+>node</A
+>
+   and <A
+HREF="http://norsys.com/onLineAPIManual/functions/StateNamed_bn.html"
+TARGET="_top"
+>state</A
+>
+   names.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:save-net net <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :file :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://norsys.com/onLineAPIManual/functions/WriteNet_bn.html"
+TARGET="_top"
+>Write</A
+>
+   a network to a file.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:read-net file <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   :env :verbose)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://norsys.com/onLineAPIManual/functions/ReadNet_bn.html"
+TARGET="_top"
+>Read</A
+>
+   a network from a file.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(netica:with-open-dne-file (var
+   file <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;REST</TT
+></A
+> opts) <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;BODY</TT
+></A
+> body)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://norsys.com/onLineAPIManual/functions/NewStreamFile_ns.html"
+TARGET="_top"
+>Open
+    a netica stream</A
+>, execute <TT
+CLASS="replaceable"
+><I
+>body</I
+></TT
+>,
+   <A
+HREF="http://norsys.com/onLineAPIManual/functions/DeleteStream_ns.html"
+TARGET="_top"
+>close the stream</A
+>
+   - just like <A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_with-open-file.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>WITH-OPEN-FILE</TT
+></A
+>.</P
+></DD
+><DT
+><TT
+CLASS="varname"
+>netica:*verbose*</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>The log <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_stream.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>STREAM</TT
+></A
+> or <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>; the default value for
+   the <TT
+CLASS="literal"
+>:VERBOSE</TT
+> argument.
+</P
+></DD
+><DT
+><TT
+CLASS="varname"
+>netica:*license*</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>The license key provided by
+   <A
+HREF="http://norsys.com/"
+TARGET="_top"
+>Norsys</A
+>; the default value
+   for the <TT
+CLASS="literal"
+>:LICENSE</TT
+> argument.
+</P
+></DD
+><DT
+><TT
+CLASS="varname"
+>netica:*env*</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>The Netica environment object; the default value
+   for the <TT
+CLASS="literal"
+>:ENV</TT
+> argument.
+</P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="dir-key"
+></A
+>30.2.6.2. Directory Access</H3
+><P
+ALIGN="justify"
+>This module provides some directory access from lisp,
+ in package <A
+HREF="modules.html#dir-key"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"LDAP"</SPAN
+></STRONG
+></A
+>.  3 types of directory keys
+ may exist, depending on the compilation environment.</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><P
+><B
+>valid directory key types</B
+></P
+><DL
+><DT
+>:win32</DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> registry access
+  </P
+></DD
+><DT
+>:gnome</DT
+><DD
+><P
+ALIGN="justify"
+><A
+HREF="http://developer.gnome.org/doc/API/libgnome/gnome-gnome-config.html"
+TARGET="_top"
+>gnome-config</A
+> access
+  </P
+></DD
+><DT
+>:ldap</DT
+><DD
+><P
+ALIGN="justify"
+>LDAP interface via
+   <A
+HREF="http://www.openldap.org"
+TARGET="_top"
+>OpenLDAP</A
+> or compatible
+  </P
+></DD
+></DL
+></DIV
+><P
+ALIGN="justify"
+>The following functions and macros are exported (please note that
+these features are experimental and the API may be modified in the
+future).</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><A
+NAME="dir-key-open"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#dir-key-open"
+><TT
+CLASS="function"
+>LDAP:DIR-KEY-OPEN</TT
+></A
+>
+   <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> (<TT
+CLASS="constant"
+>:DIRECTION</TT
+> <TT
+CLASS="constant"
+>:INPUT</TT
+>)
+   <TT
+CLASS="constant"
+>:IF-DOES-NOT-EXIST</TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Open the directory key under <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>, which should
+   be either an open directory key or a valid <A
+HREF="modules.html#dir-key-type"
+>directory key type</A
+>.
+   The meaning of the <TT
+CLASS="constant"
+>:DIRECTION</TT
+> and <TT
+CLASS="constant"
+>:IF-DOES-NOT-EXIST</TT
+> keyword
+   arguments is the same as for <A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_open.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>OPEN</TT
+></A
+>.</P
+></DD
+><DT
+><A
+NAME="dir-key-close"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#dir-key-close"
+><TT
+CLASS="function"
+>LDAP:DIR-KEY-CLOSE</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Close the directory key.  The preferred way is to
+   use the <A
+HREF="modules.html#with-dir-key-open"
+><TT
+CLASS="function"
+>LDAP:WITH-DIR-KEY-OPEN</TT
+></A
+> macro.</P
+></DD
+><DT
+><A
+NAME="with-dir-key-open"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#with-dir-key-open"
+><TT
+CLASS="function"
+>LDAP:WITH-DIR-KEY-OPEN</TT
+></A
+> (<TT
+CLASS="replaceable"
+><I
+>variable</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;REST</TT
+></A
+>
+    {<TT
+CLASS="replaceable"
+><I
+>option</I
+></TT
+>}*) <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;BODY</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>body</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Open the directory key (by calling <A
+HREF="modules.html#dir-key-open"
+><TT
+CLASS="function"
+>LDAP:DIR-KEY-OPEN</TT
+></A
+>
+   on <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>, <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> and <TT
+CLASS="replaceable"
+><I
+>option</I
+></TT
+>s), bind it to <TT
+CLASS="replaceable"
+><I
+>variable</I
+></TT
+>,
+   execute <TT
+CLASS="replaceable"
+><I
+>body</I
+></TT
+>, then close it with <A
+HREF="modules.html#dir-key-close"
+><TT
+CLASS="function"
+>LDAP:DIR-KEY-CLOSE</TT
+></A
+>.
+ </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-TYPE</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the <A
+HREF="modules.html#dir-key-type"
+>directory key type</A
+> of the directory key
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-PATH</TT
+>
+                <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the path of this directory key, which is the
+   <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> argument of <A
+HREF="modules.html#dir-key-open"
+><TT
+CLASS="function"
+>LDAP:DIR-KEY-OPEN</TT
+></A
+> if <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> was a <A
+HREF="modules.html#dir-key-type"
+>directory key type</A
+> or the
+   concatenation of the <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> argument and the
+   <TT
+CLASS="function"
+>ldap:dir-key-path</TT
+> of <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>.
+   </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-DIRECTION</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>One of <TT
+CLASS="constant"
+>:INPUT</TT
+>, <TT
+CLASS="constant"
+>:OUTPUT</TT
+> and <TT
+CLASS="constant"
+>:IO</TT
+>, indicating
+   the permitted operation on this key and its derivatives.
+   </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-CLOSED-P</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Check whether the key has been closed.
+   It is not an error to close a closed key.
+   </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-SUBKEY-DELETE</TT
+>
+     <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>subkey</I
+></TT
+>)</TT
+>
+   <TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-VALUE-DELETE</TT
+>
+     <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>attribute</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Delete the specified subkey or attribute.
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-SUBKEY</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+>
+  <TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-ATTRIBUTES</TT
+>
+                <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the list of the subkeys or attributes.
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-VALUE</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>attribute</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+>
+    <TT
+CLASS="replaceable"
+><I
+>default</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the value of the specified attribute,
+   similar to <A
+HREF="http://www.lisp.org/HyperSpec/Body/acc_gethash.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>GETHASH</TT
+></A
+> and <A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>SETF</TT
+></A
+>able just like <A
+HREF="http://www.lisp.org/HyperSpec/Body/acc_gethash.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>GETHASH</TT
+></A
+>.
+   </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>LDAP:DIR-KEY-INFO</TT
+> <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return some information about the directory key.
+   This is highly platform-dependent and will probably be removed or
+   replaced or modified in the future.</P
+></DD
+><DT
+><A
+NAME="with-dir-key-search"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#with-dir-key-search"
+><TT
+CLASS="function"
+>LDAP:WITH-DIR-KEY-SEARCH</TT
+></A
+> (<TT
+CLASS="replaceable"
+><I
+>key-iter</I
+></TT
+>
+                 <TT
+CLASS="replaceable"
+><I
+>atribute-iter</I
+></TT
+>
+                 <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> <TT
+CLASS="constant"
+>:scope</TT
+>)
+                 <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;BODY</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>body</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This is the main way to iterate over the subtree
+   under the key <TT
+CLASS="replaceable"
+><I
+>dkey</I
+></TT
+>+<TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+>.</P
+><P
+ALIGN="justify"
+><TT
+CLASS="replaceable"
+><I
+>key-iter</I
+></TT
+> is a non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+> symbol
+    and is bound via <A
+HREF="http://www.lisp.org/HyperSpec/Body/speope_fletcm_scm_macrolet.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>MACROLET</TT
+></A
+> to a macro, each call of which returns
+    the next subkey.</P
+><P
+ALIGN="justify"
+><TT
+CLASS="replaceable"
+><I
+>atribute-iter</I
+></TT
+> is a symbol and is
+    bound, when non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, to a macro, each call of which returns two
+   values - the next attribute and its value.</P
+><P
+ALIGN="justify"
+>The <TT
+CLASS="constant"
+>:scope</TT
+> keyword argument specifies the
+    scope of the search and can be
+   <P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="constant"
+>:self</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>iterate over the key itself
+     </P
+></DD
+><DT
+><TT
+CLASS="constant"
+>:level</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>iterate over the children of the key
+     </P
+></DD
+><DT
+><TT
+CLASS="constant"
+>:tree</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>iterate over the subtree
+     </P
+></DD
+></DL
+></DIV
+></P
+><P
+ALIGN="justify"
+><A
+HREF="modules.html#with-dir-key-search"
+><TT
+CLASS="function"
+>LDAP:WITH-DIR-KEY-SEARCH</TT
+></A
+> is used to implement
+    <TT
+CLASS="function"
+>LDAP:DIR-KEY-VALUES</TT
+>,
+    <TT
+CLASS="function"
+>LDAP:DIR-KEY-CHILDREN</TT
+> and
+    <TT
+CLASS="function"
+>LDAP:DIR-KEY-DUMP-TREE</TT
+> in
+    <TT
+CLASS="filename"
+>dirkey.lisp</TT
+>.
+    </P
+></DD
+></DL
+></DIV
+></DIV
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="regexp"
+></A
+>30.2.6.3. <A
+HREF="http://clisp.cons.org"
+TARGET="_top"
+><B
+CLASS="command"
+>CLISP</B
+></A
+> <A
+HREF="modules.html#regexp"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"REGEXP"</SPAN
+></STRONG
+></A
+> module</H3
+><P
+ALIGN="justify"
+>The <A
+HREF="modules.html#regexp"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"REGEXP"</SPAN
+></STRONG
+></A
+> module implements the
+ <A
+HREF="regexp.html"
+TARGET="_top"
+>POSIX regular expressions</A
+>
+by calling the standard <A
+HREF="http://www.eskimo.com/~scs/C-faq/top.html"
+TARGET="_top"
+><B
+CLASS="command"
+>C</B
+></A
+> system facilities.
+The syntax of these regular expressions is described in many places,
+such as your local <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/regex.h.html"
+TARGET="_top"
+><TT
+CLASS="filename"
+>regex.h</TT
+></A
+> manual and <A
+HREF="http://www.gnu.org/software/emacs/"
+TARGET="_top"
+>Emacs</A
+> info pages.</P
+><P
+ALIGN="justify"
+>The <A
+HREF="modules.html#regexp"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"REGEXP"</SPAN
+></STRONG
+></A
+> package exports the following 9 symbols:</P
+><P
+></P
+><TABLE
+BORDER="0"
+><TBODY
+><TR
+><TD
+><A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-match-start"
+><TT
+CLASS="function"
+>REGEXP:MATCH-START</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-match-end"
+><TT
+CLASS="function"
+>REGEXP:MATCH-END</TT
+></A
+></TD
+></TR
+><TR
+><TD
+><A
+HREF="modules.html#re-match-string"
+><TT
+CLASS="function"
+>REGEXP:MATCH-STRING</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-regexp-quote"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-QUOTE</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-regexp-compile"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-COMPILE</TT
+></A
+></TD
+></TR
+><TR
+><TD
+><A
+HREF="modules.html#re-regexp-exec"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-EXEC</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-regexp-split"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-SPLIT</TT
+></A
+></TD
+><TD
+><A
+HREF="modules.html#re-with-loop-split"
+><TT
+CLASS="function"
+>REGEXP:WITH-LOOP-SPLIT</TT
+></A
+></TD
+></TR
+></TBODY
+></TABLE
+><P
+></P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><P
+><B
+>API</B
+></P
+><DL
+><DT
+><A
+NAME="re-match"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   (<TT
+CLASS="constant"
+>:START</TT
+> 0) <TT
+CLASS="constant"
+>:END</TT
+> <A
+HREF="modules.html#re-cflags"
+><TT
+CLASS="constant"
+>:EXTENDED</TT
+> <TT
+CLASS="constant"
+>:IGNORE-CASE</TT
+> <TT
+CLASS="constant"
+>:NEWLINE</TT
+> <TT
+CLASS="constant"
+>:NOSUB</TT
+></A
+> <A
+HREF="modules.html#re-eflags"
+><TT
+CLASS="constant"
+>:NOTBOL</TT
+> <TT
+CLASS="constant"
+>:NOTEOL</TT
+></A
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This macro returns as first value a <TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> structure
+  containing the indices of the start and end of the first match for the
+  regular expression <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+> in <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>;
+  or <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+> if there is no match.
+  Additionally, a <TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> structure is returned for every matched
+  <TT
+CLASS="literal"
+>"\(...\)"</TT
+> group in <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+>, in the
+  order that the open parentheses appear in <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+>.
+  If <TT
+CLASS="replaceable"
+><I
+>start</I
+></TT
+> is non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, the search starts at that index in <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>.
+  If <TT
+CLASS="replaceable"
+><I
+>end</I
+></TT
+> is non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, only <TT
+CLASS="sexp"
+>(<A
+HREF="http://www.lisp.org/HyperSpec/Body/acc_subseq.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>SUBSEQ</TT
+></A
+>
+  <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>start</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>end</I
+></TT
+>)</TT
+> is considered.
+  <DIV
+CLASS="example"
+><A
+NAME="ex-re-match"
+></A
+><P
+><B
+>Example 30-1. <A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+></B
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>&#13;    (<A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+> "quick" "The quick brown fox jumped quickly.")
+     <TT
+CLASS="sexp"
+>#S(<TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> :START 4 :END 9)</TT
+>
+    (<A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+> "quick" "The quick brown fox jumped quickly." :start 8)
+     <TT
+CLASS="sexp"
+>#S(<TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> :START 27 :END 32)</TT
+>
+    (<A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+> "quick" "The quick brown fox jumped quickly." :start 8 :end 30)
+     <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>
+    (<A
+HREF="modules.html#re-match"
+><TT
+CLASS="function"
+>REGEXP:MATCH</TT
+></A
+> "\\([a-z]*\\)[0-9]*\\(bar\\)" "foo12bar")
+     <TT
+CLASS="sexp"
+>#S(<TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> :START 0 :END 8) ;</TT
+>
+     <TT
+CLASS="sexp"
+>#S(<TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> :START 0 :END 3) ;</TT
+>
+     <TT
+CLASS="sexp"
+>#S(<TT
+CLASS="classname"
+>REGEXP:MATCH</TT
+> :START 5 :END 8)</TT
+>
+  </PRE
+></TD
+></TR
+></TABLE
+></DIV
+>
+</P
+></DD
+><DT
+><A
+NAME="re-match-start"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-match-start"
+><TT
+CLASS="function"
+>REGEXP:MATCH-START</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Extracts the start index of <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>; <A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>SETF</TT
+></A
+>-able.
+ </P
+></DD
+><DT
+><A
+NAME="re-match-end"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-match-end"
+><TT
+CLASS="function"
+>REGEXP:MATCH-END</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Extracts the end index of <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>; <A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_setfcm_psetf.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>SETF</TT
+></A
+>-able.
+</P
+></DD
+><DT
+><A
+NAME="re-match-string"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-match-string"
+><TT
+CLASS="function"
+>REGEXP:MATCH-STRING</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Extracts the substring of <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> corresponding
+  to the given pair of start and end indices of <TT
+CLASS="replaceable"
+><I
+>match</I
+></TT
+>.
+  The result is shared with <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>.
+  If you want a freshly consed <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_string.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>STRING</TT
+></A
+>, use <A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_copy-seq.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>COPY-SEQ</TT
+></A
+> or
+  <TT
+CLASS="sexp"
+>(<A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_coerce.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>COERCE</TT
+></A
+> (<A
+HREF="modules.html#re-match-string"
+><TT
+CLASS="function"
+>REGEXP:MATCH-STRING</TT
+></A
+> ...)
+  '<A
+HREF="http://www.lisp.org/HyperSpec/Body/typ_simple-string.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>SIMPLE-STRING</TT
+></A
+>)</TT
+>.
+</P
+></DD
+><DT
+><A
+NAME="re-regexp-quote"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-regexp-quote"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-QUOTE</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+>
+   <TT
+CLASS="replaceable"
+><I
+>extended</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This function returns a regular expression string
+  that matches exactly <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> and nothing else.
+  This allows you to request an exact string match when calling a
+  function that wants a regular expression.
+  <DIV
+CLASS="example"
+><A
+NAME="ex-re-quote"
+></A
+><P
+><B
+>Example 30-2. <A
+HREF="modules.html#re-regexp-quote"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-QUOTE</TT
+></A
+></B
+></P
+><TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>&#13;    (regexp-quote "^The cat$")
+     <SPAN
+CLASS="returnvalue"
+>"\\^The cat\\$"</SPAN
+>
+   </PRE
+></TD
+></TR
+></TABLE
+></DIV
+>
+  One use of <A
+HREF="modules.html#re-regexp-quote"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-QUOTE</TT
+></A
+> is to combine an exact string match with
+  context described as a regular expression.
+  When <TT
+CLASS="replaceable"
+><I
+>extended</I
+></TT
+> is non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, also
+  quote <SPAN
+CLASS="keysym"
+>#\+</SPAN
+> and <SPAN
+CLASS="keysym"
+>#\?</SPAN
+>.
+</P
+></DD
+><DT
+><A
+NAME="re-regexp-compile"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-regexp-compile"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-COMPILE</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+   <A
+HREF="modules.html#re-cflags"
+><TT
+CLASS="constant"
+>:EXTENDED</TT
+> <TT
+CLASS="constant"
+>:IGNORE-CASE</TT
+> <TT
+CLASS="constant"
+>:NEWLINE</TT
+> <TT
+CLASS="constant"
+>:NOSUB</TT
+></A
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Compile the regular expression <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> into an
+  object suitable for <A
+HREF="modules.html#re-regexp-exec"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-EXEC</TT
+></A
+>.</P
+></DD
+><DT
+><A
+NAME="re-regexp-exec"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-regexp-exec"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-EXEC</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+     (<TT
+CLASS="constant"
+>:START</TT
+> 0) <TT
+CLASS="constant"
+>:END</TT
+> <A
+HREF="modules.html#re-eflags"
+><TT
+CLASS="constant"
+>:NOTBOL</TT
+> <TT
+CLASS="constant"
+>:NOTEOL</TT
+></A
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Execute the <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+>, which must be a compiled
+  regular expression returned by <A
+HREF="modules.html#re-regexp-compile"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-COMPILE</TT
+></A
+>, against the
+  appropriate portion of the <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>.</P
+><P
+ALIGN="justify"
+>Negative <TT
+CLASS="replaceable"
+><I
+>end</I
+></TT
+> means <TT
+CLASS="sexp"
+>(<A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_pl.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>+</TT
+></A
+> (<A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_length.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>LENGTH</TT
+></A
+>
+  <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>) <TT
+CLASS="replaceable"
+><I
+>end</I
+></TT
+>)</TT
+></P
+></DD
+><DT
+><A
+NAME="re-regexp-split"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-regexp-split"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-SPLIT</TT
+></A
+>  <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+     (<TT
+CLASS="constant"
+>:START</TT
+> 0) <TT
+CLASS="constant"
+>:END</TT
+> <A
+HREF="modules.html#re-cflags"
+><TT
+CLASS="constant"
+>:EXTENDED</TT
+> <TT
+CLASS="constant"
+>:IGNORE-CASE</TT
+> <TT
+CLASS="constant"
+>:NEWLINE</TT
+> <TT
+CLASS="constant"
+>:NOSUB</TT
+></A
+> <A
+HREF="modules.html#re-eflags"
+><TT
+CLASS="constant"
+>:NOTBOL</TT
+> <TT
+CLASS="constant"
+>:NOTEOL</TT
+></A
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return a list of substrings of <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+> (all
+  sharing the structure with <TT
+CLASS="replaceable"
+><I
+>string</I
+></TT
+>) separated by <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+> (a
+  regular expression string or a return value of <A
+HREF="modules.html#re-regexp-compile"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-COMPILE</TT
+></A
+>)
+ </P
+></DD
+><DT
+><A
+NAME="re-with-loop-split"
+></A
+><TT
+CLASS="sexp"
+>(<A
+HREF="modules.html#re-with-loop-split"
+><TT
+CLASS="function"
+>REGEXP:WITH-LOOP-SPLIT</TT
+></A
+> (<TT
+CLASS="replaceable"
+><I
+>variable</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>stream</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+>
+     <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> (<TT
+CLASS="constant"
+>:START</TT
+> 0) <TT
+CLASS="constant"
+>:END</TT
+> <A
+HREF="modules.html#re-cflags"
+><TT
+CLASS="constant"
+>:EXTENDED</TT
+> <TT
+CLASS="constant"
+>:IGNORE-CASE</TT
+> <TT
+CLASS="constant"
+>:NEWLINE</TT
+> <TT
+CLASS="constant"
+>:NOSUB</TT
+></A
+> <A
+HREF="modules.html#re-eflags"
+><TT
+CLASS="constant"
+>:NOTBOL</TT
+> <TT
+CLASS="constant"
+>:NOTEOL</TT
+></A
+>)
+     <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-4.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;BODY</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>body</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Read lines from <TT
+CLASS="replaceable"
+><I
+>stream</I
+></TT
+>, split them with
+  <A
+HREF="modules.html#re-regexp-split"
+><TT
+CLASS="function"
+>REGEXP:REGEXP-SPLIT</TT
+></A
+> on <TT
+CLASS="replaceable"
+><I
+>pattern</I
+></TT
+>, and bind the resulting list to
+  <TT
+CLASS="replaceable"
+><I
+>variable</I
+></TT
+>.</P
+></DD
+><DT
+><A
+NAME="re-cflags"
+></A
+><A
+HREF="modules.html#re-cflags"
+><TT
+CLASS="constant"
+>:EXTENDED</TT
+> <TT
+CLASS="constant"
+>:IGNORE-CASE</TT
+> <TT
+CLASS="constant"
+>:NEWLINE</TT
+> <TT
+CLASS="constant"
+>:NOSUB</TT
+></A
+></DT
+><DD
+><P
+ALIGN="justify"
+>These options control compilation of a pattern.
+   You can specify <TT
+CLASS="replaceable"
+><I
+>cflags</I
+></TT
+> directly by
+   combining <TT
+CLASS="constant"
+>REGEXP::REG_EXTENDED</TT
+>,
+   <TT
+CLASS="constant"
+>REGEXP::REG_ICACE</TT
+>,
+   <TT
+CLASS="constant"
+>REGEXP::REG_NEWLINE</TT
+>, and
+   <TT
+CLASS="constant"
+>REGEXP::REG_NOSUB</TT
+>.
+   See <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/regex.h.html"
+TARGET="_top"
+><TT
+CLASS="filename"
+>regex.h</TT
+></A
+> for their meaning.
+</P
+></DD
+><DT
+><A
+NAME="re-eflags"
+></A
+><A
+HREF="modules.html#re-eflags"
+><TT
+CLASS="constant"
+>:NOTBOL</TT
+> <TT
+CLASS="constant"
+>:NOTEOL</TT
+></A
+></DT
+><DD
+><P
+ALIGN="justify"
+>These options constrol execution of a pattern.
+   You can specify <TT
+CLASS="replaceable"
+><I
+>eflags</I
+></TT
+> directly by
+   combining <TT
+CLASS="constant"
+>REGEXP::REG_NOTBOL</TT
+>, and
+   <TT
+CLASS="constant"
+>REGEXP::REG_NOTEOL</TT
+>.
+   See <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/regex.h.html"
+TARGET="_top"
+><TT
+CLASS="filename"
+>regex.h</TT
+></A
+> for their meaning.
+</P
+></DD
+></DL
+></DIV
+><P
+ALIGN="justify"
+>The following code computes the number of people who use a
+ particular shell:
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>&#13;(<A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_defpackage.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>DEFPACKAGE</TT
+></A
+> "REGEXP-TEST" (:use "LISP" "REGEXP"))
+(<A
+HREF="http://www.lisp.org/HyperSpec/Body/mac_in-package.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>IN-PACKAGE</TT
+></A
+> "REGEXP-TEST")
+(let ((h (make-hash-table :test #'equal :size 10)) (n 0))
+  (with-open-file (f "/etc/passwd")
+    (with-loop-split (s f ":")
+      (incf (gethash (seventh s) h 0))))
+  (with-hash-table-iterator (i h)
+    (loop (multiple-value-bind (r k v) (i)
+            (unless r (return))
+            (format t "[~d] ~s~30t== ~5:d~%" (incf n) k v)))))
+</PRE
+></TD
+></TR
+></TABLE
+></P
+><P
+ALIGN="justify"
+>For comparison, the same can be done by the following <A
+HREF="http://www.perl.com"
+TARGET="_top"
+><B
+CLASS="command"
+>Perl</B
+></A
+>:
+<TABLE
+BORDER="0"
+BGCOLOR="#E0E0E0"
+WIDTH="100%"
+><TR
+><TD
+><PRE
+CLASS="programlisting"
+>&#13;#!/usr/local/bin/perl -w
+
+use diagnostics;
+use strict;
+
+my $IN = $ARGV[0];
+open(INF,"&#60; $IN") || die "$0: cannot read file [$IN]: $!\n;";
+my %hash;
+while (&#60;INF&#62;) {
+  chop;
+  my @all = split($ARGV[1]);
+  my $shell = ($#all &#62;= 6 ? $all[6] : "");
+  if ($hash{$shell}) { $hash{$shell} ++; }
+  else { $hash{$shell} = 1; }
+}
+my $ii = 0;
+for my $kk (keys(%hash)) {
+  print "[",++$ii,"] \"",$kk,"\"  --  ",$hash{$kk},"\n";
+}
+close(INF);
+</PRE
+></TD
+></TR
+></TABLE
+></P
+></DIV
+><DIV
+CLASS="section"
+><H3
+CLASS="section"
+><A
+NAME="syscalls"
+></A
+>30.2.6.4. System Calls</H3
+><P
+ALIGN="justify"
+>The <A
+HREF="modules.html#syscalls"
+><STRONG
+CLASS="package"
+><SPAN
+CLASS="QUOTE"
+>"POSIX"</SPAN
+></STRONG
+></A
+> module makes some system calls
+ available from lisp.</P
+><P
+></P
+><DIV
+CLASS="variablelist"
+><DL
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:RESOLVE-HOST-IPADDR</TT
+>
+    <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>host</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Returns the <SPAN
+CLASS="type"
+>hostent</SPAN
+> struct (name,
+   list of aliases, list of IP addresses as dotted quads (for IPv4) or
+   coloned octets (for IPv6), address type - IPv4 or IPv6).
+   When <TT
+CLASS="replaceable"
+><I
+>host</I
+></TT
+> is omitted or <TT
+CLASS="constant"
+>:DEFAULT</TT
+>, return the data for the
+   current host. When <TT
+CLASS="replaceable"
+><I
+>host</I
+></TT
+> is given and is <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, all the
+   host database is returned as a list (this would be the contents of the
+   <TT
+CLASS="filename"
+>/etc/hosts</TT
+> file on a <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> system or
+   <TT
+CLASS="filename"
+>${windir}/system32/etc/hosts</TT
+> on a Win32 system).
+   This is an interface to <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/gethostbyname.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>gethostbyname</TT
+></A
+>/<A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/gethostbyaddr.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>gethostbyaddr</TT
+></A
+>.
+  </P
+></DD
+><DT
+><A
+NAME="file-stat"
+></A
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:FILE-STAT</TT
+> <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+>
+      <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>link-p</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the <SPAN
+CLASS="type"
+>file-stat</SPAN
+> struct.
+   <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> can be a <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_stream.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>STREAM</TT
+></A
+>, a <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_pathname.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>PATHNAME</TT
+></A
+>, a <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_string.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>STRING</TT
+></A
+> or a
+   <A
+HREF="http://www.lisp.org/HyperSpec/Body/syscla_number.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>NUMBER</TT
+></A
+> (on a <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> system, meaning <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap03.html#tag_03_165"
+TARGET="_top"
+>file descriptor</A
+>).
+   The first slot of the struct returned is the string or the number on
+   which <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/stat.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>stat</TT
+></A
+>/<A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/fstat.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>fstat</TT
+></A
+>/<A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/lstat.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>lstat</TT
+></A
+> was called.  The other 13 slots are
+   numbers, members of the stat struct: device, inode, protection,
+   number of hard links, owner's UID, owner's GID, device type, total
+   size (bytes), blocksize for filesystem I/O, number of blocks
+   allocated, atime, mtime, ctime (as the number of seconds since
+   1900-01-01).  If the system does not support a particular field
+   (e.g., Win32 does not have hard links), <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+> (or the default, like 1
+   for the number of hard links for Win32 or DOS) is returned.
+   </P
+><P
+ALIGN="justify"
+>[<A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> systems only at this time, patches are welcome.]
+  </P
+></DD
+><DT
+><A
+NAME="file-info"
+></A
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:FILE-INFO</TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the <SPAN
+CLASS="type"
+>file-info</SPAN
+> struct.
+   <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> should be a <A
+HREF="filename-dict.html#path-des"
+>pathname designator</A
+>. The 8 slots are attributes, ctime,
+   atime, wtime, high and low sizes, name and short name.
+   </P
+><P
+ALIGN="justify"
+>[<A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> systems only at this time, patches are welcome.]
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:USER-DATA</TT
+>
+    <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>user</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return the <SPAN
+CLASS="type"
+>passwd</SPAN
+> struct (name, encoded
+   password, UID, GID, full name, home directory, shell).
+   When <TT
+CLASS="replaceable"
+><I
+>user</I
+></TT
+> is <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, return all users.
+   When <TT
+CLASS="replaceable"
+><I
+>user</I
+></TT
+> is <TT
+CLASS="constant"
+>:DEFAULT</TT
+> or
+   not supplied, return the information about the current user.
+   If the system does not support a particular field (e.g., Win32 does
+   not have a concept of a shell), <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+> (or the default, like
+   <TT
+CLASS="filename"
+>c:\command.com</TT
+> for DOS) is returned.
+   </P
+><P
+ALIGN="justify"
+>[<A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> systems only at this time, patches are welcome.]
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:UNAME</TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return a struct describing the OS, derived from
+    <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/uname.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>uname</TT
+></A
+>.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:SYSCONF</TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return a struct describing the system
+    configuration, derived from <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/sysconf.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>sysconf</TT
+></A
+>.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:LIMITS</TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return a struct describing the resource limits,
+    derived from <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/getrlimit.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>getrlimit</TT
+></A
+>.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:USAGE</TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return 2 structs describing the resource usage by
+    the lisp process its children, derived from <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/getrusage.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>getrusage</TT
+></A
+>.
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:ERF</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:ERFC</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:J0</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:J1</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:JN</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>integer</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:Y0</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:Y1</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:YN</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>integer</I
+></TT
+> <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:GAMMA</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+><BR><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:LGAMMA</TT
+>
+       <TT
+CLASS="replaceable"
+><I
+>real</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Compute the error functions, Bessel functions and
+   Gamma.  These functions are required by the POSIX standard and should
+   be available in libm.so.  Please note that these functions do not
+   provide lisp-style error handling and precision, and do all the
+   computations at the double float level.
+ </P
+></DD
+><DT
+><A
+NAME="stream-lock"
+></A
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:STREAM-LOCK</TT
+> <TT
+CLASS="replaceable"
+><I
+>stream</I
+></TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>lock-p</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+>
+    (:BLOCK <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_t.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>T</TT
+></A
+>) (:SHARED <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>) (:START 0) (:END <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>))</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This is an interface to the <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/fcntl.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>fcntl</TT
+></A
+> system call.
+   It sets or removes a file lock for the (portion of the) file associated
+   with <TT
+CLASS="replaceable"
+><I
+>stream</I
+></TT
+>, depending on <TT
+CLASS="replaceable"
+><I
+>lock-p</I
+></TT
+>.
+   When <TT
+CLASS="replaceable"
+><I
+>block</I
+></TT
+> is <A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>, the call is non-blocking,
+   and when the file is already locked, it <A
+HREF="http://www.lisp.org/HyperSpec/Body/fun_signal.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>SIGNAL</TT
+></A
+>s an <A
+HREF="http://www.lisp.org/HyperSpec/Body/contyp_error.html"
+TARGET="_top"
+><TT
+CLASS="classname"
+>ERROR</TT
+></A
+>.
+   When <TT
+CLASS="replaceable"
+><I
+>shared</I
+></TT
+> is non-<A
+HREF="http://www.lisp.org/HyperSpec/Body/convar_nil.html"
+TARGET="_top"
+><TT
+CLASS="constant"
+>NIL</TT
+></A
+>,
+   then lock can be shared between several callers.
+   Several processes can set a <TT
+CLASS="replaceable"
+><I
+>shared</I
+></TT
+>
+   (i.e., <I
+CLASS="emphasis"
+>read</I
+>) lock, but only one can set
+   an <I
+CLASS="emphasis"
+>exclusive</I
+> (i.e., <I
+CLASS="emphasis"
+>write</I
+>,
+   or non-<TT
+CLASS="replaceable"
+><I
+>shared</I
+></TT
+>) lock.
+ </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:COPY-FILE</TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>source-path</I
+></TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>destination-path</I
+></TT
+>
+    <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :METHOD :PRESERVE :IF-EXISTS :IF-DOES-NOT-EXIST)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This is an interface to the <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/symlink.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>symlink</TT
+></A
+>
+    (when <TT
+CLASS="replaceable"
+><I
+>method</I
+></TT
+> is <TT
+CLASS="constant"
+>:SYMLINK</TT
+>),
+    <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/link.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>link</TT
+></A
+> (when it is <TT
+CLASS="constant"
+>:HARDLINK</TT
+>), and <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/rename.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>rename</TT
+></A
+>
+    (when it is <TT
+CLASS="constant"
+>:RENAME</TT
+>) system calls, as well as,
+    you guessed it, a generic file copy utility
+    (when <TT
+CLASS="replaceable"
+><I
+>method</I
+></TT
+> is <TT
+CLASS="constant"
+>:COPY</TT
+>).
+   </P
+><P
+ALIGN="justify"
+>Both <TT
+CLASS="replaceable"
+><I
+>source-path</I
+></TT
+> and
+    <TT
+CLASS="replaceable"
+><I
+>destination-path</I
+></TT
+> may be wild.
+ </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(<TT
+CLASS="function"
+>POSIX:DUPLICATE-HANDLE</TT
+>
+    <TT
+CLASS="replaceable"
+><I
+>fd1</I
+></TT
+>
+    <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;OPTIONAL</TT
+></A
+> <TT
+CLASS="replaceable"
+><I
+>fd2</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>This is an interface to the <A
+HREF="http://www.opengroup.org/onlinepubs/007904975/functions/dup.html"
+TARGET="_top"
+><TT
+CLASS="function"
+>dup/dup2</TT
+></A
+> system calls on
+   <A
+HREF="http://www.UNIX-systems.org/online.html"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>UNIX</B
+></A
+> systems and to <TT
+CLASS="function"
+>DuplicateHandle</TT
+> system
+   call on <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+>.</P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(POSIX:SHORTCUT-INFO
+    <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+>)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Return information about a <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> shortcut
+    (<TT
+CLASS="filename"
+>#P".lnk"</TT
+>) file contents in
+    a <SPAN
+CLASS="type"
+>shortcut-info</SPAN
+> struct.
+  </P
+></DD
+><DT
+><TT
+CLASS="sexp"
+>(POSIX:MAKE-SHORTCUT
+    <TT
+CLASS="replaceable"
+><I
+>pathname</I
+></TT
+> <A
+HREF="http://www.lisp.org/HyperSpec/Body/sec_3-4-1.html"
+TARGET="_top"
+><TT
+CLASS="literal"
+>&#38;KEY</TT
+></A
+> :WORKING-DIRECTORY :ARGUMENTS :SHOW-COMMAND :ICON
+    :DESCRIPTION :HOT-KEY :PATH)</TT
+></DT
+><DD
+><P
+ALIGN="justify"
+>Create (or modify the properties of an existing one)
+    a <A
+HREF="http://www.willows.com/"
+TARGET="_top"
+><B
+CLASS="emphasis"
+>Win32</B
+></A
+> shortcut (<TT
+CLASS="filename"
+>#P".lnk"</TT
+>) file.
+ </P
+></DD
+></DL
+></DIV
+></DIV
+></DIV
+></DIV
+><DIV
+CLASS="NAVFOOTER"
+><HR
+ALIGN="LEFT"
+WIDTH="100%"><TABLE
+SUMMARY="Footer navigation table"
+WIDTH="100%"
+BORDER="0"
+CELLPADDING="0"
+CELLSPACING="0"
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+><A
+HREF="platform.html"
+ACCESSKEY="P"
+>Prev</A
+></TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="impnotes-top.html"
+ACCESSKEY="H"
+>Home</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+><A
+HREF="dffi.html"
+ACCESSKEY="N"
+>Next</A
+></TD
+></TR
+><TR
+><TD
+WIDTH="33%"
+ALIGN="left"
+VALIGN="top"
+>Extensions-2: Platform specific Extensions</TD
+><TD
+WIDTH="34%"
+ALIGN="center"
+VALIGN="top"
+><A
+HREF="platform.html"
+ACCESSKEY="U"
+>Up</A
+></TD
+><TD
+WIDTH="33%"
+ALIGN="right"
+VALIGN="top"
+>Extensions-2.3. The Foreign Function Call Facility</TD
+></TR
+></TABLE
+></DIV
+><div
+class="custom-footer"
+><hr
+width="100%"><table
+width="100%"
+><tr
+><td
+align="left"
+><a
+href="http://clisp.cons.org"
+><img
+src="clisp.png"
+width="48"
+height="48"
+alt="[CLISP home]"></a
+></td
+><td
+align="center"
+><a
+href="http://www.gnu.org"
+><img
+src="http://www.gnu.org/graphics/gnubanner.jpg"
+width="468"
+height="60"
+alt="[Come and see what GNU creates for YOU]"></a
+></td
+><td
+align="right"
+><a
+href="http://sourceforge.net"
+><img
+src="http://sourceforge.net/sflogo.php?group_id=1355&amp;type=2"
+width="125"
+height="37"
+alt="[SourceForge]"></a
+></td
+></tr
+></table
+></div
+></BODY
+></HTML
+>