Changeset 9219 for release


Ignore:
Timestamp:
Apr 20, 2008, 5:06:22 AM (17 years ago)
Author:
Gary Byers
Message:

synch from trunk

Location:
release/1.2/source
Files:
3 deleted
18 edited
8 copied

Legend:

Unmodified
Added
Removed
  • release/1.2/source/doc/ccl-documentation.html

    r9200 r9219  
    55    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    66    <title>Clozure CL Documentation</title>
    7     <meta name="generator" content="DocBook XSL Stylesheets V1.72.0" />
    8     <link rel="start" href="#id312246" title="Clozure CL Documentation" />
    9     <link rel="next" href="#id469589" title="Chapter 1. About Clozure CL" />
     7    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
     8    <link rel="start" href="#id301106" title="Clozure CL Documentation" />
     9    <link rel="next" href="#id322476" title="Chapter 1. About Clozure CL" />
    1010  </head>
    1111  <body>
     
    1414        <div>
    1515          <div>
    16             <h1 class="title"><a id="id312246"></a>Clozure CL Documentation</h1>
     16            <h1 class="title"><a id="id301106"></a>Clozure CL Documentation</h1>
    1717          </div>
    1818        </div>
     
    2323          <dt>
    2424            <span class="chapter">
    25               <a href="#id469589">1. About Clozure CL</a>
     25              <a href="#id322476">1. About Clozure CL</a>
    2626            </span>
    2727          </dt>
     
    3030              <dt>
    3131                <span class="sect1">
    32                   <a href="#id461338">1.1. Introduction to Clozure CL</a>
     32                  <a href="#id378260">1.1. Introduction to Clozure CL</a>
    3333                </span>
    3434              </dt>
     
    3737          <dt>
    3838            <span class="chapter">
    39               <a href="#id457672">2. Obtaining, Installing, and Running Clozure CL</a>
     39              <a href="#id335115">2. Obtaining, Installing, and Running Clozure CL</a>
    4040            </span>
    4141          </dt>
     
    4444              <dt>
    4545                <span class="sect1">
    46                   <a href="#id452608">2.1. Releases and System Requirements</a>
     46                  <a href="#id360672">2.1. Releases and System Requirements</a>
    4747                </span>
    4848              </dt>
    4949              <dt>
    5050                <span class="sect1">
    51                   <a href="#id485386">2.2. Obtaining Clozure CL</a>
     51                  <a href="#id364310">2.2. Obtaining Clozure CL</a>
    5252                </span>
    5353              </dt>
    5454              <dt>
    5555                <span class="sect1">
    56                   <a href="#id478754">2.3. Command Line Set Up</a>
     56                  <a href="#id308181">2.3. Command Line Set Up</a>
    5757                </span>
    5858              </dt>
     
    8181          <dt>
    8282            <span class="chapter">
    83               <a href="#id459555">3. Building Clozure CL from its Source Code</a>
     83              <a href="#id321732">3. Building Clozure CL from its Source Code</a>
    8484            </span>
    8585          </dt>
     
    115115          <dt>
    116116            <span class="chapter">
    117               <a href="#id462094">4. Using Clozure CL</a>
     117              <a href="#id322946">4. Using Clozure CL</a>
    118118            </span>
    119119          </dt>
     
    122122              <dt>
    123123                <span class="sect1">
    124                   <a href="#id482055">4.1. Introduction</a>
     124                  <a href="#id370264">4.1. Introduction</a>
    125125                </span>
    126126              </dt>
     
    159159          <dt>
    160160            <span class="chapter">
    161               <a href="#id471096">5. The Clozure CL IDE</a>
     161              <a href="#id351866">5. The Clozure CL IDE</a>
    162162            </span>
    163163          </dt>
     
    166166              <dt>
    167167                <span class="sect1">
    168                   <a href="#id447378">5.1. Introduction</a>
     168                  <a href="#id391992">5.1. Introduction</a>
    169169                </span>
    170170              </dt>
    171171              <dt>
    172172                <span class="sect1">
    173                   <a href="#id461540">5.2. Building the IDE</a>
     173                  <a href="#id388704">5.2. Building the IDE</a>
    174174                </span>
    175175              </dt>
    176176              <dt>
    177177                <span class="sect1">
    178                   <a href="#id460360">5.3. Running the IDE</a>
     178                  <a href="#id352336">5.3. Running the IDE</a>
    179179                </span>
    180180              </dt>
    181181              <dt>
    182182                <span class="sect1">
    183                   <a href="#id443840">5.4. IDE Features</a>
     183                  <a href="#id349170">5.4. IDE Features</a>
    184184                </span>
    185185              </dt>
    186186              <dt>
    187187                <span class="sect1">
    188                   <a href="#id495865">5.5. IDE Sources</a>
     188                  <a href="#id394341">5.5. IDE Sources</a>
    189189                </span>
    190190              </dt>
    191191              <dt>
    192192                <span class="sect1">
    193                   <a href="#id464104">5.6. The Application Builder</a>
     193                  <a href="#id394374">5.6. The Application Builder</a>
    194194                </span>
    195195              </dt>
     
    421421              <dt>
    422422                <span class="sect1">
    423                   <a href="#id523636">12.12. The Foreign-Function-Interface Dictionary</a>
     423                  <a href="#id430545">12.12. The Foreign-Function-Interface Dictionary</a>
    424424                </span>
    425425              </dt>
     
    656656          <div>
    657657            <div>
    658               <h2 class="title"><a id="id469589"></a>Chapter 1. About Clozure CL</h2>
     658              <h2 class="title"><a id="id322476"></a>Chapter 1. About Clozure CL</h2>
    659659            </div>
    660660          </div>
     
    664664            <dt>
    665665              <span class="sect1">
    666                 <a href="#id461338">1.1. Introduction to Clozure CL</a>
     666                <a href="#id378260">1.1. Introduction to Clozure CL</a>
    667667              </span>
    668668            </dt>
     
    673673            <div>
    674674              <div>
    675                 <h2 class="title" style="clear: both"><a id="id461338"></a>1.1. Introduction to Clozure CL</h2>
     675                <h2 class="title" style="clear: both"><a id="id378260"></a>1.1. Introduction to Clozure CL</h2>
    676676              </div>
    677677            </div>
     
    782782          <div>
    783783            <div>
    784               <h2 class="title"><a id="id457672"></a>Chapter 2. Obtaining, Installing, and Running Clozure CL</h2>
     784              <h2 class="title"><a id="id335115"></a>Chapter 2. Obtaining, Installing, and Running Clozure CL</h2>
    785785            </div>
    786786          </div>
     
    790790            <dt>
    791791              <span class="sect1">
    792                 <a href="#id452608">2.1. Releases and System Requirements</a>
     792                <a href="#id360672">2.1. Releases and System Requirements</a>
    793793              </span>
    794794            </dt>
     
    797797                <dt>
    798798                  <span class="sect2">
    799                     <a href="#id483238">2.1.1. LinuxPPC</a>
     799                    <a href="#id369379">2.1.1. LinuxPPC</a>
    800800                  </span>
    801801                </dt>
    802802                <dt>
    803803                  <span class="sect2">
    804                     <a href="#id485826">2.1.2. Linux X8664</a>
     804                    <a href="#id349897">2.1.2. Linux X8664</a>
    805805                  </span>
    806806                </dt>
    807807                <dt>
    808808                  <span class="sect2">
    809                     <a href="#id454012">2.1.3. FreeBSD-amd64</a>
     809                    <a href="#id347997">2.1.3. FreeBSD-amd64</a>
    810810                  </span>
    811811                </dt>
    812812                <dt>
    813813                  <span class="sect2">
    814                     <a href="#id463497">2.1.4. DarwinPPC-MacOS-X</a>
     814                    <a href="#id366253">2.1.4. DarwinPPC-MacOS-X</a>
    815815                  </span>
    816816                </dt>
    817817                <dt>
    818818                  <span class="sect2">
    819                     <a href="#id463405">2.1.5. Darwinx8664-MacOS-X</a>
     819                    <a href="#id364292">2.1.5. Darwinx8664-MacOS-X</a>
    820820                  </span>
    821821                </dt>
     
    824824            <dt>
    825825              <span class="sect1">
    826                 <a href="#id485386">2.2. Obtaining Clozure CL</a>
     826                <a href="#id364310">2.2. Obtaining Clozure CL</a>
    827827              </span>
    828828            </dt>
     
    831831                <dt>
    832832                  <span class="sect2">
    833                     <a href="#id484245">2.2.1. The Mac Way</a>
     833                    <a href="#id364330">2.2.1. The Mac Way</a>
    834834                  </span>
    835835                </dt>
    836836                <dt>
    837837                  <span class="sect2">
    838                     <a href="#id487280">2.2.2. Getting Clozure CL with Subversion</a>
     838                    <a href="#id397955">2.2.2. Getting Clozure CL with Subversion</a>
    839839                  </span>
    840840                </dt>
    841841                <dt>
    842842                  <span class="sect2">
    843                     <a href="#id458292">2.2.3. Tarballs</a>
     843                    <a href="#id308156">2.2.3. Tarballs</a>
    844844                  </span>
    845845                </dt>
     
    848848            <dt>
    849849              <span class="sect1">
    850                 <a href="#id478754">2.3. Command Line Set Up</a>
     850                <a href="#id308181">2.3. Command Line Set Up</a>
    851851              </span>
    852852            </dt>
     
    894894                <dt>
    895895                  <span class="sect2">
    896                     <a href="#id491137">2.6.3. Installing SLIME</a>
     896                    <a href="#id371816">2.6.3. Installing SLIME</a>
    897897                  </span>
    898898                </dt>
     
    930930            <div>
    931931              <div>
    932                 <h2 class="title" style="clear: both"><a id="id452608"></a>2.1. Releases and System Requirements</h2>
     932                <h2 class="title" style="clear: both"><a id="id360672"></a>2.1. Releases and System Requirements</h2>
    933933              </div>
    934934            </div>
     
    977977              <div>
    978978                <div>
    979                   <h3 class="title"><a id="id483238"></a>2.1.1. LinuxPPC</h3>
     979                  <h3 class="title"><a id="id369379"></a>2.1.1. LinuxPPC</h3>
    980980                </div>
    981981              </div>
     
    989989              <div>
    990990                <div>
    991                   <h3 class="title"><a id="id485826"></a>2.1.2. Linux X8664</h3>
     991                  <h3 class="title"><a id="id349897"></a>2.1.2. Linux X8664</h3>
    992992                </div>
    993993              </div>
     
    10151015              <div>
    10161016                <div>
    1017                   <h3 class="title"><a id="id454012"></a>2.1.3. FreeBSD-amd64</h3>
     1017                  <h3 class="title"><a id="id347997"></a>2.1.3. FreeBSD-amd64</h3>
    10181018                </div>
    10191019              </div>
     
    10301030              <div>
    10311031                <div>
    1032                   <h3 class="title"><a id="id463497"></a>2.1.4. DarwinPPC-MacOS-X</h3>
     1032                  <h3 class="title"><a id="id366253"></a>2.1.4. DarwinPPC-MacOS-X</h3>
    10331033                </div>
    10341034              </div>
     
    10501050              <div>
    10511051                <div>
    1052                   <h3 class="title"><a id="id463405"></a>2.1.5. Darwinx8664-MacOS-X</h3>
     1052                  <h3 class="title"><a id="id364292"></a>2.1.5. Darwinx8664-MacOS-X</h3>
    10531053                </div>
    10541054              </div>
     
    10691069            <div>
    10701070              <div>
    1071                 <h2 class="title" style="clear: both"><a id="id485386"></a>2.2. Obtaining Clozure CL</h2>
     1071                <h2 class="title" style="clear: both"><a id="id364310"></a>2.2. Obtaining Clozure CL</h2>
    10721072              </div>
    10731073            </div>
     
    10921092              <div>
    10931093                <div>
    1094                   <h3 class="title"><a id="id484245"></a>2.2.1. The Mac Way</h3>
     1094                  <h3 class="title"><a id="id364330"></a>2.2.1. The Mac Way</h3>
    10951095                </div>
    10961096              </div>
     
    11011101         After that you can double-click the Clozure CL application to
    11021102         run it.  The disk images are available at
    1103          <a href="ftp://clozure.com/pub/testing/" target="_top">ftp://clozure.com/pub/testing/</a> </p>
     1103         <a class="ulink" href="ftp://clozure.com/pub/testing/" target="_top">ftp://clozure.com/pub/testing/</a> </p>
    11041104            <p xmlns="http://www.w3.org/1999/xhtml">So that Clozure CL can locate its source code, and for other
    11051105        reasons explained in
    1106         <a href="#Predefined-Logical-Hosts" title="4.4.2. Predefined Logical Hosts">Section 4.4.2, “Predefined Logical Hosts”</a>, you should either put the
     1106        <a class="xref" href="#Predefined-Logical-Hosts" title="4.4.2. Predefined Logical Hosts">Section 4.4.2, “Predefined Logical Hosts”</a>, you should either put the
    11071107        <code class="literal">ccl</code> directory in the same directory as the
    11081108        Clozure CL application, or else put the Clozure CL application
     
    11201120              <div>
    11211121                <div>
    1122                   <h3 class="title"><a id="id487280"></a>2.2.2. Getting Clozure CL with Subversion</h3>
     1122                  <h3 class="title"><a id="id397955"></a>2.2.2. Getting Clozure CL with Subversion</h3>
    11231123                </div>
    11241124              </div>
     
    12201220        to install it on your OS. You can find information about
    12211221        obtaining and installing Subversion at
    1222         the <a href="http://subversion.tigris.org/project_packages.html" target="_top">Subversion
     1222        the <a class="ulink" href="http://subversion.tigris.org/project_packages.html" target="_top">Subversion
    12231223        Packages page</a>.</p>
    12241224            </div>
     
    12281228              <div>
    12291229                <div>
    1230                   <h3 class="title"><a id="id458292"></a>2.2.3. Tarballs</h3>
     1230                  <h3 class="title"><a id="id308156"></a>2.2.3. Tarballs</h3>
    12311231                </div>
    12321232              </div>
    12331233            </div>
    1234             <p xmlns="http://www.w3.org/1999/xhtml">Tarballs are available at <a href="ftp://clozure.com/pub/testing/" target="_top">ftp://clozure.com/pub/testing/</a>.  Download and extract
     1234            <p xmlns="http://www.w3.org/1999/xhtml">Tarballs are available at <a class="ulink" href="ftp://clozure.com/pub/testing/" target="_top">ftp://clozure.com/pub/testing/</a>.  Download and extract
    12351235      one on your local disk.  Then edit the Clozure CL shell script to set
    12361236      the value of <em class="varname">CCL_DEFAULT_DIRECTORY</em> and start
    1237       up the appropriate Clozure CL kernel. See <a href="#The-ccl-Shell-Script" title="2.3.1. The ccl Shell Script">Section 2.3.1, “The ccl Shell Script”</a> for more information about the
     1237      up the appropriate Clozure CL kernel. See <a class="xref" href="#The-ccl-Shell-Script" title="2.3.1. The ccl Shell Script">Section 2.3.1, “The ccl Shell Script”</a> for more information about the
    12381238      Clozure CL shell scripts.</p>
    12391239          </div>
     
    12431243            <div>
    12441244              <div>
    1245                 <h2 class="title" style="clear: both"><a id="id478754"></a>2.3. Command Line Set Up</h2>
     1245                <h2 class="title" style="clear: both"><a id="id308181"></a>2.3. Command Line Set Up</h2>
    12461246              </div>
    12471247            </div>
     
    12621262        such as <code class="literal">require</code> and
    12631263        <code class="literal">provide</code>, access to foreign interface
    1264         information (see <a href="#The-Interface-Database" title="12.4. The Interface Database">The
     1264        information (see <a class="link" href="#The-Interface-Database" title="12.4. The Interface Database">The
    12651265        Interface Database</a>) and the Lisp build process (see
    1266         <a href="#Building-CCL">Building Clozure CL from its Source
     1266        <a class="link" href="#Building-CCL">Building Clozure CL from its Source
    12671267        Code</a>). Specifically, it needs to set up logical
    12681268        pathname translations for the <code class="literal">"ccl:"</code>
     
    13581358      </pre>
    13591359            <p xmlns="http://www.w3.org/1999/xhtml">The ccl shell script passes all of its arguments to the
    1360       Clozure CL kernel.  See <a href="#Invocation" title="2.3.2. Invocation">Section 2.3.2, “Invocation”</a> for more
     1360      Clozure CL kernel.  See <a class="xref" href="#Invocation" title="2.3.2. Invocation">Section 2.3.2, “Invocation”</a> for more
    13611361      information about these arguments.  When invoked this way, the
    13621362      Lisp should be able to initialize the <code class="literal">"ccl:"</code>
     
    14471447              Clozure CL then exits.  This is the same thing that is
    14481448              returned by
    1449               <span><strong class="function">LISP-APPLICATION-VERSION</strong></span>.</p>
     1449              <span class="function"><strong>LISP-APPLICATION-VERSION</strong></span>.</p>
    14501450              </li>
    14511451              <li>
     
    14551455              <em class="parameter"><code>character-encoding-name</code></em>).
    14561456              Specifies the character encoding to use for
    1457               <em class="varname">*TERMINAL-IO*</em> (see <a href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>).  Specifically, the
     1457              <em class="varname">*TERMINAL-IO*</em> (see <a class="xref" href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>).  Specifically, the
    14581458              <em class="parameter"><code>character-encoding-name</code></em> string
    14591459              is uppercased and interned in the KEYWORD package. If an
     
    14831483                <p><code class="literal">-e</code> <em class="parameter"><code>form</code></em>
    14841484              (or <code class="literal">--eval</code>). An expression is read (via
    1485               <span><strong class="function">READ-FROM-STRING</strong></span>) from the string
     1485              <span class="function"><strong>READ-FROM-STRING</strong></span>) from the string
    14861486              <em class="parameter"><code>form</code></em> and evaluated. If
    14871487              <em class="parameter"><code>form</code></em> contains shell metacharacters,
     
    14991499              <code class="literal">--set-lisp-heap-gc-threshold</code>
    15001500              <em class="parameter"><code>n</code></em>).  Sets the Lisp gc threshold to
    1501               <em class="parameter"><code>n</code></em>. (see <a href="#GC-Page-reclamation-policy" title="15.3. GC Page reclamation policy">Section 15.3, “GC Page reclamation policy”</a></p>
     1501              <em class="parameter"><code>n</code></em>. (see <a class="xref" href="#GC-Page-reclamation-policy" title="15.3. GC Page reclamation policy">Section 15.3, “GC Page reclamation policy”</a></p>
    15021502              </li>
    15031503              <li>
     
    15111511              <code class="literal">--heap-reserve</code>). Reserves
    15121512              <em class="parameter"><code>n</code></em> bytes for heap expansion.  The
    1513               default is <code class="literal"> 549755813888</code>.  (see <a href="#Heap-space-allocation" title="15.1. Heap space allocation">Section 15.1, “Heap space allocation”</a>)</p>
     1513              default is <code class="literal"> 549755813888</code>.  (see <a class="xref" href="#Heap-space-allocation" title="15.1. Heap space allocation">Section 15.1, “Heap space allocation”</a>)</p>
    15141514              </li>
    15151515              <li>
    15161516                <p><code class="literal">-S</code> <em class="parameter"><code>n</code></em> (or
    15171517              <code class="literal">--stack-size</code> <em class="parameter"><code>n</code></em>). Sets the size of the
    1518               initial control stack to <em class="parameter"><code>n</code></em>. (see <a href="#Thread-Stack-Sizes" title="7.3.1. Thread Stack Sizes">Section 7.3.1, “Thread Stack Sizes”</a>)</p>
     1518              initial control stack to <em class="parameter"><code>n</code></em>. (see <a class="xref" href="#Thread-Stack-Sizes" title="7.3.1. Thread Stack Sizes">Section 7.3.1, “Thread Stack Sizes”</a>)</p>
    15191519              </li>
    15201520              <li>
     
    15221522              <code class="literal">--thread-stack-size</code>
    15231523              <em class="parameter"><code>n</code></em>). Sets the size of the first
    1524               thread's stack to <em class="parameter"><code>n</code></em>. (see <a href="#Thread-Stack-Sizes" title="7.3.1. Thread Stack Sizes">Section 7.3.1, “Thread Stack Sizes”</a>)</p>
     1524              thread's stack to <em class="parameter"><code>n</code></em>. (see <a class="xref" href="#Thread-Stack-Sizes" title="7.3.1. Thread Stack Sizes">Section 7.3.1, “Thread Stack Sizes”</a>)</p>
    15251525              </li>
    15261526              <li>
     
    15931593          </div>
    15941594          <p xmlns="http://www.w3.org/1999/xhtml">For complete information about SLIME, see the
    1595       SLIME <a href="http://common-lisp.net/project/slime/" target="_top">home
     1595      SLIME <a class="ulink" href="http://common-lisp.net/project/slime/" target="_top">home
    15961596      page</a>. The SLIME home page provides up-to-date downloads,
    15971597      plus documentation, tutorials, and instructional
     
    16771677              <div>
    16781678                <div>
    1679                   <h3 class="title"><a id="id491137"></a>2.6.3. Installing SLIME</h3>
     1679                  <h3 class="title"><a id="id371816"></a>2.6.3. Installing SLIME</h3>
    16801680                </div>
    16811681              </div>
     
    17931793        mailing lists. You can find information about the mailing
    17941794        lists on the
    1795         Clozure CL <a href="http://trac.clozure.com/openmcl" target="_top">wiki</a>.</p>
     1795        Clozure CL <a class="ulink" href="http://trac.clozure.com/openmcl" target="_top">wiki</a>.</p>
    17961796          </div>
    17971797        </div>
     
    18301830          <div>
    18311831            <div>
    1832               <h2 class="title"><a id="id459555"></a>Chapter 3. Building Clozure CL from its Source Code</h2>
     1832              <h2 class="title"><a id="id321732"></a>Chapter 3. Building Clozure CL from its Source Code</h2>
    18331833            </div>
    18341834          </div>
     
    19411941          <p xmlns="http://www.w3.org/1999/xhtml">The following terms are used in subsequent sections; it
    19421942      may be helpful to refer to these definitions.</p>
    1943           <p xmlns="http://www.w3.org/1999/xhtml"><a id="id452942" class="indexterm"></a><a href="#fasl-file"><em class="glossterm">fasl
    1944       files</em></a> are the object files produced
     1943          <p xmlns="http://www.w3.org/1999/xhtml"><a id="id352854" class="indexterm"></a><a class="glossterm" href="#fasl-file"><em class="glossterm">fasl
     1944        files</em></a> are the object files produced
    19451945      by <code class="literal">compile-file</code>.  fasl files store the
    19461946      machine code associated with function definitions and the
     
    19511951      types (extensions) to name fasl files on different platforms;
    19521952      see
    1953       <a href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a> </p>
    1954           <p xmlns="http://www.w3.org/1999/xhtml">The <a id="id483934" class="indexterm"></a> <a href="#lisp_kernel"><em class="glossterm">Lisp
    1955       kernel</em></a> is a C program with a fair amount of
     1953      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a> </p>
     1954          <p xmlns="http://www.w3.org/1999/xhtml">The <a id="id361301" class="indexterm"></a> <a class="glossterm" href="#lisp_kernel"><em class="glossterm">Lisp
     1955        kernel</em></a> is a C program with a fair amount of
    19561956      platform-specific assembly language code. Its basic job is to
    19571957      map a lisp heap image into memory, transfer control to some
     
    19611961      code. Clozure CL uses different filenames to name the lisp kernel
    19621962      files on different platforms; see
    1963       <a href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
    1964           <p xmlns="http://www.w3.org/1999/xhtml">A <a id="id476697" class="indexterm"></a> <a href="#lisp_image"><em class="glossterm">heap
    1965       image</em></a> is a file that can be quickly mapped into a
     1963      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
     1964          <p xmlns="http://www.w3.org/1999/xhtml">A <a id="id374738" class="indexterm"></a> <a class="glossterm" href="#lisp_image"><em class="glossterm">heap
     1965        image</em></a> is a file that can be quickly mapped into a
    19661966      process' address space. Conceptually, it's not too different
    19671967      from an executable file or shared library in the OS's native
     
    19721972      comprise Clozure CL. Clozure CL uses different filenames to name the
    19731973      standard full heap image files on different platforms; see
    1974       <a href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
    1975           <p xmlns="http://www.w3.org/1999/xhtml">A <a id="id464058" class="indexterm"></a> bootstrapping image is a minimal
     1974      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
     1975          <p xmlns="http://www.w3.org/1999/xhtml">A <a id="id366185" class="indexterm"></a> bootstrapping image is a minimal
    19761976      heap image used in the process of building Clozure CL itself.  The
    19771977      bootstrapping image contains just enough code to load the rest
     
    19801980      chicken. Clozure CL uses different filenames to name the standard
    19811981      bootstrapping image files on different platforms; see
    1982       <a href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>
     1982      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>
    19831983      .</p>
    19841984          <p xmlns="http://www.w3.org/1999/xhtml">Each supported platform (and possibly a few
    19851985      as-yet-unsupported ones) has a uniquely named subdirectory of
    19861986      <code class="literal">ccl/lisp-kernel/</code>; each such
    1987       <a id="id474934" class="indexterm"></a>
     1987      <a id="id366211" class="indexterm"></a>
    19881988      contains a Makefile and may contain some auxiliary files (linker
    19891989      scripts, etc.) that are used to build the lisp kernel on a
    19901990      particular platform.The platform-specific name of the kernel
    19911991      build directory is described in
    1992       <a href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
     1992      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
    19931993          <div class="sect2" lang="en" xml:lang="en">
    19941994            <div xmlns="http://www.w3.org/1999/xhtml" class="titlepage">
     
    21062106              <li>
    21072107                <p>Version 1.1 - the more recent version, which
    2108         runs on more platforms (including x86-64 platforms) and
    2109         supports Unicode</p>
     2108          runs on more platforms (including x86-64 platforms) and
     2109          supports Unicode</p>
    21102110              </li>
    21112111              <li>
    21122112                <p>Version 1.2 - supports (at least) all of the
    2113         features and platforms as 1.1, but is distributed and updated
    2114         differently</p>
     2113              features and platforms as 1.1, but is distributed and updated
     2114              differently</p>
    21152115              </li>
    21162116            </ul>
     
    21472147$ cd ccl
    21482148$ cvs login             # password is "cvs"
    2149                         # this step only needs to be done once,
    2150                         # that'll store the trivially encrypted
    2151                         # password in ~/.cvspas
     2149# this step only needs to be done once,
     2150# that'll store the trivially encrypted
     2151# password in ~/.cvspas
    21522152$ cvs update
    2153       </pre>
     2153    </pre>
    21542154          <p xmlns="http://www.w3.org/1999/xhtml">Unless you tell it to, cvs won't delete ("prune") empty
    21552155      directories or create new ones when the repository changes.
     
    21572157          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    21582158$ cvs update -d -P      # create dirs as needed, prune empty ones
    2159       </pre>
     2159    </pre>
    21602160          <p xmlns="http://www.w3.org/1999/xhtml">Version 1.2 archives follow naming conventions that are
    21612161      similar to those used by 1.0 (though more platforms are supported.)
     
    21652165          <p xmlns="http://www.w3.org/1999/xhtml">Subversion client programs are pre-installed on OSX 10.5 and
    21662166      later and are typically either pre-installed or readily available
    2167       on Linux and FreeBSD platforms.  The <a href="http://subversion.tigris.org" target="_top">Subversion web page</a> contains links to subversion client programs
     2167      on Linux and FreeBSD platforms.  The <a class="ulink" href="http://subversion.tigris.org" target="_top">Subversion web page</a> contains links to subversion client programs
    21682168      for many platforms; users of OSX versions 10.4 and earlier can also
    21692169      install Subversion clients via Fink or MacPorts.</p>
     
    21822182          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    21832183? (ccl:rebuild-ccl :full t)
    2184       </pre>
     2184    </pre>
    21852185          <p xmlns="http://www.w3.org/1999/xhtml">That call to the function <code class="literal">rebuild-ccl</code>
    2186       will perform the following steps:</p>
     2186      performs the following steps:</p>
    21872187          <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    21882188            <ul type="disc">
    21892189              <li>
    21902190                <p>Deletes all fasl files and other object files in the
    2191           <code class="literal">ccl</code>directory tree</p>
     2191              <code class="literal">ccl</code> directory tree</p>
    21922192              </li>
    21932193              <li>
    2194                 <p>Runs an external process which does a
    2195           <code class="literal">make</code> in the currentplatform's kernel
    2196           build directory to create a new kernel</p>
     2194                <p>Runs an external process that does a
     2195              <code class="literal">make</code> in the current platform's kernel
     2196              build directory to create a new kernel</p>
    21972197              </li>
    21982198              <li>
    21992199                <p>Does <code class="literal">(compile-ccl t)</code> in the running
    2200           lisp, to produce aset of fasl files from the “higher
    2201           level” lisp sources.</p>
     2200              lisp, to produce a set of fasl files from the “higher
     2201              level” lisp sources.</p>
    22022202              </li>
    22032203              <li>
    22042204                <p>Does <code class="literal">(xload-level-0 :force)</code> in the
    2205           running lisp, to compile thelisp sources in the
    2206           “ccl:level-0;” directory into fasl files and
    2207           then createa bootstrapping image from those fasl
    2208           files.</p>
     2205              running lisp, to compile the lisp sources in the
     2206              “ccl:level-0;” directory into fasl files and
     2207              then create a bootstrapping image from those fasl
     2208              files.</p>
    22092209              </li>
    22102210              <li>
    22112211                <p>Runs another external process, which causes the newly
    2212           compiled lispkernel to load the new bootstrapping image.
    2213           The bootsrtrapping image then loadsthe “higher
    2214           level” fasl files and a new copy of the platform's
    2215           full heap imageis then saved.</p>
     2212              compiled lisp kernel to load the new bootstrapping image.
     2213              The bootsrtrapping image then loads the “higher
     2214              level” fasl files and a new copy of the platform's
     2215              full heap image is then saved.</p>
    22162216              </li>
    22172217            </ul>
     
    22352235            </div>
    22362236          </div>
    2237           <p xmlns="http://www.w3.org/1999/xhtml">The Lisp kernel is the executable which you run to use
     2237          <p xmlns="http://www.w3.org/1999/xhtml">The Lisp kernel is the executable that you run to use
    22382238      Lisp.  It doesn't actually contain the entire Lisp
    22392239      implementation; rather, it loads a heap image which contains the
    2240       specifics - the "library", as it might be called if this was a C
     2240      specifics—the "library", as it might be called if this was a C
    22412241      program.  The kernel also provides runtime support to the heap
    22422242      image, such as garbage collection, memory allocation, exception
    22432243      handling, and the OS interface.</p>
    22442244          <p xmlns="http://www.w3.org/1999/xhtml">The Lisp kernel file has different names on different
    2245       platforms. See FIXTHIS . On all platforms the lisp kernel sources reside
     2245      platforms. See
     2246      <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>. On all
     2247      platforms the lisp kernel sources reside
    22462248      in <code class="literal">ccl/lisp-kernel</code>.</p>
    22472249          <p xmlns="http://www.w3.org/1999/xhtml">This section gives directions on how to rebuild the Lisp
     
    22562258      </pre>
    22572259          <p xmlns="http://www.w3.org/1999/xhtml">
    2258       </p>
     2260    </p>
    22592261          <div class="sect2" lang="en" xml:lang="en">
    22602262            <div xmlns="http://www.w3.org/1999/xhtml" class="titlepage">
     
    22662268            </div>
    22672269            <p xmlns="http://www.w3.org/1999/xhtml">The Clozure CL kernel can be bult with the following widely
    2268         available tools:</p>
     2270            available tools:</p>
    22692271            <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    22702272              <ul type="disc">
     
    22872289            </div>
    22882290            <p xmlns="http://www.w3.org/1999/xhtml"> In general, the more recent the versions of those
    2289         tools, the better; some versions of gcc 3.x on Linux have
    2290         difficulty compiling some of the kernel source code correctly
    2291         (so gcc 4.0 should be used, if possible.)  On OSX, the
    2292         versions of the tools distributed with XCode should work fine;
    2293         on Linux, the versions of the tools installed with the OS (or
    2294         available through its package management system) should work
    2295         fine if they're "recent enough".  On FreeBSD, the installed
    2296         version of the <code class="literal">m4</code> program doesn't support
    2297         some features that the kernel build process depends on; the
    2298         GNU version of the m4 macroprocessor (called
    2299         <code class="literal">gm4</code> on FreeBSD) should be installed
     2291            tools, the better; some versions of gcc 3.x on Linux have
     2292            difficulty compiling some of the kernel source code correctly
     2293            (so gcc 4.0 should be used, if possible.)  On OSX, the
     2294            versions of the tools distributed with XCode should work fine;
     2295            on Linux, the versions of the tools installed with the OS (or
     2296            available through its package management system) should work
     2297            fine if they're "recent enough".  On FreeBSD, the installed
     2298            version of the <code class="literal">m4</code> program doesn't support
     2299            some features that the kernel build process depends on; the
     2300            GNU version of the m4 macroprocessor (called
     2301            <code class="literal">gm4</code> on FreeBSD) should be installed.
    23002302
    2301         </p>
     2303          </p>
    23022304          </div>
    23032305          <div class="sect2" lang="en" xml:lang="en">
     
    23142316shell&gt; cd ccl/lisp-kernel/<em class="replaceable"><code>PLATFORM</code></em>
    23152317shell&gt; make
    2316         </pre>
     2318            </pre>
    23172319            <p xmlns="http://www.w3.org/1999/xhtml">
    2318         </p>
     2320          </p>
    23192321            <p xmlns="http://www.w3.org/1999/xhtml">That'll assemble several assembly language source files,
    23202322        compile several C source files, and link
    23212323        ../../<em class="replaceable"><code>the kernel</code></em>.
    2322         </p>
     2324          </p>
    23232325          </div>
    23242326        </div>
     
    23322334          </div>
    23332335          <p xmlns="http://www.w3.org/1999/xhtml">The initial heap image is loaded by the Lisp kernel, and
    2334       provides most all of the language implementation The heap image
     2336      provides most of the language implementation The heap image
    23352337      captures the entire state of a running Lisp (except for external
    23362338      resources, such as open files and TCP sockets).  After it is
     
    23472349      build a new heap image.</p>
    23482350          <p xmlns="http://www.w3.org/1999/xhtml">(You might also wish to build a heap image if you have a
    2349       large program which it is very complicated or time-consuming to
     2351      large program that is very complicated or time-consuming to
    23502352      load, so that you will be able to load it once, save an image,
    23512353      and thenceforth never have to load it again. At any time, a heap
     
    23672369                <li>
    23682370                  <p>Using your existing Clozure CL, create a
    2369           bootstrapping image</p>
     2371            bootstrapping image</p>
    23702372                </li>
    23712373                <li>
    23722374                  <p>Using your existing Clozure CL, recompile your
    2373           updated Clozure CL sources</p>
     2375            updated Clozure CL sources</p>
    23742376                </li>
    23752377                <li>
    23762378                  <p>Invoke Clozure CL with the bootstrapping image
    2377           you just created (rather than with the existing full heap
    2378           image).</p>
     2379            you just created (rather than with the existing full heap
     2380            image).</p>
    23792381                </li>
    23802382              </ol>
    23812383            </div>
    23822384            <p xmlns="http://www.w3.org/1999/xhtml">When you invoke Clozure CL with the bootstrapping image, it
    2383         will start up, load al of the Clozure CL fasl files, and save out
    2384         a new full heap image.  Voila.  You've created a new heap
    2385         image.</p>
     2385            starts up, loads all of the Clozure CL fasl files, and saves out a
     2386            new full heap image.  Voila.  You've created a new heap
     2387            image.</p>
    23862388            <p xmlns="http://www.w3.org/1999/xhtml">A few points worth noting:</p>
    23872389            <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
     
    23892391                <li>
    23902392                  <p>There's a circular dependency between the full heap
    2391             image and thebootstrapping image, in that each is used to
    2392             build the other.</p>
     2393                image and the bootstrapping image, in that each is used to
     2394                build the other.</p>
    23932395                </li>
    23942396                <li>
    23952397                  <p>There are some minor implementation
    2396             differences, but the environment in effect after the
    2397             bootstrapping image has loaded its fasl files is essentially
    2398             equivalent to the environment provided by the full heap
    2399             image; the latter loads a lot faster and is easier to
    2400             distribute, of course.</p>
     2398                differences, but the environment in effect after the
     2399                bootstrapping image has loaded its fasl files is essentially
     2400                equivalent to the environment provided by the full heap
     2401                image; the latter loads a lot faster and is easier to
     2402                distribute, of course.</p>
    24012403                </li>
    24022404                <li>
    24032405                  <p>If the full heap image doesn't work (because
    2404             of an OScompatibilty problem or other bug), it's very likely
    2405             that thebootstrapping image will suffer the same
    2406             problems.</p>
     2406                of an OS compatibilty problem or other bug), it's very likely
     2407                that the bootstrapping image will suffer the same
     2408                problems.</p>
    24072409                </li>
    24082410              </ul>
     
    24342436        <code class="literal">save-application</code>. This process is called
    24352437        "cross-dumping".</p>
    2436             <p xmlns="http://www.w3.org/1999/xhtml">Given a source distribution, a lisp kernel, and aheap
    2437         image, one can produce a bootstapping image by first invoking
     2438            <p xmlns="http://www.w3.org/1999/xhtml">Given a source distribution, a lisp kernel, and a heap
     2439        image, one can produce a bootstrapping image by first invoking
    24382440        Clozure CL from the shell:</p>
    24392441            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
     
    24412443Welcome to Clozure CL .... !
    24422444?
    2443         </pre>
     2445          </pre>
    24442446            <p xmlns="http://www.w3.org/1999/xhtml">then calling <code class="literal">ccl:xload-level-0</code> at the
    2445         lisp prompt</p>
     2447            lisp prompt</p>
    24462448            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    24472449? (ccl:xload-level-0)
    2448         </pre>
    2449             <p xmlns="http://www.w3.org/1999/xhtml">This will compile the lisp sources in the ccl/level-0
     2450          </pre>
     2451            <p xmlns="http://www.w3.org/1999/xhtml">This function compiles the lisp sources in the ccl/level-0
    24502452        directory if they're newer than the corresponding fasl files
    2451         and will then load the resulting fasl files into a simulated
    2452         lisp heap contained inside data structures inside the running
     2453        and then loads the resulting fasl files into a simulated lisp
     2454        heap contained in data structures inside the running
    24532455        lisp. That simulated heap image is then written to
    24542456        disk.</p>
     
    24592461            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    24602462? (ccl:xload-level-0 :force)
    2461 </pre>
    2462             <p xmlns="http://www.w3.org/1999/xhtml">will force recompilation of the level-0 sources.</p>
     2463      </pre>
     2464            <p xmlns="http://www.w3.org/1999/xhtml">forces recompilation of the level-0 sources.</p>
    24632465          </div>
    24642466          <div class="sect2" lang="en" xml:lang="en">
     
    24732475            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    24742476? (ccl:compile-ccl)
    2475         </pre>
    2476             <p xmlns="http://www.w3.org/1999/xhtml">at the lisp prompt will compile any fasl files that are
    2477         out-of-date with respect to the corresponding lisp sources;
    2478         <code class="literal">(ccl:compile-ccl t)</code> will force
    2479         recompilation. <code class="literal">ccl:compile-ccl</code> will reload
    2480         newly-compiled versions of some files;
    2481         <code class="literal">ccl:xcompile-ccl</code> is analogous, but skips
    2482         this reloading step.</p>
    2483             <p xmlns="http://www.w3.org/1999/xhtml">Unless there are bootstrapping considerations involved,
    2484         it usually doesn't matter whether these files reloaded after
     2477          </pre>
     2478            <p xmlns="http://www.w3.org/1999/xhtml">at the lisp prompt compiles any fasl files that are
     2479            out-of-date with respect to the corresponding lisp sources;
     2480            <code class="literal">(ccl:compile-ccl t)</code> forces
     2481            recompilation. <code class="literal">ccl:compile-ccl</code> reloads
     2482            newly-compiled versions of some files;
     2483            <code class="literal">ccl:xcompile-ccl</code> is analogous, but skips
     2484            this reloading step.</p>
     2485            <p xmlns="http://www.w3.org/1999/xhtml">Unless there are bootstrapping considerations involved, it
     2486        usually doesn't matter whether these files are reloaded after
    24852487        they're recompiled.</p>
    24862488            <p xmlns="http://www.w3.org/1999/xhtml">Calling <code class="literal">compile-ccl</code> or
     
    25042506            </div>
    25052507            <p xmlns="http://www.w3.org/1999/xhtml">To build a full image from a bootstrapping image, just
    2506         invoke the kernel with the bootstrapping image is an
    2507         argument</p>
     2508            invoke the kernel with the bootstrapping image as an
     2509            argument</p>
    25082510            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    25092511$ cd ccl                        # wherever your ccl directory is
    25102512$ ./KERNEL BOOT_IMAGE
    2511         </pre>
     2513          </pre>
    25122514            <p xmlns="http://www.w3.org/1999/xhtml">Where <em class="replaceable"><code>KERNEL</code></em> and
    25132515        <em class="replaceable"><code>BOOT_IMAGE</code></em> are the names of
    25142516        the kernel and boot image appropriate to the platform you are
    2515         running on.  See FIXTHIS</p>
     2517        running on.  See <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a></p>
    25162518            <p xmlns="http://www.w3.org/1999/xhtml">That should load a few dozen fasl files (printing a
    25172519        message as each file is loaded.) If all of these files
     
    25232525            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    25242526? (ccl:save-application "<em class="replaceable"><code>image_name</code></em>") ; Overwiting the existing heap image
    2525         </pre>
    2526             <p xmlns="http://www.w3.org/1999/xhtml">Where <em class="replaceable"><code>image_name</code></em> is the name
    2527         of the full heap image for your platform. See FIXTHIS.</p>
     2527          </pre>
     2528            <p xmlns="http://www.w3.org/1999/xhtml">Where <em class="replaceable"><code>image_name</code></em> is the name of
     2529        the full heap image for your platform. See
     2530        <a class="xref" href="#Platform-specific-filename-conventions" title="Table 3.1. Platform-specific filename conventions">Table 3.1, “Platform-specific filename conventions”</a>.</p>
    25282531            <p xmlns="http://www.w3.org/1999/xhtml">If things go wrong in the early stages of the loading
    25292532        sequence, errors are often difficult to debug; until a fair
     
    25412544          <div>
    25422545            <div>
    2543               <h2 class="title"><a id="id462094"></a>Chapter 4. Using Clozure CL</h2>
     2546              <h2 class="title"><a id="id322946"></a>Chapter 4. Using Clozure CL</h2>
    25442547            </div>
    25452548          </div>
     
    25492552            <dt>
    25502553              <span class="sect1">
    2551                 <a href="#id482055">4.1. Introduction</a>
     2554                <a href="#id370264">4.1. Introduction</a>
    25522555              </span>
    25532556            </dt>
     
    25662569                <dt>
    25672570                  <span class="sect2">
    2568                     <a href="#id496233">4.3.1. Characters</a>
     2571                    <a href="#id388381">4.3.1. Characters</a>
    25692572                  </span>
    25702573                </dt>
     
    25952598                <dt>
    25962599                  <span class="sect2">
    2597                     <a href="#id497617">4.4.1. Pathname Expansion</a>
     2600                    <a href="#id383711">4.4.1. Pathname Expansion</a>
    25982601                  </span>
    25992602                </dt>
     
    26052608                <dt>
    26062609                  <span class="sect2">
    2607                     <a href="#id497696">4.4.3. OS X (Darwin)</a>
     2610                    <a href="#id383814">4.4.3. OS X (Darwin)</a>
    26082611                  </span>
    26092612                </dt>
    26102613                <dt>
    26112614                  <span class="sect2">
    2612                     <a href="#id497707">4.4.4. Linux</a>
     2615                    <a href="#id383826">4.4.4. Linux</a>
    26132616                  </span>
    26142617                </dt>
    26152618                <dt>
    26162619                  <span class="sect2">
    2617                     <a href="#id497718">4.4.5. FreeBSD</a>
     2620                    <a href="#id383838">4.4.5. FreeBSD</a>
    26182621                  </span>
    26192622                </dt>
     
    26412644            <div>
    26422645              <div>
    2643                 <h2 class="title" style="clear: both"><a id="id482055"></a>4.1. Introduction</h2>
     2646                <h2 class="title" style="clear: both"><a id="id370264"></a>4.1. Introduction</h2>
    26442647              </div>
    26452648            </div>
     
    26692672    </p>
    26702673          <p xmlns="http://www.w3.org/1999/xhtml">
    2671       <a id="id460839" class="indexterm"></a>
    2672       <span><strong class="command"><em class="varname"><a id="trace"></a>TRACE</em> {<em class="replaceable"><code>keyword</code></em>
     2674      <a id="id358756" class="indexterm"></a>
     2675      <span class="command"><strong><em class="varname"><a id="trace"></a>TRACE</em> {<em class="replaceable"><code>keyword</code></em>
    26732676        <em class="replaceable"><code>global-value</code></em>}* {<em class="replaceable"><code>spec</code></em> |
    26742677        (<em class="replaceable"><code>spec</code></em> {<em class="replaceable"><code>keyword</code></em>
     
    31133116          </div>
    31143117          <p xmlns="http://www.w3.org/1999/xhtml">
    3115       <a id="id438298" class="indexterm"></a>
    3116       <span><strong class="command"><em class="varname"><a id="trace-level"></a>CCL:*TRACE-LEVEL*</em>    [Variable]</strong></span>
     3118      <a id="id388151" class="indexterm"></a>
     3119      <span class="command"><strong><em class="varname"><a id="trace-level"></a>CCL:*TRACE-LEVEL*</em>    [Variable]</strong></span>
    31173120    </p>
    31183121          <p xmlns="http://www.w3.org/1999/xhtml">Variable bound to the current nesting level during execution of before and after trace actions.  The default printing actions use it to determine the amount of indentation.</p>
    31193122          <p xmlns="http://www.w3.org/1999/xhtml">
    3120       <a id="id425701" class="indexterm"></a>
    3121       <span><strong class="command"><em class="varname"><a id="trace-max-indent"></a>CCL:*TRACE-MAX-INDENT*</em>    [Variable]</strong></span>
     3123      <a id="id388178" class="indexterm"></a>
     3124      <span class="command"><strong><em class="varname"><a id="trace-max-indent"></a>CCL:*TRACE-MAX-INDENT*</em>    [Variable]</strong></span>
    31223125    </p>
    31233126          <p xmlns="http://www.w3.org/1999/xhtml">The default before and after print actions will not indent by more than the value of <em class="varname">ccl:*trace-max-indent*</em> regardless of the current trace level.</p>
    31243127          <p xmlns="http://www.w3.org/1999/xhtml">
    3125       <a id="id496099" class="indexterm"></a>
    3126       <span><strong class="command"><em class="varname"><a id="trace-function"></a>CCL:TRACE-FUNCTION</em> <em class="replaceable"><code>spec</code></em> <em class="varname">&amp;key</em> {<em class="replaceable"><code>keyword</code></em> <em class="replaceable"><code>value</code></em>}*    [Function]</strong></span>
     3128      <a id="id388207" class="indexterm"></a>
     3129      <span class="command"><strong><em class="varname"><a id="trace-function"></a>CCL:TRACE-FUNCTION</em> <em class="replaceable"><code>spec</code></em> <em class="varname">&amp;key</em> {<em class="replaceable"><code>keyword</code></em> <em class="replaceable"><code>value</code></em>}*    [Function]</strong></span>
    31273130    </p>
    31283131          <p xmlns="http://www.w3.org/1999/xhtml">
     
    31313134    </p>
    31323135          <p xmlns="http://www.w3.org/1999/xhtml">
    3133       <a id="id496137" class="indexterm"></a>
    3134       <span><strong class="command"><em class="varname"><a id="trace-print-level"></a>CCL:*TRACE-PRINT-LEVEL*</em>   [Variable]</strong></span>
     3136      <a id="id388256" class="indexterm"></a>
     3137      <span class="command"><strong><em class="varname"><a id="trace-print-level"></a>CCL:*TRACE-PRINT-LEVEL*</em>   [Variable]</strong></span>
    31353138    </p>
    31363139          <p xmlns="http://www.w3.org/1999/xhtml">The default print actions bind <em class="varname">CL:*PRINT-LEVEL*</em> to this value while
     
    31393142      explicit printing done by user code.</p>
    31403143          <p xmlns="http://www.w3.org/1999/xhtml">
    3141       <a id="id496163" class="indexterm"></a>
    3142       <span><strong class="command"><em class="varname"><a id="trace-print-length"></a>CCL:*TRACE-PRINT-LENGTH*</em>    [Variable]</strong></span>
     3144      <a id="id388290" class="indexterm"></a>
     3145      <span class="command"><strong><em class="varname"><a id="trace-print-length"></a>CCL:*TRACE-PRINT-LENGTH*</em>    [Variable]</strong></span>
    31433146    </p>
    31443147          <p xmlns="http://www.w3.org/1999/xhtml">The default print actions bind <em class="varname">CL:*PRINT-LENGTH*</em> to this value while
     
    31473150      explicit printing done by user code.</p>
    31483151          <p xmlns="http://www.w3.org/1999/xhtml">
    3149       <a id="id496190" class="indexterm"></a>
    3150       <span><strong class="command"><em class="varname"><a id="trace-bar-frequency"></a>CCL:*TRACE-BAR-FREQUENCY*</em>    [Variable]</strong></span>
     3152      <a id="id388325" class="indexterm"></a>
     3153      <span class="command"><strong><em class="varname"><a id="trace-bar-frequency"></a>CCL:*TRACE-BAR-FREQUENCY*</em>    [Variable]</strong></span>
    31513154    </p>
    31523155          <p xmlns="http://www.w3.org/1999/xhtml">By default, this is nil. If non-nil it should be a integer,
     
    31663169    and one <code class="literal">STRING</code> type in Clozure CL.  There has been a
    31673170    lot of discussion about this decision which can be found by
    3168     searching the openmcl-devel archives at <a href="http://clozure.com/pipermail/openmcl-devel/" target="_top">http://clozure.com/pipermail/openmcl-devel/</a>.  Suffice it
     3171    searching the openmcl-devel archives at <a class="ulink" href="http://clozure.com/pipermail/openmcl-devel/" target="_top">http://clozure.com/pipermail/openmcl-devel/</a>.  Suffice it
    31693172    to say that we decided that the simplicity and speed advantages of
    31703173    only supporting UTF-32 outweigh the space disadvantage.</p>
     
    31733176              <div>
    31743177                <div>
    3175                   <h3 class="title"><a id="id496233"></a>4.3.1. Characters</h3>
     3178                  <h3 class="title"><a id="id388381"></a>4.3.1. Characters</h3>
    31763179                </div>
    31773180              </div>
     
    31833186    characters can be directly represented.  As of Unicode 5.0, only
    31843187    about 100,000 of 1,114,112 possible <code class="literal">CHAR-CODE</code>s
    3185     are actually defined. The function <span><strong class="function">CODE-CHAR</strong></span>
     3188    are actually defined. The function <span class="function"><strong>CODE-CHAR</strong></span>
    31863189    knows that certain ranges of code values (notably
    31873190    <code class="literal">#xd800</code>-<code class="literal">#xddff</code>) will never be
     
    31923195    values.</p>
    31933196            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL supports character names of the form
    3194     <code class="literal">u+xxxx</code> - where <code class="literal">x</code> is a
     3197    <code class="literal">u+xxxx</code>—where <code class="literal">x</code> is a
    31953198    sequence of one or more hex digits.  The value of the hex digits
    31963199    denotes the code of the character.  The <code class="literal">+</code>
     
    32033206    spaces replaced by underscores.  So
    32043207    <code class="literal">#\Greek_Capital_Letter_Epsilon</code> can be used to
    3205     refer to the character whose <span><strong class="function">CHAR-CODE</strong></span> is
     3208    refer to the character whose <span class="function"><strong>CHAR-CODE</strong></span> is
    32063209    <code class="literal">#x395</code>.  To see the complete list of supported
    32073210    character names, look just below the definition for
    3208     <span><strong class="function">register-character-name</strong></span> in
    3209     <code class="literal">ccl:level-1;l1-reader.lisp</code> see the complete
    3210     list of char</p>
     3211    <span class="function"><strong>register-character-name</strong></span> in
     3212    <code class="literal">ccl:level-1;l1-reader.lisp</code>.</p>
    32113213          </div>
    32123214          <div class="sect2" lang="en" xml:lang="en">
     
    32183220              </div>
    32193221            </div>
    3220             <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">OPEN</strong></span>, <span><strong class="function">LOAD</strong></span>, and
    3221     <span><strong class="function">COMPILE-FILE</strong></span> all take an
     3222            <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>OPEN</strong></span>, <span class="function"><strong>LOAD</strong></span>, and
     3223    <span class="function"><strong>COMPILE-FILE</strong></span> all take an
    32223224    <code class="literal">:EXTERNAL-FORMAT</code> keyword argument.  The value
    32233225    of <code class="literal">:EXTERNAL-FORMAT</code> can be
    32243226    <code class="literal">:DEFAULT</code> (the default value), a line
    3225     termination keyword (see <a href="#Line-Termination-Keywords" title="4.3.3. Line Termination Keywords">Section 4.3.3, “Line Termination Keywords”</a>), a character encoding
    3226     keyword (see <a href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>), an
     3227    termination keyword (see <a class="xref" href="#Line-Termination-Keywords" title="4.3.3. Line Termination Keywords">Section 4.3.3, “Line Termination Keywords”</a>), a character encoding
     3228    keyword (see <a class="xref" href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>), an
    32273229    external-format object created using
    3228     <span><strong class="function">CCL::MAKE-EXTERNAL-FORMAT</strong></span>(see <a href="#f_make-external-format" title="Function MAKE-EXTERNAL-FORMAT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-external-format</b></a>), or a plist with keys:
     3230    <span class="function"><strong>CCL::MAKE-EXTERNAL-FORMAT</strong></span> (see <a class="xref" href="#f_make-external-format" title="Function MAKE-EXTERNAL-FORMAT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-external-format</b></a>), or a plist with keys:
    32293231    <code class="literal">:DOMAIN</code>, <code class="literal">:CHARACTER-ENCODING</code>
    32303232    and <code class="literal">:LINE-TERMINATION</code>.  If
     
    32513253            <p xmlns="http://www.w3.org/1999/xhtml">EXTERNAL-FORMATs are objects (structures) with three
    32523254    read-only fields that can be accessed via the functions:
    3253     <span><strong class="function">EXTERNAL-FORMAT-DOMAIN</strong></span>,
    3254     <span><strong class="function">EXTERNAL-FORMAT-LINE-TERMINATION</strong></span> and
    3255     <span><strong class="function">EXTERNAL-FORMAT-CHARACTER-ENCODING</strong></span>.</p>
     3255    <span class="function"><strong>EXTERNAL-FORMAT-DOMAIN</strong></span>,
     3256    <span class="function"><strong>EXTERNAL-FORMAT-LINE-TERMINATION</strong></span> and
     3257    <span class="function"><strong>EXTERNAL-FORMAT-CHARACTER-ENCODING</strong></span>.</p>
    32563258            <p>
    32573259              <div class="refentrytitle">
     
    32603262                <br></br>
    32613263                <code>
    3262           <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-external-format</strong></span>
     3264          <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-external-format</strong></span>
    32633265          <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> domain character-encoding line-termination
    32643266          =&gt; external-format
     
    32723274              <div>
    32733275                <div class="refsect1" lang="en" xml:lang="en">
    3274                   <a xmlns="http://www.w3.org/1999/xhtml" id="id496501"></a>
     3276                  <a xmlns="http://www.w3.org/1999/xhtml" id="id382341"></a>
    32753277                  <div class="header">Arguments and Values:</div>
    32763278                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">domain</span></i>---This is used to indicate where the external
     
    32863288              <em xmlns="http://www.w3.org/1999/xhtml" class="parameter"><code>line-termination</code></em>.</p>
    32873289                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">character-encoding</span></i>---A keyword that specifies the character encoding
    3288               for the external format. <a xmlns="http://www.w3.org/1999/xhtml" href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>.  Defaults to
     3290              for the external format. <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>.  Defaults to
    32893291              <code xmlns="http://www.w3.org/1999/xhtml" class="literal">:DEFAULT</code> which means if
    32903292              <em xmlns="http://www.w3.org/1999/xhtml" class="parameter"><code>domain</code></em> is
     
    32993301              <code xmlns="http://www.w3.org/1999/xhtml" class="literal">:ISO-8859-1</code> encoding.</p>
    33003302                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">line-termination</span></i>---A keyword that indicates a line termination
    3301               keyword <a xmlns="http://www.w3.org/1999/xhtml" href="#Line-Termination-Keywords" title="4.3.3. Line Termination Keywords">Section 4.3.3, “Line Termination Keywords”</a>.
     3303              keyword <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Line-Termination-Keywords" title="4.3.3. Line Termination Keywords">Section 4.3.3, “Line Termination Keywords”</a>.
    33023304              Defaults to <code xmlns="http://www.w3.org/1999/xhtml" class="literal">:DEFAULT</code> which means
    33033305              use the value of the variable
    33043306              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">CCL:*DEFAULT-LINE-TERMINATION*</em>.</p>
    3305                   <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">[result]</span></i>---[description]</p>
     3307                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">external-format</span></i>---An external-format object as described above.</p>
    33063308                </div>
    33073309                <div class="refsect1" lang="en" xml:lang="en">
    3308                   <a xmlns="http://www.w3.org/1999/xhtml" id="id496634"></a>
     3310                  <a xmlns="http://www.w3.org/1999/xhtml" id="id382520"></a>
    33093311                  <div class="header">Description:</div>
    3310                   <p xmlns="http://www.w3.org/1999/xhtml">Despite the function's name, it doesn't necessarily
    3311         create a new, unique EXTERNAL-FORMAT object: two calls to
    3312         MAKE-EXTERNAL-FORMAT with the same arguments made in the
    3313         same dynamic environment will return the same (eq) object.
     3312                  <p xmlns="http://www.w3.org/1999/xhtml">Despite the function's name, it doesn't necessarily create a
     3313        new, unique EXTERNAL-FORMAT object: two calls to
     3314        MAKE-EXTERNAL-FORMAT with the same arguments made in the same
     3315        dynamic environment return the same (eq) object.
    33143316        </p>
    33153317                </div>
     
    34553457    character encodings.  Clozure CL implements some of these encodings as
    34563458    detailed below.  These encodings are part of the specification of
    3457     external formats <a href="#External-Formats" title="4.3.2. External Formats">Section 4.3.2, “External Formats”</a>.  When reading
     3459    external formats <a class="xref" href="#External-Formats" title="4.3.2. External Formats">Section 4.3.2, “External Formats”</a>.  When reading
    34583460    from a stream, characters are converted from the specified
    34593461    external character encoding to UTF-32.  When writing to a stream,
     
    34743476                <div>
    34753477                  <div>
    3476                     <h4 class="title"><a id="id496886"></a>4.3.4.1. Encoding Problems</h4>
     3478                    <h4 class="title"><a id="id382864"></a>4.3.4.1. Encoding Problems</h4>
    34773479                  </div>
    34783480                </div>
    34793481              </div>
    34803482              <p xmlns="http://www.w3.org/1999/xhtml">On output to streams with character encodings that can
    3481       encode the full range of Unicode - and on input from any stream
    3482       - "unencodable characters" are represented using the Unicode
    3483       #\Replacement_Character (= #\U+fffd); the presence of such a
    3484       character usually indicates that something got lost in
     3483      encode the full range of Unicode—and on input from any
     3484      stream—"unencodable characters" are represented using the
     3485      Unicode #\Replacement_Character (= #\U+fffd); the presence of
     3486      such a character usually indicates that something got lost in
    34853487      translation.  Either data wasn't encoded properly or there was a
    34863488      bug in the decoding process.</p>
     
    34903492                <div>
    34913493                  <div>
    3492                     <h4 class="title"><a id="id496902"></a>4.3.4.2. Byte Order Marks</h4>
     3494                    <h4 class="title"><a id="id382877"></a>4.3.4.2. Byte Order Marks</h4>
    34933495                  </div>
    34943496                </div>
     
    35033505      used with UTF-8 character encodings, where it is simply used to
    35043506      indicate that the encoding is UTF-8.)</p>
    3505               <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL will write a byte order mark as the first
    3506       character of a file or socket stream when the endianness of the
    3507       character encoding is not explicit.  Clozure CL also expects a
    3508       byte order mark on input from streams where the endianness is
    3509       not explicit. If a byte order mark is missing from input data,
    3510       that data is assumed to be in big-endian order.</p>
     3507              <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL writes a byte order mark as the first character
     3508      of a file or socket stream when the endianness of the character
     3509      encoding is not explicit.  Clozure CL also expects a byte order
     3510      mark on input from streams where the endianness is not
     3511      explicit. If a byte order mark is missing from input data, that
     3512      data is assumed to be in big-endian order.</p>
    35113513              <p xmlns="http://www.w3.org/1999/xhtml">A byte order mark from a UTF-8 encoded input stream is not
    3512       treated specially and and will just appear as normal character
    3513       from the input stream.  It is probably a good idea to skip over
    3514       this character.</p>
     3514      treated specially and just appears as a normal character from
     3515      the input stream.  It is probably a good idea to skip over this
     3516      character.</p>
    35153517            </div>
    35163518            <div class="sect3" lang="en" xml:lang="en">
     
    35183520                <div>
    35193521                  <div>
    3520                     <h4 class="title"><a id="id496941"></a>4.3.4.3. <span><strong class="function">DESCRIBE-CHARACTER-ENCODINGS</strong></span></h4>
     3522                    <h4 class="title"><a id="id382915"></a>4.3.4.3. <span class="function"><strong>DESCRIBE-CHARACTER-ENCODINGS</strong></span></h4>
    35213523                  </div>
    35223524                </div>
     
    35243526              <p xmlns="http://www.w3.org/1999/xhtml">The set of character encodings supported by Clozure CL can be
    35253527    retrieved by calling
    3526     <span><strong class="function">CCL:DESCRIBE-CHARACTER-ENCODINGS</strong></span>.</p>
     3528    <span class="function"><strong>CCL:DESCRIBE-CHARACTER-ENCODINGS</strong></span>.</p>
    35273529              <p>
    35283530                <div class="refentrytitle">
     
    35313533                  <br></br>
    35323534                  <code>
    3533             <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">describe-character-encodings</strong></span>
     3535            <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>describe-character-encodings</strong></span>
    35343536          </code>
    35353537                </div>
     
    35403542                <div>
    35413543                  <div class="refsect1" lang="en" xml:lang="en">
    3542                     <a xmlns="http://www.w3.org/1999/xhtml" id="id496992"></a>
     3544                    <a xmlns="http://www.w3.org/1999/xhtml" id="id382986"></a>
    35433545                    <div class="header">Description:</div>
    35443546                    <p xmlns="http://www.w3.org/1999/xhtml">Writes descriptions of all defined character encodings
     
    35493551                  </div>
    35503552                  <div class="refsect1" lang="en" xml:lang="en">
    3551                     <a xmlns="http://www.w3.org/1999/xhtml" id="id497009"></a>
     3553                    <a xmlns="http://www.w3.org/1999/xhtml" id="id383003"></a>
    35523554                    <div class="header">See Also:</div>
    3553                     <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>, <a href="#External-Formats" title="4.3.2. External Formats">Section 4.3.2, “External Formats”</a>, <a href="#Supported-Character-Encodings" title="4.3.4.4. Supported Character Encodings">Section 4.3.4.4, “Supported Character Encodings”</a></span>
     3555                    <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#Character-Encodings" title="4.3.4. Character Encodings">Section 4.3.4, “Character Encodings”</a>, <a class="xref" href="#External-Formats" title="4.3.2. External Formats">Section 4.3.2, “External Formats”</a>, <a class="xref" href="#Supported-Character-Encodings" title="4.3.4.4. Supported Character Encodings">Section 4.3.4.4, “Supported Character Encodings”</a></span>
    35543556                  </div>
    35553557                </div>
     
    35873589       EXTERNAL-FORMAT isn't explicitly specified.  The default for
    35883590       <em class="varname">*TERMINAL-IO*</em> can be set via the
    3589        <code class="literal">-K</code> command-line argument (see <a href="#Command-Line-Options" title="2.5. Command Line Options">Section 2.5, “Command Line Options”</a>).
     3591       <code class="literal">-K</code> command-line argument (see <a class="xref" href="#Command-Line-Options" title="2.5. Command Line Options">Section 2.5, “Command Line Options”</a>).
    35903592       </p>
    35913593                    <p>ISO-8859-1 just covers the first 256 Unicode code
     
    39663968              <div>
    39673969                <div>
    3968                   <h3 class="title"><a id="id497617"></a>4.4.1. Pathname Expansion</h3>
     3970                  <h3 class="title"><a id="id383711"></a>4.4.1. Pathname Expansion</h3>
    39693971                </div>
    39703972              </div>
     
    39863988            </div>
    39873989            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL sets up logical pathname translations for logical hosts:  <code class="literal">ccl</code> and <code class="literal">home</code></p>
    3988             <a xmlns="http://www.w3.org/1999/xhtml" id="id497658" class="indexterm"></a>
     3990            <a xmlns="http://www.w3.org/1999/xhtml" id="id383764" class="indexterm"></a>
    39893991            <p xmlns="http://www.w3.org/1999/xhtml">The <code class="literal">CCL</code> logical host should point to the
    39903992        <code class="literal">ccl</code> directory.  It is used for a variety of
     
    39943996        is set to the value of the environment variable
    39953997        <em class="varname">CCL_DEFAULT_DIRECTORY</em>, which is set by the
    3996         openmcl shell script <a href="#The-ccl-Shell-Script" title="2.3.1. The ccl Shell Script">Section 2.3.1, “The ccl Shell Script”</a>.  If
     3998        openmcl shell script <a class="xref" href="#The-ccl-Shell-Script" title="2.3.1. The ccl Shell Script">Section 2.3.1, “The ccl Shell Script”</a>.  If
    39973999        <em class="varname">CCL_DEFAULT_DIRECTORY</em> is not set, then it is set
    39984000        to the directory containing the current heap image.</p>
     
    40024004              <div>
    40034005                <div>
    4004                   <h3 class="title"><a id="id497696"></a>4.4.3. OS X (Darwin)</h3>
     4006                  <h3 class="title"><a id="id383814"></a>4.4.3. OS X (Darwin)</h3>
    40054007                </div>
    40064008              </div>
     
    40124014              <div>
    40134015                <div>
    4014                   <h3 class="title"><a id="id497707"></a>4.4.4. Linux</h3>
     4016                  <h3 class="title"><a id="id383826"></a>4.4.4. Linux</h3>
    40154017                </div>
    40164018              </div>
     
    40234025              <div>
    40244026                <div>
    4025                   <h3 class="title"><a id="id497718"></a>4.4.5. FreeBSD</h3>
     4027                  <h3 class="title"><a id="id383838"></a>4.4.5. FreeBSD</h3>
    40264028                </div>
    40274029              </div>
     
    40414043          </div>
    40424044          <p xmlns="http://www.w3.org/1999/xhtml">In release 1.2 and later, Clozure CL
    4043       supports <a href="#memory_mapped_file"><em class="glossterm">memory-mapped
     4045      supports <a class="glossterm" href="#memory_mapped_file"><em class="glossterm">memory-mapped
    40444046        files</em></a>. On operating systems that support memory-mapped
    40454047      files (including Mac OS X, Linux, and FreeBSD), the operating
     
    40884090      platforms.</p>
    40894091          <p xmlns="http://www.w3.org/1999/xhtml">
    4090       <a id="id497839" class="indexterm"></a>
    4091       <span><strong class="command"><em class="varname"><a id="map-file-to-ivector"></a>CCL:MAP-FILE-TO-IVECTOR</em>
     4092      <a id="id383954" class="indexterm"></a>
     4093      <span class="command"><strong><em class="varname"><a id="map-file-to-ivector"></a>CCL:MAP-FILE-TO-IVECTOR</em>
    40924094        <em class="parameter"><code>pathname</code></em>
    40934095        <em class="parameter"><code>element-type</code></em>
     
    41124114                <p>The element-type of the vector to be
    41134115            created. Specified as
    4114             a <a href="#type-specifier"><em class="glossterm">type-specifier</em></a>
     4116            a <a class="glossterm" href="#type-specifier"><em class="glossterm">type-specifier</em></a>
    41154117            that names a subtype of either <em class="varname">SIGNED-BYTE</em>
    41164118            or <em class="varname">UNSIGNED-BYTE</em>.</p>
     
    41284130    </p>
    41294131          <p xmlns="http://www.w3.org/1999/xhtml">The returned vector is
    4130       a <a href="#displaced-array"><em class="glossterm">displaced-array</em></a>
     4132      a <a class="glossterm" href="#displaced-array"><em class="glossterm">displaced-array</em></a>
    41314133      whose element-type is <em class="varname">(UPGRADED-ARRAY-ELEMENT-TYPE
    41324134        element-type)</em>. The target of the displaced array is a
     
    41484150      a memory error.</p>
    41494151          <p xmlns="http://www.w3.org/1999/xhtml">
    4150       <a id="id497966" class="indexterm"></a>
    4151       <span><strong class="command"><em class="varname"><a id="unmap-ivector"></a>CCL:UNMAP-IVECTOR</em>
     4152      <a id="id405599" class="indexterm"></a>
     4153      <span class="command"><strong><em class="varname"><a id="unmap-ivector"></a>CCL:UNMAP-IVECTOR</em>
    41524154        <em class="parameter"><code>displaced-array</code></em>
    41534155        [Function]</strong></span>
     
    41604162      target is an empty vector (of length zero).</p>
    41614163          <p xmlns="http://www.w3.org/1999/xhtml">
    4162       <a id="id497997" class="indexterm"></a>
    4163       <span><strong class="command"><em class="varname"><a id="map-file-to-octet-vector"></a>CCL:MAP-FILE-TO-OCTET-VECTOR</em>
     4164      <a id="id405634" class="indexterm"></a>
     4165      <span class="command"><strong><em class="varname"><a id="map-file-to-octet-vector"></a>CCL:MAP-FILE-TO-OCTET-VECTOR</em>
    41644166        <em class="parameter"><code>pathname</code></em>
    41654167        [Function]</strong></span>
     
    41704172      bytes.</p>
    41714173          <p xmlns="http://www.w3.org/1999/xhtml">
    4172       <a id="id498022" class="indexterm"></a>
    4173       <span><strong class="command"><em class="varname"><a id="unmap-octet-vector"></a>CCL:UNMAP-OCTET-VECTOR</em>
     4174      <a id="id405666" class="indexterm"></a>
     4175      <span class="command"><strong><em class="varname"><a id="unmap-octet-vector"></a>CCL:UNMAP-OCTET-VECTOR</em>
    41744176        <em class="parameter"><code>displaced-array</code></em>
    41754177        [Function]</strong></span>
     
    41874189          </div>
    41884190          <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL supports the definition
    4189       of <a href="#static_variable"><em class="glossterm">static
     4191      of <a class="glossterm" href="#static_variable"><em class="glossterm">static
    41904192        variables</em></a>, whose values are the same across threads,
    41914193      and which may not be dynamically bound. The value of a static
     
    42094211      static.</p>
    42104212          <p xmlns="http://www.w3.org/1999/xhtml">
    4211       <a id="id498089" class="indexterm"></a>
    4212       <span><strong class="command"><em class="varname"><a id="defstatic"></a>DEFSTATIC</em>
     4213      <a id="id405741" class="indexterm"></a>
     4214      <span class="command"><strong><em class="varname"><a id="defstatic"></a>DEFSTATIC</em>
    42134215        <em class="parameter"><code>var</code></em>
    42144216        <em class="parameter"><code>value</code></em>
     
    42474249          </div>
    42484250          <p xmlns="http://www.w3.org/1999/xhtml">Proclaims the
    4249       variable <a href="#special_variable"><em class="glossterm">special</em></a>,
     4251      variable <a class="glossterm" href="#special_variable"><em class="glossterm">special</em></a>,
    42504252      assigns the variable the supplied value, and assigns
    42514253      the <em class="varname">doc-string</em> to the
     
    42634265            </div>
    42644266          </div>
    4265           <a xmlns="http://www.w3.org/1999/xhtml" id="id498190" class="indexterm"></a>
     4267          <a xmlns="http://www.w3.org/1999/xhtml" id="id405853" class="indexterm"></a>
    42664268          <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL provides the
    42674269      function <code class="literal">CCL:SAVE-APPLICATION</code>, which creates a file
    42684270      containing an archived Lisp memory image.</p>
    42694271          <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL consists of a small executable called the
    4270       Lisp <a href="#lisp_image"><em class="glossterm">kernel</em></a>, which
     4272      Lisp <a class="glossterm" href="#lisp_image"><em class="glossterm">kernel</em></a>, which
    42714273      implements the very lowest level features of the Lisp system, and
    4272       an <a href="#lisp_image"><em class="glossterm">image</em></a>, which
     4274      an <a class="glossterm" href="#lisp_image"><em class="glossterm">image</em></a>, which
    42734275      contains the in-memory representation of most of the Lisp system,
    42744276      including functions, data structures, variables, and so on. When
     
    42894291      changes and later load them for use.</p>
    42904292          <p xmlns="http://www.w3.org/1999/xhtml">In fact, you can go further than that. You can replace
    4291       Clozure CL's <a href="#toplevel_function"><em class="glossterm">toplevel
     4293      Clozure CL's <a class="glossterm" href="#toplevel_function"><em class="glossterm">toplevel
    42924294        function</em></a> with your own, and then, when the image is
    42934295      loaded, the Lisp system immediately performs your tasks rather
     
    43104312      in an executable image.</p>
    43114313          <p xmlns="http://www.w3.org/1999/xhtml">On Mac OS X,
    4312       the <a href="#application_builder">application builder</a>
     4314      the <a class="link" href="#application_builder">application builder</a>
    43134315      uses <code class="literal">CCL:SAVE-APPLICATION</code> to create the executable
    4314       portion of the <a href="#application_bundle"><em class="glossterm">application
     4316      portion of the <a class="glossterm" href="#application_bundle"><em class="glossterm">application
    43154317        bundle</em></a>. Double-clicking the application bundle runs
    43164318      the executable image created
     
    43434345      converted, because address 0 can always be relied upon to refer to
    43444346      the same thing.</p>
    4345           <a xmlns="http://www.w3.org/1999/xhtml" id="id498382" class="indexterm"></a>
     4347          <a xmlns="http://www.w3.org/1999/xhtml" id="id406074" class="indexterm"></a>
    43464348          <p xmlns="http://www.w3.org/1999/xhtml">As of Clozure CL 1.2, the constant <code class="literal">CCL:+NULL-PTR+</code>
    43474349      refers to a <code class="literal">MACPTR</code> object that points to address 0.</p>
     
    43544356      or <code class="literal">opencml64</code> script.</p>
    43554357          <p xmlns="http://www.w3.org/1999/xhtml">
    4356       <a id="id498419" class="indexterm"></a>
    4357       <span><strong class="command"><em class="varname"><a id="save-application"></a>SAVE-APPLICATION</em>
     4358      <a id="id406122" class="indexterm"></a>
     4359      <span class="command"><strong><em class="varname"><a id="save-application"></a>SAVE-APPLICATION</em>
    43584360        <em class="parameter"><code>filename</code></em>
    43594361        <em class="varname">&amp;key</em>
     
    43924394                <p>If this parameter is not supplied, Clozure CL uses its
    43934395            default toplevel. The default toplevel runs
    4394             the <a href="#REPL"><em class="glossterm">read-eval-print
     4396            the <a class="glossterm" href="#REPL"><em class="glossterm">read-eval-print
    43954397              loop</em></a>.</p>
    43964398              </dd>
     
    44584460          <div>
    44594461            <div>
    4460               <h2 class="title"><a id="id471096"></a>Chapter 5. The Clozure CL IDE</h2>
     4462              <h2 class="title"><a id="id351866"></a>Chapter 5. The Clozure CL IDE</h2>
    44614463            </div>
    44624464          </div>
     
    44664468            <dt>
    44674469              <span class="sect1">
    4468                 <a href="#id447378">5.1. Introduction</a>
     4470                <a href="#id391992">5.1. Introduction</a>
    44694471              </span>
    44704472            </dt>
    44714473            <dt>
    44724474              <span class="sect1">
    4473                 <a href="#id461540">5.2. Building the IDE</a>
     4475                <a href="#id388704">5.2. Building the IDE</a>
    44744476              </span>
    44754477            </dt>
    44764478            <dt>
    44774479              <span class="sect1">
    4478                 <a href="#id460360">5.3. Running the IDE</a>
     4480                <a href="#id352336">5.3. Running the IDE</a>
    44794481              </span>
    44804482            </dt>
    44814483            <dt>
    44824484              <span class="sect1">
    4483                 <a href="#id443840">5.4. IDE Features</a>
     4485                <a href="#id349170">5.4. IDE Features</a>
    44844486              </span>
    44854487            </dt>
     
    44884490                <dt>
    44894491                  <span class="sect2">
    4490                     <a href="#id464744">5.4.1. Editor Windows</a>
     4492                    <a href="#id347206">5.4.1. Editor Windows</a>
    44914493                  </span>
    44924494                </dt>
    44934495                <dt>
    44944496                  <span class="sect2">
    4495                     <a href="#id427255">5.4.2. The Lisp Menu</a>
     4497                    <a href="#id362540">5.4.2. The Lisp Menu</a>
    44964498                  </span>
    44974499                </dt>
    44984500                <dt>
    44994501                  <span class="sect2">
    4500                     <a href="#id495106">5.4.3. The Tools Menu</a>
     4502                    <a href="#id373691">5.4.3. The Tools Menu</a>
    45014503                  </span>
    45024504                </dt>
    45034505                <dt>
    45044506                  <span class="sect2">
    4505                     <a href="#id483840">5.4.4. The Inspector Window</a>
     4507                    <a href="#id373711">5.4.4. The Inspector Window</a>
    45064508                  </span>
    45074509                </dt>
     
    45104512            <dt>
    45114513              <span class="sect1">
    4512                 <a href="#id495865">5.5. IDE Sources</a>
     4514                <a href="#id394341">5.5. IDE Sources</a>
    45134515              </span>
    45144516            </dt>
    45154517            <dt>
    45164518              <span class="sect1">
    4517                 <a href="#id464104">5.6. The Application Builder</a>
     4519                <a href="#id394374">5.6. The Application Builder</a>
    45184520              </span>
    45194521            </dt>
     
    45244526            <div>
    45254527              <div>
    4526                 <h2 class="title" style="clear: both"><a id="id447378"></a>5.1. Introduction</h2>
     4528                <h2 class="title" style="clear: both"><a id="id391992"></a>5.1. Introduction</h2>
    45274529              </div>
    45284530            </div>
     
    45464548            <div>
    45474549              <div>
    4548                 <h2 class="title" style="clear: both"><a id="id461540"></a>5.2. Building the IDE</h2>
     4550                <h2 class="title" style="clear: both"><a id="id388704"></a>5.2. Building the IDE</h2>
    45494551              </div>
    45504552            </div>
     
    45594561              <li>
    45604562                <p>Run ccl from the shell. The easiest way to do this is
    4561           generally to execute the openmcl or openmcl64 command.</p>
     4563          generally to execute the ccl or ccl64 command.</p>
    45624564              </li>
    45634565              <li>
     
    45704572      interactions builds the IDE:</p>
    45714573          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    4572       oshirion:ccl mikel$ openmcl64
    4573       Welcome to Clozure Common Lisp Version 1.2-r8516MS  (DarwinX8664)!
    4574       ? (require :cocoa-application)
    4575       ;Loading #P"ccl:cocoa-ide;fasls;cocoa-utils.dx64fsl.newest"...
    4576       ;Loading #P"ccl:cocoa-ide;fasls;cocoa-defaults.dx64fsl.newest"...
     4574oshirion:ccl mikel$ ccl64
     4575Welcome to Clozure Common Lisp Version 1.2-r9198M-trunk  (DarwinX8664)!
     4576? (require :cocoa-application)
     4577;Loading #P"ccl:cocoa-ide;fasls;cocoa-utils.dx64fsl.newest"...
     4578;Loading #P"ccl:cocoa-ide;fasls;cocoa-defaults.dx64fsl.newest"...
    45774579
    4578       [...many lines of "Compiling" and "Loading" omitted...]
     4580[...many lines of "Compiling" and "Loading" omitted...]
    45794581
    4580       Saving application to /usr/local/ccl/Clozure CL.app/
     4582Saving application to /usr/local/ccl/Clozure CL.app/
    45814583
    4582       oshirion:ccl mikel$
     4584oshirion:ccl mikel$
    45834585
    45844586    </pre>
     
    45934595            <div>
    45944596              <div>
    4595                 <h2 class="title" style="clear: both"><a id="id460360"></a>5.3. Running the IDE</h2>
     4597                <h2 class="title" style="clear: both"><a id="id352336"></a>5.3. Running the IDE</h2>
    45964598              </div>
    45974599            </div>
     
    46004602      application normally, by double-clicking its icon. When
    46014603      launched, the IDE initially displays a
    4602       single <a href="#listener_window"><em class="glossterm">listener
     4604      single <a class="glossterm" href="#listener_window"><em class="glossterm">listener
    46034605        window</em></a> that you can use to interact with Lisp. You
    46044606      can type Lisp expressions for evaluation at the prompt in the
    46054607      listener window. You can also
    4606       use <a href="#hemlock"><em class="glossterm">Hemlock</em></a> editing
     4608      use <a class="glossterm" href="#hemlock"><em class="glossterm">Hemlock</em></a> editing
    46074609      commands to edit the text of expressions in the listener
    46084610      window.</p>
     
    46124614            <div>
    46134615              <div>
    4614                 <h2 class="title" style="clear: both"><a id="id443840"></a>5.4. IDE Features</h2>
     4616                <h2 class="title" style="clear: both"><a id="id349170"></a>5.4. IDE Features</h2>
    46154617              </div>
    46164618            </div>
     
    46204622              <div>
    46214623                <div>
    4622                   <h3 class="title"><a id="id464744"></a>5.4.1. Editor Windows</h3>
     4624                  <h3 class="title"><a id="id347206"></a>5.4.1. Editor Windows</h3>
    46234625                </div>
    46244626              </div>
     
    46314633        the File menu.</p>
    46324634            <p xmlns="http://www.w3.org/1999/xhtml">Editor windows
    4633         implement <a href="#hemlock"><em class="glossterm">Hemlock</em></a>
     4635        implement <a class="glossterm" href="#hemlock"><em class="glossterm">Hemlock</em></a>
    46344636        editing commands. You can use all the editing and customization
    46354637        features of Hemlock within any editor window (including listener
     
    46404642              <div>
    46414643                <div>
    4642                   <h3 class="title"><a id="id427255"></a>5.4.2. The Lisp Menu</h3>
     4644                  <h3 class="title"><a id="id362540"></a>5.4.2. The Lisp Menu</h3>
    46434645                </div>
    46444646              </div>
     
    46554657            <p xmlns="http://www.w3.org/1999/xhtml">You can interrupt computations, trigger breaks, and select
    46564658        restarts from the Lisp menu. You can also display a backtrace or
    4657         open the <a href="#section_inspector_window">Inspector
     4659        open the <a class="link" href="#section_inspector_window">Inspector
    46584660          window</a>.</p>
    46594661          </div>
     
    46624664              <div>
    46634665                <div>
    4664                   <h3 class="title"><a id="id495106"></a>5.4.3. The Tools Menu</h3>
     4666                  <h3 class="title"><a id="id373691"></a>5.4.3. The Tools Menu</h3>
    46654667                </div>
    46664668              </div>
     
    46724674        symbols. The Processes window lists all threads running in the
    46734675        current Lisp session. If you double-click a process entry, Clozure CL
    4674         opens an <a href="#section_inspector_window">Inspector
     4676        opens an <a class="link" href="#section_inspector_window">Inspector
    46754677          window</a> on that process.</p>
    46764678          </div>
     
    46794681              <div>
    46804682                <div>
    4681                   <h3 class="title"><a id="id483840"></a>5.4.4. The Inspector Window</h3>
     4683                  <h3 class="title"><a id="id373711"></a>5.4.4. The Inspector Window</h3>
    46824684                </div>
    46834685              </div>
     
    47114713            <div>
    47124714              <div>
    4713                 <h2 class="title" style="clear: both"><a id="id495865"></a>5.5. IDE Sources</h2>
     4715                <h2 class="title" style="clear: both"><a id="id394341"></a>5.5. IDE Sources</h2>
    47144716              </div>
    47154717            </div>
     
    47374739            <div>
    47384740              <div>
    4739                 <h2 class="title" style="clear: both"><a id="id464104"></a>5.6. The Application Builder</h2>
     4741                <h2 class="title" style="clear: both"><a id="id394374"></a>5.6. The Application Builder</h2>
    47404742              </div>
    47414743            </div>
     
    47454747      interface: the application builder. The application builder
    47464748      constructs a
    4747       Cocoa <a href="#application_bundle"><em class="glossterm">application
     4749      Cocoa <a class="glossterm" href="#application_bundle"><em class="glossterm">application
    47484750        bundle</em></a> that runs a Lisp image when double-clicked. You
    47494751      can use the application builder to create Cocoa applications in
     
    47554757      the required subsystems, if necessary.</p>
    47564758          <p xmlns="http://www.w3.org/1999/xhtml">
    4757       <a id="id477838" class="indexterm"></a>
    4758       <span><strong class="command"><em class="varname"><a id="build-application"></a>BUILD-APPLICATION</em> <em class="varname"><em class="varname">&amp;key</em></em>
     4759      <a id="id394404" class="indexterm"></a>
     4760      <span class="command"><strong><em class="varname"><a id="build-application"></a>BUILD-APPLICATION</em> <em class="varname"><em class="varname">&amp;key</em></em>
    47594761        (<em class="parameter"><code>name</code></em> <em class="replaceable"><code>"MyApplication"</code></em>)
    47604762        (<em class="parameter"><code>type-string</code></em> <em class="replaceable"><code>"APPL"</code></em>)
     
    48104812              </dt>
    48114813              <dd>
    4812                 <p>Specifies the <a href="#creator_code"><em class="glossterm">creator
     4814                <p>Specifies the <a class="glossterm" href="#creator_code"><em class="glossterm">creator
    48134815              code</em></a>, which uniquely identifies the application
    48144816            under Mac OS X. The default creator code is that of Clozure CL. For
    48154817            more information about reserving and assigning creator codes,
    48164818            see
    4817             Apple's <a href="http://developer.apple.com/datatype/index.html" target="_top">developer
     4819            Apple's <a class="ulink" href="http://developer.apple.com/datatype/index.html" target="_top">developer
    48184820              page</a> on the topic.</p>
    48194821              </dd>
     
    48404842              <dd>
    48414843                <p>A list of pathnames, where each pathname identifies
    4842             a <a href="#nibfile"><em class="glossterm">nibfile</em></a> created
     4844            a <a class="glossterm" href="#nibfile"><em class="glossterm">nibfile</em></a> created
    48434845            with
    4844             Apple's <a href="#InterfaceBuilder"><em class="glossterm">InterfaceBuilder</em></a>
     4846            Apple's <a class="glossterm" href="#InterfaceBuilder"><em class="glossterm">InterfaceBuilder</em></a>
    48454847            application. <code class="code">BUILD-APPLICATION</code> copies each
    48464848            nibfile into the appropriate place in the application bundle,
     
    48584860              <dd>
    48594861                <p>The name of
    4860             the <a href="#nibfile"><em class="glossterm">nibfile</em></a> to load
     4862            the <a class="glossterm" href="#nibfile"><em class="glossterm">nibfile</em></a> to load
    48614863            initially when launching. The user-interface defined in this
    48624864            nibfile becomes the application's main interface. You must
     
    50545056                <dt>
    50555057                  <span class="sect2">
    5056                     <a href="#id466949">7.3.2.  As of August 2003:</a>
     5058                    <a href="#id356525">7.3.2.  As of August 2003:</a>
    50575059                  </span>
    50585060                </dt>
     
    53055307              <div>
    53065308                <div>
    5307                   <h3 class="title"><a id="id466949"></a>7.3.2.  As of August 2003:</h3>
     5309                  <h3 class="title"><a id="id356525"></a>7.3.2.  As of August 2003:</h3>
    53085310                </div>
    53095311              </div>
     
    57485750              <br></br>
    57495751              <code>
    5750               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">all-processes</strong></span> =&gt; result
     5752              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>all-processes</strong></span> =&gt; result
    57515753            </code>
    57525754            </div>
     
    57575759            <div>
    57585760              <div class="refsect1" lang="en" xml:lang="en">
    5759                 <a xmlns="http://www.w3.org/1999/xhtml" id="id442728"></a>
     5761                <a xmlns="http://www.w3.org/1999/xhtml" id="id399273"></a>
    57605762                <div class="header">Values:</div>
    57615763                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---a list of all lisp processes (threads)
     
    57635765              </div>
    57645766              <div class="refsect1" lang="en" xml:lang="en">
    5765                 <a xmlns="http://www.w3.org/1999/xhtml" id="id425580"></a>
     5767                <a xmlns="http://www.w3.org/1999/xhtml" id="id399299"></a>
    57665768                <div class="header">Description:</div>
    57675769                <p xmlns="http://www.w3.org/1999/xhtml">Returns a list of all lisp processes (threads) known
     
    57755777              </div>
    57765778              <div class="refsect1" lang="en" xml:lang="en">
    5777                 <a xmlns="http://www.w3.org/1999/xhtml" id="id455035"></a>
     5779                <a xmlns="http://www.w3.org/1999/xhtml" id="id399314"></a>
    57785780                <div class="header">See Also:</div>
    57795781                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    5780                   <a href="#v_current-process" title="Variable *CURRENT-PROCESS*">
     5782                  <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*">
    57815783                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b>
    57825784                  </a>
     
    57915793              <br></br>
    57925794              <code>
    5793               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>
     5795              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>
    57945796              name &amp;key
    57955797              persistent priority class stack-size vstack-size
     
    58035805            <div>
    58045806              <div class="refsect1" lang="en" xml:lang="en">
    5805                 <a xmlns="http://www.w3.org/1999/xhtml" id="id464285"></a>
     5807                <a xmlns="http://www.w3.org/1999/xhtml" id="id399383"></a>
    58065808                <div class="header">Arguments and Values:</div>
    58075809                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---a string, used to identify the process.</p>
     
    58425844              </div>
    58435845              <div class="refsect1" lang="en" xml:lang="en">
    5844                 <a xmlns="http://www.w3.org/1999/xhtml" id="id446912"></a>
     5846                <a xmlns="http://www.w3.org/1999/xhtml" id="id399571"></a>
    58455847                <div class="header">Description:</div>
    58465848                <p xmlns="http://www.w3.org/1999/xhtml">Creates and returns a new lisp process (thread) with the
     
    58495851              <span class="emphasis"><em>preset</em></span> (given
    58505852              an initial function to run, as by
    5851               <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>) and
     5853              <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>) and
    58525854              <span class="emphasis"><em>enabled</em></span>
    5853               (allowed to execute, as by <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>)
     5855              (allowed to execute, as by <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>)
    58545856              before it's able to actually do anything.</p>
    58555857                <p xmlns="http://www.w3.org/1999/xhtml">If <em class="varname">valueform</em> is a function, it is
     
    58635865              </div>
    58645866              <div class="refsect1" lang="en" xml:lang="en">
    5865                 <a xmlns="http://www.w3.org/1999/xhtml" id="id429285"></a>
     5867                <a xmlns="http://www.w3.org/1999/xhtml" id="id399624"></a>
    58665868                <div class="header">See Also:</div>
    5867                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>, <a href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
     5869                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>, <a class="xref" href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
    58685870              </div>
    58695871            </div>
     
    58745876              <strong>[Function]</strong>
    58755877              <br></br>
    5876               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-suspend</strong></span> process
     5878              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-suspend</strong></span> process
    58775879              =&gt; result</code>
    58785880            </div>
     
    58825884            <div>
    58835885              <div class="refsect1" lang="en" xml:lang="en">
    5884                 <a xmlns="http://www.w3.org/1999/xhtml" id="id426934"></a>
     5886                <a xmlns="http://www.w3.org/1999/xhtml" id="id399702"></a>
    58855887                <div class="header">Arguments and Values:</div>
    58865888                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    58885890                        and is now suspended; NIL otherwise.  That is, T if
    58895891                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">process</em>'s
    5890                         <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a>
     5892                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a>
    58915893                        transitioned from 0 to 1.</p>
    58925894              </div>
    58935895              <div class="refsect1" lang="en" xml:lang="en">
    5894                 <a xmlns="http://www.w3.org/1999/xhtml" id="id482610"></a>
     5896                <a xmlns="http://www.w3.org/1999/xhtml" id="id399756"></a>
    58955897                <div class="header">Description:</div>
    58965898                <p xmlns="http://www.w3.org/1999/xhtml">Suspends <em class="varname">process</em>, preventing it from
     
    59025904                <p xmlns="http://www.w3.org/1999/xhtml">
    59035905              Each
    5904               call to <span><strong class="function">process-suspend</strong></span> must be reversed by
    5905               a matching call to <a href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>
     5906              call to <span class="function"><strong>process-suspend</strong></span> must be reversed by
     5907              a matching call to <a class="xref" href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>
    59065908              before <em class="varname">process</em> is able to run.  What
    5907               <span><strong class="function">process-suspend</strong></span> actually does is increment
    5908               the <a href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a> of
     5909              <span class="function"><strong>process-suspend</strong></span> actually does is increment
     5910              the <a class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a> of
    59095911              <em class="varname">process</em>.
    59105912            </p>
     
    59145916              </div>
    59155917              <div class="refsect1" lang="en" xml:lang="en">
    5916                 <a xmlns="http://www.w3.org/1999/xhtml" id="id439814"></a>
     5918                <a xmlns="http://www.w3.org/1999/xhtml" id="id399812"></a>
    59175919                <div class="header">See Also:</div>
    5918                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>, <a href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a></span>
    5919               </div>
    5920               <div class="refsect1" lang="en" xml:lang="en">
    5921                 <a xmlns="http://www.w3.org/1999/xhtml" id="id463502"></a>
     5920                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>, <a class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a></span>
     5921              </div>
     5922              <div class="refsect1" lang="en" xml:lang="en">
     5923                <a xmlns="http://www.w3.org/1999/xhtml" id="id399837"></a>
    59225924                <div class="header">Notes:</div>
    5923                 <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">process-suspend</strong></span> was previously called
    5924               <span><strong class="function">process-disable</strong></span>.
    5925               <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>
     5925                <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>process-suspend</strong></span> was previously called
     5926              <span class="function"><strong>process-disable</strong></span>.
     5927              <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>
    59265928              now names a function for which there is no
    5927               obvious inverse, so <span><strong class="function">process-disable</strong></span>
     5929              obvious inverse, so <span class="function"><strong>process-disable</strong></span>
    59285930              is no longer
    59295931              defined.</p>
     
    59365938              <strong>[Function]</strong>
    59375939              <br></br>
    5938               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-resume</strong></span> process
     5940              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-resume</strong></span> process
    59395941              =&gt; result</code>
    59405942            </div>
     
    59455947            <div>
    59465948              <div class="refsect1" lang="en" xml:lang="en">
    5947                 <a xmlns="http://www.w3.org/1999/xhtml" id="id451272"></a>
     5949                <a xmlns="http://www.w3.org/1999/xhtml" id="id399918"></a>
    59485950                <div class="header">Arguments and Values:</div>
    59495951                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    59515953                        and is now runnable; NIL otherwise.  That is, T if
    59525954                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">process</em>'s
    5953                         <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a>
     5955                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a>
    59545956                        transitioned from  to 0.
    59555957                      </p>
    59565958              </div>
    59575959              <div class="refsect1" lang="en" xml:lang="en">
    5958                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504118"></a>
     5960                <a xmlns="http://www.w3.org/1999/xhtml" id="id399972"></a>
    59595961                <div class="header">Description:</div>
    59605962                <p xmlns="http://www.w3.org/1999/xhtml">Undoes the effect of a previous call to
    5961               <a href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>; if
     5963              <a class="xref" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>; if
    59625964              all such calls are undone, makes the process runnable. Has no
    59635965              effect if the process is not suspended.  What
    5964               <span><strong class="function">process-resume</strong></span> actually does is decrement
    5965               the <a href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a> of
     5966              <span class="function"><strong>process-resume</strong></span> actually does is decrement
     5967              the <a class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a> of
    59665968              <em class="varname">process</em>, to a minimum of 0.</p>
    59675969              </div>
    59685970              <div class="refsect1" lang="en" xml:lang="en">
    5969                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504143"></a>
     5971                <a xmlns="http://www.w3.org/1999/xhtml" id="id400003"></a>
    59705972                <div class="header">See Also:</div>
    5971                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>, <a href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a></span>
    5972               </div>
    5973               <div class="refsect1" lang="en" xml:lang="en">
    5974                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504162"></a>
     5973                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>, <a class="xref" href="#f_process-suspend-count" title="Function PROCESS-SUSPEND-COUNT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend-count</b></a></span>
     5974              </div>
     5975              <div class="refsect1" lang="en" xml:lang="en">
     5976                <a xmlns="http://www.w3.org/1999/xhtml" id="id400028"></a>
    59755977                <div class="header">Notes:</div>
    59765978                <p xmlns="http://www.w3.org/1999/xhtml">
    59775979              This was previously called PROCESS-ENABLE;
    5978               <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a> now does something slightly
     5980              <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a> now does something slightly
    59795981              different.
    59805982            </p>
     
    59885990              <br></br>
    59895991              <code>
    5990               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-suspend-count</strong></span>
     5992              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-suspend-count</strong></span>
    59915993              process =&gt; result
    59925994            </code>
     
    59986000            <div>
    59996001              <div class="refsect1" lang="en" xml:lang="en">
    6000                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504213"></a>
     6002                <a xmlns="http://www.w3.org/1999/xhtml" id="id400093"></a>
    60016003                <div class="header">Arguments and Values:</div>
    60026004                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
    60036005                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---The number of "outstanding"
    6004                         <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a> calls on
     6006                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a> calls on
    60056007                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">process</em>, or NIL if
    60066008                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">process</em> has expired.
     
    60086010              </div>
    60096011              <div class="refsect1" lang="en" xml:lang="en">
    6010                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504257"></a>
     6012                <a xmlns="http://www.w3.org/1999/xhtml" id="id400147"></a>
    60116013                <div class="header">Description:</div>
    6012                 <p xmlns="http://www.w3.org/1999/xhtml">An "outstanding" <a href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a> call
     6014                <p xmlns="http://www.w3.org/1999/xhtml">An "outstanding" <a class="xref" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a> call
    60136015              is one which has not yet been reversed by a call to
    6014               <a href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>.  A process expires when
     6016              <a class="xref" href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a>.  A process expires when
    60156017              its initial function returns, although it may later be
    60166018              reset.</p>
    60176019                <p xmlns="http://www.w3.org/1999/xhtml">A process is <span class="emphasis"><em>runnable</em></span> when it has a
    6018               <span><strong class="function">process-suspend-count</strong></span> of 0, has been
    6019               preset as by <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, and has been
    6020               enabled as by <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.  Newly-created
    6021               processes have a <span><strong class="function">process-suspend-count</strong></span> of
     6020              <span class="function"><strong>process-suspend-count</strong></span> of 0, has been
     6021              preset as by <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, and has been
     6022              enabled as by <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.  Newly-created
     6023              processes have a <span class="function"><strong>process-suspend-count</strong></span> of
    60226024              0.</p>
    60236025              </div>
    60246026              <div class="refsect1" lang="en" xml:lang="en">
    6025                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504296"></a>
     6027                <a xmlns="http://www.w3.org/1999/xhtml" id="id400197"></a>
    60266028                <div class="header">See Also:</div>
    6027                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>, <a href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a></span>
     6029                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-suspend" title="Function PROCESS-SUSPEND"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-suspend</b></a>, <a class="xref" href="#f_process-resume" title="Function PROCESS-RESUME"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-resume</b></a></span>
    60286030              </div>
    60296031            </div>
     
    60346036              <strong>[Function]</strong>
    60356037              <br></br>
    6036               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-preset</strong></span>
     6038              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-preset</strong></span>
    60376039              process function <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> args
    60386040              =&gt; result</code>
     
    60446046            <div>
    60456047              <div class="refsect1" lang="en" xml:lang="en">
    6046                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504353"></a>
     6048                <a xmlns="http://www.w3.org/1999/xhtml" id="id400273"></a>
    60476049                <div class="header">Arguments and Values:</div>
    60486050                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    60556057              </div>
    60566058              <div class="refsect1" lang="en" xml:lang="en">
    6057                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504419"></a>
     6059                <a xmlns="http://www.w3.org/1999/xhtml" id="id400348"></a>
    60586060                <div class="header">Description:</div>
    60596061                <p xmlns="http://www.w3.org/1999/xhtml">Typically used to initialize a newly-created or newly-reset
     
    60616063              becomes enabled, it will begin execution by
    60626064              applying <em class="varname">function</em> to <em class="varname">args</em>.
    6063               <span><strong class="function">process-preset</strong></span> does not enable
     6065              <span class="function"><strong>process-preset</strong></span> does not enable
    60646066              <em class="varname">process</em>,
    6065               although a process must be <span><strong class="function">process-preset</strong></span>
     6067              although a process must be <span class="function"><strong>process-preset</strong></span>
    60666068              before it can be enabled.  Processes are normally enabled by
    6067               <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.
     6069              <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.
    60686070            </p>
    60696071              </div>
    60706072              <div class="refsect1" lang="en" xml:lang="en">
    6071                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504456"></a>
     6073                <a xmlns="http://www.w3.org/1999/xhtml" id="id400392"></a>
    60726074                <div class="header">See Also:</div>
    6073                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>, <a href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
     6075                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>, <a class="xref" href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
    60746076              </div>
    60756077            </div>
     
    60806082              <strong>[Function]</strong>
    60816083              <br></br>
    6082               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-enable</strong></span>
     6084              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-enable</strong></span>
    60836085              process <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> timeout
    60846086            </code>
     
    60906092            <div>
    60916093              <div class="refsect1" lang="en" xml:lang="en">
    6092                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504517"></a>
     6094                <a xmlns="http://www.w3.org/1999/xhtml" id="id400474"></a>
    60936095                <div class="header">Arguments and Values:</div>
    60946096                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
    60956097                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">timeout</span></i>---a time interval in seconds.  May be any
    6096                         non-negative real number the <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">floor</strong></span> of
     6098                        non-negative real number the <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>floor</strong></span> of
    60976099                        which fits in 32 bits.  The default is 1.</p>
    60986100                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---undefined.</p>
    60996101              </div>
    61006102              <div class="refsect1" lang="en" xml:lang="en">
    6101                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504570"></a>
     6103                <a xmlns="http://www.w3.org/1999/xhtml" id="id400537"></a>
    61026104                <div class="header">Description:</div>
    61036105                <p xmlns="http://www.w3.org/1999/xhtml">Tries to begin the execution of <em class="varname">process</em>.
    61046106              An error is signaled if <em class="varname">process</em> has never
    6105               been <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>.  Otherwise,
     6107              been <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>.  Otherwise,
    61066108              <em class="varname">process</em> invokes its initial function.
    61076109            </p>
    6108                 <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">process-enable</strong></span> attempts to
     6110                <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>process-enable</strong></span> attempts to
    61096111              synchronize with <em class="varname">process</em>, which is presumed
    61106112              to be reset or in the act of resetting itself.  If this attempt
     
    61166118              </div>
    61176119              <div class="refsect1" lang="en" xml:lang="en">
    6118                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504614"></a>
     6120                <a xmlns="http://www.w3.org/1999/xhtml" id="id400585"></a>
    61196121                <div class="header">See Also:</div>
    6120                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
    6121               </div>
    6122               <div class="refsect1" lang="en" xml:lang="en">
    6123                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504637"></a>
     6122                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a class="xref" href="#f_process-run-function" title="Function PROCESS-RUN-FUNCTION"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-run-function</b></a></span>
     6123              </div>
     6124              <div class="refsect1" lang="en" xml:lang="en">
     6125                <a xmlns="http://www.w3.org/1999/xhtml" id="id400616"></a>
    61246126                <div class="header">Notes:</div>
    61256127                <p xmlns="http://www.w3.org/1999/xhtml">It would be nice to have more discussion of what it means
     
    61336135              <strong>[Function]</strong>
    61346136              <br></br>
    6135               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-run-function</strong></span>
     6137              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-run-function</strong></span>
    61366138              process-specifier function <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> args =&gt; process</code>
    61376139            </div>
     
    61426144            <div>
    61436145              <div class="refsect1" lang="en" xml:lang="en">
    6144                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504731"></a>
     6146                <a xmlns="http://www.w3.org/1999/xhtml" id="id400731"></a>
    61456147                <div class="header">Arguments and Values:</div>
    61466148                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---a string, used to identify the process.
    6147                         Passed to <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.</p>
     6149                        Passed to <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.</p>
    61486150                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">function</span></i>---a function, designated by itself or by a symbol
    61496151                        which names it.  Passed to
    6150                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">preset-process</strong></span>.
     6152                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>preset-process</strong></span>.
    61516153                      </p>
    6152                 <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">persistent</span></i>---a boolean, passed to <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.
     6154                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">persistent</span></i>---a boolean, passed to <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.
    61536155                      </p>
    61546156                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">priority</span></i>---ignored.</p>
    61556157                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">class</span></i>---a subclass of CCL:PROCESS.  Passed to
    6156                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.</p>
     6158                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.</p>
    61576159                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stack-size</span></i>---a size, in bytes.  Passed to
    6158                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.</p>
     6160                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.</p>
    61596161                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">vstack-size</span></i>---a size, in bytes.  Passed to
    6160                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.</p>
     6162                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.</p>
    61616163                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">tstack-size</span></i>---a size, in bytes.  Passed to
    6162                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-process</strong></span>.</p>
     6164                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-process</strong></span>.</p>
    61636165                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---the newly-created process.</p>
    61646166              </div>
    61656167              <div class="refsect1" lang="en" xml:lang="en">
    6166                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504882"></a>
     6168                <a xmlns="http://www.w3.org/1999/xhtml" id="id400920"></a>
    61676169                <div class="header">Description:</div>
    61686170                <p xmlns="http://www.w3.org/1999/xhtml">Creates a lisp process (thread) via
    6169               <a href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>,
    6170               presets it via <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, and
    6171               enables it via <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.  This means
     6171              <a class="xref" href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>,
     6172              presets it via <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, and
     6173              enables it via <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>.  This means
    61726174              that <em class="varname">process</em> will immediately begin to
    61736175              execute.
    6174               <span><strong class="function">process-run-function</strong></span> is
     6176              <span class="function"><strong>process-run-function</strong></span> is
    61756177              the simplest way to create and run a process.
    61766178            </p>
    61776179              </div>
    61786180              <div class="refsect1" lang="en" xml:lang="en">
    6179                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504909"></a>
     6181                <a xmlns="http://www.w3.org/1999/xhtml" id="id400955"></a>
    61806182                <div class="header">See Also:</div>
    6181                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a></span>
     6183                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-process" title="Function MAKE-PROCESS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-process</b></a>, <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>, <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a></span>
    61826184              </div>
    61836185            </div>
     
    61886190              <strong>[Function]</strong>
    61896191              <br></br>
    6190               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-interrupt</strong></span>
     6192              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-interrupt</strong></span>
    61916193              process function <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> args =&gt; result</code>
    61926194            </div>
     
    61986200            <div>
    61996201              <div class="refsect1" lang="en" xml:lang="en">
    6200                 <a xmlns="http://www.w3.org/1999/xhtml" id="id504972"></a>
     6202                <a xmlns="http://www.w3.org/1999/xhtml" id="id412921"></a>
    62016203                <div class="header">Arguments and Values:</div>
    62026204                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    62076209                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---the result of applying <em xmlns="http://www.w3.org/1999/xhtml" class="varname">function</em>
    62086210                        to <em xmlns="http://www.w3.org/1999/xhtml" class="varname">args</em> if <em xmlns="http://www.w3.org/1999/xhtml" class="varname">process</em>
    6209                         is the <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">current-process</strong></span>, otherwise
     6211                        is the <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>current-process</strong></span>, otherwise
    62106212                        NIL.</p>
    62116213              </div>
    62126214              <div class="refsect1" lang="en" xml:lang="en">
    6213                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505050"></a>
     6215                <a xmlns="http://www.w3.org/1999/xhtml" id="id413000"></a>
    62146216                <div class="header">Description:</div>
    62156217                <p xmlns="http://www.w3.org/1999/xhtml">Arranges for <em class="varname">process</em>
     
    62226224                <p xmlns="http://www.w3.org/1999/xhtml"><em class="varname">process</em> must be in an enabled state in
    62236225              order to respond
    6224               to a <span><strong class="function">process-interrupt</strong></span> request.  It's
     6226              to a <span class="function"><strong>process-interrupt</strong></span> request.  It's
    62256227              perfectly legal for a process to call
    6226               <span><strong class="function">process-interrupt</strong></span> on itself.</p>
    6227                 <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">process-interrupt</strong></span>
     6228              <span class="function"><strong>process-interrupt</strong></span> on itself.</p>
     6229                <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>process-interrupt</strong></span>
    62286230              uses asynchronous POSIX signals to interrupt threads. If the
    62296231              thread being interrupted is executing lisp code, it can
     
    62426244              </div>
    62436245              <div class="refsect1" lang="en" xml:lang="en">
    6244                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505119"></a>
     6246                <a xmlns="http://www.w3.org/1999/xhtml" id="id413067"></a>
    62456247                <div class="header">See Also:</div>
    62466248                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    6247                   <a href="#m_without-interrupts" title="Macro WITHOUT-INTERRUPTS">
     6249                  <a class="xref" href="#m_without-interrupts" title="Macro WITHOUT-INTERRUPTS">
    62486250                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">without-interrupts</b>
    62496251                  </a>
     
    62516253              </div>
    62526254              <div class="refsect1" lang="en" xml:lang="en">
    6253                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505134"></a>
     6255                <a xmlns="http://www.w3.org/1999/xhtml" id="id413084"></a>
    62546256                <div class="header">Notes:</div>
    62556257                <p xmlns="http://www.w3.org/1999/xhtml">It would probably be better for <em class="varname">result</em>
     
    62576259            </p>
    62586260                <p xmlns="http://www.w3.org/1999/xhtml">
    6259               <span><strong class="function">Process-interrupt</strong></span> works by sending signals
     6261              <span class="function"><strong>Process-interrupt</strong></span> works by sending signals
    62606262              between threads, via the C function
    6261               <span><strong class="function">#_pthread_signal</strong></span>.  It could be argued
     6263              <span class="function"><strong>#_pthread_signal</strong></span>.  It could be argued
    62626264              that it should be done in one of several possible other ways
    62636265              under
     
    62816283            <div>
    62826284              <div class="refsect1" lang="en" xml:lang="en">
    6283                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505189"></a>
     6285                <a xmlns="http://www.w3.org/1999/xhtml" id="id413143"></a>
    62846286                <div class="header">Value Type:</div>
    62856287                <p xmlns="http://www.w3.org/1999/xhtml">A lisp process (thread).</p>
    62866288              </div>
    62876289              <div class="refsect1" lang="en" xml:lang="en">
    6288                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505198"></a>
     6290                <a xmlns="http://www.w3.org/1999/xhtml" id="id413152"></a>
    62896291                <div class="header">Initial Value:</div>
    62906292                <p xmlns="http://www.w3.org/1999/xhtml">Bound separately in each process, to that process itself.
     
    62926294              </div>
    62936295              <div class="refsect1" lang="en" xml:lang="en">
    6294                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505209"></a>
     6296                <a xmlns="http://www.w3.org/1999/xhtml" id="id413162"></a>
    62956297                <div class="header">Description:</div>
    62966298                <p xmlns="http://www.w3.org/1999/xhtml">Used when lisp code needs to find out what process it is
     
    62986300              </div>
    62996301              <div class="refsect1" lang="en" xml:lang="en">
    6300                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505220"></a>
     6302                <a xmlns="http://www.w3.org/1999/xhtml" id="id413173"></a>
    63016303                <div class="header">See Also:</div>
    63026304                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    6303                   <a href="#f_all-processes" title="Function ALL-PROCESSES">
     6305                  <a class="xref" href="#f_all-processes" title="Function ALL-PROCESSES">
    63046306                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">all-processes</b>
    63056307                  </a>
     
    63136315              <strong>[Function]</strong>
    63146316              <br></br>
    6315               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-reset</strong></span>
     6317              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-reset</strong></span>
    63166318              process <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> kill-option =&gt; result</code>
    63176319            </div>
     
    63226324            <div>
    63236325              <div class="refsect1" lang="en" xml:lang="en">
    6324                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505273"></a>
     6326                <a xmlns="http://www.w3.org/1999/xhtml" id="id413235"></a>
    63256327                <div class="header">Arguments and Values:</div>
    63266328                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    63296331              </div>
    63306332              <div class="refsect1" lang="en" xml:lang="en">
    6331                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505321"></a>
     6333                <a xmlns="http://www.w3.org/1999/xhtml" id="id413283"></a>
    63326334                <div class="header">Description:</div>
    63336335                <p xmlns="http://www.w3.org/1999/xhtml">Causes <em class="varname">process</em> to cleanly exit
     
    63356337              is true, <em class="varname">process</em> then exits.  Otherwise, it
    63366338              enters a state where it can be
    6337               <a href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>. This
     6339              <a class="xref" href="#f_process-preset" title="Function PROCESS-PRESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-preset</b></a>. This
    63386340              is implemented by signaling a condition of type PROCESS-RESET;
    63396341              user-defined condition handlers should generally refrain from
     
    63456347              which has either entered the limbo of the reset state or exited
    63466348              has few ways of communicating either fact.
    6347               <a href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>
     6349              <a class="xref" href="#f_process-enable" title="Function PROCESS-ENABLE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-enable</b></a>
    63486350              can reliably determine when a process has entered
    63496351              the "limbo of the reset state", but can't predict how long the
    63506352              clean exit from ongoing computation might take: that depends on
    6351               the behavior of <span><strong class="function">unwind-protect</strong></span> cleanup
     6353              the behavior of <span class="function"><strong>unwind-protect</strong></span> cleanup
    63526354              forms, and of the OS scheduler.</p>
    63536355                <p xmlns="http://www.w3.org/1999/xhtml">Resetting a process other than
    6354               <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> involves the
    6355               use of <a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>.</p>
    6356               </div>
    6357               <div class="refsect1" lang="en" xml:lang="en">
    6358                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505383"></a>
     6356              <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> involves the
     6357              use of <a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>.</p>
     6358              </div>
     6359              <div class="refsect1" lang="en" xml:lang="en">
     6360                <a xmlns="http://www.w3.org/1999/xhtml" id="id413344"></a>
    63596361                <div class="header">See Also:</div>
    6360                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-kill" title="Function PROCESS-KILL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-kill</b></a>, <a href="#f_process-abort" title="Function PROCESS-ABORT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-abort</b></a></span>
     6362                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-kill" title="Function PROCESS-KILL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-kill</b></a>, <a class="xref" href="#f_process-abort" title="Function PROCESS-ABORT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-abort</b></a></span>
    63616363              </div>
    63626364            </div>
     
    63676369              <strong>[Function]</strong>
    63686370              <br></br>
    6369               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-kill</strong></span> process
     6371              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-kill</strong></span> process
    63706372              =&gt; result</code>
    63716373            </div>
     
    63766378            <div>
    63776379              <div class="refsect1" lang="en" xml:lang="en">
    6378                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505437"></a>
     6380                <a xmlns="http://www.w3.org/1999/xhtml" id="id413408"></a>
    63796381                <div class="header">Arguments and Values:</div>
    63806382                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    63826384              </div>
    63836385              <div class="refsect1" lang="en" xml:lang="en">
    6384                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505472"></a>
     6386                <a xmlns="http://www.w3.org/1999/xhtml" id="id413443"></a>
    63856387                <div class="header">Description:</div>
    63866388                <p xmlns="http://www.w3.org/1999/xhtml">Entirely equivalent to calling
     
    63896391              </div>
    63906392              <div class="refsect1" lang="en" xml:lang="en">
    6391                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505488"></a>
     6393                <a xmlns="http://www.w3.org/1999/xhtml" id="id413458"></a>
    63926394                <div class="header">See Also:</div>
    6393                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-reset" title="Function PROCESS-RESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-reset</b></a>, <a href="#f_process-abort" title="Function PROCESS-ABORT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-abort</b></a></span>
     6395                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-reset" title="Function PROCESS-RESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-reset</b></a>, <a class="xref" href="#f_process-abort" title="Function PROCESS-ABORT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-abort</b></a></span>
    63946396              </div>
    63956397            </div>
     
    64006402              <strong>[Function]</strong>
    64016403              <br></br>
    6402               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-abort</strong></span> process
     6404              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-abort</strong></span> process
    64036405              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> condition
    64046406              =&gt; NIL</code>
     
    64116413            <div>
    64126414              <div class="refsect1" lang="en" xml:lang="en">
    6413                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505548"></a>
     6415                <a xmlns="http://www.w3.org/1999/xhtml" id="id413530"></a>
    64146416                <div class="header">Arguments and Values:</div>
    64156417                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">process</span></i>---a lisp process (thread).</p>
     
    64176419              </div>
    64186420              <div class="refsect1" lang="en" xml:lang="en">
    6419                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505583"></a>
     6421                <a xmlns="http://www.w3.org/1999/xhtml" id="id413565"></a>
    64206422                <div class="header">Description:</div>
    64216423                <p xmlns="http://www.w3.org/1999/xhtml">Entirely equivalent to calling
    6422               (<a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a> <em class="varname">process</em>
    6423               (<span><strong class="function">lambda</strong></span> ()
    6424               (<span><strong class="function">abort</strong></span> <em class="varname">condition</em>))).
     6424              (<a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a> <em class="varname">process</em>
     6425              (<span class="function"><strong>lambda</strong></span> ()
     6426              (<span class="function"><strong>abort</strong></span> <em class="varname">condition</em>))).
    64256427              Causes <em class="varname">process</em> to transfer control to the
    6426               applicable handler or restart for <span><strong class="function">abort</strong></span>.</p>
     6428              applicable handler or restart for <span class="function"><strong>abort</strong></span>.</p>
    64276429                <p xmlns="http://www.w3.org/1999/xhtml">If <em class="varname">condition</em> is non-NIL,
    6428               <span><strong class="function">process-abort</strong></span> does not consider any
     6430              <span class="function"><strong>process-abort</strong></span> does not consider any
    64296431              handlers which are explicitly bound to conditions other than
    64306432              <em class="varname">condition</em>.</p>
    64316433              </div>
    64326434              <div class="refsect1" lang="en" xml:lang="en">
    6433                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505631"></a>
     6435                <a xmlns="http://www.w3.org/1999/xhtml" id="id413620"></a>
    64346436                <div class="header">See Also:</div>
    6435                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-reset" title="Function PROCESS-RESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-reset</b></a>, <a href="#f_process-kill" title="Function PROCESS-KILL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-kill</b></a></span>
     6437                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-reset" title="Function PROCESS-RESET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-reset</b></a>, <a class="xref" href="#f_process-kill" title="Function PROCESS-KILL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-kill</b></a></span>
    64366438              </div>
    64376439            </div>
     
    64506452            <div>
    64516453              <div class="refsect1" lang="en" xml:lang="en">
    6452                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505676"></a>
     6454                <a xmlns="http://www.w3.org/1999/xhtml" id="id413672"></a>
    64536455                <div class="header">Value Type:</div>
    64546456                <p xmlns="http://www.w3.org/1999/xhtml">A positive integer.</p>
    64556457              </div>
    64566458              <div class="refsect1" lang="en" xml:lang="en">
    6457                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505685"></a>
     6459                <a xmlns="http://www.w3.org/1999/xhtml" id="id413681"></a>
    64586460                <div class="header">Initial Value:</div>
    64596461                <p xmlns="http://www.w3.org/1999/xhtml">The clock resolution of the OS scheduler.  Currently,
     
    64626464              </div>
    64636465              <div class="refsect1" lang="en" xml:lang="en">
    6464                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505697"></a>
     6466                <a xmlns="http://www.w3.org/1999/xhtml" id="id413692"></a>
    64656467                <div class="header">Description:</div>
    64666468                <p xmlns="http://www.w3.org/1999/xhtml">This value is ordinarily of marginal interest at best,
     
    64706472              </div>
    64716473              <div class="refsect1" lang="en" xml:lang="en">
    6472                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505710"></a>
     6474                <a xmlns="http://www.w3.org/1999/xhtml" id="id413704"></a>
    64736475                <div class="header">See Also:</div>
    64746476                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    6475                   <a href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT">
     6477                  <a class="xref" href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT">
    64766478                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b>
    64776479                  </a>
     
    64856487              <strong>[Function]</strong>
    64866488              <br></br>
    6487               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-whostate</strong></span> process
     6489              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-whostate</strong></span> process
    64886490              =&gt; whostate</code>
    64896491            </div>
     
    64946496            <div>
    64956497              <div class="refsect1" lang="en" xml:lang="en">
    6496                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505793"></a>
     6498                <a xmlns="http://www.w3.org/1999/xhtml" id="id413794"></a>
    64976499                <div class="header">Description:</div>
    64986500                <p xmlns="http://www.w3.org/1999/xhtml">This information is primarily for the benefit of
     
    65016503              and why.</p>
    65026504                <p xmlns="http://www.w3.org/1999/xhtml">If the process is currently waiting in a call to
    6503               <a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a> or
    6504               <a href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, its
    6505               <span><strong class="function">process-whostate</strong></span> will be the value
     6505              <a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a> or
     6506              <a class="xref" href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, its
     6507              <span class="function"><strong>process-whostate</strong></span> will be the value
    65066508              which was passed to that function as <em class="varname">whostate</em>.
    65076509            </p>
    65086510              </div>
    65096511              <div class="refsect1" lang="en" xml:lang="en">
    6510                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505828"></a>
     6512                <a xmlns="http://www.w3.org/1999/xhtml" id="id413832"></a>
    65116513                <div class="header">See Also:</div>
    6512                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, <a href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    6513               </div>
    6514               <div class="refsect1" lang="en" xml:lang="en">
    6515                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505852"></a>
     6514                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, <a class="xref" href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6515              </div>
     6516              <div class="refsect1" lang="en" xml:lang="en">
     6517                <a xmlns="http://www.w3.org/1999/xhtml" id="id413859"></a>
    65166518                <div class="header">Notes:</div>
    65176519                <p xmlns="http://www.w3.org/1999/xhtml">This should arguably be SETFable, but doesn't seem to
     
    65266528              <br></br>
    65276529              <code>
    6528                 <span xmlns="http://www.w3.org/1999/xhtml">
    6529                   <strong class="function">process-allow-schedule</strong>
     6530                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     6531                  <strong>process-allow-schedule</strong>
    65306532                </span>
    65316533              </code>
     
    65376539            <div>
    65386540              <div class="refsect1" lang="en" xml:lang="en">
    6539                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505896"></a>
     6541                <a xmlns="http://www.w3.org/1999/xhtml" id="id413910"></a>
    65406542                <div class="header">Description:</div>
    65416543                <p xmlns="http://www.w3.org/1999/xhtml">Advises the OS scheduler that the current thread has nothing
     
    65466548              </div>
    65476549              <div class="refsect1" lang="en" xml:lang="en">
    6548                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505911"></a>
     6550                <a xmlns="http://www.w3.org/1999/xhtml" id="id413923"></a>
    65496551                <div class="header">See Also:</div>
    6550                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    6551               </div>
    6552               <div class="refsect1" lang="en" xml:lang="en">
    6553                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505947"></a>
     6552                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6553              </div>
     6554              <div class="refsect1" lang="en" xml:lang="en">
     6555                <a xmlns="http://www.w3.org/1999/xhtml" id="id413965"></a>
    65546556                <div class="header">Notes:</div>
    65556557                <p xmlns="http://www.w3.org/1999/xhtml">This is a holdover from the days of cooperative
     
    65646566              <strong>[Function]</strong>
    65656567              <br></br>
    6566               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-wait</strong></span>
     6568              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-wait</strong></span>
    65676569              whostate function <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> args =&gt; result</code>
    65686570            </div>
     
    65746576            <div>
    65756577              <div class="refsect1" lang="en" xml:lang="en">
    6576                 <a xmlns="http://www.w3.org/1999/xhtml" id="id505998"></a>
     6578                <a xmlns="http://www.w3.org/1999/xhtml" id="id414021"></a>
    65776579                <div class="header">Arguments and Values:</div>
    65786580                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">whostate</span></i>---a string, which will be the value of
    6579                         <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>
     6581                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>
    65806582                        while the process is waiting.</p>
    65816583                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">function</span></i>---a function, designated by itself or by a symbol
     
    65876589              </div>
    65886590              <div class="refsect1" lang="en" xml:lang="en">
    6589                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506068"></a>
     6591                <a xmlns="http://www.w3.org/1999/xhtml" id="id414091"></a>
    65906592                <div class="header">Description:</div>
    65916593                <p xmlns="http://www.w3.org/1999/xhtml">Causes the current lisp process (thread) to repeatedly
     
    65946596              returns NIL. After
    65956597              each failed call, yields the CPU as if by
    6596               <a href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a>.</p>
     6598              <a class="xref" href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a>.</p>
    65976599                <p xmlns="http://www.w3.org/1999/xhtml">
    6598               As with <a href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a>, it's almost
     6600              As with <a class="xref" href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a>, it's almost
    65996601              always more efficient to wait for some
    66006602              specific event to occur; this isn't exactly busy-waiting, but
     
    66046606              </div>
    66056607              <div class="refsect1" lang="en" xml:lang="en">
    6606                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506102"></a>
     6608                <a xmlns="http://www.w3.org/1999/xhtml" id="id414123"></a>
    66076609                <div class="header">See Also:</div>
    6608                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>, <a href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6610                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>, <a class="xref" href="#f_process-wait-with-timeout" title="Function PROCESS-WAIT-WITH-TIMEOUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait-with-timeout</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    66096611              </div>
    66106612            </div>
     
    66156617              <strong>[Function]</strong>
    66166618              <br></br>
    6617               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-wait-with-timeout</strong></span>
     6619              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-wait-with-timeout</strong></span>
    66186620              whostate ticks function args =&gt; result</code>
    66196621            </div>
     
    66246626            <div>
    66256627              <div class="refsect1" lang="en" xml:lang="en">
    6626                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506181"></a>
     6628                <a xmlns="http://www.w3.org/1999/xhtml" id="id414218"></a>
    66276629                <div class="header">Arguments and Values:</div>
    66286630                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">whostate</span></i>---a string, which will be the value of
    6629                         <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>
     6631                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>
    66306632                        while the process is waiting.</p>
    66316633                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ticks</span></i>---either a positive integer expressing a duration
    6632                         in "ticks" (see <a xmlns="http://www.w3.org/1999/xhtml" href="#v_ticks-per-second" title="Variable *TICKS-PER-SECOND*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*ticks-per-second*</b></a>),
     6634                        in "ticks" (see <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#v_ticks-per-second" title="Variable *TICKS-PER-SECOND*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*ticks-per-second*</b></a>),
    66336635                        or NIL.</p>
    66346636                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">function</span></i>---a function, designated by itself or by a symbol
     
    66366638                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">args</span></i>---a list of values, appropriate as arguments to
    66376639                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">function</em>.</p>
    6638                 <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---T if <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-wait-with-timeout</strong></span>
     6640                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---T if <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-wait-with-timeout</strong></span>
    66396641                        returned because its <em xmlns="http://www.w3.org/1999/xhtml" class="varname">function</em> returned
    66406642                        true, or NIL if it returned because the duration
     
    66426644              </div>
    66436645              <div class="refsect1" lang="en" xml:lang="en">
    6644                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506279"></a>
     6646                <a xmlns="http://www.w3.org/1999/xhtml" id="id414318"></a>
    66456647                <div class="header">Description:</div>
    66466648                <p xmlns="http://www.w3.org/1999/xhtml">If <em class="varname">ticks</em> is NIL, behaves exactly like
    6647               <a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, except for returning T.
     6649              <a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, except for returning T.
    66486650              Otherwise, <em class="varname">function</em> will be tested repeatedly,
    66496651              in the same
    6650               kind of test/yield loop as in <a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>&gt;
     6652              kind of test/yield loop as in <a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>&gt;
    66516653              until either <em class="varname">function</em> returns true,
    66526654              or the duration <em class="varname">ticks</em> has been exceeded.
    66536655            </p>
    66546656                <p xmlns="http://www.w3.org/1999/xhtml"> Having already read the descriptions of
    6655               <a href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a> and
    6656               <a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, the
     6657              <a class="xref" href="#f_process-allow-schedule" title="Function PROCESS-ALLOW-SCHEDULE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-allow-schedule</b></a> and
     6658              <a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, the
    66576659              astute reader has no doubt anticipated the observation that
    66586660              better alternatives should be used whenever possible.</p>
    66596661              </div>
    66606662              <div class="refsect1" lang="en" xml:lang="en">
    6661                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506323"></a>
     6663                <a xmlns="http://www.w3.org/1999/xhtml" id="id414362"></a>
    66626664                <div class="header">See Also:</div>
    6663                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#v_ticks-per-second" title="Variable *TICKS-PER-SECOND*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*ticks-per-second*</b></a>, <a href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>, <a href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6665                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#v_ticks-per-second" title="Variable *TICKS-PER-SECOND*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*ticks-per-second*</b></a>, <a class="xref" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>, <a class="xref" href="#f_process-wait" title="Function PROCESS-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-wait</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    66646666              </div>
    66656667            </div>
     
    66706672              <strong>[Macro]</strong>
    66716673              <br></br>
    6672               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">without-interrupts</strong></span>
     6674              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>without-interrupts</strong></span>
    66736675              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body =&gt; result</code>
    66746676            </div>
     
    66796681            <div>
    66806682              <div class="refsect1" lang="en" xml:lang="en">
    6681                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506410"></a>
     6683                <a xmlns="http://www.w3.org/1999/xhtml" id="id414465"></a>
    66826684                <div class="header">Arguments and Values:</div>
    66836685                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">body</span></i>---an implicit progn.</p>
     
    66866688              </div>
    66876689              <div class="refsect1" lang="en" xml:lang="en">
    6688                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506448"></a>
     6690                <a xmlns="http://www.w3.org/1999/xhtml" id="id414504"></a>
    66896691                <div class="header">Description:</div>
    66906692                <p xmlns="http://www.w3.org/1999/xhtml">Executes <em class="varname">body</em>
    6691               in an environment in which <a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>
     6693              in an environment in which <a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>
    66926694              requests are
    66936695              deferred. As noted in the description of
    6694               <a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>, this has nothing to do
     6696              <a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a>, this has nothing to do
    66956697              with the
    66966698              scheduling of other threads; it may be necessary to inhibit
    6697               <a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a> handling when
     6699              <a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b></a> handling when
    66986700              (for instance) modifying some data
    66996701              structure (for which the current thread holds an appropriate lock)
     
    67016703              </div>
    67026704              <div class="refsect1" lang="en" xml:lang="en">
    6703                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506477"></a>
     6705                <a xmlns="http://www.w3.org/1999/xhtml" id="id414532"></a>
    67046706                <div class="header">See Also:</div>
    67056707                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    6706                   <a href="#f_process-interrupt" title="Function PROCESS-INTERRUPT">
     6708                  <a class="xref" href="#f_process-interrupt" title="Function PROCESS-INTERRUPT">
    67076709                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-interrupt</b>
    67086710                  </a>
     
    67166718              <strong>[Function]</strong>
    67176719              <br></br>
    6718               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-lock</strong></span> <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em>
     6720              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-lock</strong></span> <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em>
    67196721              name =&gt; lock</code>
    67206722            </div>
     
    67256727            <div>
    67266728              <div class="refsect1" lang="en" xml:lang="en">
    6727                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506530"></a>
     6729                <a xmlns="http://www.w3.org/1999/xhtml" id="id414594"></a>
    67286730                <div class="header">Arguments and Values:</div>
    67296731                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---any lisp object; saved as part of
    67306732                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">lock</em>.  Typically a string or symbol
    6731                         which may appear in the <a xmlns="http://www.w3.org/1999/xhtml" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>s
     6733                        which may appear in the <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_process-whostate" title="Function PROCESS-WHOSTATE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-whostate</b></a>s
    67326734                        of threads which are waiting for <em xmlns="http://www.w3.org/1999/xhtml" class="varname">lock</em>.
    67336735                      </p>
     
    67356737              </div>
    67366738              <div class="refsect1" lang="en" xml:lang="en">
    6737                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506848"></a>
     6739                <a xmlns="http://www.w3.org/1999/xhtml" id="id414641"></a>
    67386740                <div class="header">Description:</div>
    67396741                <p xmlns="http://www.w3.org/1999/xhtml">Creates and returns a lock object, which can
     
    67456747              </div>
    67466748              <div class="refsect1" lang="en" xml:lang="en">
    6747                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506864"></a>
     6749                <a xmlns="http://www.w3.org/1999/xhtml" id="id414656"></a>
    67486750                <div class="header">See Also:</div>
    6749                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6751                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a class="xref" href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a class="xref" href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    67506752              </div>
    67516753            </div>
     
    67566758              <strong>[Macro]</strong>
    67576759              <br></br>
    6758               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-lock-grabbed</strong></span>
     6760              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-lock-grabbed</strong></span>
    67596761              (lock) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    67606762            </div>
     
    67656767            <div>
    67666768              <div class="refsect1" lang="en" xml:lang="en">
    6767                 <a xmlns="http://www.w3.org/1999/xhtml" id="id506951"></a>
     6769                <a xmlns="http://www.w3.org/1999/xhtml" id="id414759"></a>
    67686770                <div class="header">Arguments and Values:</div>
    67696771                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">lock</span></i>---an object of type CCL:LOCK.</p>
     
    67736775              </div>
    67746776              <div class="refsect1" lang="en" xml:lang="en">
    6775                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507002"></a>
     6777                <a xmlns="http://www.w3.org/1999/xhtml" id="id414810"></a>
    67766778                <div class="header">Description:</div>
    67776779                <p xmlns="http://www.w3.org/1999/xhtml">Waits until <em class="varname">lock</em> is either free or
     
    67796781              thread, then executes <em class="varname">body</em> with the
    67806782              lock owned by the calling thread. If <em class="varname">lock</em>
    6781               was free when <span><strong class="function">with-lock-grabbed</strong></span> was called,
     6783              was free when <span class="function"><strong>with-lock-grabbed</strong></span> was called,
    67826784              it is restored to a free state after <em class="varname">body</em>
    67836785              is executed.</p>
    67846786              </div>
    67856787              <div class="refsect1" lang="en" xml:lang="en">
    6786                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507032"></a>
     6788                <a xmlns="http://www.w3.org/1999/xhtml" id="id414839"></a>
    67876789                <div class="header">See Also:</div>
    6788                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6790                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a class="xref" href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a class="xref" href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    67896791              </div>
    67906792            </div>
     
    67956797              <strong>[Function]</strong>
    67966798              <br></br>
    6797               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">grab-lock</strong></span> lock</code>
     6799              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>grab-lock</strong></span> lock</code>
    67986800            </div>
    67996801            <div class="refentrytitle">Waits until a given lock can be obtained, then
     
    68036805            <div>
    68046806              <div class="refsect1" lang="en" xml:lang="en">
    6805                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507115"></a>
     6807                <a xmlns="http://www.w3.org/1999/xhtml" id="id414939"></a>
    68066808                <div class="header">Arguments and Values:</div>
    68076809                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">lock</span></i>---an object of type CCL:LOCK.</p>
    68086810              </div>
    68096811              <div class="refsect1" lang="en" xml:lang="en">
    6810                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507137"></a>
     6812                <a xmlns="http://www.w3.org/1999/xhtml" id="id414962"></a>
    68116813                <div class="header">Description:</div>
    68126814                <p xmlns="http://www.w3.org/1999/xhtml">Blocks until <em class="varname">lock</em> is owned by the
    68136815              calling thread.</p>
    6814                 <p xmlns="http://www.w3.org/1999/xhtml">The macro <a href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>
     6816                <p xmlns="http://www.w3.org/1999/xhtml">The macro <a class="xref" href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>
    68156817              <span class="emphasis"><em>could</em></span> be defined in
    6816               terms of <span><strong class="function">grab-lock</strong></span> and
    6817               <a href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, but it is actually
     6818              terms of <span class="function"><strong>grab-lock</strong></span> and
     6819              <a class="xref" href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, but it is actually
    68186820              implemented at a slightly lower level.</p>
    68196821              </div>
    68206822              <div class="refsect1" lang="en" xml:lang="en">
    6821                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507168"></a>
     6823                <a xmlns="http://www.w3.org/1999/xhtml" id="id414995"></a>
    68226824                <div class="header">See Also:</div>
    6823                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6825                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a class="xref" href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a class="xref" href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    68246826              </div>
    68256827            </div>
     
    68306832              <strong>[Function]</strong>
    68316833              <br></br>
    6832               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">release-lock</strong></span> lock</code>
     6834              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>release-lock</strong></span> lock</code>
    68336835            </div>
    68346836            <div class="refentrytitle">Relinquishes ownership of a given lock.</div>
     
    68376839            <div>
    68386840              <div class="refsect1" lang="en" xml:lang="en">
    6839                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507250"></a>
     6841                <a xmlns="http://www.w3.org/1999/xhtml" id="id415094"></a>
    68406842                <div class="header">Arguments and Values:</div>
    68416843                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">lock</span></i>---an object of type CCL:LOCK.</p>
    68426844              </div>
    68436845              <div class="refsect1" lang="en" xml:lang="en">
    6844                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507272"></a>
     6846                <a xmlns="http://www.w3.org/1999/xhtml" id="id415117"></a>
    68456847                <div class="header">Description:</div>
    68466848                <p xmlns="http://www.w3.org/1999/xhtml">Signals an error of type CCL:LOCK-NOT-OWNER if
     
    68486850              is not already owned by the calling thread; otherwise, undoes the
    68496851              effect of one previous
    6850               <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>.  If this means that
    6851               <span><strong class="function">release-lock</strong></span> has now been called on
     6852              <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>.  If this means that
     6853              <span class="function"><strong>release-lock</strong></span> has now been called on
    68526854              <em class="varname">lock</em> the same number of times as
    6853               <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a> has, <em class="varname">lock</em>
     6855              <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a> has, <em class="varname">lock</em>
    68546856              becomes free.</p>
    68556857              </div>
    68566858              <div class="refsect1" lang="en" xml:lang="en">
    6857                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507304"></a>
     6859                <a xmlns="http://www.w3.org/1999/xhtml" id="id415150"></a>
    68586860                <div class="header">See Also:</div>
    6859                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6861                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a class="xref" href="#f_try-lock" title="Function TRY-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">try-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    68606862              </div>
    68616863            </div>
     
    68666868              <strong>[Function]</strong>
    68676869              <br></br>
    6868               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">try-lock</strong></span> lock =&gt; result</code>
     6870              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>try-lock</strong></span> lock =&gt; result</code>
    68696871            </div>
    68706872            <div class="refentrytitle">Obtains the given lock, but only if it is not
     
    68746876            <div>
    68756877              <div class="refsect1" lang="en" xml:lang="en">
    6876                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507388"></a>
     6878                <a xmlns="http://www.w3.org/1999/xhtml" id="id415251"></a>
    68776879                <div class="header">Arguments and Values:</div>
    68786880                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">lock</span></i>---an object of type CCL:LOCK.</p>
     
    68816883              </div>
    68826884              <div class="refsect1" lang="en" xml:lang="en">
    6883                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507427"></a>
     6885                <a xmlns="http://www.w3.org/1999/xhtml" id="id415289"></a>
    68846886                <div class="header">Description:</div>
    68856887                <p xmlns="http://www.w3.org/1999/xhtml">Tests whether <em class="varname">lock</em>
    68866888              can be obtained without blocking - that is, either
    68876889              <em class="varname">lock</em> is already free, or it is already owned
    6888               by <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a>.  If it can,
     6890              by <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a>.  If it can,
    68896891              causes it to
    68906892              be owned by the calling lisp process (thread) and returns T.
     
    68946896              </div>
    68956897              <div class="refsect1" lang="en" xml:lang="en">
    6896                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507453"></a>
     6898                <a xmlns="http://www.w3.org/1999/xhtml" id="id415312"></a>
    68976899                <div class="header">See Also:</div>
    6898                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6900                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#m_with-lock-grabbed" title="Macro WITH-LOCK-GRABBED"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-lock-grabbed</b></a>, <a class="xref" href="#f_grab-lock" title="Function GRAB-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">grab-lock</b></a>, <a class="xref" href="#f_release-lock" title="Function RELEASE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">release-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    68996901              </div>
    69006902            </div>
     
    69056907              <strong>[Function]</strong>
    69066908              <br></br>
    6907               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-read-write-lock</strong></span>
     6909              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-read-write-lock</strong></span>
    69086910              =&gt; read-write-lock</code>
    69096911            </div>
     
    69146916            <div>
    69156917              <div class="refsect1" lang="en" xml:lang="en">
    6916                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507537"></a>
     6918                <a xmlns="http://www.w3.org/1999/xhtml" id="id415412"></a>
    69176919                <div class="header">Arguments and Values:</div>
    69186920                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">read-write-lock</span></i>---a newly-allocated object of type
     
    69206922              </div>
    69216923              <div class="refsect1" lang="en" xml:lang="en">
    6922                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507560"></a>
     6924                <a xmlns="http://www.w3.org/1999/xhtml" id="id415435"></a>
    69236925                <div class="header">Description:</div>
    69246926                <p xmlns="http://www.w3.org/1999/xhtml">Creates and returns an object of type CCL::READ-WRITE-LOCK.
     
    69316933              </div>
    69326934              <div class="refsect1" lang="en" xml:lang="en">
    6933                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507580"></a>
     6935                <a xmlns="http://www.w3.org/1999/xhtml" id="id415451"></a>
    69346936                <div class="header">See Also:</div>
    6935                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a>, <a href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    6936               </div>
    6937               <div class="refsect1" lang="en" xml:lang="en">
    6938                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507620"></a>
     6937                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a>, <a class="xref" href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6938              </div>
     6939              <div class="refsect1" lang="en" xml:lang="en">
     6940                <a xmlns="http://www.w3.org/1999/xhtml" id="id415499"></a>
    69396941                <div class="header">Notes:</div>
    69406942                <p xmlns="http://www.w3.org/1999/xhtml">There probably should be some way to
     
    69496951              <strong>[Macro]</strong>
    69506952              <br></br>
    6951               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-read-lock</strong></span>
     6953              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-read-lock</strong></span>
    69526954              (read-write-lock) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body =&gt; result</code>
    69536955            </div>
     
    69596961            <div>
    69606962              <div class="refsect1" lang="en" xml:lang="en">
    6961                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507671"></a>
     6963                <a xmlns="http://www.w3.org/1999/xhtml" id="id415556"></a>
    69626964                <div class="header">Arguments and Values:</div>
    69636965                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">read-write-lock</span></i>---an object of type
     
    69686970              </div>
    69696971              <div class="refsect1" lang="en" xml:lang="en">
    6970                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507723"></a>
     6972                <a xmlns="http://www.w3.org/1999/xhtml" id="id415607"></a>
    69716973                <div class="header">Description:</div>
    69726974                <p xmlns="http://www.w3.org/1999/xhtml">Waits until <em class="varname">read-write-lock</em> has no
    69736975              writer,
    6974               ensures that <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> is a
     6976              ensures that <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> is a
    69756977              reader of it, then executes <em class="varname">body</em>.
    69766978            </p>
    69776979                <p xmlns="http://www.w3.org/1999/xhtml">After executing <em class="varname">body</em>, if
    6978               <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> was not a reader of
     6980              <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> was not a reader of
    69796981              <em class="varname">read-write-lock</em> before
    6980               <span><strong class="function">with-read-lock</strong></span> was called, the lock is
     6982              <span class="function"><strong>with-read-lock</strong></span> was called, the lock is
    69816983              released.  If it was already a reader, it remains one.</p>
    69826984              </div>
    69836985              <div class="refsect1" lang="en" xml:lang="en">
    6984                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507760"></a>
     6986                <a xmlns="http://www.w3.org/1999/xhtml" id="id415647"></a>
    69856987                <div class="header">See Also:</div>
    6986                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     6988                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    69876989              </div>
    69886990            </div>
     
    69936995              <strong>[Macro]</strong>
    69946996              <br></br>
    6995               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-write-lock</strong></span>
     6997              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-write-lock</strong></span>
    69966998              (read-write-lock) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    69976999            </div>
     
    70027004            <div>
    70037005              <div class="refsect1" lang="en" xml:lang="en">
    7004                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507839"></a>
     7006                <a xmlns="http://www.w3.org/1999/xhtml" id="id415740"></a>
    70057007                <div class="header">Arguments and Values:</div>
    70067008                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">read-write-lock</span></i>---an object of type
     
    70117013              </div>
    70127014              <div class="refsect1" lang="en" xml:lang="en">
    7013                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507891"></a>
     7015                <a xmlns="http://www.w3.org/1999/xhtml" id="id415791"></a>
    70147016                <div class="header">Description:</div>
    70157017                <p xmlns="http://www.w3.org/1999/xhtml">Waits until <em class="varname">read-write-lock</em> has no
    7016               readers and no writer other than <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a>,
    7017               then ensures that <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> is the
     7018              readers and no writer other than <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a>,
     7019              then ensures that <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> is the
    70187020              writer of it.  With the lock held, executes <em class="varname">body</em>.
    70197021            </p>
    70207022                <p xmlns="http://www.w3.org/1999/xhtml">After executing <em class="varname">body</em>, if
    7021               <a href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> was not the writer of
     7023              <a class="xref" href="#v_current-process" title="Variable *CURRENT-PROCESS*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*current-process*</b></a> was not the writer of
    70227024              <em class="varname">read-write-lock</em> before
    7023               <span><strong class="function">with-write-lock</strong></span> was called, the lock is
     7025              <span class="function"><strong>with-write-lock</strong></span> was called, the lock is
    70247026              released.  If it was already the writer, it remains the
    70257027              writer.</p>
    70267028              </div>
    70277029              <div class="refsect1" lang="en" xml:lang="en">
    7028                 <a xmlns="http://www.w3.org/1999/xhtml" id="id507933"></a>
     7030                <a xmlns="http://www.w3.org/1999/xhtml" id="id415836"></a>
    70297031                <div class="header">See Also:</div>
    7030                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7032                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    70317033              </div>
    70327034            </div>
     
    70377039              <strong>[Function]</strong>
    70387040              <br></br>
    7039               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-semaphore</strong></span>
     7041              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-semaphore</strong></span>
    70407042              =&gt; semaphore</code>
    70417043            </div>
     
    70467048            <div>
    70477049              <div class="refsect1" lang="en" xml:lang="en">
    7048                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508009"></a>
     7050                <a xmlns="http://www.w3.org/1999/xhtml" id="id415926"></a>
    70497051                <div class="header">Arguments and Values:</div>
    70507052                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">semaphore</span></i>---a newly-allocated object of type CCL:SEMAPHORE.</p>
    70517053              </div>
    70527054              <div class="refsect1" lang="en" xml:lang="en">
    7053                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508031"></a>
     7055                <a xmlns="http://www.w3.org/1999/xhtml" id="id415948"></a>
    70547056                <div class="header">Description:</div>
    70557057                <p xmlns="http://www.w3.org/1999/xhtml">Creates and returns an object of type CCL:SEMAPHORE.
     
    70607062              </div>
    70617063              <div class="refsect1" lang="en" xml:lang="en">
    7062                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508048"></a>
     7064                <a xmlns="http://www.w3.org/1999/xhtml" id="id415963"></a>
    70637065                <div class="header">See Also:</div>
    7064                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_signal-semaphore" title="Function SIGNAL-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">signal-semaphore</b></a>, <a href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7066                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_signal-semaphore" title="Function SIGNAL-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">signal-semaphore</b></a>, <a class="xref" href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a class="xref" href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    70657067              </div>
    70667068            </div>
     
    70717073              <strong>[Function]</strong>
    70727074              <br></br>
    7073               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">signal-semaphore</strong></span>
     7075              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>signal-semaphore</strong></span>
    70747076              semaphore =&gt; result</code>
    70757077            </div>
     
    70807082            <div>
    70817083              <div class="refsect1" lang="en" xml:lang="en">
    7082                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508127"></a>
     7084                <a xmlns="http://www.w3.org/1999/xhtml" id="id416058"></a>
    70837085                <div class="header">Arguments and Values:</div>
    70847086                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">semaphore</span></i>---an object of type CCL:SEMAPHORE.</p>
     
    70877089              </div>
    70887090              <div class="refsect1" lang="en" xml:lang="en">
    7089                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508164"></a>
     7091                <a xmlns="http://www.w3.org/1999/xhtml" id="id416094"></a>
    70907092                <div class="header">Description:</div>
    70917093                <p xmlns="http://www.w3.org/1999/xhtml">Atomically increments <em class="varname">semaphore</em>'s
     
    70947096              </div>
    70957097              <div class="refsect1" lang="en" xml:lang="en">
    7096                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508179"></a>
     7098                <a xmlns="http://www.w3.org/1999/xhtml" id="id416108"></a>
    70977099                <div class="header">See Also:</div>
    7098                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    7099               </div>
    7100               <div class="refsect1" lang="en" xml:lang="en">
    7101                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508226"></a>
     7100                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a class="xref" href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7101              </div>
     7102              <div class="refsect1" lang="en" xml:lang="en">
     7103                <a xmlns="http://www.w3.org/1999/xhtml" id="id416161"></a>
    71027104                <div class="header">Notes:</div>
    71037105                <p xmlns="http://www.w3.org/1999/xhtml"><em class="varname">result</em> should probably be interpreted
    7104               and acted on by <span><strong class="function">signal-semaphore</strong></span>, because
     7106              and acted on by <span class="function"><strong>signal-semaphore</strong></span>, because
    71057107              it is not likely to be meaningful to a lisp program, and the
    71067108              most common cause of failure is a type error.</p>
     
    71137115              <strong>[Function]</strong>
    71147116              <br></br>
    7115               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">wait-on-semaphore</strong></span>
     7117              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>wait-on-semaphore</strong></span>
    71167118              semaphore =&gt; result</code>
    71177119            </div>
     
    71227124            <div>
    71237125              <div class="refsect1" lang="en" xml:lang="en">
    7124                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508281"></a>
     7126                <a xmlns="http://www.w3.org/1999/xhtml" id="id416221"></a>
    71257127                <div class="header">Arguments and Values:</div>
    71267128                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">semaphore</span></i>---an object of type CCL:SEMAPHORE.</p>
     
    71297131              </div>
    71307132              <div class="refsect1" lang="en" xml:lang="en">
    7131                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508319"></a>
     7133                <a xmlns="http://www.w3.org/1999/xhtml" id="id416257"></a>
    71327134                <div class="header">Description:</div>
    71337135                <p xmlns="http://www.w3.org/1999/xhtml">Waits until <em class="varname">semaphore</em>
     
    71377139              </div>
    71387140              <div class="refsect1" lang="en" xml:lang="en">
    7139                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508334"></a>
     7141                <a xmlns="http://www.w3.org/1999/xhtml" id="id416272"></a>
    71407142                <div class="header">See Also:</div>
    7141                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_signal-semaphore" title="Function SIGNAL-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">signal-semaphore</b></a>, <a href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    7142               </div>
    7143               <div class="refsect1" lang="en" xml:lang="en">
    7144                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508386"></a>
     7143                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_signal-semaphore" title="Function SIGNAL-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">signal-semaphore</b></a>, <a class="xref" href="#f_timed-wait-on-semaphore" title="Function TIMED-WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">timed-wait-on-semaphore</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7144              </div>
     7145              <div class="refsect1" lang="en" xml:lang="en">
     7146                <a xmlns="http://www.w3.org/1999/xhtml" id="id416325"></a>
    71457147                <div class="header">Notes:</div>
    71467148                <p xmlns="http://www.w3.org/1999/xhtml"><em class="varname">result</em> should probably be interpreted
    7147               and acted on by <span><strong class="function">wait-on-semaphore</strong></span>, because
     7149              and acted on by <span class="function"><strong>wait-on-semaphore</strong></span>, because
    71487150              it is not likely to be meaningful to a lisp program, and the
    71497151              most common cause of failure is a type error.</p>
     
    71567158              <strong>[Function]</strong>
    71577159              <br></br>
    7158               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">timed-wait-on-semaphore</strong></span>
     7160              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>timed-wait-on-semaphore</strong></span>
    71597161              semaphore timeout =&gt; result</code>
    71607162            </div>
     
    71667168            <div>
    71677169              <div class="refsect1" lang="en" xml:lang="en">
    7168                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508442"></a>
     7170                <a xmlns="http://www.w3.org/1999/xhtml" id="id416385"></a>
    71697171                <div class="header">Arguments and Values:</div>
    71707172                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">semaphore</span></i>---An object of type CCL:SEMAPHORE.</p>
    71717173                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">timeout</span></i>---a time interval in seconds.  May be any
    7172                         non-negative real number the <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">floor</strong></span> of
     7174                        non-negative real number the <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>floor</strong></span> of
    71737175                        which fits in 32 bits.  The default is 1.</p>
    7174                 <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---T if <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">timed-wait-on-semaphore</strong></span>
     7176                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---T if <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>timed-wait-on-semaphore</strong></span>
    71757177                        returned because it was able to decrement the count of
    71767178                        <em xmlns="http://www.w3.org/1999/xhtml" class="varname">semaphore</em>; NIL if it returned because
     
    71797181              </div>
    71807182              <div class="refsect1" lang="en" xml:lang="en">
    7181                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508509"></a>
     7183                <a xmlns="http://www.w3.org/1999/xhtml" id="id416451"></a>
    71827184                <div class="header">Description:</div>
    71837185                <p xmlns="http://www.w3.org/1999/xhtml">Waits until <em class="varname">semaphore</em>
     
    71887190              </div>
    71897191              <div class="refsect1" lang="en" xml:lang="en">
    7190                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508527"></a>
     7192                <a xmlns="http://www.w3.org/1999/xhtml" id="id416468"></a>
    71917193                <div class="header">See Also:</div>
    7192                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7194                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_wait-on-semaphore" title="Function WAIT-ON-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">wait-on-semaphore</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    71937195              </div>
    71947196            </div>
     
    71997201              <strong>[Function]</strong>
    72007202              <br></br>
    7201               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-input-wait</strong></span>
     7203              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-input-wait</strong></span>
    72027204              fd <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> timeout</code>
    72037205            </div>
     
    72087210            <div>
    72097211              <div class="refsect1" lang="en" xml:lang="en">
    7210                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508613"></a>
     7212                <a xmlns="http://www.w3.org/1999/xhtml" id="id416561"></a>
    72117213                <div class="header">Arguments and Values:</div>
    72127214                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">fd</span></i>---a file descriptor, which is a non-negative integer
    72137215                        used by the OS to refer to an open file, socket, or similar
    7214                         I/O connection.  See <a xmlns="http://www.w3.org/1999/xhtml" href="#f_stream-device" title="Generic Function CCL::STREAM-DEVICE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::stream-device</b></a>.</p>
     7216                        I/O connection.  See <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_stream-device" title="Generic Function CCL::STREAM-DEVICE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::stream-device</b></a>.</p>
    72157217                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">timeout</span></i>---either NIL or a time interval in milliseconds.  Must be a non-negative integer.  The default is NIL.</p>
    72167218              </div>
    72177219              <div class="refsect1" lang="en" xml:lang="en">
    7218                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508657"></a>
     7220                <a xmlns="http://www.w3.org/1999/xhtml" id="id416603"></a>
    72197221                <div class="header">Description:</div>
    72207222                <p xmlns="http://www.w3.org/1999/xhtml">Wait until input is available on <em class="varname">fd</em>.
    7221               This uses the <span><strong class="function">select()</strong></span> system call, and is
     7223              This uses the <span class="function"><strong>select()</strong></span> system call, and is
    72227224              generally a fairly
    72237225              efficient way of blocking while waiting for input. More
    7224               accurately, <span><strong class="function">process-input-wait</strong></span>
     7226              accurately, <span class="function"><strong>process-input-wait</strong></span>
    72257227              waits until it's possible to read
    72267228              from fd without blocking, or until <em class="varname">timeout</em>, if
     
    72327234              </div>
    72337235              <div class="refsect1" lang="en" xml:lang="en">
    7234                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508690"></a>
     7236                <a xmlns="http://www.w3.org/1999/xhtml" id="id416636"></a>
    72357237                <div class="header">See Also:</div>
    7236                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    7237               </div>
    7238               <div class="refsect1" lang="en" xml:lang="en">
    7239                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508727"></a>
     7238                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7239              </div>
     7240              <div class="refsect1" lang="en" xml:lang="en">
     7241                <a xmlns="http://www.w3.org/1999/xhtml" id="id416674"></a>
    72407242                <div class="header">Notes:</div>
    72417243                <p xmlns="http://www.w3.org/1999/xhtml">
    7242               <span><strong class="function">process-input-wait</strong></span> has a timeout parameter,
     7244              <span class="function"><strong>process-input-wait</strong></span> has a timeout parameter,
    72437245              and
    7244               <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a> does not.  This
     7246              <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a> does not.  This
    72457247              inconsistency should probably be corrected.
    72467248            </p>
     
    72537255              <strong>[Function]</strong>
    72547256              <br></br>
    7255               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-output-wait</strong></span>
     7257              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-output-wait</strong></span>
    72567258              fd  <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> timeout</code>
    72577259            </div>
     
    72627264            <div>
    72637265              <div class="refsect1" lang="en" xml:lang="en">
    7264                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508785"></a>
     7266                <a xmlns="http://www.w3.org/1999/xhtml" id="id416738"></a>
    72657267                <div class="header">Arguments and Values:</div>
    72667268                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">fd</span></i>---a file descriptor, which is a non-negative integer
    72677269                        used by the OS to refer to an open file, socket, or similar
    7268                         I/O connection.  See <a xmlns="http://www.w3.org/1999/xhtml" href="#f_stream-device" title="Generic Function CCL::STREAM-DEVICE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::stream-device</b></a>.</p>
     7270                        I/O connection.  See <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#f_stream-device" title="Generic Function CCL::STREAM-DEVICE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::stream-device</b></a>.</p>
    72697271                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">timeout</span></i>---either NIL or a time interval in milliseconds.  Must be a non-negative integer.  The default is NIL.</p>
    72707272              </div>
    72717273              <div class="refsect1" lang="en" xml:lang="en">
    7272                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508829"></a>
     7274                <a xmlns="http://www.w3.org/1999/xhtml" id="id416780"></a>
    72737275                <div class="header">Description:</div>
    72747276                <p xmlns="http://www.w3.org/1999/xhtml">Wait until output is possible on <em class="varname">fd</em> or until <em class="varname">timeout</em>, if
    72757277              it is not NIL, has been exceeded.
    7276               This uses the <span><strong class="function">select()</strong></span> system call, and is
     7278              This uses the <span class="function"><strong>select()</strong></span> system call, and is
    72777279              generally a fairly
    72787280              efficient way of blocking while waiting to output.</p>
    7279                 <p xmlns="http://www.w3.org/1999/xhtml">If <span><strong class="function">process-output-wait</strong></span> is called on
     7281                <p xmlns="http://www.w3.org/1999/xhtml">If <span class="function"><strong>process-output-wait</strong></span> is called on
    72807282              a network socket which has not yet established a connection, it
    72817283              will wait until the connection is established.  This is an
     
    72837285              </div>
    72847286              <div class="refsect1" lang="en" xml:lang="en">
    7285                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508862"></a>
     7287                <a xmlns="http://www.w3.org/1999/xhtml" id="id416813"></a>
    72867288                <div class="header">See Also:</div>
    7287                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
    7288               </div>
    7289               <div class="refsect1" lang="en" xml:lang="en">
    7290                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508899"></a>
     7289                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a></span>
     7290              </div>
     7291              <div class="refsect1" lang="en" xml:lang="en">
     7292                <a xmlns="http://www.w3.org/1999/xhtml" id="id416850"></a>
    72917293                <div class="header">Notes:</div>
    72927294                <p xmlns="http://www.w3.org/1999/xhtml">
    7293               <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a> has a timeout parameter,
     7295              <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a> has a timeout parameter,
    72947296              and
    7295               <span><strong class="function">process-output-wait</strong></span> does not.  This
     7297              <span class="function"><strong>process-output-wait</strong></span> does not.  This
    72967298              inconsistency should probably be corrected.
    72977299            </p>
     
    73047306              <strong>[Macro]</strong>
    73057307              <br></br>
    7306               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-terminal-input</strong></span>
     7308              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-terminal-input</strong></span>
    73077309              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body =&gt; result</code>
    73087310            </div>
     
    73137315            <div>
    73147316              <div class="refsect1" lang="en" xml:lang="en">
    7315                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508957"></a>
     7317                <a xmlns="http://www.w3.org/1999/xhtml" id="id416915"></a>
    73167318                <div class="header">Arguments and Values:</div>
    73177319                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">body</span></i>---an implicit progn.</p>
     
    73207322              </div>
    73217323              <div class="refsect1" lang="en" xml:lang="en">
    7322                 <a xmlns="http://www.w3.org/1999/xhtml" id="id508996"></a>
     7324                <a xmlns="http://www.w3.org/1999/xhtml" id="id416954"></a>
    73237325                <div class="header">Description:</div>
    73247326                <p xmlns="http://www.w3.org/1999/xhtml">Requests exclusive read access to the standard terminal
     
    73287330              </div>
    73297331              <div class="refsect1" lang="en" xml:lang="en">
    7330                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509014"></a>
     7332                <a xmlns="http://www.w3.org/1999/xhtml" id="id416970"></a>
    73317333                <div class="header">See Also:</div>
    7332                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#v_request-terminal-input-via-break" title="Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*request-terminal-input-via-break*</b></a>, <a href="#cmd_y" title="Toplevel Command :Y"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">:y</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
     7334                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#v_request-terminal-input-via-break" title="Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*request-terminal-input-via-break*</b></a>, <a class="xref" href="#cmd_y" title="Toplevel Command :Y"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">:y</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
    73337335              </div>
    73347336            </div>
     
    73477349            <div>
    73487350              <div class="refsect1" lang="en" xml:lang="en">
    7349                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509094"></a>
     7351                <a xmlns="http://www.w3.org/1999/xhtml" id="id417047"></a>
    73507352                <div class="header">Value Type:</div>
    73517353                <p xmlns="http://www.w3.org/1999/xhtml">A boolean.</p>
    73527354              </div>
    73537355              <div class="refsect1" lang="en" xml:lang="en">
    7354                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509104"></a>
     7356                <a xmlns="http://www.w3.org/1999/xhtml" id="id417057"></a>
    73557357                <div class="header">Initial Value:</div>
    73567358                <p xmlns="http://www.w3.org/1999/xhtml">NIL.</p>
    73577359              </div>
    73587360              <div class="refsect1" lang="en" xml:lang="en">
    7359                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509114"></a>
     7361                <a xmlns="http://www.w3.org/1999/xhtml" id="id417067"></a>
    73607362                <div class="header">Description:</div>
    73617363                <p xmlns="http://www.w3.org/1999/xhtml">Controls how attempts to obtain ownership of terminal input
     
    73697371              </div>
    73707372              <div class="refsect1" lang="en" xml:lang="en">
    7371                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509131"></a>
     7373                <a xmlns="http://www.w3.org/1999/xhtml" id="id417080"></a>
    73727374                <div class="header">See Also:</div>
    7373                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a>, <a href="#cmd_y" title="Toplevel Command :Y"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">:y</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
     7375                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a>, <a class="xref" href="#cmd_y" title="Toplevel Command :Y"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">:y</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
    73747376              </div>
    73757377            </div>
     
    73807382              <strong>[Toplevel Command]</strong>
    73817383              <br></br>
    7382               <code>(<span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">:y</strong></span> p)</code>
     7384              <code>(<span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>:y</strong></span> p)</code>
    73837385            </div>
    73847386            <div class="refentrytitle">Yields control of terminal input to a specified
     
    73887390            <div>
    73897391              <div class="refsect1" lang="en" xml:lang="en">
    7390                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509215"></a>
     7392                <a xmlns="http://www.w3.org/1999/xhtml" id="id417171"></a>
    73917393                <div class="header">Arguments and Values:</div>
    73927394                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">p</span></i>---a lisp process (thread), designated either by
    73937395                        an integer which matches its
    7394                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-serial-number</strong></span>,
    7395                         or by a string which is <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">equal</strong></span> to
    7396                         its <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">process-name</strong></span>.</p>
    7397               </div>
    7398               <div class="refsect1" lang="en" xml:lang="en">
    7399                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509250"></a>
     7396                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-serial-number</strong></span>,
     7397                        or by a string which is <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>equal</strong></span> to
     7398                        its <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>process-name</strong></span>.</p>
     7399              </div>
     7400              <div class="refsect1" lang="en" xml:lang="en">
     7401                <a xmlns="http://www.w3.org/1999/xhtml" id="id417210"></a>
    74007402                <div class="header">Description:</div>
    74017403                <p xmlns="http://www.w3.org/1999/xhtml">:Y is a toplevel command, not a function.  As such, it
     
    74047406                <p xmlns="http://www.w3.org/1999/xhtml">The command yields control of terminal input to the
    74057407              process <em class="varname">p</em>, which must have used
    7406               <a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a> to request access to the
     7408              <a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a> to request access to the
    74077409              terminal input stream.</p>
    74087410              </div>
    74097411              <div class="refsect1" lang="en" xml:lang="en">
    7410                 <a xmlns="http://www.w3.org/1999/xhtml" id="id509274"></a>
     7412                <a xmlns="http://www.w3.org/1999/xhtml" id="id417232"></a>
    74117413                <div class="header">See Also:</div>
    7412                 <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a>, <a href="#v_request-terminal-input-via-break" title="Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*request-terminal-input-via-break*</b></a>, <a href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
     7414                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#m_with-terminal-input" title="Macro WITH-TERMINAL-INPUT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-terminal-input</b></a>, <a class="xref" href="#v_request-terminal-input-via-break" title="Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">*request-terminal-input-via-break*</b></a>, <a class="xref" href="#f_make-lock" title="Function MAKE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-lock</b></a>, <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>, <a class="xref" href="#f_make-semaphore" title="Function MAKE-SEMAPHORE"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-semaphore</b></a>, <a class="xref" href="#f_process-input-wait" title="Function PROCESS-INPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-input-wait</b></a>, <a class="xref" href="#f_process-output-wait" title="Function PROCESS-OUTPUT-WAIT"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">process-output-wait</b></a></span>
    74137415              </div>
    74147416            </div>
     
    74577459      sockets, and Unix-domain sockets.  This should be enough for all
    74587460      but the most esoteric network situations.  All sockets are
    7459       created by <a href="#f_make-socket" title="Function MAKE-SOCKET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-socket</b></a>.  The type of socket
     7461      created by <a class="xref" href="#f_make-socket" title="Function MAKE-SOCKET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-socket</b></a>.  The type of socket
    74607462      depends on the arguments to it, as follows:</p>
    74617463          <div xmlns="http://www.w3.org/1999/xhtml" class="variablelist">
     
    75277529              <strong>[Function]</strong>
    75287530              <br></br>
    7529               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-socket</strong></span> <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em>
     7531              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-socket</strong></span> <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em>
    75307532          address-family type connect eol format remote-host
    75317533          remote-port local-host local-port local-filename
     
    75397541            <div>
    75407542              <div class="refsect1" lang="en" xml:lang="en">
    7541                 <a xmlns="http://www.w3.org/1999/xhtml" id="id498897"></a>
     7543                <a xmlns="http://www.w3.org/1999/xhtml" id="id372876"></a>
    75427544                <div class="header">Arguments and Values:</div>
    75437545                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">address-family</span></i>---The address/protocol family of this socket. Currently
     
    76117613                specified number of seconds, an
    76127614                <code xmlns="http://www.w3.org/1999/xhtml" class="literal">input-timeout</code> error is signalled.
    7613                 (see <a xmlns="http://www.w3.org/1999/xhtml" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
     7615                (see <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
    76147616                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">output-timeout</span></i>---The number of seconds before an output operation
    76157617                times out.  Must be a real number between zero and one
     
    76177619                specified number of seconds, an
    76187620                <code xmlns="http://www.w3.org/1999/xhtml" class="literal">output-timeout</code> error is signalled.
    7619                 (see <a xmlns="http://www.w3.org/1999/xhtml" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
     7621                (see <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
    76207622                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">connect-timeout</span></i>---The number of seconds before a connection
    76217623                attempt times out. [TODO: what are acceptable values?]
     
    76357637                <code xmlns="http://www.w3.org/1999/xhtml" class="literal">COMMUNICATION-DEADLINE-EXPIRED</code>
    76367638                error is signalled.  A deadline takes precedence over
    7637                 any input/output timeouts that may be set.  (see <a xmlns="http://www.w3.org/1999/xhtml" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
    7638               </div>
    7639               <div class="refsect1" lang="en" xml:lang="en">
    7640                 <a xmlns="http://www.w3.org/1999/xhtml" id="id458069"></a>
     7639                any input/output timeouts that may be set.  (see <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Stream-Timeouts-And-Deadlines" title="10.1.4. Stream Timeouts and Deadlines">Section 10.1.4, “Stream Timeouts and Deadlines”</a>)</p>
     7640              </div>
     7641              <div class="refsect1" lang="en" xml:lang="en">
     7642                <a xmlns="http://www.w3.org/1999/xhtml" id="id404926"></a>
    76417643                <div class="header">Description:</div>
    76427644                <p xmlns="http://www.w3.org/1999/xhtml">Creates and returns a new socket</p>
     
    76497651              <strong>[Function]</strong>
    76507652              <br></br>
    7651               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">accept-connection</strong></span>
     7653              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>accept-connection</strong></span>
    76527654          (socket listener-socket) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> wait</code>
    76537655            </div>
     
    76577659            <div>
    76587660              <div class="refsect1" lang="en" xml:lang="en">
    7659                 <a xmlns="http://www.w3.org/1999/xhtml" id="id430857"></a>
     7661                <a xmlns="http://www.w3.org/1999/xhtml" id="id404987"></a>
    76607662                <div class="header">Arguments and Values:</div>
    76617663                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The listener-socket to listen on.</p>
     
    76657667              </div>
    76667668              <div class="refsect1" lang="en" xml:lang="en">
    7667                 <a xmlns="http://www.w3.org/1999/xhtml" id="id473045"></a>
     7669                <a xmlns="http://www.w3.org/1999/xhtml" id="id405030"></a>
    76687670                <div class="header">Description:</div>
    76697671                <p xmlns="http://www.w3.org/1999/xhtml">Extracts the first connection on the queue of pending
     
    76837685              <strong>[Function]</strong>
    76847686              <br></br>
    7685               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">dotted-to-ipaddr</strong></span>
     7687              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>dotted-to-ipaddr</strong></span>
    76867688          dotted <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> errorp</code>
    76877689            </div>
     
    76917693            <div>
    76927694              <div class="refsect1" lang="en" xml:lang="en">
    7693                 <a xmlns="http://www.w3.org/1999/xhtml" id="id495522"></a>
     7695                <a xmlns="http://www.w3.org/1999/xhtml" id="id405095"></a>
    76947696                <div class="header">Arguments and Values:</div>
    76957697                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">dotted</span></i>---A string representing an IP address in the
     
    76997701              </div>
    77007702              <div class="refsect1" lang="en" xml:lang="en">
    7701                 <a xmlns="http://www.w3.org/1999/xhtml" id="id482782"></a>
     7703                <a xmlns="http://www.w3.org/1999/xhtml" id="id405136"></a>
    77027704                <div class="header">Description:</div>
    77037705                <p xmlns="http://www.w3.org/1999/xhtml">Converts a dotted-string representation of a host address to
     
    77117713              <strong>[Function]</strong>
    77127714              <br></br>
    7713               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ipaddr-to-dotted</strong></span>
     7715              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ipaddr-to-dotted</strong></span>
    77147716          ipaddr <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> values</code>
    77157717            </div>
     
    77197721            <div>
    77207722              <div class="refsect1" lang="en" xml:lang="en">
    7721                 <a xmlns="http://www.w3.org/1999/xhtml" id="id459506"></a>
     7723                <a xmlns="http://www.w3.org/1999/xhtml" id="id405198"></a>
    77227724                <div class="header">Arguments and Values:</div>
    77237725                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ipaddr</span></i>---A 32-bit integer representing an internet host address</p>
     
    77287730              </div>
    77297731              <div class="refsect1" lang="en" xml:lang="en">
    7730                 <a xmlns="http://www.w3.org/1999/xhtml" id="id502645"></a>
     7732                <a xmlns="http://www.w3.org/1999/xhtml" id="id403555"></a>
    77317733                <div class="header">Description:</div>
    77327734                <p xmlns="http://www.w3.org/1999/xhtml">Converts a 32-bit unsigned IP address into octets.</p>
     
    77397741              <strong>[Function]</strong>
    77407742              <br></br>
    7741               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ipaddr-to-hostname</strong></span>
     7743              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ipaddr-to-hostname</strong></span>
    77427744          ipaddr <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> ignore-cache</code>
    77437745            </div>
     
    77477749            <div>
    77487750              <div class="refsect1" lang="en" xml:lang="en">
    7749                 <a xmlns="http://www.w3.org/1999/xhtml" id="id451113"></a>
     7751                <a xmlns="http://www.w3.org/1999/xhtml" id="id403616"></a>
    77507752                <div class="header">Arguments and Values:</div>
    77517753                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ipaddr</span></i>---a 32-bit integer representing an internet host address</p>
     
    77547756              </div>
    77557757              <div class="refsect1" lang="en" xml:lang="en">
    7756                 <a xmlns="http://www.w3.org/1999/xhtml" id="id470273"></a>
     7758                <a xmlns="http://www.w3.org/1999/xhtml" id="id403657"></a>
    77577759                <div class="header">Description:</div>
    77587760                <p xmlns="http://www.w3.org/1999/xhtml">Converts a 32-bit unsigned IP address into a host name
     
    77667768              <strong>[Function]</strong>
    77677769              <br></br>
    7768               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">lookup-hostname</strong></span>
     7770              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>lookup-hostname</strong></span>
    77697771          host</code>
    77707772            </div>
     
    77747776            <div>
    77757777              <div class="refsect1" lang="en" xml:lang="en">
    7776                 <a xmlns="http://www.w3.org/1999/xhtml" id="id501148"></a>
     7778                <a xmlns="http://www.w3.org/1999/xhtml" id="id403714"></a>
    77777779                <div class="header">Arguments and Values:</div>
    77787780                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">host</span></i>---Specifies the host. It can be either a host name
     
    77827784              </div>
    77837785              <div class="refsect1" lang="en" xml:lang="en">
    7784                 <a xmlns="http://www.w3.org/1999/xhtml" id="id433781"></a>
     7786                <a xmlns="http://www.w3.org/1999/xhtml" id="id403742"></a>
    77857787                <div class="header">Description:</div>
    77867788                <p xmlns="http://www.w3.org/1999/xhtml">Converts a host spec in any of the acceptable formats into a
     
    77947796              <strong>[Function]</strong>
    77957797              <br></br>
    7796               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">lookup-port</strong></span>
     7798              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>lookup-port</strong></span>
    77977799          port protocol</code>
    77987800            </div>
     
    78027804            <div>
    78037805              <div class="refsect1" lang="en" xml:lang="en">
    7804                 <a xmlns="http://www.w3.org/1999/xhtml" id="id475043"></a>
     7806                <a xmlns="http://www.w3.org/1999/xhtml" id="id403800"></a>
    78057807                <div class="header">Arguments and Values:</div>
    78067808                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">port</span></i>---Specifies the port. It can be either a string, such as
     
    78117813              </div>
    78127814              <div class="refsect1" lang="en" xml:lang="en">
    7813                 <a xmlns="http://www.w3.org/1999/xhtml" id="id488453"></a>
     7815                <a xmlns="http://www.w3.org/1999/xhtml" id="id403842"></a>
    78147816                <div class="header">Description:</div>
    78157817                <p xmlns="http://www.w3.org/1999/xhtml">Finds the port number for the specified port and protocol</p>
     
    78227824              <strong>[Function]</strong>
    78237825              <br></br>
    7824               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">receive-from</strong></span>
     7826              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>receive-from</strong></span>
    78257827          (socket udp-socket) size <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> buffer
    78267828          extract offset</code>
     
    78317833            <div>
    78327834              <div class="refsect1" lang="en" xml:lang="en">
    7833                 <a xmlns="http://www.w3.org/1999/xhtml" id="id428852"></a>
     7835                <a xmlns="http://www.w3.org/1999/xhtml" id="id403904"></a>
    78347836                <div class="header">Arguments and Values:</div>
    78357837                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket to read from</p>
     
    78487850              </div>
    78497851              <div class="refsect1" lang="en" xml:lang="en">
    7850                 <a xmlns="http://www.w3.org/1999/xhtml" id="id446788"></a>
     7852                <a xmlns="http://www.w3.org/1999/xhtml" id="id403994"></a>
    78517853                <div class="header">Description:</div>
    78527854                <p xmlns="http://www.w3.org/1999/xhtml">Reads a UDP packet from a socket. If no packets are
     
    78767878              <strong>[Function]</strong>
    78777879              <br></br>
    7878               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">send-to</strong></span>
     7880              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>send-to</strong></span>
    78797881          (socket udp-socket) buffer size <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> remote-host
    78807882          remote-port offset</code>
     
    78857887            <div>
    78867888              <div class="refsect1" lang="en" xml:lang="en">
    7887                 <a xmlns="http://www.w3.org/1999/xhtml" id="id435843"></a>
     7889                <a xmlns="http://www.w3.org/1999/xhtml" id="id404109"></a>
    78887890                <div class="header">Arguments and Values:</div>
    78897891                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket to write to</p>
     
    79017903              </div>
    79027904              <div class="refsect1" lang="en" xml:lang="en">
    7903                 <a xmlns="http://www.w3.org/1999/xhtml" id="id474272"></a>
     7905                <a xmlns="http://www.w3.org/1999/xhtml" id="id404213"></a>
    79047906                <div class="header">Description:</div>
    79057907                <p xmlns="http://www.w3.org/1999/xhtml">Send a UDP packet over a socket.</p>
     
    79127914              <strong>[Function]</strong>
    79137915              <br></br>
    7914               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">shutdown</strong></span>
     7916              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>shutdown</strong></span>
    79157917          socket <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> direction</code>
    79167918            </div>
     
    79207922            <div>
    79217923              <div class="refsect1" lang="en" xml:lang="en">
    7922                 <a xmlns="http://www.w3.org/1999/xhtml" id="id462324"></a>
     7924                <a xmlns="http://www.w3.org/1999/xhtml" id="id404274"></a>
    79237925                <div class="header">Arguments and Values:</div>
    79247926                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket to shut down (typically a tcp-stream)</p>
     
    79277929              </div>
    79287930              <div class="refsect1" lang="en" xml:lang="en">
    7929                 <a xmlns="http://www.w3.org/1999/xhtml" id="id462135"></a>
     7931                <a xmlns="http://www.w3.org/1999/xhtml" id="id404315"></a>
    79307932                <div class="header">Description:</div>
    79317933                <p xmlns="http://www.w3.org/1999/xhtml">Shuts down part of a bidirectional connection. This is
     
    79407942              <strong>[Function]</strong>
    79417943              <br></br>
    7942               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-os-fd</strong></span>
     7944              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-os-fd</strong></span>
    79437945          socket</code>
    79447946            </div>
     
    79487950            <div>
    79497951              <div class="refsect1" lang="en" xml:lang="en">
    7950                 <a xmlns="http://www.w3.org/1999/xhtml" id="id448673"></a>
     7952                <a xmlns="http://www.w3.org/1999/xhtml" id="id404374"></a>
    79517953                <div class="header">Arguments and Values:</div>
    79527954                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    79537955              </div>
    79547956              <div class="refsect1" lang="en" xml:lang="en">
    7955                 <a xmlns="http://www.w3.org/1999/xhtml" id="id463587"></a>
     7957                <a xmlns="http://www.w3.org/1999/xhtml" id="id404400"></a>
    79567958                <div class="header">Description:</div>
    79577959                <p xmlns="http://www.w3.org/1999/xhtml">Returns the native OS's representation of the socket, or
     
    79707972              <strong>[Function]</strong>
    79717973              <br></br>
    7972               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">remote-host</strong></span>
     7974              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>remote-host</strong></span>
    79737975          socket</code>
    79747976            </div>
     
    79787980            <div>
    79797981              <div class="refsect1" lang="en" xml:lang="en">
    7980                 <a xmlns="http://www.w3.org/1999/xhtml" id="id443064"></a>
     7982                <a xmlns="http://www.w3.org/1999/xhtml" id="id404461"></a>
    79817983                <div class="header">Arguments and Values:</div>
    79827984                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    79837985              </div>
    79847986              <div class="refsect1" lang="en" xml:lang="en">
    7985                 <a xmlns="http://www.w3.org/1999/xhtml" id="id461811"></a>
     7987                <a xmlns="http://www.w3.org/1999/xhtml" id="id404487"></a>
    79867988                <div class="header">Description:</div>
    79877989                <p xmlns="http://www.w3.org/1999/xhtml">Returns the 32-bit unsigned IP address of the remote host,
     
    79957997              <strong>[Function]</strong>
    79967998              <br></br>
    7997               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">remote-port</strong></span>
     7999              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>remote-port</strong></span>
    79988000          socket</code>
    79998001            </div>
     
    80038005            <div>
    80048006              <div class="refsect1" lang="en" xml:lang="en">
    8005                 <a xmlns="http://www.w3.org/1999/xhtml" id="id434816"></a>
     8007                <a xmlns="http://www.w3.org/1999/xhtml" id="id404545"></a>
    80068008                <div class="header">Arguments and Values:</div>
    80078009                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    80088010              </div>
    80098011              <div class="refsect1" lang="en" xml:lang="en">
    8010                 <a xmlns="http://www.w3.org/1999/xhtml" id="id430162"></a>
     8012                <a xmlns="http://www.w3.org/1999/xhtml" id="id404571"></a>
    80118013                <div class="header">Description:</div>
    80128014                <p xmlns="http://www.w3.org/1999/xhtml">Returns the remote port number, or NIL if the socket is not
     
    80208022              <strong>[Function]</strong>
    80218023              <br></br>
    8022               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">local-host</strong></span>
     8024              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>local-host</strong></span>
    80238025          socket</code>
    80248026            </div>
     
    80288030            <div>
    80298031              <div class="refsect1" lang="en" xml:lang="en">
    8030                 <a xmlns="http://www.w3.org/1999/xhtml" id="id483432"></a>
     8032                <a xmlns="http://www.w3.org/1999/xhtml" id="id404629"></a>
    80318033                <div class="header">Arguments and Values:</div>
    80328034                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    80338035              </div>
    80348036              <div class="refsect1" lang="en" xml:lang="en">
    8035                 <a xmlns="http://www.w3.org/1999/xhtml" id="id433176"></a>
     8037                <a xmlns="http://www.w3.org/1999/xhtml" id="id404655"></a>
    80368038                <div class="header">Description:</div>
    80378039                <p xmlns="http://www.w3.org/1999/xhtml">Returns 32-bit unsigned IP address of the local host.</p>
     
    80448046              <strong>[Function]</strong>
    80458047              <br></br>
    8046               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">local-port</strong></span>
     8048              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>local-port</strong></span>
    80478049          socket</code>
    80488050            </div>
     
    80528054            <div>
    80538055              <div class="refsect1" lang="en" xml:lang="en">
    8054                 <a xmlns="http://www.w3.org/1999/xhtml" id="id433219"></a>
     8056                <a xmlns="http://www.w3.org/1999/xhtml" id="id404712"></a>
    80558057                <div class="header">Arguments and Values:</div>
    80568058                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    80578059              </div>
    80588060              <div class="refsect1" lang="en" xml:lang="en">
    8059                 <a xmlns="http://www.w3.org/1999/xhtml" id="id455761"></a>
     8061                <a xmlns="http://www.w3.org/1999/xhtml" id="id404738"></a>
    80608062                <div class="header">Description:</div>
    80618063                <p xmlns="http://www.w3.org/1999/xhtml">Returns the local port number</p>
     
    80688070              <strong>[Function]</strong>
    80698071              <br></br>
    8070               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-address-family</strong></span>
     8072              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-address-family</strong></span>
    80718073          socket</code>
    80728074            </div>
     
    80768078            <div>
    80778079              <div class="refsect1" lang="en" xml:lang="en">
    8078                 <a xmlns="http://www.w3.org/1999/xhtml" id="id485427"></a>
     8080                <a xmlns="http://www.w3.org/1999/xhtml" id="id401876"></a>
    80798081                <div class="header">Arguments and Values:</div>
    80808082                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    80818083              </div>
    80828084              <div class="refsect1" lang="en" xml:lang="en">
    8083                 <a xmlns="http://www.w3.org/1999/xhtml" id="id433435"></a>
     8085                <a xmlns="http://www.w3.org/1999/xhtml" id="id401902"></a>
    80848086                <div class="header">Description:</div>
    80858087                <p xmlns="http://www.w3.org/1999/xhtml">Returns :internet or :file, as appropriate.</p>
     
    80928094              <strong>[Function]</strong>
    80938095              <br></br>
    8094               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-connect</strong></span>
     8096              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-connect</strong></span>
    80958097          socket</code>
    80968098            </div>
     
    81008102            <div>
    81018103              <div class="refsect1" lang="en" xml:lang="en">
    8102                 <a xmlns="http://www.w3.org/1999/xhtml" id="id450826"></a>
     8104                <a xmlns="http://www.w3.org/1999/xhtml" id="id401959"></a>
    81038105                <div class="header">Arguments and Values:</div>
    81048106                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    81058107              </div>
    81068108              <div class="refsect1" lang="en" xml:lang="en">
    8107                 <a xmlns="http://www.w3.org/1999/xhtml" id="id450849"></a>
     8109                <a xmlns="http://www.w3.org/1999/xhtml" id="id401985"></a>
    81088110                <div class="header">Description:</div>
    81098111                <p xmlns="http://www.w3.org/1999/xhtml">Returns :active for tcp-stream, :passive for
     
    81178119              <strong>[Function]</strong>
    81188120              <br></br>
    8119               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-format</strong></span>
     8121              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-format</strong></span>
    81208122          socket</code>
    81218123            </div>
     
    81258127            <div>
    81268128              <div class="refsect1" lang="en" xml:lang="en">
    8127                 <a xmlns="http://www.w3.org/1999/xhtml" id="id453854"></a>
     8129                <a xmlns="http://www.w3.org/1999/xhtml" id="id402042"></a>
    81288130                <div class="header">Arguments and Values:</div>
    81298131                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    81308132              </div>
    81318133              <div class="refsect1" lang="en" xml:lang="en">
    8132                 <a xmlns="http://www.w3.org/1999/xhtml" id="id459449"></a>
     8134                <a xmlns="http://www.w3.org/1999/xhtml" id="id402069"></a>
    81338135                <div class="header">Description:</div>
    81348136                <p xmlns="http://www.w3.org/1999/xhtml">Returns the socket format as specified by the :format
     
    81428144              <strong>[Function]</strong>
    81438145              <br></br>
    8144               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-type</strong></span>
     8146              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-type</strong></span>
    81458147          socket</code>
    81468148            </div>
     
    81508152            <div>
    81518153              <div class="refsect1" lang="en" xml:lang="en">
    8152                 <a xmlns="http://www.w3.org/1999/xhtml" id="id440524"></a>
     8154                <a xmlns="http://www.w3.org/1999/xhtml" id="id402127"></a>
    81538155                <div class="header">Arguments and Values:</div>
    81548156                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket</p>
    81558157              </div>
    81568158              <div class="refsect1" lang="en" xml:lang="en">
    8157                 <a xmlns="http://www.w3.org/1999/xhtml" id="id440547"></a>
     8159                <a xmlns="http://www.w3.org/1999/xhtml" id="id402153"></a>
    81588160                <div class="header">Description:</div>
    81598161                <p xmlns="http://www.w3.org/1999/xhtml">returns :stream for tcp-stream and listener-socket, and
     
    81748176            <div>
    81758177              <div class="refsect1" lang="en" xml:lang="en">
    8176                 <a xmlns="http://www.w3.org/1999/xhtml" id="id487264"></a>
     8178                <a xmlns="http://www.w3.org/1999/xhtml" id="id402196"></a>
    81778179                <div class="header">Description:</div>
    81788180                <p xmlns="http://www.w3.org/1999/xhtml">The class of OS errors signaled by socket functions</p>
    81798181              </div>
    81808182              <div class="refsect1" lang="en" xml:lang="en">
    8181                 <a xmlns="http://www.w3.org/1999/xhtml" id="id492064"></a>
     8183                <a xmlns="http://www.w3.org/1999/xhtml" id="id402207"></a>
    81828184                <div class="header">Superclasses:</div>
    81838185                <p xmlns="http://www.w3.org/1999/xhtml">simple-error</p>
     
    81908192              <strong>[Function]</strong>
    81918193              <br></br>
    8192               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-error-code</strong></span>
     8194              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-error-code</strong></span>
    81938195          socket-error</code>
    81948196            </div>
     
    81988200            <div>
    81998201              <div class="refsect1" lang="en" xml:lang="en">
    8200                 <a xmlns="http://www.w3.org/1999/xhtml" id="id468134"></a>
     8202                <a xmlns="http://www.w3.org/1999/xhtml" id="id402265"></a>
    82018203                <div class="header">Arguments and Values:</div>
    82028204                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket-error</span></i>---the condition</p>
    82038205              </div>
    82048206              <div class="refsect1" lang="en" xml:lang="en">
    8205                 <a xmlns="http://www.w3.org/1999/xhtml" id="id433013"></a>
     8207                <a xmlns="http://www.w3.org/1999/xhtml" id="id402291"></a>
    82068208                <div class="header">Description:</div>
    82078209                <p xmlns="http://www.w3.org/1999/xhtml">The OS error code of the error</p>
     
    82148216              <strong>[Function]</strong>
    82158217              <br></br>
    8216               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-error-identifier</strong></span>
     8218              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-error-identifier</strong></span>
    82178219          socket-error</code>
    82188220            </div>
     
    82228224            <div>
    82238225              <div class="refsect1" lang="en" xml:lang="en">
    8224                 <a xmlns="http://www.w3.org/1999/xhtml" id="id451001"></a>
     8226                <a xmlns="http://www.w3.org/1999/xhtml" id="id402349"></a>
    82258227                <div class="header">Arguments and Values:</div>
    82268228                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket-error</span></i>---the condition</p>
    82278229              </div>
    82288230              <div class="refsect1" lang="en" xml:lang="en">
    8229                 <a xmlns="http://www.w3.org/1999/xhtml" id="id466905"></a>
     8231                <a xmlns="http://www.w3.org/1999/xhtml" id="id402375"></a>
    82308232                <div class="header">Description:</div>
    82318233                <p xmlns="http://www.w3.org/1999/xhtml">A symbol representing the error code in a more
     
    82438245              <strong>[Function]</strong>
    82448246              <br></br>
    8245               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">socket-error-situation</strong></span>
     8247              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>socket-error-situation</strong></span>
    82468248          socket-error</code>
    82478249            </div>
     
    82518253            <div>
    82528254              <div class="refsect1" lang="en" xml:lang="en">
    8253                 <a xmlns="http://www.w3.org/1999/xhtml" id="id441085"></a>
     8255                <a xmlns="http://www.w3.org/1999/xhtml" id="id402438"></a>
    82548256                <div class="header">Arguments and Values:</div>
    82558257                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket-error</span></i>---the condition</p>
    82568258              </div>
    82578259              <div class="refsect1" lang="en" xml:lang="en">
    8258                 <a xmlns="http://www.w3.org/1999/xhtml" id="id459794"></a>
     8260                <a xmlns="http://www.w3.org/1999/xhtml" id="id402464"></a>
    82598261                <div class="header">Description:</div>
    82608262                <p xmlns="http://www.w3.org/1999/xhtml">A string describing the context where the error happened. On
     
    82698271              <strong>[Method]</strong>
    82708272              <br></br>
    8271               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">close</strong></span>
     8273              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>close</strong></span>
    82728274          (socket socket) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> abort</code>
    82738275            </div>
     
    82778279            <div>
    82788280              <div class="refsect1" lang="en" xml:lang="en">
    8279                 <a xmlns="http://www.w3.org/1999/xhtml" id="id474919"></a>
     8281                <a xmlns="http://www.w3.org/1999/xhtml" id="id402527"></a>
    82808282                <div class="header">Arguments and Values:</div>
    82818283                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">socket</span></i>---The socket to close</p>
     
    82888290              </div>
    82898291              <div class="refsect1" lang="en" xml:lang="en">
    8290                 <a xmlns="http://www.w3.org/1999/xhtml" id="id448866"></a>
     8292                <a xmlns="http://www.w3.org/1999/xhtml" id="id402570"></a>
    82918293                <div class="header">Description:</div>
    82928294                <p xmlns="http://www.w3.org/1999/xhtml">The close generic function can be applied to sockets. It
     
    83018303              <strong>[Macro]</strong>
    83028304              <br></br>
    8303               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-open-socket</strong></span>
     8305              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-open-socket</strong></span>
    83048306          (var . make-socket-args) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    83058307            </div>
     
    83098311            <div>
    83108312              <div class="refsect1" lang="en" xml:lang="en">
    8311                 <a xmlns="http://www.w3.org/1999/xhtml" id="id458864"></a>
     8313                <a xmlns="http://www.w3.org/1999/xhtml" id="id402655"></a>
    83128314                <div class="header">Arguments and Values:</div>
    83138315                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">var</span></i>---variable to bind</p>
     
    83168318              </div>
    83178319              <div class="refsect1" lang="en" xml:lang="en">
    8318                 <a xmlns="http://www.w3.org/1999/xhtml" id="id469415"></a>
     8320                <a xmlns="http://www.w3.org/1999/xhtml" id="id402710"></a>
    83198321                <div class="header">Description:</div>
    83208322                <p xmlns="http://www.w3.org/1999/xhtml">executes body with var bound to the result of applying
     
    84368438              <strong>[Function]</strong>
    84378439              <br></br>
    8438               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">run-program</strong></span>
     8440              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>run-program</strong></span>
    84398441            program args <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em> (wait t) pty input
    84408442            if-input-does-not-exist output (if-output-exists :error) (error
     
    84478449            <div>
    84488450              <div class="refsect1" lang="en" xml:lang="en">
    8449                 <a xmlns="http://www.w3.org/1999/xhtml" id="id481469"></a>
     8451                <a xmlns="http://www.w3.org/1999/xhtml" id="id368679"></a>
    84508452                <div class="header">Arguments and Values:</div>
    84518453                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">program</span></i>---A string or pathname which denotes an executable file.
     
    84898491              </div>
    84908492              <div class="refsect1" lang="en" xml:lang="en">
    8491                 <a xmlns="http://www.w3.org/1999/xhtml" id="id461423"></a>
     8493                <a xmlns="http://www.w3.org/1999/xhtml" id="id354820"></a>
    84928494                <div class="header">Description:</div>
    84938495                <p xmlns="http://www.w3.org/1999/xhtml">Runs the specified program in an external (Unix) process,
     
    85018503              <strong>[Function]</strong>
    85028504              <br></br>
    8503               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">signal-external-process</strong></span>
     8505              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>signal-external-process</strong></span>
    85048506            proc signal-number</code>
    85058507            </div>
     
    85098511            <div>
    85108512              <div class="refsect1" lang="en" xml:lang="en">
    8511                 <a xmlns="http://www.w3.org/1999/xhtml" id="id431361"></a>
     8513                <a xmlns="http://www.w3.org/1999/xhtml" id="id354877"></a>
    85128514                <div class="header">Arguments and Values:</div>
    85138515                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
     
    85158517              </div>
    85168518              <div class="refsect1" lang="en" xml:lang="en">
    8517                 <a xmlns="http://www.w3.org/1999/xhtml" id="id457362"></a>
     8519                <a xmlns="http://www.w3.org/1999/xhtml" id="id354917"></a>
    85188520                <div class="header">Description:</div>
    85198521                <p xmlns="http://www.w3.org/1999/xhtml">Sends the specified "signal" to the specified
     
    85298531              <strong>[Function]</strong>
    85308532              <br></br>
    8531               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-process-id</strong></span>
     8533              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-process-id</strong></span>
    85328534            proc</code>
    85338535            </div>
     
    85388540            <div>
    85398541              <div class="refsect1" lang="en" xml:lang="en">
    8540                 <a xmlns="http://www.w3.org/1999/xhtml" id="id470325"></a>
     8542                <a xmlns="http://www.w3.org/1999/xhtml" id="id386150"></a>
    85418543                <div class="header">Arguments and Values:</div>
    85428544                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
    85438545              </div>
    85448546              <div class="refsect1" lang="en" xml:lang="en">
    8545                 <a xmlns="http://www.w3.org/1999/xhtml" id="id442573"></a>
     8547                <a xmlns="http://www.w3.org/1999/xhtml" id="id386176"></a>
    85468548                <div class="header">Description:</div>
    85478549                <p xmlns="http://www.w3.org/1999/xhtml">Returns the <span class="emphasis"><em>process id</em></span> assigned to
     
    85568558              <strong>[Function]</strong>
    85578559              <br></br>
    8558               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-process-input-stream</strong></span>
     8560              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-process-input-stream</strong></span>
    85598561            proc</code>
    85608562            </div>
     
    85658567            <div>
    85668568              <div class="refsect1" lang="en" xml:lang="en">
    8567                 <a xmlns="http://www.w3.org/1999/xhtml" id="id472686"></a>
     8569                <a xmlns="http://www.w3.org/1999/xhtml" id="id369560"></a>
    85688570                <div class="header">Arguments and Values:</div>
    85698571                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
    85708572              </div>
    85718573              <div class="refsect1" lang="en" xml:lang="en">
    8572                 <a xmlns="http://www.w3.org/1999/xhtml" id="id480066"></a>
     8574                <a xmlns="http://www.w3.org/1999/xhtml" id="id369586"></a>
    85738575                <div class="header">Description:</div>
    85748576                <p xmlns="http://www.w3.org/1999/xhtml">Returns the stream created when the input argument to
     
    85828584              <strong>[Function]</strong>
    85838585              <br></br>
    8584               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-process-output-stream</strong></span>
     8586              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-process-output-stream</strong></span>
    85858587            proc</code>
    85868588            </div>
     
    85918593            <div>
    85928594              <div class="refsect1" lang="en" xml:lang="en">
    8593                 <a xmlns="http://www.w3.org/1999/xhtml" id="id468658"></a>
     8595                <a xmlns="http://www.w3.org/1999/xhtml" id="id369647"></a>
    85948596                <div class="header">Arguments and Values:</div>
    85958597                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
    85968598              </div>
    85978599              <div class="refsect1" lang="en" xml:lang="en">
    8598                 <a xmlns="http://www.w3.org/1999/xhtml" id="id434953"></a>
     8600                <a xmlns="http://www.w3.org/1999/xhtml" id="id379281"></a>
    85998601                <div class="header">Description:</div>
    86008602                <p xmlns="http://www.w3.org/1999/xhtml">Returns the stream created when the output argument to
     
    86088610              <strong>[Function]</strong>
    86098611              <br></br>
    8610               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-process-error-stream</strong></span>
     8612              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-process-error-stream</strong></span>
    86118613            proc</code>
    86128614            </div>
     
    86188620            <div>
    86198621              <div class="refsect1" lang="en" xml:lang="en">
    8620                 <a xmlns="http://www.w3.org/1999/xhtml" id="id500858"></a>
     8622                <a xmlns="http://www.w3.org/1999/xhtml" id="id379341"></a>
    86218623                <div class="header">Arguments and Values:</div>
    86228624                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
    86238625              </div>
    86248626              <div class="refsect1" lang="en" xml:lang="en">
    8625                 <a xmlns="http://www.w3.org/1999/xhtml" id="id490818"></a>
     8627                <a xmlns="http://www.w3.org/1999/xhtml" id="id379367"></a>
    86268628                <div class="header">Description:</div>
    86278629                <p xmlns="http://www.w3.org/1999/xhtml">Returns the stream created when the error argument to
     
    86358637              <strong>[Function]</strong>
    86368638              <br></br>
    8637               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-process-status</strong></span>
     8639              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-process-status</strong></span>
    86388640            proc</code>
    86398641            </div>
     
    86458647            <div>
    86468648              <div class="refsect1" lang="en" xml:lang="en">
    8647                 <a xmlns="http://www.w3.org/1999/xhtml" id="id461170"></a>
     8649                <a xmlns="http://www.w3.org/1999/xhtml" id="id367898"></a>
    86488650                <div class="header">Arguments and Values:</div>
    86498651                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">proc</span></i>---An EXTERNAL-PROCESS, as returned by RUN-PROGRAM.</p>
    86508652              </div>
    86518653              <div class="refsect1" lang="en" xml:lang="en">
    8652                 <a xmlns="http://www.w3.org/1999/xhtml" id="id434075"></a>
     8654                <a xmlns="http://www.w3.org/1999/xhtml" id="id367924"></a>
    86538655                <div class="header">Description:</div>
    86548656                <p xmlns="http://www.w3.org/1999/xhtml">Returns, as multiple values, a keyword denoting the status
     
    86808682                <dt>
    86818683                  <span class="sect2">
    8682                     <a href="#id467737">10.1.1. Stream External Encoding</a>
     8684                    <a href="#id380903">10.1.1. Stream External Encoding</a>
    86838685                  </span>
    86848686                </dt>
     
    87488750              <div>
    87498751                <div>
    8750                   <h3 class="title"><a id="id467737"></a>10.1.1. Stream External Encoding</h3>
     8752                  <h3 class="title"><a id="id380903"></a>10.1.1. Stream External Encoding</h3>
    87518753                </div>
    87528754              </div>
     
    87548756            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL streams have an external-encoding attribute that
    87558757    may be read using
    8756     <span><strong class="function">STREAM-EXTERNAL-ENCODING</strong></span> and set using <span><strong class="function">(SETF
     8758    <span class="function"><strong>STREAM-EXTERNAL-ENCODING</strong></span> and set using <span class="function"><strong>(SETF
    87578759    STREAM-EXTERNAL-ENCODING)</strong></span>.
    87588760    </p>
     
    87668768              </div>
    87678769            </div>
    8768             <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">OPEN</strong></span> and
    8769       <span><strong class="function">MAKE-SOCKET</strong></span> have each been extended to take
     8770            <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>OPEN</strong></span> and
     8771      <span class="function"><strong>MAKE-SOCKET</strong></span> have each been extended to take
    87708772      the additional keyword arguments: <code class="literal">:CLASS</code>,
    87718773      <code class="literal">:SHARING</code>, and
     
    87828784          The specified class must inherit from
    87838785          <code class="literal">FILE-STREAM</code> for
    8784           <span><strong class="function">OPEN</strong></span>.</p>
     8786          <span class="function"><strong>OPEN</strong></span>.</p>
    87858787                </dd>
    87868788                <dt>
     
    88238825                This makes it possible for instance, for one thread to
    88248826                read from such a stream while another thread writes to
    8825                 it.  (see also <a href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>
    8826                 <a href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a> <a href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>)</p>
     8827                it.  (see also <a class="xref" href="#f_make-read-write-lock" title="Function MAKE-READ-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-read-write-lock</b></a>
     8828                <a class="xref" href="#m_with-read-lock" title="Macro WITH-READ-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-read-lock</b></a> <a class="xref" href="#m_with-write-lock" title="Macro WITH-WRITE-LOCK"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">with-write-lock</b></a>)</p>
    88278829                      </dd>
    88288830                      <dt>
     
    88538855          a Gray stream, i.e. whether or not the stream is an instance
    88548856          of <code class="literal">FUNDAMENTAL-STREAM</code> or
    8855           <code class="literal">CCL::BASIC-STREAM</code>(see <a href="#Basic-Versus-Fundamental-Streams" title="10.1.3. Basic Versus Fundamental Streams">Section 10.1.3, “Basic Versus Fundamental Streams”</a>).  Defaults to
     8857          <code class="literal">CCL::BASIC-STREAM</code>(see <a class="xref" href="#Basic-Versus-Fundamental-Streams" title="10.1.3. Basic Versus Fundamental Streams">Section 10.1.3, “Basic Versus Fundamental Streams”</a>).  Defaults to
    88568858          <code class="literal">T</code>.</p>
    88578859                </dd>
     
    88678869              </div>
    88688870            </div>
    8869             <p xmlns="http://www.w3.org/1999/xhtml">Gray streams (see <a href="#Creating-Your-Own-Stream-Classes-with-Gray-Streams" title="10.2. Creating Your Own Stream Classes with Gray Streams">Section 10.2, “Creating Your Own Stream Classes with Gray Streams”</a>)
     8871            <p xmlns="http://www.w3.org/1999/xhtml">Gray streams (see <a class="xref" href="#Creating-Your-Own-Stream-Classes-with-Gray-Streams" title="10.2. Creating Your Own Stream Classes with Gray Streams">Section 10.2, “Creating Your Own Stream Classes with Gray Streams”</a>)
    88708872      all inherit from <code class="literal">FUNDAMENTAL-STREAM</code> whereas
    88718873      basic streams inherit from <code class="literal">CCL::BASIC-STREAM</code>.
     
    88868888      </p>
    88878889            <p xmlns="http://www.w3.org/1999/xhtml">The Gray stream method
    8888       <span><strong class="function">STREAM-READ-CHAR</strong></span> should work on appropriate
     8890      <span class="function"><strong>STREAM-READ-CHAR</strong></span> should work on appropriate
    88898891      <code class="literal">BASIC-STREAM</code>s.  (There may still be cases
    88908892      where such methods are undefined; such cases should be
     
    89088910              </div>
    89098911            </div>
    8910             <a xmlns="http://www.w3.org/1999/xhtml" id="id427146" class="indexterm"></a>
    8911             <a xmlns="http://www.w3.org/1999/xhtml" id="id488528" class="indexterm"></a>
    8912             <a xmlns="http://www.w3.org/1999/xhtml" id="id484109" class="indexterm"></a>
    8913             <a xmlns="http://www.w3.org/1999/xhtml" id="id463965" class="indexterm"></a>
    8914             <a xmlns="http://www.w3.org/1999/xhtml" id="id433256" class="indexterm"></a>
    8915             <a xmlns="http://www.w3.org/1999/xhtml" id="id425542" class="indexterm"></a>
     8912            <a xmlns="http://www.w3.org/1999/xhtml" id="id402803" class="indexterm"></a>
     8913            <a xmlns="http://www.w3.org/1999/xhtml" id="id402813" class="indexterm"></a>
     8914            <a xmlns="http://www.w3.org/1999/xhtml" id="id402823" class="indexterm"></a>
     8915            <a xmlns="http://www.w3.org/1999/xhtml" id="id402832" class="indexterm"></a>
     8916            <a xmlns="http://www.w3.org/1999/xhtml" id="id402842" class="indexterm"></a>
     8917            <a xmlns="http://www.w3.org/1999/xhtml" id="id402852" class="indexterm"></a>
    89168918            <p xmlns="http://www.w3.org/1999/xhtml">A stream that is associated with a file descriptor has
    89178919        attributes and accessors:
    8918         <span><strong class="function">STREAM-INPUT-TIMEOUT</strong></span>,
    8919         <span><strong class="function">STREAM-OUTPUT-TIMEOUT</strong></span>, and
    8920         <span><strong class="function">STREAM-DEADLINE</strong></span>.  All three accessors have
    8921         corresponding <span><strong class="function">SETF</strong></span> methods.
    8922         <span><strong class="function">STREAM-INPUT-TIMEOUT</strong></span> and
    8923         <span><strong class="function">STREAM-OUTPUT-TIMEOUT</strong></span> are specified in
     8920        <span class="function"><strong>STREAM-INPUT-TIMEOUT</strong></span>,
     8921        <span class="function"><strong>STREAM-OUTPUT-TIMEOUT</strong></span>, and
     8922        <span class="function"><strong>STREAM-DEADLINE</strong></span>.  All three accessors have
     8923        corresponding <span class="function"><strong>SETF</strong></span> methods.
     8924        <span class="function"><strong>STREAM-INPUT-TIMEOUT</strong></span> and
     8925        <span class="function"><strong>STREAM-OUTPUT-TIMEOUT</strong></span> are specified in
    89248926        seconds and can be any positive real number less than one million.
    89258927        When a timeout is set and the corresponding I/O operation takes
     
    89578959                <br></br>
    89588960                <code>
    8959                 <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">open-file-streams</strong></span>
     8961                <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>open-file-streams</strong></span>
    89608962                =&gt; stream-list
    89618963              </code>
     
    89668968              <div>
    89678969                <div class="refsect1" lang="en" xml:lang="en">
    8968                   <a xmlns="http://www.w3.org/1999/xhtml" id="id469274"></a>
     8970                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406598"></a>
    89698971                  <div class="header">Values:</div>
    89708972                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream-list</span></i>---A list of open file streams.  This is a copy of
     
    89738975                </div>
    89748976                <div class="refsect1" lang="en" xml:lang="en">
    8975                   <a xmlns="http://www.w3.org/1999/xhtml" id="id444191"></a>
     8977                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406625"></a>
    89768978                  <div class="header">Description:</div>
    89778979                  <p xmlns="http://www.w3.org/1999/xhtml">Returns a list of open file streams.</p>
    89788980                </div>
    89798981                <div class="refsect1" lang="en" xml:lang="en">
    8980                   <a xmlns="http://www.w3.org/1999/xhtml" id="id487677"></a>
     8982                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406636"></a>
    89818983                  <div class="header">See Also:</div>
    8982                   <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_note-open-file-stream" title="Function NOTE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">note-open-file-stream</b></a>, <a href="#f_remove-open-file-stream" title="Function REMOVE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">remove-open-file-stream</b></a></span>
     8984                  <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_note-open-file-stream" title="Function NOTE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">note-open-file-stream</b></a>, <a class="xref" href="#f_remove-open-file-stream" title="Function REMOVE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">remove-open-file-stream</b></a></span>
    89838985                </div>
    89848986              </div>
     
    89908992                <br></br>
    89918993                <code>
    8992                 <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">note-open-file-stream</strong></span>
     8994                <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>note-open-file-stream</strong></span>
    89938995                file-stream
    89948996              </code>
     
    90019003              <div>
    90029004                <div class="refsect1" lang="en" xml:lang="en">
    9003                   <a xmlns="http://www.w3.org/1999/xhtml" id="id475844"></a>
     9005                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406717"></a>
    90049006                  <div class="header">Arguments:</div>
    90059007                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">file-stream</span></i>---A file stream.</p>
    90069008                </div>
    90079009                <div class="refsect1" lang="en" xml:lang="en">
    9008                   <a xmlns="http://www.w3.org/1999/xhtml" id="id472282"></a>
     9010                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406743"></a>
    90099011                  <div class="header">Description:</div>
    90109012                  <p xmlns="http://www.w3.org/1999/xhtml">Adds a file stream to the internal list of open
    90119013                file streams that is returned by
    9012                 <span><strong class="function">open-file-streams</strong></span>.  This function is
     9014                <span class="function"><strong>open-file-streams</strong></span>.  This function is
    90139015                thread-safe.  It will usually only be called from custom
    90149016                stream code when a file-stream is created.</p>
    90159017                </div>
    90169018                <div class="refsect1" lang="en" xml:lang="en">
    9017                   <a xmlns="http://www.w3.org/1999/xhtml" id="id457744"></a>
     9019                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406762"></a>
    90189020                  <div class="header">See Also:</div>
    9019                   <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_open-file-streams" title="Function OPEN-FILE-STREAMS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-file-streams</b></a>, <a href="#f_remove-open-file-stream" title="Function REMOVE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">remove-open-file-stream</b></a></span>
     9021                  <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_open-file-streams" title="Function OPEN-FILE-STREAMS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-file-streams</b></a>, <a class="xref" href="#f_remove-open-file-stream" title="Function REMOVE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">remove-open-file-stream</b></a></span>
    90209022                </div>
    90219023              </div>
     
    90279029                <br></br>
    90289030                <code>
    9029                 <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">remove-open-file-stream</strong></span>
     9031                <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>remove-open-file-stream</strong></span>
    90309032                file-stream
    90319033              </code>
     
    90389040              <div>
    90399041                <div class="refsect1" lang="en" xml:lang="en">
    9040                   <a xmlns="http://www.w3.org/1999/xhtml" id="id433729"></a>
     9042                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406843"></a>
    90419043                  <div class="header">Arguments:</div>
    90429044                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">file-stream</span></i>---A file stream.</p>
    90439045                </div>
    90449046                <div class="refsect1" lang="en" xml:lang="en">
    9045                   <a xmlns="http://www.w3.org/1999/xhtml" id="id501400"></a>
     9047                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406869"></a>
    90469048                  <div class="header">Description:</div>
    90479049                  <p xmlns="http://www.w3.org/1999/xhtml">Remove file stream from the internal list of open file
    90489050                streams that is returned by
    9049                 <span><strong class="function">open-file-streams</strong></span>.  This function is
     9051                <span class="function"><strong>open-file-streams</strong></span>.  This function is
    90509052                thread-safe.  It will usually only be called from custom
    90519053                stream code when a file-stream is closed.</p>
    90529054                </div>
    90539055                <div class="refsect1" lang="en" xml:lang="en">
    9054                   <a xmlns="http://www.w3.org/1999/xhtml" id="id488897"></a>
     9056                  <a xmlns="http://www.w3.org/1999/xhtml" id="id406888"></a>
    90559057                  <div class="header">See Also:</div>
    9056                   <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a href="#f_open-file-streams" title="Function OPEN-FILE-STREAMS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-file-streams</b></a>, <a href="#f_note-open-file-stream" title="Function NOTE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">note-open-file-stream</b></a></span>
     9058                  <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist"><a class="xref" href="#f_open-file-streams" title="Function OPEN-FILE-STREAMS"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-file-streams</b></a>, <a class="xref" href="#f_note-open-file-stream" title="Function NOTE-OPEN-FILE-STREAM"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">note-open-file-stream</b></a></span>
    90579059                </div>
    90589060              </div>
     
    94779479                <strong>[Generic Function]</strong>
    94789480                <br></br>
    9479                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-read-list</strong></span>
     9481                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-read-list</strong></span>
    94809482                stream list count</code>
    94819483              </div>
     
    94859487              <div>
    94869488                <div class="refsect1" lang="en" xml:lang="en">
    9487                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511284"></a>
     9489                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407475"></a>
    94889490                  <div class="header">Arguments and Values:</div>
    94899491                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---a stream, presumably a fundamental-input-stream.</p>
     
    94969498                </div>
    94979499                <div class="refsect1" lang="en" xml:lang="en">
    9498                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511338"></a>
     9500                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407533"></a>
    94999501                  <div class="header">Description:</div>
    95009502                  <p xmlns="http://www.w3.org/1999/xhtml">Should try to read up to count elements from stream into the
     
    95099511                <strong>[Generic Function]</strong>
    95109512                <br></br>
    9511                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-write-list</strong></span>
     9513                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-write-list</strong></span>
    95129514                stream list count</code>
    95139515              </div>
     
    95179519              <div>
    95189520                <div class="refsect1" lang="en" xml:lang="en">
    9519                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511383"></a>
     9521                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407593"></a>
    95209522                  <div class="header">Arguments and Values:</div>
    95219523                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---a stream, presumably a fundamental-output-stream.</p>
     
    95289530                </div>
    95299531                <div class="refsect1" lang="en" xml:lang="en">
    9530                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511438"></a>
     9532                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407651"></a>
    95319533                  <div class="header">Description:</div>
    95329534                  <p xmlns="http://www.w3.org/1999/xhtml">should try to write the first count elements of list to
     
    95409542                <strong>[Generic Function]</strong>
    95419543                <br></br>
    9542                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-read-vector</strong></span>
     9544                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-read-vector</strong></span>
    95439545                stream vector start end</code>
    95449546              </div>
     
    95489550              <div>
    95499551                <div class="refsect1" lang="en" xml:lang="en">
    9550                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511482"></a>
     9552                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407709"></a>
    95519553                  <div class="header">Arguments and Values:</div>
    95529554                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---a stream, presumably a fundamental-input-stream</p>
     
    95649566                </div>
    95659567                <div class="refsect1" lang="en" xml:lang="en">
    9566                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511553"></a>
     9568                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407784"></a>
    95679569                  <div class="header">Description:</div>
    95689570                  <p xmlns="http://www.w3.org/1999/xhtml">should try to read successive elements from stream into
     
    95799581                <strong>[Generic Function]</strong>
    95809582                <br></br>
    9581                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-write-vector</strong></span>
     9583                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-write-vector</strong></span>
    95829584                stream vector start end</code>
    95839585              </div>
     
    95879589              <div>
    95889590                <div class="refsect1" lang="en" xml:lang="en">
    9589                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511600"></a>
     9591                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407844"></a>
    95909592                  <div class="header">Arguments and Values:</div>
    95919593                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---a stream, presumably a fundamental-output-stream</p>
     
    96039605                </div>
    96049606                <div class="refsect1" lang="en" xml:lang="en">
    9605                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511672"></a>
     9607                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407920"></a>
    96069608                  <div class="header">Description:</div>
    96079609                  <p xmlns="http://www.w3.org/1999/xhtml">should try to write successive elements of vector to stream,
     
    96169618                <strong>[Generic Function]</strong>
    96179619                <br></br>
    9618                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ccl::stream-device</strong></span>
     9620                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ccl::stream-device</strong></span>
    96199621                s direction</code>
    96209622              </div>
     
    96259627              <div>
    96269628                <div class="refsect1" lang="en" xml:lang="en">
    9627                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511719"></a>
     9629                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407980"></a>
    96289630                  <div class="header">Method Signatures:</div>
    9629                   <div class="synopsis"><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ccl::stream-device</strong></span> <i>
     9631                  <div class="synopsis"><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ccl::stream-device</strong></span> <i>
    96309632                (s stream) direction =&gt; fd</i></div>
    96319633                </div>
    96329634                <div class="refsect1" lang="en" xml:lang="en">
    9633                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511731"></a>
     9635                  <a xmlns="http://www.w3.org/1999/xhtml" id="id407998"></a>
    96349636                  <div class="header">Arguments and Values:</div>
    96359637                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">s</span></i>---a stream.</p>
     
    96429644                </div>
    96439645                <div class="refsect1" lang="en" xml:lang="en">
    9644                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511789"></a>
     9646                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408063"></a>
    96459647                  <div class="header">Description:</div>
    96469648                  <p xmlns="http://www.w3.org/1999/xhtml">Returns the file descriptor associated with
     
    96589660                <strong>[Generic Function]</strong>
    96599661                <br></br>
    9660                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-read-ivector</strong></span>
     9662                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-read-ivector</strong></span>
    96619663                stream ivector start-octet max-octets</code>
    96629664              </div>
     
    96669668              <div>
    96679669                <div class="refsect1" lang="en" xml:lang="en">
    9668                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511844"></a>
     9670                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408133"></a>
    96699671                  <div class="header">Description:</div>
    96709672                  <p xmlns="http://www.w3.org/1999/xhtml">Reads up to max-octets octets from stream into ivector,
     
    96739675                </div>
    96749676                <div class="refsect1" lang="en" xml:lang="en">
    9675                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511857"></a>
     9677                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408145"></a>
    96769678                  <div class="header">Arguments:</div>
    96779679                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---An input stream. The method defined on
     
    96909692                <strong>[Generic Function]</strong>
    96919693                <br></br>
    9692                 <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">stream-write-ivector stream</strong></span>
     9694                <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>stream-write-ivector stream</strong></span>
    96939695                ivector start-octet max-octets</code>
    96949696              </div>
     
    96989700              <div>
    96999701                <div class="refsect1" lang="en" xml:lang="en">
    9700                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511954"></a>
     9702                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408264"></a>
    97019703                  <div class="header">Description:</div>
    97029704                  <p xmlns="http://www.w3.org/1999/xhtml">Writes max-octets octets to stream from ivector, starting at
     
    97049706                </div>
    97059707                <div class="refsect1" lang="en" xml:lang="en">
    9706                   <a xmlns="http://www.w3.org/1999/xhtml" id="id511966"></a>
     9708                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408276"></a>
    97079709                  <div class="header">Arguments:</div>
    97089710                  <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">stream</span></i>---An input stream. The method defined on
     
    97149716                </div>
    97159717                <div class="refsect1" lang="en" xml:lang="en">
    9716                   <a xmlns="http://www.w3.org/1999/xhtml" id="id512030"></a>
     9718                  <a xmlns="http://www.w3.org/1999/xhtml" id="id408348"></a>
    97179719                  <div class="header">Examples:</div>
    97189720                  <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
     
    1065910661            <dt>
    1066010662              <span class="sect1">
    10661                 <a href="#id523636">12.12. The Foreign-Function-Interface Dictionary</a>
     10663                <a href="#id430545">12.12. The Foreign-Function-Interface Dictionary</a>
    1066210664              </span>
    1066310665            </dt>
     
    1075610758          corresponds to <code class="code">NS:NS-RECT</code>, and you can
    1075710759          use <code class="code">:NS-RECT</code> as a type designator
    10758           in <a href="#anchor_rlet"><code class="code">RLET</code></a> forms to
     10760          in <a class="link" href="#anchor_rlet"><code class="code">RLET</code></a> forms to
    1075910761          specify a structure of type <code class="code">NS-RECT</code>.</p>
    1076010762                  </li>
     
    1100211004                  <dd>
    1100311005                    <p>The argument/return values
    11004                         is <a href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a>.</p>
     11006                        is <a class="link" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a>.</p>
    1100511007                  </dd>
    1100611008                  <dt>
     
    1148711489                <div>
    1148811490                  <div>
    11489                     <h4 class="title"><a id="id520741"></a>12.3.2.4. %int-to-ptr [Function]</h4>
     11491                    <h4 class="title"><a id="id410723"></a>12.3.2.4. %int-to-ptr [Function]</h4>
    1149011492                  </div>
    1149111493                </div>
     
    1152811530                <div>
    1152911531                  <div>
    11530                     <h4 class="title"><a id="id520806"></a>12.3.2.5. %inc-ptr [Function]</h4>
     11532                    <h4 class="title"><a id="id410798"></a>12.3.2.5. %inc-ptr [Function]</h4>
    1153111533                  </div>
    1153211534                </div>
     
    1157811580                <div>
    1157911581                  <div>
    11580                     <h4 class="title"><a id="id520887"></a>12.3.2.6. %ptr-to-int [Function]</h4>
     11582                    <h4 class="title"><a id="id410889"></a>12.3.2.6. %ptr-to-int [Function]</h4>
    1158111583                  </div>
    1158211584                </div>
     
    1162011622                <div>
    1162111623                  <div>
    11622                     <h4 class="title"><a id="id520952"></a>12.3.2.7. %null-ptr [Macro]</h4>
     11624                    <h4 class="title"><a id="id410964"></a>12.3.2.7. %null-ptr [Macro]</h4>
    1162311625                  </div>
    1162411626                </div>
     
    1164511647                <div>
    1164611648                  <div>
    11647                     <h4 class="title"><a id="id520987"></a>12.3.2.8. %null-ptr-p [Function]</h4>
     11649                    <h4 class="title"><a id="id411006"></a>12.3.2.8. %null-ptr-p [Function]</h4>
    1164811650                  </div>
    1164911651                </div>
     
    1168711689                <div>
    1168811690                  <div>
    11689                     <h4 class="title"><a id="id521053"></a>12.3.2.9. %setf-macptr [Function]</h4>
     11691                    <h4 class="title"><a id="id411081"></a>12.3.2.9. %setf-macptr [Function]</h4>
    1169011692                  </div>
    1169111693                </div>
     
    1173511737                <div>
    1173611738                  <div>
    11737                     <h4 class="title"><a id="id521132"></a>12.3.2.10. %incf-ptr [Macro]</h4>
     11739                    <h4 class="title"><a id="id411171"></a>12.3.2.10. %incf-ptr [Macro]</h4>
    1173811740                  </div>
    1173911741                </div>
     
    1178311785                <div>
    1178411786                  <div>
    11785                     <h4 class="title"><a id="id521210"></a>12.3.2.11. with-macptrs [Macro]</h4>
     11787                    <h4 class="title"><a id="id411262"></a>12.3.2.11. with-macptrs [Macro]</h4>
    1178611788                  </div>
    1178711789                </div>
     
    1183311835                <div>
    1183411836                  <div>
    11835                     <h4 class="title"><a id="id521291"></a>12.3.2.12. %stack-block [Macro]</h4>
     11837                    <h4 class="title"><a id="id411354"></a>12.3.2.12. %stack-block [Macro]</h4>
    1183611838                  </div>
    1183711839                </div>
     
    1188411886                <div>
    1188511887                  <div>
    11886                     <h4 class="title"><a id="id521373"></a>12.3.2.13. make-cstring [Function]</h4>
     11888                    <h4 class="title"><a id="id411446"></a>12.3.2.13. make-cstring [Function]</h4>
    1188711889                  </div>
    1188811890                </div>
     
    1192711929                <div>
    1192811930                  <div>
    11929                     <h4 class="title"><a id="id521441"></a>12.3.2.14. with-cstrs [Macro]</h4>
     11931                    <h4 class="title"><a id="id411522"></a>12.3.2.14. with-cstrs [Macro]</h4>
    1193011932                  </div>
    1193111933                </div>
     
    1197711979                <div>
    1197811980                  <div>
    11979                     <h4 class="title"><a id="id521523"></a>12.3.2.15. with-encoded-cstrs [Macro]</h4>
     11981                    <h4 class="title"><a id="id411614"></a>12.3.2.15. with-encoded-cstrs [Macro]</h4>
    1198011982                  </div>
    1198111983                </div>
     
    1204012042                <div>
    1204112043                  <div>
    12042                     <h4 class="title"><a id="id521635"></a>12.3.2.16. %get-cstring [Function]</h4>
     12044                    <h4 class="title"><a id="id411737"></a>12.3.2.16. %get-cstring [Function]</h4>
    1204312045                  </div>
    1204412046                </div>
     
    1208212084                <div>
    1208312085                  <div>
    12084                     <h4 class="title"><a id="id521700"></a>12.3.2.17. %str-from-ptr [Function]</h4>
     12086                    <h4 class="title"><a id="id428584"></a>12.3.2.17. %str-from-ptr [Function]</h4>
    1208512087                  </div>
    1208612088                </div>
     
    1218312185        reader macros (and references to foreign record types and
    1218412186        fields), compiling <code class="literal">CCL</code> from those sources depends on the
    12185         ability to find and use (see <a href="#Building-the-heap-image" title="3.5. Building the heap image">Section 3.5, “Building the heap image”</a>).</p>
     12187        ability to find and use (see <a class="xref" href="#Building-the-heap-image" title="3.5. Building the heap image">Section 3.5, “Building the heap image”</a>).</p>
    1218612188          </div>
    1218712189          <div class="sect2" lang="en" xml:lang="en">
     
    1219812200                  <p><code class="literal">CCL</code> now preserves the case of external symbols in
    1219912201                its database
    12200                 files. See <a href="#Case-sensitivity-of-foreign-names-in-CCL" title="12.8. Case-sensitivity of foreign names in CCL">Case-sensitivity
     12202                files. See <a class="link" href="#Case-sensitivity-of-foreign-names-in-CCL" title="12.8. Case-sensitivity of foreign names in CCL">Case-sensitivity
    1220112203                of foreign names in <code class="literal">CCL</code></a> for information about
    1220212204                case in foreign symbol names.</p>
     
    1221312215            </div>
    1221412216            <p xmlns="http://www.w3.org/1999/xhtml">For information about building the database files,
    12215             see <a href="#The-Interface-Translator" title="12.7. The Interface Translator">Section 12.7, “The Interface Translator”</a>.</p>
     12217            see <a class="xref" href="#The-Interface-Translator" title="12.7. The Interface Translator">Section 12.7, “The Interface Translator”</a>.</p>
    1221612218          </div>
    1221712219        </div>
     
    1235312355              </ol>
    1235412356            </div>
    12355             <p xmlns="http://www.w3.org/1999/xhtml">Refer to <a href="#The-Interface-Translator" title="12.7. The Interface Translator">Section 12.7, “The Interface Translator”</a> for
     12357            <p xmlns="http://www.w3.org/1999/xhtml">Refer to <a class="xref" href="#The-Interface-Translator" title="12.7. The Interface Translator">Section 12.7, “The Interface Translator”</a> for
    1235612358        information about running the interface translator and .ffi
    1235712359        parser.</p>
     
    1238612388            <p xmlns="http://www.w3.org/1999/xhtml"><code class="literal">CCL</code> provides facilities to open and close shared
    1238712389        libraries.</p>
    12388             <p xmlns="http://www.w3.org/1999/xhtml">"Opening" a shared library, which is done with <a href="#f_open-shared-library" title="Function OPEN-SHARED-LIBRARY"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-shared-library</b></a>, maps the library's code and
     12390            <p xmlns="http://www.w3.org/1999/xhtml">"Opening" a shared library, which is done with <a class="xref" href="#f_open-shared-library" title="Function OPEN-SHARED-LIBRARY"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">open-shared-library</b></a>, maps the library's code and
    1238912391        data into <code class="literal">CCL</code>'s address space and makes its exported
    1239012392        symbols accessible to <code class="literal">CCL</code>.</p>
    12391             <p xmlns="http://www.w3.org/1999/xhtml">"Closing" a shared library, which is done with <a href="#f_close-shared-library" title="Function CLOSE-SHARED-LIBRARY"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">close-shared-library</b></a>, unmaps the library's code
     12393            <p xmlns="http://www.w3.org/1999/xhtml">"Closing" a shared library, which is done with <a class="xref" href="#f_close-shared-library" title="Function CLOSE-SHARED-LIBRARY"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">close-shared-library</b></a>, unmaps the library's code
    1239212394        and and removes the library's symbols from the global
    1239312395        namespace.</p>
     
    1292912931      functions can actually be found by the system.  We don't have to
    1293012932      do this, but it helps to know how to find out whether this is
    12931       the problem, when something goes wrong.  We use <a href="#m_external-call" title="Macro EXTERNAL-CALL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">external-call</b></a>:</p>
     12933      the problem, when something goes wrong.  We use <a class="xref" href="#m_external-call" title="Macro EXTERNAL-CALL"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">external-call</b></a>:</p>
    1293212934          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1293312935
     
    1358913591            <div>
    1359013592              <div>
    13591                 <h2 class="title" style="clear: both"><a id="id523636"></a>12.12. The Foreign-Function-Interface Dictionary</h2>
     13593                <h2 class="title" style="clear: both"><a id="id430545"></a>12.12. The Foreign-Function-Interface Dictionary</h2>
    1359213594              </div>
    1359313595            </div>
     
    1360613608            <div>
    1360713609              <div class="refsect1" lang="en" xml:lang="en">
    13608                 <a xmlns="http://www.w3.org/1999/xhtml" id="id523669"></a>
     13610                <a xmlns="http://www.w3.org/1999/xhtml" id="id430583"></a>
    1360913611                <div class="header">Description:</div>
    1361013612                <p xmlns="http://www.w3.org/1999/xhtml">Reads a symbol from the current input stream, with *PACKAGE*
    1361113613              bound to the "OS" package and with readtable-case preserved.</p>
    13612                 <p xmlns="http://www.w3.org/1999/xhtml">Does a lookup on that symbol in <a href="#The-Interface-Database" title="12.4. The Interface Database">the <code class="literal">CCL</code> interface
     13614                <p xmlns="http://www.w3.org/1999/xhtml">Does a lookup on that symbol in <a class="link" href="#The-Interface-Database" title="12.4. The Interface Database">the <code class="literal">CCL</code> interface
    1361313615                database</a>, signalling an error if no foreign function
    13614               information can be found for the symbol in any active <a href="#Using-Interface-Directories" title="12.5. Using Interface Directories">interface
     13616              information can be found for the symbol in any active <a class="link" href="#Using-Interface-Directories" title="12.5. Using Interface Directories">interface
    1361513617                directory</a>.</p>
    1361613618                <p xmlns="http://www.w3.org/1999/xhtml">Notes the foreign function information, including the foreign
     
    1365813660            <div>
    1365913661              <div class="refsect1" lang="en" xml:lang="en">
    13660                 <a xmlns="http://www.w3.org/1999/xhtml" id="id523776"></a>
     13662                <a xmlns="http://www.w3.org/1999/xhtml" id="id430689"></a>
    1366113663                <div class="header">Description:</div>
    1366213664                <p xmlns="http://www.w3.org/1999/xhtml">In <code class="literal">CCL</code> 1.2 and later, the #&amp; reader macro can be used to
     
    1371713719            <div>
    1371813720              <div class="refsect1" lang="en" xml:lang="en">
    13719                 <a xmlns="http://www.w3.org/1999/xhtml" id="id523895"></a>
     13721                <a xmlns="http://www.w3.org/1999/xhtml" id="id430806"></a>
    1372013722                <div class="header">Description:</div>
    1372113723                <p xmlns="http://www.w3.org/1999/xhtml">In <code class="literal">CCL</code> 0.14.2 and later, the #? reader macro can be used
     
    1376413766            <div>
    1376513767              <div class="refsect1" lang="en" xml:lang="en">
    13766                 <a xmlns="http://www.w3.org/1999/xhtml" id="id523978"></a>
     13768                <a xmlns="http://www.w3.org/1999/xhtml" id="id430889"></a>
    1376713769                <div class="header">Description:</div>
    1376813770                <p xmlns="http://www.w3.org/1999/xhtml">In <code class="literal">CCL</code> 1.2 and later, the #/ reader macro can be used to
     
    1386713869            <div>
    1386813870              <div class="refsect1" lang="en" xml:lang="en">
    13869                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524405"></a>
     13871                <a xmlns="http://www.w3.org/1999/xhtml" id="id431028"></a>
    1387013872                <div class="header">Description:</div>
    1387113873                <p xmlns="http://www.w3.org/1999/xhtml">In Clozure CL 1.2 and later, the #&gt; reader macro reads
     
    1388713889              <br></br>
    1388813890              <code>
    13889               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">close-shared-library</strong></span> library <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em>
     13891              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>close-shared-library</strong></span> library <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;key</em>
    1389013892              completely</code>
    1389113893            </div>
     
    1389613898            <div>
    1389713899              <div class="refsect1" lang="en" xml:lang="en">
    13898                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524468"></a>
     13900                <a xmlns="http://www.w3.org/1999/xhtml" id="id431097"></a>
    1389913901                <div class="header">Values:</div>
    1390013902                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">library</span></i>---either an object of type SHLIB, or a string which
     
    1390313905              </div>
    1390413906              <div class="refsect1" lang="en" xml:lang="en">
    13905                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524505"></a>
     13907                <a xmlns="http://www.w3.org/1999/xhtml" id="id431134"></a>
    1390613908                <div class="header">Description:</div>
    1390713909                <p xmlns="http://www.w3.org/1999/xhtml">If <em class="varname">completely</em> is T, sets the
    1390813910              reference count of <em class="varname">library</em> to 0.  Otherwise,
    1390913911              decrements it by 1.  In either case, if the reference count
    13910               becomes 0, <span><strong class="function">close-shared-library</strong></span>
     13912              becomes 0, <span class="function"><strong>close-shared-library</strong></span>
    1391113913              frees all memory resources consumed <em class="varname">library</em>
    1391213914              and
     
    1392213924              <br></br>
    1392313925              <code>
    13924               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">defcallback</strong></span> name
     13926              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>defcallback</strong></span> name
    1392513927              ({arg-type-specifier var}* <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> result-type-specifier)
    1392613928              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body
     
    1393213934            <div>
    1393313935              <div class="refsect1" lang="en" xml:lang="en">
    13934                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524573"></a>
     13936                <a xmlns="http://www.w3.org/1999/xhtml" id="id431210"></a>
    1393513937                <div class="header">Values:</div>
    1393613938                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---A symbol which can be made into a special variable</p>
    1393713939                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg-type-specifer</span></i>---One of the foreign argument-type keywords,
    13938                         described above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
     13940                        described above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
    1393913941                          type specifier</a>.  In addition, if the keyword
    1394013942                        :WITHOUT-INTERRUPTS is specified, the callback will be
     
    1394913951              </div>
    1395013952              <div class="refsect1" lang="en" xml:lang="en">
    13951                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524649"></a>
     13953                <a xmlns="http://www.w3.org/1999/xhtml" id="id431281"></a>
    1395213954                <div class="header">Description:</div>
    1395313955                <p xmlns="http://www.w3.org/1999/xhtml">Proclaims <em class="varname">name</em>
     
    1396513967              This feature allows for callback functions to be redefined
    1396613968              incrementally, just like Lisp functions are.</p>
    13967                 <p xmlns="http://www.w3.org/1999/xhtml"><span><strong class="function">defcallback</strong></span>
     13969                <p xmlns="http://www.w3.org/1999/xhtml"><span class="function"><strong>defcallback</strong></span>
    1396813970              returns the callback pointer, e.g., the
    1396913971              value of <em class="varname">name</em>.</p>
     
    1397713979              <br></br>
    1397813980              <code>
    13979               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">def-foreign-type</strong></span> name foreign-type-spec
     13981              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>def-foreign-type</strong></span> name foreign-type-spec
    1398013982            </code>
    1398113983            </div>
     
    1398513987            <div>
    1398613988              <div class="refsect1" lang="en" xml:lang="en">
    13987                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524725"></a>
     13989                <a xmlns="http://www.w3.org/1999/xhtml" id="id431360"></a>
    1398813990                <div class="header">Values:</div>
    1398913991                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---NIL or a keyword; the keyword may contain
    13990                         <a xmlns="http://www.w3.org/1999/xhtml" href="#Case-sensitivity-of-foreign-names-in-CCL" title="12.8. Case-sensitivity of foreign names in CCL">escaping constructs</a>.</p>
     13992                        <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Case-sensitivity-of-foreign-names-in-CCL" title="12.8. Case-sensitivity of foreign names in CCL">escaping constructs</a>.</p>
    1399113993                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">foreign-type-spec</span></i>---A foreign type specifier, whose syntax is (loosely)
    1399213994                        defined above.</p>
    1399313995              </div>
    1399413996              <div class="refsect1" lang="en" xml:lang="en">
    13995                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524767"></a>
     13997                <a xmlns="http://www.w3.org/1999/xhtml" id="id431402"></a>
    1399613998                <div class="header">Description:</div>
    1399713999                <p xmlns="http://www.w3.org/1999/xhtml">If name is non-NIL, defines name to be an alias for the
     
    1401814020              <br></br>
    1401914021              <code>
    14020               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external</strong></span> name =&gt; entry
     14022              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external</strong></span> name =&gt; entry
    1402114023            </code>
    1402214024            </div>
     
    1402714029            <div>
    1402814030              <div class="refsect1" lang="en" xml:lang="en">
    14029                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524838"></a>
     14031                <a xmlns="http://www.w3.org/1999/xhtml" id="id431474"></a>
    1403014032                <div class="header">Values:</div>
    1403114033                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---
     
    1404014042              </div>
    1404114043              <div class="refsect1" lang="en" xml:lang="en">
    14042                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524880"></a>
     14044                <a xmlns="http://www.w3.org/1999/xhtml" id="id431515"></a>
    1404314045                <div class="header">Description:</div>
    1404414046                <p xmlns="http://www.w3.org/1999/xhtml">If there is already an EXTERNAL-ENTRY-POINT for
     
    1405914061              <br></br>
    1406014062              <code>
    14061               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">external-call</strong></span> name
     14063              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>external-call</strong></span> name
    1406214064              {arg-type-specifier arg}* <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> result-type-specifier
    1406314065            </code>
     
    1406814070            <div>
    1406914071              <div class="refsect1" lang="en" xml:lang="en">
    14070                 <a xmlns="http://www.w3.org/1999/xhtml" id="id524945"></a>
     14072                <a xmlns="http://www.w3.org/1999/xhtml" id="id431584"></a>
    1407114073                <div class="header">Values:</div>
    1407214074                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---A lisp string. See external, above.</p>
    1407314075                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg-type-specifer</span></i>---One of the foreign argument-type keywords, described
    14074                         above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
     14076                        above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
    1407514077                          type specifier</a>.</p>
    1407614078                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg</span></i>---A lisp value of type indicated by the corresponding
    1407714079                        arg-type-specifier</p>
    1407814080                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result-type-specifier</span></i>---One of the foreign argument-type keywords, described
    14079                         above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
     14081                        above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
    1408014082                          type specifier</a>.</p>
    1408114083              </div>
    1408214084              <div class="refsect1" lang="en" xml:lang="en">
    14083                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525019"></a>
     14085                <a xmlns="http://www.w3.org/1999/xhtml" id="id431657"></a>
    1408414086                <div class="header">Description:</div>
    1408514087                <p xmlns="http://www.w3.org/1999/xhtml">Calls the foreign function at the address obtained by
     
    1409914101              <br></br>
    1410014102              <code>
    14101               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">%ff-call</strong></span> entrypoint
     14103              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>%ff-call</strong></span> entrypoint
    1410214104              {arg-type-keyword arg}* <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> result-type-keyword
    1410314105            </code>
     
    1410814110            <div>
    1410914111              <div class="refsect1" lang="en" xml:lang="en">
    14110                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525074"></a>
     14112                <a xmlns="http://www.w3.org/1999/xhtml" id="id431717"></a>
    1411114113                <div class="header">Values:</div>
    1411214114                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">entrypoint</span></i>---A fixnum or MACPTR</p>
     
    1411914121              </div>
    1412014122              <div class="refsect1" lang="en" xml:lang="en">
    14121                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525139"></a>
     14123                <a xmlns="http://www.w3.org/1999/xhtml" id="id431780"></a>
    1412214124                <div class="header">Description:</div>
    1412314125                <p xmlns="http://www.w3.org/1999/xhtml">Calls the foreign function at address entrypoint passing the
     
    1413614138              <br></br>
    1413714139              <code>
    14138               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ff-call</strong></span> entrypoint
     14140              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ff-call</strong></span> entrypoint
    1413914141              {arg-type-specifier arg}* <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> result-type-specifier
    1414014142            </code>
     
    1414514147            <div>
    1414614148              <div class="refsect1" lang="en" xml:lang="en">
    14147                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525193"></a>
     14149                <a xmlns="http://www.w3.org/1999/xhtml" id="id431839"></a>
    1414814150                <div class="header">Values:</div>
    1414914151                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">entrypoint</span></i>---A fixnum or MACPTR</p>
    1415014152                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg-type-specifer</span></i>---One of the foreign argument-type keywords, described
    14151                         above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
     14153                        above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
    1415214154                          type specifier</a>.</p>
    1415314155                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg</span></i>---A lisp value of type indicated by the corresponding
    1415414156                        arg-type-specifier</p>
    1415514157                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result-type-specifier</span></i>---One of the foreign argument-type keywords, described
    14156                         above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
     14158                        above, or an equivalent <a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Specifying-And-Using-Foreign-Types" title="12.1. Specifying And Using Foreign Types">foreign
    1415714159                          type specifier</a>.</p>
    1415814160              </div>
    1415914161              <div class="refsect1" lang="en" xml:lang="en">
    14160                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525267"></a>
     14162                <a xmlns="http://www.w3.org/1999/xhtml" id="id431912"></a>
    1416114163                <div class="header">Description:</div>
    1416214164                <p xmlns="http://www.w3.org/1999/xhtml">Calls the foreign function at address entrypoint passing the
     
    1417514177              <br></br>
    1417614178              <code>
    14177               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">foreign-symbol-address</strong></span> name
     14179              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>foreign-symbol-address</strong></span> name
    1417814180            </code>
    1417914181            </div>
     
    1418314185            <div>
    1418414186              <div class="refsect1" lang="en" xml:lang="en">
    14185                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525318"></a>
     14187                <a xmlns="http://www.w3.org/1999/xhtml" id="id431968"></a>
    1418614188                <div class="header">Values:</div>
    1418714189                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---A lisp string.</p>
    1418814190              </div>
    1418914191              <div class="refsect1" lang="en" xml:lang="en">
    14190                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525340"></a>
     14192                <a xmlns="http://www.w3.org/1999/xhtml" id="id431990"></a>
    1419114193                <div class="header">Description:</div>
    1419214194                <p xmlns="http://www.w3.org/1999/xhtml">Tries to resolve the address of the foreign symbol
    1419314195              name. If successful, returns that address encapsulated in
    14194               <a href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a
     14196              <a class="link" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a
    1419514197                MACPTR</a>, else returns NIL.</p>
    1419614198              </div>
     
    1420314205              <br></br>
    1420414206              <code>
    14205               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">foreign-symbol-entry</strong></span> name
     14207              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>foreign-symbol-entry</strong></span> name
    1420614208            </code>
    1420714209            </div>
     
    1421114213            <div>
    1421214214              <div class="refsect1" lang="en" xml:lang="en">
    14213                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525392"></a>
     14215                <a xmlns="http://www.w3.org/1999/xhtml" id="id432050"></a>
    1421414216                <div class="header">Values:</div>
    1421514217                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---A lisp string.</p>
    1421614218              </div>
    1421714219              <div class="refsect1" lang="en" xml:lang="en">
    14218                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525414"></a>
     14220                <a xmlns="http://www.w3.org/1999/xhtml" id="id432072"></a>
    1421914221                <div class="header">Description:</div>
    1422014222                <p xmlns="http://www.w3.org/1999/xhtml">Tries to resolve the address of the foreign symbol name. If
     
    1423014232              <br></br>
    1423114233              <code>
    14232               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">free</strong></span> ptr
     14234              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>free</strong></span> ptr
    1423314235            </code>
    1423414236            </div>
     
    1423814240            <div>
    1423914241              <div class="refsect1" lang="en" xml:lang="en">
    14240                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525461"></a>
     14242                <a xmlns="http://www.w3.org/1999/xhtml" id="id432126"></a>
    1424114243                <div class="header">Values:</div>
    1424214244                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ptr</span></i>---A <code xmlns="http://www.w3.org/1999/xhtml" class="code">MACPTR</code> that points to a block of
     
    1424414246              </div>
    1424514247              <div class="refsect1" lang="en" xml:lang="en">
    14246                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525488"></a>
     14248                <a xmlns="http://www.w3.org/1999/xhtml" id="id432152"></a>
    1424714249                <div class="header">Description:</div>
    1424814250                <p xmlns="http://www.w3.org/1999/xhtml">In Clozure CL 1.2 and later, the <code class="code">CCL:FREE</code>
     
    1426714269              <br></br>
    1426814270              <code>
    14269               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-gcable-record</strong></span> typespec
     14271              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-gcable-record</strong></span> typespec
    1427014272              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms =&gt; result
    1427114273            </code>
     
    1427614278            <div>
    1427714279              <div class="refsect1" lang="en" xml:lang="en">
    14278                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525572"></a>
     14280                <a xmlns="http://www.w3.org/1999/xhtml" id="id432243"></a>
    1427914281                <div class="header">Values:</div>
    1428014282                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">typespec</span></i>---A foreign type specifier, or a keyword which is used
     
    1428514287                        values appropriate for the types of those fields.</p>
    1428614288                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---
    14287                         A <span xmlns="http://www.w3.org/1999/xhtml"><strong class="type">macptr</strong></span> which encapsulates the address of a
     14289                        A <span xmlns="http://www.w3.org/1999/xhtml" class="type"><strong>macptr</strong></span> which encapsulates the address of a
    1428814290                        newly-allocated record on the foreign heap. The foreign
    14289                         object returned by <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-gcable-record</strong></span>
     14291                        object returned by <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-gcable-record</strong></span>
    1429014292                        is freed when the garbage collector determines that
    1429114293                        the <code xmlns="http://www.w3.org/1999/xhtml" class="code">MACPTR</code> object that describes it is
     
    1429314295              </div>
    1429414296              <div class="refsect1" lang="en" xml:lang="en">
    14295                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525642"></a>
     14297                <a xmlns="http://www.w3.org/1999/xhtml" id="id432310"></a>
    1429614298                <div class="header">Description:</div>
    1429714299                <p xmlns="http://www.w3.org/1999/xhtml">
    1429814300              Allocates a block of foreign memory suitable to hold the foreign
    1429914301              type described by <code class="code">typespec</code>, in the same manner
    14300               as <a href="#anchor_make-record">MAKE-RECORD</a>. In
     14302              as <a class="link" href="#anchor_make-record">MAKE-RECORD</a>. In
    1430114303              addition, <code class="code">MAKE-GCABLE-RECORD</code> marks the
    1430214304              returned object gcable; in other words, it informs the garbage
     
    1430614308                <p xmlns="http://www.w3.org/1999/xhtml">In all other respects, <code class="code">MAKE-GCABLE-RECORD</code> works
    1430714309          the same way
    14308           as <a href="#anchor_make-record">MAKE-RECORD</a></p>
     14310          as <a class="link" href="#anchor_make-record">MAKE-RECORD</a></p>
    1430914311                <p xmlns="http://www.w3.org/1999/xhtml"> When using gcable pointers, it's important to remember the
    1431014312          distinction between a <code class="code">MACPTR</code> object (which is a
     
    1433314335              <br></br>
    1433414336              <code>
    14335               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">make-record</strong></span> typespec
     14337              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>make-record</strong></span> typespec
    1433614338              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms =&gt; result
    1433714339            </code>
     
    1434214344            <div>
    1434314345              <div class="refsect1" lang="en" xml:lang="en">
    14344                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525758"></a>
     14346                <a xmlns="http://www.w3.org/1999/xhtml" id="id432426"></a>
    1434514347                <div class="header">Values:</div>
    1434614348                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">typespec</span></i>---A foreign type specifier, or a keyword which is used
     
    1435114353                        values appropriate for the types of those fields.</p>
    1435214354                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">result</span></i>---
    14353                         A <span xmlns="http://www.w3.org/1999/xhtml"><strong class="type">macptr</strong></span> which encapsulates the address of a
     14355                        A <span xmlns="http://www.w3.org/1999/xhtml" class="type"><strong>macptr</strong></span> which encapsulates the address of a
    1435414356                        newly-allocated record on the foreign heap.
    1435514357                      </p>
    1435614358              </div>
    1435714359              <div class="refsect1" lang="en" xml:lang="en">
    14358                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525819"></a>
     14360                <a xmlns="http://www.w3.org/1999/xhtml" id="id432484"></a>
    1435914361                <div class="header">Description:</div>
    1436014362                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1436314365              denoted by <em class="varname">typespec</em>, on the foreign
    1436414366              heap.  The record is allocated using the C function
    14365               <span><strong class="function">malloc</strong></span>, and the user of
    14366               <span><strong class="function">make-record</strong></span> must explicitly call
    14367               the function <span><strong class="function">CCL:FREE</strong></span> to deallocate the
     14367              <span class="function"><strong>malloc</strong></span>, and the user of
     14368              <span class="function"><strong>make-record</strong></span> must explicitly call
     14369              the function <span class="function"><strong>CCL:FREE</strong></span> to deallocate the
    1436814370              record, when it is no longer needed.
    1436914371            </p>
     
    1437314375              is a scalar, <em class="varname">initforms</em> is either a single
    1437414376              value which can be coerced to that type, or no value, in which
    14375               case binary 0 is used.  When the type is a <span><strong class="type">struct</strong></span>,
     14377              case binary 0 is used.  When the type is a <span class="type"><strong>struct</strong></span>,
    1437614378              <em class="varname">initforms</em> is a list, giving field names
    1437714379              and the values for each.  Each field is treated in the same way
     
    1438114383                <p xmlns="http://www.w3.org/1999/xhtml">
    1438214384              When the type is an array, <em class="varname">initforms</em> may
    14383               not be provided, because <span><strong class="function">make-record</strong></span>
    14384               cannot initialize its values.  <span><strong class="function">make-record</strong></span>
    14385               is also unable to initialize fields of a <span><strong class="type">struct</strong></span>
     14385              not be provided, because <span class="function"><strong>make-record</strong></span>
     14386              cannot initialize its values.  <span class="function"><strong>make-record</strong></span>
     14387              is also unable to initialize fields of a <span class="type"><strong>struct</strong></span>
    1438614388              which are themselves
    14387               <span><strong class="type">struct</strong></span>s.  The user of
    14388               <span><strong class="function">make-record</strong></span> should set these values
     14389              <span class="type"><strong>struct</strong></span>s.  The user of
     14390              <span class="function"><strong>make-record</strong></span> should set these values
    1438914391              by another means.
    1439014392            </p>
     
    1439214394              A possibly-significant limitation is that it must be possible to
    1439314395              find the foreign type at the time the macro is expanded;
    14394               <span><strong class="function">make-record</strong></span> signals an error if this is
     14396              <span class="function"><strong>make-record</strong></span> signals an error if this is
    1439514397              not the case.
    1439614398            </p>
    1439714399              </div>
    1439814400              <div class="refsect1" lang="en" xml:lang="en">
    14399                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525905"></a>
     14401                <a xmlns="http://www.w3.org/1999/xhtml" id="id432574"></a>
    1440014402                <div class="header">Notes:</div>
    1440114403                <p xmlns="http://www.w3.org/1999/xhtml">
    14402               It is inconvenient that <span><strong class="function">make-record</strong></span> is a
     14404              It is inconvenient that <span class="function"><strong>make-record</strong></span> is a
    1440314405              macro, because this means that <em class="varname">typespec</em>
    1440414406              cannot be a variable; it must be an immediate value.
     
    1440614408                <p xmlns="http://www.w3.org/1999/xhtml">
    1440714409              If it weren't for this requirement,
    14408               <span><strong class="function">make-record</strong></span> could be a function.  However,
     14410              <span class="function"><strong>make-record</strong></span> could be a function.  However,
    1440914411              that would mean that any stand-alone application using it would
    1441014412              have to include a copy of the interface database
    14411               (see <a href="#The-Interface-Database" title="12.4. The Interface Database">Section 12.4, “The Interface Database”</a>), which is undesirable
     14413              (see <a class="xref" href="#The-Interface-Database" title="12.4. The Interface Database">Section 12.4, “The Interface Database”</a>), which is undesirable
    1441214414              because it's large.
    1441314415            </p>
     
    1442114423              <br></br>
    1442214424              <code>
    14423               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">open-shared-library</strong></span> name =&gt; library
     14425              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>open-shared-library</strong></span> name =&gt; library
    1442414426            </code>
    1442514427            </div>
     
    1443014432            <div>
    1443114433              <div class="refsect1" lang="en" xml:lang="en">
    14432                 <a xmlns="http://www.w3.org/1999/xhtml" id="id525978"></a>
     14434                <a xmlns="http://www.w3.org/1999/xhtml" id="id432657"></a>
    1443314435                <div class="header">Values:</div>
    1443414436                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---A SIMPLE-STRING which is presumed to be the so-name of
     
    1443814440              </div>
    1443914441              <div class="refsect1" lang="en" xml:lang="en">
    14440                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526019"></a>
     14442                <a xmlns="http://www.w3.org/1999/xhtml" id="id432697"></a>
    1444114443                <div class="header">Description:</div>
    1444214444                <p xmlns="http://www.w3.org/1999/xhtml">If the library denoted by <em class="varname">name</em> can
     
    1444914451              </div>
    1445014452              <div class="refsect1" lang="en" xml:lang="en">
    14451                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526038"></a>
     14453                <a xmlns="http://www.w3.org/1999/xhtml" id="id432713"></a>
    1445214454                <div class="header">Examples:</div>
    1445314455                <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">;;; Try to do something simple.
     
    1448414486              </div>
    1448514487              <div class="refsect1" lang="en" xml:lang="en">
    14486                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526048"></a>
     14488                <a xmlns="http://www.w3.org/1999/xhtml" id="id432733"></a>
    1448714489                <div class="header">Notes:</div>
    1448814490                <p xmlns="http://www.w3.org/1999/xhtml">It would be helpful to describe what an soname is and give
     
    1449914501              <br></br>
    1450014502              <code>
    14501               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">pref</strong></span> ptr accessor-form
     14503              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>pref</strong></span> ptr accessor-form
    1450214504            </code>
    1450314505            </div>
     
    1450714509            <div>
    1450814510              <div class="refsect1" lang="en" xml:lang="en">
    14509                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526099"></a>
     14511                <a xmlns="http://www.w3.org/1999/xhtml" id="id432791"></a>
    1451014512                <div class="header">Values:</div>
    14511                 <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ptr</span></i>---<a xmlns="http://www.w3.org/1999/xhtml" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a>.</p>
     14513                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">ptr</span></i>---<a xmlns="http://www.w3.org/1999/xhtml" class="link" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a>.</p>
    1451214514                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">accessor-form</span></i>---a keyword which names a foreign type or record, as
    14513                         described in <a xmlns="http://www.w3.org/1999/xhtml" href="#Foreign-type--record--and-field-names" title="12.8.3. Foreign type, record, and field names">Section 12.8.3, “Foreign type, record, and field names”</a>.
     14515                        described in <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#Foreign-type--record--and-field-names" title="12.8.3. Foreign type, record, and field names">Section 12.8.3, “Foreign type, record, and field names”</a>.
    1451414516                      </p>
    1451514517              </div>
    1451614518              <div class="refsect1" lang="en" xml:lang="en">
    14517                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526142"></a>
     14519                <a xmlns="http://www.w3.org/1999/xhtml" id="id432835"></a>
    1451814520                <div class="header">Description:</div>
    1451914521                <p xmlns="http://www.w3.org/1999/xhtml">References an instance of a foreign type (or a component of
     
    1453314535              <br></br>
    1453414536              <code>
    14535               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">%reference-external-entry-point</strong></span> eep
     14537              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>%reference-external-entry-point</strong></span> eep
    1453614538            </code>
    1453714539            </div>
     
    1454114543            <div>
    1454214544              <div class="refsect1" lang="en" xml:lang="en">
    14543                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526202"></a>
     14545                <a xmlns="http://www.w3.org/1999/xhtml" id="id432901"></a>
    1454414546                <div class="header">Values:</div>
    1454514547                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">eep</span></i>---An EXTERNAL-ENTRY-POINT, as obtained by the EXTERNAL
     
    1454714549              </div>
    1454814550              <div class="refsect1" lang="en" xml:lang="en">
    14549                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526226"></a>
     14551                <a xmlns="http://www.w3.org/1999/xhtml" id="id432924"></a>
    1455014552                <div class="header">Description:</div>
    1455114553                <p xmlns="http://www.w3.org/1999/xhtml">Tries to resolve the address of the EXTERNAL-ENTRY-POINT
     
    1456214564              <br></br>
    1456314565              <code>
    14564               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">rlet</strong></span> (var typespec <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms)*
     14566              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>rlet</strong></span> (var typespec <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms)*
    1456514567              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body
    1456614568            </code>
     
    1457114573            <div>
    1457214574              <div class="refsect1" lang="en" xml:lang="en">
    14573                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526284"></a>
     14575                <a xmlns="http://www.w3.org/1999/xhtml" id="id432988"></a>
    1457414576                <div class="header">Values:</div>
    1457514577                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">var</span></i>---A symbol (a lisp variable)</p>
    1457614578                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">typespec</span></i>---A foreign type specifier or foreign record name.</p>
    1457714579                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">initforms</span></i>---As described above, for
    14578                         <a xmlns="http://www.w3.org/1999/xhtml" href="#m_make-record" title="Macro MAKE-RECORD"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-record</b></a></p>
    14579               </div>
    14580               <div class="refsect1" lang="en" xml:lang="en">
    14581                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526335"></a>
     14580                        <a xmlns="http://www.w3.org/1999/xhtml" class="xref" href="#m_make-record" title="Macro MAKE-RECORD"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-record</b></a></p>
     14581              </div>
     14582              <div class="refsect1" lang="en" xml:lang="en">
     14583                <a xmlns="http://www.w3.org/1999/xhtml" id="id433039"></a>
    1458214584                <div class="header">Description:</div>
    1458314585                <p xmlns="http://www.w3.org/1999/xhtml">Executes <em class="varname">body</em>
    1458414586              in an environment in which each var is bound
    14585               to <a href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a> encapsulating the
     14587              to <a class="link" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a MACPTR</a> encapsulating the
    1458614588              address of a stack-allocated foreign memory block, allocated and
    1458714589              initialized from typespec and initforms as per
    14588               <a href="#m_make-record" title="Macro MAKE-RECORD"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-record</b></a>.
     14590              <a class="xref" href="#m_make-record" title="Macro MAKE-RECORD"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">make-record</b></a>.
    1458914591              Returns whatever value(s) <em class="varname">body</em>
    1459014592              returns.</p>
     
    1460014602              <br></br>
    1460114603              <code>
    14602               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">rletz</strong></span> (var typespec <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms)*
     14604              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>rletz</strong></span> (var typespec <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em> initforms)*
    1460314605              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body
    1460414606            </code>
     
    1460914611            <div>
    1461014612              <div class="refsect1" lang="en" xml:lang="en">
    14611                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526408"></a>
     14613                <a xmlns="http://www.w3.org/1999/xhtml" id="id433120"></a>
    1461214614                <div class="header">Values:</div>
    1461314615                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">var</span></i>---A symbol (a lisp variable)</p>
     
    1461614618              </div>
    1461714619              <div class="refsect1" lang="en" xml:lang="en">
    14618                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526457"></a>
     14620                <a xmlns="http://www.w3.org/1999/xhtml" id="id433168"></a>
    1461914621                <div class="header">Description:</div>
    1462014622                <p xmlns="http://www.w3.org/1999/xhtml">Executes body in an environment in which each var is
    14621               bound to <a href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a
     14623              bound to <a class="link" href="#Referencing-and-Using-Foreign-Memory-Addresses" title="12.3. Referencing and Using Foreign Memory Addresses">a
    1462214624                MACPTR</a> encapsulating the address of a stack-allocated
    1462314625              foreign memory block, allocated and initialized from
     
    1463514637              <br></br>
    1463614638              <code>
    14637               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">terminate-when-unreachable</strong></span> object
     14639              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>terminate-when-unreachable</strong></span> object
    1463814640            </code>
    1463914641            </div>
     
    1464314645            <div>
    1464414646              <div class="refsect1" lang="en" xml:lang="en">
    14645                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526518"></a>
     14647                <a xmlns="http://www.w3.org/1999/xhtml" id="id433236"></a>
    1464614648                <div class="header">Values:</div>
    1464714649                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">object</span></i>---A CLOS object of a class for which there exists
    1464814650                        a method of the generic function
    14649                         <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">ccl:terminate</strong></span>.
     14651                        <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>ccl:terminate</strong></span>.
    1465014652                      </p>
    1465114653              </div>
    1465214654              <div class="refsect1" lang="en" xml:lang="en">
    14653                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526546"></a>
     14655                <a xmlns="http://www.w3.org/1999/xhtml" id="id433264"></a>
    1465414656                <div class="header">Description:</div>
    1465514657                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1466714669              longer referred to anywhere in the program, it deallocates
    1466814670              that object, freeing its memory.  However, if
    14669               <span><strong class="function">ccl:terminate-when-unreachable</strong></span> has been
     14671              <span class="function"><strong>ccl:terminate-when-unreachable</strong></span> has been
    1467014672              called on the object at any time, the garbage collector first
    14671               invokes the generic function <span><strong class="function">ccl:terminate</strong></span>,
     14673              invokes the generic function <span class="function"><strong>ccl:terminate</strong></span>,
    1467214674              passing it the object as a parameter.
    1467314675            </p>
    1467414676                <p xmlns="http://www.w3.org/1999/xhtml">
    1467514677              Therefore, to make termination do something useful, you need to
    14676               define a method on <span><strong class="function">ccl:terminate</strong></span>.
     14678              define a method on <span class="function"><strong>ccl:terminate</strong></span>.
    1467714679            </p>
    1467814680                <p xmlns="http://www.w3.org/1999/xhtml">
    1467914681              Because calling
    14680               <span><strong class="function">ccl:terminate-when-unreachable</strong></span> only
     14682              <span class="function"><strong>ccl:terminate-when-unreachable</strong></span> only
    1468114683              affects a single object, rather than all objects of its
    1468214684              class, you
    1468314685              may wish to put a call to it in the
    14684               <span><strong class="function">initialize-instance</strong></span> method of a
     14686              <span class="function"><strong>initialize-instance</strong></span> method of a
    1468514687              class.  Of course, this is only appropriate if you do in fact
    1468614688              want to use termination for all objects of a given class.
     
    1468814690              </div>
    1468914691              <div class="refsect1" lang="en" xml:lang="en">
    14690                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526595"></a>
     14692                <a xmlns="http://www.w3.org/1999/xhtml" id="id433320"></a>
    1469114693                <div class="header">Example:</div>
    1469214694                <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
     
    1470214704              </div>
    1470314705              <div class="refsect1" lang="en" xml:lang="en">
    14704                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526612"></a>
     14706                <a xmlns="http://www.w3.org/1999/xhtml" id="id433335"></a>
    1470514707                <div class="header">See Also:</div>
    1470614708                <span xmlns="http://www.w3.org/1999/xhtml" class="simplelist">
    14707                   <a href="#Tutorial--Allocating-Foreign-Data-on-the-Lisp-Heap" title="12.11. Tutorial: Allocating Foreign Data on the Lisp Heap">Section 12.11, “Tutorial: Allocating Foreign Data on the Lisp Heap ”</a>
     14709                  <a class="xref" href="#Tutorial--Allocating-Foreign-Data-on-the-Lisp-Heap" title="12.11. Tutorial: Allocating Foreign Data on the Lisp Heap">Section 12.11, “Tutorial: Allocating Foreign Data on the Lisp Heap ”</a>
    1470814710                </span>
    1470914711              </div>
     
    1471614718              <br></br>
    1471714719              <code>
    14718               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">unuse-interface-dir</strong></span> dir-id
     14720              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>unuse-interface-dir</strong></span> dir-id
    1471914721            </code>
    1472014722            </div>
     
    1472414726            <div>
    1472514727              <div class="refsect1" lang="en" xml:lang="en">
    14726                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526663"></a>
     14728                <a xmlns="http://www.w3.org/1999/xhtml" id="id433395"></a>
    1472714729                <div class="header">Values:</div>
    1472814730                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">dir-id</span></i>---A keyword whose pname, mapped to lower case, names a
     
    1473114733              </div>
    1473214734              <div class="refsect1" lang="en" xml:lang="en">
    14733                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526688"></a>
     14735                <a xmlns="http://www.w3.org/1999/xhtml" id="id433419"></a>
    1473414736                <div class="header">Description:</div>
    1473514737                <p xmlns="http://www.w3.org/1999/xhtml">Tells <code class="literal">CCL</code> to remove the interface directory denoted by
     
    1474714749              <br></br>
    1474814750              <code>
    14749               <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">use-interface-dir</strong></span> dir-id
     14751              <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>use-interface-dir</strong></span> dir-id
    1475014752            </code>
    1475114753            </div>
     
    1475514757            <div>
    1475614758              <div class="refsect1" lang="en" xml:lang="en">
    14757                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526740"></a>
     14759                <a xmlns="http://www.w3.org/1999/xhtml" id="id433479"></a>
    1475814760                <div class="header">Values:</div>
    1475914761                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">dir-id</span></i>---A keyword whose pname, mapped to lower case, names a
     
    1476214764              </div>
    1476314765              <div class="refsect1" lang="en" xml:lang="en">
    14764                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526765"></a>
     14766                <a xmlns="http://www.w3.org/1999/xhtml" id="id433502"></a>
    1476514767                <div class="header">Description:</div>
    1476614768                <p xmlns="http://www.w3.org/1999/xhtml">Tells <code class="literal">CCL</code> to add the interface directory denoted by
     
    1476814770              foreign type and function information. Arranges that that
    1476914771              directory is searched before any others.</p>
    14770                 <p xmlns="http://www.w3.org/1999/xhtml">Note that <span><strong class="function">use-interface-dir</strong></span>
     14772                <p xmlns="http://www.w3.org/1999/xhtml">Note that <span class="function"><strong>use-interface-dir</strong></span>
    1477114773              merely adds an entry
    1477214774              to a search list.
     
    1477914781              open such a database file whenever it needs to find any
    1478014782              foreign type or
    14781               function information. <a href="#f_unuse-interface-dir" title="Function UNUSE-INTERFACE-DIR"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">unuse-interface-dir</b></a>
     14783              function information. <a class="xref" href="#f_unuse-interface-dir" title="Function UNUSE-INTERFACE-DIR"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">unuse-interface-dir</b></a>
    1478214784              may come in
    1478314785              handy in that case.</p>
    1478414786              </div>
    1478514787              <div class="refsect1" lang="en" xml:lang="en">
    14786                 <a xmlns="http://www.w3.org/1999/xhtml" id="id526801"></a>
     14788                <a xmlns="http://www.w3.org/1999/xhtml" id="id433541"></a>
    1478714789                <div class="header">Examples:</div>
    1478814790                <p xmlns="http://www.w3.org/1999/xhtml">One typically wants interface information to be
     
    1488714889                <dt>
    1488814890                  <span class="sect2">
    14889                     <a href="#id514534">13.6.1. Using <code class="literal">define-objc-method</code></a>
     14891                    <a href="#id412131">13.6.1. Using <code class="literal">define-objc-method</code></a>
    1489014892                  </span>
    1489114893                </dt>
    1489214894                <dt>
    1489314895                  <span class="sect2">
    14894                     <a href="#id429654">13.6.2. Using <code class="literal">objc:defmethod</code></a>
     14896                    <a href="#id412374">13.6.2. Using <code class="literal">objc:defmethod</code></a>
    1489514897                  </span>
    1489614898                </dt>
     
    1494614948    with the Objective-C bridge. For a full description of these
    1494714949    reader-macros, see
    14948     the <a href="#anchor_Foreign-Function-Interface-Dictionary">Foreign-Function-Interface
     14950    the <a class="link" href="#anchor_Foreign-Function-Interface-Dictionary">Foreign-Function-Interface
    1494914951    Dictionary</a>, especially the entries at the beginning,
    1495014952    describing reader macros.</p>
     
    1497014972      The class's Lisp name is now proclaimed to be a "static"
    1497114973      variable (as if by <code class="literal">DEFSTATIC</code>, as described in the
    14972       <a href="#Static_Variables" title="4.6. Static Variables">"Static Variables"
     14974      <a class="link" href="#Static_Variables" title="4.6. Static Variables">"Static Variables"
    1497314975      section</a>) and given the class object as its value.  In
    1497414976      other words:</p>
     
    1520715209          </pre>
    1520815210            <p xmlns="http://www.w3.org/1999/xhtml">In Lisp, we must explicitly allocate the memory, which
    15209         is done most easily and safely with <a href="#m_rlet" title="Macro RLET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">rlet</b></a>.
     15211        is done most easily and safely with <a class="xref" href="#m_rlet" title="Macro RLET"><b xmlns="http://www.w3.org/TR/xhtml1/transitional">rlet</b></a>.
    1521015212        We do it like this:</p>
    1521115213            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
     
    1549815500              <div>
    1549915501                <div>
    15500                   <h3 class="title"><a id="id514534"></a>13.6.1. Using <code class="literal">define-objc-method</code></h3>
     15502                  <h3 class="title"><a id="id412131"></a>13.6.1. Using <code class="literal">define-objc-method</code></h3>
    1550115503                </div>
    1550215504              </div>
    1550315505            </div>
    1550415506            <p xmlns="http://www.w3.org/1999/xhtml">As described in the
    15505         section <a href="#Calling-Objective-C-Methods" title="13.4. Calling Objective-C Methods">Calling
     15507        section <a class="link" href="#Calling-Objective-C-Methods" title="13.4. Calling Objective-C Methods">Calling
    1550615508        Objective-C Methods</a>, the names of Objective-C methods
    1550715509        are broken into pieces, each piece followed by a parameter.
     
    1561515617              <div>
    1561615618                <div>
    15617                   <h3 class="title"><a id="id429654"></a>13.6.2. Using <code class="literal">objc:defmethod</code></h3>
     15619                  <h3 class="title"><a id="id412374"></a>13.6.2. Using <code class="literal">objc:defmethod</code></h3>
    1561815620                </div>
    1561915621              </div>
     
    1577215774    to use, you will need to create them. For more information about
    1577315775    creating interface databases,
    15774     see <a href="#Creating-new-interface-directories" title="12.5.2. Creating new interface directories">Creating
     15776    see <a class="link" href="#Creating-new-interface-directories" title="12.5.2. Creating new interface directories">Creating
    1577515777    new interface directories</a>.</p>
    1577615778        </div>
     
    1597515977            <p xmlns="http://www.w3.org/1999/xhtml">Fixnums on 32-bit systems use 30 bits and are in the
    1597615978            range XXX through YYY.  Fixnums on 64-bit systems use 61-bits
    15977             and are in the range XXX through YYY. (see <a href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a>)</p>
     15979            and are in the range XXX through YYY. (see <a class="xref" href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a>)</p>
    1597815980            <p xmlns="http://www.w3.org/1999/xhtml">Since we have much larger fixnums on 64-bit systems,
    1597915981            <em class="varname">INTERNAL-TIME-UNITS-PER-SECOND</em> is 1000000
     
    1612316125          <p xmlns="http://www.w3.org/1999/xhtml">For the <code class="literal">system()</code> function, there is
    1612416126      CCL::OS-COMMAND.  Ordinarily, it is better - both more efficient
    16125       and more predictable - to use the features described in <a href="#Running-Other-Programs-as-Subprocesses" title="Chapter 9. Running Other Programs as Subprocesses">Chapter 9, <i>Running Other Programs as Subprocesses</i></a>.  However,
     16127      and more predictable - to use the features described in <a class="xref" href="#Running-Other-Programs-as-Subprocesses" title="Chapter 9. Running Other Programs as Subprocesses">Chapter 9, <i>Running Other Programs as Subprocesses</i></a>.  However,
    1612616128      sometimes you may want to specifically ask the shell to invoke a
    1612716129      command for you.</p>
     
    1620416206              <tr>
    1620516207                <td>
    16206                   <a href="#m_class" title="Macro CCL::@CLASS">
     16208                  <a class="xref" href="#m_class" title="Macro CCL::@CLASS">
    1620716209                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::@class</b>
    1620816210                  </a>
     
    1621116213              <tr>
    1621216214                <td>
    16213                   <a href="#m_selector" title="Macro CCL::@SELECTOR">
     16215                  <a class="xref" href="#m_selector" title="Macro CCL::@SELECTOR">
    1621416216                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::@selector</b>
    1621516217                  </a>
     
    1621816220              <tr>
    1621916221                <td>
    16220                   <a href="#m_define-objc-method" title="Macro CCL::DEFINE-OBJC-METHOD">
     16222                  <a class="xref" href="#m_define-objc-method" title="Macro CCL::DEFINE-OBJC-METHOD">
    1622116223                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::define-objc-method</b>
    1622216224                  </a>
     
    1622516227              <tr>
    1622616228                <td>
    16227                   <a href="#m_define-objc-class-method" title="Macro CCL::DEFINE-OBJC-CLASS-METHOD">
     16229                  <a class="xref" href="#m_define-objc-class-method" title="Macro CCL::DEFINE-OBJC-CLASS-METHOD">
    1622816230                    <b xmlns="http://www.w3.org/TR/xhtml1/transitional">ccl::define-objc-class-method</b>
    1622916231                  </a>
     
    1636916371              <dt>
    1637016372                <span class="term">
    16371               <a href="http://developer.apple.com/documentation/Cocoa/" target="_top">Cocoa Documentation</a>
     16373              <a class="ulink" href="http://developer.apple.com/documentation/Cocoa/" target="_top">Cocoa Documentation</a>
    1637216374            </span>
    1637316375              </dt>
     
    1638116383              <dt>
    1638216384                <span class="term">
    16383               <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html" target="_top">Foundation Reference for Objective-C</a>
     16385              <a class="ulink" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html" target="_top">Foundation Reference for Objective-C</a>
    1638416386            </span>
    1638516387              </dt>
     
    1639316395              <dt>
    1639416396                <span class="term">
    16395               <a href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/index.html" target="_top">Application Kit Reference for Objective-C</a>
     16397              <a class="ulink" href="http://developer.apple.com/documentation/Cocoa/Reference/ApplicationKit/ObjC_classic/index.html" target="_top">Application Kit Reference for Objective-C</a>
    1639616398            </span>
    1639716399              </dt>
     
    1640416406              <dt>
    1640516407                <span class="term">
    16406               <a href="http://developer.apple.com/documentation/index.html" target="_top">Apple Developer Documentation</a>
     16408              <a class="ulink" href="http://developer.apple.com/documentation/index.html" target="_top">Apple Developer Documentation</a>
    1640716409            </span>
    1640816410              </dt>
     
    1643116433              <strong>[Function]</strong>
    1643216434              <br></br>
    16433               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">getenv</strong></span> name =&gt; value</code>
     16435              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>getenv</strong></span> name =&gt; value</code>
    1643416436            </div>
    1643516437            <div class="refentrytitle"></div>
     
    1643816440            <div>
    1643916441              <div class="refsect1" lang="en" xml:lang="en">
    16440                 <a xmlns="http://www.w3.org/1999/xhtml" id="id514161"></a>
     16442                <a xmlns="http://www.w3.org/1999/xhtml" id="id424628"></a>
    1644116443                <div class="header">Arguments and Values:</div>
    1644216444                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---a string which is the name of an existing
     
    1644816450              </div>
    1644916451              <div class="refsect1" lang="en" xml:lang="en">
    16450                 <a xmlns="http://www.w3.org/1999/xhtml" id="id442162"></a>
     16452                <a xmlns="http://www.w3.org/1999/xhtml" id="id424673"></a>
    1645116453                <div class="header">Description:</div>
    1645216454                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1646216464              <strong>[Function]</strong>
    1646316465              <br></br>
    16464               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">setenv</strong></span> name value =&gt; errno</code>
     16466              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>setenv</strong></span> name value =&gt; errno</code>
    1646516467            </div>
    1646616468            <div class="refentrytitle"></div>
     
    1646916471            <div>
    1647016472              <div class="refsect1" lang="en" xml:lang="en">
    16471                 <a xmlns="http://www.w3.org/1999/xhtml" id="id429403"></a>
     16473                <a xmlns="http://www.w3.org/1999/xhtml" id="id424734"></a>
    1647216474                <div class="header">Arguments and Values:</div>
    1647316475                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name</span></i>---a string which is the name of a new or existing
     
    1648216484              </div>
    1648316485              <div class="refsect1" lang="en" xml:lang="en">
    16484                 <a xmlns="http://www.w3.org/1999/xhtml" id="id457013"></a>
     16486                <a xmlns="http://www.w3.org/1999/xhtml" id="id424794"></a>
    1648516487                <div class="header">Description:</div>
    1648616488                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1649816500              <strong>[Function]</strong>
    1649916501              <br></br>
    16500               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">current-directory-name</strong></span>
     16502              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>current-directory-name</strong></span>
    1650116503              =&gt; path</code>
    1650216504            </div>
     
    1650616508            <div>
    1650716509              <div class="refsect1" lang="en" xml:lang="en">
    16508                 <a xmlns="http://www.w3.org/1999/xhtml" id="id459722"></a>
     16510                <a xmlns="http://www.w3.org/1999/xhtml" id="id424856"></a>
    1650916511                <div class="header">Values:</div>
    1651016512                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">path</span></i>---a string, an absolute pathname in Posix format - with
     
    1651216514              </div>
    1651316515              <div class="refsect1" lang="en" xml:lang="en">
    16514                 <a xmlns="http://www.w3.org/1999/xhtml" id="id435895"></a>
     16516                <a xmlns="http://www.w3.org/1999/xhtml" id="id424883"></a>
    1651516517                <div class="header">Description:</div>
    1651616518                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1652716529              <strong>[Function]</strong>
    1652816530              <br></br>
    16529               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">getuid</strong></span> =&gt; uid</code>
     16531              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>getuid</strong></span> =&gt; uid</code>
    1653016532            </div>
    1653116533            <div class="refentrytitle"></div>
     
    1653416536            <div>
    1653516537              <div class="refsect1" lang="en" xml:lang="en">
    16536                 <a xmlns="http://www.w3.org/1999/xhtml" id="id499197"></a>
     16538                <a xmlns="http://www.w3.org/1999/xhtml" id="id424942"></a>
    1653716539                <div class="header">Values:</div>
    1653816540                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">uid</span></i>---a non-negative integer, identifying a specific user
     
    1654016542              </div>
    1654116543              <div class="refsect1" lang="en" xml:lang="en">
    16542                 <a xmlns="http://www.w3.org/1999/xhtml" id="id453781"></a>
     16544                <a xmlns="http://www.w3.org/1999/xhtml" id="id424969"></a>
    1654316545                <div class="header">Description:</div>
    1654416546                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1655316555              <strong>[Function]</strong>
    1655416556              <br></br>
    16555               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">setuid</strong></span> uid =&gt; errno</code>
     16557              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>setuid</strong></span> uid =&gt; errno</code>
    1655616558            </div>
    1655716559            <div class="refentrytitle"></div>
     
    1656016562            <div>
    1656116563              <div class="refsect1" lang="en" xml:lang="en">
    16562                 <a xmlns="http://www.w3.org/1999/xhtml" id="id518744"></a>
     16564                <a xmlns="http://www.w3.org/1999/xhtml" id="id425026"></a>
    1656316565                <div class="header">Arguments and Values:</div>
    1656416566                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">uid</span></i>---a non-negative integer, identifying a specific user
     
    1656916571              </div>
    1657016572              <div class="refsect1" lang="en" xml:lang="en">
    16571                 <a xmlns="http://www.w3.org/1999/xhtml" id="id475192"></a>
     16573                <a xmlns="http://www.w3.org/1999/xhtml" id="id425069"></a>
    1657216574                <div class="header">Description:</div>
    1657316575                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1658516587              <strong>[Function]</strong>
    1658616588              <br></br>
    16587               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">setgid</strong></span> gid =&gt; errno</code>
     16589              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>setgid</strong></span> gid =&gt; errno</code>
    1658816590            </div>
    1658916591            <div class="refentrytitle"></div>
     
    1659216594            <div>
    1659316595              <div class="refsect1" lang="en" xml:lang="en">
    16594                 <a xmlns="http://www.w3.org/1999/xhtml" id="id489525"></a>
     16596                <a xmlns="http://www.w3.org/1999/xhtml" id="id425128"></a>
    1659516597                <div class="header">Arguments and Values:</div>
    1659616598                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">gid</span></i>---a non-negative integer, identifying a specific
     
    1660116603              </div>
    1660216604              <div class="refsect1" lang="en" xml:lang="en">
    16603                 <a xmlns="http://www.w3.org/1999/xhtml" id="id501016"></a>
     16605                <a xmlns="http://www.w3.org/1999/xhtml" id="id425171"></a>
    1660416606                <div class="header">Description:</div>
    1660516607                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1661716619              <strong>[Function]</strong>
    1661816620              <br></br>
    16619               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">getpid</strong></span> =&gt; pid</code>
     16621              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>getpid</strong></span> =&gt; pid</code>
    1662016622            </div>
    1662116623            <div class="refentrytitle"></div>
     
    1662416626            <div>
    1662516627              <div class="refsect1" lang="en" xml:lang="en">
    16626                 <a xmlns="http://www.w3.org/1999/xhtml" id="id500633"></a>
     16628                <a xmlns="http://www.w3.org/1999/xhtml" id="id425230"></a>
    1662716629                <div class="header">Values:</div>
    1662816630                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">pid</span></i>---a non-negative integer, identifying an OS process</p>
    1662916631              </div>
    1663016632              <div class="refsect1" lang="en" xml:lang="en">
    16631                 <a xmlns="http://www.w3.org/1999/xhtml" id="id500657"></a>
     16633                <a xmlns="http://www.w3.org/1999/xhtml" id="id425256"></a>
    1663216634                <div class="header">Description:</div>
    1663316635                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1664216644              <strong>[Function]</strong>
    1664316645              <br></br>
    16644               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">get-user-home-dir</strong></span>
     16646              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>get-user-home-dir</strong></span>
    1664516647              uid =&gt; path</code>
    1664616648            </div>
     
    1665016652            <div>
    1665116653              <div class="refsect1" lang="en" xml:lang="en">
    16652                 <a xmlns="http://www.w3.org/1999/xhtml" id="id428957"></a>
     16654                <a xmlns="http://www.w3.org/1999/xhtml" id="id425590"></a>
    1665316655                <div class="header">Values:</div>
    1665416656                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">uid</span></i>---a non-negative integer, identifying a specific user
     
    1665816660              </div>
    1665916661              <div class="refsect1" lang="en" xml:lang="en">
    16660                 <a xmlns="http://www.w3.org/1999/xhtml" id="id510273"></a>
     16662                <a xmlns="http://www.w3.org/1999/xhtml" id="id425633"></a>
    1666116663                <div class="header">Description:</div>
    1666216664                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1667516677              <strong>[Function]</strong>
    1667616678              <br></br>
    16677               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">os-command</strong></span> command-line
     16679              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>os-command</strong></span> command-line
    1667816680              =&gt; exit-code</code>
    1667916681            </div>
     
    1668316685            <div>
    1668416686              <div class="refsect1" lang="en" xml:lang="en">
    16685                 <a xmlns="http://www.w3.org/1999/xhtml" id="id499360"></a>
     16687                <a xmlns="http://www.w3.org/1999/xhtml" id="id425702"></a>
    1668616688                <div class="header">Values:</div>
    1668716689                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">command-line</span></i>---a string, obeying all the whitespace and
     
    1669216694              </div>
    1669316695              <div class="refsect1" lang="en" xml:lang="en">
    16694                 <a xmlns="http://www.w3.org/1999/xhtml" id="id502706"></a>
     16696                <a xmlns="http://www.w3.org/1999/xhtml" id="id425744"></a>
    1669516697                <div class="header">Description:</div>
    1669616698                <p xmlns="http://www.w3.org/1999/xhtml">
    16697               Invokes the Posix function <span><strong class="function">system()</strong></span>, which
     16699              Invokes the Posix function <span class="function"><strong>system()</strong></span>, which
    1669816700              invokes the user's default system shell (such as
    1669916701              sh or tcsh) as a new process, and has that shell execute
     
    1670816710              </div>
    1670916711              <div class="refsect1" lang="en" xml:lang="en">
    16710                 <a xmlns="http://www.w3.org/1999/xhtml" id="id452659"></a>
     16712                <a xmlns="http://www.w3.org/1999/xhtml" id="id425778"></a>
    1671116713                <div class="header">Notes:</div>
    1671216714                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1672616728              <strong>[Macro]</strong>
    1672716729              <br></br>
    16728               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">@class</strong></span> class-name</code>
     16730              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>@class</strong></span> class-name</code>
    1672916731            </div>
    1673016732            <div class="refentrytitle"></div>
     
    1673316735            <div>
    1673416736              <div class="refsect1" lang="en" xml:lang="en">
    16735                 <a xmlns="http://www.w3.org/1999/xhtml" id="id474077"></a>
     16737                <a xmlns="http://www.w3.org/1999/xhtml" id="id425838"></a>
    1673616738                <div class="header">Arguments and Values:</div>
    1673716739                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">class-name</span></i>---a string which denotes an existing class name, or a
     
    1674016742              </div>
    1674116743              <div class="refsect1" lang="en" xml:lang="en">
    16742                 <a xmlns="http://www.w3.org/1999/xhtml" id="id493721"></a>
     16744                <a xmlns="http://www.w3.org/1999/xhtml" id="id425866"></a>
    1674316745                <div class="header">Description:</div>
    1674416746                <p xmlns="http://www.w3.org/1999/xhtml">Used to refer to a known ObjC class by name. (Via the use
     
    1674616748              are cached.)</p>
    1674716749                <p xmlns="http://www.w3.org/1999/xhtml">
    16748               <span><strong class="function">@class</strong></span> is obsolete as of late 2004, because
     16750              <span class="function"><strong>@class</strong></span> is obsolete as of late 2004, because
    1674916751              find-class now works on ObjC classes.  It is described here
    1675016752              only because some old code still uses it.
     
    1675816760              <strong>[Macro]</strong>
    1675916761              <br></br>
    16760               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">@selector</strong></span> string</code>
     16762              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>@selector</strong></span> string</code>
    1676116763            </div>
    1676216764            <div class="refentrytitle"></div>
     
    1676516767            <div>
    1676616768              <div class="refsect1" lang="en" xml:lang="en">
    16767                 <a xmlns="http://www.w3.org/1999/xhtml" id="id427151"></a>
     16769                <a xmlns="http://www.w3.org/1999/xhtml" id="id425935"></a>
    1676816770                <div class="header">Arguments and Values:</div>
    1676916771                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">string</span></i>---a string constant, used to canonically refer to an
     
    1677116773              </div>
    1677216774              <div class="refsect1" lang="en" xml:lang="en">
    16773                 <a xmlns="http://www.w3.org/1999/xhtml" id="id492449"></a>
     16775                <a xmlns="http://www.w3.org/1999/xhtml" id="id425961"></a>
    1677416776                <div class="header">Description:</div>
    1677516777                <p xmlns="http://www.w3.org/1999/xhtml">Used to refer to an ObjC method selector (method name). Uses
     
    1678416786              <strong>[Macro]</strong>
    1678516787              <br></br>
    16786               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">objc:defmethod</strong></span>
     16788              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>objc:defmethod</strong></span>
    1678716789              name-and-result-type ((receiver-arg-and-class) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;rest</em>
    1678816790              other-args) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
     
    1679316795            <div>
    1679416796              <div class="refsect1" lang="en" xml:lang="en">
    16795                 <a xmlns="http://www.w3.org/1999/xhtml" id="id430630"></a>
     16797                <a xmlns="http://www.w3.org/1999/xhtml" id="id426027"></a>
    1679616798                <div class="header">Arguments and Values:</div>
    1679716799                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">name-and-result-type</span></i>---either an Objective-C message name, for methods
     
    1681516817              </div>
    1681616818              <div class="refsect1" lang="en" xml:lang="en">
    16817                 <a xmlns="http://www.w3.org/1999/xhtml" id="id465085"></a>
     16819                <a xmlns="http://www.w3.org/1999/xhtml" id="id426108"></a>
    1681816820                <div class="header">Description:</div>
    1681916821                <p xmlns="http://www.w3.org/1999/xhtml">Defines an Objective-C-callable method which implements
     
    1682316825          restrictions of the <code class="literal">OBJC:DEFMETHOD</code> macro,
    1682416826          see the
    16825           section <a href="#anchor_Using-objc-defmethod">Using <code class="literal">objc:defmethod</code></a>.</p>
     16827          section <a class="link" href="#anchor_Using-objc-defmethod">Using <code class="literal">objc:defmethod</code></a>.</p>
    1682616828              </div>
    1682716829            </div>
     
    1683216834              <strong>[Macro]</strong>
    1683316835              <br></br>
    16834               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">define-objc-method</strong></span>
     16836              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>define-objc-method</strong></span>
    1683516837                (selector class-name) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    1683616838            </div>
     
    1684016842            <div>
    1684116843              <div class="refsect1" lang="en" xml:lang="en">
    16842                 <a xmlns="http://www.w3.org/1999/xhtml" id="id485793"></a>
     16844                <a xmlns="http://www.w3.org/1999/xhtml" id="id426191"></a>
    1684316845                <div class="header">Arguments and Values:</div>
    1684416846                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">selector</span></i>---either a string which represents the name of the
     
    1685516857              </div>
    1685616858              <div class="refsect1" lang="en" xml:lang="en">
    16857                 <a xmlns="http://www.w3.org/1999/xhtml" id="id474449"></a>
     16859                <a xmlns="http://www.w3.org/1999/xhtml" id="id426237"></a>
    1685816860                <div class="header">Description:</div>
    1685916861                <p xmlns="http://www.w3.org/1999/xhtml">Defines an ObjC-callable method which implements the
     
    1686816870              <strong>[Macro]</strong>
    1686916871              <br></br>
    16870               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">define-objc-class-method</strong></span>
     16872              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>define-objc-class-method</strong></span>
    1687116873                (selector class-name) <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    1687216874            </div>
     
    1687616878            <div>
    1687716879              <div class="refsect1" lang="en" xml:lang="en">
    16878                 <a xmlns="http://www.w3.org/1999/xhtml" id="id502664"></a>
     16880                <a xmlns="http://www.w3.org/1999/xhtml" id="id426301"></a>
    1687916881                <div class="header">Arguments and Values:</div>
    1688016882                <p xmlns="http://www.w3.org/1999/xhtml">As per DEFINE-OBJC-METHOD</p>
    1688116883              </div>
    1688216884              <div class="refsect1" lang="en" xml:lang="en">
    16883                 <a xmlns="http://www.w3.org/1999/xhtml" id="id502674"></a>
     16885                <a xmlns="http://www.w3.org/1999/xhtml" id="id426312"></a>
    1688416886                <div class="header">Description:</div>
    1688516887                <p xmlns="http://www.w3.org/1999/xhtml">Like DEFINE-OBJC-METHOD, only used to define methods on the
     
    1692316925            <div>
    1692416926              <div class="refsect1" lang="en" xml:lang="en">
    16925                 <a xmlns="http://www.w3.org/1999/xhtml" id="id471502"></a>
     16927                <a xmlns="http://www.w3.org/1999/xhtml" id="id426388"></a>
    1692616928                <div class="header">Description:</div>
    1692716929                <p xmlns="http://www.w3.org/1999/xhtml">This variable is currently only used by the standard reader macro
     
    1695816960            <div>
    1695916961              <div class="refsect1" lang="en" xml:lang="en">
    16960                 <a xmlns="http://www.w3.org/1999/xhtml" id="id501658"></a>
     16962                <a xmlns="http://www.w3.org/1999/xhtml" id="id426446"></a>
    1696116963                <div class="header">Description:</div>
    1696216964                <p xmlns="http://www.w3.org/1999/xhtml">Per ANSI CL, Clozure CL supports the :EXTERNAL-FORMAT keyword
     
    1700217004            <div>
    1700317005              <div class="refsect1" lang="en" xml:lang="en">
    17004                 <a xmlns="http://www.w3.org/1999/xhtml" id="id485472"></a>
     17006                <a xmlns="http://www.w3.org/1999/xhtml" id="id426526"></a>
    1700517007                <div class="header">Description:</div>
    1700617008                <p xmlns="http://www.w3.org/1999/xhtml">The value of this variable is used when :EXTERNAL-FORMAT is
     
    1702617028            <div>
    1702717029              <div class="refsect1" lang="en" xml:lang="en">
    17028                 <a xmlns="http://www.w3.org/1999/xhtml" id="id477065"></a>
     17030                <a xmlns="http://www.w3.org/1999/xhtml" id="id426576"></a>
    1702917031                <div class="header">Superclasses:</div>
    1703017032                <p xmlns="http://www.w3.org/1999/xhtml">NS:NS-STRING</p>
    1703117033              </div>
    1703217034              <div class="refsect1" lang="en" xml:lang="en">
    17033                 <a xmlns="http://www.w3.org/1999/xhtml" id="id494573"></a>
     17035                <a xmlns="http://www.w3.org/1999/xhtml" id="id426587"></a>
    1703417036                <div class="header">Initargs:</div>
    1703517037                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">:string</span></i>---
     
    1703917041              </div>
    1704017042              <div class="refsect1" lang="en" xml:lang="en">
    17041                 <a xmlns="http://www.w3.org/1999/xhtml" id="id485513"></a>
     17043                <a xmlns="http://www.w3.org/1999/xhtml" id="id426614"></a>
    1704217044                <div class="header">Description:</div>
    1704317045                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1705717059              </div>
    1705817060              <div class="refsect1" lang="en" xml:lang="en">
    17059                 <a xmlns="http://www.w3.org/1999/xhtml" id="id458150"></a>
     17061                <a xmlns="http://www.w3.org/1999/xhtml" id="id426634"></a>
    1706017062                <div class="header">Examples:</div>
    1706117063                <p xmlns="http://www.w3.org/1999/xhtml">
    1706217064                You can create an ns-lisp-string with
    17063                 <span><strong class="function">make-instance</strong></span>, just like
     17065                <span class="function"><strong>make-instance</strong></span>, just like
    1706417066                any normal Lisp class:
    1706517067              </p>
     
    1707417076                <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">? (ccl::send *the-string* 'dealloc)</pre>
    1707517077                <p xmlns="http://www.w3.org/1999/xhtml">
    17076                 You may wish to use an <span><strong class="function">unwind-protect</strong></span>
     17078                You may wish to use an <span class="function"><strong>unwind-protect</strong></span>
    1707717079                form to ensure that this happens:
    1707817080              </p>
     
    1708817090              </div>
    1708917091              <div class="refsect1" lang="en" xml:lang="en">
    17090                 <a xmlns="http://www.w3.org/1999/xhtml" id="id449276"></a>
     17092                <a xmlns="http://www.w3.org/1999/xhtml" id="id426687"></a>
    1709117093                <div class="header">Notes:</div>
    1709217094                <p xmlns="http://www.w3.org/1999/xhtml">
     
    1743017432              <br></br>
    1743117433              <code>
    17432                 <span xmlns="http://www.w3.org/1999/xhtml">
    17433                   <strong class="function">lisp-heap-gc-threshold</strong>
     17434                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     17435                  <strong>lisp-heap-gc-threshold</strong>
    1743417436                </span>
    1743517437              </code>
     
    1744017442            <div>
    1744117443              <div class="refsect1" lang="en" xml:lang="en">
    17442                 <a xmlns="http://www.w3.org/1999/xhtml" id="id476448"></a>
     17444                <a xmlns="http://www.w3.org/1999/xhtml" id="id424183"></a>
    1744317445                <div class="header">Description:</div>
    1744417446                <p xmlns="http://www.w3.org/1999/xhtml">Returns the value of the kernel variable that specifies the
     
    1745317455              <br></br>
    1745417456              <code>
    17455             <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">lisp-heap-gc-threshold new-threshold</strong></span>
     17457            <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>lisp-heap-gc-threshold new-threshold</strong></span>
    1745617458          </code>
    1745717459            </div>
     
    1746117463            <div>
    1746217464              <div class="refsect1" lang="en" xml:lang="en">
    17463                 <a xmlns="http://www.w3.org/1999/xhtml" id="id437150"></a>
     17465                <a xmlns="http://www.w3.org/1999/xhtml" id="id424243"></a>
    1746417466                <div class="header">Arguments and Values:</div>
    1746517467                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">new-value</span></i>---The requested new lisp-heap-gc-threshold.</p>
    1746617468              </div>
    1746717469              <div class="refsect1" lang="en" xml:lang="en">
    17468                 <a xmlns="http://www.w3.org/1999/xhtml" id="id495213"></a>
     17470                <a xmlns="http://www.w3.org/1999/xhtml" id="id427960"></a>
    1746917471                <div class="header">Description:</div>
    1747017472                <p xmlns="http://www.w3.org/1999/xhtml">Sets the value of the kernel variable that specifies the
     
    1748217484              <br></br>
    1748317485              <code>
    17484             <span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">use-lisp-heap-gc-threshold</strong></span>
     17486            <span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>use-lisp-heap-gc-threshold</strong></span>
    1748517487          </code>
    1748617488            </div>
     
    1749017492            <div>
    1749117493              <div class="refsect1" lang="en" xml:lang="en">
    17492                 <a xmlns="http://www.w3.org/1999/xhtml" id="id432552"></a>
     17494                <a xmlns="http://www.w3.org/1999/xhtml" id="id428022"></a>
    1749317495                <div class="header">Description:</div>
    1749417496                <p xmlns="http://www.w3.org/1999/xhtml">Tries to grow or shrink lisp's heap space, so that the
     
    1750317505              <strong>[Function]</strong>
    1750417506              <br></br>
    17505               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">egc</strong></span> arg</code>
     17507              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>egc</strong></span> arg</code>
    1750617508            </div>
    1750717509            <div class="refentrytitle"></div>
     
    1751017512            <div>
    1751117513              <div class="refsect1" lang="en" xml:lang="en">
    17512                 <a xmlns="http://www.w3.org/1999/xhtml" id="id482542"></a>
     17514                <a xmlns="http://www.w3.org/1999/xhtml" id="id428081"></a>
    1751317515                <div class="header">Arguments and Values:</div>
    1751417516                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg</span></i>---a generalized boolean</p>
    1751517517              </div>
    1751617518              <div class="refsect1" lang="en" xml:lang="en">
    17517                 <a xmlns="http://www.w3.org/1999/xhtml" id="id443639"></a>
     17519                <a xmlns="http://www.w3.org/1999/xhtml" id="id428107"></a>
    1751817520                <div class="header">Description:</div>
    1751917521                <p xmlns="http://www.w3.org/1999/xhtml">Enables the EGC if arg is non-nil, disables the EGC
     
    1753117533              <br></br>
    1753217534              <code>
    17533                 <span xmlns="http://www.w3.org/1999/xhtml">
    17534                   <strong class="function">egc-enabled-p</strong>
     17535                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     17536                  <strong>egc-enabled-p</strong>
    1753517537                </span>
    1753617538              </code>
     
    1754117543            <div>
    1754217544              <div class="refsect1" lang="en" xml:lang="en">
    17543                 <a xmlns="http://www.w3.org/1999/xhtml" id="id440822"></a>
     17545                <a xmlns="http://www.w3.org/1999/xhtml" id="id428165"></a>
    1754417546                <div class="header">Description:</div>
    1754517547                <p xmlns="http://www.w3.org/1999/xhtml">Returns T if the EGC was enabled at the time of the call,
     
    1755417556              <br></br>
    1755517557              <code>
    17556                 <span xmlns="http://www.w3.org/1999/xhtml">
    17557                   <strong class="function">egc-active-p</strong>
     17558                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     17559                  <strong>egc-active-p</strong>
    1755817560                </span>
    1755917561              </code>
     
    1756417566            <div>
    1756517567              <div class="refsect1" lang="en" xml:lang="en">
    17566                 <a xmlns="http://www.w3.org/1999/xhtml" id="id513501"></a>
     17568                <a xmlns="http://www.w3.org/1999/xhtml" id="id428222"></a>
    1756717569                <div class="header">Description:</div>
    1756817570                <p xmlns="http://www.w3.org/1999/xhtml">Returns T if the EGC was active at the time of the call, NIL
     
    1757917581              <br></br>
    1758017582              <code>
    17581                 <span xmlns="http://www.w3.org/1999/xhtml">
    17582                   <strong class="function">egc-configuration</strong>
     17583                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     17584                  <strong>egc-configuration</strong>
    1758317585                </span>
    1758417586              </code>
     
    1758917591            <div>
    1759017592              <div class="refsect1" lang="en" xml:lang="en">
    17591                 <a xmlns="http://www.w3.org/1999/xhtml" id="id462585"></a>
     17593                <a xmlns="http://www.w3.org/1999/xhtml" id="id428280"></a>
    1759217594                <div class="header">Description:</div>
    1759317595                <p xmlns="http://www.w3.org/1999/xhtml">Returns, as multiple values, the sizes in kilobytes of the
     
    1760217604              <strong>[Function]</strong>
    1760317605              <br></br>
    17604               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">configure-egc</strong></span>
     17606              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>configure-egc</strong></span>
    1760517607          generation-0-size generation-1-size
    1760617608          generation-2-size</code>
     
    1761117613            <div>
    1761217614              <div class="refsect1" lang="en" xml:lang="en">
    17613                 <a xmlns="http://www.w3.org/1999/xhtml" id="id519891"></a>
     17615                <a xmlns="http://www.w3.org/1999/xhtml" id="id426748"></a>
    1761417616                <div class="header">Arguments and Values:</div>
    1761517617                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">generation-0-size</span></i>---the requested threshold size of the youngest
     
    1762117623              </div>
    1762217624              <div class="refsect1" lang="en" xml:lang="en">
    17623                 <a xmlns="http://www.w3.org/1999/xhtml" id="id495105"></a>
     17625                <a xmlns="http://www.w3.org/1999/xhtml" id="id426803"></a>
    1762417626                <div class="header">Description:</div>
    1762517627                <p xmlns="http://www.w3.org/1999/xhtml">If the EGC is currently disabled, puts the indicated
     
    1763617638              <strong>[Function]</strong>
    1763717639              <br></br>
    17638               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">gc-retain-pages</strong></span> arg</code>
     17640              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>gc-retain-pages</strong></span> arg</code>
    1763917641            </div>
    1764017642            <div class="refentrytitle"></div>
     
    1764317645            <div>
    1764417646              <div class="refsect1" lang="en" xml:lang="en">
    17645                 <a xmlns="http://www.w3.org/1999/xhtml" id="id456402"></a>
     17647                <a xmlns="http://www.w3.org/1999/xhtml" id="id426868"></a>
    1764617648                <div class="header">Arguments and Values:</div>
    1764717649                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">arg</span></i>---a generalized boolean</p>
    1764817650              </div>
    1764917651              <div class="refsect1" lang="en" xml:lang="en">
    17650                 <a xmlns="http://www.w3.org/1999/xhtml" id="id510638"></a>
     17652                <a xmlns="http://www.w3.org/1999/xhtml" id="id426894"></a>
    1765117653                <div class="header">Description:</div>
    1765217654                <p xmlns="http://www.w3.org/1999/xhtml">Tries to influence the GC to retain/recycle the pages
     
    1766317665              <br></br>
    1766417666              <code>
    17665                 <span xmlns="http://www.w3.org/1999/xhtml">
    17666                   <strong class="function">gc-retaining-pages</strong>
     17667                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     17668                  <strong>gc-retaining-pages</strong>
    1766717669                </span>
    1766817670              </code>
     
    1767317675            <div>
    1767417676              <div class="refsect1" lang="en" xml:lang="en">
    17675                 <a xmlns="http://www.w3.org/1999/xhtml" id="id463001"></a>
     17677                <a xmlns="http://www.w3.org/1999/xhtml" id="id426951"></a>
    1767617678                <div class="header">Description:</div>
    1767717679                <p xmlns="http://www.w3.org/1999/xhtml">Returns T if the GC tries to retain pages between full GCs
     
    1782817830                <dt>
    1782917831                  <span class="sect2">
    17830                     <a href="#id529071">16.7.2. Recommended Reading</a>
     17832                    <a href="#id418917">16.7.2. Recommended Reading</a>
    1783117833                  </span>
    1783217834                </dt>
     
    1785417856          </div>
    1785517857          <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL's threads are "native" (meaning that they're
    17856       scheduled and controlled by the operating system.)  Most of the
    17857       implications of this are discussed elsewhere; this section tries
    17858       to describe how threads look from the lisp kernel's perspective
    17859       (and especially from the GC's point of view.)</p>
     17858        scheduled and controlled by the operating system.)  Most of the
     17859        implications of this are discussed elsewhere; this section tries
     17860        to describe how threads look from the lisp kernel's perspective
     17861        (and especially from the GC's point of view.)</p>
    1786017862          <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL's runtime system tries to use machine-level
    17861       exception mechanisms (conditional traps when available, illegal
    17862       instructions, memory access protection in some cases) to detect
    17863       and handle ... exceptional situations.  These situations
    17864       include some TYPE-ERRORs and PROGRAM-ERRORS (notably
    17865       wrong-number-of-args errors), and also include cases like "not
    17866       being able to allocate memory without GCing or obtaining more
    17867       memory from the OS."  The general idea is that it's usually
    17868       faster to pay (very occasional) exception-processing overhead
    17869       and figure out what's going on in an exception handler than it
    17870       is to maintain enough state and context to handle an exceptional
    17871       case via a lighter-weight mechanism when that exceptional case
    17872       (by definition) rarely occurs.</p>
     17863        exception mechanisms (conditional traps when available,
     17864        illegal instructions, memory access protection in some cases)
     17865        to detect and handle exceptional situations.  These situations
     17866        include some TYPE-ERRORs and PROGRAM-ERRORS (notably
     17867        wrong-number-of-args errors), and also include cases like "not
     17868        being able to allocate memory without GCing or obtaining more
     17869        memory from the OS."  The general idea is that it's usually
     17870        faster to pay (very occasional) exception-processing overhead
     17871        and figure out what's going on in an exception handler than it
     17872        is to maintain enough state and context to handle an
     17873        exceptional case via a lighter-weight mechanism when that
     17874        exceptional case (by definition) rarely occurs.</p>
    1787317875          <p xmlns="http://www.w3.org/1999/xhtml">Some emulated execution environments (the Rosetta PPC
    17874       emulator on x86 versions of Mac OS X) don't provide accurate
    17875       exception information to exception handling functions. Clozure CL
    17876       can't run in such environments.</p>
     17876        emulator on x86 versions of Mac OS X) don't provide accurate
     17877        exception information to exception handling functions. Clozure CL
     17878        can't run in such environments.</p>
    1787717879          <div class="sect2" lang="en" xml:lang="en">
    1787817880            <div xmlns="http://www.w3.org/1999/xhtml" class="titlepage">
     
    1788417886            </div>
    1788517887            <p xmlns="http://www.w3.org/1999/xhtml">When a lisp thread is first created (or when a thread
    17886         created by foreign code first calls back to lisp), a data
    17887         structure called a Thread Context Record (or TCR) is allocated
    17888         and initialized.  On modern versions of Linux and FreeBSD, the
    17889         allocation actually happens via a set of thread-local-storage
    17890         ABI extensions, so a thread's TCR is created when the thread
    17891         is created and dies when the thread dies.  (The World's Most
    17892         Advanced Operating System - as Apple's marketing literature
    17893         refers to Darwin - is not very advanced in this regard, and I
    17894         know of no reason to assume that advances will be made in this
    17895         area anytime soon.)</p>
     17888          created by foreign code first calls back to lisp), a data
     17889          structure called a Thread Context Record (or TCR) is
     17890          allocated and initialized.  On modern versions of Linux and
     17891          FreeBSD, the allocation actually happens via a set of
     17892          thread-local-storage ABI extensions, so a thread's TCR is
     17893          created when the thread is created and dies when the thread
     17894          dies.  (The World's Most Advanced Operating System—as
     17895          Apple's marketing literature refers to Darwin—is not
     17896          very advanced in this regard, and I know of no reason to
     17897          assume that advances will be made in this area anytime
     17898          soon.)</p>
    1789617899            <p xmlns="http://www.w3.org/1999/xhtml">A TCR contains a few dozen fields (and is therefore a
    17897         few hundred bytes in size.)  The fields are mostly
    17898         thread-specific information about the thread's stacks'
    17899         locations and sizes, information about the underlying (POSIX)
    17900         thread, and information about the thread's dynamic binding
    17901         history and pending CATCH/UNWIND-PROTECTs.  Some of this
    17902         information could be kept in individual machine registers
    17903         while the thread is running (and the PPC - which has more
    17904         registers available - keeps a few things in registers that the
    17905         X86-64 has to access via the TCR), but it's important to
    17906         remember that the information is thread-specific and can't
    17907         (for instance) be kept in a fixed global memory
    17908         location.</p>
     17900          few hundred bytes in size.)  The fields are mostly
     17901          thread-specific information about the thread's stacks'
     17902          locations and sizes, information about the underlying (POSIX)
     17903          thread, and information about the thread's dynamic binding
     17904          history and pending CATCH/UNWIND-PROTECTs.  Some of this
     17905          information could be kept in individual machine registers
     17906          while the thread is running (and the PPC - which has more
     17907          registers available - keeps a few things in registers that the
     17908          X86-64 has to access via the TCR), but it's important to
     17909          remember that the information is thread-specific and can't
     17910          (for instance) be kept in a fixed global memory
     17911          location.</p>
    1790917912            <p xmlns="http://www.w3.org/1999/xhtml">When lisp code is running, the current thread's TCR is
    17910         kept in a register.  On PPC platforms, a general purpose
    17911         register is used; on x86-64, an (otherwise nearly useless)
    17912         segment register works well (prevents the expenditure of a
    17913         more generally useful general- purpose register for this
    17914         purpose.)</p>
     17913          kept in a register.  On PPC platforms, a general purpose
     17914          register is used; on x86-64, an (otherwise nearly useless)
     17915          segment register works well (prevents the expenditure of a
     17916          more generally useful general- purpose register for this
     17917          purpose.)</p>
    1791517918            <p xmlns="http://www.w3.org/1999/xhtml">The address of a TCR is aligned in memory in such a way
    17916         that a FIXNUM can be used to represent it.  The lisp function
    17917         CCL::%CURRENT-TCR returns the calling thread's TCR as a
    17918         fixnum; actual value of the TCR's address is 4 or 8 times the
    17919         value of this fixnum.</p>
     17919          that a FIXNUM can be used to represent it.  The lisp function
     17920          CCL::%CURRENT-TCR returns the calling thread's TCR as a
     17921          fixnum; actual value of the TCR's address is 4 or 8 times the
     17922          value of this fixnum.</p>
    1792017923            <p xmlns="http://www.w3.org/1999/xhtml">When the lisp kernel initializes a new TCR, it's added
    17921         to a global list maintained by the kernel; when a thread
    17922         exits, its TCR is removed from this list.</p>
     17924          to a global list maintained by the kernel; when a thread
     17925          exits, its TCR is removed from this list.</p>
    1792317926            <p xmlns="http://www.w3.org/1999/xhtml">When a thread calls foreign code, lisp stack pointers
    17924         are saved in its TCR, lisp registers (at least those whose
    17925         value should be preserved across the call) are saved on the
    17926         thread's value stack, and (on x86-64) RSP is switched to the
    17927         control stack.  A field in the TCR (tcr.valence) is then set
    17928         to indicate that the thread is running foreign code, foreign
    17929         argument registers are loaded from a frame on the foreign
    17930         stack, and the foreign function is called. (That's a little
    17931         oversimplified and possibly inaccurate, but the important
    17932         things to note are that the thread "stops following lisp stack
    17933         and register usage conventions" and that it advertises the
    17934         fact that it's done so.  Similar transitions in a thread's
    17935         state ("valence") occur when it enters of exits an exception
    17936         handler (which is sort of an OS/hardware-mandated foreign
    17937         function call where the OS thoughtfully saves the thread's
    17938         register state for it beforehand.)</p>
     17927          are saved in its TCR, lisp registers (at least those whose
     17928          value should be preserved across the call) are saved on the
     17929          thread's value stack, and (on x86-64) RSP is switched to the
     17930          control stack.  A field in the TCR (tcr.valence) is then set
     17931          to indicate that the thread is running foreign code, foreign
     17932          argument registers are loaded from a frame on the foreign
     17933          stack, and the foreign function is called. (That's a little
     17934          oversimplified and possibly inaccurate, but the important
     17935          things to note are that the thread "stops following lisp
     17936          stack and register usage conventions" and that it advertises
     17937          the fact that it's done so.  Similar transitions in a
     17938          thread's state ("valence") occur when it enters or exits an
     17939          exception handler (which is sort of an OS/hardware-mandated
     17940          foreign function call where the OS thoughtfully saves the
     17941          thread's register state for it beforehand.)</p>
    1793917942          </div>
    1794017943          <div class="sect2" lang="en" xml:lang="en">
     
    1794717950            </div>
    1794817951            <p xmlns="http://www.w3.org/1999/xhtml">Unix-like OSes tend to refer to exceptions as "signals";
    17949         the same general mechanism ("signal handling") is used to
    17950         process both asynchronous OS-level events (such as the result
    17951         of the keyboard driver noticing that ^C or ^Z has been
    17952         pressed) and synchronous hardware-level events (like trying to
    17953         execute an illegal instruction or access protected memory.)
    17954         It makes some sense to defer ("block") handling of
    17955         asynchronous signals so that some critical code sequences
    17956         complete without interruption; since it's generally not
    17957         possible for a thread to proceed after a synchronous exception
    17958         unless and until its state is modified by an exception
    17959         handler, it makes no sense to talk about blocking synchronous
    17960         signals (though some OSes will let you do so and doing so can
    17961         have mysterious effects.)</p>
     17952          the same general mechanism ("signal handling") is used to
     17953          process both asynchronous OS-level events (such as the result
     17954          of the keyboard driver noticing that ^C or ^Z has been
     17955          pressed) and synchronous hardware-level events (like trying to
     17956          execute an illegal instruction or access protected memory.)
     17957          It makes some sense to defer ("block") handling of
     17958          asynchronous signals so that some critical code sequences
     17959          complete without interruption; since it's generally not
     17960          possible for a thread to proceed after a synchronous exception
     17961          unless and until its state is modified by an exception
     17962          handler, it makes no sense to talk about blocking synchronous
     17963          signals (though some OSes will let you do so and doing so can
     17964          have mysterious effects.)</p>
    1796217965            <p xmlns="http://www.w3.org/1999/xhtml">On OSX/Darwin, the POSIX signal handling facilities
    17963         coexist with lower-level Mach-based exception handling
    17964         facilities.  Unfortunately, the way that this is implemented
    17965         interacts poorly with debugging tools: GDB will generally stop
    17966         whenever the target program encounters a Mach-level exception
    17967         and offers no way to proceed from that point (and let the
    17968         program's POSIX signal handler try to handle the exception);
    17969         Apple's CrashReporter program has had a similar issue and,
    17970         depending on how it's configured, may bombard the user with
    17971         alert dialogs which falsely claim that an application has
    17972         crashed (when in fact the application in question has
    17973         routinely handled a routine exception.)  On Darwin/OSX,
    17974         Clozure CL uses Mach thread-level exception handling facilities
    17975         which run before GDB or CrashReporter get a chance to confuse
    17976         themselves; Clozure CL's Mach exception handling tries to force
    17977         the thread which received a synchronous exception to invoke a
    17978         signal handling function ("as if" signal handling worked more
    17979         usefully under Darwin.)  Mach exception handlers run in a
    17980         dedicated thread (which basically does nothing but wait for
    17981         exception messages from the lisp kernel, obtain and modify
    17982         information about the state of threads in which exceptions
    17983         have occurred, and reply to the exception messages with an
    17984         indication that the exception has been handled.  The reply
    17985         from a thread-level exception handler keeps the exception from
    17986         being reported to GDB or CrashReporter and avoids the problems
    17987         related to those programs.  Since Clozure CL's Mach exception
    17988         handler doesn't claim to handle debugging-related exceptions
    17989         (from breakpoints or single-step operations), it's possible to
    17990         use GDB to debug Clozure CL.</p>
     17966          coexist with lower-level Mach-based exception handling
     17967          facilities.  Unfortunately, the way that this is implemented
     17968          interacts poorly with debugging tools: GDB will generally stop
     17969          whenever the target program encounters a Mach-level exception
     17970          and offers no way to proceed from that point (and let the
     17971          program's POSIX signal handler try to handle the exception);
     17972          Apple's CrashReporter program has had a similar issue and,
     17973          depending on how it's configured, may bombard the user with
     17974          alert dialogs which falsely claim that an application has
     17975          crashed (when in fact the application in question has
     17976          routinely handled a routine exception.)  On Darwin/OSX,
     17977          Clozure CL uses Mach thread-level exception handling facilities
     17978          which run before GDB or CrashReporter get a chance to confuse
     17979          themselves; Clozure CL's Mach exception handling tries to force
     17980          the thread which received a synchronous exception to invoke a
     17981          signal handling function ("as if" signal handling worked more
     17982          usefully under Darwin.)  Mach exception handlers run in a
     17983          dedicated thread (which basically does nothing but wait for
     17984          exception messages from the lisp kernel, obtain and modify
     17985          information about the state of threads in which exceptions
     17986          have occurred, and reply to the exception messages with an
     17987          indication that the exception has been handled.  The reply
     17988          from a thread-level exception handler keeps the exception from
     17989          being reported to GDB or CrashReporter and avoids the problems
     17990          related to those programs.  Since Clozure CL's Mach exception
     17991          handler doesn't claim to handle debugging-related exceptions
     17992          (from breakpoints or single-step operations), it's possible to
     17993          use GDB to debug Clozure CL.</p>
    1799117994            <p xmlns="http://www.w3.org/1999/xhtml">On platforms where signal handling and debugging don't
    17992         get in each other's way, a signal handler is entered with all
    17993         signals blocked.  (This behavior is specified in the call to
    17994         the sigaction() function which established the signal
    17995         handler.)  The signal handler receives three arguments from
    17996         the OS kernel; the first is an integer which identifies the
    17997         signal, the second is a pointer to an object of type
    17998         "siginfo_t", which may or may not contain a few fields that
    17999         would help to identify the cause of the exception, and the
    18000         third argument is a pointer to a data structure (called a
    18001         "ucontext" or something similar) which contains
    18002         machine-dependent information about the state of the tread at
    18003         the time that the exception/signal occurred.  While
    18004         asynchronous signals are blocked, the signal handler stores
    18005         the pointer to its third argument (the "signal context") in a
    18006         field in the current thread's TCR, sets some bits in another
    18007         TCR field to indicate that the thread is now waiting to handle
    18008         an exception, unblocks asynchronous signals, and waits for a
    18009         global exception lock which serializes exception
    18010         processing.</p>
     17995          get in each other's way, a signal handler is entered with
     17996          all signals blocked.  (This behavior is specified in the
     17997          call to the sigaction() function which established the
     17998          signal handler.)  The signal handler receives three
     17999          arguments from the OS kernel; the first is an integer that
     18000          identifies the signal, the second is a pointer to an object
     18001          of type "siginfo_t", which may or may not contain a few
     18002          fields that would help to identify the cause of the
     18003          exception, and the third argument is a pointer to a data
     18004          structure (called a "ucontext" or something similar), which
     18005          contains machine-dependent information about the state of
     18006          the thread at the time that the exception/signal occurred.
     18007          While asynchronous signals are blocked, the signal handler
     18008          stores the pointer to its third argument (the "signal
     18009          context") in a field in the current thread's TCR, sets some
     18010          bits in another TCR field to indicate that the thread is now
     18011          waiting to handle an exception, unblocks asynchronous
     18012          signals, and waits for a global exception lock that
     18013          serializes exception processing.</p>
    1801118014            <p xmlns="http://www.w3.org/1999/xhtml">On Darwin, the Mach exception thread creates a signal
    18012         context (and maybe a siginfo_t structure), stores the signal
    18013         context in the thread's TCR, sets the TCR field which describes
    18014         the thread's state, and arranges that the thread resume
    18015         execution at its signal handling function (with a signal
    18016         handler, possibly NULL siginfo_t, and signal context as
    18017         arguments.  When the thread resumes, it waits for the global
    18018         exception lock.</p>
     18015          context (and maybe a siginfo_t structure), stores the signal
     18016          context in the thread's TCR, sets the TCR field which describes
     18017          the thread's state, and arranges that the thread resume
     18018          execution at its signal handling function (with a signal
     18019          handler, possibly NULL siginfo_t, and signal context as
     18020          arguments.  When the thread resumes, it waits for the global
     18021          exception lock.</p>
    1801918022            <p xmlns="http://www.w3.org/1999/xhtml">On x86-64 platforms where signal handing can be used to
    18020         handle synchronous exceptions, there's an additional
    18021         complication: the OS kernel ordinarily allocates the signal
    18022         context and siginfo structures on the stack of the thread
    18023         which received the signal; in practice, that means "wherever
    18024         RSP is pointing."  Clozure CL's <a href="#Register-and-stack-usage-conventions" title="16.2.3. Register and stack usage conventions">Section 16.2.3, “Register and stack usage conventions”</a> require that
    18025         the thread's value stack - where RSP is usually pointing while
    18026         lisp code is running - contain only "nodes" (properly tagged
    18027         lisp objects), and scribbling a signal context all over the
    18028         value stack would violate this requirement.  To maintain
    18029         consistency, the sigaltstack() mechanism is used to cause the
    18030         signal to be delivered on (and the signal context and siginfo
    18031         to be allocated on) a special stack area (the last few pages
    18032         of the thread's control stack, in practice.  When the signal
    18033         handler runs, it (carefully) copies the signal context and
    18034         siginfo to the thread's control stack and makes RSP point into
    18035         that stack before invoking the "real" signal handler.  (The
    18036         effect of this hack is that the "real" signal handler always
    18037         runs on the thread's control stack.)</p>
     18023          handle synchronous exceptions, there's an additional
     18024          complication: the OS kernel ordinarily allocates the signal
     18025          context and siginfo structures on the stack of the thread
     18026          that received the signal; in practice, that means "wherever
     18027          RSP is pointing."  Clozure CL's
     18028          <a class="xref" href="#Register-and-stack-usage-conventions" title="16.2.3. Register and stack usage conventions">Section 16.2.3, “Register and stack usage conventions”</a>
     18029          require that the thread's value stack—where RSP is
     18030          usually pointing while lisp code is running—contain
     18031          only "nodes" (properly tagged lisp objects), and scribbling
     18032          a signal context all over the value stack would violate this
     18033          requirement.  To maintain consistency, the sigaltstack()
     18034          mechanism is used to cause the signal to be delivered on
     18035          (and the signal context and siginfo to be allocated on) a
     18036          special stack area (the last few pages of the thread's
     18037          control stack, in practice).  When the signal handler runs,
     18038          it (carefully) copies the signal context and siginfo to the
     18039          thread's control stack and makes RSP point into that stack
     18040          before invoking the "real" signal handler. The effect of
     18041          this hack is that the "real" signal handler always runs on
     18042          the thread's control stack.</p>
    1803818043            <p xmlns="http://www.w3.org/1999/xhtml">Once the exception handler has obtained the global
    18039         exception lock, it uses the values of the signal number,
    18040         siginfo_t, and signal context arguments to determine the
    18041         (logical) cause of the exception.  Some exceptions may be
    18042         caused by factors that should generate lisp errors or other
    18043         serious conditions (stack overflow); if this is the case, the
    18044         kernel code may release the global exception lock and call out
    18045         to lisp code.  (The lisp code in question may need to repeat
    18046         some of the exception decoding process; in particular, it
    18047         needs to be able to interpret register values in the signal
    18048         context that it receives as an argument.)</p>
     18044          exception lock, it uses the values of the signal number,
     18045          siginfo_t, and signal context arguments to determine the
     18046          (logical) cause of the exception.  Some exceptions may be
     18047          caused by factors that should generate lisp errors or other
     18048          serious conditions (stack overflow); if this is the case, the
     18049          kernel code may release the global exception lock and call out
     18050          to lisp code.  (The lisp code in question may need to repeat
     18051          some of the exception decoding process; in particular, it
     18052          needs to be able to interpret register values in the signal
     18053          context that it receives as an argument.)</p>
    1804918054            <p xmlns="http://www.w3.org/1999/xhtml">In some cases, the lisp kernel exception handler may not
    18050         be able to recover from the exception (this is currently true
    18051         of some types of memory-access fault and is also true of traps
    18052         or illegal instructions that occur during foreign code
    18053         execution.  In such cases, the kernel exception handler
    18054         reports the exception as "unhandled", and the kernel debugger
    18055         is invoked.</p>
     18055          be able to recover from the exception (this is currently true
     18056          of some types of memory-access fault and is also true of traps
     18057          or illegal instructions that occur during foreign code
     18058          execution.  In such cases, the kernel exception handler
     18059          reports the exception as "unhandled", and the kernel debugger
     18060          is invoked.</p>
    1805618061            <p xmlns="http://www.w3.org/1999/xhtml">If the kernel exception handler identifies the
    18057         exception's cause as being a transient out-of-memory condition
    18058         (indicating that the current thread needs more memory to cons
    18059         in), it tries to make that memory available.  In some cases,
    18060         doing so involves invoking the GC.</p>
     18062          exception's cause as being a transient out-of-memory condition
     18063          (indicating that the current thread needs more memory to cons
     18064          in), it tries to make that memory available.  In some cases,
     18065          doing so involves invoking the GC.</p>
    1806118066          </div>
    1806218067          <div class="sect2" lang="en" xml:lang="en">
     
    1806918074            </div>
    1807018075            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL's GC is not concurrent: when the GC is invoked in
    18071         response to an exception in a particular thread, all other
    18072         lisp threads must stop until the GC's work is done.  The
    18073         thread that triggered the GC iterates over the global TCR
    18074         list, sending each other thread a distinguished "suspend"
    18075         signal, then iterates over the list again, waiting for a
    18076         per-thread semaphore that indicates that the thread has
    18077         received the "suspend" signal and responded appropriately.
    18078         Once all other threads have acknowledged the request to
    18079         suspend themselves, the GC thread can run the GC proper (after
    18080         doing any necessary <a href="#PC-lusering" title="16.1.4. PC-lusering">Section 16.1.4, “PC-lusering”</a>.)  Once the
    18081         GC's completed its work, the thread that invoked the GC
    18082         iterates over the global TCR list, raising a per-thread
    18083         "resume" semaphore for each other thread.</p>
     18076          response to an exception in a particular thread, all other
     18077          lisp threads must stop until the GC's work is done.  The
     18078          thread that triggered the GC iterates over the global TCR
     18079          list, sending each other thread a distinguished "suspend"
     18080          signal, then iterates over the list again, waiting for a
     18081          per-thread semaphore that indicates that the thread has
     18082          received the "suspend" signal and responded appropriately.
     18083          Once all other threads have acknowledged the request to
     18084          suspend themselves, the GC thread can run the GC proper (after
     18085          doing any necessary <a class="xref" href="#PC-lusering" title="16.1.4. PC-lusering">Section 16.1.4, “PC-lusering”</a>.)  Once the
     18086          GC's completed its work, the thread that invoked the GC
     18087          iterates over the global TCR list, raising a per-thread
     18088          "resume" semaphore for each other thread.</p>
    1808418089            <p xmlns="http://www.w3.org/1999/xhtml">The signal handler for the asynchronous "suspend" signal
    18085         is entered with all asynchronous signals blocked.  It saves
    18086         its signal-context argument in a TCR slot, raises the tcr's
    18087         "suspend" semaphore, then waits on the TCR's "resume"
    18088         semaphore.</p>
     18090          is entered with all asynchronous signals blocked.  It saves
     18091          its signal-context argument in a TCR slot, raises the tcr's
     18092          "suspend" semaphore, then waits on the TCR's "resume"
     18093          semaphore.</p>
    1808918094            <p xmlns="http://www.w3.org/1999/xhtml">The GC thread has access to the signal contexts of all
    18090         TCRs (including its own) at the time when the thread received
    18091         an exception or acknowledged a request to suspend itself.
    18092         This information (and information about stack areas in the TCR
    18093         itself) allows the GC to identify the "stack locations and
    18094         register contents" that are elements of the GC's root
    18095         set.</p>
     18095          TCRs (including its own) at the time when the thread received
     18096          an exception or acknowledged a request to suspend itself.
     18097          This information (and information about stack areas in the TCR
     18098          itself) allows the GC to identify the "stack locations and
     18099          register contents" that are elements of the GC's root
     18100          set.</p>
    1809618101          </div>
    1809718102          <div class="sect2" lang="en" xml:lang="en">
     
    1810418109            </div>
    1810518110            <p xmlns="http://www.w3.org/1999/xhtml">It's not quite accurate to say that Clozure CL's compiler
    18106         and runtime follow precise stack and register usage
    18107         conventions at all times; there are a few exceptions:</p>
     18111          and runtime follow precise stack and register usage
     18112          conventions at all times; there are a few exceptions:</p>
    1810818113            <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    1810918114              <ul type="disc">
    1811018115                <li>
    1811118116                  <p>On both PPC and x86-64 platforms, consing isn't
    18112             fully atomic.It takes at least a few instructions to
    18113             allocate an object in memory(and slap a header on it if
    18114             necessary); if a thread is interrupted in the middle of
    18115             that instruction sequence, the new object may or may
    18116             not have been created or fully initialized at the point in
    18117             time that the interrupt occurred.  (There are actually a
    18118             few different states of partial initialization)</p>
     18117                  fully atomic.It takes at least a few instructions to
     18118                  allocate an object in memory(and slap a header on it if
     18119                  necessary); if a thread is interrupted in the middle of
     18120                  that instruction sequence, the new object may or may
     18121                  not have been created or fully initialized at the point in
     18122                  time that the interrupt occurred.  (There are actually a
     18123                  few different states of partial initialization)</p>
    1811918124                </li>
    1812018125                <li>
    1812118126                  <p>On the PPC, the common act of building a lisp
    18122             control stack frame involves allocating a four-word frame
    18123             and storing three register values into that frame.  (The
    18124             fourth word - the back pointer to the previous frame - is
    18125             automatically set when the frame is allocated.)  The
    18126             previous contents of those three words are unknown (there
    18127             might have been a foreign stack frame at the same address a
    18128             few instructions earlier),so interrupting a thread that's
    18129             in the process of initializing a PPC control stack frame
    18130             isn't GC-safe.</p>
     18127                  control stack frame involves allocating a four-word frame
     18128                  and storing three register values into that frame.  (The
     18129                  fourth word - the back pointer to the previous frame - is
     18130                  automatically set when the frame is allocated.)  The
     18131                  previous contents of those three words are unknown (there
     18132                  might have been a foreign stack frame at the same address a
     18133                  few instructions earlier),so interrupting a thread that's
     18134                  in the process of initializing a PPC control stack frame
     18135                  isn't GC-safe.</p>
    1813118136                </li>
    1813218137                <li>
    1813318138                  <p>There are similar problems with the initialization
    18134             of temp stackframes on the PPC.  (Allocation and
    18135             initialization doesn't happen atomically, and the newly
    18136             allocated stack memory may have undefined contents.)</p>
     18139                  of temp stackframes on the PPC.  (Allocation and
     18140                  initialization doesn't happen atomically, and the newly
     18141                  allocated stack memory may have undefined contents.)</p>
    1813718142                </li>
    1813818143                <li>
    18139                   <p><a href="#The-ephemeral-GC" title="16.5. The ephemeral GC">Section 16.5, “The ephemeral GC”</a>'s write barrier
    18140             has to be implemented atomically (i.e.,both an
    18141             intergenerational store and the update of a
    18142             corresponding reference bit has to happen without
    18143             interruption, or neither of these events can
    18144             happen.)</p>
     18144                  <p><a class="xref" href="#The-ephemeral-GC" title="16.5. The ephemeral GC">Section 16.5, “The ephemeral GC”</a>'s write barrier
     18145                  has to be implemented atomically (i.e.,both an
     18146                  intergenerational store and the update of a
     18147                  corresponding reference bit has to happen without
     18148                  interruption, or neither of these events can
     18149                  happen.)</p>
    1814518150                </li>
    1814618151                <li>
     
    1815018155            </div>
    1815118156            <p xmlns="http://www.w3.org/1999/xhtml">Fortunately, the number of these non-atomic instruction
    18152         sequences is small, and fortunately it's fairly easy for the
    18153         interrupting thread to recognize when the interrupted thread
    18154         is in the middle of such a sequence.  When this is detected,
    18155         the interrupting thread modifies the state of the interrupted
    18156         thread (modifying its PC and other registers) so that it is no
    18157         longer in the middle of such a sequence (it's either backed
    18158         out of it or the remaining instructions are emulated.)</p>
     18157          sequences is small, and fortunately it's fairly easy for the
     18158          interrupting thread to recognize when the interrupted thread
     18159          is in the middle of such a sequence.  When this is detected,
     18160          the interrupting thread modifies the state of the interrupted
     18161          thread (modifying its PC and other registers) so that it is no
     18162          longer in the middle of such a sequence (it's either backed
     18163          out of it or the remaining instructions are emulated.)</p>
    1815918164            <p xmlns="http://www.w3.org/1999/xhtml">This works because (a) many of the troublesome
    18160         instruction sequences are PPC-specific and it's relatively
    18161         easy to partially disassemble the instructions surrounding the
    18162         interrupted thread's PC on the PPC and (b) those instruction
    18163         sequences are heavily stylized and intended to be easily
    18164         recognized.</p>
     18165          instruction sequences are PPC-specific and it's relatively
     18166          easy to partially disassemble the instructions surrounding the
     18167          interrupted thread's PC on the PPC and (b) those instruction
     18168          sequences are heavily stylized and intended to be easily
     18169          recognized.</p>
    1816518170          </div>
    1816618171        </div>
     
    1818218187            </div>
    1818318188            <p xmlns="http://www.w3.org/1999/xhtml">Regardless of other details of its implementation, a
    18184         garbage collector's job is to partition the set of all
    18185         heap-allocated lisp objects (CONSes, STRINGs, INSTANCEs, etc.)
    18186         into two subsets.  The first subset contains all objects that
    18187         are transitively referenced from a small set of "root" objects
    18188         (the contents of the stacks and registers of all active
    18189         threads at the time the GC occurs and the values of some
    18190         global variables.)  The second subset contains everything
    18191         else: those lisp objects that are not transitively reachable
    18192         from the roots are garbage, and the memory occupied by garbage
    18193         objects can be reclaimed (since the GC has just proven that
    18194         it's impossible to reference them.)</p>
     18189              garbage collector's job is to partition the set of all
     18190              heap-allocated lisp objects (CONSes, STRINGs, INSTANCEs, etc.)
     18191              into two subsets.  The first subset contains all objects that
     18192              are transitively referenced from a small set of "root" objects
     18193              (the contents of the stacks and registers of all active
     18194              threads at the time the GC occurs and the values of some
     18195              global variables.)  The second subset contains everything
     18196              else: those lisp objects that are not transitively reachable
     18197              from the roots are garbage, and the memory occupied by garbage
     18198              objects can be reclaimed (since the GC has just proven that
     18199              it's impossible to reference them.)</p>
    1819518200            <p xmlns="http://www.w3.org/1999/xhtml">The set of live, reachable lisp objects basically form
    18196         the nodes of a (usually large) graph, with edges from each
    18197         node A to any other objects (nodes) that object A
    18198         references.</p>
     18201          the nodes of a (usually large) graph, with edges from each
     18202          node A to any other objects (nodes) that object A
     18203          references.</p>
    1819918204            <p xmlns="http://www.w3.org/1999/xhtml">Some nodes in this graph can never have outgoing edges:
    18200         an array with a specialized numeric or character type usually
    18201         represents its elements in some (possibly more compact)
    18202         specialized way.  Some nodes may refer to lisp objects that
    18203         are never allocated in memory (FIXNUMs, CHARACTERs,
    18204         SINGLE-FLOATs on 64-bit platforms ..)  This latter class of
    18205         objects are sometimes called "immediates", but that's a little
    18206         confusing because the term "immediate" is sometimes used to
    18207         refer to things that can never be part of the big connectivity
    18208         graph (e.g., the "raw" bits that make up a floating-point
    18209         value, foreign address, or numeric value that needs to be used
    18210         - at least fleetingly - in compiled code.)</p>
     18205          an array with a specialized numeric or character type usually
     18206          represents its elements in some (possibly more compact)
     18207          specialized way.  Some nodes may refer to lisp objects that
     18208          are never allocated in memory (FIXNUMs, CHARACTERs,
     18209          SINGLE-FLOATs on 64-bit platforms ..)  This latter class of
     18210          objects are sometimes called "immediates", but that's a little
     18211          confusing because the term "immediate" is sometimes used to
     18212          refer to things that can never be part of the big connectivity
     18213          graph (e.g., the "raw" bits that make up a floating-point
     18214          value, foreign address, or numeric value that needs to be used
     18215          - at least fleetingly - in compiled code.)</p>
    1821118216            <p xmlns="http://www.w3.org/1999/xhtml">For the GC to be able to build the connectivity graph
    18212         reliably, it's necessary for it to be able to reliably tell
    18213         (a) whether or not a "potential root" - the contents of a
    18214         machine register or stack location - is in fact a node and (b)
    18215         for any node, whether it may have components that refer to
    18216         other nodes.</p>
     18217          reliably, it's necessary for it to be able to reliably tell
     18218          (a) whether or not a "potential root" - the contents of a
     18219          machine register or stack location - is in fact a node and (b)
     18220          for any node, whether it may have components that refer to
     18221          other nodes.</p>
    1821718222            <p xmlns="http://www.w3.org/1999/xhtml">There's no reliable way to answer the first question on
    18218         stock hardware.  (If everything was a node, as might be the
    18219         case on specially microcoded "lisp machine" hardware, it
    18220         wouldn't even need to be asked.)  Since there's no way to just
    18221         look at a machine word (the contents of a machine register or
    18222         stack location) and tell whether or not it's a node or just
    18223         some random non-node value, we have to either adopt and
    18224         enforce strict conventions on register and stack usage or
    18225         tolerate ambiguity.</p>
     18223          stock hardware.  (If everything was a node, as might be the
     18224          case on specially microcoded "lisp machine" hardware, it
     18225          wouldn't even need to be asked.)  Since there's no way to just
     18226          look at a machine word (the contents of a machine register or
     18227          stack location) and tell whether or not it's a node or just
     18228          some random non-node value, we have to either adopt and
     18229          enforce strict conventions on register and stack usage or
     18230          tolerate ambiguity.</p>
    1822618231            <p xmlns="http://www.w3.org/1999/xhtml">"Tolerating ambiguity" is an approach taken by some
    18227         ("conservative") GC schemes; by contrast, Clozure CL's GC is
    18228         "precise", which in this case means that it believes that the
    18229         contents of certain machine registers and stack locations are
    18230         always nodes and that other registers and stack locations are
    18231         never nodes and that these conventions are never violated by
    18232         the compiler or runtime system.  The fact that threads are
    18233         preemptively scheduled means that a GC could occur (because of
    18234         activity in some other thread) on any instruction boundary,
    18235         which in turn means that the compiler and runtime system must
    18236         follow precise <a href="#Register-and-stack-usage-conventions" title="16.2.3. Register and stack usage conventions">Section 16.2.3, “Register and stack usage conventions”</a> at all
    18237         times.</p>
     18232          ("conservative") GC schemes; by contrast, Clozure CL's GC is
     18233          "precise", which in this case means that it believes that the
     18234          contents of certain machine registers and stack locations are
     18235          always nodes and that other registers and stack locations are
     18236          never nodes and that these conventions are never violated by
     18237          the compiler or runtime system.  The fact that threads are
     18238          preemptively scheduled means that a GC could occur (because of
     18239          activity in some other thread) on any instruction boundary,
     18240          which in turn means that the compiler and runtime system must
     18241          follow precise <a class="xref" href="#Register-and-stack-usage-conventions" title="16.2.3. Register and stack usage conventions">Section 16.2.3, “Register and stack usage conventions”</a> at all
     18242          times.</p>
    1823818243            <p xmlns="http://www.w3.org/1999/xhtml">Once we've decided that a given machine word is a node,
    18239         a <a href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a> describes how the node's
    18240         value and type are encoded in that machine word.</p>
    18241             <p xmlns="http://www.w3.org/1999/xhtml">Most of this - so far - has discussed things from the
    18242         GC's very low-level perspective.  From a much higher point of
    18243         view, lisp functions accept nodes as arguments, return nodes
    18244         as values, and (usually) perform some operations on those
    18245         arguments in order to produce those results.  (In many cases,
    18246         the operations in question involve raw non-node values.)
    18247         Higher-level parts of the lisp type system (functions like
    18248         TYPE-OF and CLASS-OF, etc.) depend on the <a href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a>.</p>
     18244          a <a class="xref" href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a> describes how the node's
     18245          value and type are encoded in that machine word.</p>
     18246            <p xmlns="http://www.w3.org/1999/xhtml">Most of this discussion—so far—has treated
     18247          things from the GC's very low-level perspective. From a much
     18248          higher point of view, lisp functions accept nodes as
     18249          arguments, return nodes as values, and (usually) perform
     18250          some operations on those arguments in order to produce those
     18251          results.  (In many cases, the operations in question involve
     18252          raw non-node values.)  Higher-level parts of the lisp type
     18253          system (functions like TYPE-OF and CLASS-OF, etc.) depend on
     18254          the <a class="xref" href="#Tagging-scheme" title="16.2.4. Tagging scheme">Section 16.2.4, “Tagging scheme”</a>.</p>
    1824918255          </div>
    1825018256          <div class="sect2" lang="en" xml:lang="en">
     
    1825718263            </div>
    1825818264            <p xmlns="http://www.w3.org/1999/xhtml">On the PPC, there's a third case (besides "node" and
    18259         "immediate" values).  As discussed below, a node that denotes
    18260         a memory-allocated lisp object is a biased (tagged) pointer
    18261         -to- that object; it's not generally possible to point -into-
    18262         some composite (multi-element) object (such a pointer would
    18263         not be a node, and the GC would have no way to update the
    18264         pointer if it were to move the underlying object.)</p>
     18265          "immediate" values).  As discussed below, a node that denotes
     18266          a memory-allocated lisp object is a biased (tagged) pointer
     18267          -to- that object; it's not generally possible to point -into-
     18268          some composite (multi-element) object (such a pointer would
     18269          not be a node, and the GC would have no way to update the
     18270          pointer if it were to move the underlying object.)</p>
    1826518271            <p xmlns="http://www.w3.org/1999/xhtml">Such a pointer ("into" the interior of a heap-allocated
    18266         object) is often called a <span class="emphasis"><em>locative</em></span>; the
    18267         cases where locatives are allowed in Clozure CL mostly involve
    18268         the behavior of function call and return instructions.  (To be
    18269         technically accurate, the other case also arises on x86-64, but
    18270         that case isn't as user-visible.)</p>
     18272          object) is often called a <span class="emphasis"><em>locative</em></span>; the
     18273          cases where locatives are allowed in Clozure CL mostly involve
     18274          the behavior of function call and return instructions.  (To be
     18275          technically accurate, the other case also arises on x86-64, but
     18276          that case isn't as user-visible.)</p>
    1827118277            <p xmlns="http://www.w3.org/1999/xhtml">On the PowerPC (both PPC32 and PPC64), all machine
    18272         instructions are 32 bits wide and all instruction words are
    18273         allocated on 32-bit boundaries.  In PPC Clozure CL, a CODE-VECTOR
    18274         is a specialized type of vector-like object; its elements are
    18275         32-bit PPC machine instructions.  A CODE-VECTOR is an
    18276         attribute of FUNCTION object; a function call involves
    18277         accessing the function's code-vector and jumping to the
    18278         address of its first instruction.</p>
     18278          instructions are 32 bits wide and all instruction words are
     18279          allocated on 32-bit boundaries.  In PPC Clozure CL, a CODE-VECTOR
     18280          is a specialized type of vector-like object; its elements
     18281          are 32-bit PPC machine instructions.  A CODE-VECTOR is an
     18282          attribute of a FUNCTION object; a function call involves
     18283          accessing the function's code-vector and jumping to the
     18284          address of its first instruction.</p>
    1827918285            <p xmlns="http://www.w3.org/1999/xhtml">As each instruction in the code vector sequentially
    18280         executes, the hardware program counter (PC) register advances
    18281         to the address of the next instruction (a locative into the
    18282         code vector); since PPC instructions are always 32 bits wide
    18283         and aligned on 32-bit boundaries, the low two bits of the PC
    18284         are always 0.  If the function executes a call (simple call
    18285         instructions have the mnemonic "bl" on the PPC, which stands
    18286         for "branch and link"), the address of the next instruction
    18287         (also a word-aligned locative into a code-vector) is copied
    18288         into the special- purpose PPC "link register" (lr); a function
    18289         returns to its caller via a "branch to link register" (blr)
    18290         instruction.  Some cases of function call and return might
    18291         also use the PPC's "count register" (ctr), and if either the
    18292         lr or ctr needs to be stored in memory it needs to first be
    18293         copied to a general-purpose register.</p>
     18286          executes, the hardware program counter (PC) register advances
     18287          to the address of the next instruction (a locative into the
     18288          code vector); since PPC instructions are always 32 bits wide
     18289          and aligned on 32-bit boundaries, the low two bits of the PC
     18290          are always 0.  If the function executes a call (simple call
     18291          instructions have the mnemonic "bl" on the PPC, which stands
     18292          for "branch and link"), the address of the next instruction
     18293          (also a word-aligned locative into a code-vector) is copied
     18294          into the special- purpose PPC "link register" (lr); a function
     18295          returns to its caller via a "branch to link register" (blr)
     18296          instruction.  Some cases of function call and return might
     18297          also use the PPC's "count register" (ctr), and if either the
     18298          lr or ctr needs to be stored in memory it needs to first be
     18299          copied to a general-purpose register.</p>
    1829418300            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL's GC understands that certain registers contain
    18295         these special "pc-locatives" (locatives that point into
    18296         CODE-VECTOR objects); it contains special support for finding
    18297         the containing CODE-VECTOR object and for adjusting all of
    18298         these "pc-locatives" if the containing object is moved in
    18299         memory.  The first part of that - finding the containing
    18300         object - is possible and practical on the PPC because of
    18301         architectural artifacts (fixed-width instructions and arcana
    18302         of instruction encoding.)  It's not possible on x86-64, but
    18303         fortunately not necessary either (though the second part -
    18304         adjusting the PC/RIP when the containing object moves) is both
    18305         necessary and simple.</p>
     18301          these special "pc-locatives" (locatives that point into
     18302          CODE-VECTOR objects); it contains special support for
     18303          finding the containing CODE-VECTOR object and for adjusting
     18304          all of these "pc-locatives" if the containing object is
     18305          moved in memory.  The first part of that
     18306          operation—finding the containing object—is
     18307          possible and practical on the PPC because of architectural
     18308          artifacts (fixed-width instructions and arcana of
     18309          instruction encoding.)  It's not possible on x86-64, but
     18310          fortunately not necessary either (though the second part -
     18311          adjusting the PC/RIP when the containing object moves) is
     18312          both necessary and simple.</p>
    1830618313          </div>
    1830718314          <div class="sect2" lang="en" xml:lang="en">
     
    1832218329              </div>
    1832318330              <p xmlns="http://www.w3.org/1999/xhtml">On both PPC and X86 platforms, each lisp thread uses 3
    18324           stacks; the ways in which these stacks are used differs
    18325           between the PPC and X86.</p>
     18331            stacks; the ways in which these stacks are used differs
     18332            between the PPC and X86.</p>
    1832618333              <p xmlns="http://www.w3.org/1999/xhtml">Each thread has:</p>
    1832718334              <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
     
    1832918336                  <li>
    1833018337                    <p>A "control stack".  On both platforms, this is
    18331               "the stack" used by foreign code.  On the PPC, it
    18332               consists of a linked list of frames where the first word
    18333               in each frame points to the first word in the previous
    18334               frame (and the outermost frame points to 0.)  Some
    18335               frames on a PPC control stack are lisp frames; lisp
    18336               frames are always 4 words in size and contain (in
    18337               addition to the back pointer to the previous frame) the
    18338               calling function (a node), the return address (a
    18339               "locative" into the calling function's code-vector), and
    18340               the value to which the value-stack pointer (see below)
    18341               should be restored on function exit.  On the PPC, the GC
    18342               has to look at control-stack frames, identify which of
    18343               those frames are lisp frames, and treat the contents of
    18344               the saved function slot as a node (and handle the return
    18345               address locative specially.)  On x86-64, the control
    18346               stack is used for dynamic-extent allocation of immediate
    18347               objects.  Since the control stack never contains nodes
    18348               on x86-64, the GC ignores it on that platform.
    18349               Alignment of the control stack follows the ABI
    18350               conventions of the platform (at least at any point in
    18351               time where foreign code could run.)  On PPC, the r1
    18352               register always points to the top of the current
    18353               thread's control stack; on x86-64, the RSP register
    18354               points to the top of the current thread's control stack
    18355               when the thread is running foreign code and the address
    18356               of the top of the control stack is kept in the thread's
    18357               TCR (see <a href="#The-Thread-Context-Record" title="16.1.1. The Thread Context Record">Section 16.1.1, “The Thread Context Record”</a>
    18358               when not running foreign code.  The control stack "grows
    18359               down."</p>
     18338                    "the stack" used by foreign code.  On the PPC, it
     18339                    consists of a linked list of frames where the first word
     18340                    in each frame points to the first word in the previous
     18341                    frame (and the outermost frame points to 0.)  Some
     18342                    frames on a PPC control stack are lisp frames; lisp
     18343                    frames are always 4 words in size and contain (in
     18344                    addition to the back pointer to the previous frame) the
     18345                    calling function (a node), the return address (a
     18346                    "locative" into the calling function's code-vector), and
     18347                    the value to which the value-stack pointer (see below)
     18348                    should be restored on function exit.  On the PPC, the GC
     18349                    has to look at control-stack frames, identify which of
     18350                    those frames are lisp frames, and treat the contents of
     18351                    the saved function slot as a node (and handle the return
     18352                    address locative specially.)  On x86-64, the control
     18353                    stack is used for dynamic-extent allocation of immediate
     18354                    objects.  Since the control stack never contains nodes
     18355                    on x86-64, the GC ignores it on that platform.
     18356                    Alignment of the control stack follows the ABI
     18357                    conventions of the platform (at least at any point in
     18358                    time where foreign code could run.)  On PPC, the r1
     18359                    register always points to the top of the current
     18360                    thread's control stack; on x86-64, the RSP register
     18361                    points to the top of the current thread's control stack
     18362                    when the thread is running foreign code and the address
     18363                    of the top of the control stack is kept in the thread's
     18364                    TCR (see <a class="xref" href="#The-Thread-Context-Record" title="16.1.1. The Thread Context Record">Section 16.1.1, “The Thread Context Record”</a>
     18365                    when not running foreign code.  The control stack "grows
     18366                    down."</p>
    1836018367                  </li>
    1836118368                  <li>
    1836218369                    <p>A "value stack".  On both platforms, all values on
    18363               the value stack are nodes (including "tagged return
    18364               addresses" on x86-64.)  The value stack is always
    18365               aligned to the native word size; objects are always
    18366               pushed on the value stack using atomic instructions
    18367               ("stwu"/"stdu" on PPC, "push" on x86-64), so the
    18368               contents of the value stack between its bottom and top
    18369               are always unambiguously nodes; the compiler usually
    18370               tries to pop or discard nodes from the value stack as
    18371               soon as possible after their last use (as soon as they
    18372               may have become garbage.)  On x86-64, the RSP register
    18373               addresses the top of the value stack when running lisp
    18374               code; that address is saved in the TCR when running
    18375               foreign code.  On the PPC, a dedicated register (VSP,
    18376               currently r15) is used to address the top of the value
    18377               stack when running lisp code, and the VSP value is saved
    18378               in the TCR when running foreign code.  The value stack
    18379               grows down.</p>
     18370                    the value stack are nodes (including "tagged return
     18371                    addresses" on x86-64.)  The value stack is always
     18372                    aligned to the native word size; objects are always
     18373                    pushed on the value stack using atomic instructions
     18374                    ("stwu"/"stdu" on PPC, "push" on x86-64), so the
     18375                    contents of the value stack between its bottom and top
     18376                    are always unambiguously nodes; the compiler usually
     18377                    tries to pop or discard nodes from the value stack as
     18378                    soon as possible after their last use (as soon as they
     18379                    may have become garbage.)  On x86-64, the RSP register
     18380                    addresses the top of the value stack when running lisp
     18381                    code; that address is saved in the TCR when running
     18382                    foreign code.  On the PPC, a dedicated register (VSP,
     18383                    currently r15) is used to address the top of the value
     18384                    stack when running lisp code, and the VSP value is saved
     18385                    in the TCR when running foreign code.  The value stack
     18386                    grows down.</p>
    1838018387                  </li>
    1838118388                  <li>
    1838218389                    <p>A "temp stack".  The temp stack consists of a
    18383               linked list of frames, each of which points to the
    18384               previous temp stack frame.  The number of native machine
    18385               words in each temp stack frame is always even, so the
    18386               temp stack is aligned on a two-word (64- or 128-bit)
    18387               boundary.  The temp stack is used for dynamic-extent
    18388               objects on both platforms; on the PPC, it's used for
    18389               essentially all such objects (regardless of whether or
    18390               not the objects contain nodes); on the x86-64, immediate
    18391               dynamic-extent objects (strings, foreign pointers, etc.)
    18392               are allocated on the control stack and only
    18393               node-containing dynamic-extent objects are allocated on
    18394               the temp stack.  Data structures used to implement CATCH
    18395               and UNWIND-PROTECT are stored on the temp stack on both
    18396               ppc and x86-64.  Temp stack frames are always doublenode
    18397               aligned and objects within a temp stack frame are
    18398               aligned on doublenode boundaries.  The first word in
    18399               each frame contains a back pointer to the previous
    18400               frame; on the PPC, the second word is used to indicate
    18401               to the GC whether the remaining objects are nodes (if
    18402               the second word is 0) or immediate (otherwise.)  On
    18403               x86-64, where temp stack frames always contain nodes,
    18404               the second word is always 0.  The temp stack grows down.
    18405               It usually takes several instructions to allocate and
    18406               safely initialize a temp stack frame that's intended to
    18407               contain nodes, and the GC has to recognize the case
    18408               where a thread is in the process of allocating and
    18409               initializing a temp stack frame and take care not to
    18410               interpret any uninitialized words in the frame as nodes.
    18411               See (someplace).  The PPC keeps the current top of the
    18412               temp stack in a dedicated register (TSP, currently r12)
    18413               when running lisp code and saves this register's value
    18414               in the TCR when running foreign code.  The x86-64 keeps
    18415               the address of the top of each thread's temp stack in
    18416               the thread's TCR.</p>
     18390                    linked list of frames, each of which points to the
     18391                    previous temp stack frame.  The number of native
     18392                    machine words in each temp stack frame is always even,
     18393                    so the temp stack is aligned on a two-word (64- or
     18394                    128-bit) boundary.  The temp stack is used for
     18395                    dynamic-extent objects on both platforms; on the PPC,
     18396                    it's used for essentially all such objects (regardless
     18397                    of whether or not the objects contain nodes); on the
     18398                    x86-64, immediate dynamic-extent objects (strings,
     18399                    foreign pointers, etc.)  are allocated on the control
     18400                    stack and only node-containing dynamic-extent objects
     18401                    are allocated on the temp stack.  Data structures used
     18402                    to implement CATCH and UNWIND-PROTECT are stored on
     18403                    the temp stack on both ppc and x86-64.  Temp stack
     18404                    frames are always doublenode aligned and objects
     18405                    within a temp stack frame are aligned on doublenode
     18406                    boundaries.  The first word in each frame contains a
     18407                    back pointer to the previous frame; on the PPC, the
     18408                    second word is used to indicate to the GC whether the
     18409                    remaining objects are nodes (if the second word is 0)
     18410                    or immediate (otherwise.)  On x86-64, where temp stack
     18411                    frames always contain nodes, the second word is always
     18412                    0.  The temp stack grows down.  It usually takes
     18413                    several instructions to allocate and safely initialize
     18414                    a temp stack frame that's intended to contain nodes,
     18415                    and the GC has to recognize the case where a thread is
     18416                    in the process of allocating and initializing a temp
     18417                    stack frame and take care not to interpret any
     18418                    uninitialized words in the frame as nodes. The PPC
     18419                    keeps the current top of the temp stack in a dedicated
     18420                    register (TSP, currently r12) when running lisp code
     18421                    and saves this register's value in the TCR when
     18422                    running foreign code.  The x86-64 keeps the address of
     18423                    the top of each thread's temp stack in the thread's
     18424                    TCR.</p>
    1841718425                  </li>
    1841818426                </ul>
     
    1842818436              </div>
    1842918437              <p xmlns="http://www.w3.org/1999/xhtml">If there are a "reasonable" (for some value of
    18430           "reasonable") number or general-purpose registers and the
    18431           instruction set is "reasonably" orthogonal (most
    18432           instructions that operate on GPRs can operate on any GPR),
    18433           then it's possible to statically partition the GPRs into at
    18434           least two sets: "immediate registers" never contain nodes,
    18435           and "node registers" always contain nodes.  (On the PPC, a
    18436           few registers are members of a third set of "PC locatives",
    18437           and on both platforms some registers may have dedicated
    18438           roles as stack or heap pointers; the latter class is treated
    18439           as immediates by the GC proper but may be used to help
    18440           determine the bounds of stack and heap memory areas.)</p>
     18438            "reasonable") number of general-purpose registers and the
     18439            instruction set is "reasonably" orthogonal (most
     18440            instructions that operate on GPRs can operate on any GPR),
     18441            then it's possible to statically partition the GPRs into at
     18442            least two sets: "immediate registers" never contain nodes,
     18443            and "node registers" always contain nodes.  (On the PPC, a
     18444            few registers are members of a third set of "PC locatives",
     18445            and on both platforms some registers may have dedicated
     18446            roles as stack or heap pointers; the latter class is treated
     18447            as immediates by the GC proper but may be used to help
     18448            determine the bounds of stack and heap memory areas.)</p>
    1844118449              <p xmlns="http://www.w3.org/1999/xhtml">The ultimate definition of register partitioning is
    18442           hardwired into the GC in functions like "mark_xp()" and
    18443           "forward_xp()", which process the values of some of the
    18444           registers in an exception frame as nodes and may give some
    18445           sort of special treatment to other register values they
    18446           encounter there.)</p>
     18450            hardwired into the GC in functions like "mark_xp()" and
     18451            "forward_xp()", which process the values of some of the
     18452            registers in an exception frame as nodes and may give some
     18453            sort of special treatment to other register values they
     18454            encounter there.)</p>
    1844718455              <p xmlns="http://www.w3.org/1999/xhtml">On x86-64, the static register partitioning scheme involves:</p>
    1844818456              <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
     
    1845118459                    <p>(only) three "immediate" registers.</p>
    1845218460                    <p>The RAX, RCX, and RDX registers are used as the
    18453               implicit operands and results of some extended-precision
    18454               multiply and divide instructions which generally involve
    18455               non-node values; since their use in these instructions
    18456               means that they can't be guaranteed to contain node
    18457               values at all times, it's natural to put these registers
    18458               in the "immediate" set. RAX is generally given the
    18459               symbolic name "imm0", RDX is given the symbolic name
    18460               "imm1" and RCX is given the symbolic name "imm2"; you
    18461               may see these names in disassembled code, usually in
    18462               operations involving type checking, array indexing, and
    18463               foreign memory and function access.</p>
     18461                    implicit operands and results of some extended-precision
     18462                    multiply and divide instructions which generally involve
     18463                    non-node values; since their use in these instructions
     18464                    means that they can't be guaranteed to contain node
     18465                    values at all times, it's natural to put these registers
     18466                    in the "immediate" set. RAX is generally given the
     18467                    symbolic name "imm0", RDX is given the symbolic name
     18468                    "imm1" and RCX is given the symbolic name "imm2"; you
     18469                    may see these names in disassembled code, usually in
     18470                    operations involving type checking, array indexing, and
     18471                    foreign memory and function access.</p>
    1846418472                  </li>
    1846518473                  <li>
    1846618474                    <p>(only) two "dedicated" registers.</p>
    1846718475                    <p>RSP and RBP have
    18468               dedicated functionality dictated by the hardware and
    18469               calling conventions.</p>
     18476                    dedicated functionality dictated by the hardware and
     18477                    calling conventions.</p>
    1847018478                  </li>
    1847118479                  <li>
    1847218480                    <p>11 "node" registers.</p>
    1847318481                    <p>All other registers (RBX, RSI, RDI, and R8-R15)
    18474               are asserted to contain node values at (almost) all
    18475               times; legacy "string" operations that implicitly use RSI
    18476               and/or RDI are not used.</p>
     18482                    are asserted to contain node values at (almost) all
     18483                    times; legacy "string" operations that implicitly use RSI
     18484                    and/or RDI are not used.</p>
    1847718485                  </li>
    1847818486                </ul>
    1847918487              </div>
    1848018488              <p xmlns="http://www.w3.org/1999/xhtml">On the PPC, the static register partitioning scheme
    18481           involves:</p>
     18489            involves:</p>
    1848218490              <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    1848318491                <ul type="disc">
     
    1848518493                    <p>6 "immediate" registers.</p>
    1848618494                    <p>Registers r3-r8 are given
    18487               the symbolic names imm0-imm5.  As a RISC architecture
    18488               with simpler addressing modes, the PPC probably
    18489               uses immediate registers a bit more often than the CISC
    18490               x86-64 does, but they're generally used for the same sort
    18491               of things (type checking, array indexing, FFI,
    18492               etc.)</p>
     18495                    the symbolic names imm0-imm5.  As a RISC architecture
     18496                    with simpler addressing modes, the PPC probably
     18497                    uses immediate registers a bit more often than the CISC
     18498                    x86-64 does, but they're generally used for the same sort
     18499                    of things (type checking, array indexing, FFI,
     18500                    etc.)</p>
    1849318501                  </li>
    1849418502                  <li>
    1849518503                    <p>9 dedicated registers
    18496               </p>
     18504                    </p>
    1849718505                    <div class="itemizedlist">
    1849818506                      <ul type="circle">
    1849918507                        <li>
    1850018508                          <p>r0 (symbolic name rzero) always contains the
    18501                   value 0 when running lisp code.  Its value is
    18502                   sometimes read as 0 when it's used as the base
    18503                   register in a memory address; keeping the value 0
    18504                   there is sometimes convenient and avoids
    18505                   asymmetry.</p>
     18509                              value 0 when running lisp code.  Its value is
     18510                              sometimes read as 0 when it's used as the base
     18511                              register in a memory address; keeping the value 0
     18512                              there is sometimes convenient and avoids
     18513                              asymmetry.</p>
    1850618514                        </li>
    1850718515                        <li>
    1850818516                          <p>r1 (symbolic name sp) is the control stack
    18509                   pointer, by PPC convention.</p>
     18517                              pointer, by PPC convention.</p>
    1851018518                        </li>
    1851118519                        <li>
    1851218520                          <p>r2 is used to hold the current thread's TCR on
    18513                   ppc64 systems; it's not used on ppc32.</p>
     18521                              ppc64 systems; it's not used on ppc32.</p>
    1851418522                        </li>
    1851518523                        <li>
    1851618524                          <p>r9 and r10 (symbolic names allocptr and
    18517                   allocbase) are used to do per-thread memory
    18518                   allocation</p>
     18525                              allocbase) are used to do per-thread memory
     18526                              allocation</p>
    1851918527                        </li>
    1852018528                        <li>
    1852118529                          <p>r11 (symbolic name nargs) contains the number
    18522                   of function arguments on entry and the number of
    18523                   return values in multiple-value returning
    18524                   constructs.  It's not used more generally as either
    18525                   a node or immediate register because of the way that
    18526                   certain trap instruction encodings are
    18527                   interpreted.</p>
     18530                              of function arguments on entry and the number of
     18531                              return values in multiple-value returning
     18532                              constructs.  It's not used more generally as either
     18533                              a node or immediate register because of the way that
     18534                              certain trap instruction encodings are
     18535                              interpreted.</p>
    1852818536                        </li>
    1852918537                        <li>
    1853018538                          <p>r12 (symbolic name tsp) holds the top of the
    18531                   current thread's temp stack.</p>
     18539                              current thread's temp stack.</p>
    1853218540                        </li>
    1853318541                        <li>
    1853418542                          <p>r13 is used to hold the TCR on PPC32 systems;
    18535                   it's not used on PPC64.</p>
     18543                              it's not used on PPC64.</p>
    1853618544                        </li>
    1853718545                        <li>
    1853818546                          <p>r14 (symbolic name loc-pc) is used to copy
    18539                   "pc-locative" values between main memory and
    18540                   special-purpose PPC registers (LR and CTR) used in
    18541                   function-call and return instructions.</p>
     18547                              "pc-locative" values between main memory and
     18548                              special-purpose PPC registers (LR and CTR) used in
     18549                              function-call and return instructions.</p>
    1854218550                        </li>
    1854318551                        <li>
    1854418552                          <p>r15 (symbolic name vsp) addresses the top of
    18545                   the current thread's value stack.</p>
     18553                              the current thread's value stack.</p>
    1854618554                        </li>
    1854718555                        <li>
    1854818556                          <p>lr and ctr are PPC branch-unit registers used
    18549                   in function call and return instructions; they're
    18550                   always treated as "pc-locatives", which precludes
    18551                   the use of the ctr in some PPC looping
    18552                   constructs.</p>
     18557                              in function call and return instructions; they're
     18558                              always treated as "pc-locatives", which precludes
     18559                              the use of the ctr in some PPC looping
     18560                              constructs.</p>
    1855318561                        </li>
    1855418562                      </ul>
    1855518563                    </div>
    1855618564                    <p>
    18557               </p>
     18565                  </p>
    1855818566                  </li>
    1855918567                  <li>
    1856018568                    <p>17 "node" registers</p>
    1856118569                    <p>r15-r31 are always treated as node
    18562               registers</p>
     18570                    registers</p>
    1856318571                  </li>
    1856418572                </ul>
     
    1857518583            </div>
    1857618584            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL always allocates lisp objects on double-node
    18577         (64-bit for 32-bit platforms, 128-bit for 64-bit platforms)
    18578         boundaries; this mean that the low 3 bits (32-bit lisp) or 4
    18579         bits (64-bit lisp) are always 0 and are therefore redundant
    18580         (we only really need to know the upper 29 or 60 bits in order
    18581         to identify the aligned object address.)  The extra bits in a
    18582         lisp node can be used to encode at least some information
    18583         about the node's type, and the other 29/60 bits represent
    18584         either an immediate value or a doublenode-aligned memory
    18585         address.  The low 3 or 4 bits of a node are called the node's
    18586         "tag bits", and the conventions used to encode type
    18587         information in those tag bits are called a "tagging
    18588         scheme."</p>
     18585          (64-bit for 32-bit platforms, 128-bit for 64-bit platforms)
     18586          boundaries; this mean that the low 3 bits (32-bit lisp) or 4
     18587          bits (64-bit lisp) are always 0 and are therefore redundant
     18588          (we only really need to know the upper 29 or 60 bits in order
     18589          to identify the aligned object address.)  The extra bits in a
     18590          lisp node can be used to encode at least some information
     18591          about the node's type, and the other 29/60 bits represent
     18592          either an immediate value or a doublenode-aligned memory
     18593          address.  The low 3 or 4 bits of a node are called the node's
     18594          "tag bits", and the conventions used to encode type
     18595          information in those tag bits are called a "tagging
     18596          scheme."</p>
    1858918597            <p xmlns="http://www.w3.org/1999/xhtml">It might be possible to use the same tagging scheme on
    18590         all platforms (at least on all platforms with the same word
    18591         size and/or the same number of available tag bits), but there
    18592         are often some strong reasons for not doing so.  These
    18593         arguments tend to be very machine-specific: sometimes, there
    18594         are fairly obvious machine-dependent tricks that can be
    18595         exploited to make common operations on some types of tagged
    18596         objects faster; other times, there are architectural
    18597         restrictions that make it impractical to use certain tags for
    18598         certain types.  (On PPC64, the "ld" (load doubleword) and
    18599         "std" (store doubleword) instructions - which load and store a
    18600         GPR operand at the effective address formed by adding the
    18601         value of another GPR operand and a 16-bit constant operand -
    18602         require that the low two bits of that constant operand be 0.
    18603         Since such instructions would typically be used to access the
    18604         fields of things like CONS cells and structures, it's
    18605         desirable that that the tags chosen for CONS cells and
    18606         structures allow the use of these instructions as opposed to
    18607         more expensive alternatives.)</p>
     18598          all platforms (at least on all platforms with the same word
     18599          size and/or the same number of available tag bits), but there
     18600          are often some strong reasons for not doing so.  These
     18601          arguments tend to be very machine-specific: sometimes, there
     18602          are fairly obvious machine-dependent tricks that can be
     18603          exploited to make common operations on some types of tagged
     18604          objects faster; other times, there are architectural
     18605          restrictions that make it impractical to use certain tags for
     18606          certain types.  (On PPC64, the "ld" (load doubleword) and
     18607          "std" (store doubleword) instructions - which load and store a
     18608          GPR operand at the effective address formed by adding the
     18609          value of another GPR operand and a 16-bit constant operand -
     18610          require that the low two bits of that constant operand be 0.
     18611          Since such instructions would typically be used to access the
     18612          fields of things like CONS cells and structures, it's
     18613          desirable that that the tags chosen for CONS cells and
     18614          structures allow the use of these instructions as opposed to
     18615          more expensive alternatives.)</p>
    1860818616            <p xmlns="http://www.w3.org/1999/xhtml">One architecture-dependent tagging trick that works well
    18609         on all architectures is to use a tag of 0 for FIXNUMs: a
    18610         fixnum basically encodes its value shifted left a few bits and
    18611         keeps those low bits clear. FIXNUM addition, subtraction, and
    18612         binary logical operations can operate directly on the node
    18613         operands, addition and subtraction can exploit hardware-based
    18614         overflow detection, and (in the absence of overflow) the
    18615         hardware result of those operations is a node (fixnum).  Some
    18616         other slightly-less-common operations may require a few extra
    18617         instructions, but arithmetic operations on FIXNUMs should be
    18618         as cheap as possible and using a tag of zero for FIXNUMs helps
    18619         to ensure that it will be.</p>
    18620             <p xmlns="http://www.w3.org/1999/xhtml">If we have N available tag bits (N = 3 for 32-bit
    18621         Clozure CL and N = 4 for 64-bit Clozure CL), this way of
    18622         representing fixnums with the low M bits forced to 0 works as
    18623         long as M &lt;= N.  The smaller we make M, the larger the
    18624         values of MOST-POSITIVE-FIXNUM and MOST-NEGATIVE become; the
    18625         larger we make N, the more distinct non-FIXNUM tags become
    18626         available.  A reasonable compromise is to choose M = N-1; this
    18627         basically yields two distinct FIXNUM tags (one for even
    18628         fixnums, one for odd fixnums), gives 30-bit fixnums on 32-bit
    18629         platforms and 61-bit fixnums on 64-bit platforms, and leaves
    18630         us with 6 or 14 tags to encoded other types.</p>
     18617          on all architectures is to use a tag of 0 for FIXNUMs: a
     18618          fixnum basically encodes its value shifted left a few bits
     18619          and keeps those low bits clear. FIXNUM addition,
     18620          subtraction, and binary logical operations can operate
     18621          directly on the node operands, addition and subtraction can
     18622          exploit hardware-based overflow detection, and (in the
     18623          absence of overflow) the hardware result of those operations
     18624          is a node (fixnum).  Some other slightly-less-common
     18625          operations may require a few extra instructions, but
     18626          arithmetic operations on FIXNUMs should be as cheap as
     18627          possible and using a tag of zero for FIXNUMs helps to ensure
     18628          that it will be.</p>
     18629            <p xmlns="http://www.w3.org/1999/xhtml">If we have N available tag bits (N = 3 for 32-bit Clozure CL
     18630              and N = 4 for 64-bit Clozure CL), this way of representing
     18631              fixnums with the low M bits forced to 0 works as long as M
     18632              &lt;= N.  The smaller we make M, the larger the values of
     18633              MOST-POSITIVE-FIXNUM and MOST-NEGATIVE become; the larger we
     18634              make N, the more distinct non-FIXNUM tags become available.
     18635              A reasonable compromise is to choose M = N-1; this basically
     18636              yields two distinct FIXNUM tags (one for even fixnums, one
     18637              for odd fixnums), gives 30-bit fixnums on 32-bit platforms
     18638              and 61-bit fixnums on 64-bit platforms, and leaves us with 6
     18639              or 14 tags to encoded other types.</p>
    1863118640            <p xmlns="http://www.w3.org/1999/xhtml">Once we get past the assignment of FIXNUM tags, things
    18632         quickly devolve into machine-dependencies.  We can fairly
    18633         easily see that we can't directly all other primitive lisp
    18634         object types with only 6 or 14 available tag values; the
    18635         details of how types are encoded vary between the ppc32,
    18636         ppc64, and x86-64 implementations, but there are some general
    18637         common principles:</p>
     18641          quickly devolve into machine-dependencies.  We can fairly
     18642          easily see that we can't directly tag all other primitive
     18643          lisp object types with only 6 or 14 available tag values;
     18644          the details of how types are encoded vary between the ppc32,
     18645          ppc64, and x86-64 implementations, but there are some
     18646          general common principles:</p>
    1863818647            <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    1863918648              <ul type="disc">
    1864018649                <li>
    1864118650                  <p>CONS cells always contain exactly 2 elements and are
    18642             usually fairly common.It therefore makes sense to give
    18643             CONS cells their own tag.  Unlike the fixnum case - where a
    18644             tag value of 0 had positive implications - there doesn't
    18645             seem to be any advantage to using any particular value.
    18646             (A longtime ago - in the case of 68K MCL - the CONS tag
    18647             and the order of CAR and CDR in memory were chosen to allow
    18648             smaller, cheaper addressing modes to be used to "cdr down a
    18649             list."  That's not a factor on ppc or x86-64,but all
    18650             versions of Clozure CL still store the CDR of a CONS cell
    18651             first in memory.  It doesn't matter, but doing it the way
    18652             that the host system did made boostrapping to a new target
    18653             system a little easier.)
    18654             </p>
     18651                  usually fairly common.It therefore makes sense to give
     18652                  CONS cells their own tag.  Unlike the fixnum case -
     18653                  where a tag value of 0 had positive implications - there
     18654                  doesn't seem to be any advantage to using any particular
     18655                  value.  (A longtime ago - in the case of 68K MCL - the
     18656                  CONS tag and the order of CAR and CDR in memory were
     18657                  chosen to allow smaller, cheaper addressing modes to be
     18658                  used to "cdr down a list."  That's not a factor on ppc
     18659                  or x86-64, but all versions of Clozure CL still store the CDR
     18660                  of a CONS cell first in memory.  It doesn't matter, but
     18661                  doing it the way that the host system did made
     18662                  boostrapping to a new target system a little easier.)
     18663                </p>
    1865518664                </li>
    1865618665                <li>
    18657                   <p>Any way you look at it, NIL is a bit ... unusual. NIL
    18658             is both a SYMBOL and a LIST (as well as being a canonical
    18659             truth value and probably a few other things.)  Its role as
    18660             a LIST is probably much more important to most programs
    18661             than its role as a SYMBOL is:LISTP has to be true of NIL
    18662             and primitives like CAR and CDR do LISTP implicitly when
    18663             safe and want that operation to be fast.There are several
    18664             possible approaches to this; Clozure CL uses two of them. On
    18665             PPC32 and X86-64, NIL is basically a weird CONS cell that
    18666             straddles two doublenodes; the tag of NIL is unique and
    18667             congruent modulo 4 (modulo 8 on 64-bit) with the tag used
    18668             for CONS cells.  LISTP is therefore true of any node whose
    18669             low 2 (or 3) bits contain the appropriate tag value (it's
    18670             not otherwise necessary to special-case NIL.)
    18671             SYMBOL accessors (SYMBOL-NAME, SYMBOL-VALUE, SYMBOL-PLIST
    18672             ..) -do- have to special-case NIL (and access the
    18673             components of an internal proxy symbol.) On PPC64 (where
    18674             architectural restrictions dictate the set of tags that can
    18675             be used to access fixed components of an object),
    18676             that approach wasn't practical.  NIL is just a
    18677             distinguished SYMBOL,and it just happens to be the case
    18678             that its pname slot and values lots are at the same offsets
    18679             from a tagged pointer as a CONS cell's CDR and CAR would be.
    18680             NIL's pname is set to NIL (SYMBOL-NAME checks for this and
    18681             returns the string "NIL"), and LISTP (and therefore safe
    18682             CAR and CDR) have to check for (OR NULL CONSP). At least in
    18683             the case of CAR and CDR, the fact that the PPC has multiple
    18684             condition-code fields keeps that extra test from
    18685             being prohibitively expensive.</p>
     18666                  <p>Any way you look at it, NIL is a bit
     18667                  ... unusual. NIL is both a SYMBOL and a LIST (as well as
     18668                  being a canonical truth value and probably a few other
     18669                  things.)  Its role as a LIST is probably much more
     18670                  important to most programs than its role as a SYMBOL is:
     18671                  LISTP has to be true of NIL and primitives like CAR and
     18672                  CDR do LISTP implicitly when safe and want that
     18673                  operation to be fast. There are several possible
     18674                  approaches to this problem; Clozure CL uses two of them. On
     18675                  PPC32 and X86-64, NIL is basically a weird CONS cell
     18676                  that straddles two doublenodes; the tag of NIL is unique
     18677                  and congruent modulo 4 (modulo 8 on 64-bit) with the tag
     18678                  used for CONS cells.  LISTP is therefore true of any
     18679                  node whose low 2 (or 3) bits contain the appropriate tag
     18680                  value (it's not otherwise necessary to special-case
     18681                  NIL.)  SYMBOL accessors (SYMBOL-NAME, SYMBOL-VALUE,
     18682                  SYMBOL-PLIST ..) -do- have to special-case NIL (and
     18683                  access the components of an internal proxy symbol.) On
     18684                  PPC64 (where architectural restrictions dictate the set
     18685                  of tags that can be used to access fixed components of
     18686                  an object), that approach wasn't practical.  NIL is just
     18687                  a distinguished SYMBOL,and it just happens to be the
     18688                  case that its pname slot and values slot are at the same
     18689                  offsets from a tagged pointer as a CONS cell's CDR and
     18690                  CAR would be.  NIL's pname is set to NIL (SYMBOL-NAME
     18691                  checks for this and returns the string "NIL"), and LISTP
     18692                  (and therefore safe CAR and CDR) has to check for (OR
     18693                  NULL CONSP). At least in the case of CAR and CDR, the
     18694                  fact that the PPC has multiple condition-code fields
     18695                  keeps that extra test from being prohibitively
     18696                  expensive.</p>
    1868618697                </li>
    1868718698                <li>
    18688                   <p>Some objects are immediate (but not FIXNUMs).This is
    18689             true of CHARACTERs and, on 64-bit platforms,
    18690             SINGLE-FLOATs.It's also true of some nodes used in the
    18691             runtime system (special values used to indicate unbound
    18692             variables and slots, for instance.) On 64-bit platforms,
    18693             SINGLE-FLOATs have their own unique tag (making them a
    18694             little easier to recognize; on all platforms, CHARACTERs
    18695             share a tag with other immediate objects (unbound markers)
    18696             but are easy to recognize (by looking at several of their
    18697             low bits.)  The GC treats any node with an immediate tag
    18698             (and any node with a fixnum tag) as a leaf.</p>
     18699                  <p>Some objects are immediate (but not FIXNUMs). This
     18700                  is true of CHARACTERs and, on 64-bit platforms,
     18701                  SINGLE-FLOATs. It's also true of some nodes used in the
     18702                  runtime system (special values used to indicate unbound
     18703                  variables and slots, for instance.) On 64-bit platforms,
     18704                  SINGLE-FLOATs have their own unique tag (making them a
     18705                  little easier to recognize; on all platforms, CHARACTERs
     18706                  share a tag with other immediate objects (unbound
     18707                  markers) but are easy to recognize (by looking at
     18708                  several of their low bits.)  The GC treats any node with
     18709                  an immediate tag (and any node with a fixnum tag) as a
     18710                  leaf.</p>
    1869918711                </li>
    1870018712                <li>
    1870118713                  <p>There are some advantages to treating everything
    18702             else - memory-allocated objects that aren't CONS cells -
    18703             uniformly.There are some disadvantages to that uniform
    18704             treatment as well, and the treatment of "memory-allocated
    18705             non-CONS objects" isn't entirely uniform across all
    18706             Clozure CL implementations.  Let's first pretend that
    18707             the treatment is uniform, then discuss the ways in which it
    18708             isn't.The "uniform approach" is to treat all
    18709             memory-allocated non-CONS objects as if they were vectors;
    18710             this use of the term is a little looser than what's implied
    18711             by the CL VECTOR type.  Clozure CL actually uses the
    18712             term "uvector" to mean "a memory-allocated lisp object
    18713             other than a CONS cell,whose first word is a header which
    18714             describes the object's type and the number of elements that
    18715             it contains."  In this view, a SYMBOL is a UVECTOR, as is a
    18716             STRING, a STANDARD-INSTANCE, a CL array or vector,a
    18717             FUNCTION, and even a DOUBLE-FLOAT.In the PPC
    18718             implementations (where things are a little more
    18719             ... uniform),a single tag value is used to denote any
    18720             uvector; in order to determine something more specific
    18721             about the type of the object in question, it's necessary to
    18722             fetch the low byte of the header word from memory.  On
    18723             the x86-64 platform, certain types of uvectors - SYMBOLs
    18724             and FUNCTIONs -are given their own unique tags.  The good
    18725             news about the x86-64 approach is that SYMBOLs and
    18726             FUNCTIONs can be recognized without referencing memory; the
    18727             slightly bad news is that primitive operations that work on
    18728             UVECTOR-tagged objects - like the function CCL:UVREF -
    18729             don't work on SYMBOLs or FUNCTIONs on x86-64 (but -do- work
    18730             on those types of objects in the PPC ports.) The header word
    18731             which precedes a UVECTOR's data in memory contains 8 bits
    18732             of type information in the low byte and either 24 or 56
    18733             bits of"element-count" information in the rest of the
    18734             word.  (This is where the sometimes-limiting value of 2^24
    18735             for ARRAY-TOTAL-SIZE-LIMIT on PPC32 platforms comes from.)
    18736             The low byte of the header - sometimes called the uvector's
    18737             subtag - is itself tagged (which means that the header is
    18738             tagged.)  The (3 or 4) tag bits in the subtag are used to
    18739             determine whether the uvector's elements are nodes or
    18740             immediates.(A UVECTOR whose elements are nodes is called a
    18741             GVECTOR; a UVECTOR whose elements are immediates is called
    18742             an IVECTOR.  This terminology came from Spice Lisp, which
    18743             was a predecessor of CMUCL.)  Even though a uvector header
    18744             is tagged, a header is not a node.  There's no (supported)
    18745             way to get your hands on one in lisp and doing so could be
    18746             dangerous.  (If the value of a header wound up in a lisp
    18747             node register and that register wound up getting pushed on
    18748             a thread's value stack, the GC might misinterpret that
    18749             situation to mean that there was a stack-allocated UVECTOR
    18750             on the value stack.)</p>
     18714                  else—memory-allocated objects that aren't CONS
     18715                  cells—uniformly.There are some disadvantages to
     18716                  that uniform treatment as well, and the treatment of
     18717                  "memory-allocated non-CONS objects" isn't entirely
     18718                  uniform across all Clozure CL implementations.  Let's first
     18719                  pretend that the treatment is uniform, then discuss the
     18720                  ways in which it isn't.The "uniform approach" is to
     18721                  treat all memory-allocated non-CONS objects as if they
     18722                  were vectors; this use of the term is a little looser
     18723                  than what's implied by the CL VECTOR type.  Clozure CL
     18724                  actually uses the term "uvector" to mean "a
     18725                  memory-allocated lisp object other than a CONS cell,
     18726                  whose first word is a header that describes the object's
     18727                  type and the number of elements that it contains."  In
     18728                  this view, a SYMBOL is a UVECTOR, as is a STRING, a
     18729                  STANDARD-INSTANCE, a CL array or vector, a FUNCTION, and
     18730                  even a DOUBLE-FLOAT. In the PPC implementations (where
     18731                  things are a little more ... uniform), a single tag
     18732                  value is used to denote any uvector; in order to
     18733                  determine something more specific about the type of the
     18734                  object in question, it's necessary to fetch the low byte
     18735                  of the header word from memory.  On the x86-64 platform,
     18736                  certain types of uvectors - SYMBOLs and FUNCTIONs -are
     18737                  given their own unique tags.  The good news about the
     18738                  x86-64 approach is that SYMBOLs and FUNCTIONs can be
     18739                  recognized without referencing memory; the slightly bad
     18740                  news is that primitive operations that work on
     18741                  UVECTOR-tagged objects—like the function
     18742                  CCL:UVREF—don't work on SYMBOLs or FUNCTIONs on
     18743                  x86-64 (but -do- work on those types of objects in the
     18744                  PPC ports.) The header word that precedes a UVECTOR's
     18745                  data in memory contains 8 bits of type information in
     18746                  the low byte and either 24 or 56 bits of "element-count"
     18747                  information in the rest of the word.  (This is where the
     18748                  sometimes-limiting value of 2^24 for
     18749                  ARRAY-TOTAL-SIZE-LIMIT on PPC32 platforms comes from.)
     18750                  The low byte of the header—sometimes called the
     18751                  uvector's subtag—is itself tagged (which means
     18752                  that the header is tagged.)  The (3 or 4) tag bits in
     18753                  the subtag are used to determine whether the uvector's
     18754                  elements are nodes or immediates. (A UVECTOR whose
     18755                  elements are nodes is called a GVECTOR; a UVECTOR whose
     18756                  elements are immediates is called an IVECTOR.  This
     18757                  terminology came from Spice Lisp, which was a
     18758                  predecessor of CMUCL.)  Even though a uvector header is
     18759                  tagged, a header is not a node.  There's no (supported)
     18760                  way to get your hands on one in lisp and doing so could
     18761                  be dangerous.  (If the value of a header wound up in a
     18762                  lisp node register and that register wound up getting
     18763                  pushed on a thread's value stack, the GC might
     18764                  misinterpret that situation to mean that there was a
     18765                  stack-allocated UVECTOR on the value stack.)</p>
    1875118766                </li>
    1875218767              </ul>
     
    1876318778          </div>
    1876418779          <p xmlns="http://www.w3.org/1999/xhtml">When the Clozure CL kernel first
    18765       starts up, a large contiguous chunk of the process's address
    18766       space is mapped as "anonymous, no access" memory. ("Large" means
    18767       different things in different contexts; on LinuxPPC32, it means
    18768       "about 1 gigabyte", on DarwinPPC32, it means "about 2
    18769       gigabytes", and on current 64-bit platforms it ranges from 128
    18770       to 512 gigabytes, depending on OS. These values are both
    18771       defaults and upper limits; the --heap-reserve argument can be
    18772       used to try to reserve less than the default.)</p>
     18780        starts up, a large contiguous chunk of the process's address
     18781        space is mapped as "anonymous, no access" memory. ("Large"
     18782        means different things in different contexts; on LinuxPPC32,
     18783        it means "about 1 gigabyte", on DarwinPPC32, it means "about 2
     18784        gigabytes", and on current 64-bit platforms it ranges from 128
     18785        to 512 gigabytes, depending on OS. These values are both
     18786        defaults and upper limits;
     18787        the <code class="literal">--heap-reserve</code> argument can be used to
     18788        try to reserve less than the default.)</p>
    1877318789          <p xmlns="http://www.w3.org/1999/xhtml">Reserving address space that can't (yet) be read or
    18774       written to doesn't cost much; in particular, it doesn't require
    18775       that corresponding swap space or physical memory be available.
    18776       Marking the address range as being "mapped" helps to ensure that
    18777       other things (results from random calls to malloc(), dynamically
    18778       loaded shared libraries) won't be allocated in this region that
    18779       lisp has reserved for its own heap growth.</p>
     18790        written to doesn't cost much; in particular, it doesn't require
     18791        that corresponding swap space or physical memory be available.
     18792        Marking the address range as being "mapped" helps to ensure that
     18793        other things (results from random calls to malloc(), dynamically
     18794        loaded shared libraries) won't be allocated in this region that
     18795        lisp has reserved for its own heap growth.</p>
    1878018796          <p xmlns="http://www.w3.org/1999/xhtml">A small portion (around 1/32 on 32-bit platforms and 1/64
    18781       on 64-bit platforms) of that large chunk of address space is
    18782       reserved for GC data structures.  Memory pages reserved for
    18783       these data structures are mapped read-write as pages made
    18784       writable in the main portion of the heap.</p>
     18797        on 64-bit platforms) of that large chunk of address space is
     18798        reserved for GC data structures.  Memory pages reserved for
     18799        these data structures are mapped read-write as pages are made
     18800        writable in the main portion of the heap.</p>
    1878518801          <p xmlns="http://www.w3.org/1999/xhtml">The initial heap image is mapped into this reserved
    18786       address space and an additional (LISP-HEAP-GC-THRESHOLD) bytes
    18787       are mapped read-write.  GC data structures grow to match the
    18788       amount of GC-able memory in the initial image + the gc
    18789       threshold, and control is transferred to lisp code.  Inevitably,
    18790       that code spoils everything and starts consing; there are
    18791       basically three layers of memory allocation that can go
    18792       on.</p>
     18802        address space and an additional (LISP-HEAP-GC-THRESHOLD) bytes
     18803        are mapped read-write.  GC data structures grow to match the
     18804        amount of GC-able memory in the initial image plus the gc
     18805        threshold, and control is transferred to lisp code.
     18806        Inevitably, that code spoils everything and starts consing;
     18807        there are basically three layers of memory allocation that can
     18808        go on.</p>
    1879318809          <div class="sect2" lang="en" xml:lang="en">
    1879418810            <div xmlns="http://www.w3.org/1999/xhtml" class="titlepage">
     
    1880018816            </div>
    1880118817            <p xmlns="http://www.w3.org/1999/xhtml">Each lisp thread has a private "reserved memory
    18802         segment"; when a thread starts up, its reserved memory segment
    18803         is empty.  PPC ports maintain the highest unallocated address
    18804         and the lowest allocatable address in the current segment in
    18805         registers when running lisp code; on x86-664, these values are
    18806         maintained in the current threads's TCR.  (An "empty" heap
    18807         segment is one whose high pointer and low pointer are equal.)
    18808         When a thread is not in the middle of allocating something, the
    18809         low 3 or 4 bits of the high and low pointers are clear (the
    18810         pointers are doublenode-aligned.)</p>
     18818          segment"; when a thread starts up, its reserved memory segment
     18819          is empty.  PPC ports maintain the highest unallocated address
     18820          and the lowest allocatable address in the current segment in
     18821          registers when running lisp code; on x86-664, these values are
     18822          maintained in the current threads's TCR.  (An "empty" heap
     18823          segment is one whose high pointer and low pointer are equal.)
     18824          When a thread is not in the middle of allocating something, the
     18825          low 3 or 4 bits of the high and low pointers are clear (the
     18826          pointers are doublenode-aligned.)</p>
    1881118827            <p xmlns="http://www.w3.org/1999/xhtml">A thread tries to allocate an object whose physical size
    18812         in bytes is X and whose tag is Y by:</p>
     18828          in bytes is X and whose tag is Y by:</p>
    1881318829            <div xmlns="http://www.w3.org/1999/xhtml" class="orderedlist">
    1881418830              <ol type="1">
     
    1881818834                <li>
    1881918835                  <p>trapping if the high pointer is less than the low
    18820             pointer</p>
     18836                  pointer</p>
    1882118837                </li>
    1882218838                <li>
    1882318839                  <p>using the (tagged) high pointer to initialize the
    18824             object, if necessary</p>
     18840                  object, if necessary</p>
    1882518841                </li>
    1882618842                <li>
     
    1883018846            </div>
    1883118847            <p xmlns="http://www.w3.org/1999/xhtml">On PPC32, where the size of a CONS cell is 8 bytes and
    18832         the tag of a CONS cell is 1, machine code which sets the arg_z
    18833         register to the result of doing (CONS arg_y arg_z) looks
    18834         like:</p>
     18848          the tag of a CONS cell is 1, machine code which sets the arg_z
     18849          register to the result of doing (CONS arg_y arg_z) looks
     18850          like:</p>
    1883518851            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1883618852  (SUBI ALLOCPTR ALLOCPTR 7)    ; decrement the high pointer by (- 8 1)
     
    1884018856  (MR ARG_Z ALLOCPTR)           ; arg_z is the new CONS cell
    1884118857  (RLWINM ALLOCPTR ALLOCPTR 0 0 28)     ; clear tag bits
    18842         </pre>
     18858            </pre>
    1884318859            <p xmlns="http://www.w3.org/1999/xhtml">On x86-64, the idea's similar but the implementation is
    18844         different.  The high and low pointers to the current thread's
    18845         reserved segment are kept in the TCR, which is addressed by
    18846         the gs segment register. An x86-64 CONS cell is 16 bytes wide
    18847         and has a tag of 3; we canonically use the temp0 register to
    18848         initialize the object</p>
     18860          different.  The high and low pointers to the current thread's
     18861          reserved segment are kept in the TCR, which is addressed by
     18862          the gs segment register. An x86-64 CONS cell is 16 bytes wide
     18863          and has a tag of 3; we canonically use the temp0 register to
     18864          initialize the object</p>
    1884918865            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1885018866  (subq ($ 13) ((% gs) 216))    ; decrement allocptr
     
    1885818874  (movq (% arg_z) (-3 (% temp0))); set the cdr
    1885918875  (movq (% temp0) (% arg_z))    ; return the cons
    18860         </pre>
     18876            </pre>
    1886118877            <p xmlns="http://www.w3.org/1999/xhtml">If we don't take the trap (if allocating 8-16 bytes
    18862         doesn't exhaust the thread's reserved memory segment), that's
    18863         a fairly short and simple instruction sequence.  If we do take
    18864         the trap, we'll have to do some additional work in order to
    18865         get a new segment for the current thread.</p>
     18878          doesn't exhaust the thread's reserved memory segment), that's
     18879          a fairly short and simple instruction sequence.  If we do take
     18880          the trap, we'll have to do some additional work in order to
     18881          get a new segment for the current thread.</p>
    1886618882          </div>
    1886718883          <div class="sect2" lang="en" xml:lang="en">
     
    1887418890            </div>
    1887518891            <p xmlns="http://www.w3.org/1999/xhtml">After the lisp image is first mapped into memory - and after
    18876         each full GC - the lisp kernel ensures that
    18877         (LISP-HEAP-GC-TRESHOLD) additional bytes beyond the current
    18878         end of the heap are mapped read-write.</p>
     18892          each full GC - the lisp kernel ensures that
     18893          (LISP-HEAP-GC-TRESHOLD) additional bytes beyond the current
     18894          end of the heap are mapped read-write.</p>
    1887918895            <p xmlns="http://www.w3.org/1999/xhtml">If a thread traps while trying to allocate memory, the
    18880         thread goes through the usual exception-handling protocol (to
    18881         ensure that any other thread that GCs "sees" the state of the
    18882         trapping thread and to serialize exception handling.)  When
    18883         the exception handler runs, it determines the nature and size
    18884         of the failed allocation and tries to complete the allocation
    18885         on the thread's behalf (and leave it with a reasonably large
    18886         thread-specific memory segment so that the next small
    18887         allocation is unlikely to trap.</p>
     18896          thread goes through the usual exception-handling protocol (to
     18897          ensure that any other thread that GCs "sees" the state of the
     18898          trapping thread and to serialize exception handling.)  When
     18899          the exception handler runs, it determines the nature and size
     18900          of the failed allocation and tries to complete the allocation
     18901          on the thread's behalf (and leave it with a reasonably large
     18902          thread-specific memory segment so that the next small
     18903          allocation is unlikely to trap.</p>
    1888818904            <p xmlns="http://www.w3.org/1999/xhtml">Depending on the size of the requested segment
    18889         allocation, the number of segment allocations that have
    18890         occurred since the last GC, and the EGC and GC thresholds, the
    18891         segment allocation trap handler may invoke a full or ephemeral
    18892         GC before returning a new segment.  It's worth noting that the
    18893         [E]GC is triggered based on the number of and size of these
    18894         segments that have been allocated since the last GC; it doesn't
    18895         have much to do with how "full" each of those per-thread
    18896         segments are.  It's possible for a large number of threads to
    18897         do fairly incidental memory allocation and trigger the GC as a
    18898         result; avoiding this involves tuning the per-thread
    18899         allocation quantum and the GC/EGC thresholds
    18900         appropriately.</p>
     18905          allocation, the number of segment allocations that have
     18906          occurred since the last GC, and the EGC and GC thresholds, the
     18907          segment allocation trap handler may invoke a full or ephemeral
     18908          GC before returning a new segment.  It's worth noting that the
     18909          [E]GC is triggered based on the number of and size of these
     18910          segments that have been allocated since the last GC; it doesn't
     18911          have much to do with how "full" each of those per-thread
     18912          segments are.  It's possible for a large number of threads to
     18913          do fairly incidental memory allocation and trigger the GC as a
     18914          result; avoiding this involves tuning the per-thread
     18915          allocation quantum and the GC/EGC thresholds
     18916          appropriately.</p>
    1890118917          </div>
    1890218918          <div class="sect2" lang="en" xml:lang="en">
     
    1890918925            </div>
    1891018926            <p xmlns="http://www.w3.org/1999/xhtml">All OSes on which Clozure CL currently runs use an
    18911         "overcommit" memory allocation strategy by default (though
    18912         some of them provide ways of overriding that default.)  What
    18913         this means in general is that the OS doesn't necessarily
    18914         ensure that backing store is available when asked to map pages
    18915         as read-write; it'll often return a success indicator from the
    18916         mapping attempt (mapping the pages as "zero-fill,
    18917         copy-on-write"), and only try to allocate the backing store
    18918         (swap space and/or physical memory) when non-zero contents are
    18919         written to the pages.</p>
     18927          "overcommit" memory allocation strategy by default (though
     18928          some of them provide ways of overriding that default.)  What
     18929          this means in general is that the OS doesn't necessarily
     18930          ensure that backing store is available when asked to map pages
     18931          as read-write; it'll often return a success indicator from the
     18932          mapping attempt (mapping the pages as "zero-fill,
     18933          copy-on-write"), and only try to allocate the backing store
     18934          (swap space and/or physical memory) when non-zero contents are
     18935          written to the pages.</p>
    1892018936            <p xmlns="http://www.w3.org/1999/xhtml">It -sounds- like it'd be better to have the mmap() call
    18921         fail immediately, but it's actually a complicated issue.
    18922         (It's possible that other applications will stop using some
    18923         backing store before lisp code actually touches the pages that
    18924         need it, for instance.)  It's also not guaranteed that lisp
    18925         code would be able to "cleanly" signal an out-of-memory
    18926         condition if lisp is ... out of memory</p>
     18937          fail immediately, but it's actually a complicated issue.
     18938          (It's possible that other applications will stop using some
     18939          backing store before lisp code actually touches the pages that
     18940          need it, for instance.)  It's also not guaranteed that lisp
     18941          code would be able to "cleanly" signal an out-of-memory
     18942          condition if lisp is ... out of memory</p>
    1892718943            <p xmlns="http://www.w3.org/1999/xhtml">I don't know that I've ever seen an abrupt out-of-memory
    18928         failure that wasn't preceded by several minutes of excessive
    18929         paging activity.  The most expedient course in cases like this
    18930         is to either (a) use less memory or (b) get more memory; it's
    18931         generally hard to use memory that you don't have.</p>
     18944              failure that wasn't preceded by several minutes of excessive
     18945              paging activity.  The most expedient course in cases like this
     18946              is to either (a) use less memory or (b) get more memory; it's
     18947              generally hard to use memory that you don't have.</p>
    1893218948          </div>
    1893318949        </div>
     
    1894118957          </div>
    1894218958          <p xmlns="http://www.w3.org/1999/xhtml">The GC uses a Mark/Compact algorithm; its
    18943       execution time is essentially a factor of the amount of live
    18944       data in the heap. (The somewhat better-known Mark/Sweep
    18945       algorithms don't compact the live data but instead traverse the
    18946       garbage to rebuild free-lists; their execution time is therefore
    18947       a factor of the total heap size.)</p>
    18948           <p xmlns="http://www.w3.org/1999/xhtml">As mentioned in <a href="#Heap-Allocation" title="16.3. Heap Allocation">Section 16.3, “Heap Allocation”</a>, two
    18949       auxiliary data structures (proportional to the size of the lisp
    18950       heap) are maintained. These are</p>
     18959        execution time is essentially a factor of the amount of live
     18960        data in the heap. (The somewhat better-known Mark/Sweep
     18961        algorithms don't compact the live data but instead traverse the
     18962        garbage to rebuild free-lists; their execution time is therefore
     18963        a factor of the total heap size.)</p>
     18964          <p xmlns="http://www.w3.org/1999/xhtml">As mentioned in <a class="xref" href="#Heap-Allocation" title="16.3. Heap Allocation">Section 16.3, “Heap Allocation”</a>, two
     18965        auxiliary data structures (proportional to the size of the lisp
     18966        heap) are maintained. These are</p>
    1895118967          <div xmlns="http://www.w3.org/1999/xhtml" class="orderedlist">
    1895218968            <ol type="1">
    1895318969              <li>
    1895418970                <p>the markbits bitvector, which contains a bit for
    18955           every doublenode in the dynamic heap (plus a few extra words
    18956           for alignment and so that sub-bitvectors can start on word
    18957           boundaries.)</p>
     18971                every doublenode in the dynamic heap (plus a few extra words
     18972                for alignment and so that sub-bitvectors can start on word
     18973                boundaries.)</p>
    1895818974              </li>
    1895918975              <li>
    1896018976                <p>the relocation table, which contains a native word for
    18961           every 32 or 64 doublenodes in the dynamic heap, plus an
    18962           extra word used to keep track of the end of the heap.</p>
     18977                every 32 or 64 doublenodes in the dynamic heap, plus an
     18978                extra word used to keep track of the end of the heap.</p>
    1896318979              </li>
    1896418980            </ol>
    1896518981          </div>
    1896618982          <p xmlns="http://www.w3.org/1999/xhtml">The total GC space overhead is therefore on the order of
    18967       3% (2/64 or 1/32).</p>
     18983        3% (2/64 or 1/32).</p>
    1896818984          <p xmlns="http://www.w3.org/1999/xhtml">The general algorithm proceeds as follows:</p>
    1896918985          <div class="sect2" lang="en" xml:lang="en">
     
    1897618992            </div>
    1897718993            <p xmlns="http://www.w3.org/1999/xhtml">Each doublenode in the dynamic heap has a corresponding
    18978         bit in the markbits vector. (For any doublenode in the heap,
    18979         the index of its mark bit is determined by subtracting the
    18980         address of the start of the heap from the address of the
    18981         object and dividing the result by 8 or 16.) The GC knows the
    18982         markbit index of the free pointer, so determining that the
    18983         markbit index of a doubleword address is between the start of
    18984         the heap and the free pointer can be done with a single
    18985         unsigned comparison.</p>
     18994          bit in the markbits vector. (For any doublenode in the heap,
     18995          the index of its mark bit is determined by subtracting the
     18996          address of the start of the heap from the address of the
     18997          object and dividing the result by 8 or 16.) The GC knows the
     18998          markbit index of the free pointer, so determining that the
     18999          markbit index of a doubleword address is between the start of
     19000          the heap and the free pointer can be done with a single
     19001          unsigned comparison.</p>
    1898619002            <p xmlns="http://www.w3.org/1999/xhtml">The markbits of all doublenodes in the dynamic heap are
    18987         zeroed before the mark phase begins. An object is
    18988         <span class="emphasis"><em>marked</em></span> if the markbits of all of its
    18989         constituent doublewords are set and unmarked otherwise;
    18990         setting an object's markbits involves setting the corresponding
    18991         markbits of all constituent doublenodes in the object.</p>
     19003          zeroed before the mark phase begins. An object is
     19004          <span class="emphasis"><em>marked</em></span> if the markbits of all of its
     19005          constituent doublewords are set and unmarked otherwise;
     19006          setting an object's markbits involves setting the corresponding
     19007          markbits of all constituent doublenodes in the object.</p>
    1899219008            <p xmlns="http://www.w3.org/1999/xhtml">The mark phase traverses each root. If the tag of the
    18993         value of the root indicates that it's a non-immediate node
    18994         whose address lies in the lisp heap, then:</p>
     19009          value of the root indicates that it's a non-immediate node
     19010          whose address lies in the lisp heap, then:</p>
    1899519011            <div xmlns="http://www.w3.org/1999/xhtml" class="orderedlist">
    1899619012              <ol type="1">
     
    1900619022                <li>
    1900719023                  <p>If the object is a cons cell, recursively mark its
    19008             car and cdr.</p>
     19024                  car and cdr.</p>
    1900919025                </li>
    1901019026                <li>
    1901119027                  <p>Otherwise, the object is a gvector. Recursively mark
    19012             its elements.</p>
     19028                  its elements.</p>
    1901319029                </li>
    1901419030              </ol>
    1901519031            </div>
    1901619032            <p xmlns="http://www.w3.org/1999/xhtml">Marking an object thus involves ensuring that its mark
    19017         bits are set and then recursively marking any pointers
    19018         contained within the object if the object was originally
    19019         unmarked. If this recursive step was implemented in the
    19020         obvious manner, marking an object would take stack space
    19021         proportional to the length of the pointer chain from some root
    19022         to that object. Rather than storing that pointer chain
    19023         implicitly on the stack (in a series of recursive calls to the
    19024         mark subroutine), the Clozure CL marker uses mixture of recursion
    19025         and a technique called <span class="emphasis"><em>link inversion</em></span> to
    19026         store the pointer chain in the objects themselves.  (Recursion
    19027         tends to be simpler and faster; if a recursive step notes that
    19028         stack space is becoming limited, the link-inversion technique
    19029         is used.)</p>
     19033          bits are set and then recursively marking any pointers
     19034          contained within the object if the object was originally
     19035          unmarked. If this recursive step was implemented in the
     19036          obvious manner, marking an object would take stack space
     19037          proportional to the length of the pointer chain from some root
     19038          to that object. Rather than storing that pointer chain
     19039          implicitly on the stack (in a series of recursive calls to the
     19040          mark subroutine), the Clozure CL marker uses mixture of recursion
     19041          and a technique called <span class="emphasis"><em>link inversion</em></span> to
     19042          store the pointer chain in the objects themselves.  (Recursion
     19043          tends to be simpler and faster; if a recursive step notes that
     19044          stack space is becoming limited, the link-inversion technique
     19045          is used.)</p>
    1903019046            <p xmlns="http://www.w3.org/1999/xhtml">Certain types of objects are treated a little specially:</p>
    1903119047            <div xmlns="http://www.w3.org/1999/xhtml" class="orderedlist">
     
    1903319049                <li>
    1903419050                  <p>To support a feature called <span class="emphasis"><em>GCTWA
    19035               <sup>[<a id="id439619" href="#ftn.id439619">1</a>]</sup>
    19036               , </em></span>the vector which contains the
    19037               internal symbols of the current package is marked on
    19038               entry to the mark phase, but the symbols themselves are
    19039               not marked at this time. Near the end of the mark phase,
    19040               symbols referenced from this vector which are
    19041               not otherwise marked are marked if and only if they're
    19042               somehow distinguishable from newly created symbols (by
    19043               virtue of their having function bindings, value bindings,
    19044               plists, or other attributes.)</p>
     19051                <sup>[<a id="id418468" href="#ftn.id418468" class="footnote">1</a>]</sup>
     19052                    , </em></span>the vector that contains the internal
     19053                  symbols of the current package is marked on entry to the
     19054                  mark phase, but the symbols themselves are not marked at
     19055                  this time. Near the end of the mark phase, symbols
     19056                  referenced from this vector which are not otherwise
     19057                  marked are marked if and only if they're somehow
     19058                  distinguishable from newly created symbols (by virtue of
     19059                  their having function bindings, value bindings, plists,
     19060                  or other attributes.)</p>
    1904519061                </li>
    1904619062                <li>
    1904719063                  <p>Pools have their first element set to NIL before any
    19048           other elements are marked.</p>
     19064                  other elements are marked.</p>
    1904919065                </li>
    1905019066                <li>
    1905119067                  <p>All hash tables have certain fields (used to cache
    19052           previous results) invalidated.</p>
     19068                  previous results) invalidated.</p>
    1905319069                </li>
    1905419070                <li>
    1905519071                  <p>Weak Hash Tables and other weak objects are put on a
    19056           linkedlist as they're encountered; their contents are only
    19057           retained if there are other (non-weak) references to
    19058           them.</p>
     19072                  linkedlist as they're encountered; their contents are only
     19073                  retained if there are other (non-weak) references to
     19074                  them.</p>
    1905919075                </li>
    1906019076              </ol>
    1906119077            </div>
    1906219078            <p xmlns="http://www.w3.org/1999/xhtml">At the end of the mark phase, the markbits of all
    19063         objects which are transitively reachable from the roots are
    19064         set and all other markbits are clear.</p>
     19079          objects that are transitively reachable from the roots are
     19080          set and all other markbits are clear.</p>
    1906519081          </div>
    1906619082          <div class="sect2" lang="en" xml:lang="en">
     
    1907319089            </div>
    1907419090            <p xmlns="http://www.w3.org/1999/xhtml">The <span class="emphasis"><em>forwarding address</em></span> of a
    19075         doublenode in the dynamic heap is (&lt;its current address&gt; -
    19076         (size_of_doublenode * &lt;the number of unmarked markbits that
    19077         precede it&gt;)) or alternately (&lt;the base of the heap&gt; +
    19078         (size_of_doublenode * &lt;the number of marked markbits that
    19079         precede it &gt;)). Rather than count the number of preceding
    19080         markbits each time, the relocation table is used to precompute
    19081         an approximation of the forwarding addresses for all
    19082         doublewords. Given this approximate address and a pointer into
    19083         the markbits vector, it's relatively easy to compute the exact
    19084         forwarding address.</p>
     19091              doublenode in the dynamic heap is (&lt;its current address&gt; -
     19092              (size_of_doublenode * &lt;the number of unmarked markbits that
     19093              precede it&gt;)) or alternately (&lt;the base of the heap&gt; +
     19094              (size_of_doublenode * &lt;the number of marked markbits that
     19095              precede it &gt;)). Rather than count the number of preceding
     19096              markbits each time, the relocation table is used to precompute
     19097              an approximation of the forwarding addresses for all
     19098              doublewords. Given this approximate address and a pointer into
     19099              the markbits vector, it's relatively easy to compute the exact
     19100              forwarding address.</p>
    1908519101            <p xmlns="http://www.w3.org/1999/xhtml">The relocation table contains the forwarding addresses
    19086         of each <span class="emphasis"><em>pagelet</em></span>, where a pagelet is 256
    19087         bytes (or 32 doublenodes). The forwarding address of the first
    19088         pagelet is the base of the heap. The forwarding address of the
    19089         second pagelet is the sum of the forwarding address of the
    19090         first and 8 bytes for each mark bit set in the first 32-bit
    19091         word in the markbits table. The last entry in the relocation
    19092         table contains the forwarding address that the freepointer
    19093         would have, e.g., the new value of the freepointer after
    19094         compaction.</p>
     19102              of each <span class="emphasis"><em>pagelet</em></span>, where a pagelet is 256
     19103              bytes (or 32 doublenodes). The forwarding address of the first
     19104              pagelet is the base of the heap. The forwarding address of the
     19105              second pagelet is the sum of the forwarding address of the
     19106              first and 8 bytes for each mark bit set in the first 32-bit
     19107              word in the markbits table. The last entry in the relocation
     19108              table contains the forwarding address that the freepointer
     19109              would have, e.g., the new value of the freepointer after
     19110              compaction.</p>
    1909519111            <p xmlns="http://www.w3.org/1999/xhtml">In many programs, old objects rarely become garbage and
    19096         new objects often do. When building the relocation table, the
    19097         relocation phase notes the address of the first unmarked
    19098         object in the dynamic heap. Only the area of the heap between
    19099         the first unmarked object and the freepointer needs to be
    19100         compacted; only pointers to this area will need to be
    19101         forwarded (the forwarding address of all other pointers to the
    19102         dynamic heap is the address of that pointer.)  Often, the
    19103         first unmarked object is much nearer the free pointer than it
    19104         is to the base of the heap.</p>
     19112              new objects often do. When building the relocation table, the
     19113              relocation phase notes the address of the first unmarked
     19114              object in the dynamic heap. Only the area of the heap between
     19115              the first unmarked object and the freepointer needs to be
     19116              compacted; only pointers to this area will need to be
     19117              forwarded (the forwarding address of all other pointers to the
     19118              dynamic heap is the address of that pointer.)  Often, the
     19119              first unmarked object is much nearer the free pointer than it
     19120              is to the base of the heap.</p>
    1910519121          </div>
    1910619122          <div class="sect2" lang="en" xml:lang="en">
     
    1911319129            </div>
    1911419130            <p xmlns="http://www.w3.org/1999/xhtml">The forwarding phase traverses all roots and the "old"
    19115         part of the dynamic heap (the part between the base of the
    19116         heap and the first unmarked object.) All references to objects
    19117         whose address is between the first unmarked object and the
    19118         free pointer are updated to point to the address the object
    19119         will have after compaction by using the relocation table and
    19120         the markbits vector and interpolating.</p>
     19131          part of the dynamic heap (the part between the base of the
     19132          heap and the first unmarked object.) All references to objects
     19133          whose address is between the first unmarked object and the
     19134          free pointer are updated to point to the address the object
     19135          will have after compaction by using the relocation table and
     19136          the markbits vector and interpolating.</p>
    1912119137            <p xmlns="http://www.w3.org/1999/xhtml">The relocation table entry for the pagelet nearest the
    19122         object is found. If the pagelet's address is less than the
    19123         object's address, the number of set markbits that precede the
    19124         object on the pagelet is used to determine the object's
    19125         address; otherwise, the number of set markbits the follow the
    19126         object on the pagelet is used.</p>
     19138              object is found. If the pagelet's address is less than the
     19139              object's address, the number of set markbits that precede
     19140              the object on the pagelet is used to determine the object's
     19141              address; otherwise, the number of set markbits that follow
     19142              the object on the pagelet is used.</p>
    1912719143            <p xmlns="http://www.w3.org/1999/xhtml">Since forwarding views the heap as a set of doublewords,
    19128         locatives are (mostly) treated like any other pointers. (The
    19129         basic difference is that locatives may appear to be tagged as
    19130         fixnums, in which case they're treated as word-aligned
    19131         pointers into the object.)</p>
     19144          locatives are (mostly) treated like any other pointers. (The
     19145          basic difference is that locatives may appear to be tagged as
     19146          fixnums, in which case they're treated as word-aligned
     19147          pointers into the object.)</p>
    1913219148            <p xmlns="http://www.w3.org/1999/xhtml">If the forward phase changes the address of any hash
    19133         table key in a hash table that hashes by address (e.g., an EQ
    19134         hash table), it sets a bit in the hash table's header. The
    19135         hash table code will rehash the hash table's contents if it
    19136         tries to do a lookup on a key in such a table.</p>
     19149          table key in a hash table that hashes by address (e.g., an EQ
     19150          hash table), it sets a bit in the hash table's header. The
     19151          hash table code will rehash the hash table's contents if it
     19152          tries to do a lookup on a key in such a table.</p>
    1913719153            <p xmlns="http://www.w3.org/1999/xhtml">Profiling reveals that about half of the total time
    19138         spent in the GC is spent in the subroutine which determines a
    19139         pointer's forwarding address. Exploiting GCC-specific idioms,
    19140         hand-coding the routine, and inlining calls to it could all be
    19141         expected to improve GC performance.</p>
     19154          spent in the GC is spent in the subroutine which determines a
     19155          pointer's forwarding address. Exploiting GCC-specific idioms,
     19156          hand-coding the routine, and inlining calls to it could all be
     19157          expected to improve GC performance.</p>
    1914219158          </div>
    1914319159          <div class="sect2" lang="en" xml:lang="en">
     
    1915019166            </div>
    1915119167            <p xmlns="http://www.w3.org/1999/xhtml">The compact phase compacts the area between the first
    19152         unmarked object and the freepointer so that it contains only
    19153         marked objects.  While doing so, it forwards any pointers it
    19154         finds in the objects it copies.</p>
     19168          unmarked object and the freepointer so that it contains only
     19169          marked objects.  While doing so, it forwards any pointers it
     19170          finds in the objects it copies.</p>
    1915519171            <p xmlns="http://www.w3.org/1999/xhtml">When the compact phase is finished, so is the GC (more
    19156         or less): the free pointer and some other data structures are
    19157         updated and control returns to the exception handler that
    19158         invoked the GC. If sufficient memory has been freed to satisfy
    19159         any allocation request that may have triggered the GC, the
    19160         exception handler returns; otherwise, a "seriously low on
    19161         memory" condition is signaled, possibly after releasing a
    19162         small emergency pool of memory.</p>
    19163           </div>
    19164           <div xmlns="" class="footnotes">
     19172          or less): the free pointer and some other data structures are
     19173          updated and control returns to the exception handler that
     19174          invoked the GC. If sufficient memory has been freed to satisfy
     19175          any allocation request that may have triggered the GC, the
     19176          exception handler returns; otherwise, a "seriously low on
     19177          memory" condition is signaled, possibly after releasing a
     19178          small emergency pool of memory.</p>
     19179          </div>
     19180          <div xmlns="http://www.w3.org/1999/xhtml" class="footnotes">
    1916519181            <br />
    1916619182            <hr width="100" align="left" />
    19167             <div xmlns="http://www.w3.org/1999/xhtml" class="footnote">
    19168               <p><sup>[<a id="ftn.id439619" href="#id439619">1</a>] </sup>I believe that the acronym comes from MACLISP,
    19169                 where it stood for "Garbage Collection of Truly
    19170                 Worthless Atoms".</p>
     19183            <div class="footnote">
     19184              <p><sup>[<a id="ftn.id418468" href="#id418468" class="para">1</a>] </sup>I believe that the acronym comes from MACLISP,
     19185                            where it stood for "Garbage Collection of Truly
     19186                            Worthless Atoms".</p>
    1917119187            </div>
    1917219188          </div>
     
    1918119197          </div>
    1918219198          <p xmlns="http://www.w3.org/1999/xhtml">In the Clozure CL memory management scheme, the relative age
    19183       of two objects in the dynamic heap can be determined by their
    19184       addresses: if addresses X and Y are both addresses in the
    19185       dynamic heap, X is younger than Y (X was created more recently
    19186       than Y) if it is nearer to the free pointer (and farther from
    19187       the base of the heap) than Y.</p>
     19199        of two objects in the dynamic heap can be determined by their
     19200        addresses: if addresses X and Y are both addresses in the
     19201        dynamic heap, X is younger than Y (X was created more recently
     19202        than Y) if it is nearer to the free pointer (and farther from
     19203        the base of the heap) than Y.</p>
    1918819204          <p xmlns="http://www.w3.org/1999/xhtml">Ephemeral (or generational) garbage collectors attempt to
    19189       exploit the following assumptions:</p>
     19205        exploit the following assumptions:</p>
    1919019206          <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    1919119207            <ul type="disc">
    1919219208              <li>
    1919319209                <p>most newly created objects become garbage soon after
    19194           they'recreated.</p>
     19210                they'recreated.</p>
    1919519211              </li>
    1919619212              <li>
    1919719213                <p>most objects that have already survived several GCs
    19198           are unlikely to ever become garbage.</p>
     19214                are unlikely to ever become garbage.</p>
    1919919215              </li>
    1920019216              <li>
    1920119217                <p>old objects can only point to newer objects as the
    19202           result of a destructive modification (e.g., via
    19203           SETF.)</p>
     19218                result of a destructive modification (e.g., via
     19219                SETF.)</p>
    1920419220              </li>
    1920519221            </ul>
    1920619222          </div>
    1920719223          <p xmlns="http://www.w3.org/1999/xhtml">By concentrating its efforts on (frequently and quickly)
    19208       reclaiming newly created garbage, an ephemeral collector hopes
    19209       to postpone the more costly full GC as long as possible. It's
    19210       important to note that most programs create some long-lived
    19211       garbage, so an EGC can't typically eliminate the need for full
    19212       GC.</p>
     19224        reclaiming newly created garbage, an ephemeral collector hopes
     19225        to postpone the more costly full GC as long as possible. It's
     19226        important to note that most programs create some long-lived
     19227        garbage, so an EGC can't typically eliminate the need for full
     19228        GC.</p>
    1921319229          <p xmlns="http://www.w3.org/1999/xhtml">An EGC views each object in the heap as belonging to
    19214       exactly one <span class="emphasis"><em>generation</em></span>; generations are
    19215       sets of objects that are related to each other by age: some
    19216       generation is the youngest, some the oldest, and there's an age
    19217       relationship between any intervening generations. Objects are
    19218       typically assigned to the youngest generation when first
    19219       allocated; any object that has survived some number of GCs in
    19220       its current generation is promoted (or
    19221       <span class="emphasis"><em>tenured</em></span>) into an older generation.</p>
     19230        exactly one <span class="emphasis"><em>generation</em></span>; generations are
     19231        sets of objects that are related to each other by age: some
     19232        generation is the youngest, some the oldest, and there's an age
     19233        relationship between any intervening generations. Objects are
     19234        typically assigned to the youngest generation when first
     19235        allocated; any object that has survived some number of GCs in
     19236        its current generation is promoted (or
     19237        <span class="emphasis"><em>tenured</em></span>) into an older generation.</p>
    1922219238          <p xmlns="http://www.w3.org/1999/xhtml">When a generation is GCed, the roots consist of the
    19223       stacks, registers, and global variables as always and also of
    19224       any pointers to objects in that generation from other
    19225       generations. To avoid the need to scan those (often large) other
    19226       generations looking for such intergenerational references, the
    19227       runtime system must note all such intergenerational references
    19228       at the point where they're created (via Setf).<sup>[<a id="id528852" href="#ftn.id528852">2</a>]</sup> The
    19229       set of pointers that may contain intergenerational references is
    19230       sometimes called <span class="emphasis"><em>the remembered set</em></span>.</p>
     19239        stacks, registers, and global variables as always and also of
     19240        any pointers to objects in that generation from other
     19241        generations. To avoid the need to scan those (often large) other
     19242        generations looking for such intergenerational references, the
     19243        runtime system must note all such intergenerational references
     19244        at the point where they're created (via Setf).<sup>[<a id="id418704" href="#ftn.id418704" class="footnote">2</a>]</sup> The
     19245        set of pointers that may contain intergenerational references is
     19246        sometimes called <span class="emphasis"><em>the remembered set</em></span>.</p>
    1923119247          <p xmlns="http://www.w3.org/1999/xhtml">In Clozure CL's EGC, the heap is organized exactly the same
    19232       as otherwise; "generations" are merely structures which contain
    19233       pointers to regions of the heap (which is already ordered by
    19234       age.) When a generation needs to be GCed, any younger generation
    19235       is incorporated into it; all objects which survive a GC of a
    19236       given generation are promoted into the next older
    19237       generation. The only intergenerational references that can exist
    19238       are therefore those where an old object is modified to contain a
    19239       pointer to a new object.</p>
     19248        as otherwise; "generations" are merely structures which contain
     19249        pointers to regions of the heap (which is already ordered by
     19250        age.) When a generation needs to be GCed, any younger generation
     19251        is incorporated into it; all objects which survive a GC of a
     19252        given generation are promoted into the next older
     19253        generation. The only intergenerational references that can exist
     19254        are therefore those where an old object is modified to contain a
     19255        pointer to a new object.</p>
    1924019256          <p xmlns="http://www.w3.org/1999/xhtml">The EGC uses exactly the same code as the full GC. When a
    19241       given GC is "ephemeral",</p>
     19257        given GC is "ephemeral",</p>
    1924219258          <div xmlns="http://www.w3.org/1999/xhtml" class="itemizedlist">
    1924319259            <ul type="disc">
    1924419260              <li>
    1924519261                <p>the "base of the heap" used to determine an object's
    19246           markbit address is the base of the generation
    19247           being collected;</p>
     19262                markbit address is the base of the generation
     19263                being collected;</p>
    1924819264              </li>
    1924919265              <li>
    1925019266                <p>the markbits vector is actually a pointer into the
    19251           middle of the global markbits table; preceding entries in
    19252           this table are used to note doubleword addresses in older
    19253           generations that (may) contain intergenerational
    19254           references;</p>
     19267                middle of the global markbits table; preceding entries in
     19268                this table are used to note doubleword addresses in older
     19269                generations that (may) contain intergenerational
     19270                references;</p>
    1925519271              </li>
    1925619272              <li>
    1925719273                <p>some steps (notably GCTWA and the handling of weak
    19258           objects) are not performed;</p>
     19274                objects) are not performed;</p>
    1925919275              </li>
    1926019276              <li>
    1926119277                <p>the intergenerational references table is used to
    19262           find additional roots for the mark and forward phases. If a
    19263           bit is set inthe intergenerational references table, that
    19264           means that the corresponding doubleword (in some "old"
    19265           generation, in some "earlier" part of the heap) may have had
    19266           a pointer to an object in a younger generation stored into
    19267           it.</p>
     19278                find additional roots for the mark and forward phases. If a
     19279                bit is set in the intergenerational references table, that
     19280                means that the corresponding doubleword (in some "old"
     19281                generation, in some "earlier" part of the heap) may have had
     19282                a pointer to an object in a younger generation stored into
     19283                it.</p>
    1926819284              </li>
    1926919285            </ul>
    1927019286          </div>
    1927119287          <p xmlns="http://www.w3.org/1999/xhtml">With one exception (the implicit setfs that occur on entry
    19272       to and exit from the binding of a special variable), all setfs
    19273       that might introduce an intergenerational reference must be
    19274       memoized.@footnote{Note that the implicit setfs that occur when
    19275       initializing an object - as in the case of a call to cons or
    19276       vector - can't introduce intergenerational references, since the
    19277       newly created object is always younger than the objects used to
    19278       initialize it.} It's always safe to push any cons cell or
    19279       gvector locative onto the memo stack; it's never safe to push
    19280       anything else.
     19288        to and exit from the binding of a special variable), all setfs
     19289        that might introduce an intergenerational reference must be
     19290        memoized.
     19291        <sup>[<a id="id418773" href="#ftn.id418773" class="footnote">3</a>]</sup> It's always safe to
     19292        push any cons cell or gvector locative onto the memo stack;
     19293        it's never safe to push anything else.
    1928119294      </p>
    1928219295          <p xmlns="http://www.w3.org/1999/xhtml">Typically, the intergenerational references bitvector is
    19283       sparse: a relatively small number of old locations are stored
    19284       into, although some of them may have been stored into many
    19285       times. The routine that scans the memoization buffer does a lot
    19286       of work and usually does it fairly often; it uses a simple,
    19287       brute-force method but might run faster if it was smarter about
    19288       recognizing addresses that it'd already seen.
     19296        sparse: a relatively small number of old locations are stored
     19297        into, although some of them may have been stored into many
     19298        times. The routine that scans the memoization buffer does a lot
     19299        of work and usually does it fairly often; it uses a simple,
     19300        brute-force method but might run faster if it was smarter about
     19301        recognizing addresses that it'd already seen.
    1928919302      </p>
    1929019303          <p xmlns="http://www.w3.org/1999/xhtml">When the EGC mark and forward phases scan the
    19291       intergenerational reference bits, they can clear any bits that
    19292       denote doublewords that definitely do not contain
    19293       intergenerational references.
     19304        intergenerational reference bits, they can clear any bits that
     19305        denote doublewords that definitely do not contain
     19306        intergenerational references.
    1929419307      </p>
    19295           <div xmlns="" class="footnotes">
     19308          <div xmlns="http://www.w3.org/1999/xhtml" class="footnotes">
    1929619309            <br />
    1929719310            <hr width="100" align="left" />
    19298             <div xmlns="http://www.w3.org/1999/xhtml" class="footnote">
    19299               <p><sup>[<a id="ftn.id528852" href="#id528852">2</a>] </sup>This is
    19300       sometimes called "The Write Barrier": all assignments which
    19301       might result in intergenerational references must be noted, as
    19302       if the other generations were write-protected.</p>
     19311            <div class="footnote">
     19312              <p><sup>[<a id="ftn.id418704" href="#id418704" class="para">2</a>] </sup>This is
     19313            sometimes called "The Write Barrier": all assignments which
     19314            might result in intergenerational references must be noted, as
     19315            if the other generations were write-protected.</p>
     19316            </div>
     19317            <div class="footnote">
     19318              <p><sup>[<a id="ftn.id418773" href="#id418773" class="para">3</a>] </sup>Note that the implicit setfs that occur when
     19319        initializing an object - as in the case of a call to cons or
     19320        vector - can't introduce intergenerational references, since
     19321        the newly created object is always younger than the objects
     19322        used to initialize it.</p>
    1930319323            </div>
    1930419324          </div>
     
    1931319333          </div>
    1931419334          <p xmlns="http://www.w3.org/1999/xhtml">Saving and loading of Fasl files is implemented in
    19315       xdump/faslenv.lisp, level-0/nfasload.lisp, and lib/nfcomp.lisp.
    19316       The information here is only an overview, which might help when
    19317       reading the source.</p>
     19335        xdump/faslenv.lisp, level-0/nfasload.lisp, and lib/nfcomp.lisp.
     19336        The information here is only an overview, which might help when
     19337        reading the source.</p>
    1931819338          <p xmlns="http://www.w3.org/1999/xhtml">The Clozure CL Fasl format is forked from the old MCL Fasl
    19319       format; there are a few differences, but they are minor.  The
    19320       name "nfasload" comes from the fact that this is the so-called
    19321       "new" Fasl system, which was true in 1986 or so.  </p>
     19339        format; there are a few differences, but they are minor.  The
     19340        name "nfasload" comes from the fact that this is the so-called
     19341        "new" Fasl system, which was true in 1986 or so.  </p>
    1932219342          <p xmlns="http://www.w3.org/1999/xhtml">A Fasl file begins with a "file header", which contains
    19323       version information and a count of the following "blocks".
    19324       There's typically only one "block" per Fasl file.  The blocks
    19325       are part of a mechanism for combining multiple logical files
    19326       into a single physical file, in order to simplify the
    19327       distribution of precompiled programs. </p>
     19343        version information and a count of the following "blocks".
     19344        There's typically only one "block" per Fasl file.  The blocks
     19345        are part of a mechanism for combining multiple logical files
     19346        into a single physical file, in order to simplify the
     19347        distribution of precompiled programs. </p>
    1932819348          <p xmlns="http://www.w3.org/1999/xhtml">Each block begins with a header for itself, which just
    19329       describes the size of the data that follows.</p>
     19349        describes the size of the data that follows.</p>
    1933019350          <p xmlns="http://www.w3.org/1999/xhtml">The data in each block is treated as a simple stream of
    19331       bytes, which define a bytecode program.  The actual bytecodes,
    19332       "fasl operators", are defined in xdump/faslenv.lisp.  The
    19333       descriptions in the source file are terse, but, according to
    19334       Gary, "probably accurate".</p>
     19351        bytes, which define a bytecode program.  The actual bytecodes,
     19352        "fasl operators", are defined in xdump/faslenv.lisp.  The
     19353        descriptions in the source file are terse, but, according to
     19354        Gary, "probably accurate".</p>
    1933519355          <p xmlns="http://www.w3.org/1999/xhtml">Some of the operators are used to create a per-block
    19336       "object table", which is a vector used to keep track of
    19337       previously-loaded objects and simplify references to them.  When
    19338       the table is created, an index associated with it is set to
    19339       zero; this is analogous to an array fill-pointer, and allows the
    19340       table to be treated like a stack.</p>
     19356        "object table", which is a vector used to keep track of
     19357        previously-loaded objects and simplify references to them.  When
     19358        the table is created, an index associated with it is set to
     19359        zero; this is analogous to an array fill-pointer, and allows the
     19360        table to be treated like a stack.</p>
    1934119361          <p xmlns="http://www.w3.org/1999/xhtml">The low seven bits of each bytecode are used to specify
    19342       the fasl operator; currently, about fifty operators are defined.
    19343       The high byte, when set, indicates that the result of the
    19344       operation should be pushed onto the object table.</p>
     19362        the fasl operator; currently, about fifty operators are defined.
     19363        The high byte, when set, indicates that the result of the
     19364        operation should be pushed onto the object table.</p>
    1934519365          <p xmlns="http://www.w3.org/1999/xhtml">Most bytecodes are followed by operands; the operand data
    19346       is byte-aligned.  How many operands there are, and their type,
    19347       depend on the bytecode.  Operands can be indices into the object
    19348       table, immediate values, or some combination of these.</p>
     19366        is byte-aligned.  How many operands there are, and their type,
     19367        depend on the bytecode.  Operands can be indices into the object
     19368        table, immediate values, or some combination of these.</p>
    1934919369          <p xmlns="http://www.w3.org/1999/xhtml">An exception is the bytecode #xFF, which has the symbolic
    19350       name ccl::$faslend; it is used to mark the end of the
    19351       block.</p>
     19370        name ccl::$faslend; it is used to mark the end of the
     19371        block.</p>
    1935219372        </div>
    1935319373        <div class="sect1" lang="en" xml:lang="en">
     
    1936819388            </div>
    1936919389            <p xmlns="http://www.w3.org/1999/xhtml">In most cases, pointers to instances of Objective-C
    19370         classes are recognized as such; the recognition is (and
    19371         probably always will be) slightly heuristic. Basically, any
    19372         pointer that passes basic sanity checks and whose first word
    19373         is a pointer to a known ObjC class is considered to be an
    19374         instance of that class; the Objective-C runtime system would
    19375         reach the same conclusion.</p>
     19390          classes are recognized as such; the recognition is (and
     19391          probably always will be) slightly heuristic. Basically, any
     19392          pointer that passes basic sanity checks and whose first word
     19393          is a pointer to a known ObjC class is considered to be an
     19394          instance of that class; the Objective-C runtime system would
     19395          reach the same conclusion.</p>
    1937619396            <p xmlns="http://www.w3.org/1999/xhtml">It's certainly possible that a random pointer to an
    19377         arbitrary memory address could look enough like an ObjC
    19378         instance to fool the lisp runtime system, and it's possible
    19379         that pointers could have their contents change so that
    19380         something that had either been a true ObjC instance (or had
    19381         looked a lot like one) is changed (possibly by virtue of
    19382         having been deallocated.)</p>
     19397          arbitrary memory address could look enough like an ObjC
     19398          instance to fool the lisp runtime system, and it's possible
     19399          that pointers could have their contents change so that
     19400          something that had either been a true ObjC instance (or had
     19401          looked a lot like one) is changed (possibly by virtue of
     19402          having been deallocated.)</p>
    1938319403            <p xmlns="http://www.w3.org/1999/xhtml">In the first case, we can improve the heuristics
    19384         substantially: we can make stronger assertions that a
    19385         particular pointer is really "of type :ID" when it's a
    19386         parameter to a function declared to take such a pointer as an
    19387         argument or a similarly declared function result; we can be
    19388         more confident of something we obtained via SLOT-VALUE of a
    19389         slot defined to be of type :ID than if we just dug a pointer
    19390         out of memory somewhere.</p>
     19404          substantially: we can make stronger assertions that a
     19405          particular pointer is really "of type :ID" when it's a
     19406          parameter to a function declared to take such a pointer as an
     19407          argument or a similarly declared function result; we can be
     19408          more confident of something we obtained via SLOT-VALUE of a
     19409          slot defined to be of type :ID than if we just dug a pointer
     19410          out of memory somewhere.</p>
    1939119411            <p xmlns="http://www.w3.org/1999/xhtml">The second case is a little more subtle: ObjC memory
    19392         management is based on a reference-counting scheme, and it's
    19393         possible for an object to ... cease to be an object while lisp
    19394         is still referencing it.  If we don't want to deal with this
    19395         possibility (and we don't), we'll basically have to ensure
    19396         that the object is not deallocated while lisp is still
    19397         thinking of it as a first-class object. There's some support
    19398         for this in the case of objects created with MAKE-INSTANCE,
    19399         but we may need to give similar treatment to foreign objects
    19400         that are introduced to the lisp runtime in other ways (as
    19401         function arguments, return values, SLOT-VALUE results, etc. as
    19402         well as those instances that are created under lisp
    19403         control.)</p>
     19412          management is based on a reference-counting scheme, and it's
     19413          possible for an object to ... cease to be an object while lisp
     19414          is still referencing it.  If we don't want to deal with this
     19415          possibility (and we don't), we'll basically have to ensure
     19416          that the object is not deallocated while lisp is still
     19417          thinking of it as a first-class object. There's some support
     19418          for this in the case of objects created with MAKE-INSTANCE,
     19419          but we may need to give similar treatment to foreign objects
     19420          that are introduced to the lisp runtime in other ways (as
     19421          function arguments, return values, SLOT-VALUE results, etc. as
     19422          well as those instances that are created under lisp
     19423          control.)</p>
    1940419424            <p xmlns="http://www.w3.org/1999/xhtml">This doesn't all work yet (in fact, not much of it works
    19405         yet); in practice, this has not yet been as much of a problem
    19406         as anticipated, but that may be because existing Cocoa code
    19407         deals primarily with relatively long-lived objects such as
    19408         windows, views, menus, etc.</p>
     19425          yet); in practice, this has not yet been as much of a problem
     19426          as anticipated, but that may be because existing Cocoa code
     19427          deals primarily with relatively long-lived objects such as
     19428          windows, views, menus, etc.</p>
    1940919429          </div>
    1941019430          <div class="sect2" lang="en" xml:lang="en">
     
    1941219432              <div>
    1941319433                <div>
    19414                   <h3 class="title"><a id="id529071"></a>16.7.2. Recommended Reading</h3>
     19434                  <h3 class="title"><a id="id418917"></a>16.7.2. Recommended Reading</h3>
    1941519435                </div>
    1941619436              </div>
     
    1942019440                <dt>
    1942119441                  <span class="term">
    19422               <a href="http://developer.apple.com/documentation/Cocoa/" target="_top">Cocoa Documentation</a>
    19423             </span>
     19442                  <a class="ulink" href="http://developer.apple.com/documentation/Cocoa/" target="_top">Cocoa Documentation</a>
     19443                </span>
    1942419444                </dt>
    1942519445                <dd>
    1942619446                  <p>
    19427                This is the top page for all of Apple's documentation on
    19428                Cocoa.  If you are unfamiliar with Cocoa, it is a good
    19429                place to start.
    19430              </p>
     19447                    This is the top page for all of Apple's documentation on
     19448                    Cocoa.  If you are unfamiliar with Cocoa, it is a good
     19449                    place to start.
     19450                  </p>
    1943119451                </dd>
    1943219452                <dt>
    1943319453                  <span class="term">
    19434             <a href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html" target="_top">Foundation Reference for Objective-C</a>
    19435           </span>
     19454                  <a class="ulink" href="http://developer.apple.com/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html" target="_top">Foundation Reference for Objective-C</a>
     19455                </span>
    1943619456                </dt>
    1943719457                <dd>
    1943819458                  <p>
    19439               This is one of the two most important Cocoa references; it
    19440               covers all of the basics, except for GUI programming.  This is
    19441               a reference, not a tutorial.
    19442             </p>
     19459                    This is one of the two most important Cocoa references; it
     19460                    covers all of the basics, except for GUI programming.  This is
     19461                    a reference, not a tutorial.
     19462                  </p>
    1944319463                </dd>
    1944419464              </dl>
     
    1951819538            </div>
    1951919539          </div>
    19520           <p xmlns="http://www.w3.org/1999/xhtml">As it's distributed, Clozure CL starts up with *PACKAGE* set
    19521       to the CL-USER package and with most predefined functions and
     19540          <p xmlns="http://www.w3.org/1999/xhtml">As it's distributed, Clozure CL starts up with *PACKAGE* set to
     19541      the CL-USER package and with most predefined functions and
    1952219542      methods protected against accidental redefinition.  The package
    19523       setting is of course a requirement of ANSI CL, while the
    19524       protection protection is intended to catch certain types of
    19525       programming errors (accidentally redefining a CL or CCL
    19526       function) before those errors have a chance to do much
    19527       damage.</p>
    19528           <p xmlns="http://www.w3.org/1999/xhtml">These settings may make using Clozure CL to develop Clozure CL a
    19529       bit more awkward, since much of that process assumes that the
    19530       CCL package is current (and a primary purpose of that process is
    19531       to redefine some "predefined, builtin functions".) The standard,
    19532       "routine" ways of building Clozure CL from sources (see ) -
    19533       COMPILE-CCL, XCOMPILE-CCL, and XLOAD-LEVEL-0 - bind *PACKAGE* to
    19534       the "CCL" package and enable the redefinition of predefined
    19535       functions; the symbols COMPILE-CCL, XCOMPILE-CCL, and
     19543      setting is of course a requirement of ANSI CL, and the
     19544      protection of predifined functions and methods is intended to
     19545      catch certain types of programming errors (accidentally
     19546      redefining a CL or CCL function) before those errors have a
     19547      chance to do much damage.</p>
     19548          <p xmlns="http://www.w3.org/1999/xhtml">These settings may make using Clozure CL to develop Clozure CL a bit
     19549      awkward, because much of that process assumes you are working in
     19550      the CCL package is current, and a primary purpose of Clozure CL
     19551      development is to redefine some predefined, builtin functions.
     19552      The standard, "routine" ways of building Clozure CL from sources (see
     19553      ) - COMPILE-CCL, XCOMPILE-CCL, and XLOAD-LEVEL-0 - bind
     19554      *PACKAGE* to the "CCL" package and enable the redefinition of
     19555      predefined functions; the symbols COMPILE-CCL, XCOMPILE-CCL, and
    1953619556      XLOAD-LEVEL-0 are additionally now exported from the "CCL"
    1953719557      package.</p>
    1953819558          <p xmlns="http://www.w3.org/1999/xhtml">Some other (more ad-hoc) ways of doing development on
    19539       Clozure CL - compiling and/or loading individual files,
    19540       incrementally redefining individual functions - may be awkward
    19541       unless one reverts to the mode of operation which was
    19542       traditionally offered in Clozure CL. (Some Clozure CL source files -
     19559      Clozure CL—compiling and/or loading individual files,
     19560      incrementally redefining individual functions—may be
     19561      awkward unless one reverts to the mode of operation which was
     19562      traditionally offered in Clozure CL. Some Clozure CL source files -
    1954319563      especially those that comprise the bootstrapping image sources
    1954419564      and the first few files in the "cold load" sequence - are
    1954519565      compiled and loaded in the "CCL" package but don't contain
    1954619566      (IN-PACKAGE "CCL") forms, since IN-PACKAGE doesn't work until
    19547       later in the cold load sequence.)</p>
     19567      later in the cold load sequence.</p>
    1954819568          <p xmlns="http://www.w3.org/1999/xhtml">The somewhat bizarre behavior of both SET-USER-ENVIRONMENT
    1954919569      and SET-DEVELOPMENT-ENVIRONMENT with respect to the special
     
    1958719607Unhandled exception 11 at 0x300e90c8, context-&gt;regs at #x7ffff6b8
    1958819608Continue/Debugger/eXit &lt;enter&gt;?
    19589 </pre>
     19609    </pre>
    1959019610          <p xmlns="http://www.w3.org/1999/xhtml">As you may have noticed, it's not a perfect world; it's rare
    19591         that the cause (attempting to reference the CDR of -1, and therefore
    19592         accessing unmapped memory near location 0) of this effect (an
    19593         "Unhandled exception ..." message) is so obvious.</p>
     19611      that the cause (attempting to reference the CDR of -1, and therefore
     19612      accessing unmapped memory near location 0) of this effect (an
     19613      "Unhandled exception ..." message) is so obvious.</p>
    1959419614          <p xmlns="http://www.w3.org/1999/xhtml">The addresses printed in the message above aren't very useful
    19595         unless you're debugging the kernel with GDB (and they're often
    19596         very useful if you are.)</p>
     19615      unless you're debugging the kernel with GDB (and they're often
     19616      very useful if you are.)</p>
    1959719617          <p xmlns="http://www.w3.org/1999/xhtml">Aside from causing an exception that the lisp kernel doesn't
    19598         know how to handle, one can also enter the kernel debugger (more)
    19599         deliberately:</p>
     19618      know how to handle, one can also enter the kernel debugger (more)
     19619      deliberately:</p>
    1960019620          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1960119621? (defun classify (n)
    19602      (cond ((&gt; n 0) "Greater")
    19603            ((&lt; n 0) "Less")
    19604            (t
    19605             ;;; Sheesh ! What else could it be ?
    19606             (ccl::bug "I give up. How could this happen ?"))))
     19622    (cond ((&gt; n 0) "Greater")
     19623          ((&lt; n 0) "Less")
     19624          (t
     19625           ;; Sheesh ! What else could it be ?
     19626           (ccl::bug "I give up. How could this happen ?"))))
    1960719627CLASSIFY
    1960819628
     
    1961219632? for help
    1961319633[12345] Clozure CL kernel debugger:
    19614       </pre>
     19634    </pre>
    1961519635          <p xmlns="http://www.w3.org/1999/xhtml">CCL::BUG isn't quite the right tool for this example (a
    19616         call to BREAK or PRINT might do a better job of clearing up the
    19617         mystery), but it's sometimes helpful when those other tools
    19618         can't be used.  The lisp error system notices, for instance, if
    19619         attempts to signal errors themselves cause errors to be
    19620         signaled; this sort of thing can happen if CLOS or the I/O
    19621         system are broken or missing. After some small number of
    19622         recursive errors, the error system gives up and calls
    19623         CCL::BUG.</p>
     19636      call to BREAK or PRINT might do a better job of clearing up the
     19637      mystery), but it's sometimes helpful when those other tools
     19638      can't be used.  The lisp error system notices, for instance, if
     19639      attempts to signal errors themselves cause errors to be
     19640      signaled; this sort of thing can happen if CLOS or the I/O
     19641      system are broken or missing. After some small number of
     19642      recursive errors, the error system gives up and calls
     19643      CCL::BUG.</p>
    1962419644          <p xmlns="http://www.w3.org/1999/xhtml">If one enters a '?' at the kernel debugger prompt, one
    19625         will see output like:</p>
     19645      will see output like:</p>
    1962619646          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1962719647(S)  Find and describe symbol matching specified name
     
    1963019650(K)  Kill Clozure CL process
    1963119651(?)  Show this help
    19632       </pre>
     19652    </pre>
    1963319653          <p xmlns="http://www.w3.org/1999/xhtml">CCL::BUG just does an FF-CALL into the lisp kernel.  If
    19634         the kernel debugger was invoked because of an unhandled
    19635         exception (such as an illegal memory reference) the OS kernel
    19636         saves the machine state ("context") in a data structure for us,
    19637         and in that case some additional options can be used to display
    19638         the contents of the registers at the point of the
    19639         exception. Another function - CCL::DBG - causes a special
    19640         exception to be generated and enters the lisp kernel debugger
    19641         with a non-null "context":</p>
     19654      the kernel debugger was invoked because of an unhandled
     19655      exception (such as an illegal memory reference) the OS kernel
     19656      saves the machine state ("context") in a data structure for us,
     19657      and in that case some additional options can be used to display
     19658      the contents of the registers at the point of the
     19659      exception. Another function—CCL::DBG—causes a special
     19660      exception to be generated and enters the lisp kernel debugger
     19661      with a non-null "context":</p>
    1964219662          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1964319663? (defun classify2 (n)
    19644   (cond ((&gt; n 0) "Greater")
    19645         ((&lt; n 0) "Less")
    19646         (t (dbg n))))
     19664    (cond ((&gt; n 0) "Greater")
     19665          ((&lt; n 0) "Less")
     19666          (t (dbg n))))
    1964719667CLASSIFY2
    1964819668
    1964919669? (classify2 0)
    1965019670Lisp Breakpoint
    19651  While executing: #&lt;Function CLASSIFY2 #x08476cfe&gt;
     19671While executing: #&lt;Function CLASSIFY2 #x08476cfe&gt;
    1965219672? for help
    1965319673[12345] Clozure CL kernel debugger: ?
     
    1966419684(K)  Kill Clozure CL process
    1966519685(?)  Show this help
    19666 </pre>
     19686    </pre>
    1966719687          <p xmlns="http://www.w3.org/1999/xhtml">CCL::DBG takes an argument, whose value is copied into the register
    19668         that Clozure CL uses to return a function's primary value (arg_z, which
    19669         is r23 on the PowerPC). If we were to choose the (L) option at this point,
    19670         we'd see a dislay like:</p>
     19688      that Clozure CL uses to return a function's primary value (arg_z, which
     19689      is r23 on the PowerPC). If we were to choose the (L) option at this point,
     19690      we'd see a dislay like:</p>
    1967119691          <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1967219692rnil = 0x01836015
     
    1968819708r25 (save6) = ()
    1968919709r24 (save7) = ()
    19690       </pre>
     19710    </pre>
    1969119711          <p xmlns="http://www.w3.org/1999/xhtml">From this we can conclude that the problematic argument to CLASSIFY2
    19692         was 0 (see r23/arg_z), and that I need to work on a better example.</p>
     19712      was 0 (see r23/arg_z), and that I need to work on a better example.</p>
    1969319713          <p xmlns="http://www.w3.org/1999/xhtml">The R option shows the values of the ALU (and PPC branch unit)
    19694         registers in hex; the F option shows the values of the FPU registers.</p>
     19714      registers in hex; the F option shows the values of the FPU registers.</p>
    1969519715          <p xmlns="http://www.w3.org/1999/xhtml">The (B) option shows a raw stack backtrace; it'll try to
    19696         identify foreign functions as well as lisp functions. (Foreign function
    19697         names are guesses based on the nearest preceding exported symbol.)</p>
     19716      identify foreign functions as well as lisp functions. (Foreign function
     19717      names are guesses based on the nearest preceding exported symbol.)</p>
    1969819718          <p xmlns="http://www.w3.org/1999/xhtml">If you ever unexpectedly find yourself in the "lisp kernel
    19699         debugger", the output of the (L) and (B) options are often the most
    19700         helpful things to include in a bug report.</p>
     19719      debugger", the output of the (L) and (B) options are often the most
     19720      helpful things to include in a bug report.</p>
    1970119721        </div>
    1970219722        <div class="sect1" lang="en" xml:lang="en">
     
    1971719737            </div>
    1971819738            <p xmlns="http://www.w3.org/1999/xhtml">It's now possible to use AltiVec instructions in PPC LAP
    19719       (assembler) functions.</p>
     19739        (assembler) functions.</p>
    1972019740            <p xmlns="http://www.w3.org/1999/xhtml">The lisp kernel detects the presence or absence of
    19721       AltiVec and preserves AltiVec state on lisp thread switch and
    19722       in response to exceptions, but the implementation doesn't
    19723       otherwise use vector operations.</p>
     19741        AltiVec and preserves AltiVec state on lisp thread switch and
     19742        in response to exceptions, but the implementation doesn't
     19743        otherwise use vector operations.</p>
    1972419744            <p xmlns="http://www.w3.org/1999/xhtml">This document doesn't document PPC LAP programming in
    19725       general.  Ideally, there would be some document that
    19726       did.</p>
     19745        general.  Ideally, there would be some document that
     19746        did.</p>
    1972719747            <p xmlns="http://www.w3.org/1999/xhtml">This document does explain AltiVec register-usage
    19728       conventions in Clozure CL and explains the use of some lap macros
    19729       that help to enforce those conventions.</p>
     19748        conventions in Clozure CL and explains the use of some lap macros
     19749        that help to enforce those conventions.</p>
    1973019750            <p xmlns="http://www.w3.org/1999/xhtml">All of the global symbols described below are exported
    19731       from the CCL package. Note that lap macro names, ppc
    19732       instruction names, and (in most cases) register names are
    19733       treated as strings, so this only applies to functions and
    19734       global variable names.</p>
     19751        from the CCL package. Note that lap macro names, ppc
     19752        instruction names, and (in most cases) register names are
     19753        treated as strings, so this only applies to functions and
     19754        global variable names.</p>
    1973519755            <p xmlns="http://www.w3.org/1999/xhtml">Much of the Clozure CL support for AltiVec LAP programming
    19736       is based on work contributed to MCL by Shannon Spires.</p>
     19756        is based on work contributed to MCL by Shannon Spires.</p>
    1973719757          </div>
    1973819758          <div class="sect2" lang="en" xml:lang="en">
     
    1974519765            </div>
    1974619766            <p xmlns="http://www.w3.org/1999/xhtml">Clozure CL LAP functions that use AltiVec instructions must
    19747       interoperate with each other and with C functions; that
    19748       suggests that they follow C AltiVec register usage
    19749       conventions. (vr0-vr1 scratch, vr2-vr13 parameters/return
    19750       value, vr14-vr19 temporaries, vr20-vr31 callee-save
    19751       non-volatile registers.)</p>
     19767        interoperate with each other and with C functions; that fact
     19768        suggests that they follow C AltiVec register usage
     19769        conventions. (vr0-vr1 scratch, vr2-vr13 parameters/return
     19770        value, vr14-vr19 temporaries, vr20-vr31 callee-save
     19771        non-volatile registers.)</p>
    1975219772            <p xmlns="http://www.w3.org/1999/xhtml">The EABI (Embedded Application Binary Interface) used in
    19753       LinuxPPC doesn't ascribe particular significance to the vrsave
    19754       special-purpose register; on other platforms (notably MacOS),
    19755       it's used as a bitmap which indicates to system-level code
    19756       which vector registers contain meaningful values.</p>
    19757             <p xmlns="http://www.w3.org/1999/xhtml">The WITH-ALTIVEC-REGISTERS lapmacro generates code which
    19758       which saves, updates, and restores VRSAVE on platforms where
    19759       this is required (as indicated by the value of the special
    19760       variable which controls this) and ignores VRSAVE on platforms
    19761       that don't require it to be maintained.</p>
     19773        LinuxPPC doesn't ascribe particular significance to the vrsave
     19774        special-purpose register; on other platforms (notably MacOS),
     19775        it's used as a bitmap which indicates to system-level code
     19776        which vector registers contain meaningful values.</p>
     19777            <p xmlns="http://www.w3.org/1999/xhtml">The WITH-ALTIVEC-REGISTERS lap macro generates code that
     19778        saves, updates, and restores VRSAVE on platforms where this is
     19779        required (as indicated by the value of the special variable
     19780        that controls this behavior) and ignores VRSAVE on platforms
     19781        that don't require it to be maintained.</p>
    1976219782            <p xmlns="http://www.w3.org/1999/xhtml">On all PPC platforms, it's necessary to save any non-volatile
    19763       vector registers (vr20 .. vr31) before assigning to them and to restore
    19764       such registers before returning to the caller.</p>
    19765             <p xmlns="http://www.w3.org/1999/xhtml">On platforms that require that VRSAVE be maintained, it's not
    19766       necessary to mention the "use" of vector registers that are
    19767       used as incoming parameters. It's not incorrect to mention their use
    19768       in a WITH-ALTIVEC-REGISTERS form, but it may be unnecessary in many
    19769       interesting cases. One can likewise assume that the caller of any function
    19770       that returns a vector value (in vr2 has already set the appropriate bit in
    19771       VRSAVE to indicate that this register is live. One could therefore write a
    19772       leaf function that added the bytes in vr3 and vr2 and returned the result
    19773       in vr2 as:</p>
     19783        vector registers (vr20 .. vr31) before assigning to them and to restore
     19784        such registers before returning to the caller.</p>
     19785            <p xmlns="http://www.w3.org/1999/xhtml">On platforms that require that VRSAVE be maintained, it's
     19786        not necessary to mention the "use" of vector registers that
     19787        are used as incoming parameters. It's not incorrect to mention
     19788        their use in a WITH-ALTIVEC-REGISTERS form, but it may be
     19789        unnecessary in many interesting cases. One can likewise assume
     19790        that the caller of any function that returns a vector value in
     19791        vr2 has already set the appropriate bit in VRSAVE to indicate
     19792        that this register is live. One could therefore write a leaf
     19793        function that added the bytes in vr3 and vr2 and returned the
     19794        result in vr2 as:</p>
    1977419795            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1977519796(defppclapfunction vaddubs ((y vr3) (z vr2))
    1977619797  (vaddubs z y z)
    1977719798  (blr))
    19778 </pre>
     19799      </pre>
    1977919800            <p xmlns="http://www.w3.org/1999/xhtml">When vector registers that aren't incoming parameters are used
    19780           in a LAP function, WITH-ALTIVEC-REGISTERS takes care of maintaining VRSAVE
    19781           and of saving/restoring any non-volatile vector registers:</p>
     19801        in a LAP function, WITH-ALTIVEC-REGISTERS takes care of maintaining VRSAVE
     19802        and of saving/restoring any non-volatile vector registers:</p>
    1978219803            <pre xmlns="http://www.w3.org/1999/xhtml" class="programlisting">
    1978319804(defppclapfunction load-array ((n arg_z))
     
    1978519806  (with-altivec-registers (vr1 vr2 vr3 vr27) ; Clobbers imm0
    1978619807    (li imm0 arch::misc-data-offset)
    19787     (lvx vr1 arg_z imm0) ; load MSQ
    19788     (lvsl vr27 arg_z imm0) ; set the permute vector
    19789     (addi imm0 imm0 16) ; address of LSQ
    19790     (lvx vr2 arg_z imm0) ; load LSQ
    19791     (vperm vr3 vr1 vr2 vr27) ; aligned result appears in VR3
    19792     (dbg t)) ; Look at result in some debugger
     19808    (lvx vr1 arg_z imm0)                ; load MSQ
     19809    (lvsl vr27 arg_z imm0)              ; set the permute vector
     19810    (addi imm0 imm0 16)                 ; address of LSQ
     19811    (lvx vr2 arg_z imm0)                ; load LSQ
     19812    (vperm vr3 vr1 vr2 vr27)           ; aligned result appears in VR3
     19813    (dbg t))                         ; Look at result in some debugger
    1979319814  (blr))
    19794         </pre>
     19815      </pre>
    1979519816            <p xmlns="http://www.w3.org/1999/xhtml">AltiVec registers are not preserved by CATCH and UNWIND-PROTECT.
    19796           Since AltiVec is only accessible from LAP in Clozure CL and since LAP
    19797           functions rarely use high- level control structures, this should rarely be
    19798           a problem in practice.</p>
    19799             <p xmlns="http://www.w3.org/1999/xhtml">LAP functions which use non-volatile vector registers and which call
    19800           (Lisp ?) code which may use CATCH or UNWIND-PROTECT should save those
    19801           vector registers before such a call and restore them on return. This is
    19802           one of the intended uses of the WITH-VECTOR-BUFFER lap macro.</p>
     19817        Since AltiVec is only accessible from LAP in Clozure CL and since LAP
     19818        functions rarely use high-level control structures, this should rarely be
     19819        a problem in practice.</p>
     19820            <p xmlns="http://www.w3.org/1999/xhtml">LAP functions that use non-volatile vector registers and
     19821        that call (Lisp ?) code which may use CATCH or UNWIND-PROTECT
     19822        should save those vector registers before such a call and
     19823        restore them on return. This is one of the intended uses of
     19824        the WITH-VECTOR-BUFFER lap macro.</p>
    1980319825          </div>
    1980419826        </div>
     
    1982319845            <div>
    1982419846              <div class="refsect1" lang="en" xml:lang="en">
    19825                 <a xmlns="http://www.w3.org/1999/xhtml" id="id469310"></a>
     19847                <a xmlns="http://www.w3.org/1999/xhtml" id="id424347"></a>
    1982619848                <div class="header">Description:</div>
    1982719849                <p xmlns="http://www.w3.org/1999/xhtml">When true, attempts to redefine (via DEFUN or DEFMETHOD)
    19828                 functions and methods that are marked as being
    19829                 "predefined" signal continuable errors.</p>
     19850              functions and methods that are marked as being
     19851              "predefined" signal continuable errors.</p>
    1983019852                <p xmlns="http://www.w3.org/1999/xhtml">Note that these are CERRORs, not warnings, and that
    19831                 no lisp functions or methods have been defined in the kernel
    19832                 in MCL or Clozure CL since 1987 or so.</p>
     19853              no lisp functions or methods have been defined in the kernel
     19854              in MCL or Clozure CL since 1987 or so.</p>
    1983319855              </div>
    1983419856            </div>
     
    1983919861              <strong>[Function]</strong>
    1984019862              <br></br>
    19841               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">set-development-environment</strong></span>
    19842                 <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em>
    19843                 unmark-builtin-functions</code>
     19863              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>set-development-environment</strong></span>
     19864              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em>
     19865              unmark-builtin-functions</code>
    1984419866            </div>
    1984519867            <div class="refentrytitle"></div>
     
    1984819870            <div>
    1984919871              <div class="refsect1" lang="en" xml:lang="en">
    19850                 <a xmlns="http://www.w3.org/1999/xhtml" id="id528030"></a>
     19872                <a xmlns="http://www.w3.org/1999/xhtml" id="id408862"></a>
    1985119873                <div class="header">Description:</div>
    1985219874                <p xmlns="http://www.w3.org/1999/xhtml">Arranges that the outermost special bindings of *PACKAGE*
    19853                 and *WARN-IF-REDEFINE-KERNEL* restore values of the "CCL"
    19854                 package and NIL to these variables, respectively. If the optional
    19855                 argument is true, marks all globally defined functions and methods
    19856                 as being "not predefined" (this is a fairly expensive
    19857                 operation.)</p>
     19875              and *WARN-IF-REDEFINE-KERNEL* restore values of the "CCL"
     19876              package and NIL to these variables, respectively. If the optional
     19877              argument is true, marks all globally defined functions and methods
     19878              as being "not predefined" (this is a fairly expensive
     19879              operation.)</p>
    1985819880              </div>
    1985919881            </div>
     
    1986419886              <strong>[Function]</strong>
    1986519887              <br></br>
    19866               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">set-user-environment</strong></span>
    19867                 <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> mark-builtin-functions</code>
     19888              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>set-user-environment</strong></span>
     19889              <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;optional</em> mark-builtin-functions</code>
    1986819890            </div>
    1986919891            <div class="refentrytitle"></div>
     
    1987219894            <div>
    1987319895              <div class="refsect1" lang="en" xml:lang="en">
    19874                 <a xmlns="http://www.w3.org/1999/xhtml" id="id426372"></a>
     19896                <a xmlns="http://www.w3.org/1999/xhtml" id="id417395"></a>
    1987519897                <div class="header">Description:</div>
    1987619898                <p xmlns="http://www.w3.org/1999/xhtml">Arranges that the outermost special bindings of *PACKAGE*
    19877                 and *WARN-IF-REDEFINE-KERNEL* restore values of the
    19878                 "CL-USER" package and T to these variables, respectively.
    19879                 If the optional argument is true, marks all globally defined
    19880                 functions and methods as being "predefined" (this is a
    19881                 fairly expensive operation.)</p>
     19899              and *WARN-IF-REDEFINE-KERNEL* restore values of the
     19900              "CL-USER" package and T to these variables, respectively.
     19901              If the optional argument is true, marks all globally defined
     19902              functions and methods as being "predefined" (this is a
     19903              fairly expensive operation.)</p>
    1988219904              </div>
    1988319905            </div>
     
    1989519917            <div>
    1989619918              <div class="refsect1" lang="en" xml:lang="en">
    19897                 <a xmlns="http://www.w3.org/1999/xhtml" id="id518558"></a>
     19919                <a xmlns="http://www.w3.org/1999/xhtml" id="id417440"></a>
    1989819920                <div class="header">Description:</div>
    1989919921                <p xmlns="http://www.w3.org/1999/xhtml">This variable is initialized each time an Clozure CL session
    19900                 starts based on information provided by the lisp kernel. Its value
    19901                 is true if AltiVec is present and false otherwise. This variable
    19902                 shouldn't be set by user code.</p>
     19922              starts based on information provided by the lisp kernel. Its value
     19923              is true if AltiVec is present and false otherwise. This variable
     19924              shouldn't be set by user code.</p>
    1990319925              </div>
    1990419926            </div>
     
    1991019932              <br></br>
    1991119933              <code>
    19912                 <span xmlns="http://www.w3.org/1999/xhtml">
    19913                   <strong class="function">altivec-available-p</strong>
     19934                <span xmlns="http://www.w3.org/1999/xhtml" class="function">
     19935                  <strong>altivec-available-p</strong>
    1991419936                </span>
    1991519937              </code>
     
    1992019942            <div>
    1992119943              <div class="refsect1" lang="en" xml:lang="en">
    19922                 <a xmlns="http://www.w3.org/1999/xhtml" id="id429384"></a>
     19944                <a xmlns="http://www.w3.org/1999/xhtml" id="id417498"></a>
    1992319945                <div class="header">Description:</div>
    1992419946                <p xmlns="http://www.w3.org/1999/xhtml">Returns non-NIL if AltiVec is available.</p>
     
    1993819960            <div>
    1993919961              <div class="refsect1" lang="en" xml:lang="en">
    19940                 <a xmlns="http://www.w3.org/1999/xhtml" id="id490739"></a>
     19962                <a xmlns="http://www.w3.org/1999/xhtml" id="id417641"></a>
    1994119963                <div class="header">Description:</div>
    1994219964                <p xmlns="http://www.w3.org/1999/xhtml">Intended to control the expansion of certain lap macros.
    19943                 Initialized to NIL on LinuxPPC; initialized to T on platforms
    19944                 (such as MacOS X/Darwin) that require that the VRSAVE SPR contain
    19945                 a bitmask of active vector registers at all times.</p>
     19965              Initialized to NIL on LinuxPPC; initialized to T on platforms
     19966              (such as MacOS X/Darwin) that require that the VRSAVE SPR contain
     19967              a bitmask of active vector registers at all times.</p>
    1994619968              </div>
    1994719969            </div>
     
    1995219974              <strong>[LAP Macro]</strong>
    1995319975              <br></br>
    19954               <code><span xmlns="http://www.w3.org/1999/xhtml"><strong class="function">with-altivec-registers</strong></span>
    19955                 reglist <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
     19976              <code><span xmlns="http://www.w3.org/1999/xhtml" class="function"><strong>with-altivec-registers</strong></span>
     19977              reglist <em xmlns="http://www.w3.org/1999/xhtml" class="varname">&amp;body</em> body</code>
    1995619978            </div>
    1995719979            <div class="refentrytitle"></div>
     
    1996019982            <div>
    1996119983              <div class="refsect1" lang="en" xml:lang="en">
    19962                 <a xmlns="http://www.w3.org/1999/xhtml" id="id430110"></a>
     19984                <a xmlns="http://www.w3.org/1999/xhtml" id="id417705"></a>
    1996319985                <div class="header">Arguments and Values:</div>
    1996419986                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">reglist</span></i>---A list of vector register names (vr0 .. vr31).</p>
     
    1996619988              </div>
    1996719989              <div class="refsect1" lang="en" xml:lang="en">
    19968                 <a xmlns="http://www.w3.org/1999/xhtml" id="id470124"></a>
     19990                <a xmlns="http://www.w3.org/1999/xhtml" id="id417746"></a>
    1996919991                <div class="header">Description:</div>
    1997019992                <p xmlns="http://www.w3.org/1999/xhtml">Specifies the set of AltiVec registers used in body. If
    19971                 *altivec-lapmacros-maintain-vrsave-p* is true when the macro is
    19972                 expanded, generates code to save the VRSAVE SPR and updates VRSAVE
    19973                 to include a bitmask generated from the specified register list.
    19974                 Generates code which saves any non-volatile vector registers which
    19975                 appear in the register list, executes body, and restores the saved
    19976                 non-volatile vector registers (and, if
    19977                 *altivec-lapmacros-maintain-vrsave-p* is true, restores VRSAVE as
    19978                 well. Uses the IMM0 register (r3) as a temporary.</p>
     19993              *altivec-lapmacros-maintain-vrsave-p* is true when the macro is
     19994              expanded, generates code to save the VRSAVE SPR and updates VRSAVE
     19995              to include a bitmask generated from the specified register list.
     19996              Generates code which saves any non-volatile vector registers which
     19997              appear in the register list, executes body, and restores the saved
     19998              non-volatile vector registers (and, if
     19999              *altivec-lapmacros-maintain-vrsave-p* is true, restores VRSAVE as
     20000              well. Uses the IMM0 register (r3) as a temporary.</p>
    1997920001              </div>
    1998020002            </div>
     
    1999220014            <div>
    1999320015              <div class="refsect1" lang="en" xml:lang="en">
    19994                 <a xmlns="http://www.w3.org/1999/xhtml" id="id470977"></a>
     20016                <a xmlns="http://www.w3.org/1999/xhtml" id="id427200"></a>
    1999520017                <div class="header">Arguments and Values:</div>
    1999620018                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">base</span></i>---Any available general-purpose register.</p>
    1999720019                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">n</span></i>---An integer between 1 and 254, inclusive. (Should
    19998                           typically be much, much closer to 1.) Specifies the size of
    19999                           the buffer, in 16-byte units.</p>
     20020                        typically be much, much closer to 1.) Specifies the size of
     20021                        the buffer, in 16-byte units.</p>
    2000020022                <p><i><span xmlns="http://www.w3.org/1999/xhtml" class="term">body</span></i>---A sequence of PPC LAP instructions.</p>
    2000120023              </div>
    2000220024              <div class="refsect1" lang="en" xml:lang="en">
    20003                 <a xmlns="http://www.w3.org/1999/xhtml" id="id449788"></a>
     20025                <a xmlns="http://www.w3.org/1999/xhtml" id="id427258"></a>
    2000420026                <div class="header">Description:</div>
    2000520027                <p xmlns="http://www.w3.org/1999/xhtml">Generates code which allocates a 16-byte aligned buffer
    20006                 large enough to contain N vector registers; the GPR base points to
    20007                 the lowest address of this buffer. After processing body, the
    20008                 buffer will be deallocated. The body should preserve the value of
    20009                 base as long as it needs to reference the buffer. It's
    20010                 intended that base be used as a base register in stvx and lvx
    20011                 instructions within the body.</p>
     20028              large enough to contain N vector registers; the GPR base points to
     20029              the lowest address of this buffer. After processing body, the
     20030              buffer will be deallocated. The body should preserve the value of
     20031              base as long as it needs to reference the buffer. It's
     20032              intended that base be used as a base register in stvx and lvx
     20033              instructions within the body.</p>
    2001220034              </div>
    2001320035            </div>
     
    2003020052              <p>A specially-structured directory that Mac OS X
    2003120053                recognizes as a
    20032                 launchable <a href="#Cocoa"><em class="glossterm">Cocoa</em></a>
     20054                launchable <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a>
    2003320055                application. Graphical applications on Mac OS X are
    2003420056                represented as application bundles.</p>
     
    2008220104                features to Emacs. Hemlock was originally developed as part of
    2008320105                CMU Common Lisp. A portable version of Hemlock is built into
    20084                 the Clozure CL <a href="#IDE"><em class="glossterm">IDE</em></a>.</p>
     20106                the Clozure CL <a class="glossterm" href="#IDE"><em class="glossterm">IDE</em></a>.</p>
    2008520107            </dd>
    2008620108          </dl>
     
    2009220114            <dd>
    2009320115              <p>"Integrated Development Environment". In the context of
    20094                 Clozure CL, "the IDE" refers to the experimental <a href="#Cocoa"><em class="glossterm">Cocoa</em></a>
     20116                Clozure CL, "the IDE" refers to the experimental <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a>
    2009520117                windowing development environment provided in source form with
    2009620118                Clozure CL distributions.</p>
     
    2010220124                containing archived versions of these data in a format that
    2010320125                can be loaded and reconstituted by the
    20104                 Lisp <a href="#lisp_kernel"><em class="glossterm">kernel</em></a>. A
     20126                Lisp <a class="glossterm" href="#lisp_kernel"><em class="glossterm">kernel</em></a>. A
    2010520127                working Clozure CL system consists of the kernel and
    20106                 an <a href="#lisp_image"><em class="glossterm">image</em></a>.</p>
     20128                an <a class="glossterm" href="#lisp_image"><em class="glossterm">image</em></a>.</p>
    2010720129            </dd>
    2010820130            <dt><a id="InterfaceBuilder"></a>InterfaceBuilder</dt>
     
    2011020132              <p>An application supplied by Apple with their developer
    2011120133                tools that can be used to interactively build user-interface
    20112                 elements for <a href="#Cocoa"><em class="glossterm">Cocoa</em></a>
     20134                elements for <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a>
    2011320135                applications.</p>
    2011420136            </dd>
     
    2012320145                levels of the Lisp system. A working Clozure CL system consists of
    2012420146                the kernel and
    20125                 an <a href="#lisp_image"><em class="glossterm">image</em></a>.</p>
     20147                an <a class="glossterm" href="#lisp_image"><em class="glossterm">image</em></a>.</p>
    2012620148            </dd>
    2012720149          </dl>
     
    2013220154            <dt><a id="listener_window"></a>listener window</dt>
    2013320155            <dd>
    20134               <p>In the <a href="#IDE"><em class="glossterm">IDE</em></a>,
    20135                 a <a href="#Cocoa"><em class="glossterm">Cocoa</em></a>
     20156              <p>In the <a class="glossterm" href="#IDE"><em class="glossterm">IDE</em></a>,
     20157                a <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a>
    2013620158                window that contains a pseudo-terminal session that
    20137                 communicates with a Lisp <a href="#REPL"><em class="glossterm">REPL</em></a>.</p>
     20159                communicates with a Lisp <a class="glossterm" href="#REPL"><em class="glossterm">REPL</em></a>.</p>
    2013820160            </dd>
    2013920161          </dl>
     
    2016120183            <dd>
    2016220184              <p>A data file created by
    20163                 Apple's <a href="#InterfaceBuilder"><em class="glossterm">InterfaceBuilder</em></a>
     20185                Apple's <a class="glossterm" href="#InterfaceBuilder"><em class="glossterm">InterfaceBuilder</em></a>
    2016420186                application, which contains archived Objective-C objects that
    2016520187                define user-interface elements for
    20166                 a <a href="#Cocoa"><em class="glossterm">Cocoa</em></a>
     20188                a <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a>
    2016720189                application. Under Mac OS
    20168                 X, <a href="#Cocoa"><em class="glossterm">Cocoa</em></a> applications
     20190                X, <a class="glossterm" href="#Cocoa"><em class="glossterm">Cocoa</em></a> applications
    2016920191                typically create their user interface elements by reading
    2017020192                nibfiles and unarchiving the objects in them.</p>
     
    2021820240              <p>The function executed by Lisp automatically once its
    2021920241                startup is complete. Clozure CL's default toplevel is the
    20220                 interactive <a href="#REPL"><em class="glossterm">read-eval-print
     20242                interactive <a class="glossterm" href="#REPL"><em class="glossterm">read-eval-print
    2022120243                loop</em></a> that you normally use to interact with
    2022220244                Lisp. You can, however, replace the toplevel with a function
     
    2022920251                be symbols (such as <code class="code">CONS</code>
    2023020252                and <code class="code">STRING</code>), or they may be more complex
    20231                 <a href="#s-expression"><em class="glossterm">S-expressions</em></a>
     20253                <a class="glossterm" href="#s-expression"><em class="glossterm">S-expressions</em></a>
    2023220254                (such as (UNSIGNED-BYTE 8)).</p>
    2023320255            </dd>
     
    2024720269            <h3>Symbols</h3>
    2024820270            <dl>
    20249               <dt>#$, <a href="#rm_sharpsign-dollarsign">Reader Macro #$</a></dt>
    20250               <dt>#&amp;, <a href="#rm_sharpsign-ampersand">Reader Macro #&amp;</a></dt>
    20251               <dt>#/, <a href="#rm_sharpsign-slash">Reader Macro #/</a></dt>
    20252               <dt>#&gt;, <a href="#rm_sharpsign-greaterthan">Reader Macro #&gt;</a></dt>
    20253               <dt>#_, <a href="#rm_sharpsign-underscore">Reader Macro #_</a></dt>
    20254               <dt>%ff-call, <a href="#f_Pff-call">Function %FF-CALL</a></dt>
    20255               <dt>%reference-external-entry-point, <a href="#f_Preference-external-entry-point">Function %REFERENCE-EXTERNAL-ENTRY-POINT</a></dt>
    20256               <dt>*alternate-line-terminator*, <a href="#v_alternate-line-terminator">Variable CCL:*ALTERNATE-LINE-TERMINATOR*</a></dt>
    20257               <dt>*altivec-available*, <a href="#v_altivec-available">Variable *ALTIVEC-AVAILABLE*</a></dt>
    20258               <dt>*altivec-lapmacros-maintain-vrsave-p*, <a href="#v_altivec-lapmacros-maintain-vrsave-p">Variable *ALTIVEC-LAPMACROS-MAINTAIN-VRSAVE-P*</a></dt>
    20259               <dt>*current-process*, <a href="#v_current-process">Variable *CURRENT-PROCESS*</a></dt>
    20260               <dt>*default-external-format*, <a href="#v_default-external-format">Variable CCL:*DEFAULT-EXTERNAL-FORMAT*</a></dt>
    20261               <dt>*ticks-per-second*, <a href="#v_ticks-per-second">Variable *TICKS-PER-SECOND*</a></dt>
    20262               <dt>*warn-if-redefine-kernel, <a href="#v_warn-if-redefine-kernel">Variable *WARN-IF-REDEFINE-KERNEL*</a></dt>
    20263               <dt>+NULL-PTR+, <a href="#Saving-Applications">Saving Applications</a></dt>
    20264               <dt>:external-format, <a href="#k_external-format">Keyword Argument :EXTERNAL-FORMAT</a></dt>
    20265               <dt>:y, <a href="#cmd_y">Toplevel Command :Y</a></dt>
    20266               <dt>@class, <a href="#m_class">Macro CCL::@CLASS</a></dt>
    20267               <dt>@selector, <a href="#m_selector">Macro CCL::@SELECTOR</a></dt>
    20268               <dt>[fn-name], <a href="#f_describe-character-encodings">Function DESCRIBE-CHARACTER-ENCODINGS</a></dt>
     20271              <dt>#$, <a class="indexterm" href="#rm_sharpsign-dollarsign">Reader Macro #$</a></dt>
     20272              <dt>#&amp;, <a class="indexterm" href="#rm_sharpsign-ampersand">Reader Macro #&amp;</a></dt>
     20273              <dt>#/, <a class="indexterm" href="#rm_sharpsign-slash">Reader Macro #/</a></dt>
     20274              <dt>#&gt;, <a class="indexterm" href="#rm_sharpsign-greaterthan">Reader Macro #&gt;</a></dt>
     20275              <dt>#_, <a class="indexterm" href="#rm_sharpsign-underscore">Reader Macro #_</a></dt>
     20276              <dt>%ff-call, <a class="indexterm" href="#f_Pff-call">Function %FF-CALL</a></dt>
     20277              <dt>%reference-external-entry-point, <a class="indexterm" href="#f_Preference-external-entry-point">Function %REFERENCE-EXTERNAL-ENTRY-POINT</a></dt>
     20278              <dt>*alternate-line-terminator*, <a class="indexterm" href="#v_alternate-line-terminator">Variable CCL:*ALTERNATE-LINE-TERMINATOR*</a></dt>
     20279              <dt>*altivec-available*, <a class="indexterm" href="#v_altivec-available">Variable *ALTIVEC-AVAILABLE*</a></dt>
     20280              <dt>*altivec-lapmacros-maintain-vrsave-p*, <a class="indexterm" href="#v_altivec-lapmacros-maintain-vrsave-p">Variable *ALTIVEC-LAPMACROS-MAINTAIN-VRSAVE-P*</a></dt>
     20281              <dt>*current-process*, <a class="indexterm" href="#v_current-process">Variable *CURRENT-PROCESS*</a></dt>
     20282              <dt>*default-external-format*, <a class="indexterm" href="#v_default-external-format">Variable CCL:*DEFAULT-EXTERNAL-FORMAT*</a></dt>
     20283              <dt>*ticks-per-second*, <a class="indexterm" href="#v_ticks-per-second">Variable *TICKS-PER-SECOND*</a></dt>
     20284              <dt>*warn-if-redefine-kernel, <a class="indexterm" href="#v_warn-if-redefine-kernel">Variable *WARN-IF-REDEFINE-KERNEL*</a></dt>
     20285              <dt>+NULL-PTR+, <a class="indexterm" href="#Saving-Applications">Saving Applications</a></dt>
     20286              <dt>:external-format, <a class="indexterm" href="#k_external-format">Keyword Argument :EXTERNAL-FORMAT</a></dt>
     20287              <dt>:y, <a class="indexterm" href="#cmd_y">Toplevel Command :Y</a></dt>
     20288              <dt>@class, <a class="indexterm" href="#m_class">Macro CCL::@CLASS</a></dt>
     20289              <dt>@selector, <a class="indexterm" href="#m_selector">Macro CCL::@SELECTOR</a></dt>
     20290              <dt>[fn-name], <a class="indexterm" href="#f_describe-character-encodings">Function DESCRIBE-CHARACTER-ENCODINGS</a></dt>
    2026920291            </dl>
    2027020292          </div>
     
    2027220294            <h3></h3>
    2027320295            <dl>
    20274               <dt>, <a href="#trace">Trace</a>, <a href="#map-file-to-ivector">Memory-mapped Files</a>, <a href="#defstatic">Static Variables</a>, <a href="#save-application">Saving Applications</a>, <a href="#build-application">The Application Builder</a></dt>
     20296              <dt>, <a class="indexterm" href="#trace">Trace</a>, <a class="indexterm" href="#map-file-to-ivector">Memory-mapped Files</a>, <a class="indexterm" href="#defstatic">Static Variables</a>, <a class="indexterm" href="#save-application">Saving Applications</a>, <a class="indexterm" href="#build-application">The Application Builder</a></dt>
    2027520297            </dl>
    2027620298          </div>
     
    2027820300            <h3>A</h3>
    2027920301            <dl>
    20280               <dt>accept-connection, <a href="#f_accept-connection">Function ACCEPT-CONNECTION</a></dt>
    20281               <dt>all-processes, <a href="#f_all-processes">Function ALL-PROCESSES</a></dt>
    20282               <dt>altivec-available-p, <a href="#f_altivec-available-p">Function ALTIVEC-AVAILABLE-P</a></dt>
     20302              <dt>accept-connection, <a class="indexterm" href="#f_accept-connection">Function ACCEPT-CONNECTION</a></dt>
     20303              <dt>all-processes, <a class="indexterm" href="#f_all-processes">Function ALL-PROCESSES</a></dt>
     20304              <dt>altivec-available-p, <a class="indexterm" href="#f_altivec-available-p">Function ALTIVEC-AVAILABLE-P</a></dt>
    2028320305            </dl>
    2028420306          </div>
     
    2028720309            <dl>
    2028820310              <dt>bootstrapping
    20289       image, <a href="#building-definitions">Building Definitions</a></dt>
     20311          image, <a class="indexterm" href="#building-definitions">Building Definitions</a></dt>
    2029020312            </dl>
    2029120313          </div>
     
    2029320315            <h3>C</h3>
    2029420316            <dl>
    20295               <dt>CCL Logical Host, <a href="#Predefined-Logical-Hosts">Predefined Logical Hosts</a></dt>
    20296               <dt>close, <a href="#o_close">Method CLOSE</a></dt>
    20297               <dt>close-shared-library, <a href="#f_close-shared-library">Function CLOSE-SHARED-LIBRARY</a></dt>
    20298               <dt>communication-deadline-expired, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    20299               <dt>configure-gcc, <a href="#f_configure-gcc">Function CONFIGURE-GCC</a></dt>
    20300               <dt>current-directory-name, <a href="#f_current-directory-name">Function CCL::CURRENT-DIRECTORY-NAME</a></dt>
     20317              <dt>CCL Logical Host, <a class="indexterm" href="#Predefined-Logical-Hosts">Predefined Logical Hosts</a></dt>
     20318              <dt>close, <a class="indexterm" href="#o_close">Method CLOSE</a></dt>
     20319              <dt>close-shared-library, <a class="indexterm" href="#f_close-shared-library">Function CLOSE-SHARED-LIBRARY</a></dt>
     20320              <dt>communication-deadline-expired, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20321              <dt>configure-gcc, <a class="indexterm" href="#f_configure-gcc">Function CONFIGURE-GCC</a></dt>
     20322              <dt>current-directory-name, <a class="indexterm" href="#f_current-directory-name">Function CCL::CURRENT-DIRECTORY-NAME</a></dt>
    2030120323            </dl>
    2030220324          </div>
     
    2030420326            <h3>D</h3>
    2030520327            <dl>
    20306               <dt>def-foreign-type, <a href="#m_def-foreign-type">Macro DEF-FOREIGN-TYPE</a></dt>
    20307               <dt>defcallback, <a href="#m_defcallback">Macro DEFCALLBACK</a></dt>
    20308               <dt>define-objc-class-method, <a href="#m_define-objc-class-method">Macro CCL::DEFINE-OBJC-CLASS-METHOD</a></dt>
    20309               <dt>define-objc-method, <a href="#m_define-objc-method">Macro CCL::DEFINE-OBJC-METHOD</a></dt>
    20310               <dt>dotted-to-ipaddr, <a href="#f_dotted-to-ipaddr">Function DOTTED-TO-IPADDR</a></dt>
     20328              <dt>def-foreign-type, <a class="indexterm" href="#m_def-foreign-type">Macro DEF-FOREIGN-TYPE</a></dt>
     20329              <dt>defcallback, <a class="indexterm" href="#m_defcallback">Macro DEFCALLBACK</a></dt>
     20330              <dt>define-objc-class-method, <a class="indexterm" href="#m_define-objc-class-method">Macro CCL::DEFINE-OBJC-CLASS-METHOD</a></dt>
     20331              <dt>define-objc-method, <a class="indexterm" href="#m_define-objc-method">Macro CCL::DEFINE-OBJC-METHOD</a></dt>
     20332              <dt>dotted-to-ipaddr, <a class="indexterm" href="#f_dotted-to-ipaddr">Function DOTTED-TO-IPADDR</a></dt>
    2031120333            </dl>
    2031220334          </div>
     
    2031420336            <h3>E</h3>
    2031520337            <dl>
    20316               <dt>egc, <a href="#f_egc">Function EGC</a></dt>
    20317               <dt>egc-active-p, <a href="#f_egc-active-p">Function EGC-ACTIVE-P</a></dt>
    20318               <dt>egc-configuration, <a href="#f_egc-configuration">Function EGC-CONFIGURATION</a></dt>
    20319               <dt>egc-enabled-p, <a href="#f_egc-enabled-p">Function EGC-ENABLED-P</a></dt>
    20320               <dt>external, <a href="#m_external">Macro EXTERNAL</a></dt>
    20321               <dt>external-call, <a href="#m_external-call">Macro EXTERNAL-CALL</a></dt>
    20322               <dt>external-process-error-stream, <a href="#f_external-process-error-stream">Function EXTERNAL-PROCESS-ERROR-STREAM</a></dt>
    20323               <dt>external-process-id, <a href="#f_external-process-id">Function EXTERNAL-PROCESS-ID</a></dt>
    20324               <dt>external-process-input-stream, <a href="#f_external-process-input-stream">Function EXTERNAL-PROCESS-INPUT-STREAM</a></dt>
    20325               <dt>external-process-output-stream, <a href="#f_external-process-output-stream">Function EXTERNAL-PROCESS-OUTPUT-STREAM</a></dt>
    20326               <dt>external-process-status, <a href="#f_external-process-status">Function EXTERNAL-PROCESS-STATUS</a></dt>
     20338              <dt>egc, <a class="indexterm" href="#f_egc">Function EGC</a></dt>
     20339              <dt>egc-active-p, <a class="indexterm" href="#f_egc-active-p">Function EGC-ACTIVE-P</a></dt>
     20340              <dt>egc-configuration, <a class="indexterm" href="#f_egc-configuration">Function EGC-CONFIGURATION</a></dt>
     20341              <dt>egc-enabled-p, <a class="indexterm" href="#f_egc-enabled-p">Function EGC-ENABLED-P</a></dt>
     20342              <dt>external, <a class="indexterm" href="#m_external">Macro EXTERNAL</a></dt>
     20343              <dt>external-call, <a class="indexterm" href="#m_external-call">Macro EXTERNAL-CALL</a></dt>
     20344              <dt>external-process-error-stream, <a class="indexterm" href="#f_external-process-error-stream">Function EXTERNAL-PROCESS-ERROR-STREAM</a></dt>
     20345              <dt>external-process-id, <a class="indexterm" href="#f_external-process-id">Function EXTERNAL-PROCESS-ID</a></dt>
     20346              <dt>external-process-input-stream, <a class="indexterm" href="#f_external-process-input-stream">Function EXTERNAL-PROCESS-INPUT-STREAM</a></dt>
     20347              <dt>external-process-output-stream, <a class="indexterm" href="#f_external-process-output-stream">Function EXTERNAL-PROCESS-OUTPUT-STREAM</a></dt>
     20348              <dt>external-process-status, <a class="indexterm" href="#f_external-process-status">Function EXTERNAL-PROCESS-STATUS</a></dt>
    2032720349            </dl>
    2032820350          </div>
     
    2033120353            <dl>
    2033220354              <dt>fasl
    20333       files, <a href="#building-definitions">Building Definitions</a></dt>
    20334               <dt>ff-call, <a href="#m_ff-call">Macro FF-CALL</a></dt>
    20335               <dt>foreign-symbol-address, <a href="#f_foreign-symbol-address">Function FOREIGN-SYMBOL-ADDRESS</a></dt>
    20336               <dt>foreign-symbol-entry, <a href="#f_foreign-symbol-entry">Function FOREIGN-SYMBOL-ENTRY</a></dt>
    20337               <dt>free, <a href="#f_free">Function FREE</a></dt>
     20355          files, <a class="indexterm" href="#building-definitions">Building Definitions</a></dt>
     20356              <dt>ff-call, <a class="indexterm" href="#m_ff-call">Macro FF-CALL</a></dt>
     20357              <dt>foreign-symbol-address, <a class="indexterm" href="#f_foreign-symbol-address">Function FOREIGN-SYMBOL-ADDRESS</a></dt>
     20358              <dt>foreign-symbol-entry, <a class="indexterm" href="#f_foreign-symbol-entry">Function FOREIGN-SYMBOL-ENTRY</a></dt>
     20359              <dt>free, <a class="indexterm" href="#f_free">Function FREE</a></dt>
    2033820360            </dl>
    2033920361          </div>
     
    2034120363            <h3>G</h3>
    2034220364            <dl>
    20343               <dt>gc-retain-pages, <a href="#f_gc-retain-pages">Function GC-RETAIN-PAGES</a></dt>
    20344               <dt>gc-retaining-pages, <a href="#f_gc-retaining-pages">Function GC-RETAINING-PAGES</a></dt>
    20345               <dt>get-user-home-dir, <a href="#f_get-user-home-dir">Function CCL::GET-USER-HOME-DIR</a></dt>
    20346               <dt>getenv, <a href="#f_getenv">Function CCL::GETENV</a></dt>
    20347               <dt>getpid, <a href="#f_getpid">Function CCL::GETPID</a></dt>
    20348               <dt>getuid, <a href="#f_getuid">Function CCL::GETUID</a></dt>
    20349               <dt>grab-lock, <a href="#f_grab-lock">Function GRAB-LOCK</a></dt>
     20365              <dt>gc-retain-pages, <a class="indexterm" href="#f_gc-retain-pages">Function GC-RETAIN-PAGES</a></dt>
     20366              <dt>gc-retaining-pages, <a class="indexterm" href="#f_gc-retaining-pages">Function GC-RETAINING-PAGES</a></dt>
     20367              <dt>get-user-home-dir, <a class="indexterm" href="#f_get-user-home-dir">Function CCL::GET-USER-HOME-DIR</a></dt>
     20368              <dt>getenv, <a class="indexterm" href="#f_getenv">Function CCL::GETENV</a></dt>
     20369              <dt>getpid, <a class="indexterm" href="#f_getpid">Function CCL::GETPID</a></dt>
     20370              <dt>getuid, <a class="indexterm" href="#f_getuid">Function CCL::GETUID</a></dt>
     20371              <dt>grab-lock, <a class="indexterm" href="#f_grab-lock">Function GRAB-LOCK</a></dt>
    2035020372            </dl>
    2035120373          </div>
     
    2035420376            <dl>
    2035520377              <dt>heap
    20356       image, <a href="#building-definitions">Building Definitions</a></dt>
     20378          image, <a class="indexterm" href="#building-definitions">Building Definitions</a></dt>
    2035720379            </dl>
    2035820380          </div>
     
    2036020382            <h3>I</h3>
    2036120383            <dl>
    20362               <dt>input-timeout, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    20363               <dt>ipaddr-to-dotted, <a href="#f_ipaddr-to-dotted">Function IPADDR-TO-DOTTED</a></dt>
    20364               <dt>ipaddr-to-hostname, <a href="#f_ipaddr-to-hostname">Function IPADDR-TO-HOSTNAME</a></dt>
     20384              <dt>input-timeout, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20385              <dt>ipaddr-to-dotted, <a class="indexterm" href="#f_ipaddr-to-dotted">Function IPADDR-TO-DOTTED</a></dt>
     20386              <dt>ipaddr-to-hostname, <a class="indexterm" href="#f_ipaddr-to-hostname">Function IPADDR-TO-HOSTNAME</a></dt>
    2036520387            </dl>
    2036620388          </div>
     
    2036820390            <h3>K</h3>
    2036920391            <dl>
    20370               <dt>kernel build directory, <a href="#building-definitions">Building Definitions</a></dt>
     20392              <dt>kernel build directory, <a class="indexterm" href="#building-definitions">Building Definitions</a></dt>
    2037120393            </dl>
    2037220394          </div>
     
    2037520397            <dl>
    2037620398              <dt>lisp
    20377       kernel, <a href="#building-definitions">Building Definitions</a></dt>
    20378               <dt>lisp-heap-gc-threshold, <a href="#f_lisp-heap-gc-threshold">Function LISP-HEAP-GC-THRESHOLD</a></dt>
    20379               <dt>local-host, <a href="#f_local-host">Function LOCAL-HOST</a></dt>
    20380               <dt>local-port, <a href="#f_local-port">Function LOCAL-PORT</a></dt>
    20381               <dt>lookup-hostname, <a href="#f_lookup-hostname">Function LOOKUP-HOSTNAME</a></dt>
    20382               <dt>lookup-port, <a href="#f_lookup-port">Function LOOKUP-PORT</a></dt>
     20399          kernel, <a class="indexterm" href="#building-definitions">Building Definitions</a></dt>
     20400              <dt>lisp-heap-gc-threshold, <a class="indexterm" href="#f_lisp-heap-gc-threshold">Function LISP-HEAP-GC-THRESHOLD</a></dt>
     20401              <dt>local-host, <a class="indexterm" href="#f_local-host">Function LOCAL-HOST</a></dt>
     20402              <dt>local-port, <a class="indexterm" href="#f_local-port">Function LOCAL-PORT</a></dt>
     20403              <dt>lookup-hostname, <a class="indexterm" href="#f_lookup-hostname">Function LOOKUP-HOSTNAME</a></dt>
     20404              <dt>lookup-port, <a class="indexterm" href="#f_lookup-port">Function LOOKUP-PORT</a></dt>
    2038320405            </dl>
    2038420406          </div>
     
    2038620408            <h3>M</h3>
    2038720409            <dl>
    20388               <dt>make-external-format, <a href="#f_make-external-format">Function MAKE-EXTERNAL-FORMAT</a></dt>
    20389               <dt>make-gcable-record, <a href="#m_make-record">Macro MAKE-RECORD</a></dt>
    20390               <dt>make-lock, <a href="#f_make-lock">Function MAKE-LOCK</a></dt>
    20391               <dt>make-process, <a href="#f_make-process">Function MAKE-PROCESS</a></dt>
    20392               <dt>make-read-write-lock, <a href="#f_make-read-write-lock">Function MAKE-READ-WRITE-LOCK</a></dt>
    20393               <dt>make-record, <a href="#m_make-record">Macro MAKE-RECORD</a></dt>
    20394               <dt>make-semaphore, <a href="#f_make-semaphore">Function MAKE-SEMAPHORE</a></dt>
    20395               <dt>make-socket, <a href="#f_make-socket">Function MAKE-SOCKET</a></dt>
     20410              <dt>make-external-format, <a class="indexterm" href="#f_make-external-format">Function MAKE-EXTERNAL-FORMAT</a></dt>
     20411              <dt>make-gcable-record, <a class="indexterm" href="#m_make-record">Macro MAKE-RECORD</a></dt>
     20412              <dt>make-lock, <a class="indexterm" href="#f_make-lock">Function MAKE-LOCK</a></dt>
     20413              <dt>make-process, <a class="indexterm" href="#f_make-process">Function MAKE-PROCESS</a></dt>
     20414              <dt>make-read-write-lock, <a class="indexterm" href="#f_make-read-write-lock">Function MAKE-READ-WRITE-LOCK</a></dt>
     20415              <dt>make-record, <a class="indexterm" href="#m_make-record">Macro MAKE-RECORD</a></dt>
     20416              <dt>make-semaphore, <a class="indexterm" href="#f_make-semaphore">Function MAKE-SEMAPHORE</a></dt>
     20417              <dt>make-socket, <a class="indexterm" href="#f_make-socket">Function MAKE-SOCKET</a></dt>
    2039620418            </dl>
    2039720419          </div>
     
    2039920421            <h3>N</h3>
    2040020422            <dl>
    20401               <dt>note-open-file-stream, <a href="#f_note-open-file-stream">Function NOTE-OPEN-FILE-STREAM</a></dt>
    20402               <dt>ns-lisp-string, <a href="#c_ns-lisp-string">Class CCL::NS-LISP-STRING</a></dt>
     20423              <dt>note-open-file-stream, <a class="indexterm" href="#f_note-open-file-stream">Function NOTE-OPEN-FILE-STREAM</a></dt>
     20424              <dt>ns-lisp-string, <a class="indexterm" href="#c_ns-lisp-string">Class CCL::NS-LISP-STRING</a></dt>
    2040320425            </dl>
    2040420426          </div>
     
    2040620428            <h3>O</h3>
    2040720429            <dl>
    20408               <dt>objc:defmethod, <a href="#m_objc-defmethod">Macro objc:defmethod</a></dt>
    20409               <dt>open-file-streams, <a href="#f_open-file-streams">Function OPEN-FILE-STREAMS</a></dt>
    20410               <dt>open-shared-library, <a href="#f_open-shared-library">Function OPEN-SHARED-LIBRARY</a></dt>
    20411               <dt>os-command, <a href="#f_os-command">Function CCL::OS-COMMAND</a></dt>
    20412               <dt>output-timeout, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20430              <dt>objc:defmethod, <a class="indexterm" href="#m_objc-defmethod">Macro objc:defmethod</a></dt>
     20431              <dt>open-file-streams, <a class="indexterm" href="#f_open-file-streams">Function OPEN-FILE-STREAMS</a></dt>
     20432              <dt>open-shared-library, <a class="indexterm" href="#f_open-shared-library">Function OPEN-SHARED-LIBRARY</a></dt>
     20433              <dt>os-command, <a class="indexterm" href="#f_os-command">Function CCL::OS-COMMAND</a></dt>
     20434              <dt>output-timeout, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    2041320435            </dl>
    2041420436          </div>
     
    2041620438            <h3>P</h3>
    2041720439            <dl>
    20418               <dt>pref, <a href="#m_pref">Macro PREF</a></dt>
    20419               <dt>process-abort, <a href="#f_process-abort">Function PROCESS-ABORT</a></dt>
    20420               <dt>process-allow-schedule, <a href="#f_process-allow-schedule">Function PROCESS-ALLOW-SCHEDULE</a></dt>
    20421               <dt>process-enable, <a href="#f_process-enable">Function PROCESS-ENABLE</a></dt>
    20422               <dt>process-input-wait, <a href="#f_process-input-wait">Function PROCESS-INPUT-WAIT</a></dt>
    20423               <dt>process-interrupt, <a href="#f_process-interrupt">Function PROCESS-INTERRUPT</a></dt>
    20424               <dt>process-kill, <a href="#f_process-kill">Function PROCESS-KILL</a></dt>
    20425               <dt>process-output-wait, <a href="#f_process-output-wait">Function PROCESS-OUTPUT-WAIT</a></dt>
    20426               <dt>process-preset, <a href="#f_process-preset">Function PROCESS-PRESET</a></dt>
    20427               <dt>process-reset, <a href="#f_process-reset">Function PROCESS-RESET</a></dt>
    20428               <dt>process-resume, <a href="#f_process-resume">Function PROCESS-RESUME</a></dt>
    20429               <dt>process-run-function, <a href="#f_process-run-function">Function PROCESS-RUN-FUNCTION</a></dt>
    20430               <dt>process-suspend, <a href="#f_process-suspend">Function PROCESS-SUSPEND</a></dt>
    20431               <dt>process-suspend-count, <a href="#f_process-suspend-count">Function PROCESS-SUSPEND-COUNT</a></dt>
    20432               <dt>process-wait, <a href="#f_process-wait">Function PROCESS-WAIT</a></dt>
    20433               <dt>process-wait-with-timeout, <a href="#f_process-wait-with-timeout">Function PROCESS-WAIT-WITH-TIMEOUT</a></dt>
    20434               <dt>process-whostate, <a href="#f_process-whostate">Function PROCESS-WHOSTATE</a></dt>
     20440              <dt>pref, <a class="indexterm" href="#m_pref">Macro PREF</a></dt>
     20441              <dt>process-abort, <a class="indexterm" href="#f_process-abort">Function PROCESS-ABORT</a></dt>
     20442              <dt>process-allow-schedule, <a class="indexterm" href="#f_process-allow-schedule">Function PROCESS-ALLOW-SCHEDULE</a></dt>
     20443              <dt>process-enable, <a class="indexterm" href="#f_process-enable">Function PROCESS-ENABLE</a></dt>
     20444              <dt>process-input-wait, <a class="indexterm" href="#f_process-input-wait">Function PROCESS-INPUT-WAIT</a></dt>
     20445              <dt>process-interrupt, <a class="indexterm" href="#f_process-interrupt">Function PROCESS-INTERRUPT</a></dt>
     20446              <dt>process-kill, <a class="indexterm" href="#f_process-kill">Function PROCESS-KILL</a></dt>
     20447              <dt>process-output-wait, <a class="indexterm" href="#f_process-output-wait">Function PROCESS-OUTPUT-WAIT</a></dt>
     20448              <dt>process-preset, <a class="indexterm" href="#f_process-preset">Function PROCESS-PRESET</a></dt>
     20449              <dt>process-reset, <a class="indexterm" href="#f_process-reset">Function PROCESS-RESET</a></dt>
     20450              <dt>process-resume, <a class="indexterm" href="#f_process-resume">Function PROCESS-RESUME</a></dt>
     20451              <dt>process-run-function, <a class="indexterm" href="#f_process-run-function">Function PROCESS-RUN-FUNCTION</a></dt>
     20452              <dt>process-suspend, <a class="indexterm" href="#f_process-suspend">Function PROCESS-SUSPEND</a></dt>
     20453              <dt>process-suspend-count, <a class="indexterm" href="#f_process-suspend-count">Function PROCESS-SUSPEND-COUNT</a></dt>
     20454              <dt>process-wait, <a class="indexterm" href="#f_process-wait">Function PROCESS-WAIT</a></dt>
     20455              <dt>process-wait-with-timeout, <a class="indexterm" href="#f_process-wait-with-timeout">Function PROCESS-WAIT-WITH-TIMEOUT</a></dt>
     20456              <dt>process-whostate, <a class="indexterm" href="#f_process-whostate">Function PROCESS-WHOSTATE</a></dt>
    2043520457            </dl>
    2043620458          </div>
     
    2043820460            <h3>R</h3>
    2043920461            <dl>
    20440               <dt>receive-from, <a href="#f_receive-from">Function RECEIVE-FROM</a></dt>
    20441               <dt>release-lock, <a href="#f_release-lock">Function RELEASE-LOCK</a></dt>
    20442               <dt>remote-host, <a href="#f_remote-host">Function REMOTE-HOST</a></dt>
    20443               <dt>remote-port, <a href="#f_remote-port">Function REMOTE-PORT</a></dt>
    20444               <dt>remove-open-file-stream, <a href="#f_remove-open-file-stream">Function REMOVE-OPEN-FILE-STREAM</a></dt>
    20445               <dt>request-terminal-input-via-break, <a href="#v_request-terminal-input-via-break">Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*</a></dt>
    20446               <dt>rlet, <a href="#m_rlet">Macro RLET</a></dt>
    20447               <dt>rletz, <a href="#m_rletz">Macro RLETZ</a></dt>
    20448               <dt>run-program, <a href="#f_run-program">Function RUN-PROGRAM</a></dt>
     20462              <dt>receive-from, <a class="indexterm" href="#f_receive-from">Function RECEIVE-FROM</a></dt>
     20463              <dt>release-lock, <a class="indexterm" href="#f_release-lock">Function RELEASE-LOCK</a></dt>
     20464              <dt>remote-host, <a class="indexterm" href="#f_remote-host">Function REMOTE-HOST</a></dt>
     20465              <dt>remote-port, <a class="indexterm" href="#f_remote-port">Function REMOTE-PORT</a></dt>
     20466              <dt>remove-open-file-stream, <a class="indexterm" href="#f_remove-open-file-stream">Function REMOVE-OPEN-FILE-STREAM</a></dt>
     20467              <dt>request-terminal-input-via-break, <a class="indexterm" href="#v_request-terminal-input-via-break">Variable *REQUEST-TERMINAL-INPUT-VIA-BREAK*</a></dt>
     20468              <dt>rlet, <a class="indexterm" href="#m_rlet">Macro RLET</a></dt>
     20469              <dt>rletz, <a class="indexterm" href="#m_rletz">Macro RLETZ</a></dt>
     20470              <dt>run-program, <a class="indexterm" href="#f_run-program">Function RUN-PROGRAM</a></dt>
    2044920471            </dl>
    2045020472          </div>
     
    2045220474            <h3>S</h3>
    2045320475            <dl>
    20454               <dt>save-application, <a href="#Saving-Applications">Saving Applications</a></dt>
    20455               <dt>send-to, <a href="#f_send-to">Function SEND-TO</a></dt>
    20456               <dt>set-development-environment, <a href="#f_set-development-environment">Function SET-DEVELOPMENT-ENVIRONMENT</a></dt>
    20457               <dt>set-lisp-heap-gc-threshold, <a href="#f_set-lisp-heap-gc-threshold">Function SET-LISP-HEAP-GC-THRESHOLD</a></dt>
    20458               <dt>set-user-environment, <a href="#f_set-user-environment">Function SET-USER-ENVIRONMENT</a></dt>
    20459               <dt>setenv, <a href="#f_setenv">Function CCL::SETENV</a></dt>
    20460               <dt>setgid, <a href="#f_setgid">Function CCL::SETGID</a></dt>
    20461               <dt>setuid, <a href="#f_setuid">Function CCL::SETUID</a></dt>
    20462               <dt>shutdown, <a href="#f_shutdown">Function SHUTDOWN</a></dt>
    20463               <dt>signal-external-process, <a href="#f_signal-external-process">Function SIGNAL-EXTERNAL-PROCESS</a></dt>
    20464               <dt>signal-semaphore, <a href="#f_signal-semaphore">Function SIGNAL-SEMAPHORE</a></dt>
    20465               <dt>socket-address-family, <a href="#f_socket-address-family">Function SOCKET-ADDRESS-FAMILY</a></dt>
    20466               <dt>socket-connect, <a href="#f_socket-connect">Function SOCKET-CONNECT</a></dt>
    20467               <dt>socket-error, <a href="#c_socket-error">Class SOCKET-ERROR</a></dt>
    20468               <dt>socket-error-code, <a href="#f_socket-error-code">Function SOCKET-ERROR-CODE</a></dt>
    20469               <dt>socket-error-identifier, <a href="#f_socket-error-identifier">Function SOCKET-ERROR-IDENTIFIER</a></dt>
    20470               <dt>socket-error-situation, <a href="#f_socket-error-situation">Function SOCKET-ERROR-SITUATION</a></dt>
    20471               <dt>socket-format, <a href="#f_socket-format">Function SOCKET-FORMAT</a></dt>
    20472               <dt>socket-os-fd, <a href="#f_socket-os-fd">Function SOCKET-OS-FD</a></dt>
    20473               <dt>socket-type, <a href="#f_socket-type">Function SOCKET-TYPE</a></dt>
    20474               <dt>stream-deadline, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    20475               <dt>stream-device, <a href="#f_stream-device">Generic Function CCL::STREAM-DEVICE</a></dt>
    20476               <dt>stream-input-timeout, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    20477               <dt>stream-output-timeout, <a href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
    20478               <dt>stream-read-ivector, <a href="#f_stream-read-ivector">Generic Function STREAM-READ-IVECTOR</a></dt>
    20479               <dt>stream-read-list, <a href="#f_stream-read-list">Generic Function CCL:STREAM-READ-LIST</a></dt>
    20480               <dt>stream-read-vector, <a href="#f_stream-read-vector">Generic Function CCL:STREAM-READ-VECTOR</a></dt>
    20481               <dt>stream-write-ivector, <a href="#f_stream-write-ivector">Generic Function STREAM-WRITE-IVECTOR</a></dt>
    20482               <dt>stream-write-list, <a href="#f_stream-write-list">Generic Function CCL:STREAM-WRITE-LIST</a></dt>
    20483               <dt>stream-write-vector, <a href="#f_stream-write-vector">Generic Function CCL:STREAM-WRITE-VECTOR</a></dt>
     20476              <dt>save-application, <a class="indexterm" href="#Saving-Applications">Saving Applications</a></dt>
     20477              <dt>send-to, <a class="indexterm" href="#f_send-to">Function SEND-TO</a></dt>
     20478              <dt>set-development-environment, <a class="indexterm" href="#f_set-development-environment">Function SET-DEVELOPMENT-ENVIRONMENT</a></dt>
     20479              <dt>set-lisp-heap-gc-threshold, <a class="indexterm" href="#f_set-lisp-heap-gc-threshold">Function SET-LISP-HEAP-GC-THRESHOLD</a></dt>
     20480              <dt>set-user-environment, <a class="indexterm" href="#f_set-user-environment">Function SET-USER-ENVIRONMENT</a></dt>
     20481              <dt>setenv, <a class="indexterm" href="#f_setenv">Function CCL::SETENV</a></dt>
     20482              <dt>setgid, <a class="indexterm" href="#f_setgid">Function CCL::SETGID</a></dt>
     20483              <dt>setuid, <a class="indexterm" href="#f_setuid">Function CCL::SETUID</a></dt>
     20484              <dt>shutdown, <a class="indexterm" href="#f_shutdown">Function SHUTDOWN</a></dt>
     20485              <dt>signal-external-process, <a class="indexterm" href="#f_signal-external-process">Function SIGNAL-EXTERNAL-PROCESS</a></dt>
     20486              <dt>signal-semaphore, <a class="indexterm" href="#f_signal-semaphore">Function SIGNAL-SEMAPHORE</a></dt>
     20487              <dt>socket-address-family, <a class="indexterm" href="#f_socket-address-family">Function SOCKET-ADDRESS-FAMILY</a></dt>
     20488              <dt>socket-connect, <a class="indexterm" href="#f_socket-connect">Function SOCKET-CONNECT</a></dt>
     20489              <dt>socket-error, <a class="indexterm" href="#c_socket-error">Class SOCKET-ERROR</a></dt>
     20490              <dt>socket-error-code, <a class="indexterm" href="#f_socket-error-code">Function SOCKET-ERROR-CODE</a></dt>
     20491              <dt>socket-error-identifier, <a class="indexterm" href="#f_socket-error-identifier">Function SOCKET-ERROR-IDENTIFIER</a></dt>
     20492              <dt>socket-error-situation, <a class="indexterm" href="#f_socket-error-situation">Function SOCKET-ERROR-SITUATION</a></dt>
     20493              <dt>socket-format, <a class="indexterm" href="#f_socket-format">Function SOCKET-FORMAT</a></dt>
     20494              <dt>socket-os-fd, <a class="indexterm" href="#f_socket-os-fd">Function SOCKET-OS-FD</a></dt>
     20495              <dt>socket-type, <a class="indexterm" href="#f_socket-type">Function SOCKET-TYPE</a></dt>
     20496              <dt>stream-deadline, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20497              <dt>stream-device, <a class="indexterm" href="#f_stream-device">Generic Function CCL::STREAM-DEVICE</a></dt>
     20498              <dt>stream-input-timeout, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20499              <dt>stream-output-timeout, <a class="indexterm" href="#Stream-Timeouts-And-Deadlines">Stream Timeouts and Deadlines</a></dt>
     20500              <dt>stream-read-ivector, <a class="indexterm" href="#f_stream-read-ivector">Generic Function STREAM-READ-IVECTOR</a></dt>
     20501              <dt>stream-read-list, <a class="indexterm" href="#f_stream-read-list">Generic Function CCL:STREAM-READ-LIST</a></dt>
     20502              <dt>stream-read-vector, <a class="indexterm" href="#f_stream-read-vector">Generic Function CCL:STREAM-READ-VECTOR</a></dt>
     20503              <dt>stream-write-ivector, <a class="indexterm" href="#f_stream-write-ivector">Generic Function STREAM-WRITE-IVECTOR</a></dt>
     20504              <dt>stream-write-list, <a class="indexterm" href="#f_stream-write-list">Generic Function CCL:STREAM-WRITE-LIST</a></dt>
     20505              <dt>stream-write-vector, <a class="indexterm" href="#f_stream-write-vector">Generic Function CCL:STREAM-WRITE-VECTOR</a></dt>
    2048420506            </dl>
    2048520507          </div>
     
    2048720509            <h3>T</h3>
    2048820510            <dl>
    20489               <dt>terminate-when-unreachable, <a href="#f_terminate-when-unreachable">Function TERMINATE-WHEN-UNREACHABLE</a></dt>
    20490               <dt>timed-wait-on-semaphore, <a href="#f_timed-wait-on-semaphore">Function TIMED-WAIT-ON-SEMAPHORE</a></dt>
    20491               <dt>try-lock, <a href="#f_try-lock">Function TRY-LOCK</a></dt>
     20511              <dt>terminate-when-unreachable, <a class="indexterm" href="#f_terminate-when-unreachable">Function TERMINATE-WHEN-UNREACHABLE</a></dt>
     20512              <dt>timed-wait-on-semaphore, <a class="indexterm" href="#f_timed-wait-on-semaphore">Function TIMED-WAIT-ON-SEMAPHORE</a></dt>
     20513              <dt>try-lock, <a class="indexterm" href="#f_try-lock">Function TRY-LOCK</a></dt>
    2049220514            </dl>
    2049320515          </div>
     
    2049520517            <h3>U</h3>
    2049620518            <dl>
    20497               <dt>unuse-interface-dir, <a href="#f_unuse-interface-dir">Function UNUSE-INTERFACE-DIR</a></dt>
    20498               <dt>use-interface-dir, <a href="#f_use-interface-dir">Function USE-INTERFACE-DIR</a></dt>
    20499               <dt>use-lisp-heap-gc-threshold, <a href="#f_use-lisp-heap-gc-threshold">Function USE-LISP-HEAP-GC-THRESHOLD</a></dt>
     20519              <dt>unuse-interface-dir, <a class="indexterm" href="#f_unuse-interface-dir">Function UNUSE-INTERFACE-DIR</a></dt>
     20520              <dt>use-interface-dir, <a class="indexterm" href="#f_use-interface-dir">Function USE-INTERFACE-DIR</a></dt>
     20521              <dt>use-lisp-heap-gc-threshold, <a class="indexterm" href="#f_use-lisp-heap-gc-threshold">Function USE-LISP-HEAP-GC-THRESHOLD</a></dt>
    2050020522            </dl>
    2050120523          </div>
     
    2050320525            <h3>W</h3>
    2050420526            <dl>
    20505               <dt>wait-on-semaphore, <a href="#f_wait-on-semaphore">Function WAIT-ON-SEMAPHORE</a></dt>
    20506               <dt>with-altivec-registers, <a href="#lapm_with-altivec-registers">LAP Macro WITH-ALTIVEC-REGISTERS</a></dt>
    20507               <dt>with-lock-grabbed, <a href="#m_with-lock-grabbed">Macro WITH-LOCK-GRABBED</a></dt>
    20508               <dt>with-open-socket, <a href="#m_with-open-socket">Macro WITH-OPEN-SOCKET</a></dt>
    20509               <dt>with-read-lock, <a href="#m_with-read-lock">Macro WITH-READ-LOCK</a></dt>
    20510               <dt>with-terminal-input, <a href="#m_with-terminal-input">Macro WITH-TERMINAL-INPUT</a></dt>
    20511               <dt>with-vector-buffer, <a href="#lapm_with-vector-buffer">LAP Macro WITH-VECTOR-BUFFER</a></dt>
    20512               <dt>with-write-lock, <a href="#m_with-write-lock">Macro WITH-WRITE-LOCK</a></dt>
    20513               <dt>without-interrupts, <a href="#m_without-interrupts">Macro WITHOUT-INTERRUPTS</a></dt>
     20527              <dt>wait-on-semaphore, <a class="indexterm" href="#f_wait-on-semaphore">Function WAIT-ON-SEMAPHORE</a></dt>
     20528              <dt>with-altivec-registers, <a class="indexterm" href="#lapm_with-altivec-registers">LAP Macro WITH-ALTIVEC-REGISTERS</a></dt>
     20529              <dt>with-lock-grabbed, <a class="indexterm" href="#m_with-lock-grabbed">Macro WITH-LOCK-GRABBED</a></dt>
     20530              <dt>with-open-socket, <a class="indexterm" href="#m_with-open-socket">Macro WITH-OPEN-SOCKET</a></dt>
     20531              <dt>with-read-lock, <a class="indexterm" href="#m_with-read-lock">Macro WITH-READ-LOCK</a></dt>
     20532              <dt>with-terminal-input, <a class="indexterm" href="#m_with-terminal-input">Macro WITH-TERMINAL-INPUT</a></dt>
     20533              <dt>with-vector-buffer, <a class="indexterm" href="#lapm_with-vector-buffer">LAP Macro WITH-VECTOR-BUFFER</a></dt>
     20534              <dt>with-write-lock, <a class="indexterm" href="#m_with-write-lock">Macro WITH-WRITE-LOCK</a></dt>
     20535              <dt>without-interrupts, <a class="indexterm" href="#m_without-interrupts">Macro WITHOUT-INTERRUPTS</a></dt>
    2051420536            </dl>
    2051520537          </div>
     
    2052020542      <a href="#Symbol-Index">Symbol Index</a>
    2052120543    </div>
    20522     <p xmlns="http://www.w3.org/TR/xhtml1/transitional" xmlns:date="http://exslt.org/dates-and-times" class="footer">This document was last modified at 2:17 PM on April 10, 2008, in UTC.<br></br>It uses version 1.72.0 of the Norman Walsh Docbook stylesheets.<br></br>Using libxml 20616, libxslt 10112 and libexslt 810.</p>
     20544    <p xmlns="http://www.w3.org/TR/xhtml1/transitional" xmlns:date="http://exslt.org/dates-and-times" class="footer">This document was last modified at 10:46 on April 20, 2008, in UTC.<br></br>It uses version 1.73.2 of the Norman Walsh Docbook stylesheets.<br></br>Built from subversion rev 9206<br></br>Using libxml 20631, libxslt 10122 and libexslt 813.</p>
    2052320545  </body>
    2052420546</html>
  • release/1.2/source/doc/src

    • Property svn:ignore set to
      build*
      *html
  • release/1.2/source/doc/src/Makefile.fedora

    r8574 r9219  
    5555# Compute some targets.
    5656
    57 XMLFILES = $(wildcard [0-9][0-9]-*.xml) ccl-documentation.xml
     57XMLFILES = $(wildcard *.xml)
    5858XSLFILES = $(shell find xsl -name "*.xsl")
    59 #HTMLFILES = $(patsubst %.xml,%.html, $(XMLFILES))
    6059HTMLFILES = ccl-documentation.html
    6160
     
    6362
    6463XSLTPROCVERSION = $(shell $(XSLTPROC) --version | head -n 1)
     64
     65# Try to determine the svn revishion
     66SVNREV = $(shell /usr/bin/svnversion)
     67
    6568
    6669.PHONY: all clean distclean
     
    7174
    7275install: $(HTMLFILES) distclean
    73         cp $(HTMLFILES) ../HTML
     76        cp $(HTMLFILES) ../
    7477
    7578$(TEMP):
  • release/1.2/source/doc/src/Makefile.macports

    r8574 r9219  
    1212
    1313XSLTPROC = /usr/bin/xsltproc
     14
     15# Try to determine the svn revishion
     16SVNREV = $(shell /usr/bin/svnversion)
    1417
    1518
     
    5861# Compute some targets.
    5962
    60 XMLFILES = $(wildcard [0-9][0-9]-*.xml) ccl-documentation.xml
     63XMLFILES = $(wildcard *.xml)
    6164XSLFILES = $(shell find xsl -name "*.xsl")
    6265HTMLFILES = ccl-documentation.html
     
    7376
    7477install: $(HTMLFILES) distclean
    75         cp $(HTMLFILES) ../HTML
     78        cp $(HTMLFILES) ../
    7679
    7780$(TEMP):
  • release/1.2/source/doc/src/makehtml

    r8574 r9219  
    88                        $(if $(findstring Doc, $(@D)), 0, 1) \
    99                --stringparam xsltproc.version "$(XSLTPROCVERSION)." \
     10                --stringparam svnrev "$(SVNREV)"\
    1011                $(EXTRAPARAMS) \
    1112                $(STYLESHEET) $<
  • release/1.2/source/doc/src/xsl/footer.xsl

    r8555 r9219  
    2323      <xsl:variable name="now" select="date:date-time()"/>
    2424      <xsl:text>This document was last modified at </xsl:text>
    25       <xsl:choose>
    26         <xsl:when test="date:hour-in-day($now) = 0">
    27           <xsl:text>12:</xsl:text>
    28           <xsl:number value="date:minute-in-hour($now)" format="01"/>
    29           <xsl:text> AM</xsl:text>
    30         </xsl:when>
    31         <xsl:when test="date:hour-in-day($now) &lt; 12">
    32           <xsl:value-of select="date:hour-in-day($now)"/>
    33           <xsl:text>:</xsl:text>
    34           <xsl:number value="date:minute-in-hour($now)" format="01"/>
    35           <xsl:text> AM</xsl:text>
    36         </xsl:when>
    37         <xsl:when test="date:hour-in-day($now) = 12">
    38           <xsl:text>12:</xsl:text>
    39           <xsl:number value="date:minute-in-hour($now)" format="01"/>
    40           <xsl:text> PM</xsl:text>
    41         </xsl:when>
    42         <xsl:otherwise>
    43           <xsl:value-of select="date:hour-in-day($now) - 12"/>
    44           <xsl:text>:</xsl:text>
    45           <xsl:number value="date:minute-in-hour($now)" format="01"/>
    46           <xsl:text> PM</xsl:text>
    47         </xsl:otherwise>
    48       </xsl:choose>
     25      <xsl:value-of select="date:hour-in-day($now)"/>
     26      <xsl:text>:</xsl:text>
     27      <xsl:value-of select="date:minute-in-hour($now)"/>     
    4928      <xsl:text> on </xsl:text>
    5029      <xsl:value-of select="date:month-name($now)"/>
     
    5938      <xsl:text> of the Norman Walsh Docbook stylesheets.</xsl:text>
    6039      <br/>
     40      <xsl:text>Built from subversion rev </xsl:text>
     41      <xsl:value-of select="$svnrev"/>
     42      <br/>
    6143      <xsl:value-of select="$xsltproc.version"/>
    6244    </p>
  • release/1.2/source/level-1/linux-files.lisp

    r9007 r9219  
    540540
    541541(defun %read-dir (dir)
    542   (let* ((res (#_readdir dir)))
    543     (unless (%null-ptr-p res)
    544       (get-foreign-namestring (pref res :dirent.d_name)))))
     542  (rlet ((entry #>dirent)
     543         (presult :address +null-ptr+))
     544    (let* ((err (#_readdir_r dir entry presult))
     545           (result (%get-ptr presult)))
     546      (declare (fixnum err) (dynamic-extent result))
     547      (when (zerop err)
     548        (unless (%null-ptr-p result)
     549          (get-foreign-namestring (pref result #>dirent.d_name)))))))
    545550
    546551(defun tcgetpgrp (fd)
  • release/1.2/source/lib/foreign-types.lisp

    r8541 r9219  
    17131713      (canonicalize-foreign-type-ordinal '(:* (:struct :hostent)))
    17141714      (canonicalize-foreign-type-ordinal '(:array :int 2))
    1715       (canonicalize-foreign-type-ordinal '(:array (:struct :pollfd) 1)))))
     1715      (canonicalize-foreign-type-ordinal '(:array (:struct :pollfd) 1))
     1716      (canonicalize-foreign-type-ordinal '(:struct :dirent)))))
    17161717
    17171718(defun install-standard-foreign-types (ftd)
  • release/1.2/source/tools/asdf-install/COPYRIGHT

    r2590 r9219  
    1515MK:DEFSYSTEM which includes the files load-asdf-install.lisp,
    1616loader.lisp, and finally split-sequence.lisp which has its own
    17 copyright notice.
     17copyright notice. ASDF-Install is currently maintained by Gary King
     18<gwking@metabang.com> and is hosted on Common-Lisp.net.
    1819
    1920The complete code distributed with this archive (asdf-install.tar.gz)
  • release/1.2/source/tools/asdf-install/asdf-install.asd

    r926 r9219  
    11;;; -*-  Lisp -*-
     2
     3;;; Portatble ASDF-Install is based on Dan Barlow's ASDF-Install
     4;; (see the file COPYRIGHT for details). It is currently maintained
     5;; by Gary King <gwking@metabang.com>.
    26
    37(defpackage #:asdf-install-system
     
    59
    610(in-package #:asdf-install-system)
    7 #+:sbcl
    8 (require 'sb-executable)
    9 
    10 ;;; this is appalling misuse of asdf.  please don't treat it as any
    11 ;;; kind of example.  this shouldn't be a compile-op, or if it is, should
    12 ;;; define output-files properly instead of leaving it be the fasl
    13 #+:sbcl
    14 (defclass exe-file (cl-source-file) ())
    15 #+:sbcl
    16 (defmethod perform :after ((o compile-op) (c exe-file))
    17   (sb-executable:make-executable
    18    (make-pathname :name "asdf-install"
    19                   :type nil
    20                   :defaults (component-pathname c))
    21    (output-files o c)
    22    :initial-function "RUN"))
    23 
    24 #+:sbcl
    25 (defmethod perform ((o load-op) (c exe-file)) nil)
    2611
    2712(defsystem asdf-install
    2813  #+:sbcl :depends-on
    29   #+:sbcl (sb-posix sb-bsd-sockets)
    30   :version "0.3"
     14  #+:sbcl (sb-bsd-sockets)
     15  :version "0.6.10"
     16  :author "Dan Barlow <dan@telent.net>, Edi Weitz <edi@agharta.de> and many others. See the file COPYRIGHT for more details."
     17  :maintainer "Gary Warren King <gwking@metabang.com>"
    3118  :components ((:file "defpackage")
    32                #+:sbcl
    33                (:exe-file "loader" :depends-on ("installer"))
    34                (:file "split-sequence")
     19               (:file "split-sequence" :depends-on ("defpackage"))
     20               
    3521               (:file "port" :depends-on ("defpackage"))
    3622               #+:digitool
    3723               (:file "digitool" :depends-on ("port"))
    38                (:file "installer" :depends-on ("port" "split-sequence" #+:digitool "digitool"))))
    39                
     24               
     25               (:file "conditions" :depends-on ("defpackage" "variables"))
     26               (:file "variables" :depends-on ("port"))
     27               (:file "installer"
     28                      :depends-on ("port" "split-sequence"
     29                                          #+:digitool "digitool"
     30                                          "conditions" "variables"))
     31               (:file "deprecated" :depends-on ("installer")))
     32  :in-order-to ((test-op (load-op test-asdf-install)))
     33  :perform (test-op :after (op c)
     34                    (funcall
     35                      (intern (symbol-name '#:run-tests) :lift)
     36                      :config :generic)))
     37           
    4038(defmethod perform :after ((o load-op) (c (eql (find-system :asdf-install))))
     39  (let ((show-version (find-symbol
     40                       (symbol-name '#:show-version-information)
     41                       '#:asdf-install)))
     42    (when (and show-version (fboundp show-version))
     43      (funcall show-version)))
    4144  (provide 'asdf-install))
    4245
     46(defmethod operation-done-p
     47    ((o test-op) (c (eql (find-system :asdf-install))))
     48  nil)
     49
     50#+(or)
    4351(defmethod perform ((o test-op) (c (eql (find-system :asdf-install))))
    4452  t)
  • release/1.2/source/tools/asdf-install/defpackage.lisp

    r2590 r9219  
    11(cl:in-package :cl-user)
    22
    3 (defpackage :asdf-install
    4   (:use "CL")
     3(defpackage #:asdf-install
     4  (:use #:common-lisp)
     5 
     6  #+asdf
     7  (:import-from #:asdf #:*defined-systems*)
    58  (:export
    69
    710   ;; Customizable variables.
     11   #:*shell-path*
    812   #:*proxy*
    913   #:*cclan-mirror*
    10    #:*sbcl-home* ; Deprecated.
    1114   #:asdf-install-dirs
    1215   #:private-asdf-install-dirs
     16   #:*tar-extractors*
    1317
     18   #:*shell-search-paths*
    1419   #:*verify-gpg-signatures*
    1520   #:*locations*
    1621   #:*safe-url-prefixes*
    1722   #:*preferred-location*
    18 
    19    #+(or :win32 :mswindows)
    20    #:*cygwin-bin-directory*
    21 
    22    #+(or :win32 :mswindows)
    23    #:*cygwin-bash-command*
    24 
     23   #:*temporary-directory*
     24   
    2525   ;; External entry points.   
    2626   #:add-locations
    27    #+(and asdf (or :win32 :mswindows))
    28    #:sysdef-source-dir-search
     27   #:add-registry-location
    2928   #:uninstall
    3029   #:install
     30   #:asdf-install-version
     31
     32   #+(and asdf (or :win32 :mswindows))
     33   #:sysdef-source-dir-search   
     34   
    3135   ;; proxy authentication
    3236   #:*proxy-user*
    33    #:*proxy-passwd*))
     37   #:*proxy-passwd*
     38   
     39   ;; conditions
     40   #:download-error
     41   #:signature-error
     42   #:gpg-error
     43   #:gpg-shell-error
     44   #:key-not-found
     45   #:key-not-trusted
     46   #:author-not-trusted
     47   #:installation-abort
    3448
    35 (defpackage :asdf-install-customize
    36   (:use "CL" "ASDF-INSTALL"))
     49   ;; restarts
     50   #:install-anyways
     51   )
     52 
     53  #+(or :win32 :mswindows)
     54  (:export
     55   #:*cygwin-bin-directory*
     56   #:*cygwin-bash-command*))
     57
     58(defpackage #:asdf-install-customize
     59  (:use #:common-lisp #:asdf-install))
  • release/1.2/source/tools/asdf-install/digitool.lisp

    r503 r9219  
    66;;; 2008-01-22 added exit-code checks to call-system
    77
    8 (in-package :asdf-install)
     8(in-package #:asdf-install)
    99
    1010#+:digitool
  • release/1.2/source/tools/asdf-install/installer.lisp

    r2590 r9219  
    1 (in-package :asdf-install)
     1(in-package #:asdf-install)
    22
    33(pushnew :asdf-install *features*)
    44
    55(defun installer-msg (stream format-control &rest format-arguments)
    6   (apply #'format stream ";;; ASDF-INSTALL: ~@?~%" format-control format-arguments))
    7 
    8 
    9 #+:digitool
    10 (defparameter *home-volume-name*
    11   (second (pathname-directory (truename (user-homedir-pathname))))
    12   "Digitool MCL retains the OS 9 convention that ALL volumes have a
    13 name which includes the startup volume. OS X doesn't know about this.
    14 This figures in the home path and in the normalization for system
    15 namestrings.")
    16 
    17 (defvar *proxy* (get-env-var "http_proxy"))
    18 
    19 (defvar *cclan-mirror*
    20   (or (get-env-var "CCLAN_MIRROR")
    21       "http://ftp.linux.org.uk/pub/lisp/cclan/"))
    22 
    23 #+(or :win32 :mswindows)
    24 (defvar *cygwin-bin-directory*
    25   (pathname "C:\\PROGRA~1\\Cygwin\\bin\\"))
    26 
    27 #+(or :win32 :mswindows)
    28 (defvar *cygwin-bash-program*
    29   "C:\\PROGRA~1\\Cygwin\\bin\\bash.exe")
    30 
    31 (defvar *gnu-tar-program*
    32   "tar"
    33   "Path to the GNU tar program")
    34 
    35 (eval-when (:compile-toplevel :load-toplevel :execute)
    36   (defparameter *supported-defsystems*
    37     (list :mk-defsystem
    38           :asdf
    39 
    40           ;; Add others.
    41           ;; #+lispworks :common-defsystem
    42           ))
    43          
    44 
    45   (unless (some (lambda (defsys-tag)
    46                   (member defsys-tag *features*))
    47                 *features*)
    48     (error "ASDF-INSTALL requires one of the following \"defsystem\" utilities to work."
    49            *supported-defsystems*)))
    50 
    51 
    52 
    53 (defun directorify (name)
    54   ;; input name may or may not have a trailing #\/, but we know we
    55   ;; want a directory
    56   (let ((path (pathname name)))
    57     (if (pathname-name path)
    58         (merge-pathnames
    59          (make-pathname :directory `(:relative ,(pathname-name path))
    60                         :name "")
    61          path)
    62         path)))
    63 
    64 (defvar *asdf-install-dirs*
    65   (directorify (or #+sbcl (get-env-var "SBCL_HOME")
    66                    (get-env-var "ASDF_INSTALL_DIR")
    67                    (make-pathname :directory
    68                                   `(:absolute
    69                                     #+digitool ,*home-volume-name*
    70                                     "usr" "local" "asdf-install")))))
    71 
    72 #+sbcl ; Deprecated.
    73 (define-symbol-macro *sbcl-home* *asdf-install-dirs*)
    74 
    75 
    76 (defvar *private-asdf-install-dirs*
    77   #+:sbcl
    78   (merge-pathnames (make-pathname :directory '(:relative ".sbcl"))
    79                    (truename (user-homedir-pathname)))
    80   #-:sbcl
    81   (cond ((get-env-var "PRIVATE_ASDF_INSTALL_DIR")
    82           (directorify (get-env-var "PRIVATE_ASDF_INSTALL_DIR")))
    83         (t
    84           (merge-pathnames (make-pathname :directory '(:relative ".asdf-install-dir"))
    85                            (truename (user-homedir-pathname))))))
    86 
    87 #+sbcl ; Deprecated.
    88 (define-symbol-macro *dot-sbcl* *private-asdf-install-dirs*)
    89 
    90 
    91 (defvar *trusted-uids* nil)
    92 
    93 (defvar *verify-gpg-signatures* t)
    94 
    95 (defvar *safe-url-prefixes* nil)
    96 
    97 (defvar *preferred-location* nil)
     6  (apply #'format stream "~&;;; ASDF-INSTALL: ~@?~%"
     7         format-control format-arguments))
    988
    999(defun verify-gpg-signatures-p (url)
     
    10919      (t t))))
    11020         
    111 (defparameter *locations*
    112   `((,(merge-pathnames (make-pathname :directory '(:relative "site"))
    113                        *asdf-install-dirs*)
    114      ,(merge-pathnames (make-pathname :directory '(:relative "site-systems"))
    115                        *asdf-install-dirs*)
    116      "System-wide install")
    117     (,(merge-pathnames (make-pathname :directory '(:relative "site"))
    118                        *private-asdf-install-dirs*)
    119      ,(merge-pathnames (make-pathname :directory '(:relative "systems"))
    120                        *private-asdf-install-dirs*)
    121      "Personal installation")))
    122 
    123 
    124 #+(and (not :sbcl) :asdf)
    125 (pushnew `(merge-pathnames ,(make-pathname :directory '(:relative "site-systems"))
    126                            ,*asdf-install-dirs*)
    127          asdf:*central-registry*
    128          :test #'equal)
    129 
    130 #+(and (not :sbcl) :asdf)
    131 (pushnew `(merge-pathnames ,(make-pathname :directory '(:relative "systems"))
    132                            ,*private-asdf-install-dirs*)
    133          asdf:*central-registry*
    134          :test #'equal)
    135 
    136 #+mk-defsystem
    137 (mk:add-registry-location
    138  (merge-pathnames (make-pathname :directory '(:relative "site-systems"))
    139                   *private-asdf-install-dirs*))
    140 
    141 #+mk-defsystem
    142 (mk:add-registry-location
    143  (merge-pathnames (make-pathname :directory '(:relative "systems"))
    144                   *private-asdf-install-dirs*))
    145 
     21(defun same-central-registry-entry-p (a b)
     22  (flet ((ensure-string (x)
     23           (typecase x
     24             (string x)
     25             (pathname (namestring (translate-logical-pathname x)))
     26             (t nil))))
     27    (and (setf a (ensure-string a))
     28         (setf b (ensure-string b))
     29         a b (string-equal a b))))
     30
     31(defun add-registry-location (location)
     32  (let ((location-directory (pathname-sans-name+type location)))
     33    #+asdf
     34    (pushnew location-directory
     35             asdf:*central-registry*
     36             :test #'same-central-registry-entry-p)
     37 
     38    #+mk-defsystem
     39    (mk:add-registry-location location-directory)))
    14640
    14741;;; Fixing the handling of *LOCATIONS*
     
    16256        (append *locations* (list (list site system-site loc-name)))))
    16357
    164 
    165 
    166 (eval-when (:load-toplevel :execute)
    167   (let* ((*package* (find-package :asdf-install-customize))
    168          (file (probe-file (merge-pathnames
    169                             (make-pathname :name ".asdf-install")
    170                             (truename (user-homedir-pathname)))))
    171          )
    172     (when file (load file))))
    173 
    174 
    175 ;;;---------------------------------------------------------------------------
    176 ;;; Conditions.
    177 
    178 (define-condition download-error (error)
    179   ((url :initarg :url :reader download-url)
    180    (response :initarg :response :reader download-response))
    181   (:report (lambda (c s)
    182              (format s "Server responded ~A for GET ~A"
    183                      (download-response c) (download-url c)))))
    184 
    185 (define-condition signature-error (error)
    186   ((cause :initarg :cause :reader signature-error-cause))
    187   (:report (lambda (c s)
    188              (format s "Cannot verify package signature:  ~A"
    189                      (signature-error-cause c)))))
    190 
    191 (define-condition gpg-error (error)
    192   ((message :initarg :message :reader gpg-error-message))
    193   (:report (lambda (c s)
    194              (format s "GPG failed with error status:~%~S"
    195                      (gpg-error-message c)))))
    196 
    197 (define-condition no-signature (gpg-error) ())
    198 
    199 (define-condition key-not-found (gpg-error)
    200   ((key-id :initarg :key-id :reader key-id))
    201   (:report (lambda (c s)
    202              (format s "No key found for key id 0x~A. ~
    203                         Try some command like ~%  gpg  --recv-keys 0x~A"
    204                      (key-id c) (key-id c)))))
    205 
    206 (define-condition key-not-trusted (gpg-error)
    207   ((key-id :initarg :key-id :reader key-id)
    208    (key-user-name :initarg :key-user-name :reader key-user-name))
    209   (:report (lambda (c s)
    210              (format s "GPG warns that the key id 0x~A (~A) is not fully trusted"
    211                      (key-id c) (key-user-name c)))))
    212 
    213 (define-condition author-not-trusted (gpg-error)
    214   ((key-id :initarg :key-id :reader key-id)
    215    (key-user-name :initarg :key-user-name :reader key-user-name))
    216   (:report (lambda (c s)
    217              (format s "~A (key id ~A) is not on your package supplier list"
    218                      (key-user-name c) (key-id c)))))
    219  
    220 
    22158;;;---------------------------------------------------------------------------
    22259;;; URL handling.
     
    23269  (assert (string-equal url "http://" :end1 7))
    23370  (let ((port-start (position #\: url :start 7)))
    234     (if port-start (parse-integer url :start (1+ port-start) :junk-allowed t) 80)))
     71    (if port-start
     72        (parse-integer url :start (1+ port-start) :junk-allowed t) 80)))
    23573
    23674; This is from Juri Pakaste's <juri@iki.fi> base64.lisp
     
    269107    result))
    270108
    271 (defvar *proxy-user* nil)
    272 (defvar *proxy-passwd* nil)
     109(defun request-uri (url)
     110  (assert (string-equal url "http://" :end1 7))
     111  (if *proxy*
     112      url
     113      (let ((path-start (position #\/ url :start 7)))
     114        (assert (and path-start) nil "url does not specify a file.")
     115        (subseq url path-start))))
    273116
    274117(defun url-connection (url)
     
    276119        (host (url-host url)))
    277120    (format stream "GET ~A HTTP/1.0~C~CHost: ~A~C~CCookie: CCLAN-SITE=~A~C~C"
    278             url #\Return #\Linefeed
     121            (request-uri url) #\Return #\Linefeed
    279122            host #\Return #\Linefeed
    280123            *cclan-mirror* #\Return #\Linefeed)
     
    285128    (format stream "~C~C" #\Return #\Linefeed)
    286129    (force-output stream)
    287     (flet (#-:digitool
    288            (read-header-line ()
    289              (read-line stream))
    290            #+:digitool
    291            (read-header-line (&aux (line (make-array 16
    292                                                      :element-type 'character
    293                                                      :adjustable t
    294                                                      :fill-pointer 0))
    295                                    (byte nil))
    296              (print (multiple-value-bind (reader arg)
    297                         (ccl::stream-reader stream)
    298                       (loop (setf byte (funcall reader arg))
    299                             (case byte
    300                               ((nil)
    301                                 (return))
    302                               ((#.(char-code #\Return)
    303                                   #.(char-code #\Linefeed))
    304                                 (case (setf byte (funcall reader arg))
    305                                   ((nil #.(char-code #\Return) #.(char-code #\Linefeed)))
    306                                   (t (ccl:stream-untyi stream byte)))
    307                                 (return))
    308                               (t
    309                                 (vector-push-extend (code-char byte) line))))
    310                       (when (or byte (plusp (length line)))
    311                         line)))))
    312       (list
    313        (let* ((l (read-header-line))
    314               (space (position #\Space l)))
    315          (parse-integer l :start (1+ space) :junk-allowed t))
    316        (loop for line = (read-header-line)
    317              until (or (null line)
    318                        (zerop (length line))
    319                        (eql (elt line 0) (code-char 13)))
    320              collect
    321              (let ((colon (position #\: line)))
    322                (cons (intern (string-upcase (subseq line 0 colon)) :keyword)
    323                      (string-trim (list #\Space (code-char 13))
    324                                   (subseq line (1+ colon))))))
    325        stream))))
    326 
    327 
    328 (defun download-files-for-package (package-name-or-url file-name)
    329   (let ((url (if (= (mismatch package-name-or-url "http://") 7)
    330                  package-name-or-url
    331                  (format nil "http://www.cliki.net/~A?download"
    332                          package-name-or-url)))
    333         )
    334     (destructuring-bind (response headers stream)
    335         (block got
    336           (loop
    337            (destructuring-bind (response headers stream) (url-connection url)
    338              (unless (member response '(301 302))             
    339                (return-from got (list response headers stream)))
    340              (close stream)
    341              (setf url (cdr (assoc :location headers))))))
    342       (when (>= response 400)
    343         (error 'download-error :url url :response response))
    344       (let ((length (parse-integer (or (cdr (assoc :content-length headers)) "")
    345                                    :junk-allowed t)))
    346         (installer-msg t "Downloading ~A bytes from ~A to ~A ..."
    347                        (or length "some unknown number of")
    348                        url
    349                        file-name)
    350         (force-output)
    351         #+:clisp (setf (stream-element-type stream)
    352                        '(unsigned-byte 8))
    353         (with-open-file (o file-name :direction :output
    354                            #+(or :clisp :digitool (and :lispworks :win32))
    355                            :element-type
    356                            #+(or :clisp :digitool (and :lispworks :win32))
    357                            '(unsigned-byte 8)
    358                            :if-exists :supersede)
    359           #+(or :cmu :digitool)
    360           (copy-stream stream o)
    361           #-(or :cmu :digitool)
    362           (if length
    363               (let ((buf (make-array length
    364                                      :element-type
    365                                      (stream-element-type stream))))
    366                 #-:clisp (read-sequence buf stream)
    367                 #+:clisp (ext:read-byte-sequence buf stream :no-hang nil)
    368                 (write-sequence buf o))
    369               (copy-stream stream o))))
    370       (close stream)
    371       (terpri)
    372       (restart-case
    373           (verify-gpg-signature/url url file-name)
    374         (skip-gpg-check (&rest rest)
    375                         :report "Don't ckeck GPG signature for this package"
    376                         (declare (ignore rest))
    377                         nil)))))
    378 
    379 
    380 (defun read-until-eof (stream)
    381   (with-output-to-string (o)
    382     (copy-stream stream o)))
    383 
     130    (list
     131     (let* ((l (read-header-line stream))
     132            (space (position #\Space l)))
     133       (parse-integer l :start (1+ space) :junk-allowed t))
     134     (loop for line = (read-header-line stream)
     135           until (or (null line)
     136                     (zerop (length line))
     137                     (eql (elt line 0) (code-char 13)))
     138           collect
     139           (let ((colon (position #\: line)))
     140             (cons (intern (string-upcase (subseq line 0 colon)) :keyword)
     141                   (string-trim (list #\Space (code-char 13))
     142                                (subseq line (1+ colon))))))
     143     stream)))
     144
     145(defun download-link-for-package (package-name-or-url)
     146  (if (= (mismatch package-name-or-url "http://") 7)
     147    package-name-or-url
     148    (format nil "http://www.cliki.net/~A?download"
     149            package-name-or-url)))
     150
     151(defun download-link-for-signature (url)
     152  (concatenate 'string url ".asc"))
     153
     154(defun download-files-for-package (package-name-or-url)
     155  (multiple-value-bind (package-url package-file)
     156      (download-url-to-temporary-file
     157       (download-link-for-package package-name-or-url))
     158    (if (verify-gpg-signatures-p package-name-or-url)
     159        (multiple-value-bind (signature-url signature-file)
     160            (download-url-to-temporary-file
     161             (download-link-for-signature package-url))
     162          (declare (ignore signature-url))
     163          (values package-file signature-file))
     164        (values package-file nil))))
    384165 
    385 (defun verify-gpg-signature/string (string file-name)
    386   (let ((gpg-stream (make-stream-from-gpg-command string file-name))
    387         tags)
    388     (unwind-protect
    389       (loop for l = (read-line gpg-stream nil nil)
    390             while l
    391             do (print l)
    392             when (> (mismatch l "[GNUPG:]") 6)
    393             do (destructuring-bind (_ tag &rest data)
    394                    (split-sequence:split-sequence-if (lambda (x)
    395                                                        (find x '(#\Space #\Tab)))
    396                                                      l)
    397                (declare (ignore _))
    398                (pushnew (cons (intern tag :keyword)
    399                               data) tags)))
    400       (ignore-errors
    401         (close gpg-stream)))
    402     ;; test for obvious key/sig problems
    403     (let ((errsig (assoc :errsig tags)))
    404       (and errsig (error 'key-not-found :key-id (second errsig))))
    405     (let ((badsig (assoc :badsig tags)))
    406       (and badsig (error 'key-not-found :key-id (second badsig))))
    407     (let* ((good (assoc :goodsig tags))
    408            (id (second good))
    409            (name (format nil "~{~A~^ ~}" (nthcdr 2 good))))
    410       ;; good signature, but perhaps not trusted
    411       (unless (or (assoc :trust_ultimate tags)
    412                   (assoc :trust_fully tags))
    413         (cerror "Install the package anyway"
    414                 'key-not-trusted
    415                 :key-user-name name
    416                 :key-id id))
    417       (loop
    418        (when
    419            (restart-case
    420                (or (assoc id *trusted-uids* :test #'equal)
    421                    (error 'author-not-trusted
    422                           :key-user-name name
    423                           :key-id id))
    424              (add-key (&rest rest)
    425                :report "Add to package supplier list"
    426                (declare (ignore rest))
    427                (pushnew (list id name) *trusted-uids*)))
    428          (return))))))
    429 
    430 
    431 (defun verify-gpg-signature/url (url file-name)
    432   (when (verify-gpg-signatures-p url)
    433     (destructuring-bind (response headers stream)
    434         (url-connection (concatenate 'string url ".asc"))
    435       (unwind-protect
    436         (flet (#-:digitool
    437                (read-signature (data stream)
    438                  (read-sequence data stream))
    439                #+:digitool
    440                (read-signature (data stream)
    441                  (multiple-value-bind (reader arg)
    442                      (ccl:stream-reader stream)
    443                    (let ((byte 0))
    444                      (dotimes (i (length data))
    445                        (unless (setf byte (funcall reader arg))
    446                          (error 'download-error :url  (concatenate 'string url ".asc")
    447                                 :response 200))
    448                        (setf (char data i) (code-char byte)))))))
    449           (if (= response 200)
    450             (let ((data (make-string (parse-integer
    451                                       (cdr (assoc :content-length headers))
    452                                       :junk-allowed t))))
    453               (read-signature data stream)
    454               (verify-gpg-signature/string data file-name))
    455             (error 'download-error :url  (concatenate 'string url ".asc")
    456                    :response response)))
    457         (close stream)))))
    458 
    459 
    460 (define-condition installation-abort (condition)
    461   ()
    462   (:report (lambda (c s)
    463              (declare (ignore c))
    464              (installer-msg s "Installation aborted."))))
    465 
    466 
    467 (defun where ()
     166(defun verify-gpg-signature (file-name signature-name)
     167  (block verify
     168    (loop
     169      (restart-case
     170          (let ((tags (gpg-results file-name signature-name)))
     171            ;; test that command returned something
     172            (unless tags
     173              (error 'gpg-shell-error))
     174            ;; test for obvious key/sig problems
     175            (let ((errsig (header-value :errsig tags)))
     176              (and errsig (error 'key-not-found :key-id errsig)))
     177            (let ((badsig (header-value :badsig tags)))
     178              (and badsig (error 'key-not-found :key-id badsig)))
     179            (let* ((good (header-value :goodsig tags))
     180                   (id (first good))
     181                   (name (format nil "~{~A~^ ~}" (rest good))))
     182              ;; good signature, but perhaps not trusted
     183              (restart-case
     184                  (let ((trusted? (or (header-pair :trust_ultimate tags)
     185                                      (header-pair :trust_fully tags)))
     186                        (in-list? (assoc id *trusted-uids* :test #'equal)))
     187                    (cond ((or trusted? in-list?)
     188                           ;; ok
     189                           )
     190                          ((not trusted?)
     191                           (error 'key-not-trusted
     192                                  :key-user-name name :key-id id))
     193                          ((not in-list?)
     194                           (error 'author-not-trusted
     195                                  :key-user-name name :key-id id))))
     196                (add-key (&rest rest)
     197                  :report "Add to package supplier list"
     198                  (declare (ignore rest))
     199                  (pushnew (list id name) *trusted-uids*))))
     200            (return-from verify t))
     201        (install-anyways
     202            (&rest rest)
     203          :report "Don't check GPG signature for this package"
     204          (declare (ignore rest))
     205          (return-from verify t))
     206        (retry-gpg-check
     207            (&rest args)
     208          :report "Retry GPG check \(e.g., after downloading the key\)"
     209          (declare (ignore args))
     210          nil)))))
     211
     212(defun header-value (name headers)
     213  "Searchers headers for name _without_ case sensitivity. Headers should be an alist mapping symbols to values; name a symbol. Returns the value if name is found or nil if it is not."
     214  (cdr (header-pair name headers)))
     215
     216(defun header-pair (name headers)
     217  "Searchers headers for name _without_ case sensitivity. Headers should be an alist mapping symbols to values; name a symbol. Returns the \(name value\) pair if name is found or nil if it is not."
     218  (assoc name headers
     219         :test (lambda (a b)
     220                 (string-equal (symbol-name a) (symbol-name b)))))
     221
     222(defun validate-preferred-location ()
     223  (typecase *preferred-location*
     224    (null t)
     225    ((integer 0)
     226     (assert (<= 1 *preferred-location* (length *locations*))
     227             (*preferred-location*)
     228             'invalid-preferred-location-number-error
     229             :preferred-location *preferred-location*))
     230    ((or symbol string)
     231     (assert (find *preferred-location* *locations*
     232                   :test (if (typep *preferred-location* 'symbol)
     233                             #'eq #'string-equal) :key #'third)
     234             (*preferred-location*)
     235             'invalid-preferred-location-name-error
     236             :preferred-location *preferred-location*))
     237    (t
     238     (assert nil
     239             (*preferred-location*)
     240             'invalid-preferred-location-error
     241             :preferred-location *preferred-location*)))
     242  *preferred-location*)
     243
     244(defun select-location ()
    468245  (loop with n-locations = (length *locations*)
    469         for response = (or *preferred-location*             
    470                            (progn
    471                              (format t "Install where?~%")
    472                              (loop for (source system name) in *locations*
    473                                    for i from 0
    474                                    do (format t "~A) ~A: ~%   System in ~A~%   Files in ~A ~%"
    475                                               i name system source))
    476                              (format t "~D) Abort installation.~% --> " n-locations)
    477                              (force-output)
    478                              (read)))
    479         when (and (numberp response)
    480                   (<= 0 response (1- n-locations)))
    481            return (elt *locations* response)
    482         when (and (numberp response)
    483                   (= response n-locations))
    484            do (abort (make-condition 'installation-abort))))
     246     for response = (progn
     247                      (format t "Install where?~%")
     248                      (loop for (source system name) in *locations*
     249                         for i from 1
     250                         do (format t "~A) ~A: ~%   System in ~A~%   Files in ~A ~%"
     251                                    i name system source))
     252                      (format t "0) Abort installation.~% --> ")
     253                      (force-output)
     254                      (read))
     255     when (and (numberp response)
     256               (<= 1 response n-locations))
     257     return response
     258     when (and (numberp response)
     259               (zerop response))
     260     do (abort (make-condition 'installation-abort))))
     261
     262(defun install-location ()
     263  (validate-preferred-location)
     264  (let ((location-selection (or *preferred-location*
     265                                (select-location))))
     266    (etypecase location-selection
     267      (integer
     268       (elt *locations* (1- location-selection)))
     269      ((or symbol string)
     270       (find location-selection *locations* :key #'third
     271             :test (if (typep location-selection 'string)
     272                      #'string-equal #'eq))))))
    485273
    486274
    487275;;; install-package --
     276
     277(defun find-shell-command (command)
     278  (loop for directory in *shell-search-paths* do
     279       (let ((target (make-pathname :name command :type nil
     280                                    :directory directory)))
     281         (when (probe-file target)
     282           (return-from find-shell-command (namestring target)))))
     283  (values nil))
     284
     285(defun tar-command ()
     286  #-(or :win32 :mswindows)
     287  (find-shell-command *gnu-tar-program*)
     288  #+(or :win32 :mswindows)
     289  *cygwin-bash-program*)
     290
     291(defun tar-arguments (source packagename)
     292  #-(or :win32 :mswindows :scl)
     293  (list "-C" (namestring (truename source))
     294        "-xzvf" (namestring (truename packagename)))
     295  #+(or :win32 :mswindows)
     296  (list "-l"
     297        "-c"
     298        (format nil "\"tar -C \\\"`cygpath '~A'`\\\" -xzvf \\\"`cygpath '~A'`\\\"\""
     299                (namestring (truename source))
     300                (namestring (truename packagename))))
     301  #+scl
     302  (list "-C" (ext:unix-namestring (truename source))
     303        "-xzvf" (ext:unix-namestring (truename packagename))))
     304
     305(defun extract-using-tar (to-dir tarball)
     306  (let ((tar-command (tar-command)))
     307    (if (and tar-command (probe-file tar-command))
     308        (return-output-from-program tar-command
     309                                    (tar-arguments to-dir tarball))
     310        (warn "Cannot find tar command ~S." tar-command))))
     311
     312(defun extract (to-dir tarball)
     313  (or (some #'(lambda (extractor) (funcall extractor to-dir tarball))
     314            *tar-extractors*)
     315      (error "Unable to extract tarball ~A." tarball)))
    488316
    489317(defun install-package (source system packagename)
     
    491319  (ensure-directories-exist source)
    492320  (ensure-directories-exist system)
    493   (let* ((tar
    494           (or #-(or :win32 :mswindows)
    495               (return-output-from-program *gnu-tar-program*
    496                                           (list "-C" (namestring (truename source))
    497                                                 "-xzvf" (namestring (truename packagename))))
    498               #+(or :win32 :mswindows)
    499               (return-output-from-program *cygwin-bash-program*
    500                                           (list "-l"
    501                                                 "-c"
    502                                                 (format nil "\"tar -C \\\"`cygpath '~A'`\\\" -xzvf \\\"`cygpath '~A'`\\\"\""
    503                                                         (namestring (truename source))
    504                                                         (namestring (truename packagename)))))
    505               (error "ASDF-INSTALL: can't untar ~S." packagename)))
     321  (let* ((tar (extract source packagename))
    506322         (pos-slash (or (position #\/ tar)
    507323                        (position #\Return tar)
     
    511327           (make-pathname :directory
    512328                          `(:relative ,(subseq tar 0 pos-slash)))
    513            source))
    514          )
    515     (princ tar)
     329           source)))
     330    ;(princ tar)
    516331    (loop for sysfile in (append
    517332                          (directory
    518                            (make-pathname :defaults (print *default-pathname-defaults*)
     333                           (make-pathname :defaults *default-pathname-defaults*
    519334                                          :name :wild
    520335                                          :type "asd"))
    521336                          (directory
    522                            (make-pathname :defaults (print *default-pathname-defaults*)
     337                           (make-pathname :defaults *default-pathname-defaults*
    523338                                          :name :wild
    524339                                          :type "system")))
    525           #-(or :win32 :mswindows)
    526           do
    527           #-(or :win32 :mswindows)
    528           (let ((target (merge-pathnames
    529                          (make-pathname :name (pathname-name sysfile)
    530                                         :type (pathname-type sysfile))
    531                          system)))
    532             (when (probe-file target)
    533               (unlink-file target))
    534             (symlink-files sysfile target))
    535           collect sysfile)))
    536 
    537 
    538 #| Original
    539 (defun install-package (source system packagename)
    540   "Returns a list of asdf system names for installed asdf systems"
    541   (ensure-directories-exist source)
    542   (ensure-directories-exist system)
    543   (let* ((tar
    544            (or
    545              #-(or :win32 :mswindows)
    546              (return-output-from-program "tar"
    547                                          (list "-C" (system-namestring source)
    548                                                "-xzvf" (system-namestring packagename)))
    549              #+(or :win32 :mswindows)
    550              (return-output-from-program "sh"
    551                                          (list "-c"
    552                                                (format nil "\"tar -C \\\"`cygpath '~A'`\\\" -xzvf \\\"`cygpath '~A'`\\\"\""
    553                                                        (namestring (truename source))
    554                                                        (namestring (truename packagename)))))
    555              (error "can't untar")))
    556          (pos-slash (position-if #'(lambda (c)
    557                                      (find c #(#\/ #\Return #\Linefeed)))
    558                                  tar))
    559          (*default-pathname-defaults*
    560           (merge-pathnames
    561            (make-pathname :directory
    562                           `(:relative ,(subseq tar 0 pos-slash)))
    563            source)))
    564     (princ tar)
    565     (loop for asd in (directory
    566                       (make-pathname :defaults (print *default-pathname-defaults*)
    567                                      :name :wild
    568                                      :type "asd"))
    569           #-(or :win32 :mswindows)
    570           do
    571           #-(or :win32 :mswindows)
    572           (let ((target (merge-pathnames
    573                          (make-pathname :name (pathname-name asd)
    574                                         :type (pathname-type asd))
    575                          system)))
    576             (when (probe-file target)
    577               (unlink-file target))
    578             (symlink-files asd target))
    579           collect (pathname-name asd))))
    580 |#
    581 
     340       do (maybe-symlink-sysfile system sysfile)
     341       do (installer-msg t "Found system definition: ~A" sysfile)
     342       do (maybe-update-central-registry sysfile)
     343       collect sysfile)))
     344
     345(defun maybe-update-central-registry (sysfile)
     346  ;; make sure that the systems we install are accessible in case
     347  ;; asdf-install:*locations* and asdf:*central-registry* are out
     348  ;; of sync
     349  (add-registry-location sysfile))
    582350
    583351(defun temp-file-name (p)
    584   (let* ((pos-slash (position #\/ p :from-end t))
    585          (pos-dot (position #\. p :start (or pos-slash 0))))
    586     (merge-pathnames
    587      (make-pathname
    588       :name (subseq p (if pos-slash (1+ pos-slash) 0) pos-dot)
    589       :type "asdf-install-tmp")
    590      #+:clisp (user-homedir-pathname))))
     352  (declare (ignore p))
     353  (let ((pathname nil))
     354    (loop for i = 0 then (1+ i) do
     355         (setf pathname
     356               (merge-pathnames
     357                (make-pathname
     358                 :name (format nil "asdf-install-~d" i)
     359                 :type "asdf-install-tmp")
     360                *temporary-directory*))
     361         (unless (probe-file pathname)
     362           (return-from temp-file-name pathname)))))
    591363
    592364
     
    594366;;; This is the external entry point.
    595367
    596 (defun install (&rest packages)
    597   (let ((*temporary-files* nil)
    598         (*trusted-uids*
    599          (let ((p (merge-pathnames "trusted-uids.lisp" *private-asdf-install-dirs*)))
    600            (when (probe-file p)
    601              (with-open-file (f p) (read f)))))
    602         ;; (installed-packages nil)
    603         )
     368(defun install (packages &key (propagate nil) (where *preferred-location*))
     369  (let* ((*preferred-location* where)
     370         (*temporary-files* nil)
     371         (trusted-uid-file
     372          (merge-pathnames "trusted-uids.lisp" *private-asdf-install-dirs*))
     373         (*trusted-uids*
     374          (when (probe-file trusted-uid-file)
     375            (with-open-file (f trusted-uid-file) (read f))))
     376         (old-uids (copy-list *trusted-uids*))
     377         #+asdf
     378         (*defined-systems* (if propagate
     379                              (make-hash-table :test 'equal)
     380                              *defined-systems*))
     381         (packages (if (atom packages) (list packages) packages))
     382         (*propagate-installation* propagate)
     383         (*systems-installed-this-time* nil))
    604384    (unwind-protect
    605         (destructuring-bind (source system name) (where)
    606           (declare (ignore name))
    607           (labels ((one-iter (packages)
    608                      (let ((installed-package-sysfiles
    609                             (loop for p in (mapcar #'string packages)
    610                                   unless
    611                                   #+(or :sbcl :alisp) (probe-file p)
    612                                   #-(or :sbcl :alisp) (and (/= (mismatch p "http://") 7)
    613                                                            (probe-file p))
    614                                   do (let ((tmp (temp-file-name p)))
    615                                        (pushnew tmp *temporary-files*)
    616                                        (download-files-for-package p tmp)
    617                                        (setf p tmp))
    618                                   end
    619                                   do (installer-msg t "Installing ~A in ~A, ~A"
    620                                                     p
    621                                                     source
    622                                                     system)
    623                                   append (install-package source
    624                                                           system
    625                                                           p)))
    626                            )
    627                      (dolist (sysfile installed-package-sysfiles)
    628                        (handler-bind
    629                            (
    630                            #+asdf
    631                            (asdf:missing-dependency
    632                             (lambda (c)
    633                               (installer-msg t
    634                                              "Downloading package ~A, required by ~A~%"
    635                                              (asdf::missing-requires c)
    636                                              (asdf:component-name
    637                                               (asdf::missing-required-by c)))
    638                               (one-iter (list
    639                                          (symbol-name
    640                                           (asdf::missing-requires c))))
    641                               (invoke-restart 'retry)))
    642 
    643                            #+mk-defsystem
    644                            (make:missing-component
    645                             (lambda (c)
    646                               (installer-msg t
    647                                              "Downloading package ~A, required by ~A~%"
    648                                            (make:missing-component-name c)
    649                                            (pathname-name sysfile) ; This should work.
    650                                            )
    651                               (one-iter (list (make:missing-component-name c)))
    652                               (invoke-restart 'retry)))
    653                             )
    654 
    655                          (loop (multiple-value-bind (ret restart-p)
    656                                    (with-simple-restart
    657                                        (retry "Retry installation")
    658                                      (load-system-definition sysfile))
    659                                  (declare (ignore ret))
    660                                  (unless restart-p (return))))
    661                          ))))
    662                    )
    663             (one-iter packages)))
    664       (let ((p (merge-pathnames "trusted-uids.lisp" *private-asdf-install-dirs*)))
    665         (when (probe-file p)
    666           (with-open-file (out p
    667                                :direction :output
    668                                :if-exists :supersede)
    669             (with-standard-io-syntax
    670               (prin1 *trusted-uids* out)))))
     385      (destructuring-bind (source system name) (install-location)
     386        (declare (ignore name))
     387        (labels
     388            ((one-iter (packages)
     389               (let ((packages-to-install nil))
     390                 (loop for p in (mapcar #'string packages) do
     391                      (cond ((local-archive-p p)
     392                             (setf packages-to-install
     393                                   (append packages-to-install
     394                                           (install-package source system p))))
     395                            (t
     396                             (multiple-value-bind (package signature)
     397                                 (download-files-for-package p)
     398                               (when (verify-gpg-signatures-p p)
     399                                 (verify-gpg-signature package signature))
     400                               (installer-msg t "Installing ~A in ~A, ~A"
     401                                              p source system)
     402                               (install-package source system package))
     403                             (setf packages-to-install
     404                                   (append packages-to-install
     405                                           (list p))))))
     406                 (dolist (package packages-to-install)
     407                   (setf package
     408                         (etypecase package
     409                           (symbol package)
     410                           (string (intern package :asdf-install))
     411                           (pathname (intern
     412                                      (namestring (pathname-name package))
     413                                      :asdf-install))))
     414                   (handler-bind
     415                       (
     416                        #+asdf
     417                        (asdf:missing-dependency
     418                         (lambda (c)
     419                           (installer-msg
     420                            t
     421                            "Downloading package ~A, required by ~A~%"
     422                            (asdf::missing-requires c)
     423                            (asdf:component-name
     424                             (asdf::missing-required-by c)))
     425                           (one-iter
     426                            (list (asdf::coerce-name
     427                                   (asdf::missing-requires c))))
     428                           (invoke-restart 'retry)))
     429                        #+mk-defsystem
     430                        (make:missing-component
     431                         (lambda (c)
     432                           (installer-msg
     433                            t
     434                            "Downloading package ~A, required by ~A~%"
     435                            (make:missing-component-name c)
     436                            package)
     437                           (one-iter (list (make:missing-component-name c)))
     438                           (invoke-restart 'retry))))
     439                     (loop (multiple-value-bind (ret restart-p)
     440                               (with-simple-restart
     441                                   (retry "Retry installation")
     442                                 (push package *systems-installed-this-time*)
     443                                 (load-package package))
     444                             (declare (ignore ret))
     445                             (unless restart-p (return)))))))))
     446          (one-iter packages)))
     447      ;;; cleanup
     448      (unless (equal old-uids *trusted-uids*)
     449        (let ((create-file-p nil))
     450          (unless (probe-file trusted-uid-file)
     451            (installer-msg t "Trusted UID file ~A does not exist"
     452                           (namestring trusted-uid-file))
     453            (setf create-file-p
     454                  (y-or-n-p "Do you want to create the file?")))
     455          (when (or create-file-p (probe-file trusted-uid-file))
     456            (ensure-directories-exist trusted-uid-file)
     457            (with-open-file (out trusted-uid-file
     458                                 :direction :output
     459                                 :if-exists :supersede)
     460              (with-standard-io-syntax
     461                (prin1 *trusted-uids* out))))))
    671462      (dolist (l *temporary-files* t)
    672         (when (probe-file l) (delete-file l))))))
    673 
    674 
    675 (defun load-system-definition (sysfile)
    676   (declare (type pathname sysfile))
     463        (when (probe-file l) (delete-file l))))
     464    (nreverse *systems-installed-this-time*)))
     465
     466(defun local-archive-p (package)
     467  #+(or :sbcl :allegro) (probe-file package)
     468  #-(or :sbcl :allegro) (and (/= (mismatch package "http://") 7)
     469                           (probe-file package)))
     470
     471(defun load-package (package)
    677472  #+asdf
    678   (when (or (string-equal "asd" (pathname-type sysfile))
    679             (string-equal "asdf" (pathname-type sysfile)))
    680     (installer-msg t "Loading system ~S via ASDF." (pathname-name sysfile))
    681     (asdf:operate 'asdf:load-op (pathname-name sysfile)))
    682 
     473  (progn
     474    (installer-msg t "Loading system ~S via ASDF." package)
     475    (asdf:operate 'asdf:load-op package))
    683476  #+mk-defsystem
    684   (when (string-equal "system" (pathname-type sysfile))
    685     (installer-msg t "Loading system ~S via MK:DEFSYSTEM." (pathname-name sysfile))
    686     (mk:load-system (pathname-name sysfile))))
    687 
    688 
    689 #| Original.
    690 (defun install (&rest packages)
    691   (let ((*temporary-files* nil)
    692         (*trusted-uids*
    693          (let ((p (merge-pathnames "trusted-uids.lisp" *private-asdf-install-dirs*)))
    694            (when (probe-file p)
    695              (with-open-file (f p) (read f))))))
    696     (unwind-protect
    697         (destructuring-bind (source system name) (where)
    698           (declare (ignore name))
    699           (labels ((one-iter (packages)
    700                      (dolist (asd
    701                               (loop for p in (mapcar 'string packages)
    702                                     unless #+(or :sbcl :alisp)
    703                                     (probe-file p)
    704                                     #-(or :sbcl :alisp)
    705                                     (and (/= (mismatch p "http://") 7)
    706                                          (probe-file p))
    707                                     do (let ((tmp (temp-file-name p)))
    708                                          (pushnew tmp *temporary-files*)
    709                                          (download-files-for-package p tmp)
    710                                          (setf p tmp))
    711                                     end
    712                                     do (format t "Installing ~A in ~A,~A~%"
    713                                                p source system)
    714                                     append (install-package source system p)))
    715                        (handler-bind
    716                            ((asdf:missing-dependency
    717                              (lambda (c)
    718                                (format t
    719                                        "Downloading package ~A, required by ~A~%"
    720                                        (asdf::missing-requires c)
    721                                        (asdf:component-name
    722                                         (asdf::missing-required-by c)))
    723                                (one-iter (list
    724                                           (symbol-name
    725                                            (asdf::missing-requires c))))
    726                                (invoke-restart 'retry))))
    727                          (loop
    728                           (multiple-value-bind (ret restart-p)
    729                               (with-simple-restart
    730                                   (retry "Retry installation")
    731                                 (asdf:operate 'asdf:load-op asd))
    732                             (declare (ignore ret))
    733                             (unless restart-p (return))))))))
    734             (one-iter packages)))
    735       (let ((p (merge-pathnames "trusted-uids.lisp" *private-asdf-install-dirs*)))
    736         (with-open-file (out p :direction :output
    737                              :if-exists :supersede)
    738           (with-standard-io-syntax
    739             (prin1 *trusted-uids* out))))
    740       (dolist (l *temporary-files*)
    741         (when (probe-file l) (delete-file l))))))
    742 |#
    743 
     477  (progn
     478    (installer-msg t "Loading system ~S via MK:DEFSYSTEM." package)
     479    (mk:load-system package)))
    744480
    745481;;; uninstall --
     
    749485  (let* ((asd (asdf:system-definition-pathname system))
    750486         (system (asdf:find-system system))
    751          (dir (asdf::pathname-sans-name+type
     487         (dir (pathname-sans-name+type
    752488               (asdf::resolve-symlinks asd))))
    753489    (when (or (not prompt)
     
    757493      #-(or :win32 :mswindows)
    758494      (delete-file asd)
    759       (asdf:run-shell-command "rm -r '~A'" (namestring (truename dir)))))
     495      (let ((dir (#-scl namestring #+scl ext:unix-namestring (truename dir))))
     496        (when dir
     497          (asdf:run-shell-command "rm -r '~A'" dir)))))
    760498
    761499  #+mk-defsystem
     
    777515      )))
    778516
    779 
    780 #| Original
    781 (defun uninstall (system &optional (prompt t))
    782   (let* ((asd (asdf:system-definition-pathname system))
    783          (system (asdf:find-system system))
    784          (dir (asdf::pathname-sans-name+type
    785                (asdf::resolve-symlinks asd))))
    786     (when (or (not prompt)
    787               (y-or-n-p
    788                "Delete system ~A~%asd file: ~A~%sources: ~A~%Are you sure?"
    789                system asd dir))
    790       #-(or :win32 :mswindows)
    791       (delete-file asd)
    792       (asdf:run-shell-command "rm -r '~A'" (namestring (truename dir))))))
    793 |#
    794 
    795517     
    796518;;; some day we will also do UPGRADE, but we need to sort out version
     
    814536            (return-from sysdef-source-dir-search file)))))))
    815537
     538(defmethod asdf:find-component :around
     539    ((module (eql nil)) name &optional version)
     540  (declare (ignore version))
     541  (when (or (not *propagate-installation*)
     542            (member name *systems-installed-this-time*
     543                    :test (lambda (a b)
     544                            (flet ((ensure-string (x)
     545                                     (etypecase x
     546                                       (symbol (symbol-name x))
     547                                       (string x))))
     548                              (string-equal (ensure-string a) (ensure-string b))))))
     549    (call-next-method)))
     550
     551(defun show-version-information ()
     552  (let ((version (asdf-install-version)))
     553    (if version
     554      (format *standard-output* "~&;;; ASDF-Install version ~A"
     555              version)
     556      (format *standard-output* "~&;;; ASDF-Install version unknown; unable to find ASDF system definition."))
     557  (values)))
     558
     559(defun asdf-install-version ()
     560  "Returns the ASDf-Install version information as a string or nil if it cannot be determined."
     561  (let ((system (asdf:find-system 'asdf-install)))
     562    (when system (asdf:component-version system))))
     563
     564;; load customizations if any
     565(eval-when (:load-toplevel :execute)
     566  (let* ((*package* (find-package :asdf-install-customize))
     567         (file (probe-file (merge-pathnames
     568                            (make-pathname :name ".asdf-install")
     569                            (truename (user-homedir-pathname))))))
     570    (when file (load file))))
     571
    816572;;; end of file -- install.lisp --
  • release/1.2/source/tools/asdf-install/load-asdf-install.lisp

    r928 r9219  
    55
    66(eval-when (:load-toplevel :execute)
    7   (unless (find-package "ASDF-INSTALL-LOADER")
    8     (make-package "ASDF-INSTALL-LOADER" :use '("COMMON-LISP"))))
     7  (unless (find-package '#:asdf-install-loader)
     8    (make-package '#:asdf-install-loader :use '(#:common-lisp))))
    99
    10 (in-package "ASDF-INSTALL-LOADER")
     10(in-package :asdf-install-loader)
    1111
    1212(eval-when (:compile-toplevel :load-toplevel :execute)
     
    6767      (load-and-or-compile "ASDF-INSTALL-LIBRARY:port.lisp")
    6868
    69       (unless (find-package "SPLIT-SEQUENCE")
     69      (unless (find-package '#:split-sequence)
    7070        (load-and-or-compile "ASDF-INSTALL-LIBRARY:split-sequence.lisp"))
    7171
    72       #|
    73       ;; Implementation dependencies (in alphabetical order).
    74       #+allegro
    75       (load-and-or-compile "ASDF-INSTALL-LIBRARY:impl-dependent;allegro.lisp")
     72      (load-and-or-compile "ASDF-INSTALL-LIBRARY:installer.lisp")
    7673
    77       #+clisp
    78       (load-and-or-compile "ASDF-INSTALL-LIBRARY:impl-dependent;clisp.lisp")
    79 
    80       #+(or cmu sbcl) ; They are still very similar.
    81       (load-and-or-compile "ASDF-INSTALL-LIBRARY:impl-dependent;cmucl.lisp")
    82 
    83       #+digitool
    84       (load-and-or-compile "ASDF-INSTALL-LIBRARY:digitool.lisp")
    85 
    86       #+lcl
    87       (load-and-or-compile "ASDF-INSTALL-LIBRARY:impl-dependent;lcl.lisp")
    88 
    89       #+lispworks
    90       (load-and-or-compile "ASDF-INSTALL-LIBRARY:impl-dependent;lispworks.lisp")
    91       |#
    92 
    93 
    94       (load-and-or-compile "ASDF-INSTALL-LIBRARY:installer.lisp")
    9574      ;; (load-and-or-compile "ASDF-INSTALL-LIBRARY:loader.lisp")
    9675
     
    10079
    10180  ;; To clean a minimum (and to make things difficult to debug)...
    102   ;; (delete-package "ASDF-INSTALL-LOADER")
     81  ;; (delete-package '#:asdf-install-loader)
    10382  )
    10483
  • release/1.2/source/tools/asdf-install/loader.lisp

    r503 r9219  
    33(eval-when (:load-toplevel)
    44  (unless (find-package 'asdf)
    5     (require 'asdf))
     5    (require 'asdf)))
     6
     7(eval-when (:load-toplevel)
     8  (unless (find-package 'asdf)
     9    (error "ASDF-Install requires ASDF to load"))   
    610  (let ((asdf::*verbose-out* nil))
    711    (require 'asdf-install)))
    812
     13#+sbcl
    914(defun run ()
    1015  (handler-case
  • release/1.2/source/tools/asdf-install/port.lisp

    r2590 r9219  
    1 (in-package :asdf-install)
     1(in-package #:asdf-install)
    22
    33(defvar *temporary-files*)
    44
     5(defparameter *shell-path* "/bin/sh"
     6  "The path to a Bourne compatible command shell in physical pathname notation.")
     7
    58(eval-when (:load-toplevel :compile-toplevel :execute)
    6   #+:lispworks
    7   (require "comm")
    89  #+:allegro
    910  (require :osi)
     
    1112  (require :socket)
    1213  #+:digitool
    13   (require :opentransport))
     14  (require :opentransport)
     15  #+:ecl
     16  (require :sockets)
     17  #+:lispworks
     18  (require "comm")
     19  )
    1420
    1521(defun get-env-var (name)
     22  #+:allegro (sys:getenv name)
     23  #+:clisp (ext:getenv name)
     24  #+:cmu (cdr (assoc (intern (substitute #\_ #\- name)
     25                             :keyword)
     26                     ext:*environment-list*))
     27  #+:ecl (ext:getenv name)
     28  #+:lispworks (lw:environment-variable name)
     29  #+(or :mcl :openmcl) (ccl::getenv name)
    1630  #+:sbcl (sb-ext:posix-getenv name)
    17   #+:cmu (cdr (assoc (intern (substitute #\_ #\- name)
    18                             :keyword)
    19                     ext:*environment-list*))
    20   #+:allegro (sys:getenv name)
    21   #+:lispworks (lw:environment-variable name)
    22   #+:clisp (ext:getenv name)
    23   #+(or :mcl :openmcl) (ccl::getenv name))
     31  #+:scl (cdr (assoc name ext:*environment-list* :test #'string=))
     32  )
    2433
    2534#-:digitool
     
    3948    (unless truename
    4049      (setf truename
    41               (translate-logical-pathname
    42                (merge-pathnames pathname *default-pathname-defaults*))))
     50            (translate-logical-pathname
     51             (merge-pathnames pathname *default-pathname-defaults*))))
    4352    (let ((directory (pathname-directory truename)))
    4453      (flet ((string-or-nil (value) (when (stringp value) value))
     
    6574
    6675;; for non-SBCL we just steal this from SB-EXECUTABLE
    67 #-(or :sbcl :digitool)
     76#-(or :digitool)
    6877(defvar *stream-buffer-size* 8192)
    69 #-(or :sbcl :digitool)
     78#-(or :digitool)
    7079(defun copy-stream (from to)
    7180  "Copy into TO from FROM until end of the input stream, in blocks of
     
    7685                         :element-type (stream-element-type from))))
    7786    (loop
    78      (let ((pos #-(or :clisp :cmu) (read-sequence buf from)
    79                 #+:clisp (ext:read-byte-sequence buf from :no-hang nil)
    80                 #+:cmu (sys:read-n-bytes from buf 0 *stream-buffer-size* nil)))
    81        (when (zerop pos) (return))
    82        (write-sequence buf to :end pos)))))
     87      (let ((pos #-(or :clisp :cmu) (read-sequence buf from)
     88                 #+:clisp (ext:read-byte-sequence buf from :no-hang nil)
     89                 #+:cmu (sys:read-n-bytes from buf 0 *stream-buffer-size* nil)))
     90        (when (zerop pos) (return))
     91        (write-sequence buf to :end pos)))))
    8392
    8493#+:digitool
     
    92101              (funcall writer writer-arg datum))))))
    93102
    94 #+:sbcl
    95 (declaim (inline copy-stream))
    96 #+:sbcl
    97 (defun copy-stream (from to)
    98   (sb-executable:copy-stream from to))
    99 
    100103(defun make-stream-from-url (url)
    101   #+:sbcl
     104  #+(or :sbcl :ecl)
    102105  (let ((s (make-instance 'sb-bsd-sockets:inet-socket
    103                           :type :stream
    104                           :protocol :tcp)))
     106             :type :stream
     107             :protocol :tcp)))
    105108    (sb-bsd-sockets:socket-connect
    106109     s (car (sb-bsd-sockets:host-ent-addresses
    107110             (sb-bsd-sockets:get-host-by-name (url-host url))))
    108111     (url-port url))
    109     (sb-bsd-sockets:socket-make-stream s :input t :output t :buffering :full))
     112    (sb-bsd-sockets:socket-make-stream
     113     s
     114     :input t
     115     :output t
     116     :buffering :full
     117     :external-format :iso-8859-1))
    110118  #+:cmu
    111119  (sys:make-fd-stream (ext:connect-to-inet-socket (url-host url) (url-port url))
    112120                      :input t :output t :buffering :full)
     121  #+:scl
     122  (sys:make-fd-stream (ext:connect-to-inet-socket (url-host url) (url-port url))
     123                      :input t :output t :buffering :full
     124                      :external-format :iso-8859-1)
    113125  #+:lispworks
    114126  (comm:open-tcp-stream (url-host url) (url-port url)
     
    129141                        :element-type 'unsigned-byte))
    130142
    131 #+(or :sbcl :cmu)
    132 (defun make-stream-from-gpg-command (string file-name)
    133   (#+:sbcl sb-ext:process-output
    134    #+:cmu ext:process-output
    135    (#+:sbcl sb-ext:run-program
    136     #+:cmu ext:run-program
    137     "gpg"
    138     (list
    139      "--status-fd" "1" "--verify" "-"
    140      (namestring file-name))
    141     :output :stream
    142     :error nil
    143     #+sbcl :search #+sbcl t
    144     :input (make-string-input-stream string)
    145     :wait t)))
    146 
    147 #+(and :lispworks (not :win32))
    148 (defun make-stream-from-gpg-command (string file-name)
    149   ;; kludge - we can't separate the in and out streams
    150   (let ((stream (sys:open-pipe (format nil "echo '~A' | gpg --status-fd 1 --verify - ~A"
    151                                        string
    152                                        (namestring file-name)))))
    153     stream))
    154 
    155 (defun make-temp-sig (file-name content)
    156   (let ((name (format nil "~A.asc" (namestring (truename file-name)))))
    157     (with-open-file (out name
    158                          :direction :output
    159                          :if-exists :supersede)
    160       (write-string content out))
    161     (pushnew name *temporary-files*)
    162     name))
    163 
    164 #+(and :lispworks :win32)
    165 (defun make-stream-from-gpg-command (string file-name)
    166   (sys:open-pipe (format nil "gpg --status-fd 1 --verify \"~A\" \"~A\""
    167                          (make-temp-sig file-name string)
    168                          (namestring file-name))))
    169 
    170 #+(and :clisp (not (or :win32 :cygwin)))
    171 (defun make-stream-from-gpg-command (string file-name)
    172   (let ((stream
    173           (ext:run-shell-command (format nil "echo '~A' | gpg --status-fd 1 --verify - ~A"
    174                                          string
    175                                          (namestring file-name))
    176                            :output :stream
    177                            :wait nil)))
    178     stream))
    179 
    180 #+(and :clisp (or :win32 :cygwin))
    181 (defun make-stream-from-gpg-command (string file-name)
    182   (ext:run-shell-command (format nil "gpg --status-fd 1 --verify \"~A\" \"~A\""
    183                                  (make-temp-sig file-name string)
    184                                  (namestring file-name))
    185                          :output :stream
    186                          :wait nil))
    187 
    188 #+:allegro
    189 (defun make-stream-from-gpg-command (string file-name)
    190   (multiple-value-bind (in-stream out-stream)
    191       (excl:run-shell-command
    192        #-:mswindows
    193        (concatenate 'vector
    194                     #("gpg" "gpg" "--status-fd" "1" "--verify" "-")
    195                     (make-sequence 'vector 1
    196                                    :initial-element (namestring file-name)))
    197        #+:mswindows
    198        (format nil "gpg --status-fd 1 --verify - \"~A\"" (namestring file-name))
    199        :input :stream
    200        :output :stream
    201        :separate-streams t
    202        :wait nil)
    203     (write-string string in-stream)
    204     (finish-output in-stream)
    205     (close in-stream)
    206     out-stream))
    207 
    208 #+:openmcl
    209 (defun make-stream-from-gpg-command (string file-name)
    210   (let ((proc (ccl:run-program "gpg" (list "--status-fd" "1" "--verify" "-" (namestring file-name))
    211                                :input :stream
    212                                :output :stream
    213                                :wait nil)))
    214     (write-string string (ccl:external-process-input-stream proc))
    215     (close (ccl:external-process-input-stream proc))
    216     (ccl:external-process-output-stream proc)))
    217 
    218 #+:digitool
    219 (defun make-stream-from-gpg-command (string file-name)
    220   (make-instance 'popen-input-stream
    221                  :command (format nil "echo '~A' | gpg --status-fd 1 --verify - '~A'"
    222                                   string
    223                                   (system-namestring file-name))))
    224143
    225144#+:sbcl
     
    230149                 args
    231150                 :output out-stream
     151                 :search t
    232152                 :wait t)))
    233153      (when (or (null proc)
     
    236156        (return-from return-output-from-program nil)))))
    237157
    238 #+:cmu
     158#+(or :cmu :scl)
    239159(defun return-output-from-program (program args)
    240160  (with-output-to-string (out-stream)
     
    254174    (unless (zerop (sys:call-system-showing-output
    255175                    (format nil #-:win32 "~A~{ '~A'~}"
    256                                 #+:win32 "~A~{ ~A~}"
    257                                 program args)
     176                            #+:win32 "~A~{ ~A~}"
     177                            program args)
    258178                    :prefix ""
    259179                    :show-cmd nil
     
    265185  (with-output-to-string (out-stream)
    266186    (let ((stream
    267             (ext:run-program program
    268                              :arguments args
    269                              :output :stream
    270                              :wait nil)))
     187           (ext:run-program program
     188                            :arguments args
     189                            :output :stream
     190                            :wait nil)))
    271191      (loop for line = (read-line stream nil)
    272192            while line
     
    277197  (with-output-to-string (out-stream)
    278198    (let ((stream
    279             (ext:run-shell-command
    280              (format nil "~A~{ ~A~}" program args
    281                      :output :stream
    282                      :wait nil))))
     199           (ext:run-shell-command
     200            (format nil "~A~{ ~A~}" program args
     201                    :output :stream
     202                    :wait nil))))
    283203      (loop for line = (ignore-errors (read-line stream nil))
    284204            while line
     
    289209  (with-output-to-string (out-stream)
    290210    (let ((stream
    291             (excl:run-shell-command
    292              #-:mswindows
    293              (concatenate 'vector
    294                           (list program)
    295                           (cons program args))
    296              #+:mswindows
    297              (format nil "~A~{ ~A~}" program args)
    298              :output :stream
    299              :wait nil)))
     211           (excl:run-shell-command
     212            #-:mswindows
     213            (concatenate 'vector
     214                         (list program)
     215                         (cons program args))
     216            #+:mswindows
     217            (format nil "~A~{ ~A~}" program args)
     218            :output :stream
     219            :wait nil)))
    300220      (loop for line = (read-line stream nil)
    301221            while line
    302222            do (write-line line out-stream)))))
     223
     224#+:ecl
     225(defun return-output-from-program (program args)
     226  (with-output-to-string (out-stream)
     227    (let ((stream (ext:run-program program args :output :stream)))
     228      (when stream
     229        (loop for line = (ignore-errors (read-line stream nil))
     230              while line
     231              do (write-line line out-stream))))))
    303232
    304233#+:openmcl
     
    309238                                 :output :stream
    310239                                 :wait nil)))
    311       (loop for line = (read-line (ccl:external-process-output-stream proc) nil nil nil)
     240      (loop for line = (read-line
     241                        (ccl:external-process-output-stream proc) nil nil nil)
    312242            while line
    313243            do (write-line line out-stream)))))
     
    317247  (ccl::call-system (format nil "~A~{ '~A'~} 2>&1" program args)))
    318248
    319 ;; why not just use DELETE-FILE?
    320249(defun unlink-file (pathname)
    321   #+:sbcl
    322   (sb-posix:unlink pathname)
    323   #+:cmu
    324   (unix:unix-unlink (namestring pathname))
    325   #+:allegro
    326   (excl.osi:unlink pathname)
    327   #+(or :lispwork :clisp :openmcl :digitool)
     250  ;; 20070208 gwking@metabang.com - removed lisp-specific os-level calls
     251  ;; in favor of a simple delete
    328252  (delete-file pathname))
    329253
    330254(defun symlink-files (old new)
    331   #+:sbcl
    332   (sb-posix:symlink old new)
    333   #+:cmu
    334   (unix:unix-symlink (namestring old)
    335                      (namestring new))
    336   #+:allegro
    337   (excl.osi:symlink old new)
    338   #+:lispworks
    339   ;; we loose if the pathnames contain apostrophes...
    340   (sys:call-system (format nil "ln -s '~A' '~A'"
    341                            (namestring old)
    342                            (namestring new)))
    343   #+:clisp
    344   (ext:run-program "ln"
    345                    :arguments (append '("-s")
    346                                       (list (format nil "~A" (namestring old))
    347                                             (format nil "~A" (namestring new)))))
    348   #+:openmcl
    349   (ccl:run-program "ln" (list "-s" (namestring old) (namestring new)))
    350   #+:digitool
    351   (ccl::call-system (format nil "ln -s '~A' '~A'"
    352                             (system-namestring old)
    353                             (system-namestring new))))
     255  (let* ((old (#-scl namestring #+scl ext:unix-namestring old))
     256         (new (#-scl namestring #+scl ext:unix-namestring new #+scl nil))
     257         ;; 20070811 - thanks to Juan Jose Garcia-Ripoll for pointing
     258         ;; that ~a would wreck havoc if the working directory had a space
     259         ;; in the pathname
     260         (command (format nil "ln -s ~s ~s" old new)))
     261    (format t "~S~%" command)
     262    (shell-command command)))
     263
     264(defun maybe-symlink-sysfile (system sysfile)
     265  (declare (ignorable system sysfile))
     266  #-(or :win32 :mswindows)
     267  (let ((target (merge-pathnames
     268                 (make-pathname :name (pathname-name sysfile)
     269                                :type (pathname-type sysfile))
     270                 system)))
     271    (when (probe-file target)
     272      (unlink-file target))
     273    (symlink-files sysfile target)))
     274
     275;;; ---------------------------------------------------------------------------
     276;;; read-header-line
     277;;; ---------------------------------------------------------------------------
     278
     279#-:digitool
     280(defun read-header-line (stream)
     281  (read-line stream))
     282
     283#+:digitool
     284(defun read-header-line (stream &aux (line (make-array 16
     285                                                       :element-type 'character
     286                                                       :adjustable t
     287                                                       :fill-pointer 0))
     288                                (byte nil))
     289  (print (multiple-value-bind (reader arg)
     290                              (ccl::stream-reader stream)
     291           (loop (setf byte (funcall reader arg))
     292                 (case byte
     293                   ((nil)
     294                    (return))
     295                   ((#.(char-code #\Return)
     296                     #.(char-code #\Linefeed))
     297                    (case (setf byte (funcall reader arg))
     298                      ((nil #.(char-code #\Return) #.(char-code #\Linefeed)))
     299                      (t (ccl:stream-untyi stream byte)))
     300                    (return))
     301                   (t
     302                    (vector-push-extend (code-char byte) line))))
     303           (when (or byte (plusp (length line)))
     304             line))))
     305
     306(defun open-file-arguments ()
     307  (append
     308   #+sbcl
     309   '(:external-format :latin1)
     310   #+:scl
     311   '(:external-format :iso-8859-1)
     312   #+(or :clisp :digitool (and :lispworks :win32))
     313   '(:element-type (unsigned-byte 8))))
     314
     315(defun download-url-to-file (url file-name)
     316  "Resolves url and then downloads it to file-name; returns the url actually used."
     317  (multiple-value-bind (response headers stream)
     318      (loop
     319       (destructuring-bind (response headers stream)
     320           (url-connection url)
     321         (unless (member response '(301 302))
     322           (return (values response headers stream)))
     323         (close stream)
     324         (setf url (header-value :location headers))))
     325    (when (>= response 400)
     326      (error 'download-error :url url :response response))
     327    (let ((length (parse-integer (or (header-value :content-length headers) "")
     328                                 :junk-allowed t)))
     329      (installer-msg t "Downloading ~A bytes from ~A to ~A ..."
     330                     (or length "some unknown number of")
     331                     url
     332                     file-name)
     333      (force-output)
     334      #+:clisp (setf (stream-element-type stream)
     335                     '(unsigned-byte 8))
     336      (let ((ok? nil) (o nil))
     337        (unwind-protect
     338             (progn
     339               (setf o (apply #'open file-name
     340                              :direction :output :if-exists :supersede
     341                              (open-file-arguments)))
     342               #+(or :cmu :digitool)
     343               (copy-stream stream o)
     344               #-(or :cmu :digitool)
     345               (if length
     346                   (let ((buf (make-array length
     347                                          :element-type
     348                                          (stream-element-type stream))))
     349                     #-:clisp (read-sequence buf stream)
     350                     #+:clisp (ext:read-byte-sequence buf stream :no-hang nil)
     351                     (write-sequence buf o))
     352                   (copy-stream stream o))
     353               (setf ok? t))
     354          (when o (close o :abort (null ok?))))))
     355    (close stream))
     356  (values url))
     357
     358(defun download-url-to-temporary-file (url)
     359  "Attempts to download url to a new, temporary file. Returns the resolved url and the file name \(as multiple values\)."
     360  (let ((tmp (temp-file-name url)))
     361    (pushnew tmp *temporary-files*)
     362    (values (download-url-to-file url tmp) tmp)))
     363
     364(defun gpg-results (package signature)
     365  (let ((tags nil))
     366    (with-input-from-string
     367        (gpg-stream
     368         (shell-command (format nil "gpg --status-fd 1 --verify ~s ~s"
     369                                (namestring signature) (namestring package))))
     370      (loop for l = (read-line gpg-stream nil nil)
     371         while l
     372         do (print l)
     373         when (> (mismatch l "[GNUPG:]") 6)
     374         do (destructuring-bind (_ tag &rest data)
     375                (split-sequence-if (lambda (x)
     376                                     (find x '(#\Space #\Tab)))
     377                                   l)
     378              (declare (ignore _))
     379              (pushnew (cons (intern (string-upcase tag) :keyword)
     380                             data) tags)))
     381      tags)))
     382
     383#+allegro
     384(defun shell-command (command)
     385  (multiple-value-bind (output error status)
     386                       (excl.osi:command-output command :whole t)
     387    (values output error status)))
     388
     389#+clisp
     390(defun shell-command (command)
     391  ;; BUG: CLisp doesn't allow output to user-specified stream
     392  (values
     393   nil
     394   nil
     395   (ext:run-shell-command  command :output :terminal :wait t)))
     396
     397#+(or :cmu :scl)
     398(defun shell-command (command)
     399  (let* ((process (ext:run-program
     400                   *shell-path*
     401                   (list "-c" command)
     402                   :input nil :output :stream :error :stream))
     403         (output (file-to-string-as-lines (ext::process-output process)))
     404         (error (file-to-string-as-lines (ext::process-error process))))
     405    (close (ext::process-output process))
     406    (close (ext::process-error process))
     407    (values
     408     output
     409     error
     410     (ext::process-exit-code process))))
     411
     412#+ecl
     413(defun shell-command (command)
     414  ;; If we use run-program, we do not get exit codes
     415  (values nil nil (ext:system command)))
     416
     417#+lispworks
     418(defun shell-command (command)
     419  ;; BUG: Lispworks combines output and error streams
     420  (let ((output (make-string-output-stream)))
     421    (unwind-protect
     422      (let ((status
     423             (system:call-system-showing-output
     424              command
     425              :prefix ""
     426              :show-cmd nil
     427              :output-stream output)))
     428        (values (get-output-stream-string output) nil status))
     429      (close output))))
     430
     431#+openmcl
     432(defun shell-command (command)
     433  (let* ((process (create-shell-process command t))
     434         (output (file-to-string-as-lines
     435                  (ccl::external-process-output-stream process)))
     436         (error (file-to-string-as-lines
     437                 (ccl::external-process-error-stream process))))
     438    (close (ccl::external-process-output-stream process))
     439    (close (ccl::external-process-error-stream process))
     440    (values output
     441            error
     442            (process-exit-code process))))
     443
     444#+openmcl
     445(defun create-shell-process (command wait)
     446  (ccl:run-program
     447   *shell-path*
     448   (list "-c" command)
     449   :input nil :output :stream :error :stream
     450   :wait wait))
     451
     452#+openmcl
     453(defun process-exit-code (process)
     454  (nth-value 1 (ccl:external-process-status process)))
     455
     456#+digitool
     457(defun shell-command (command)
     458  ;; BUG: I have no idea what this returns
     459  (ccl::call-system command))
     460
     461#+sbcl
     462(defun shell-command (command)
     463  (let* ((process (sb-ext:run-program
     464                   *shell-path*
     465                   (list "-c" command)
     466                   :input nil :output :stream :error :stream))
     467         (output (file-to-string-as-lines (sb-impl::process-output process)))
     468         (error (file-to-string-as-lines (sb-impl::process-error process))))
     469    (close (sb-impl::process-output process))
     470    (close (sb-impl::process-error process))
     471    (values
     472     output
     473     error
     474     (sb-impl::process-exit-code process))))
     475
     476(defgeneric file-to-string-as-lines (pathname)
     477  (:documentation ""))
     478
     479(defmethod file-to-string-as-lines ((pathname pathname))
     480  (with-open-file (stream pathname :direction :input)
     481    (file-to-string-as-lines stream)))
     482
     483(defmethod file-to-string-as-lines ((stream stream))
     484  (with-output-to-string (s)
     485    (loop for line = (read-line stream nil :eof nil)
     486         until (eq line :eof) do
     487         (princ line s)
     488         (terpri s))))
     489
     490;; copied from ASDF
     491(defun pathname-sans-name+type (pathname)
     492  "Returns a new pathname with same HOST, DEVICE, DIRECTORY as PATHNAME,
     493and NIL NAME and TYPE components"
     494  (make-pathname :name nil :type nil :defaults pathname))
     495
  • release/1.2/source/tools/asdf-install/split-sequence.lisp

    r928 r9219  
    44;;; <URL:http://groups.google.com/groups?as_umsgid=39F36F1A.B8F19D20%40simplex.nl>;
    55;;;
    6 ;;; changes include:
    7 ;;;
    8 ;;; * altering the behaviour of the :from-end keyword argument to
    9 ;;; return the subsequences in original order, for consistency with
    10 ;;; CL:REMOVE, CL:SUBSTITUTE et al. (:from-end being non-NIL only
    11 ;;; affects the answer if :count is less than the number of
    12 ;;; subsequences, by analogy with the above-referenced functions).
    13 ;;;   
    14 ;;; * changing the :maximum keyword argument to :count, by analogy
    15 ;;; with CL:REMOVE, CL:SUBSTITUTE, and so on.
    16 ;;;
    17 ;;; * naming the function SPLIT-SEQUENCE rather than PARTITION rather
    18 ;;; than SPLIT.
    19 ;;;
    20 ;;; * adding SPLIT-SEQUENCE-IF and SPLIT-SEQUENCE-IF-NOT.
    21 ;;;
    22 ;;; * The second return value is now an index rather than a copy of a
    23 ;;; portion of the sequence; this index is the `right' one to feed to
    24 ;;; CL:SUBSEQ for continued processing.
    256
    26 ;;; There's a certain amount of code duplication here, which is kept
    27 ;;; to illustrate the relationship between the SPLIT-SEQUENCE
    28 ;;; functions and the CL:POSITION functions.
    29 
    30 ;;; Examples:
    31 ;;;
    32 ;;; * (split-sequence #\; "a;;b;c")
    33 ;;; -> ("a" "" "b" "c"), 6
    34 ;;;
    35 ;;; * (split-sequence #\; "a;;b;c" :from-end t)
    36 ;;; -> ("a" "" "b" "c"), 0
    37 ;;;
    38 ;;; * (split-sequence #\; "a;;b;c" :from-end t :count 1)
    39 ;;; -> ("c"), 4
    40 ;;;
    41 ;;; * (split-sequence #\; "a;;b;c" :remove-empty-subseqs t)
    42 ;;; -> ("a" "b" "c"), 6
    43 ;;;
    44 ;;; * (split-sequence-if (lambda (x) (member x '(#\a #\b))) "abracadabra")
    45 ;;; -> ("" "" "r" "c" "d" "" "r" ""), 11
    46 ;;;
    47 ;;; * (split-sequence-if-not (lambda (x) (member x '(#\a #\b))) "abracadabra")
    48 ;;; -> ("ab" "a" "a" "ab" "a"), 11
    49 ;;;
    50 ;;; * (split-sequence #\; ";oo;bar;ba;" :start 1 :end 9)
    51 ;;; -> ("oo" "bar" "b"), 9
    52 
    53 (defpackage "SPLIT-SEQUENCE"
    54   (:use "CL")
    55   (:nicknames "PARTITION")
    56   (:export "SPLIT-SEQUENCE" "SPLIT-SEQUENCE-IF" "SPLIT-SEQUENCE-IF-NOT"
    57            "PARTITION" "PARTITION-IF" "PARTITION-IF-NOT")
    58   (:documentation "The SPLIT-SEQUENCE package provides functionality for Common Lisp sequences analagous to Perl's split operator."))
    59 
    60 (in-package "SPLIT-SEQUENCE")
    61 
    62 (defun split-sequence (delimiter seq &key (count nil) (remove-empty-subseqs nil) (from-end nil) (start 0) (end nil) (test nil test-supplied) (test-not nil test-not-supplied) (key nil key-supplied))
    63   "Return a list of subsequences in seq delimited by delimiter.
    64 
    65 If :remove-empty-subseqs is NIL, empty subsequences will be included
    66 in the result; otherwise they will be discarded.  All other keywords
    67 work analogously to those for CL:SUBSTITUTE.  In particular, the
    68 behaviour of :from-end is possibly different from other versions of
    69 this function; :from-end values of NIL and T are equivalent unless
    70 :count is supplied. The second return value is an index suitable as an
    71 argument to CL:SUBSEQ into the sequence indicating where processing
    72 stopped."
    73   (let ((len (length seq))
    74         (other-keys (nconc (when test-supplied
    75                              (list :test test))
    76                            (when test-not-supplied
    77                              (list :test-not test-not))
    78                            (when key-supplied
    79                              (list :key key)))))
    80     (unless end (setq end len))
    81     (if from-end
    82         (loop for right = end then left
    83               for left = (max (or (apply #'position delimiter seq
    84                                          :end right
    85                                          :from-end t
    86                                          other-keys)
    87                                   -1)
    88                               (1- start))
    89               unless (and (= right (1+ left))
    90                           remove-empty-subseqs) ; empty subseq we don't want
    91               if (and count (>= nr-elts count))
    92               ;; We can't take any more. Return now.
    93               return (values (nreverse subseqs) right)
    94               else
    95               collect (subseq seq (1+ left) right) into subseqs
    96               and sum 1 into nr-elts
    97               until (< left start)
    98               finally (return (values (nreverse subseqs) (1+ left))))
    99       (loop for left = start then (+ right 1)
    100             for right = (min (or (apply #'position delimiter seq
    101                                         :start left
    102                                         other-keys)
    103                                  len)
    104                              end)
    105             unless (and (= right left)
    106                         remove-empty-subseqs) ; empty subseq we don't want
    107             if (and count (>= nr-elts count))
    108             ;; We can't take any more. Return now.
    109             return (values subseqs left)
    110             else
    111             collect (subseq seq left right) into subseqs
    112             and sum 1 into nr-elts
    113             until (>= right end)
    114             finally (return (values subseqs right))))))
     7(in-package #:asdf-install)
    1158
    1169(defun split-sequence-if (predicate seq &key (count nil) (remove-empty-subseqs nil) (from-end nil) (start 0) (end nil) (key nil key-supplied))
     
    16558            finally (return (values subseqs right))))))
    16659
    167 (defun split-sequence-if-not (predicate seq &key (count nil) (remove-empty-subseqs nil) (from-end nil) (start 0) (end nil) (key nil key-supplied))
    168   "Return a list of subsequences in seq delimited by items satisfying
    169 (CL:COMPLEMENT predicate).
    170 
    171 If :remove-empty-subseqs is NIL, empty subsequences will be included
    172 in the result; otherwise they will be discarded.  All other keywords
    173 work analogously to those for CL:SUBSTITUTE-IF-NOT.  In particular,
    174 the behaviour of :from-end is possibly different from other versions
    175 of this function; :from-end values of NIL and T are equivalent unless
    176 :count is supplied. The second return value is an index suitable as an
    177 argument to CL:SUBSEQ into the sequence indicating where processing
    178 stopped."
    179   (let ((len (length seq))
    180         (other-keys (when key-supplied
    181                       (list :key key))))
    182     (unless end (setq end len))
    183     (if from-end
    184         (loop for right = end then left
    185               for left = (max (or (apply #'position-if-not predicate seq
    186                                          :end right
    187                                          :from-end t
    188                                          other-keys)
    189                                   -1)
    190                               (1- start))
    191               unless (and (= right (1+ left))
    192                           remove-empty-subseqs) ; empty subseq we don't want
    193               if (and count (>= nr-elts count))
    194               ;; We can't take any more. Return now.
    195               return (values (nreverse subseqs) right)
    196               else
    197               collect (subseq seq (1+ left) right) into subseqs
    198               and sum 1 into nr-elts
    199               until (< left start)
    200               finally (return (values (nreverse subseqs) (1+ left))))
    201       (loop for left = start then (+ right 1)
    202             for right = (min (or (apply #'position-if-not predicate seq
    203                                         :start left
    204                                         other-keys)
    205                                  len)
    206                              end)
    207             unless (and (= right left)
    208                         remove-empty-subseqs) ; empty subseq we don't want
    209             if (and count (>= nr-elts count))
    210             ;; We can't take any more. Return now.
    211             return (values subseqs left)
    212             else
    213             collect (subseq seq left right) into subseqs
    214             and sum 1 into nr-elts
    215             until (>= right end)
    216             finally (return (values subseqs right))))))
    217 
    218 ;;; clean deprecation
    219 
    220 (defun partition (&rest args)
    221   "PARTITION is deprecated; use SPLIT-SEQUENCE instead."
    222   (apply #'split-sequence args))
    223 
    224 (defun partition-if (&rest args)
    225   "PARTITION-IF is deprecated; use SPLIT-SEQUENCE-IF instead."
    226   (apply #'split-sequence-if args))
    227 
    228 (defun partition-if-not (&rest args)
    229   "PARTITION-IF-NOT is deprecated; use SPLIT-SEQUENCE-IF-NOT instead."
    230   (apply #'split-sequence-if-not args))
    231 
    232 (define-compiler-macro partition (&whole form &rest args)
    233   (declare (ignore args))
    234   (warn "PARTITION is deprecated; use SPLIT-SEQUENCE instead.")
    235   form)
    236 
    237 (define-compiler-macro partition-if (&whole form &rest args)
    238   (declare (ignore args))
    239   (warn "PARTITION-IF is deprecated; use SPLIT-SEQUENCE-IF instead.")
    240   form)
    241 
    242 (define-compiler-macro partition-if-not (&whole form &rest args)
    243   (declare (ignore args))
    244   (warn "PARTITION-IF-NOT is deprecated; use SPLIT-SEQUENCE-IF-NOT instead")
    245   form)
    246 
    247 (pushnew :split-sequence *features*)
  • release/1.2/source/tools/asdf.lisp

    r9202 r9219  
    1 
    2 
    3 
    4 
    5 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    6 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    7 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    8 <!-- ViewVC - http://viewvc.org/
    9 by Greg Stein - mailto:gstein@lyra.org -->
    10 <head>
    11 <title>SourceForge.net Repository - [cclan] View of /asdf/asdf.lisp</title>
    12 <meta name="generator" content="ViewVC 1.0.3" />
    13 <link rel="stylesheet" href="/*docroot*/styles.css" type="text/css" />
    14 </head>
    15 <body>
    16 <table style="padding:0.1em;">
    17 <tr>
    18 <td>
    19 <strong>
    20 
    21 <a href="/cclan/">
    22 
    23 [cclan]</a>
    24 /
    25 
    26 <a href="/cclan/asdf/">
    27 
    28 asdf</a>
    29 /
    30 
    31 <a href="/cclan/asdf/asdf.lisp?view=log">
    32 
    33 asdf.lisp</a>
    34 
    35 
    36 </strong>
    37 
    38 </td>
    39 </tr>
    40 </table>
    41 
    42 
    43 <div style="float: right; padding: 5px;"><a href="http://sourceforge.net"><img src="/*docroot*/images/sflogo-210pxtrans.png" alt="(logo)" border=0 width=210 height=62></a></div>
    44 <h1>View of /asdf/asdf.lisp</h1>
    45 
    46 <p style="margin:0;">
    47 
    48 <a href="/cclan/asdf/"><img src="/*docroot*/images/back_small.png" width="16" height="16" alt="Parent Directory" /> Parent Directory</a>
    49 
    50 | <a href="/cclan/asdf/asdf.lisp?view=log#rev1.115"><img src="/*docroot*/images/log.png" width="16" height="16" alt="Revision Log" /> Revision Log</a>
    51 
    52 
    53 
    54 
    55 </p>
    56 
    57 <hr />
    58 <div class="vc_summary">
    59 Revision <strong>1.115</strong> -
    60 (<a href="/*checkout*/cclan/asdf/asdf.lisp?revision=1.115"><strong>download</strong></a>)
    61 
    62 (<a href="/cclan/asdf/asdf.lisp?annotate=1.115"><strong>annotate</strong></a>)
    63 
    64 <br /><em>Fri Feb 15 12:14:48 2008 UTC</em>
    65 (2 months ago)
    66 by <em>demoss</em>
    67 
    68 
    69 <br />Branch: <strong>MAIN</strong>
    70 
    71 
    72 <br />CVS Tags: <strong>HEAD</strong>
    73 
    74 
    75 
    76 
    77 <br />Changes since <strong>1.114: +2 -2 lines</strong>
    78 
    79 
    80 
    81 
    82 
    83 <pre class="vc_log">fix CVS revision magic in *asdf-revision*
    84 
    85  gah.
    86 </pre>
    87 
    88 </div>
    89 <div id="vc_markup"><pre><a id="l_1"></a><span class="hl line">    1 </span><span class="hl slc">;;; This is asdf: Another System Definition Facility.  $Revision$</span>
    90 <a id="l_2"></a><span class="hl line">    2 </span><span class="hl slc">;;;</span>
    91 <a id="l_3"></a><span class="hl line">    3 </span><span class="hl slc">;;; Feedback, bug reports, and patches are all welcome: please mail to</span>
    92 <a id="l_4"></a><span class="hl line">    4 </span><span class="hl slc">;;; &lt;cclan-list&#64;lists.sf.net&gt;.  But note first that the canonical</span>
    93 <a id="l_5"></a><span class="hl line">    5 </span><span class="hl slc">;;; source for asdf is presently the cCLan CVS repository at</span>
    94 <a id="l_6"></a><span class="hl line">    6 </span><span class="hl slc">;;; &lt;URL:http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/&gt;</span>
    95 <a id="l_7"></a><span class="hl line">    7 </span><span class="hl slc">;;;</span>
    96 <a id="l_8"></a><span class="hl line">    8 </span><span class="hl slc">;;; If you obtained this copy from anywhere else, and you experience</span>
    97 <a id="l_9"></a><span class="hl line">    9 </span><span class="hl slc">;;; trouble using it, or find bugs, you may want to check at the</span>
    98 <a id="l_10"></a><span class="hl line">   10 </span><span class="hl slc">;;; location above for a more recent version (and for documentation</span>
    99 <a id="l_11"></a><span class="hl line">   11 </span><span class="hl slc">;;; and test files, if your copy came without them) before reporting</span>
    100 <a id="l_12"></a><span class="hl line">   12 </span><span class="hl slc">;;; bugs.  There are usually two &quot;supported&quot; revisions - the CVS HEAD</span>
    101 <a id="l_13"></a><span class="hl line">   13 </span><span class="hl slc">;;; is the latest development version, whereas the revision tagged</span>
    102 <a id="l_14"></a><span class="hl line">   14 </span><span class="hl slc">;;; RELEASE may be slightly older but is considered `stable'</span>
    103 <a id="l_15"></a><span class="hl line">   15 </span>
    104 <a id="l_16"></a><span class="hl line">   16 </span><span class="hl slc">;;; Copyright (c) 2001-2007 Daniel Barlow and contributors</span>
    105 <a id="l_17"></a><span class="hl line">   17 </span><span class="hl slc">;;;</span>
    106 <a id="l_18"></a><span class="hl line">   18 </span><span class="hl slc">;;; Permission is hereby granted, free of charge, to any person obtaining</span>
    107 <a id="l_19"></a><span class="hl line">   19 </span><span class="hl slc">;;; a copy of this software and associated documentation files (the</span>
    108 <a id="l_20"></a><span class="hl line">   20 </span><span class="hl slc">;;; &quot;Software&quot;), to deal in the Software without restriction, including</span>
    109 <a id="l_21"></a><span class="hl line">   21 </span><span class="hl slc">;;; without limitation the rights to use, copy, modify, merge, publish,</span>
    110 <a id="l_22"></a><span class="hl line">   22 </span><span class="hl slc">;;; distribute, sublicense, and/or sell copies of the Software, and to</span>
    111 <a id="l_23"></a><span class="hl line">   23 </span><span class="hl slc">;;; permit persons to whom the Software is furnished to do so, subject to</span>
    112 <a id="l_24"></a><span class="hl line">   24 </span><span class="hl slc">;;; the following conditions:</span>
    113 <a id="l_25"></a><span class="hl line">   25 </span><span class="hl slc">;;;</span>
    114 <a id="l_26"></a><span class="hl line">   26 </span><span class="hl slc">;;; The above copyright notice and this permission notice shall be</span>
    115 <a id="l_27"></a><span class="hl line">   27 </span><span class="hl slc">;;; included in all copies or substantial portions of the Software.</span>
    116 <a id="l_28"></a><span class="hl line">   28 </span><span class="hl slc">;;;</span>
    117 <a id="l_29"></a><span class="hl line">   29 </span><span class="hl slc">;;; THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND,</span>
    118 <a id="l_30"></a><span class="hl line">   30 </span><span class="hl slc">;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span>
    119 <a id="l_31"></a><span class="hl line">   31 </span><span class="hl slc">;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span>
    120 <a id="l_32"></a><span class="hl line">   32 </span><span class="hl slc">;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE</span>
    121 <a id="l_33"></a><span class="hl line">   33 </span><span class="hl slc">;;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION</span>
    122 <a id="l_34"></a><span class="hl line">   34 </span><span class="hl slc">;;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION</span>
    123 <a id="l_35"></a><span class="hl line">   35 </span><span class="hl slc">;;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</span>
    124 <a id="l_36"></a><span class="hl line">   36 </span>
    125 <a id="l_37"></a><span class="hl line">   37 </span><span class="hl slc">;;; the problem with writing a defsystem replacement is bootstrapping:</span>
    126 <a id="l_38"></a><span class="hl line">   38 </span><span class="hl slc">;;; we can't use defsystem to compile it.  Hence, all in one file</span>
    127 <a id="l_39"></a><span class="hl line">   39 </span>
    128 <a id="l_40"></a><span class="hl line">   40 </span><span class="hl sym">(</span>defpackage #<span class="hl sym">:</span>asdf
    129 <a id="l_41"></a><span class="hl line">   41 </span>  <span class="hl sym">(:</span>export #<span class="hl sym">:</span>defsystem #<span class="hl sym">:</span>oos #<span class="hl sym">:</span>operate #<span class="hl sym">:</span>find-system #<span class="hl sym">:</span>run-shell-<span class="hl kwa">command</span>
    130 <a id="l_42"></a><span class="hl line">   42 </span>           #<span class="hl sym">:</span>system-definition-pathname #<span class="hl sym">:</span>find-component <span class="hl slc">; miscellaneous</span>
    131 <a id="l_43"></a><span class="hl line">   43 </span>           #<span class="hl sym">:</span>hyperdocumentation #<span class="hl sym">:</span>hyperdoc
    132 <a id="l_44"></a><span class="hl line">   44 </span>
    133 <a id="l_45"></a><span class="hl line">   45 </span>           #<span class="hl sym">:</span>compile-op #<span class="hl sym">:</span><span class="hl kwa">load</span>-op #<span class="hl sym">:</span><span class="hl kwa">load</span>-source-op #<span class="hl sym">:</span>test-system-version
    134 <a id="l_46"></a><span class="hl line">   46 </span>           #<span class="hl sym">:</span>test-op
    135 <a id="l_47"></a><span class="hl line">   47 </span>           #<span class="hl sym">:</span>operation                  <span class="hl slc">; operations</span>
    136 <a id="l_48"></a><span class="hl line">   48 </span>           #<span class="hl sym">:</span>feature                    <span class="hl slc">; sort-of operation</span>
    137 <a id="l_49"></a><span class="hl line">   49 </span>           #<span class="hl sym">:</span>version                    <span class="hl slc">; metaphorically sort-of an operation</span>
    138 <a id="l_50"></a><span class="hl line">   50 </span>
    139 <a id="l_51"></a><span class="hl line">   51 </span>           #<span class="hl sym">:</span>input-files #<span class="hl sym">:</span>output-files #<span class="hl sym">:</span>perform       <span class="hl slc">; operation methods</span>
    140 <a id="l_52"></a><span class="hl line">   52 </span>           #<span class="hl sym">:</span>operation-done-p #<span class="hl sym">:</span>explain
    141 <a id="l_53"></a><span class="hl line">   53 </span>
    142 <a id="l_54"></a><span class="hl line">   54 </span>           #<span class="hl sym">:</span>component #<span class="hl sym">:</span>source-file
    143 <a id="l_55"></a><span class="hl line">   55 </span>           #<span class="hl sym">:</span>c-source-file #<span class="hl sym">:</span>cl-source-file #<span class="hl sym">:</span>java-source-file
    144 <a id="l_56"></a><span class="hl line">   56 </span>           #<span class="hl sym">:</span>static-file
    145 <a id="l_57"></a><span class="hl line">   57 </span>           #<span class="hl sym">:</span>doc-file
    146 <a id="l_58"></a><span class="hl line">   58 </span>           #<span class="hl sym">:</span>html-file
    147 <a id="l_59"></a><span class="hl line">   59 </span>           #<span class="hl sym">:</span>text-file
    148 <a id="l_60"></a><span class="hl line">   60 </span>           #<span class="hl sym">:</span>source-file-<span class="hl kwa">type</span>
    149 <a id="l_61"></a><span class="hl line">   61 </span>           #<span class="hl sym">:</span>module                     <span class="hl slc">; components</span>
    150 <a id="l_62"></a><span class="hl line">   62 </span>           #<span class="hl sym">:</span>system
    151 <a id="l_63"></a><span class="hl line">   63 </span>           #<span class="hl sym">:</span>unix-dso
    152 <a id="l_64"></a><span class="hl line">   64 </span>
    153 <a id="l_65"></a><span class="hl line">   65 </span>           #<span class="hl sym">:</span>module-components          <span class="hl slc">; component accessors</span>
    154 <a id="l_66"></a><span class="hl line">   66 </span>           #<span class="hl sym">:</span>component-pathname
    155 <a id="l_67"></a><span class="hl line">   67 </span>           #<span class="hl sym">:</span>component-relative-pathname
    156 <a id="l_68"></a><span class="hl line">   68 </span>           #<span class="hl sym">:</span>component-name
    157 <a id="l_69"></a><span class="hl line">   69 </span>           #<span class="hl sym">:</span>component-version
    158 <a id="l_70"></a><span class="hl line">   70 </span>           #<span class="hl sym">:</span>component-parent
    159 <a id="l_71"></a><span class="hl line">   71 </span>           #<span class="hl sym">:</span>component-property
    160 <a id="l_72"></a><span class="hl line">   72 </span>           #<span class="hl sym">:</span>component-system
    161 <a id="l_73"></a><span class="hl line">   73 </span>
    162 <a id="l_74"></a><span class="hl line">   74 </span>           #<span class="hl sym">:</span>component-depends-on
    163 <a id="l_75"></a><span class="hl line">   75 </span>
    164 <a id="l_76"></a><span class="hl line">   76 </span>           #<span class="hl sym">:</span>system-description
    165 <a id="l_77"></a><span class="hl line">   77 </span>           #<span class="hl sym">:</span>system-long-description
    166 <a id="l_78"></a><span class="hl line">   78 </span>           #<span class="hl sym">:</span>system-author
    167 <a id="l_79"></a><span class="hl line">   79 </span>           #<span class="hl sym">:</span>system-maintainer
    168 <a id="l_80"></a><span class="hl line">   80 </span>           #<span class="hl sym">:</span>system-license
    169 <a id="l_81"></a><span class="hl line">   81 </span>           #<span class="hl sym">:</span>system-licence
    170 <a id="l_82"></a><span class="hl line">   82 </span>           #<span class="hl sym">:</span>system-source-file
    171 <a id="l_83"></a><span class="hl line">   83 </span>           #<span class="hl sym">:</span>system-relative-pathname
    172 <a id="l_84"></a><span class="hl line">   84 </span>
    173 <a id="l_85"></a><span class="hl line">   85 </span>           #<span class="hl sym">:</span>operation-on-warnings
    174 <a id="l_86"></a><span class="hl line">   86 </span>           #<span class="hl sym">:</span>operation-on-failure
    175 <a id="l_87"></a><span class="hl line">   87 </span>
    176 <a id="l_88"></a><span class="hl line">   88 </span>           <span class="hl slc">;#:*component-parent-pathname*</span>
    177 <a id="l_89"></a><span class="hl line">   89 </span>           #<span class="hl sym">:*</span>system-definition-search-functions<span class="hl sym">*</span>
    178 <a id="l_90"></a><span class="hl line">   90 </span>           #<span class="hl sym">:*</span>central-registry<span class="hl sym">*</span>         <span class="hl slc">; variables</span>
    179 <a id="l_91"></a><span class="hl line">   91 </span>           #<span class="hl sym">:*</span>compile-file-warnings-behaviour<span class="hl sym">*</span>
    180 <a id="l_92"></a><span class="hl line">   92 </span>           #<span class="hl sym">:*</span>compile-file-failure-behaviour<span class="hl sym">*</span>
    181 <a id="l_93"></a><span class="hl line">   93 </span>           #<span class="hl sym">:*</span>asdf-revision<span class="hl sym">*</span>
    182 <a id="l_94"></a><span class="hl line">   94 </span>
    183 <a id="l_95"></a><span class="hl line">   95 </span>           #<span class="hl sym">:</span>operation-error #<span class="hl sym">:</span>compile-failed #<span class="hl sym">:</span>compile-warned #<span class="hl sym">:</span>compile-error
    184 <a id="l_96"></a><span class="hl line">   96 </span>           #<span class="hl sym">:</span>error-component #<span class="hl sym">:</span>error-operation
    185 <a id="l_97"></a><span class="hl line">   97 </span>           #<span class="hl sym">:</span>system-definition-error
    186 <a id="l_98"></a><span class="hl line">   98 </span>           #<span class="hl sym">:</span>missing-component
    187 <a id="l_99"></a><span class="hl line">   99 </span>           #<span class="hl sym">:</span>missing-dependency
    188 <a id="l_100"></a><span class="hl line">  100 </span>           #<span class="hl sym">:</span>circular-dependency        <span class="hl slc">; errors</span>
    189 <a id="l_101"></a><span class="hl line">  101 </span>           #<span class="hl sym">:</span>duplicate-names
    190 <a id="l_102"></a><span class="hl line">  102 </span>
    191 <a id="l_103"></a><span class="hl line">  103 </span>           #<span class="hl sym">:</span>retry
    192 <a id="l_104"></a><span class="hl line">  104 </span>           #<span class="hl sym">:</span>accept                     <span class="hl slc">; restarts</span>
    193 <a id="l_105"></a><span class="hl line">  105 </span>
    194 <a id="l_106"></a><span class="hl line">  106 </span>           #<span class="hl sym">:</span>preference-file-for-system<span class="hl sym">/</span>operation
    195 <a id="l_107"></a><span class="hl line">  107 </span>           #<span class="hl sym">:</span><span class="hl kwa">load</span>-preferences
    196 <a id="l_108"></a><span class="hl line">  108 </span>           <span class="hl sym">)</span>
    197 <a id="l_109"></a><span class="hl line">  109 </span>  <span class="hl sym">(:</span>use <span class="hl sym">:</span>cl<span class="hl sym">))</span>
    198 <a id="l_110"></a><span class="hl line">  110 </span>
    199 <a id="l_111"></a><span class="hl line">  111 </span>
    200 <a id="l_112"></a><span class="hl line">  112 </span>#<span class="hl sym">+</span>nil
    201 <a id="l_113"></a><span class="hl line">  113 </span><span class="hl sym">(</span>error <span class="hl str">&quot;The author of this file habitually uses #+nil to comment out ~</span>
    202 <a id="l_114"></a><span class="hl line">  114 </span><span class="hl str">        forms. But don't worry, it was unlikely to work in the New ~</span>
    203 <a id="l_115"></a><span class="hl line">  115 </span><span class="hl str">        Implementation of Lisp anyway&quot;</span><span class="hl sym">)</span>
    204 <a id="l_116"></a><span class="hl line">  116 </span>
    205 <a id="l_117"></a><span class="hl line">  117 </span><span class="hl sym">(</span>in-package #<span class="hl sym">:</span>asdf<span class="hl sym">)</span>
    206 <a id="l_118"></a><span class="hl line">  118 </span>
    207 <a id="l_119"></a><span class="hl line">  119 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>asdf-revision<span class="hl sym">* (</span>let<span class="hl sym">* ((</span>v <span class="hl str">&quot;$Revision$&quot;</span><span class="hl sym">)</span>
    208 <a id="l_120"></a><span class="hl line">  120 </span>                               <span class="hl sym">(</span>colon <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>position #\: v<span class="hl sym">)</span> -<span class="hl num">1</span><span class="hl sym">))</span>
    209 <a id="l_121"></a><span class="hl line">  121 </span>                               <span class="hl sym">(</span>dot <span class="hl sym">(</span>position #\. v<span class="hl sym">)))</span>
    210 <a id="l_122"></a><span class="hl line">  122 </span>                          <span class="hl sym">(</span><span class="hl kwa">and</span> v colon dot
    211 <a id="l_123"></a><span class="hl line">  123 </span>                               <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span>parse-integer v <span class="hl sym">:</span>start <span class="hl sym">(</span><span class="hl num">1</span><span class="hl sym">+</span> colon<span class="hl sym">)</span>
    212 <a id="l_124"></a><span class="hl line">  124 </span>                                                      <span class="hl sym">:</span>junk-allowed t<span class="hl sym">)</span>
    213 <a id="l_125"></a><span class="hl line">  125 </span>                                     <span class="hl sym">(</span>parse-integer v <span class="hl sym">:</span>start <span class="hl sym">(</span><span class="hl num">1</span><span class="hl sym">+</span> dot<span class="hl sym">)</span>
    214 <a id="l_126"></a><span class="hl line">  126 </span>                                                      <span class="hl sym">:</span>junk-allowed t<span class="hl sym">)))))</span>
    215 <a id="l_127"></a><span class="hl line">  127 </span>
    216 <a id="l_128"></a><span class="hl line">  128 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>compile-file-warnings-behaviour<span class="hl sym">* :</span>warn<span class="hl sym">)</span>
    217 <a id="l_129"></a><span class="hl line">  129 </span>
    218 <a id="l_130"></a><span class="hl line">  130 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>compile-file-failure-behaviour<span class="hl sym">*</span> #<span class="hl sym">+</span>sbcl <span class="hl sym">:</span>error #-sbcl <span class="hl sym">:</span>warn<span class="hl sym">)</span>
    219 <a id="l_131"></a><span class="hl line">  131 </span>
    220 <a id="l_132"></a><span class="hl line">  132 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span> nil<span class="hl sym">)</span>
    221 <a id="l_133"></a><span class="hl line">  133 </span>
    222 <a id="l_134"></a><span class="hl line">  134 </span><span class="hl sym">(</span>defparameter <span class="hl sym">+</span>asdf-methods<span class="hl sym">+</span>
    223 <a id="l_135"></a><span class="hl line">  135 </span>  <span class="hl sym">'(</span>perform explain output-files operation-done-p<span class="hl sym">))</span>
    224 <a id="l_136"></a><span class="hl line">  136 </span>
    225 <a id="l_137"></a><span class="hl line">  137 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    226 <a id="l_138"></a><span class="hl line">  138 </span><span class="hl slc">;; utility stuff</span>
    227 <a id="l_139"></a><span class="hl line">  139 </span>
    228 <a id="l_140"></a><span class="hl line">  140 </span><span class="hl sym">(</span>defmacro aif <span class="hl sym">(</span>test then <span class="hl sym">&amp;</span>optional else<span class="hl sym">)</span>
    229 <a id="l_141"></a><span class="hl line">  141 </span>  `<span class="hl sym">(</span>let <span class="hl sym">((</span>it <span class="hl sym">,</span>test<span class="hl sym">)) (</span><span class="hl kwa">if</span> it <span class="hl sym">,</span>then <span class="hl sym">,</span>else<span class="hl sym">)))</span>
    230 <a id="l_142"></a><span class="hl line">  142 </span>
    231 <a id="l_143"></a><span class="hl line">  143 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> pathname-sans-name<span class="hl sym">+</span><span class="hl kwa">type</span> <span class="hl sym">(</span>pathname<span class="hl sym">)</span>
    232 <a id="l_144"></a><span class="hl line">  144 </span>  <span class="hl str">&quot;Returns a new pathname with same HOST, DEVICE, DIRECTORY as PATHNAME,</span>
    233 <a id="l_145"></a><span class="hl line">  145 </span><span class="hl str">and NIL NAME and TYPE components&quot;</span>
    234 <a id="l_146"></a><span class="hl line">  146 </span>  <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>name nil <span class="hl sym">:</span><span class="hl kwa">type</span> nil <span class="hl sym">:</span>defaults pathname<span class="hl sym">))</span>
    235 <a id="l_147"></a><span class="hl line">  147 </span>
    236 <a id="l_148"></a><span class="hl line">  148 </span><span class="hl sym">(</span>define-modify-macro appendf <span class="hl sym">(&amp;</span>rest args<span class="hl sym">)</span>
    237 <a id="l_149"></a><span class="hl line">  149 </span>  <span class="hl kwa">append</span> <span class="hl str">&quot;Append onto list&quot;</span><span class="hl sym">)</span>
    238 <a id="l_150"></a><span class="hl line">  150 </span>
    239 <a id="l_151"></a><span class="hl line">  151 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    240 <a id="l_152"></a><span class="hl line">  152 </span><span class="hl slc">;; classes, condiitons</span>
    241 <a id="l_153"></a><span class="hl line">  153 </span>
    242 <a id="l_154"></a><span class="hl line">  154 </span><span class="hl sym">(</span>define-condition system-definition-error <span class="hl sym">(</span>error<span class="hl sym">) ()</span>
    243 <a id="l_155"></a><span class="hl line">  155 </span>  <span class="hl slc">;; [this use of :report should be redundant, but unfortunately it's not.</span>
    244 <a id="l_156"></a><span class="hl line">  156 </span>  <span class="hl slc">;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function</span>
    245 <a id="l_157"></a><span class="hl line">  157 </span>  <span class="hl slc">;; over print-object; this is always conditions::%print-condition for</span>
    246 <a id="l_158"></a><span class="hl line">  158 </span>  <span class="hl slc">;; condition objects, which in turn does inheritance of :report options at</span>
    247 <a id="l_159"></a><span class="hl line">  159 </span>  <span class="hl slc">;; run-time.  fortunately, inheritance means we only need this kludge here in</span>
    248 <a id="l_160"></a><span class="hl line">  160 </span>  <span class="hl slc">;; order to fix all conditions that build on it.  -- rgr, 28-Jul-02.]</span>
    249 <a id="l_161"></a><span class="hl line">  161 </span>  #<span class="hl sym">+</span>cmu <span class="hl sym">(:</span>report <span class="hl kwa">print</span>-object<span class="hl sym">))</span>
    250 <a id="l_162"></a><span class="hl line">  162 </span>
    251 <a id="l_163"></a><span class="hl line">  163 </span><span class="hl sym">(</span>define-condition formatted-system-definition-error <span class="hl sym">(</span>system-definition-error<span class="hl sym">)</span>
    252 <a id="l_164"></a><span class="hl line">  164 </span>  <span class="hl sym">((</span>format-control <span class="hl sym">:</span>initarg <span class="hl sym">:</span>format-control <span class="hl sym">:</span>reader format-control<span class="hl sym">)</span>
    253 <a id="l_165"></a><span class="hl line">  165 </span>   <span class="hl sym">(</span>format-arguments <span class="hl sym">:</span>initarg <span class="hl sym">:</span>format-arguments <span class="hl sym">:</span>reader format-arguments<span class="hl sym">))</span>
    254 <a id="l_166"></a><span class="hl line">  166 </span>  <span class="hl sym">(:</span>report <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>c s<span class="hl sym">)</span>
    255 <a id="l_167"></a><span class="hl line">  167 </span>             <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>format s <span class="hl sym">(</span>format-control c<span class="hl sym">) (</span>format-arguments c<span class="hl sym">)))))</span>
    256 <a id="l_168"></a><span class="hl line">  168 </span>
    257 <a id="l_169"></a><span class="hl line">  169 </span><span class="hl sym">(</span>define-condition circular-dependency <span class="hl sym">(</span>system-definition-error<span class="hl sym">)</span>
    258 <a id="l_170"></a><span class="hl line">  170 </span>  <span class="hl sym">((</span>components <span class="hl sym">:</span>initarg <span class="hl sym">:</span>components <span class="hl sym">:</span>reader circular-dependency-components<span class="hl sym">)))</span>
    259 <a id="l_171"></a><span class="hl line">  171 </span>
    260 <a id="l_172"></a><span class="hl line">  172 </span><span class="hl sym">(</span>define-condition duplicate-names <span class="hl sym">(</span>system-definition-error<span class="hl sym">)</span>
    261 <a id="l_173"></a><span class="hl line">  173 </span>  <span class="hl sym">((</span>name <span class="hl sym">:</span>initarg <span class="hl sym">:</span>name <span class="hl sym">:</span>reader duplicate-names-name<span class="hl sym">)))</span>
    262 <a id="l_174"></a><span class="hl line">  174 </span>
    263 <a id="l_175"></a><span class="hl line">  175 </span><span class="hl sym">(</span>define-condition missing-component <span class="hl sym">(</span>system-definition-error<span class="hl sym">)</span>
    264 <a id="l_176"></a><span class="hl line">  176 </span>  <span class="hl sym">((</span>requires <span class="hl sym">:</span>initform <span class="hl str">&quot;(unnamed)&quot;</span> <span class="hl sym">:</span>reader missing-requires <span class="hl sym">:</span>initarg <span class="hl sym">:</span>requires<span class="hl sym">)</span>
    265 <a id="l_177"></a><span class="hl line">  177 </span>   <span class="hl sym">(</span>version <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>reader missing-version <span class="hl sym">:</span>initarg <span class="hl sym">:</span>version<span class="hl sym">)</span>
    266 <a id="l_178"></a><span class="hl line">  178 </span>   <span class="hl sym">(</span>parent <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>reader missing-parent <span class="hl sym">:</span>initarg <span class="hl sym">:</span>parent<span class="hl sym">)))</span>
    267 <a id="l_179"></a><span class="hl line">  179 </span>
    268 <a id="l_180"></a><span class="hl line">  180 </span><span class="hl sym">(</span>define-condition missing-dependency <span class="hl sym">(</span>missing-component<span class="hl sym">)</span>
    269 <a id="l_181"></a><span class="hl line">  181 </span>  <span class="hl sym">((</span>required-by <span class="hl sym">:</span>initarg <span class="hl sym">:</span>required-by <span class="hl sym">:</span>reader missing-required-by<span class="hl sym">)))</span>
    270 <a id="l_182"></a><span class="hl line">  182 </span>
    271 <a id="l_183"></a><span class="hl line">  183 </span><span class="hl sym">(</span>define-condition operation-error <span class="hl sym">(</span>error<span class="hl sym">)</span>
    272 <a id="l_184"></a><span class="hl line">  184 </span>  <span class="hl sym">((</span>component <span class="hl sym">:</span>reader error-component <span class="hl sym">:</span>initarg <span class="hl sym">:</span>component<span class="hl sym">)</span>
    273 <a id="l_185"></a><span class="hl line">  185 </span>   <span class="hl sym">(</span>operation <span class="hl sym">:</span>reader error-operation <span class="hl sym">:</span>initarg <span class="hl sym">:</span>operation<span class="hl sym">))</span>
    274 <a id="l_186"></a><span class="hl line">  186 </span>  <span class="hl sym">(:</span>report <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>c s<span class="hl sym">)</span>
    275 <a id="l_187"></a><span class="hl line">  187 </span>             <span class="hl sym">(</span>format s <span class="hl str">&quot;~&#64;&lt;erred while invoking ~A on ~A~&#64;:&gt;&quot;</span>
    276 <a id="l_188"></a><span class="hl line">  188 </span>                     <span class="hl sym">(</span>error-operation c<span class="hl sym">) (</span>error-component c<span class="hl sym">)))))</span>
    277 <a id="l_189"></a><span class="hl line">  189 </span><span class="hl sym">(</span>define-condition compile-error <span class="hl sym">(</span>operation-error<span class="hl sym">) ())</span>
    278 <a id="l_190"></a><span class="hl line">  190 </span><span class="hl sym">(</span>define-condition compile-failed <span class="hl sym">(</span>compile-error<span class="hl sym">) ())</span>
    279 <a id="l_191"></a><span class="hl line">  191 </span><span class="hl sym">(</span>define-condition compile-warned <span class="hl sym">(</span>compile-error<span class="hl sym">) ())</span>
    280 <a id="l_192"></a><span class="hl line">  192 </span>
    281 <a id="l_193"></a><span class="hl line">  193 </span><span class="hl sym">(</span>defclass component <span class="hl sym">()</span>
    282 <a id="l_194"></a><span class="hl line">  194 </span>  <span class="hl sym">((</span>name <span class="hl sym">:</span>accessor component-name <span class="hl sym">:</span>initarg <span class="hl sym">:</span>name <span class="hl sym">:</span>documentation
    283 <a id="l_195"></a><span class="hl line">  195 </span>         <span class="hl str">&quot;Component name: designator for a string composed of portable pathname characters&quot;</span><span class="hl sym">)</span>
    284 <a id="l_196"></a><span class="hl line">  196 </span>   <span class="hl sym">(</span>version <span class="hl sym">:</span>accessor component-version <span class="hl sym">:</span>initarg <span class="hl sym">:</span>version<span class="hl sym">)</span>
    285 <a id="l_197"></a><span class="hl line">  197 </span>   <span class="hl sym">(</span>in-order-to <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>initarg <span class="hl sym">:</span>in-order-to<span class="hl sym">)</span>
    286 <a id="l_198"></a><span class="hl line">  198 </span>   <span class="hl slc">;; XXX crap name</span>
    287 <a id="l_199"></a><span class="hl line">  199 </span>   <span class="hl sym">(</span>do-first <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>initarg <span class="hl sym">:</span>do-first<span class="hl sym">)</span>
    288 <a id="l_200"></a><span class="hl line">  200 </span>   <span class="hl slc">;; methods defined using the &quot;inline&quot; style inside a defsystem form:</span>
    289 <a id="l_201"></a><span class="hl line">  201 </span>   <span class="hl slc">;; need to store them somewhere so we can delete them when the system</span>
    290 <a id="l_202"></a><span class="hl line">  202 </span>   <span class="hl slc">;; is re-evaluated</span>
    291 <a id="l_203"></a><span class="hl line">  203 </span>   <span class="hl sym">(</span>inline-methods <span class="hl sym">:</span>accessor component-inline-methods <span class="hl sym">:</span>initform nil<span class="hl sym">)</span>
    292 <a id="l_204"></a><span class="hl line">  204 </span>   <span class="hl sym">(</span>parent <span class="hl sym">:</span>initarg <span class="hl sym">:</span>parent <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>reader component-parent<span class="hl sym">)</span>
    293 <a id="l_205"></a><span class="hl line">  205 </span>   <span class="hl slc">;; no direct accessor for pathname, we do this as a method to allow</span>
    294 <a id="l_206"></a><span class="hl line">  206 </span>   <span class="hl slc">;; it to default in funky ways if not supplied</span>
    295 <a id="l_207"></a><span class="hl line">  207 </span>   <span class="hl sym">(</span>relative-pathname <span class="hl sym">:</span>initarg <span class="hl sym">:</span>pathname<span class="hl sym">)</span>
    296 <a id="l_208"></a><span class="hl line">  208 </span>   <span class="hl sym">(</span>operation-times <span class="hl sym">:</span>initform <span class="hl sym">(</span>make-hash-table <span class="hl sym">)</span>
    297 <a id="l_209"></a><span class="hl line">  209 </span>                    <span class="hl sym">:</span>accessor component-operation-times<span class="hl sym">)</span>
    298 <a id="l_210"></a><span class="hl line">  210 </span>   <span class="hl slc">;; XXX we should provide some atomic interface for updating the</span>
    299 <a id="l_211"></a><span class="hl line">  211 </span>   <span class="hl slc">;; component properties</span>
    300 <a id="l_212"></a><span class="hl line">  212 </span>   <span class="hl sym">(</span>properties <span class="hl sym">:</span>accessor component-properties <span class="hl sym">:</span>initarg <span class="hl sym">:</span>properties
    301 <a id="l_213"></a><span class="hl line">  213 </span>               <span class="hl sym">:</span>initform nil<span class="hl sym">)))</span>
    302 <a id="l_214"></a><span class="hl line">  214 </span>
    303 <a id="l_215"></a><span class="hl line">  215 </span><span class="hl slc">;;;; methods: conditions</span>
    304 <a id="l_216"></a><span class="hl line">  216 </span>
    305 <a id="l_217"></a><span class="hl line">  217 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">print</span>-object <span class="hl sym">((</span>c missing-dependency<span class="hl sym">)</span> s<span class="hl sym">)</span>
    306 <a id="l_218"></a><span class="hl line">  218 </span>  <span class="hl sym">(</span>format s <span class="hl str">&quot;~&#64;&lt;~A, required by ~A~&#64;:&gt;&quot;</span>
    307 <a id="l_219"></a><span class="hl line">  219 </span>          <span class="hl sym">(</span>call-next-method c nil<span class="hl sym">) (</span>missing-required-by c<span class="hl sym">)))</span>
    308 <a id="l_220"></a><span class="hl line">  220 </span>
    309 <a id="l_221"></a><span class="hl line">  221 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> sysdef-error <span class="hl sym">(</span>format <span class="hl sym">&amp;</span>rest arguments<span class="hl sym">)</span>
    310 <a id="l_222"></a><span class="hl line">  222 </span>  <span class="hl sym">(</span>error <span class="hl sym">'</span>formatted-system-definition-error <span class="hl sym">:</span>format-control format <span class="hl sym">:</span>format-arguments arguments<span class="hl sym">))</span>
    311 <a id="l_223"></a><span class="hl line">  223 </span>
    312 <a id="l_224"></a><span class="hl line">  224 </span><span class="hl slc">;;;; methods: components</span>
    313 <a id="l_225"></a><span class="hl line">  225 </span>
    314 <a id="l_226"></a><span class="hl line">  226 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">print</span>-object <span class="hl sym">((</span>c missing-component<span class="hl sym">)</span> s<span class="hl sym">)</span>
    315 <a id="l_227"></a><span class="hl line">  227 </span>  <span class="hl sym">(</span>format s <span class="hl str">&quot;~&#64;&lt;component ~S not found~</span>
    316 <a id="l_228"></a><span class="hl line">  228 </span><span class="hl str">             ~&#64;[ or does not match version ~A~]~</span>
    317 <a id="l_229"></a><span class="hl line">  229 </span><span class="hl str">             ~&#64;[ in ~A~]~&#64;:&gt;&quot;</span>
    318 <a id="l_230"></a><span class="hl line">  230 </span>          <span class="hl sym">(</span>missing-requires c<span class="hl sym">)</span>
    319 <a id="l_231"></a><span class="hl line">  231 </span>          <span class="hl sym">(</span>missing-version c<span class="hl sym">)</span>
    320 <a id="l_232"></a><span class="hl line">  232 </span>          <span class="hl sym">(</span>when <span class="hl sym">(</span>missing-parent c<span class="hl sym">)</span>
    321 <a id="l_233"></a><span class="hl line">  233 </span>            <span class="hl sym">(</span>component-name <span class="hl sym">(</span>missing-parent c<span class="hl sym">)))))</span>
    322 <a id="l_234"></a><span class="hl line">  234 </span>
    323 <a id="l_235"></a><span class="hl line">  235 </span><span class="hl sym">(</span>defgeneric component-system <span class="hl sym">(</span>component<span class="hl sym">)</span>
    324 <a id="l_236"></a><span class="hl line">  236 </span>  <span class="hl sym">(:</span>documentation <span class="hl str">&quot;Find the top-level system containing COMPONENT&quot;</span><span class="hl sym">))</span>
    325 <a id="l_237"></a><span class="hl line">  237 </span>
    326 <a id="l_238"></a><span class="hl line">  238 </span><span class="hl sym">(</span>defmethod component-system <span class="hl sym">((</span>component component<span class="hl sym">))</span>
    327 <a id="l_239"></a><span class="hl line">  239 </span>  <span class="hl sym">(</span>aif <span class="hl sym">(</span>component-parent component<span class="hl sym">)</span>
    328 <a id="l_240"></a><span class="hl line">  240 </span>       <span class="hl sym">(</span>component-system it<span class="hl sym">)</span>
    329 <a id="l_241"></a><span class="hl line">  241 </span>       component<span class="hl sym">))</span>
    330 <a id="l_242"></a><span class="hl line">  242 </span>
    331 <a id="l_243"></a><span class="hl line">  243 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">print</span>-object <span class="hl sym">((</span>c component<span class="hl sym">)</span> stream<span class="hl sym">)</span>
    332 <a id="l_244"></a><span class="hl line">  244 </span>  <span class="hl sym">(</span><span class="hl kwa">print</span>-unreadable-object <span class="hl sym">(</span>c stream <span class="hl sym">:</span><span class="hl kwa">type</span> t <span class="hl sym">:</span>identity t<span class="hl sym">)</span>
    333 <a id="l_245"></a><span class="hl line">  245 </span>    <span class="hl sym">(</span>ignore-errors
    334 <a id="l_246"></a><span class="hl line">  246 </span>      <span class="hl sym">(</span><span class="hl kwa">prin1</span> <span class="hl sym">(</span>component-name c<span class="hl sym">)</span> stream<span class="hl sym">))))</span>
    335 <a id="l_247"></a><span class="hl line">  247 </span>
    336 <a id="l_248"></a><span class="hl line">  248 </span><span class="hl sym">(</span>defclass module <span class="hl sym">(</span>component<span class="hl sym">)</span>
    337 <a id="l_249"></a><span class="hl line">  249 </span>  <span class="hl sym">((</span>components <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>accessor module-components <span class="hl sym">:</span>initarg <span class="hl sym">:</span>components<span class="hl sym">)</span>
    338 <a id="l_250"></a><span class="hl line">  250 </span>   <span class="hl slc">;; what to do if we can't satisfy a dependency of one of this module's</span>
    339 <a id="l_251"></a><span class="hl line">  251 </span>   <span class="hl slc">;; components.  This allows a limited form of conditional processing</span>
    340 <a id="l_252"></a><span class="hl line">  252 </span>   <span class="hl sym">(</span><span class="hl kwa">if</span>-component-dep-fails <span class="hl sym">:</span>initform <span class="hl sym">:</span>fail
    341 <a id="l_253"></a><span class="hl line">  253 </span>                           <span class="hl sym">:</span>accessor module-<span class="hl kwa">if</span>-component-dep-fails
    342 <a id="l_254"></a><span class="hl line">  254 </span>                           <span class="hl sym">:</span>initarg <span class="hl sym">:</span><span class="hl kwa">if</span>-component-dep-fails<span class="hl sym">)</span>
    343 <a id="l_255"></a><span class="hl line">  255 </span>   <span class="hl sym">(</span>default-component-class <span class="hl sym">:</span>accessor module-default-component-class
    344 <a id="l_256"></a><span class="hl line">  256 </span>     <span class="hl sym">:</span>initform <span class="hl sym">'</span>cl-source-file <span class="hl sym">:</span>initarg <span class="hl sym">:</span>default-component-class<span class="hl sym">)))</span>
    345 <a id="l_257"></a><span class="hl line">  257 </span>
    346 <a id="l_258"></a><span class="hl line">  258 </span><span class="hl sym">(</span>defgeneric component-pathname <span class="hl sym">(</span>component<span class="hl sym">)</span>
    347 <a id="l_259"></a><span class="hl line">  259 </span>  <span class="hl sym">(:</span>documentation <span class="hl str">&quot;Extracts the pathname applicable for a particular component.&quot;</span><span class="hl sym">))</span>
    348 <a id="l_260"></a><span class="hl line">  260 </span>
    349 <a id="l_261"></a><span class="hl line">  261 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> component-parent-pathname <span class="hl sym">(</span>component<span class="hl sym">)</span>
    350 <a id="l_262"></a><span class="hl line">  262 </span>  <span class="hl sym">(</span>aif <span class="hl sym">(</span>component-parent component<span class="hl sym">)</span>
    351 <a id="l_263"></a><span class="hl line">  263 </span>       <span class="hl sym">(</span>component-pathname it<span class="hl sym">)</span>
    352 <a id="l_264"></a><span class="hl line">  264 </span>       <span class="hl sym">*</span>default-pathname-defaults<span class="hl sym">*))</span>
    353 <a id="l_265"></a><span class="hl line">  265 </span>
    354 <a id="l_266"></a><span class="hl line">  266 </span><span class="hl sym">(</span>defgeneric component-relative-pathname <span class="hl sym">(</span>component<span class="hl sym">)</span>
    355 <a id="l_267"></a><span class="hl line">  267 </span>  <span class="hl sym">(:</span>documentation <span class="hl str">&quot;Extracts the relative pathname applicable for a particular component.&quot;</span><span class="hl sym">))</span>
    356 <a id="l_268"></a><span class="hl line">  268 </span>
    357 <a id="l_269"></a><span class="hl line">  269 </span><span class="hl sym">(</span>defmethod component-relative-pathname <span class="hl sym">((</span>component module<span class="hl sym">))</span>
    358 <a id="l_270"></a><span class="hl line">  270 </span>  <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>slot-value component <span class="hl sym">'</span>relative-pathname<span class="hl sym">)</span>
    359 <a id="l_271"></a><span class="hl line">  271 </span>      <span class="hl sym">(</span>make-pathname
    360 <a id="l_272"></a><span class="hl line">  272 </span>       <span class="hl sym">:</span>directory `<span class="hl sym">(:</span>relative <span class="hl sym">,(</span>component-name component<span class="hl sym">))</span>
    361 <a id="l_273"></a><span class="hl line">  273 </span>       <span class="hl sym">:</span>host <span class="hl sym">(</span>pathname-host <span class="hl sym">(</span>component-parent-pathname component<span class="hl sym">)))))</span>
    362 <a id="l_274"></a><span class="hl line">  274 </span>
    363 <a id="l_275"></a><span class="hl line">  275 </span><span class="hl sym">(</span>defmethod component-pathname <span class="hl sym">((</span>component component<span class="hl sym">))</span>
    364 <a id="l_276"></a><span class="hl line">  276 </span>  <span class="hl sym">(</span>let <span class="hl sym">((*</span>default-pathname-defaults<span class="hl sym">* (</span>component-parent-pathname component<span class="hl sym">)))</span>
    365 <a id="l_277"></a><span class="hl line">  277 </span>    <span class="hl sym">(</span>merge-pathnames <span class="hl sym">(</span>component-relative-pathname component<span class="hl sym">))))</span>
    366 <a id="l_278"></a><span class="hl line">  278 </span>
    367 <a id="l_279"></a><span class="hl line">  279 </span><span class="hl sym">(</span>defgeneric component-property <span class="hl sym">(</span>component property<span class="hl sym">))</span>
    368 <a id="l_280"></a><span class="hl line">  280 </span>
    369 <a id="l_281"></a><span class="hl line">  281 </span><span class="hl sym">(</span>defmethod component-property <span class="hl sym">((</span>c component<span class="hl sym">)</span> property<span class="hl sym">)</span>
    370 <a id="l_282"></a><span class="hl line">  282 </span>  <span class="hl sym">(</span><span class="hl kwa">cdr</span> <span class="hl sym">(</span><span class="hl kwa">assoc</span> property <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>properties<span class="hl sym">) :</span>test #<span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)))</span>
    371 <a id="l_283"></a><span class="hl line">  283 </span>
    372 <a id="l_284"></a><span class="hl line">  284 </span><span class="hl sym">(</span>defgeneric <span class="hl sym">(</span>setf component-property<span class="hl sym">) (</span>new-value component property<span class="hl sym">))</span>
    373 <a id="l_285"></a><span class="hl line">  285 </span>
    374 <a id="l_286"></a><span class="hl line">  286 </span><span class="hl sym">(</span>defmethod <span class="hl sym">(</span>setf component-property<span class="hl sym">) (</span>new-value <span class="hl sym">(</span>c component<span class="hl sym">)</span> property<span class="hl sym">)</span>
    375 <a id="l_287"></a><span class="hl line">  287 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>a <span class="hl sym">(</span><span class="hl kwa">assoc</span> property <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>properties<span class="hl sym">) :</span>test #<span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)))</span>
    376 <a id="l_288"></a><span class="hl line">  288 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> a
    377 <a id="l_289"></a><span class="hl line">  289 </span>        <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">cdr</span> a<span class="hl sym">)</span> new-value<span class="hl sym">)</span>
    378 <a id="l_290"></a><span class="hl line">  290 </span>        <span class="hl sym">(</span>setf <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>properties<span class="hl sym">)</span>
    379 <a id="l_291"></a><span class="hl line">  291 </span>              <span class="hl sym">(</span>acons property new-value <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>properties<span class="hl sym">))))))</span>
    380 <a id="l_292"></a><span class="hl line">  292 </span>
    381 <a id="l_293"></a><span class="hl line">  293 </span><span class="hl sym">(</span>defclass system <span class="hl sym">(</span>module<span class="hl sym">)</span>
    382 <a id="l_294"></a><span class="hl line">  294 </span>  <span class="hl sym">((</span>description <span class="hl sym">:</span>accessor system-description <span class="hl sym">:</span>initarg <span class="hl sym">:</span>description<span class="hl sym">)</span>
    383 <a id="l_295"></a><span class="hl line">  295 </span>   <span class="hl sym">(</span>long-description
    384 <a id="l_296"></a><span class="hl line">  296 </span>    <span class="hl sym">:</span>accessor system-long-description <span class="hl sym">:</span>initarg <span class="hl sym">:</span>long-description<span class="hl sym">)</span>
    385 <a id="l_297"></a><span class="hl line">  297 </span>   <span class="hl sym">(</span>author <span class="hl sym">:</span>accessor system-author <span class="hl sym">:</span>initarg <span class="hl sym">:</span>author<span class="hl sym">)</span>
    386 <a id="l_298"></a><span class="hl line">  298 </span>   <span class="hl sym">(</span>maintainer <span class="hl sym">:</span>accessor system-maintainer <span class="hl sym">:</span>initarg <span class="hl sym">:</span>maintainer<span class="hl sym">)</span>
    387 <a id="l_299"></a><span class="hl line">  299 </span>   <span class="hl sym">(</span>licence <span class="hl sym">:</span>accessor system-licence <span class="hl sym">:</span>initarg <span class="hl sym">:</span>licence
    388 <a id="l_300"></a><span class="hl line">  300 </span>            <span class="hl sym">:</span>accessor system-license <span class="hl sym">:</span>initarg <span class="hl sym">:</span>license<span class="hl sym">)))</span>
    389 <a id="l_301"></a><span class="hl line">  301 </span>
    390 <a id="l_302"></a><span class="hl line">  302 </span><span class="hl slc">;;; version-satisfies</span>
    391 <a id="l_303"></a><span class="hl line">  303 </span>
    392 <a id="l_304"></a><span class="hl line">  304 </span><span class="hl slc">;;; with apologies to christophe rhodes ...</span>
    393 <a id="l_305"></a><span class="hl line">  305 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> split <span class="hl sym">(</span>string <span class="hl sym">&amp;</span>optional <span class="hl kwa">max</span> <span class="hl sym">(</span>ws <span class="hl sym">'(</span>#\Space #\Tab<span class="hl sym">)))</span>
    394 <a id="l_306"></a><span class="hl line">  306 </span>  <span class="hl sym">(</span>flet <span class="hl sym">((</span>is-ws <span class="hl sym">(</span>char<span class="hl sym">) (</span>find char ws<span class="hl sym">)))</span>
    395 <a id="l_307"></a><span class="hl line">  307 </span>    <span class="hl sym">(</span>nreverse
    396 <a id="l_308"></a><span class="hl line">  308 </span>     <span class="hl sym">(</span>let <span class="hl sym">((</span><span class="hl kwa">list</span> nil<span class="hl sym">) (</span>start <span class="hl num">0</span><span class="hl sym">) (</span>words <span class="hl num">0</span><span class="hl sym">)</span> end<span class="hl sym">)</span>
    397 <a id="l_309"></a><span class="hl line">  309 </span>       <span class="hl sym">(</span>loop
    398 <a id="l_310"></a><span class="hl line">  310 </span>         <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and max</span> <span class="hl sym">(&gt;=</span> words <span class="hl sym">(</span><span class="hl num">1</span>- <span class="hl kwa">max</span><span class="hl sym">)))</span>
    399 <a id="l_311"></a><span class="hl line">  311 </span>           <span class="hl sym">(</span>return <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span>subseq string start<span class="hl sym">)</span> <span class="hl kwa">list</span><span class="hl sym">)))</span>
    400 <a id="l_312"></a><span class="hl line">  312 </span>         <span class="hl sym">(</span>setf end <span class="hl sym">(</span>position-<span class="hl kwa">if</span> #<span class="hl sym">'</span>is-ws string <span class="hl sym">:</span>start start<span class="hl sym">))</span>
    401 <a id="l_313"></a><span class="hl line">  313 </span>         <span class="hl sym">(</span>push <span class="hl sym">(</span>subseq string start end<span class="hl sym">)</span> <span class="hl kwa">list</span><span class="hl sym">)</span>
    402 <a id="l_314"></a><span class="hl line">  314 </span>         <span class="hl sym">(</span>incf words<span class="hl sym">)</span>
    403 <a id="l_315"></a><span class="hl line">  315 </span>         <span class="hl sym">(</span>unless end <span class="hl sym">(</span>return <span class="hl kwa">list</span><span class="hl sym">))</span>
    404 <a id="l_316"></a><span class="hl line">  316 </span>         <span class="hl sym">(</span>setf start <span class="hl sym">(</span><span class="hl num">1</span><span class="hl sym">+</span> end<span class="hl sym">)))))))</span>
    405 <a id="l_317"></a><span class="hl line">  317 </span>
    406 <a id="l_318"></a><span class="hl line">  318 </span><span class="hl sym">(</span>defgeneric version-satisfies <span class="hl sym">(</span>component version<span class="hl sym">))</span>
    407 <a id="l_319"></a><span class="hl line">  319 </span>
    408 <a id="l_320"></a><span class="hl line">  320 </span><span class="hl sym">(</span>defmethod version-satisfies <span class="hl sym">((</span>c component<span class="hl sym">)</span> version<span class="hl sym">)</span>
    409 <a id="l_321"></a><span class="hl line">  321 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span><span class="hl kwa">and</span> version <span class="hl sym">(</span>slot-<span class="hl kwa">boundp</span> c <span class="hl sym">'</span>version<span class="hl sym">))</span>
    410 <a id="l_322"></a><span class="hl line">  322 </span>    <span class="hl sym">(</span>return-from version-satisfies t<span class="hl sym">))</span>
    411 <a id="l_323"></a><span class="hl line">  323 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>x <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>parse-integer
    412 <a id="l_324"></a><span class="hl line">  324 </span>                   <span class="hl sym">(</span>split <span class="hl sym">(</span>component-version c<span class="hl sym">)</span> nil <span class="hl sym">'(</span>#\.<span class="hl sym">))))</span>
    413 <a id="l_325"></a><span class="hl line">  325 </span>        <span class="hl sym">(</span>y <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>parse-integer
    414 <a id="l_326"></a><span class="hl line">  326 </span>                   <span class="hl sym">(</span>split version nil <span class="hl sym">'(</span>#\.<span class="hl sym">)))))</span>
    415 <a id="l_327"></a><span class="hl line">  327 </span>    <span class="hl sym">(</span>labels <span class="hl sym">((</span>bigger <span class="hl sym">(</span>x y<span class="hl sym">)</span>
    416 <a id="l_328"></a><span class="hl line">  328 </span>               <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">not</span> y<span class="hl sym">)</span> t<span class="hl sym">)</span>
    417 <a id="l_329"></a><span class="hl line">  329 </span>                     <span class="hl sym">((</span><span class="hl kwa">not</span> x<span class="hl sym">)</span> nil<span class="hl sym">)</span>
    418 <a id="l_330"></a><span class="hl line">  330 </span>                     <span class="hl sym">((&gt; (</span><span class="hl kwa">car</span> x<span class="hl sym">) (</span><span class="hl kwa">car</span> y<span class="hl sym">))</span> t<span class="hl sym">)</span>
    419 <a id="l_331"></a><span class="hl line">  331 </span>                     <span class="hl sym">((= (</span><span class="hl kwa">car</span> x<span class="hl sym">) (</span><span class="hl kwa">car</span> y<span class="hl sym">))</span>
    420 <a id="l_332"></a><span class="hl line">  332 </span>                      <span class="hl sym">(</span>bigger <span class="hl sym">(</span><span class="hl kwa">cdr</span> x<span class="hl sym">) (</span><span class="hl kwa">cdr</span> y<span class="hl sym">))))))</span>
    421 <a id="l_333"></a><span class="hl line">  333 </span>      <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(= (</span><span class="hl kwa">car</span> x<span class="hl sym">) (</span><span class="hl kwa">car</span> y<span class="hl sym">))</span>
    422 <a id="l_334"></a><span class="hl line">  334 </span>           <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span><span class="hl kwa">cdr</span> y<span class="hl sym">)) (</span>bigger <span class="hl sym">(</span><span class="hl kwa">cdr</span> x<span class="hl sym">) (</span><span class="hl kwa">cdr</span> y<span class="hl sym">)))))))</span>
    423 <a id="l_335"></a><span class="hl line">  335 </span>
    424 <a id="l_336"></a><span class="hl line">  336 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    425 <a id="l_337"></a><span class="hl line">  337 </span><span class="hl slc">;;; finding systems</span>
    426 <a id="l_338"></a><span class="hl line">  338 </span>
    427 <a id="l_339"></a><span class="hl line">  339 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>defined-systems<span class="hl sym">* (</span>make-hash-table <span class="hl sym">:</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">))</span>
    428 <a id="l_340"></a><span class="hl line">  340 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> coerce-name <span class="hl sym">(</span>name<span class="hl sym">)</span>
    429 <a id="l_341"></a><span class="hl line">  341 </span>  <span class="hl sym">(</span>typecase name
    430 <a id="l_342"></a><span class="hl line">  342 </span>    <span class="hl sym">(</span>component <span class="hl sym">(</span>component-name name<span class="hl sym">))</span>
    431 <a id="l_343"></a><span class="hl line">  343 </span>    <span class="hl sym">(</span>symbol <span class="hl sym">(</span>string-downcase <span class="hl sym">(</span>symbol-name name<span class="hl sym">)))</span>
    432 <a id="l_344"></a><span class="hl line">  344 </span>    <span class="hl sym">(</span>string name<span class="hl sym">)</span>
    433 <a id="l_345"></a><span class="hl line">  345 </span>    <span class="hl sym">(</span>t <span class="hl sym">(</span>sysdef-error <span class="hl str">&quot;~&#64;&lt;invalid component designator ~A~&#64;:&gt;&quot;</span> name<span class="hl sym">))))</span>
    434 <a id="l_346"></a><span class="hl line">  346 </span>
    435 <a id="l_347"></a><span class="hl line">  347 </span><span class="hl slc">;;; for the sake of keeping things reasonably neat, we adopt a</span>
    436 <a id="l_348"></a><span class="hl line">  348 </span><span class="hl slc">;;; convention that functions in this list are prefixed SYSDEF-</span>
    437 <a id="l_349"></a><span class="hl line">  349 </span>
    438 <a id="l_350"></a><span class="hl line">  350 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>system-definition-search-functions<span class="hl sym">*</span>
    439 <a id="l_351"></a><span class="hl line">  351 </span>  <span class="hl sym">'(</span>sysdef-central-registry-search<span class="hl sym">))</span>
    440 <a id="l_352"></a><span class="hl line">  352 </span>
    441 <a id="l_353"></a><span class="hl line">  353 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> system-definition-pathname <span class="hl sym">(</span>system<span class="hl sym">)</span>
    442 <a id="l_354"></a><span class="hl line">  354 </span>  <span class="hl sym">(</span>some <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>x<span class="hl sym">) (</span>funcall x system<span class="hl sym">))</span>
    443 <a id="l_355"></a><span class="hl line">  355 </span>        <span class="hl sym">*</span>system-definition-search-functions<span class="hl sym">*))</span>
    444 <a id="l_356"></a><span class="hl line">  356 </span>
    445 <a id="l_357"></a><span class="hl line">  357 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>central-registry<span class="hl sym">*</span>
    446 <a id="l_358"></a><span class="hl line">  358 </span>  <span class="hl sym">'(*</span>default-pathname-defaults<span class="hl sym">*</span>
    447 <a id="l_359"></a><span class="hl line">  359 </span>    #<span class="hl sym">+</span>nil <span class="hl str">&quot;/home/dan/src/sourceforge/cclan/asdf/systems/&quot;</span>
    448 <a id="l_360"></a><span class="hl line">  360 </span>    #<span class="hl sym">+</span>nil <span class="hl str">&quot;telent:asdf;systems;&quot;</span><span class="hl sym">))</span>
    449 <a id="l_361"></a><span class="hl line">  361 </span>
    450 <a id="l_362"></a><span class="hl line">  362 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> sysdef-central-registry-search <span class="hl sym">(</span>system<span class="hl sym">)</span>
    451 <a id="l_363"></a><span class="hl line">  363 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>name <span class="hl sym">(</span>coerce-name system<span class="hl sym">)))</span>
    452 <a id="l_364"></a><span class="hl line">  364 </span>    <span class="hl sym">(</span>block nil
    453 <a id="l_365"></a><span class="hl line">  365 </span>      <span class="hl sym">(</span>dolist <span class="hl sym">(</span>dir <span class="hl sym">*</span>central-registry<span class="hl sym">*)</span>
    454 <a id="l_366"></a><span class="hl line">  366 </span>        <span class="hl sym">(</span>let<span class="hl sym">* ((</span>defaults <span class="hl sym">(</span><span class="hl kwa">eval</span> dir<span class="hl sym">))</span>
    455 <a id="l_367"></a><span class="hl line">  367 </span>               <span class="hl sym">(</span>file <span class="hl sym">(</span><span class="hl kwa">and</span> defaults
    456 <a id="l_368"></a><span class="hl line">  368 </span>                          <span class="hl sym">(</span>make-pathname
    457 <a id="l_369"></a><span class="hl line">  369 </span>                           <span class="hl sym">:</span>defaults defaults <span class="hl sym">:</span>version <span class="hl sym">:</span>newest
    458 <a id="l_370"></a><span class="hl line">  370 </span>                           <span class="hl sym">:</span>name name <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl str">&quot;asd&quot;</span> <span class="hl sym">:</span>case <span class="hl sym">:</span>local<span class="hl sym">))))</span>
    459 <a id="l_371"></a><span class="hl line">  371 </span>          <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">and</span> file <span class="hl sym">(</span>probe-file file<span class="hl sym">))</span>
    460 <a id="l_372"></a><span class="hl line">  372 </span>              <span class="hl sym">(</span>return file<span class="hl sym">)))))))</span>
    461 <a id="l_373"></a><span class="hl line">  373 </span>
    462 <a id="l_374"></a><span class="hl line">  374 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> make-temporary-package <span class="hl sym">()</span>
    463 <a id="l_375"></a><span class="hl line">  375 </span>  <span class="hl sym">(</span>flet <span class="hl sym">((</span>try <span class="hl sym">(</span>counter<span class="hl sym">)</span>
    464 <a id="l_376"></a><span class="hl line">  376 </span>           <span class="hl sym">(</span>ignore-errors
    465 <a id="l_377"></a><span class="hl line">  377 </span>             <span class="hl sym">(</span>make-package <span class="hl sym">(</span>format nil <span class="hl str">&quot;ASDF~D&quot;</span> counter<span class="hl sym">)</span>
    466 <a id="l_378"></a><span class="hl line">  378 </span>                           <span class="hl sym">:</span>use <span class="hl sym">'(:</span>cl <span class="hl sym">:</span>asdf<span class="hl sym">)))))</span>
    467 <a id="l_379"></a><span class="hl line">  379 </span>    <span class="hl sym">(</span>do<span class="hl sym">* ((</span>counter <span class="hl num">0</span> <span class="hl sym">(+</span> counter <span class="hl num">1</span><span class="hl sym">))</span>
    468 <a id="l_380"></a><span class="hl line">  380 </span>          <span class="hl sym">(</span>package <span class="hl sym">(</span>try counter<span class="hl sym">) (</span>try counter<span class="hl sym">)))</span>
    469 <a id="l_381"></a><span class="hl line">  381 </span>         <span class="hl sym">(</span>package package<span class="hl sym">))))</span>
    470 <a id="l_382"></a><span class="hl line">  382 </span>
    471 <a id="l_383"></a><span class="hl line">  383 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> find-system <span class="hl sym">(</span>name <span class="hl sym">&amp;</span>optional <span class="hl sym">(</span>error-p t<span class="hl sym">))</span>
    472 <a id="l_384"></a><span class="hl line">  384 </span>  <span class="hl sym">(</span>let<span class="hl sym">* ((</span>name <span class="hl sym">(</span>coerce-name name<span class="hl sym">))</span>
    473 <a id="l_385"></a><span class="hl line">  385 </span>         <span class="hl sym">(</span>in-memory <span class="hl sym">(</span>gethash name <span class="hl sym">*</span>defined-systems<span class="hl sym">*))</span>
    474 <a id="l_386"></a><span class="hl line">  386 </span>         <span class="hl sym">(</span>on-disk <span class="hl sym">(</span>system-definition-pathname name<span class="hl sym">)))</span>
    475 <a id="l_387"></a><span class="hl line">  387 </span>    <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> on-disk
    476 <a id="l_388"></a><span class="hl line">  388 </span>               <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span><span class="hl kwa">not</span> in-memory<span class="hl sym">)</span>
    477 <a id="l_389"></a><span class="hl line">  389 </span>                   <span class="hl sym">(&lt; (</span><span class="hl kwa">car</span> in-memory<span class="hl sym">) (</span>file-write-date on-disk<span class="hl sym">))))</span>
    478 <a id="l_390"></a><span class="hl line">  390 </span>      <span class="hl sym">(</span>let <span class="hl sym">((</span>package <span class="hl sym">(</span>make-temporary-package<span class="hl sym">)))</span>
    479 <a id="l_391"></a><span class="hl line">  391 </span>        <span class="hl sym">(</span>unwind-protect
    480 <a id="l_392"></a><span class="hl line">  392 </span>             <span class="hl sym">(</span>let <span class="hl sym">((*</span>package<span class="hl sym">*</span> package<span class="hl sym">))</span>
    481 <a id="l_393"></a><span class="hl line">  393 </span>               <span class="hl sym">(</span>format
    482 <a id="l_394"></a><span class="hl line">  394 </span>                <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span>
    483 <a id="l_395"></a><span class="hl line">  395 </span>                <span class="hl str">&quot;~&amp;~&#64;&lt;; ~&#64;;loading system definition from ~A into ~A~&#64;:&gt;~%&quot;</span>
    484 <a id="l_396"></a><span class="hl line">  396 </span>                <span class="hl slc">;; FIXME: This wants to be (ENOUGH-NAMESTRING</span>
    485 <a id="l_397"></a><span class="hl line">  397 </span>                <span class="hl slc">;; ON-DISK), but CMUCL barfs on that.</span>
    486 <a id="l_398"></a><span class="hl line">  398 </span>                on-disk
    487 <a id="l_399"></a><span class="hl line">  399 </span>                <span class="hl sym">*</span>package<span class="hl sym">*)</span>
    488 <a id="l_400"></a><span class="hl line">  400 </span>               <span class="hl sym">(</span><span class="hl kwa">load</span> on-disk<span class="hl sym">))</span>
    489 <a id="l_401"></a><span class="hl line">  401 </span>          <span class="hl sym">(</span>delete-package package<span class="hl sym">))))</span>
    490 <a id="l_402"></a><span class="hl line">  402 </span>    <span class="hl sym">(</span>let <span class="hl sym">((</span>in-memory <span class="hl sym">(</span>gethash name <span class="hl sym">*</span>defined-systems<span class="hl sym">*)))</span>
    491 <a id="l_403"></a><span class="hl line">  403 </span>      <span class="hl sym">(</span><span class="hl kwa">if</span> in-memory
    492 <a id="l_404"></a><span class="hl line">  404 </span>          <span class="hl sym">(</span><span class="hl kwa">progn</span> <span class="hl sym">(</span><span class="hl kwa">if</span> on-disk <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">car</span> in-memory<span class="hl sym">) (</span>file-write-date on-disk<span class="hl sym">)))</span>
    493 <a id="l_405"></a><span class="hl line">  405 </span>                 <span class="hl sym">(</span><span class="hl kwa">cdr</span> in-memory<span class="hl sym">))</span>
    494 <a id="l_406"></a><span class="hl line">  406 </span>          <span class="hl sym">(</span><span class="hl kwa">if</span> error-p <span class="hl sym">(</span>error <span class="hl sym">'</span>missing-component <span class="hl sym">:</span>requires name<span class="hl sym">))))))</span>
    495 <a id="l_407"></a><span class="hl line">  407 </span>
    496 <a id="l_408"></a><span class="hl line">  408 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> register-system <span class="hl sym">(</span>name system<span class="hl sym">)</span>
    497 <a id="l_409"></a><span class="hl line">  409 </span>  <span class="hl sym">(</span>format <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span> <span class="hl str">&quot;~&amp;~&#64;&lt;; ~&#64;;registering ~A as ~A~&#64;:&gt;~%&quot;</span> system name<span class="hl sym">)</span>
    498 <a id="l_410"></a><span class="hl line">  410 </span>  <span class="hl sym">(</span>setf <span class="hl sym">(</span>gethash <span class="hl sym">(</span>coerce-name  name<span class="hl sym">) *</span>defined-systems<span class="hl sym">*)</span>
    499 <a id="l_411"></a><span class="hl line">  411 </span>        <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span>get-universal-time<span class="hl sym">)</span> system<span class="hl sym">)))</span>
    500 <a id="l_412"></a><span class="hl line">  412 </span>
    501 <a id="l_413"></a><span class="hl line">  413 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> system-registered-p <span class="hl sym">(</span>name<span class="hl sym">)</span>
    502 <a id="l_414"></a><span class="hl line">  414 </span>  <span class="hl sym">(</span>gethash <span class="hl sym">(</span>coerce-name name<span class="hl sym">) *</span>defined-systems<span class="hl sym">*))</span>
    503 <a id="l_415"></a><span class="hl line">  415 </span>
    504 <a id="l_416"></a><span class="hl line">  416 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    505 <a id="l_417"></a><span class="hl line">  417 </span><span class="hl slc">;;; finding components</span>
    506 <a id="l_418"></a><span class="hl line">  418 </span>
    507 <a id="l_419"></a><span class="hl line">  419 </span><span class="hl sym">(</span>defgeneric find-component <span class="hl sym">(</span>module name <span class="hl sym">&amp;</span>optional version<span class="hl sym">)</span>
    508 <a id="l_420"></a><span class="hl line">  420 </span>  <span class="hl sym">(:</span>documentation <span class="hl str">&quot;Finds the component with name NAME present in the</span>
    509 <a id="l_421"></a><span class="hl line">  421 </span><span class="hl str">MODULE module; if MODULE is nil, then the component is assumed to be a</span>
    510 <a id="l_422"></a><span class="hl line">  422 </span><span class="hl str">system.&quot;</span><span class="hl sym">))</span>
    511 <a id="l_423"></a><span class="hl line">  423 </span>
    512 <a id="l_424"></a><span class="hl line">  424 </span><span class="hl sym">(</span>defmethod find-component <span class="hl sym">((</span>module module<span class="hl sym">)</span> name <span class="hl sym">&amp;</span>optional version<span class="hl sym">)</span>
    513 <a id="l_425"></a><span class="hl line">  425 </span>  <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>slot-<span class="hl kwa">boundp</span> module <span class="hl sym">'</span>components<span class="hl sym">)</span>
    514 <a id="l_426"></a><span class="hl line">  426 </span>      <span class="hl sym">(</span>let <span class="hl sym">((</span>m <span class="hl sym">(</span>find name <span class="hl sym">(</span>module-components module<span class="hl sym">)</span>
    515 <a id="l_427"></a><span class="hl line">  427 </span>                     <span class="hl sym">:</span>test #<span class="hl sym">'</span><span class="hl kwa">equal</span> <span class="hl sym">:</span>key #<span class="hl sym">'</span>component-name<span class="hl sym">)))</span>
    516 <a id="l_428"></a><span class="hl line">  428 </span>        <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">and</span> m <span class="hl sym">(</span>version-satisfies m version<span class="hl sym">))</span> m<span class="hl sym">))))</span>
    517 <a id="l_429"></a><span class="hl line">  429 </span>
    518 <a id="l_430"></a><span class="hl line">  430 </span>
    519 <a id="l_431"></a><span class="hl line">  431 </span><span class="hl slc">;;; a component with no parent is a system</span>
    520 <a id="l_432"></a><span class="hl line">  432 </span><span class="hl sym">(</span>defmethod find-component <span class="hl sym">((</span>module <span class="hl sym">(</span>eql nil<span class="hl sym">))</span> name <span class="hl sym">&amp;</span>optional version<span class="hl sym">)</span>
    521 <a id="l_433"></a><span class="hl line">  433 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>m <span class="hl sym">(</span>find-system name nil<span class="hl sym">)))</span>
    522 <a id="l_434"></a><span class="hl line">  434 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">and</span> m <span class="hl sym">(</span>version-satisfies m version<span class="hl sym">))</span> m<span class="hl sym">)))</span>
    523 <a id="l_435"></a><span class="hl line">  435 </span>
    524 <a id="l_436"></a><span class="hl line">  436 </span><span class="hl slc">;;; component subclasses</span>
    525 <a id="l_437"></a><span class="hl line">  437 </span>
    526 <a id="l_438"></a><span class="hl line">  438 </span><span class="hl sym">(</span>defclass source-file <span class="hl sym">(</span>component<span class="hl sym">) ())</span>
    527 <a id="l_439"></a><span class="hl line">  439 </span>
    528 <a id="l_440"></a><span class="hl line">  440 </span><span class="hl sym">(</span>defclass cl-source-file <span class="hl sym">(</span>source-file<span class="hl sym">) ())</span>
    529 <a id="l_441"></a><span class="hl line">  441 </span><span class="hl sym">(</span>defclass c-source-file <span class="hl sym">(</span>source-file<span class="hl sym">) ())</span>
    530 <a id="l_442"></a><span class="hl line">  442 </span><span class="hl sym">(</span>defclass java-source-file <span class="hl sym">(</span>source-file<span class="hl sym">) ())</span>
    531 <a id="l_443"></a><span class="hl line">  443 </span><span class="hl sym">(</span>defclass static-file <span class="hl sym">(</span>source-file<span class="hl sym">) ())</span>
    532 <a id="l_444"></a><span class="hl line">  444 </span><span class="hl sym">(</span>defclass doc-file <span class="hl sym">(</span>static-file<span class="hl sym">) ())</span>
    533 <a id="l_445"></a><span class="hl line">  445 </span><span class="hl sym">(</span>defclass html-file <span class="hl sym">(</span>doc-file<span class="hl sym">) ())</span>
    534 <a id="l_446"></a><span class="hl line">  446 </span>
    535 <a id="l_447"></a><span class="hl line">  447 </span><span class="hl sym">(</span>defgeneric source-file-<span class="hl kwa">type</span> <span class="hl sym">(</span>component system<span class="hl sym">))</span>
    536 <a id="l_448"></a><span class="hl line">  448 </span><span class="hl sym">(</span>defmethod source-file-<span class="hl kwa">type</span> <span class="hl sym">((</span>c cl-source-file<span class="hl sym">) (</span>s module<span class="hl sym">))</span> <span class="hl str">&quot;lisp&quot;</span><span class="hl sym">)</span>
    537 <a id="l_449"></a><span class="hl line">  449 </span><span class="hl sym">(</span>defmethod source-file-<span class="hl kwa">type</span> <span class="hl sym">((</span>c c-source-file<span class="hl sym">) (</span>s module<span class="hl sym">))</span> <span class="hl str">&quot;c&quot;</span><span class="hl sym">)</span>
    538 <a id="l_450"></a><span class="hl line">  450 </span><span class="hl sym">(</span>defmethod source-file-<span class="hl kwa">type</span> <span class="hl sym">((</span>c java-source-file<span class="hl sym">) (</span>s module<span class="hl sym">))</span> <span class="hl str">&quot;java&quot;</span><span class="hl sym">)</span>
    539 <a id="l_451"></a><span class="hl line">  451 </span><span class="hl sym">(</span>defmethod source-file-<span class="hl kwa">type</span> <span class="hl sym">((</span>c html-file<span class="hl sym">) (</span>s module<span class="hl sym">))</span> <span class="hl str">&quot;html&quot;</span><span class="hl sym">)</span>
    540 <a id="l_452"></a><span class="hl line">  452 </span><span class="hl sym">(</span>defmethod source-file-<span class="hl kwa">type</span> <span class="hl sym">((</span>c static-file<span class="hl sym">) (</span>s module<span class="hl sym">))</span> nil<span class="hl sym">)</span>
    541 <a id="l_453"></a><span class="hl line">  453 </span>
    542 <a id="l_454"></a><span class="hl line">  454 </span><span class="hl sym">(</span>defmethod component-relative-pathname <span class="hl sym">((</span>component source-file<span class="hl sym">))</span>
    543 <a id="l_455"></a><span class="hl line">  455 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>relative-pathname <span class="hl sym">(</span>slot-value component <span class="hl sym">'</span>relative-pathname<span class="hl sym">)))</span>
    544 <a id="l_456"></a><span class="hl line">  456 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> relative-pathname
    545 <a id="l_457"></a><span class="hl line">  457 </span>        <span class="hl sym">(</span>merge-pathnames
    546 <a id="l_458"></a><span class="hl line">  458 </span>         relative-pathname
    547 <a id="l_459"></a><span class="hl line">  459 </span>         <span class="hl sym">(</span>make-pathname
    548 <a id="l_460"></a><span class="hl line">  460 </span>          <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl sym">(</span>source-file-<span class="hl kwa">type</span> component <span class="hl sym">(</span>component-system component<span class="hl sym">))))</span>
    549 <a id="l_461"></a><span class="hl line">  461 </span>        <span class="hl sym">(</span>let<span class="hl sym">* ((*</span>default-pathname-defaults<span class="hl sym">*</span>
    550 <a id="l_462"></a><span class="hl line">  462 </span>                <span class="hl sym">(</span>component-parent-pathname component<span class="hl sym">))</span>
    551 <a id="l_463"></a><span class="hl line">  463 </span>               <span class="hl sym">(</span>name-<span class="hl kwa">type</span>
    552 <a id="l_464"></a><span class="hl line">  464 </span>                <span class="hl sym">(</span>make-pathname
    553 <a id="l_465"></a><span class="hl line">  465 </span>                 <span class="hl sym">:</span>name <span class="hl sym">(</span>component-name component<span class="hl sym">)</span>
    554 <a id="l_466"></a><span class="hl line">  466 </span>                 <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl sym">(</span>source-file-<span class="hl kwa">type</span> component
    555 <a id="l_467"></a><span class="hl line">  467 </span>                                         <span class="hl sym">(</span>component-system component<span class="hl sym">)))))</span>
    556 <a id="l_468"></a><span class="hl line">  468 </span>          name-<span class="hl kwa">type</span><span class="hl sym">))))</span>
    557 <a id="l_469"></a><span class="hl line">  469 </span>
    558 <a id="l_470"></a><span class="hl line">  470 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    559 <a id="l_471"></a><span class="hl line">  471 </span><span class="hl slc">;;; operations</span>
    560 <a id="l_472"></a><span class="hl line">  472 </span>
    561 <a id="l_473"></a><span class="hl line">  473 </span><span class="hl slc">;;; one of these is instantiated whenever (operate ) is called</span>
    562 <a id="l_474"></a><span class="hl line">  474 </span>
    563 <a id="l_475"></a><span class="hl line">  475 </span><span class="hl sym">(</span>defclass operation <span class="hl sym">()</span>
    564 <a id="l_476"></a><span class="hl line">  476 </span>  <span class="hl sym">((</span>forced <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>initarg <span class="hl sym">:</span>force <span class="hl sym">:</span>accessor operation-forced<span class="hl sym">)</span>
    565 <a id="l_477"></a><span class="hl line">  477 </span>   <span class="hl sym">(</span>original-initargs <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>initarg <span class="hl sym">:</span>original-initargs
    566 <a id="l_478"></a><span class="hl line">  478 </span>                      <span class="hl sym">:</span>accessor operation-original-initargs<span class="hl sym">)</span>
    567 <a id="l_479"></a><span class="hl line">  479 </span>   <span class="hl sym">(</span>visited-nodes <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>accessor operation-visited-nodes<span class="hl sym">)</span>
    568 <a id="l_480"></a><span class="hl line">  480 </span>   <span class="hl sym">(</span>visiting-nodes <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>accessor operation-visiting-nodes<span class="hl sym">)</span>
    569 <a id="l_481"></a><span class="hl line">  481 </span>   <span class="hl sym">(</span>parent <span class="hl sym">:</span>initform nil <span class="hl sym">:</span>initarg <span class="hl sym">:</span>parent <span class="hl sym">:</span>accessor operation-parent<span class="hl sym">)))</span>
    570 <a id="l_482"></a><span class="hl line">  482 </span>
    571 <a id="l_483"></a><span class="hl line">  483 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">print</span>-object <span class="hl sym">((</span>o operation<span class="hl sym">)</span> stream<span class="hl sym">)</span>
    572 <a id="l_484"></a><span class="hl line">  484 </span>  <span class="hl sym">(</span><span class="hl kwa">print</span>-unreadable-object <span class="hl sym">(</span>o stream <span class="hl sym">:</span><span class="hl kwa">type</span> t <span class="hl sym">:</span>identity t<span class="hl sym">)</span>
    573 <a id="l_485"></a><span class="hl line">  485 </span>    <span class="hl sym">(</span>ignore-errors
    574 <a id="l_486"></a><span class="hl line">  486 </span>      <span class="hl sym">(</span><span class="hl kwa">prin1</span> <span class="hl sym">(</span>operation-original-initargs o<span class="hl sym">)</span> stream<span class="hl sym">))))</span>
    575 <a id="l_487"></a><span class="hl line">  487 </span>
    576 <a id="l_488"></a><span class="hl line">  488 </span><span class="hl sym">(</span>defmethod shared-initialize <span class="hl sym">:</span>after <span class="hl sym">((</span>operation operation<span class="hl sym">)</span> slot-names
    577 <a id="l_489"></a><span class="hl line">  489 </span>                                     <span class="hl sym">&amp;</span>key force
    578 <a id="l_490"></a><span class="hl line">  490 </span>                                     <span class="hl sym">&amp;</span>allow-other-keys<span class="hl sym">)</span>
    579 <a id="l_491"></a><span class="hl line">  491 </span>  <span class="hl sym">(</span>declare <span class="hl sym">(</span>ignore slot-names force<span class="hl sym">))</span>
    580 <a id="l_492"></a><span class="hl line">  492 </span>  <span class="hl slc">;; empty method to disable initarg validity checking</span>
    581 <a id="l_493"></a><span class="hl line">  493 </span>  <span class="hl sym">)</span>
    582 <a id="l_494"></a><span class="hl line">  494 </span>
    583 <a id="l_495"></a><span class="hl line">  495 </span><span class="hl sym">(</span>defgeneric perform <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    584 <a id="l_496"></a><span class="hl line">  496 </span><span class="hl sym">(</span>defgeneric operation-done-p <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    585 <a id="l_497"></a><span class="hl line">  497 </span><span class="hl sym">(</span>defgeneric explain <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    586 <a id="l_498"></a><span class="hl line">  498 </span><span class="hl sym">(</span>defgeneric output-files <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    587 <a id="l_499"></a><span class="hl line">  499 </span><span class="hl sym">(</span>defgeneric input-files <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    588 <a id="l_500"></a><span class="hl line">  500 </span>
    589 <a id="l_501"></a><span class="hl line">  501 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> node-for <span class="hl sym">(</span>o c<span class="hl sym">)</span>
    590 <a id="l_502"></a><span class="hl line">  502 </span>  <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span>class-name <span class="hl sym">(</span>class-of o<span class="hl sym">))</span> c<span class="hl sym">))</span>
    591 <a id="l_503"></a><span class="hl line">  503 </span>
    592 <a id="l_504"></a><span class="hl line">  504 </span><span class="hl sym">(</span>defgeneric operation-ancestor <span class="hl sym">(</span>operation<span class="hl sym">)</span>
    593 <a id="l_505"></a><span class="hl line">  505 </span>  <span class="hl sym">(:</span>documentation
    594 <a id="l_506"></a><span class="hl line">  506 </span>   <span class="hl str">&quot;Recursively chase the operation's parent pointer until we get to</span>
    595 <a id="l_507"></a><span class="hl line">  507 </span><span class="hl str">the head of the tree&quot;</span><span class="hl sym">))</span>
    596 <a id="l_508"></a><span class="hl line">  508 </span>
    597 <a id="l_509"></a><span class="hl line">  509 </span><span class="hl sym">(</span>defmethod operation-ancestor <span class="hl sym">((</span>operation operation<span class="hl sym">))</span>
    598 <a id="l_510"></a><span class="hl line">  510 </span>  <span class="hl sym">(</span>aif <span class="hl sym">(</span>operation-parent operation<span class="hl sym">)</span>
    599 <a id="l_511"></a><span class="hl line">  511 </span>       <span class="hl sym">(</span>operation-ancestor it<span class="hl sym">)</span>
    600 <a id="l_512"></a><span class="hl line">  512 </span>       operation<span class="hl sym">))</span>
    601 <a id="l_513"></a><span class="hl line">  513 </span>
    602 <a id="l_514"></a><span class="hl line">  514 </span>
    603 <a id="l_515"></a><span class="hl line">  515 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> make-sub-operation <span class="hl sym">(</span>c o dep-c dep-o<span class="hl sym">)</span>
    604 <a id="l_516"></a><span class="hl line">  516 </span>  <span class="hl sym">(</span>let<span class="hl sym">* ((</span>args <span class="hl sym">(</span>copy-<span class="hl kwa">list</span> <span class="hl sym">(</span>operation-original-initargs o<span class="hl sym">)))</span>
    605 <a id="l_517"></a><span class="hl line">  517 </span>         <span class="hl sym">(</span>force-p <span class="hl sym">(</span>getf args <span class="hl sym">:</span>force<span class="hl sym">)))</span>
    606 <a id="l_518"></a><span class="hl line">  518 </span>    <span class="hl slc">;; note explicit comparison with T: any other non-NIL force value</span>
    607 <a id="l_519"></a><span class="hl line">  519 </span>    <span class="hl slc">;; (e.g. :recursive) will pass through</span>
    608 <a id="l_520"></a><span class="hl line">  520 </span>    <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">null</span> <span class="hl sym">(</span>component-parent c<span class="hl sym">))</span>
    609 <a id="l_521"></a><span class="hl line">  521 </span>                <span class="hl sym">(</span><span class="hl kwa">null</span> <span class="hl sym">(</span>component-parent dep-c<span class="hl sym">))</span>
    610 <a id="l_522"></a><span class="hl line">  522 </span>                <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>eql c dep-c<span class="hl sym">)))</span>
    611 <a id="l_523"></a><span class="hl line">  523 </span>           <span class="hl sym">(</span>when <span class="hl sym">(</span>eql force-p t<span class="hl sym">)</span>
    612 <a id="l_524"></a><span class="hl line">  524 </span>             <span class="hl sym">(</span>setf <span class="hl sym">(</span>getf args <span class="hl sym">:</span>force<span class="hl sym">)</span> nil<span class="hl sym">))</span>
    613 <a id="l_525"></a><span class="hl line">  525 </span>           <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>make-instance dep-o
    614 <a id="l_526"></a><span class="hl line">  526 </span>                  <span class="hl sym">:</span>parent o
    615 <a id="l_527"></a><span class="hl line">  527 </span>                  <span class="hl sym">:</span>original-initargs args args<span class="hl sym">))</span>
    616 <a id="l_528"></a><span class="hl line">  528 </span>          <span class="hl sym">((</span>subtypep <span class="hl sym">(</span><span class="hl kwa">type</span>-of o<span class="hl sym">)</span> dep-o<span class="hl sym">)</span>
    617 <a id="l_529"></a><span class="hl line">  529 </span>           o<span class="hl sym">)</span>
    618 <a id="l_530"></a><span class="hl line">  530 </span>          <span class="hl sym">(</span>t
    619 <a id="l_531"></a><span class="hl line">  531 </span>           <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>make-instance dep-o
    620 <a id="l_532"></a><span class="hl line">  532 </span>                  <span class="hl sym">:</span>parent o <span class="hl sym">:</span>original-initargs args args<span class="hl sym">)))))</span>
    621 <a id="l_533"></a><span class="hl line">  533 </span>
    622 <a id="l_534"></a><span class="hl line">  534 </span>
    623 <a id="l_535"></a><span class="hl line">  535 </span><span class="hl sym">(</span>defgeneric visit-component <span class="hl sym">(</span>operation component data<span class="hl sym">))</span>
    624 <a id="l_536"></a><span class="hl line">  536 </span>
    625 <a id="l_537"></a><span class="hl line">  537 </span><span class="hl sym">(</span>defmethod visit-component <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">)</span> data<span class="hl sym">)</span>
    626 <a id="l_538"></a><span class="hl line">  538 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span>component-visited-p o c<span class="hl sym">)</span>
    627 <a id="l_539"></a><span class="hl line">  539 </span>    <span class="hl sym">(</span>push <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span>node-for o c<span class="hl sym">)</span> data<span class="hl sym">)</span>
    628 <a id="l_540"></a><span class="hl line">  540 </span>          <span class="hl sym">(</span>operation-visited-nodes <span class="hl sym">(</span>operation-ancestor o<span class="hl sym">)))))</span>
    629 <a id="l_541"></a><span class="hl line">  541 </span>
    630 <a id="l_542"></a><span class="hl line">  542 </span><span class="hl sym">(</span>defgeneric component-visited-p <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    631 <a id="l_543"></a><span class="hl line">  543 </span>
    632 <a id="l_544"></a><span class="hl line">  544 </span><span class="hl sym">(</span>defmethod component-visited-p <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    633 <a id="l_545"></a><span class="hl line">  545 </span>  <span class="hl sym">(</span><span class="hl kwa">assoc</span> <span class="hl sym">(</span>node-for o c<span class="hl sym">)</span>
    634 <a id="l_546"></a><span class="hl line">  546 </span>         <span class="hl sym">(</span>operation-visited-nodes <span class="hl sym">(</span>operation-ancestor o<span class="hl sym">))</span>
    635 <a id="l_547"></a><span class="hl line">  547 </span>         <span class="hl sym">:</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">))</span>
    636 <a id="l_548"></a><span class="hl line">  548 </span>
    637 <a id="l_549"></a><span class="hl line">  549 </span><span class="hl sym">(</span>defgeneric <span class="hl sym">(</span>setf visiting-component<span class="hl sym">) (</span>new-value operation component<span class="hl sym">))</span>
    638 <a id="l_550"></a><span class="hl line">  550 </span>
    639 <a id="l_551"></a><span class="hl line">  551 </span><span class="hl sym">(</span>defmethod <span class="hl sym">(</span>setf visiting-component<span class="hl sym">) (</span>new-value operation component<span class="hl sym">)</span>
    640 <a id="l_552"></a><span class="hl line">  552 </span>  <span class="hl slc">;; MCL complains about unused lexical variables</span>
    641 <a id="l_553"></a><span class="hl line">  553 </span>  <span class="hl sym">(</span>declare <span class="hl sym">(</span>ignorable new-value operation component<span class="hl sym">)))</span>
    642 <a id="l_554"></a><span class="hl line">  554 </span>
    643 <a id="l_555"></a><span class="hl line">  555 </span><span class="hl sym">(</span>defmethod <span class="hl sym">(</span>setf visiting-component<span class="hl sym">) (</span>new-value <span class="hl sym">(</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    644 <a id="l_556"></a><span class="hl line">  556 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>node <span class="hl sym">(</span>node-for o c<span class="hl sym">))</span>
    645 <a id="l_557"></a><span class="hl line">  557 </span>        <span class="hl sym">(</span>a <span class="hl sym">(</span>operation-ancestor o<span class="hl sym">)))</span>
    646 <a id="l_558"></a><span class="hl line">  558 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> new-value
    647 <a id="l_559"></a><span class="hl line">  559 </span>        <span class="hl sym">(</span>pushnew node <span class="hl sym">(</span>operation-visiting-nodes a<span class="hl sym">) :</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)</span>
    648 <a id="l_560"></a><span class="hl line">  560 </span>        <span class="hl sym">(</span>setf <span class="hl sym">(</span>operation-visiting-nodes a<span class="hl sym">)</span>
    649 <a id="l_561"></a><span class="hl line">  561 </span>              <span class="hl sym">(</span>remove node  <span class="hl sym">(</span>operation-visiting-nodes a<span class="hl sym">) :</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)))))</span>
    650 <a id="l_562"></a><span class="hl line">  562 </span>
    651 <a id="l_563"></a><span class="hl line">  563 </span><span class="hl sym">(</span>defgeneric component-visiting-p <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    652 <a id="l_564"></a><span class="hl line">  564 </span>
    653 <a id="l_565"></a><span class="hl line">  565 </span><span class="hl sym">(</span>defmethod component-visiting-p <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    654 <a id="l_566"></a><span class="hl line">  566 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>node <span class="hl sym">(</span><span class="hl kwa">cons</span> o c<span class="hl sym">)))</span>
    655 <a id="l_567"></a><span class="hl line">  567 </span>    <span class="hl sym">(</span><span class="hl kwa">member</span> node <span class="hl sym">(</span>operation-visiting-nodes <span class="hl sym">(</span>operation-ancestor o<span class="hl sym">))</span>
    656 <a id="l_568"></a><span class="hl line">  568 </span>            <span class="hl sym">:</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)))</span>
    657 <a id="l_569"></a><span class="hl line">  569 </span>
    658 <a id="l_570"></a><span class="hl line">  570 </span><span class="hl sym">(</span>defgeneric component-depends-on <span class="hl sym">(</span>operation component<span class="hl sym">)</span>
    659 <a id="l_571"></a><span class="hl line">  571 </span>  <span class="hl sym">(:</span>documentation
    660 <a id="l_572"></a><span class="hl line">  572 </span>   <span class="hl str">&quot;Returns a list of dependencies needed by the component to perform</span>
    661 <a id="l_573"></a><span class="hl line">  573 </span><span class="hl str">    the operation.  A dependency has one of the following forms:</span>
    662 <a id="l_574"></a><span class="hl line">  574 </span><span class="hl str"></span>
    663 <a id="l_575"></a><span class="hl line">  575 </span><span class="hl str">      (&lt;operation&gt; &lt;component&gt;*), where &lt;operation&gt; is a class</span>
    664 <a id="l_576"></a><span class="hl line">  576 </span><span class="hl str">        designator and each &lt;component&gt; is a component</span>
    665 <a id="l_577"></a><span class="hl line">  577 </span><span class="hl str">        designator, which means that the component depends on</span>
    666 <a id="l_578"></a><span class="hl line">  578 </span><span class="hl str">        &lt;operation&gt; having been performed on each &lt;component&gt;; or</span>
    667 <a id="l_579"></a><span class="hl line">  579 </span><span class="hl str"></span>
    668 <a id="l_580"></a><span class="hl line">  580 </span><span class="hl str">      (FEATURE &lt;feature&gt;), which means that the component depends</span>
    669 <a id="l_581"></a><span class="hl line">  581 </span><span class="hl str">        on &lt;feature&gt;'s presence in *FEATURES*.</span>
    670 <a id="l_582"></a><span class="hl line">  582 </span><span class="hl str"></span>
    671 <a id="l_583"></a><span class="hl line">  583 </span><span class="hl str">    Methods specialized on subclasses of existing component types</span>
    672 <a id="l_584"></a><span class="hl line">  584 </span><span class="hl str">    should usually append the results of CALL-NEXT-METHOD to the</span>
    673 <a id="l_585"></a><span class="hl line">  585 </span><span class="hl str">    list.&quot;</span><span class="hl sym">))</span>
    674 <a id="l_586"></a><span class="hl line">  586 </span>
    675 <a id="l_587"></a><span class="hl line">  587 </span><span class="hl sym">(</span>defmethod component-depends-on <span class="hl sym">((</span>op-spec symbol<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    676 <a id="l_588"></a><span class="hl line">  588 </span>  <span class="hl sym">(</span>component-depends-on <span class="hl sym">(</span>make-instance op-spec<span class="hl sym">)</span> c<span class="hl sym">))</span>
    677 <a id="l_589"></a><span class="hl line">  589 </span>
    678 <a id="l_590"></a><span class="hl line">  590 </span><span class="hl sym">(</span>defmethod component-depends-on <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    679 <a id="l_591"></a><span class="hl line">  591 </span>  <span class="hl sym">(</span><span class="hl kwa">cdr</span> <span class="hl sym">(</span><span class="hl kwa">assoc</span> <span class="hl sym">(</span>class-name <span class="hl sym">(</span>class-of o<span class="hl sym">))</span>
    680 <a id="l_592"></a><span class="hl line">  592 </span>              <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>in-order-to<span class="hl sym">))))</span>
    681 <a id="l_593"></a><span class="hl line">  593 </span>
    682 <a id="l_594"></a><span class="hl line">  594 </span><span class="hl sym">(</span>defgeneric component-self-dependencies <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    683 <a id="l_595"></a><span class="hl line">  595 </span>
    684 <a id="l_596"></a><span class="hl line">  596 </span><span class="hl sym">(</span>defmethod component-self-dependencies <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    685 <a id="l_597"></a><span class="hl line">  597 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>all-deps <span class="hl sym">(</span>component-depends-on o c<span class="hl sym">)))</span>
    686 <a id="l_598"></a><span class="hl line">  598 </span>    <span class="hl sym">(</span>remove-<span class="hl kwa">if</span>-<span class="hl kwa">not</span> <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>x<span class="hl sym">)</span>
    687 <a id="l_599"></a><span class="hl line">  599 </span>                     <span class="hl sym">(</span><span class="hl kwa">member</span> <span class="hl sym">(</span>component-name c<span class="hl sym">) (</span><span class="hl kwa">cdr</span> x<span class="hl sym">) :</span>test #<span class="hl sym">'</span>string<span class="hl sym">=))</span>
    688 <a id="l_600"></a><span class="hl line">  600 </span>                   all-deps<span class="hl sym">)))</span>
    689 <a id="l_601"></a><span class="hl line">  601 </span>
    690 <a id="l_602"></a><span class="hl line">  602 </span><span class="hl sym">(</span>defmethod input-files <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    691 <a id="l_603"></a><span class="hl line">  603 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>parent <span class="hl sym">(</span>component-parent c<span class="hl sym">))</span>
    692 <a id="l_604"></a><span class="hl line">  604 </span>        <span class="hl sym">(</span>self-deps <span class="hl sym">(</span>component-self-dependencies operation c<span class="hl sym">)))</span>
    693 <a id="l_605"></a><span class="hl line">  605 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> self-deps
    694 <a id="l_606"></a><span class="hl line">  606 </span>        <span class="hl sym">(</span>mapcan <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>dep<span class="hl sym">)</span>
    695 <a id="l_607"></a><span class="hl line">  607 </span>                  <span class="hl sym">(</span>destructuring-bind <span class="hl sym">(</span>op name<span class="hl sym">)</span> dep
    696 <a id="l_608"></a><span class="hl line">  608 </span>                    <span class="hl sym">(</span>output-files <span class="hl sym">(</span>make-instance op<span class="hl sym">)</span>
    697 <a id="l_609"></a><span class="hl line">  609 </span>                                  <span class="hl sym">(</span>find-component parent name<span class="hl sym">))))</span>
    698 <a id="l_610"></a><span class="hl line">  610 </span>                self-deps<span class="hl sym">)</span>
    699 <a id="l_611"></a><span class="hl line">  611 </span>        <span class="hl slc">;; no previous operations needed?  I guess we work with the</span>
    700 <a id="l_612"></a><span class="hl line">  612 </span>        <span class="hl slc">;; original source file, then</span>
    701 <a id="l_613"></a><span class="hl line">  613 </span>        <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span>component-pathname c<span class="hl sym">)))))</span>
    702 <a id="l_614"></a><span class="hl line">  614 </span>
    703 <a id="l_615"></a><span class="hl line">  615 </span><span class="hl sym">(</span>defmethod input-files <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c module<span class="hl sym">))</span> nil<span class="hl sym">)</span>
    704 <a id="l_616"></a><span class="hl line">  616 </span>
    705 <a id="l_617"></a><span class="hl line">  617 </span><span class="hl sym">(</span>defmethod operation-done-p <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    706 <a id="l_618"></a><span class="hl line">  618 </span>  <span class="hl sym">(</span>flet <span class="hl sym">((</span>fwd-<span class="hl kwa">or</span>-return-t <span class="hl sym">(</span>file<span class="hl sym">)</span>
    707 <a id="l_619"></a><span class="hl line">  619 </span>           <span class="hl slc">;; if FILE-WRITE-DATE returns NIL, it's possible that the</span>
    708 <a id="l_620"></a><span class="hl line">  620 </span>           <span class="hl slc">;; user or some other agent has deleted an input file.  If</span>
    709 <a id="l_621"></a><span class="hl line">  621 </span>           <span class="hl slc">;; that's the case, well, that's not good, but as long as</span>
    710 <a id="l_622"></a><span class="hl line">  622 </span>           <span class="hl slc">;; the operation is otherwise considered to be done we</span>
    711 <a id="l_623"></a><span class="hl line">  623 </span>           <span class="hl slc">;; could continue and survive.</span>
    712 <a id="l_624"></a><span class="hl line">  624 </span>           <span class="hl sym">(</span>let <span class="hl sym">((</span>date <span class="hl sym">(</span>file-write-date file<span class="hl sym">)))</span>
    713 <a id="l_625"></a><span class="hl line">  625 </span>             <span class="hl sym">(</span><span class="hl kwa">cond</span>
    714 <a id="l_626"></a><span class="hl line">  626 </span>               <span class="hl sym">(</span>date<span class="hl sym">)</span>
    715 <a id="l_627"></a><span class="hl line">  627 </span>               <span class="hl sym">(</span>t
    716 <a id="l_628"></a><span class="hl line">  628 </span>                <span class="hl sym">(</span>warn <span class="hl str">&quot;~&#64;&lt;Missing FILE-WRITE-DATE for ~S: treating ~</span>
    717 <a id="l_629"></a><span class="hl line">  629 </span><span class="hl str">                       operation ~S on component ~S as done.~&#64;:&gt;&quot;</span>
    718 <a id="l_630"></a><span class="hl line">  630 </span>                      file o c<span class="hl sym">)</span>
    719 <a id="l_631"></a><span class="hl line">  631 </span>                <span class="hl sym">(</span>return-from operation-done-p t<span class="hl sym">))))))</span>
    720 <a id="l_632"></a><span class="hl line">  632 </span>    <span class="hl sym">(</span>let <span class="hl sym">((</span>out-files <span class="hl sym">(</span>output-files o c<span class="hl sym">))</span>
    721 <a id="l_633"></a><span class="hl line">  633 </span>          <span class="hl sym">(</span>in-files <span class="hl sym">(</span>input-files o c<span class="hl sym">)))</span>
    722 <a id="l_634"></a><span class="hl line">  634 </span>      <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">not</span> in-files<span class="hl sym">) (</span><span class="hl kwa">not</span> out-files<span class="hl sym">))</span>
    723 <a id="l_635"></a><span class="hl line">  635 </span>             <span class="hl slc">;; arbitrary decision: an operation that uses nothing to</span>
    724 <a id="l_636"></a><span class="hl line">  636 </span>             <span class="hl slc">;; produce nothing probably isn't doing much</span>
    725 <a id="l_637"></a><span class="hl line">  637 </span>             t<span class="hl sym">)</span>
    726 <a id="l_638"></a><span class="hl line">  638 </span>            <span class="hl sym">((</span><span class="hl kwa">not</span> out-files<span class="hl sym">)</span>
    727 <a id="l_639"></a><span class="hl line">  639 </span>             <span class="hl sym">(</span>let <span class="hl sym">((</span>op-done
    728 <a id="l_640"></a><span class="hl line">  640 </span>                    <span class="hl sym">(</span>gethash <span class="hl sym">(</span><span class="hl kwa">type</span>-of o<span class="hl sym">)</span>
    729 <a id="l_641"></a><span class="hl line">  641 </span>                             <span class="hl sym">(</span>component-operation-times c<span class="hl sym">))))</span>
    730 <a id="l_642"></a><span class="hl line">  642 </span>               <span class="hl sym">(</span><span class="hl kwa">and</span> op-done
    731 <a id="l_643"></a><span class="hl line">  643 </span>                    <span class="hl sym">(&gt;=</span> op-done
    732 <a id="l_644"></a><span class="hl line">  644 </span>                        <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span><span class="hl kwa">max</span>
    733 <a id="l_645"></a><span class="hl line">  645 </span>                               <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>fwd-<span class="hl kwa">or</span>-return-t in-files<span class="hl sym">))))))</span>
    734 <a id="l_646"></a><span class="hl line">  646 </span>            <span class="hl sym">((</span><span class="hl kwa">not</span> in-files<span class="hl sym">)</span> nil<span class="hl sym">)</span>
    735 <a id="l_647"></a><span class="hl line">  647 </span>            <span class="hl sym">(</span>t
    736 <a id="l_648"></a><span class="hl line">  648 </span>             <span class="hl sym">(</span><span class="hl kwa">and</span>
    737 <a id="l_649"></a><span class="hl line">  649 </span>              <span class="hl sym">(</span>every #<span class="hl sym">'</span>probe-file out-files<span class="hl sym">)</span>
    738 <a id="l_650"></a><span class="hl line">  650 </span>              <span class="hl sym">(&gt; (</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span><span class="hl kwa">min</span> <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>file-write-date out-files<span class="hl sym">))</span>
    739 <a id="l_651"></a><span class="hl line">  651 </span>                 <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span><span class="hl kwa">max</span> <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>fwd-<span class="hl kwa">or</span>-return-t in-files<span class="hl sym">)))))))))</span>
    740 <a id="l_652"></a><span class="hl line">  652 </span>
    741 <a id="l_653"></a><span class="hl line">  653 </span><span class="hl slc">;;; So you look at this code and think &quot;why isn't it a bunch of</span>
    742 <a id="l_654"></a><span class="hl line">  654 </span><span class="hl slc">;;; methods&quot;.  And the answer is, because standard method combination</span>
    743 <a id="l_655"></a><span class="hl line">  655 </span><span class="hl slc">;;; runs :before methods most-&gt;least-specific, which is back to front</span>
    744 <a id="l_656"></a><span class="hl line">  656 </span><span class="hl slc">;;; for our purposes.  And CLISP doesn't have non-standard method</span>
    745 <a id="l_657"></a><span class="hl line">  657 </span><span class="hl slc">;;; combinations, so let's keep it simple and aspire to portability</span>
    746 <a id="l_658"></a><span class="hl line">  658 </span>
    747 <a id="l_659"></a><span class="hl line">  659 </span><span class="hl sym">(</span>defgeneric traverse <span class="hl sym">(</span>operation component<span class="hl sym">))</span>
    748 <a id="l_660"></a><span class="hl line">  660 </span><span class="hl sym">(</span>defmethod traverse <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    749 <a id="l_661"></a><span class="hl line">  661 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>forced nil<span class="hl sym">))</span>
    750 <a id="l_662"></a><span class="hl line">  662 </span>    <span class="hl sym">(</span>labels <span class="hl sym">((</span>do-one-dep <span class="hl sym">(</span>required-op required-c required-v<span class="hl sym">)</span>
    751 <a id="l_663"></a><span class="hl line">  663 </span>               <span class="hl sym">(</span>let<span class="hl sym">* ((</span>dep-c <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>find-component
    752 <a id="l_664"></a><span class="hl line">  664 </span>                                  <span class="hl sym">(</span>component-parent c<span class="hl sym">)</span>
    753 <a id="l_665"></a><span class="hl line">  665 </span>                                  <span class="hl slc">;; XXX tacky.  really we should build the</span>
    754 <a id="l_666"></a><span class="hl line">  666 </span>                                  <span class="hl slc">;; in-order-to slot with canonicalized</span>
    755 <a id="l_667"></a><span class="hl line">  667 </span>                                  <span class="hl slc">;; names instead of coercing this late</span>
    756 <a id="l_668"></a><span class="hl line">  668 </span>                                  <span class="hl sym">(</span>coerce-name required-c<span class="hl sym">)</span> required-v<span class="hl sym">)</span>
    757 <a id="l_669"></a><span class="hl line">  669 </span>                                 <span class="hl sym">(</span>error <span class="hl sym">'</span>missing-dependency
    758 <a id="l_670"></a><span class="hl line">  670 </span>                                        <span class="hl sym">:</span>required-by c
    759 <a id="l_671"></a><span class="hl line">  671 </span>                                        <span class="hl sym">:</span>version required-v
    760 <a id="l_672"></a><span class="hl line">  672 </span>                                        <span class="hl sym">:</span>requires required-c<span class="hl sym">)))</span>
    761 <a id="l_673"></a><span class="hl line">  673 </span>                      <span class="hl sym">(</span>op <span class="hl sym">(</span>make-sub-operation c operation dep-c required-op<span class="hl sym">)))</span>
    762 <a id="l_674"></a><span class="hl line">  674 </span>                 <span class="hl sym">(</span>traverse op dep-c<span class="hl sym">)))</span>
    763 <a id="l_675"></a><span class="hl line">  675 </span>             <span class="hl sym">(</span>do-dep <span class="hl sym">(</span>op dep<span class="hl sym">)</span>
    764 <a id="l_676"></a><span class="hl line">  676 </span>               <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">eq</span> op <span class="hl sym">'</span>feature<span class="hl sym">)</span>
    765 <a id="l_677"></a><span class="hl line">  677 </span>                      <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span><span class="hl kwa">member</span> <span class="hl sym">(</span><span class="hl kwa">car</span> dep<span class="hl sym">) *</span>features<span class="hl sym">*)</span>
    766 <a id="l_678"></a><span class="hl line">  678 </span>                          <span class="hl sym">(</span>error <span class="hl sym">'</span>missing-dependency
    767 <a id="l_679"></a><span class="hl line">  679 </span>                                 <span class="hl sym">:</span>required-by c
    768 <a id="l_680"></a><span class="hl line">  680 </span>                                 <span class="hl sym">:</span>requires <span class="hl sym">(</span><span class="hl kwa">car</span> dep<span class="hl sym">)</span>
    769 <a id="l_681"></a><span class="hl line">  681 </span>                                 <span class="hl sym">:</span>version nil<span class="hl sym">)))</span>
    770 <a id="l_682"></a><span class="hl line">  682 </span>                     <span class="hl sym">(</span>t
    771 <a id="l_683"></a><span class="hl line">  683 </span>                      <span class="hl sym">(</span>dolist <span class="hl sym">(</span>d dep<span class="hl sym">)</span>
    772 <a id="l_684"></a><span class="hl line">  684 </span>                        <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span>consp d<span class="hl sym">)</span>
    773 <a id="l_685"></a><span class="hl line">  685 </span>                               <span class="hl sym">(</span>assert <span class="hl sym">(</span>string-<span class="hl kwa">equal</span>
    774 <a id="l_686"></a><span class="hl line">  686 </span>                                        <span class="hl sym">(</span>symbol-name <span class="hl sym">(</span>first d<span class="hl sym">))</span>
    775 <a id="l_687"></a><span class="hl line">  687 </span>                                        <span class="hl str">&quot;VERSION&quot;</span><span class="hl sym">))</span>
    776 <a id="l_688"></a><span class="hl line">  688 </span>                               <span class="hl sym">(</span>appendf forced
    777 <a id="l_689"></a><span class="hl line">  689 </span>                                        <span class="hl sym">(</span>do-one-dep op <span class="hl sym">(</span>second d<span class="hl sym">) (</span>third d<span class="hl sym">))))</span>
    778 <a id="l_690"></a><span class="hl line">  690 </span>                              <span class="hl sym">(</span>t
    779 <a id="l_691"></a><span class="hl line">  691 </span>                               <span class="hl sym">(</span>appendf forced <span class="hl sym">(</span>do-one-dep op d nil<span class="hl sym">)))))))))</span>
    780 <a id="l_692"></a><span class="hl line">  692 </span>      <span class="hl sym">(</span>aif <span class="hl sym">(</span>component-visited-p operation c<span class="hl sym">)</span>
    781 <a id="l_693"></a><span class="hl line">  693 </span>           <span class="hl sym">(</span>return-from traverse
    782 <a id="l_694"></a><span class="hl line">  694 </span>             <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">cdr</span> it<span class="hl sym">) (</span><span class="hl kwa">list</span> <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">'</span>pruned-op c<span class="hl sym">))</span> nil<span class="hl sym">)))</span>
    783 <a id="l_695"></a><span class="hl line">  695 </span>      <span class="hl slc">;; dependencies</span>
    784 <a id="l_696"></a><span class="hl line">  696 </span>      <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>component-visiting-p operation c<span class="hl sym">)</span>
    785 <a id="l_697"></a><span class="hl line">  697 </span>          <span class="hl sym">(</span>error <span class="hl sym">'</span>circular-dependency <span class="hl sym">:</span>components <span class="hl sym">(</span><span class="hl kwa">list</span> c<span class="hl sym">)))</span>
    786 <a id="l_698"></a><span class="hl line">  698 </span>      <span class="hl sym">(</span>setf <span class="hl sym">(</span>visiting-component operation c<span class="hl sym">)</span> t<span class="hl sym">)</span>
    787 <a id="l_699"></a><span class="hl line">  699 </span>      <span class="hl sym">(</span>loop for <span class="hl sym">(</span>required-op . deps<span class="hl sym">)</span> in <span class="hl sym">(</span>component-depends-on operation c<span class="hl sym">)</span>
    788 <a id="l_700"></a><span class="hl line">  700 </span>            do <span class="hl sym">(</span>do-dep required-op deps<span class="hl sym">))</span>
    789 <a id="l_701"></a><span class="hl line">  701 </span>      <span class="hl slc">;; constituent bits</span>
    790 <a id="l_702"></a><span class="hl line">  702 </span>      <span class="hl sym">(</span>let <span class="hl sym">((</span>module-ops
    791 <a id="l_703"></a><span class="hl line">  703 </span>             <span class="hl sym">(</span>when <span class="hl sym">(</span>typep c <span class="hl sym">'</span>module<span class="hl sym">)</span>
    792 <a id="l_704"></a><span class="hl line">  704 </span>               <span class="hl sym">(</span>let <span class="hl sym">((</span>at-least-one nil<span class="hl sym">)</span>
    793 <a id="l_705"></a><span class="hl line">  705 </span>                     <span class="hl sym">(</span>forced nil<span class="hl sym">)</span>
    794 <a id="l_706"></a><span class="hl line">  706 </span>                     <span class="hl sym">(</span>error nil<span class="hl sym">))</span>
    795 <a id="l_707"></a><span class="hl line">  707 </span>                 <span class="hl sym">(</span>loop for kid in <span class="hl sym">(</span>module-components c<span class="hl sym">)</span>
    796 <a id="l_708"></a><span class="hl line">  708 </span>                       do <span class="hl sym">(</span>handler-case
    797 <a id="l_709"></a><span class="hl line">  709 </span>                              <span class="hl sym">(</span>appendf forced <span class="hl sym">(</span>traverse operation kid <span class="hl sym">))</span>
    798 <a id="l_710"></a><span class="hl line">  710 </span>                            <span class="hl sym">(</span>missing-dependency <span class="hl sym">(</span>condition<span class="hl sym">)</span>
    799 <a id="l_711"></a><span class="hl line">  711 </span>                              <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">eq</span> <span class="hl sym">(</span>module-<span class="hl kwa">if</span>-component-dep-fails c<span class="hl sym">) :</span>fail<span class="hl sym">)</span>
    800 <a id="l_712"></a><span class="hl line">  712 </span>                                  <span class="hl sym">(</span>error condition<span class="hl sym">))</span>
    801 <a id="l_713"></a><span class="hl line">  713 </span>                              <span class="hl sym">(</span>setf error condition<span class="hl sym">))</span>
    802 <a id="l_714"></a><span class="hl line">  714 </span>                            <span class="hl sym">(:</span>no-error <span class="hl sym">(</span>c<span class="hl sym">)</span>
    803 <a id="l_715"></a><span class="hl line">  715 </span>                              <span class="hl sym">(</span>declare <span class="hl sym">(</span>ignore c<span class="hl sym">))</span>
    804 <a id="l_716"></a><span class="hl line">  716 </span>                              <span class="hl sym">(</span>setf at-least-one t<span class="hl sym">))))</span>
    805 <a id="l_717"></a><span class="hl line">  717 </span>                 <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">eq</span> <span class="hl sym">(</span>module-<span class="hl kwa">if</span>-component-dep-fails c<span class="hl sym">) :</span>try-next<span class="hl sym">)</span>
    806 <a id="l_718"></a><span class="hl line">  718 </span>                            <span class="hl sym">(</span><span class="hl kwa">not</span> at-least-one<span class="hl sym">))</span>
    807 <a id="l_719"></a><span class="hl line">  719 </span>                   <span class="hl sym">(</span>error error<span class="hl sym">))</span>
    808 <a id="l_720"></a><span class="hl line">  720 </span>                 forced<span class="hl sym">))))</span>
    809 <a id="l_721"></a><span class="hl line">  721 </span>        <span class="hl slc">;; now the thing itself</span>
    810 <a id="l_722"></a><span class="hl line">  722 </span>        <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">or</span> forced module-ops
    811 <a id="l_723"></a><span class="hl line">  723 </span>                  <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>operation-done-p operation c<span class="hl sym">))</span>
    812 <a id="l_724"></a><span class="hl line">  724 </span>                  <span class="hl sym">(</span>let <span class="hl sym">((</span>f <span class="hl sym">(</span>operation-forced <span class="hl sym">(</span>operation-ancestor operation<span class="hl sym">))))</span>
    813 <a id="l_725"></a><span class="hl line">  725 </span>                    <span class="hl sym">(</span><span class="hl kwa">and</span> f <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>consp f<span class="hl sym">))</span>
    814 <a id="l_726"></a><span class="hl line">  726 </span>                               <span class="hl sym">(</span><span class="hl kwa">member</span> <span class="hl sym">(</span>component-name
    815 <a id="l_727"></a><span class="hl line">  727 </span>                                        <span class="hl sym">(</span>operation-ancestor operation<span class="hl sym">))</span>
    816 <a id="l_728"></a><span class="hl line">  728 </span>                                       <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span>coerce-name f<span class="hl sym">)</span>
    817 <a id="l_729"></a><span class="hl line">  729 </span>                                       <span class="hl sym">:</span>test #<span class="hl sym">'</span>string<span class="hl sym">=)))))</span>
    818 <a id="l_730"></a><span class="hl line">  730 </span>          <span class="hl sym">(</span>let <span class="hl sym">((</span>do-first <span class="hl sym">(</span><span class="hl kwa">cdr</span> <span class="hl sym">(</span><span class="hl kwa">assoc</span> <span class="hl sym">(</span>class-name <span class="hl sym">(</span>class-of operation<span class="hl sym">))</span>
    819 <a id="l_731"></a><span class="hl line">  731 </span>                                      <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>do-first<span class="hl sym">)))))</span>
    820 <a id="l_732"></a><span class="hl line">  732 </span>            <span class="hl sym">(</span>loop for <span class="hl sym">(</span>required-op . deps<span class="hl sym">)</span> in do-first
    821 <a id="l_733"></a><span class="hl line">  733 </span>                  do <span class="hl sym">(</span>do-dep required-op deps<span class="hl sym">)))</span>
    822 <a id="l_734"></a><span class="hl line">  734 </span>          <span class="hl sym">(</span>setf forced <span class="hl sym">(</span><span class="hl kwa">append</span> <span class="hl sym">(</span>delete <span class="hl sym">'</span>pruned-op forced <span class="hl sym">:</span>key #<span class="hl sym">'</span><span class="hl kwa">car</span><span class="hl sym">)</span>
    823 <a id="l_735"></a><span class="hl line">  735 </span>                               <span class="hl sym">(</span>delete <span class="hl sym">'</span>pruned-op module-ops <span class="hl sym">:</span>key #<span class="hl sym">'</span><span class="hl kwa">car</span><span class="hl sym">)</span>
    824 <a id="l_736"></a><span class="hl line">  736 </span>                               <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span><span class="hl kwa">cons</span> operation c<span class="hl sym">))))))</span>
    825 <a id="l_737"></a><span class="hl line">  737 </span>      <span class="hl sym">(</span>setf <span class="hl sym">(</span>visiting-component operation c<span class="hl sym">)</span> nil<span class="hl sym">)</span>
    826 <a id="l_738"></a><span class="hl line">  738 </span>      <span class="hl sym">(</span>visit-component operation c <span class="hl sym">(</span><span class="hl kwa">and</span> forced t<span class="hl sym">))</span>
    827 <a id="l_739"></a><span class="hl line">  739 </span>      forced<span class="hl sym">)))</span>
    828 <a id="l_740"></a><span class="hl line">  740 </span>
    829 <a id="l_741"></a><span class="hl line">  741 </span>
    830 <a id="l_742"></a><span class="hl line">  742 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c source-file<span class="hl sym">))</span>
    831 <a id="l_743"></a><span class="hl line">  743 </span>  <span class="hl sym">(</span>sysdef-error
    832 <a id="l_744"></a><span class="hl line">  744 </span>   <span class="hl str">&quot;~&#64;&lt;required method PERFORM not implemented ~</span>
    833 <a id="l_745"></a><span class="hl line">  745 </span><span class="hl str">    for operation ~A, component ~A~&#64;:&gt;&quot;</span>
    834 <a id="l_746"></a><span class="hl line">  746 </span>   <span class="hl sym">(</span>class-of operation<span class="hl sym">) (</span>class-of c<span class="hl sym">)))</span>
    835 <a id="l_747"></a><span class="hl line">  747 </span>
    836 <a id="l_748"></a><span class="hl line">  748 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c module<span class="hl sym">))</span>
    837 <a id="l_749"></a><span class="hl line">  749 </span>  nil<span class="hl sym">)</span>
    838 <a id="l_750"></a><span class="hl line">  750 </span>
    839 <a id="l_751"></a><span class="hl line">  751 </span><span class="hl sym">(</span>defmethod explain <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>component component<span class="hl sym">))</span>
    840 <a id="l_752"></a><span class="hl line">  752 </span>  <span class="hl sym">(</span>format <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span> <span class="hl str">&quot;~&amp;;;; ~A on ~A~%&quot;</span> operation component<span class="hl sym">))</span>
    841 <a id="l_753"></a><span class="hl line">  753 </span>
    842 <a id="l_754"></a><span class="hl line">  754 </span><span class="hl slc">;;; compile-op</span>
    843 <a id="l_755"></a><span class="hl line">  755 </span>
    844 <a id="l_756"></a><span class="hl line">  756 </span><span class="hl sym">(</span>defclass compile-op <span class="hl sym">(</span>operation<span class="hl sym">)</span>
    845 <a id="l_757"></a><span class="hl line">  757 </span>  <span class="hl sym">((</span>proclamations <span class="hl sym">:</span>initarg <span class="hl sym">:</span>proclamations <span class="hl sym">:</span>accessor compile-op-proclamations <span class="hl sym">:</span>initform nil<span class="hl sym">)</span>
    846 <a id="l_758"></a><span class="hl line">  758 </span>   <span class="hl sym">(</span>on-warnings <span class="hl sym">:</span>initarg <span class="hl sym">:</span>on-warnings <span class="hl sym">:</span>accessor operation-on-warnings
    847 <a id="l_759"></a><span class="hl line">  759 </span>                <span class="hl sym">:</span>initform <span class="hl sym">*</span>compile-file-warnings-behaviour<span class="hl sym">*)</span>
    848 <a id="l_760"></a><span class="hl line">  760 </span>   <span class="hl sym">(</span>on-failure <span class="hl sym">:</span>initarg <span class="hl sym">:</span>on-failure <span class="hl sym">:</span>accessor operation-on-failure
    849 <a id="l_761"></a><span class="hl line">  761 </span>               <span class="hl sym">:</span>initform <span class="hl sym">*</span>compile-file-failure-behaviour<span class="hl sym">*)))</span>
    850 <a id="l_762"></a><span class="hl line">  762 </span>
    851 <a id="l_763"></a><span class="hl line">  763 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">:</span>before <span class="hl sym">((</span>operation compile-op<span class="hl sym">) (</span>c source-file<span class="hl sym">))</span>
    852 <a id="l_764"></a><span class="hl line">  764 </span>  <span class="hl sym">(</span>map nil #<span class="hl sym">'</span>ensure-directories-exist <span class="hl sym">(</span>output-files operation c<span class="hl sym">)))</span>
    853 <a id="l_765"></a><span class="hl line">  765 </span>
    854 <a id="l_766"></a><span class="hl line">  766 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">:</span>after <span class="hl sym">((</span>operation operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    855 <a id="l_767"></a><span class="hl line">  767 </span>  <span class="hl sym">(</span>setf <span class="hl sym">(</span>gethash <span class="hl sym">(</span><span class="hl kwa">type</span>-of operation<span class="hl sym">) (</span>component-operation-times c<span class="hl sym">))</span>
    856 <a id="l_768"></a><span class="hl line">  768 </span>        <span class="hl sym">(</span>get-universal-time<span class="hl sym">))</span>
    857 <a id="l_769"></a><span class="hl line">  769 </span>  <span class="hl sym">(</span><span class="hl kwa">load</span>-preferences c operation<span class="hl sym">))</span>
    858 <a id="l_770"></a><span class="hl line">  770 </span>
    859 <a id="l_771"></a><span class="hl line">  771 </span><span class="hl slc">;;; perform is required to check output-files to find out where to put</span>
    860 <a id="l_772"></a><span class="hl line">  772 </span><span class="hl slc">;;; its answers, in case it has been overridden for site policy</span>
    861 <a id="l_773"></a><span class="hl line">  773 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation compile-op<span class="hl sym">) (</span>c cl-source-file<span class="hl sym">))</span>
    862 <a id="l_774"></a><span class="hl line">  774 </span>  #-<span class="hl sym">:</span>broken-fasl-loader
    863 <a id="l_775"></a><span class="hl line">  775 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>source-file <span class="hl sym">(</span>component-pathname c<span class="hl sym">))</span>
    864 <a id="l_776"></a><span class="hl line">  776 </span>        <span class="hl sym">(</span>output-file <span class="hl sym">(</span><span class="hl kwa">car</span> <span class="hl sym">(</span>output-files operation c<span class="hl sym">))))</span>
    865 <a id="l_777"></a><span class="hl line">  777 </span>    <span class="hl sym">(</span>multiple-value-bind <span class="hl sym">(</span>output warnings-p failure-p<span class="hl sym">)</span>
    866 <a id="l_778"></a><span class="hl line">  778 </span>        <span class="hl sym">(</span>compile-file source-file <span class="hl sym">:</span>output-file output-file<span class="hl sym">)</span>
    867 <a id="l_779"></a><span class="hl line">  779 </span>      <span class="hl sym">(</span>when warnings-p
    868 <a id="l_780"></a><span class="hl line">  780 </span>        <span class="hl sym">(</span>case <span class="hl sym">(</span>operation-on-warnings operation<span class="hl sym">)</span>
    869 <a id="l_781"></a><span class="hl line">  781 </span>          <span class="hl sym">(:</span>warn <span class="hl sym">(</span>warn
    870 <a id="l_782"></a><span class="hl line">  782 </span>                  <span class="hl str">&quot;~&#64;&lt;COMPILE-FILE warned while performing ~A on ~A.~&#64;:&gt;&quot;</span>
    871 <a id="l_783"></a><span class="hl line">  783 </span>                  operation c<span class="hl sym">))</span>
    872 <a id="l_784"></a><span class="hl line">  784 </span>          <span class="hl sym">(:</span>error <span class="hl sym">(</span>error <span class="hl sym">'</span>compile-warned <span class="hl sym">:</span>component c <span class="hl sym">:</span>operation operation<span class="hl sym">))</span>
    873 <a id="l_785"></a><span class="hl line">  785 </span>          <span class="hl sym">(:</span>ignore nil<span class="hl sym">)))</span>
    874 <a id="l_786"></a><span class="hl line">  786 </span>      <span class="hl sym">(</span>when failure-p
    875 <a id="l_787"></a><span class="hl line">  787 </span>        <span class="hl sym">(</span>case <span class="hl sym">(</span>operation-on-failure operation<span class="hl sym">)</span>
    876 <a id="l_788"></a><span class="hl line">  788 </span>          <span class="hl sym">(:</span>warn <span class="hl sym">(</span>warn
    877 <a id="l_789"></a><span class="hl line">  789 </span>                  <span class="hl str">&quot;~&#64;&lt;COMPILE-FILE failed while performing ~A on ~A.~&#64;:&gt;&quot;</span>
    878 <a id="l_790"></a><span class="hl line">  790 </span>                  operation c<span class="hl sym">))</span>
    879 <a id="l_791"></a><span class="hl line">  791 </span>          <span class="hl sym">(:</span>error <span class="hl sym">(</span>error <span class="hl sym">'</span>compile-failed <span class="hl sym">:</span>component c <span class="hl sym">:</span>operation operation<span class="hl sym">))</span>
    880 <a id="l_792"></a><span class="hl line">  792 </span>          <span class="hl sym">(:</span>ignore nil<span class="hl sym">)))</span>
    881 <a id="l_793"></a><span class="hl line">  793 </span>      <span class="hl sym">(</span>unless output
    882 <a id="l_794"></a><span class="hl line">  794 </span>        <span class="hl sym">(</span>error <span class="hl sym">'</span>compile-error <span class="hl sym">:</span>component c <span class="hl sym">:</span>operation operation<span class="hl sym">)))))</span>
    883 <a id="l_795"></a><span class="hl line">  795 </span>
    884 <a id="l_796"></a><span class="hl line">  796 </span><span class="hl sym">(</span>defmethod output-files <span class="hl sym">((</span>operation compile-op<span class="hl sym">) (</span>c cl-source-file<span class="hl sym">))</span>
    885 <a id="l_797"></a><span class="hl line">  797 </span>  #-<span class="hl sym">:</span>broken-fasl-loader <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span>compile-file-pathname <span class="hl sym">(</span>component-pathname c<span class="hl sym">)))</span>
    886 <a id="l_798"></a><span class="hl line">  798 </span>  #<span class="hl sym">+:</span>broken-fasl-loader <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span>component-pathname c<span class="hl sym">)))</span>
    887 <a id="l_799"></a><span class="hl line">  799 </span>
    888 <a id="l_800"></a><span class="hl line">  800 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation compile-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    889 <a id="l_801"></a><span class="hl line">  801 </span>  nil<span class="hl sym">)</span>
    890 <a id="l_802"></a><span class="hl line">  802 </span>
    891 <a id="l_803"></a><span class="hl line">  803 </span><span class="hl sym">(</span>defmethod output-files <span class="hl sym">((</span>operation compile-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    892 <a id="l_804"></a><span class="hl line">  804 </span>  nil<span class="hl sym">)</span>
    893 <a id="l_805"></a><span class="hl line">  805 </span>
    894 <a id="l_806"></a><span class="hl line">  806 </span><span class="hl sym">(</span>defmethod input-files <span class="hl sym">((</span>op compile-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    895 <a id="l_807"></a><span class="hl line">  807 </span>  nil<span class="hl sym">)</span>
    896 <a id="l_808"></a><span class="hl line">  808 </span>
    897 <a id="l_809"></a><span class="hl line">  809 </span>
    898 <a id="l_810"></a><span class="hl line">  810 </span><span class="hl slc">;;; load-op</span>
    899 <a id="l_811"></a><span class="hl line">  811 </span>
    900 <a id="l_812"></a><span class="hl line">  812 </span><span class="hl sym">(</span>defclass basic-<span class="hl kwa">load</span>-op <span class="hl sym">(</span>operation<span class="hl sym">) ())</span>
    901 <a id="l_813"></a><span class="hl line">  813 </span>
    902 <a id="l_814"></a><span class="hl line">  814 </span><span class="hl sym">(</span>defclass <span class="hl kwa">load</span>-op <span class="hl sym">(</span>basic-<span class="hl kwa">load</span>-op<span class="hl sym">) ())</span>
    903 <a id="l_815"></a><span class="hl line">  815 </span>
    904 <a id="l_816"></a><span class="hl line">  816 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>o <span class="hl kwa">load</span>-op<span class="hl sym">) (</span>c cl-source-file<span class="hl sym">))</span>
    905 <a id="l_817"></a><span class="hl line">  817 </span>  <span class="hl sym">(</span><span class="hl kwa">mapcar</span> #<span class="hl sym">'</span><span class="hl kwa">load</span> <span class="hl sym">(</span>input-files o c<span class="hl sym">)))</span>
    906 <a id="l_818"></a><span class="hl line">  818 </span>
    907 <a id="l_819"></a><span class="hl line">  819 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation <span class="hl kwa">load</span>-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    908 <a id="l_820"></a><span class="hl line">  820 </span>  nil<span class="hl sym">)</span>
    909 <a id="l_821"></a><span class="hl line">  821 </span><span class="hl sym">(</span>defmethod operation-done-p <span class="hl sym">((</span>operation <span class="hl kwa">load</span>-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    910 <a id="l_822"></a><span class="hl line">  822 </span>  t<span class="hl sym">)</span>
    911 <a id="l_823"></a><span class="hl line">  823 </span>
    912 <a id="l_824"></a><span class="hl line">  824 </span><span class="hl sym">(</span>defmethod output-files <span class="hl sym">((</span>o operation<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    913 <a id="l_825"></a><span class="hl line">  825 </span>  nil<span class="hl sym">)</span>
    914 <a id="l_826"></a><span class="hl line">  826 </span>
    915 <a id="l_827"></a><span class="hl line">  827 </span><span class="hl sym">(</span>defmethod component-depends-on <span class="hl sym">((</span>operation <span class="hl kwa">load</span>-op<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    916 <a id="l_828"></a><span class="hl line">  828 </span>  <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">'</span>compile-op <span class="hl sym">(</span>component-name c<span class="hl sym">))</span>
    917 <a id="l_829"></a><span class="hl line">  829 </span>        <span class="hl sym">(</span>call-next-method<span class="hl sym">)))</span>
    918 <a id="l_830"></a><span class="hl line">  830 </span>
    919 <a id="l_831"></a><span class="hl line">  831 </span><span class="hl slc">;;; load-source-op</span>
    920 <a id="l_832"></a><span class="hl line">  832 </span>
    921 <a id="l_833"></a><span class="hl line">  833 </span><span class="hl sym">(</span>defclass <span class="hl kwa">load</span>-source-op <span class="hl sym">(</span>basic-<span class="hl kwa">load</span>-op<span class="hl sym">) ())</span>
    922 <a id="l_834"></a><span class="hl line">  834 </span>
    923 <a id="l_835"></a><span class="hl line">  835 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>o <span class="hl kwa">load</span>-source-op<span class="hl sym">) (</span>c cl-source-file<span class="hl sym">))</span>
    924 <a id="l_836"></a><span class="hl line">  836 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>source <span class="hl sym">(</span>component-pathname c<span class="hl sym">)))</span>
    925 <a id="l_837"></a><span class="hl line">  837 </span>    <span class="hl sym">(</span>setf <span class="hl sym">(</span>component-property c <span class="hl sym">'</span><span class="hl kwa">last</span>-loaded-as-source<span class="hl sym">)</span>
    926 <a id="l_838"></a><span class="hl line">  838 </span>          <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">load</span> source<span class="hl sym">)</span>
    927 <a id="l_839"></a><span class="hl line">  839 </span>               <span class="hl sym">(</span>get-universal-time<span class="hl sym">)))))</span>
    928 <a id="l_840"></a><span class="hl line">  840 </span>
    929 <a id="l_841"></a><span class="hl line">  841 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation <span class="hl kwa">load</span>-source-op<span class="hl sym">) (</span>c static-file<span class="hl sym">))</span>
    930 <a id="l_842"></a><span class="hl line">  842 </span>  nil<span class="hl sym">)</span>
    931 <a id="l_843"></a><span class="hl line">  843 </span>
    932 <a id="l_844"></a><span class="hl line">  844 </span><span class="hl sym">(</span>defmethod output-files <span class="hl sym">((</span>operation <span class="hl kwa">load</span>-source-op<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    933 <a id="l_845"></a><span class="hl line">  845 </span>  nil<span class="hl sym">)</span>
    934 <a id="l_846"></a><span class="hl line">  846 </span>
    935 <a id="l_847"></a><span class="hl line">  847 </span><span class="hl slc">;;; FIXME: we simply copy load-op's dependencies.  this is Just Not Right.</span>
    936 <a id="l_848"></a><span class="hl line">  848 </span><span class="hl sym">(</span>defmethod component-depends-on <span class="hl sym">((</span>o <span class="hl kwa">load</span>-source-op<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    937 <a id="l_849"></a><span class="hl line">  849 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>what-would-<span class="hl kwa">load</span>-op-do <span class="hl sym">(</span><span class="hl kwa">cdr</span> <span class="hl sym">(</span><span class="hl kwa">assoc</span> <span class="hl sym">'</span><span class="hl kwa">load</span>-op
    938 <a id="l_850"></a><span class="hl line">  850 </span>                                           <span class="hl sym">(</span>slot-value c <span class="hl sym">'</span>in-order-to<span class="hl sym">)))))</span>
    939 <a id="l_851"></a><span class="hl line">  851 </span>    <span class="hl sym">(</span><span class="hl kwa">mapcar</span> <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>dep<span class="hl sym">)</span>
    940 <a id="l_852"></a><span class="hl line">  852 </span>              <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">eq</span> <span class="hl sym">(</span><span class="hl kwa">car</span> dep<span class="hl sym">) '</span><span class="hl kwa">load</span>-op<span class="hl sym">)</span>
    941 <a id="l_853"></a><span class="hl line">  853 </span>                  <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">'</span><span class="hl kwa">load</span>-source-op <span class="hl sym">(</span><span class="hl kwa">cdr</span> dep<span class="hl sym">))</span>
    942 <a id="l_854"></a><span class="hl line">  854 </span>                  dep<span class="hl sym">))</span>
    943 <a id="l_855"></a><span class="hl line">  855 </span>            what-would-<span class="hl kwa">load</span>-op-do<span class="hl sym">)))</span>
    944 <a id="l_856"></a><span class="hl line">  856 </span>
    945 <a id="l_857"></a><span class="hl line">  857 </span><span class="hl sym">(</span>defmethod operation-done-p <span class="hl sym">((</span>o <span class="hl kwa">load</span>-source-op<span class="hl sym">) (</span>c source-file<span class="hl sym">))</span>
    946 <a id="l_858"></a><span class="hl line">  858 </span>  <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>component-property c <span class="hl sym">'</span><span class="hl kwa">last</span>-loaded-as-source<span class="hl sym">))</span>
    947 <a id="l_859"></a><span class="hl line">  859 </span>          <span class="hl sym">(&gt; (</span>file-write-date <span class="hl sym">(</span>component-pathname c<span class="hl sym">))</span>
    948 <a id="l_860"></a><span class="hl line">  860 </span>             <span class="hl sym">(</span>component-property c <span class="hl sym">'</span><span class="hl kwa">last</span>-loaded-as-source<span class="hl sym">)))</span>
    949 <a id="l_861"></a><span class="hl line">  861 </span>      nil t<span class="hl sym">))</span>
    950 <a id="l_862"></a><span class="hl line">  862 </span>
    951 <a id="l_863"></a><span class="hl line">  863 </span><span class="hl sym">(</span>defclass test-op <span class="hl sym">(</span>operation<span class="hl sym">) ())</span>
    952 <a id="l_864"></a><span class="hl line">  864 </span>
    953 <a id="l_865"></a><span class="hl line">  865 </span><span class="hl sym">(</span>defmethod perform <span class="hl sym">((</span>operation test-op<span class="hl sym">) (</span>c component<span class="hl sym">))</span>
    954 <a id="l_866"></a><span class="hl line">  866 </span>  nil<span class="hl sym">)</span>
    955 <a id="l_867"></a><span class="hl line">  867 </span>
    956 <a id="l_868"></a><span class="hl line">  868 </span><span class="hl sym">(</span>defgeneric <span class="hl kwa">load</span>-preferences <span class="hl sym">(</span>system operation<span class="hl sym">)</span>
    957 <a id="l_869"></a><span class="hl line">  869 </span>  <span class="hl sym">(:</span>documentation
    958 <a id="l_870"></a><span class="hl line">  870 </span>   <span class="hl str">&quot;Called to load system preferences after &lt;perform operation</span>
    959 <a id="l_871"></a><span class="hl line">  871 </span><span class="hl str">system&gt;. Typical uses are to set parameters that don't exist until</span>
    960 <a id="l_872"></a><span class="hl line">  872 </span><span class="hl str">after the system has been loaded.&quot;</span><span class="hl sym">))</span>
    961 <a id="l_873"></a><span class="hl line">  873 </span>
    962 <a id="l_874"></a><span class="hl line">  874 </span><span class="hl sym">(</span>defgeneric preference-file-for-system<span class="hl sym">/</span>operation <span class="hl sym">(</span>system operation<span class="hl sym">)</span>
    963 <a id="l_875"></a><span class="hl line">  875 </span>  <span class="hl sym">(:</span>documentation
    964 <a id="l_876"></a><span class="hl line">  876 </span>   <span class="hl str">&quot;Returns the pathname of the preference file for this system.</span>
    965 <a id="l_877"></a><span class="hl line">  877 </span><span class="hl str">Called by 'load-preferences to determine what file to load.&quot;</span><span class="hl sym">))</span>
    966 <a id="l_878"></a><span class="hl line">  878 </span>
    967 <a id="l_879"></a><span class="hl line">  879 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">load</span>-preferences <span class="hl sym">((</span>s t<span class="hl sym">) (</span>operation t<span class="hl sym">))</span>
    968 <a id="l_880"></a><span class="hl line">  880 </span>  <span class="hl slc">;; do nothing</span>
    969 <a id="l_881"></a><span class="hl line">  881 </span>  <span class="hl sym">(</span>values<span class="hl sym">))</span>
    970 <a id="l_882"></a><span class="hl line">  882 </span>
    971 <a id="l_883"></a><span class="hl line">  883 </span><span class="hl sym">(</span>defmethod <span class="hl kwa">load</span>-preferences <span class="hl sym">((</span>s system<span class="hl sym">) (</span>operation basic-<span class="hl kwa">load</span>-op<span class="hl sym">))</span>
    972 <a id="l_884"></a><span class="hl line">  884 </span>  <span class="hl sym">(</span>let<span class="hl sym">* ((*</span>package<span class="hl sym">* (</span>find-package <span class="hl sym">:</span>common-lisp<span class="hl sym">))</span>
    973 <a id="l_885"></a><span class="hl line">  885 </span>         <span class="hl sym">(</span>file <span class="hl sym">(</span>probe-file <span class="hl sym">(</span>preference-file-for-system<span class="hl sym">/</span>operation s operation<span class="hl sym">))))</span>
    974 <a id="l_886"></a><span class="hl line">  886 </span>    <span class="hl sym">(</span>when file
    975 <a id="l_887"></a><span class="hl line">  887 </span>      <span class="hl sym">(</span>when <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span>
    976 <a id="l_888"></a><span class="hl line">  888 </span>        <span class="hl sym">(</span>format <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span>
    977 <a id="l_889"></a><span class="hl line">  889 </span>                <span class="hl str">&quot;~&amp;~&#64;&lt;; ~&#64;;loading preferences for ~A/~(~A~) from ~A~&#64;:&gt;~%&quot;</span>
    978 <a id="l_890"></a><span class="hl line">  890 </span>                <span class="hl sym">(</span>component-name s<span class="hl sym">)</span>
    979 <a id="l_891"></a><span class="hl line">  891 </span>                <span class="hl sym">(</span><span class="hl kwa">type</span>-of operation<span class="hl sym">)</span> file<span class="hl sym">))</span>
    980 <a id="l_892"></a><span class="hl line">  892 </span>      <span class="hl sym">(</span><span class="hl kwa">load</span> file<span class="hl sym">))))</span>
    981 <a id="l_893"></a><span class="hl line">  893 </span>
    982 <a id="l_894"></a><span class="hl line">  894 </span><span class="hl sym">(</span>defmethod preference-file-for-system<span class="hl sym">/</span>operation <span class="hl sym">((</span>system t<span class="hl sym">) (</span>operation t<span class="hl sym">))</span>
    983 <a id="l_895"></a><span class="hl line">  895 </span>  <span class="hl slc">;; cope with anything other than systems</span>
    984 <a id="l_896"></a><span class="hl line">  896 </span>  <span class="hl sym">(</span>preference-file-for-system<span class="hl sym">/</span>operation <span class="hl sym">(</span>find-system system t<span class="hl sym">)</span> operation<span class="hl sym">))</span>
    985 <a id="l_897"></a><span class="hl line">  897 </span>
    986 <a id="l_898"></a><span class="hl line">  898 </span><span class="hl sym">(</span>defmethod preference-file-for-system<span class="hl sym">/</span>operation <span class="hl sym">((</span>s system<span class="hl sym">) (</span>operation t<span class="hl sym">))</span>
    987 <a id="l_899"></a><span class="hl line">  899 </span>  <span class="hl sym">(</span>let <span class="hl sym">((*</span>default-pathname-defaults<span class="hl sym">*</span>
    988 <a id="l_900"></a><span class="hl line">  900 </span>         <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>name nil <span class="hl sym">:</span><span class="hl kwa">type</span> nil
    989 <a id="l_901"></a><span class="hl line">  901 </span>                        <span class="hl sym">:</span>defaults <span class="hl sym">*</span>default-pathname-defaults<span class="hl sym">*)))</span>
    990 <a id="l_902"></a><span class="hl line">  902 </span>     <span class="hl sym">(</span>merge-pathnames
    991 <a id="l_903"></a><span class="hl line">  903 </span>      <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>name <span class="hl sym">(</span>component-name s<span class="hl sym">)</span>
    992 <a id="l_904"></a><span class="hl line">  904 </span>                     <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl str">&quot;lisp&quot;</span>
    993 <a id="l_905"></a><span class="hl line">  905 </span>                     <span class="hl sym">:</span>directory <span class="hl sym">'(:</span>relative <span class="hl str">&quot;.asdf&quot;</span><span class="hl sym">))</span>
    994 <a id="l_906"></a><span class="hl line">  906 </span>      <span class="hl sym">(</span>truename <span class="hl sym">(</span>user-homedir-pathname<span class="hl sym">)))))</span>
    995 <a id="l_907"></a><span class="hl line">  907 </span>
    996 <a id="l_908"></a><span class="hl line">  908 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    997 <a id="l_909"></a><span class="hl line">  909 </span><span class="hl slc">;;; invoking operations</span>
    998 <a id="l_910"></a><span class="hl line">  910 </span>
    999 <a id="l_911"></a><span class="hl line">  911 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>operate-docstring<span class="hl sym">*</span>
    1000 <a id="l_912"></a><span class="hl line">  912 </span>  <span class="hl str">&quot;Operate does three things:</span>
    1001 <a id="l_913"></a><span class="hl line">  913 </span><span class="hl str"></span>
    1002 <a id="l_914"></a><span class="hl line">  914 </span><span class="hl str">1. It creates an instance of `operation-class` using any keyword parameters</span>
    1003 <a id="l_915"></a><span class="hl line">  915 </span><span class="hl str">as initargs.</span>
    1004 <a id="l_916"></a><span class="hl line">  916 </span><span class="hl str">2. It finds the  asdf-system specified by `system` (possibly loading</span>
    1005 <a id="l_917"></a><span class="hl line">  917 </span><span class="hl str">it from disk).</span>
    1006 <a id="l_918"></a><span class="hl line">  918 </span><span class="hl str">3. It then calls `traverse` with the operation and system as arguments</span>
    1007 <a id="l_919"></a><span class="hl line">  919 </span><span class="hl str"></span>
    1008 <a id="l_920"></a><span class="hl line">  920 </span><span class="hl str">The traverse operation is wrapped in `with-compilation-unit` and error</span>
    1009 <a id="l_921"></a><span class="hl line">  921 </span><span class="hl str">handling code. If a `version` argument is supplied, then operate also</span>
    1010 <a id="l_922"></a><span class="hl line">  922 </span><span class="hl str">ensures that the system found satisfies it using the `version-satisfies`</span>
    1011 <a id="l_923"></a><span class="hl line">  923 </span><span class="hl str">method.&quot;</span><span class="hl sym">)</span>
    1012 <a id="l_924"></a><span class="hl line">  924 </span>
    1013 <a id="l_925"></a><span class="hl line">  925 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> operate <span class="hl sym">(</span>operation-class system <span class="hl sym">&amp;</span>rest args <span class="hl sym">&amp;</span>key <span class="hl sym">(</span>verbose t<span class="hl sym">)</span> version
    1014 <a id="l_926"></a><span class="hl line">  926 </span>                <span class="hl sym">&amp;</span>allow-other-keys<span class="hl sym">)</span>
    1015 <a id="l_927"></a><span class="hl line">  927 </span>  <span class="hl sym">(</span>let<span class="hl sym">* ((</span>op <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>make-instance operation-class
    1016 <a id="l_928"></a><span class="hl line">  928 </span>                    <span class="hl sym">:</span>original-initargs args
    1017 <a id="l_929"></a><span class="hl line">  929 </span>                    args<span class="hl sym">))</span>
    1018 <a id="l_930"></a><span class="hl line">  930 </span>         <span class="hl sym">(*</span>verbose-out<span class="hl sym">* (</span><span class="hl kwa">if</span> verbose <span class="hl sym">*</span>standard-output<span class="hl sym">* (</span>make-broadcast-stream<span class="hl sym">)))</span>
    1019 <a id="l_931"></a><span class="hl line">  931 </span>         <span class="hl sym">(</span>system <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>typep system <span class="hl sym">'</span>component<span class="hl sym">)</span> system <span class="hl sym">(</span>find-system system<span class="hl sym">))))</span>
    1020 <a id="l_932"></a><span class="hl line">  932 </span>    <span class="hl sym">(</span>unless <span class="hl sym">(</span>version-satisfies system version<span class="hl sym">)</span>
    1021 <a id="l_933"></a><span class="hl line">  933 </span>      <span class="hl sym">(</span>error <span class="hl sym">'</span>missing-component <span class="hl sym">:</span>requires system <span class="hl sym">:</span>version version<span class="hl sym">))</span>
    1022 <a id="l_934"></a><span class="hl line">  934 </span>    <span class="hl sym">(</span>let <span class="hl sym">((</span>steps <span class="hl sym">(</span>traverse op system<span class="hl sym">)))</span>
    1023 <a id="l_935"></a><span class="hl line">  935 </span>      <span class="hl sym">(</span>with-compilation-unit <span class="hl sym">()</span>
    1024 <a id="l_936"></a><span class="hl line">  936 </span>        <span class="hl sym">(</span>loop for <span class="hl sym">(</span>op . component<span class="hl sym">)</span> in steps do
    1025 <a id="l_937"></a><span class="hl line">  937 </span>                 <span class="hl sym">(</span>loop
    1026 <a id="l_938"></a><span class="hl line">  938 </span>                   <span class="hl sym">(</span>restart-case
    1027 <a id="l_939"></a><span class="hl line">  939 </span>                       <span class="hl sym">(</span><span class="hl kwa">progn</span> <span class="hl sym">(</span>perform op component<span class="hl sym">)</span>
    1028 <a id="l_940"></a><span class="hl line">  940 </span>                              <span class="hl sym">(</span>return<span class="hl sym">))</span>
    1029 <a id="l_941"></a><span class="hl line">  941 </span>                     <span class="hl sym">(</span>retry <span class="hl sym">()</span>
    1030 <a id="l_942"></a><span class="hl line">  942 </span>                       <span class="hl sym">:</span>report
    1031 <a id="l_943"></a><span class="hl line">  943 </span>                       <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>s<span class="hl sym">)</span>
    1032 <a id="l_944"></a><span class="hl line">  944 </span>                         <span class="hl sym">(</span>format s <span class="hl str">&quot;~&#64;&lt;Retry performing ~S on ~S.~&#64;:&gt;&quot;</span>
    1033 <a id="l_945"></a><span class="hl line">  945 </span>                                 op component<span class="hl sym">)))</span>
    1034 <a id="l_946"></a><span class="hl line">  946 </span>                     <span class="hl sym">(</span>accept <span class="hl sym">()</span>
    1035 <a id="l_947"></a><span class="hl line">  947 </span>                       <span class="hl sym">:</span>report
    1036 <a id="l_948"></a><span class="hl line">  948 </span>                       <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>s<span class="hl sym">)</span>
    1037 <a id="l_949"></a><span class="hl line">  949 </span>                         <span class="hl sym">(</span>format s <span class="hl str">&quot;~&#64;&lt;Continue, treating ~S on ~S as ~</span>
    1038 <a id="l_950"></a><span class="hl line">  950 </span><span class="hl str">                                   having been successful.~&#64;:&gt;&quot;</span>
    1039 <a id="l_951"></a><span class="hl line">  951 </span>                                 op component<span class="hl sym">))</span>
    1040 <a id="l_952"></a><span class="hl line">  952 </span>                       <span class="hl sym">(</span>setf <span class="hl sym">(</span>gethash <span class="hl sym">(</span><span class="hl kwa">type</span>-of op<span class="hl sym">)</span>
    1041 <a id="l_953"></a><span class="hl line">  953 </span>                                      <span class="hl sym">(</span>component-operation-times component<span class="hl sym">))</span>
    1042 <a id="l_954"></a><span class="hl line">  954 </span>                             <span class="hl sym">(</span>get-universal-time<span class="hl sym">))</span>
    1043 <a id="l_955"></a><span class="hl line">  955 </span>                       <span class="hl sym">(</span>return<span class="hl sym">)))))))))</span>
    1044 <a id="l_956"></a><span class="hl line">  956 </span>
    1045 <a id="l_957"></a><span class="hl line">  957 </span><span class="hl sym">(</span>setf <span class="hl sym">(</span>documentation <span class="hl sym">'</span>operate <span class="hl sym">'</span>function<span class="hl sym">)</span>
    1046 <a id="l_958"></a><span class="hl line">  958 </span>      <span class="hl sym">*</span>operate-docstring<span class="hl sym">*)</span>
    1047 <a id="l_959"></a><span class="hl line">  959 </span>
    1048 <a id="l_960"></a><span class="hl line">  960 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> oos <span class="hl sym">(</span>operation-class system <span class="hl sym">&amp;</span>rest args <span class="hl sym">&amp;</span>key force <span class="hl sym">(</span>verbose t<span class="hl sym">)</span> version<span class="hl sym">)</span>
    1049 <a id="l_961"></a><span class="hl line">  961 </span>  <span class="hl sym">(</span>declare <span class="hl sym">(</span>ignore force verbose version<span class="hl sym">))</span>
    1050 <a id="l_962"></a><span class="hl line">  962 </span>  <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>operate operation-class system args<span class="hl sym">))</span>
    1051 <a id="l_963"></a><span class="hl line">  963 </span>
    1052 <a id="l_964"></a><span class="hl line">  964 </span><span class="hl sym">(</span>setf <span class="hl sym">(</span>documentation <span class="hl sym">'</span>oos <span class="hl sym">'</span>function<span class="hl sym">)</span>
    1053 <a id="l_965"></a><span class="hl line">  965 </span>      <span class="hl sym">(</span>format nil
    1054 <a id="l_966"></a><span class="hl line">  966 </span>              <span class="hl str">&quot;Short for _operate on system_ and an alias for the `operate` function. ~&amp;~&amp;~a&quot;</span>
    1055 <a id="l_967"></a><span class="hl line">  967 </span>              <span class="hl sym">*</span>operate-docstring<span class="hl sym">*))</span>
    1056 <a id="l_968"></a><span class="hl line">  968 </span>
    1057 <a id="l_969"></a><span class="hl line">  969 </span><span class="hl slc">;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;</span>
    1058 <a id="l_970"></a><span class="hl line">  970 </span><span class="hl slc">;;; syntax</span>
    1059 <a id="l_971"></a><span class="hl line">  971 </span>
    1060 <a id="l_972"></a><span class="hl line">  972 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> remove-keyword <span class="hl sym">(</span>key arglist<span class="hl sym">)</span>
    1061 <a id="l_973"></a><span class="hl line">  973 </span>  <span class="hl sym">(</span>labels <span class="hl sym">((</span>aux <span class="hl sym">(</span>key arglist<span class="hl sym">)</span>
    1062 <a id="l_974"></a><span class="hl line">  974 </span>             <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">null</span> arglist<span class="hl sym">)</span> nil<span class="hl sym">)</span>
    1063 <a id="l_975"></a><span class="hl line">  975 </span>                   <span class="hl sym">((</span><span class="hl kwa">eq</span> key <span class="hl sym">(</span><span class="hl kwa">car</span> arglist<span class="hl sym">)) (</span><span class="hl kwa">cddr</span> arglist<span class="hl sym">))</span>
    1064 <a id="l_976"></a><span class="hl line">  976 </span>                   <span class="hl sym">(</span>t <span class="hl sym">(</span><span class="hl kwa">cons</span> <span class="hl sym">(</span><span class="hl kwa">car</span> arglist<span class="hl sym">) (</span><span class="hl kwa">cons</span> <span class="hl sym">(</span><span class="hl kwa">cadr</span> arglist<span class="hl sym">)</span>
    1065 <a id="l_977"></a><span class="hl line">  977 </span>                                                <span class="hl sym">(</span>remove-keyword
    1066 <a id="l_978"></a><span class="hl line">  978 </span>                                                 key <span class="hl sym">(</span><span class="hl kwa">cddr</span> arglist<span class="hl sym">))))))))</span>
    1067 <a id="l_979"></a><span class="hl line">  979 </span>    <span class="hl sym">(</span>aux key arglist<span class="hl sym">)))</span>
    1068 <a id="l_980"></a><span class="hl line">  980 </span>
    1069 <a id="l_981"></a><span class="hl line">  981 </span><span class="hl sym">(</span>defmacro defsystem <span class="hl sym">(</span>name <span class="hl sym">&amp;</span>body options<span class="hl sym">)</span>
    1070 <a id="l_982"></a><span class="hl line">  982 </span>  <span class="hl sym">(</span>destructuring-bind <span class="hl sym">(&amp;</span>key <span class="hl sym">(</span>pathname nil pathname-arg-p<span class="hl sym">) (</span>class <span class="hl sym">'</span>system<span class="hl sym">)</span>
    1071 <a id="l_983"></a><span class="hl line">  983 </span>                            <span class="hl sym">&amp;</span>allow-other-keys<span class="hl sym">)</span>
    1072 <a id="l_984"></a><span class="hl line">  984 </span>      options
    1073 <a id="l_985"></a><span class="hl line">  985 </span>    <span class="hl sym">(</span>let <span class="hl sym">((</span>component-options <span class="hl sym">(</span>remove-keyword <span class="hl sym">:</span>class options<span class="hl sym">)))</span>
    1074 <a id="l_986"></a><span class="hl line">  986 </span>      `<span class="hl sym">(</span><span class="hl kwa">progn</span>
    1075 <a id="l_987"></a><span class="hl line">  987 </span>         <span class="hl slc">;; system must be registered before we parse the body, otherwise</span>
    1076 <a id="l_988"></a><span class="hl line">  988 </span>         <span class="hl slc">;; we recur when trying to find an existing system of the same name</span>
    1077 <a id="l_989"></a><span class="hl line">  989 </span>         <span class="hl slc">;; to reuse options (e.g. pathname) from</span>
    1078 <a id="l_990"></a><span class="hl line">  990 </span>         <span class="hl sym">(</span>let <span class="hl sym">((</span>s <span class="hl sym">(</span>system-registered-p <span class="hl sym">',</span>name<span class="hl sym">)))</span>
    1079 <a id="l_991"></a><span class="hl line">  991 </span>           <span class="hl sym">(</span><span class="hl kwa">cond</span> <span class="hl sym">((</span><span class="hl kwa">and</span> s <span class="hl sym">(</span><span class="hl kwa">eq</span> <span class="hl sym">(</span><span class="hl kwa">type</span>-of <span class="hl sym">(</span><span class="hl kwa">cdr</span> s<span class="hl sym">)) ',</span>class<span class="hl sym">))</span>
    1080 <a id="l_992"></a><span class="hl line">  992 </span>                  <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">car</span> s<span class="hl sym">) (</span>get-universal-time<span class="hl sym">)))</span>
    1081 <a id="l_993"></a><span class="hl line">  993 </span>                 <span class="hl sym">(</span>s
    1082 <a id="l_994"></a><span class="hl line">  994 </span>                  #<span class="hl sym">+</span>clisp
    1083 <a id="l_995"></a><span class="hl line">  995 </span>                  <span class="hl sym">(</span>sysdef-error <span class="hl str">&quot;Cannot redefine the existing system ~A with a different class&quot;</span> s<span class="hl sym">)</span>
    1084 <a id="l_996"></a><span class="hl line">  996 </span>                  #-clisp
    1085 <a id="l_997"></a><span class="hl line">  997 </span>                  <span class="hl sym">(</span>change-class <span class="hl sym">(</span><span class="hl kwa">cdr</span> s<span class="hl sym">) ',</span>class<span class="hl sym">))</span>
    1086 <a id="l_998"></a><span class="hl line">  998 </span>                 <span class="hl sym">(</span>t
    1087 <a id="l_999"></a><span class="hl line">  999 </span>                  <span class="hl sym">(</span>register-system <span class="hl sym">(</span><span class="hl kwa">quote</span> <span class="hl sym">,</span>name<span class="hl sym">)</span>
    1088 <a id="l_1000"></a><span class="hl line"> 1000 </span>                                   <span class="hl sym">(</span>make-instance <span class="hl sym">',</span>class <span class="hl sym">:</span>name <span class="hl sym">',</span>name<span class="hl sym">)))))</span>
    1089 <a id="l_1001"></a><span class="hl line"> 1001 </span>         <span class="hl sym">(</span>parse-component-form nil <span class="hl sym">(</span><span class="hl kwa">apply</span>
    1090 <a id="l_1002"></a><span class="hl line"> 1002 </span>                                    #<span class="hl sym">'</span><span class="hl kwa">list</span>
    1091 <a id="l_1003"></a><span class="hl line"> 1003 </span>                                    <span class="hl sym">:</span>module <span class="hl sym">(</span>coerce-name <span class="hl sym">',</span>name<span class="hl sym">)</span>
    1092 <a id="l_1004"></a><span class="hl line"> 1004 </span>                                    <span class="hl sym">:</span>pathname
    1093 <a id="l_1005"></a><span class="hl line"> 1005 </span>                                    <span class="hl slc">;; to avoid a note about unreachable code</span>
    1094 <a id="l_1006"></a><span class="hl line"> 1006 </span>                                    <span class="hl sym">,(</span><span class="hl kwa">if</span> pathname-arg-p
    1095 <a id="l_1007"></a><span class="hl line"> 1007 </span>                                         pathname
    1096 <a id="l_1008"></a><span class="hl line"> 1008 </span>                                         `<span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>when <span class="hl sym">*</span><span class="hl kwa">load</span>-truename<span class="hl sym">*</span>
    1097 <a id="l_1009"></a><span class="hl line"> 1009 </span>                                                <span class="hl sym">(</span>pathname-sans-name<span class="hl sym">+</span><span class="hl kwa">type</span>
    1098 <a id="l_1010"></a><span class="hl line"> 1010 </span>                                                 <span class="hl sym">(</span>resolve-symlinks
    1099 <a id="l_1011"></a><span class="hl line"> 1011 </span>                                                  <span class="hl sym">*</span><span class="hl kwa">load</span>-truename<span class="hl sym">*)))</span>
    1100 <a id="l_1012"></a><span class="hl line"> 1012 </span>                                              <span class="hl sym">*</span>default-pathname-defaults<span class="hl sym">*))</span>
    1101 <a id="l_1013"></a><span class="hl line"> 1013 </span>                                    <span class="hl sym">',</span>component-options<span class="hl sym">))))))</span>
    1102 <a id="l_1014"></a><span class="hl line"> 1014 </span>
    1103 <a id="l_1015"></a><span class="hl line"> 1015 </span>
    1104 <a id="l_1016"></a><span class="hl line"> 1016 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> class-for-<span class="hl kwa">type</span> <span class="hl sym">(</span>parent <span class="hl kwa">type</span><span class="hl sym">)</span>
    1105 <a id="l_1017"></a><span class="hl line"> 1017 </span>  <span class="hl sym">(</span>let<span class="hl sym">* ((</span>extra-symbols <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span>find-symbol <span class="hl sym">(</span>symbol-name <span class="hl kwa">type</span><span class="hl sym">) *</span>package<span class="hl sym">*)</span>
    1106 <a id="l_1018"></a><span class="hl line"> 1018 </span>                              <span class="hl sym">(</span>find-symbol <span class="hl sym">(</span>symbol-name <span class="hl kwa">type</span><span class="hl sym">)</span>
    1107 <a id="l_1019"></a><span class="hl line"> 1019 </span>                                           <span class="hl sym">(</span><span class="hl kwa">load</span>-time-value
    1108 <a id="l_1020"></a><span class="hl line"> 1020 </span>                                            <span class="hl sym">(</span>package-name <span class="hl sym">:</span>asdf<span class="hl sym">)))))</span>
    1109 <a id="l_1021"></a><span class="hl line"> 1021 </span>         <span class="hl sym">(</span>class <span class="hl sym">(</span>dolist <span class="hl sym">(</span>symbol <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>keywordp <span class="hl kwa">type</span><span class="hl sym">)</span>
    1110 <a id="l_1022"></a><span class="hl line"> 1022 </span>                                    extra-symbols
    1111 <a id="l_1023"></a><span class="hl line"> 1023 </span>                                    <span class="hl sym">(</span><span class="hl kwa">cons type</span> extra-symbols<span class="hl sym">)))</span>
    1112 <a id="l_1024"></a><span class="hl line"> 1024 </span>                  <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> symbol
    1113 <a id="l_1025"></a><span class="hl line"> 1025 </span>                             <span class="hl sym">(</span>find-class symbol nil<span class="hl sym">)</span>
    1114 <a id="l_1026"></a><span class="hl line"> 1026 </span>                             <span class="hl sym">(</span>subtypep symbol <span class="hl sym">'</span>component<span class="hl sym">))</span>
    1115 <a id="l_1027"></a><span class="hl line"> 1027 </span>                    <span class="hl sym">(</span>return <span class="hl sym">(</span>find-class symbol<span class="hl sym">))))))</span>
    1116 <a id="l_1028"></a><span class="hl line"> 1028 </span>    <span class="hl sym">(</span><span class="hl kwa">or</span> class
    1117 <a id="l_1029"></a><span class="hl line"> 1029 </span>        <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">eq type</span> <span class="hl sym">:</span>file<span class="hl sym">)</span>
    1118 <a id="l_1030"></a><span class="hl line"> 1030 </span>             <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>module-default-component-class parent<span class="hl sym">)</span>
    1119 <a id="l_1031"></a><span class="hl line"> 1031 </span>                 <span class="hl sym">(</span>find-class <span class="hl sym">'</span>cl-source-file<span class="hl sym">)))</span>
    1120 <a id="l_1032"></a><span class="hl line"> 1032 </span>        <span class="hl sym">(</span>sysdef-error <span class="hl str">&quot;~&#64;&lt;don't recognize component type ~A~&#64;:&gt;&quot;</span> <span class="hl kwa">type</span><span class="hl sym">))))</span>
    1121 <a id="l_1033"></a><span class="hl line"> 1033 </span>
    1122 <a id="l_1034"></a><span class="hl line"> 1034 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> maybe-add-tree <span class="hl sym">(</span>tree op1 op2 c<span class="hl sym">)</span>
    1123 <a id="l_1035"></a><span class="hl line"> 1035 </span>  <span class="hl str">&quot;Add the node C at /OP1/OP2 in TREE, unless it's there already.</span>
    1124 <a id="l_1036"></a><span class="hl line"> 1036 </span><span class="hl str">Returns the new tree (which probably shares structure with the old one)&quot;</span>
    1125 <a id="l_1037"></a><span class="hl line"> 1037 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>first-op-tree <span class="hl sym">(</span><span class="hl kwa">assoc</span> op1 tree<span class="hl sym">)))</span>
    1126 <a id="l_1038"></a><span class="hl line"> 1038 </span>    <span class="hl sym">(</span><span class="hl kwa">if</span> first-op-tree
    1127 <a id="l_1039"></a><span class="hl line"> 1039 </span>        <span class="hl sym">(</span><span class="hl kwa">progn</span>
    1128 <a id="l_1040"></a><span class="hl line"> 1040 </span>          <span class="hl sym">(</span>aif <span class="hl sym">(</span><span class="hl kwa">assoc</span> op2 <span class="hl sym">(</span><span class="hl kwa">cdr</span> first-op-tree<span class="hl sym">))</span>
    1129 <a id="l_1041"></a><span class="hl line"> 1041 </span>               <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>find c <span class="hl sym">(</span><span class="hl kwa">cdr</span> it<span class="hl sym">))</span>
    1130 <a id="l_1042"></a><span class="hl line"> 1042 </span>                   nil
    1131 <a id="l_1043"></a><span class="hl line"> 1043 </span>                   <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">cdr</span> it<span class="hl sym">) (</span><span class="hl kwa">cons</span> c <span class="hl sym">(</span><span class="hl kwa">cdr</span> it<span class="hl sym">))))</span>
    1132 <a id="l_1044"></a><span class="hl line"> 1044 </span>               <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">cdr</span> first-op-tree<span class="hl sym">)</span>
    1133 <a id="l_1045"></a><span class="hl line"> 1045 </span>                     <span class="hl sym">(</span>acons op2 <span class="hl sym">(</span><span class="hl kwa">list</span> c<span class="hl sym">) (</span><span class="hl kwa">cdr</span> first-op-tree<span class="hl sym">))))</span>
    1134 <a id="l_1046"></a><span class="hl line"> 1046 </span>          tree<span class="hl sym">)</span>
    1135 <a id="l_1047"></a><span class="hl line"> 1047 </span>        <span class="hl sym">(</span>acons op1 <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl sym">(</span><span class="hl kwa">list</span> op2 c<span class="hl sym">))</span> tree<span class="hl sym">))))</span>
    1136 <a id="l_1048"></a><span class="hl line"> 1048 </span>
    1137 <a id="l_1049"></a><span class="hl line"> 1049 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> union-of-dependencies <span class="hl sym">(&amp;</span>rest deps<span class="hl sym">)</span>
    1138 <a id="l_1050"></a><span class="hl line"> 1050 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>new-tree nil<span class="hl sym">))</span>
    1139 <a id="l_1051"></a><span class="hl line"> 1051 </span>    <span class="hl sym">(</span>dolist <span class="hl sym">(</span>dep deps<span class="hl sym">)</span>
    1140 <a id="l_1052"></a><span class="hl line"> 1052 </span>      <span class="hl sym">(</span>dolist <span class="hl sym">(</span>op-tree dep<span class="hl sym">)</span>
    1141 <a id="l_1053"></a><span class="hl line"> 1053 </span>        <span class="hl sym">(</span>dolist <span class="hl sym">(</span>op  <span class="hl sym">(</span><span class="hl kwa">cdr</span> op-tree<span class="hl sym">))</span>
    1142 <a id="l_1054"></a><span class="hl line"> 1054 </span>          <span class="hl sym">(</span>dolist <span class="hl sym">(</span>c <span class="hl sym">(</span><span class="hl kwa">cdr</span> op<span class="hl sym">))</span>
    1143 <a id="l_1055"></a><span class="hl line"> 1055 </span>            <span class="hl sym">(</span>setf new-tree
    1144 <a id="l_1056"></a><span class="hl line"> 1056 </span>                  <span class="hl sym">(</span>maybe-add-tree new-tree <span class="hl sym">(</span><span class="hl kwa">car</span> op-tree<span class="hl sym">) (</span><span class="hl kwa">car</span> op<span class="hl sym">)</span> c<span class="hl sym">))))))</span>
    1145 <a id="l_1057"></a><span class="hl line"> 1057 </span>    new-tree<span class="hl sym">))</span>
    1146 <a id="l_1058"></a><span class="hl line"> 1058 </span>
    1147 <a id="l_1059"></a><span class="hl line"> 1059 </span>
    1148 <a id="l_1060"></a><span class="hl line"> 1060 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> remove-keys <span class="hl sym">(</span>key-names args<span class="hl sym">)</span>
    1149 <a id="l_1061"></a><span class="hl line"> 1061 </span>  <span class="hl sym">(</span>loop for <span class="hl sym">(</span> name val <span class="hl sym">)</span> on args by #<span class="hl sym">'</span><span class="hl kwa">cddr</span>
    1150 <a id="l_1062"></a><span class="hl line"> 1062 </span>        unless <span class="hl sym">(</span><span class="hl kwa">member</span> <span class="hl sym">(</span>symbol-name name<span class="hl sym">)</span> key-names
    1151 <a id="l_1063"></a><span class="hl line"> 1063 </span>                       <span class="hl sym">:</span>key #<span class="hl sym">'</span>symbol-name <span class="hl sym">:</span>test <span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)</span>
    1152 <a id="l_1064"></a><span class="hl line"> 1064 </span>        <span class="hl kwa">append</span> <span class="hl sym">(</span><span class="hl kwa">list</span> name val<span class="hl sym">)))</span>
    1153 <a id="l_1065"></a><span class="hl line"> 1065 </span>
    1154 <a id="l_1066"></a><span class="hl line"> 1066 </span><span class="hl sym">(</span>defvar <span class="hl sym">*</span>serial-depends-on<span class="hl sym">*)</span>
    1155 <a id="l_1067"></a><span class="hl line"> 1067 </span>
    1156 <a id="l_1068"></a><span class="hl line"> 1068 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> parse-component-form <span class="hl sym">(</span>parent options<span class="hl sym">)</span>
    1157 <a id="l_1069"></a><span class="hl line"> 1069 </span>
    1158 <a id="l_1070"></a><span class="hl line"> 1070 </span>  <span class="hl sym">(</span>destructuring-bind
    1159 <a id="l_1071"></a><span class="hl line"> 1071 </span>        <span class="hl sym">(</span><span class="hl kwa">type</span> name <span class="hl sym">&amp;</span>rest rest <span class="hl sym">&amp;</span>key
    1160 <a id="l_1072"></a><span class="hl line"> 1072 </span>              <span class="hl slc">;; the following list of keywords is reproduced below in the</span>
    1161 <a id="l_1073"></a><span class="hl line"> 1073 </span>              <span class="hl slc">;; remove-keys form.  important to keep them in sync</span>
    1162 <a id="l_1074"></a><span class="hl line"> 1074 </span>              components pathname default-component-class
    1163 <a id="l_1075"></a><span class="hl line"> 1075 </span>              perform explain output-files operation-done-p
    1164 <a id="l_1076"></a><span class="hl line"> 1076 </span>              weakly-depends-on
    1165 <a id="l_1077"></a><span class="hl line"> 1077 </span>              depends-on serial in-order-to
    1166 <a id="l_1078"></a><span class="hl line"> 1078 </span>              <span class="hl slc">;; list ends</span>
    1167 <a id="l_1079"></a><span class="hl line"> 1079 </span>              <span class="hl sym">&amp;</span>allow-other-keys<span class="hl sym">)</span> options
    1168 <a id="l_1080"></a><span class="hl line"> 1080 </span>    <span class="hl sym">(</span>declare <span class="hl sym">(</span>ignorable perform explain output-files operation-done-p<span class="hl sym">))</span>
    1169 <a id="l_1081"></a><span class="hl line"> 1081 </span>    <span class="hl sym">(</span>check-component-input <span class="hl kwa">type</span> name weakly-depends-on depends-on components in-order-to<span class="hl sym">)</span>
    1170 <a id="l_1082"></a><span class="hl line"> 1082 </span>
    1171 <a id="l_1083"></a><span class="hl line"> 1083 </span>    <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> parent
    1172 <a id="l_1084"></a><span class="hl line"> 1084 </span>               <span class="hl sym">(</span>find-component parent name<span class="hl sym">)</span>
    1173 <a id="l_1085"></a><span class="hl line"> 1085 </span>               <span class="hl slc">;; ignore the same object when rereading the defsystem</span>
    1174 <a id="l_1086"></a><span class="hl line"> 1086 </span>               <span class="hl sym">(</span><span class="hl kwa">not</span>
    1175 <a id="l_1087"></a><span class="hl line"> 1087 </span>                <span class="hl sym">(</span>typep <span class="hl sym">(</span>find-component parent name<span class="hl sym">)</span>
    1176 <a id="l_1088"></a><span class="hl line"> 1088 </span>                       <span class="hl sym">(</span>class-for-<span class="hl kwa">type</span> parent <span class="hl kwa">type</span><span class="hl sym">))))</span>
    1177 <a id="l_1089"></a><span class="hl line"> 1089 </span>      <span class="hl sym">(</span>error <span class="hl sym">'</span>duplicate-names <span class="hl sym">:</span>name name<span class="hl sym">))</span>
    1178 <a id="l_1090"></a><span class="hl line"> 1090 </span>
    1179 <a id="l_1091"></a><span class="hl line"> 1091 </span>    <span class="hl sym">(</span>let<span class="hl sym">* ((</span>other-args <span class="hl sym">(</span>remove-keys
    1180 <a id="l_1092"></a><span class="hl line"> 1092 </span>                        <span class="hl sym">'(</span>components pathname default-component-class
    1181 <a id="l_1093"></a><span class="hl line"> 1093 </span>                          perform explain output-files operation-done-p
    1182 <a id="l_1094"></a><span class="hl line"> 1094 </span>                          weakly-depends-on
    1183 <a id="l_1095"></a><span class="hl line"> 1095 </span>                          depends-on serial in-order-to<span class="hl sym">)</span>
    1184 <a id="l_1096"></a><span class="hl line"> 1096 </span>                        rest<span class="hl sym">))</span>
    1185 <a id="l_1097"></a><span class="hl line"> 1097 </span>           <span class="hl sym">(</span>ret
    1186 <a id="l_1098"></a><span class="hl line"> 1098 </span>            <span class="hl sym">(</span><span class="hl kwa">or</span> <span class="hl sym">(</span>find-component parent name<span class="hl sym">)</span>
    1187 <a id="l_1099"></a><span class="hl line"> 1099 </span>                <span class="hl sym">(</span>make-instance <span class="hl sym">(</span>class-for-<span class="hl kwa">type</span> parent <span class="hl kwa">type</span><span class="hl sym">)))))</span>
    1188 <a id="l_1100"></a><span class="hl line"> 1100 </span>      <span class="hl sym">(</span>when weakly-depends-on
    1189 <a id="l_1101"></a><span class="hl line"> 1101 </span>        <span class="hl sym">(</span>setf depends-on <span class="hl sym">(</span><span class="hl kwa">append</span> depends-on <span class="hl sym">(</span>remove-<span class="hl kwa">if</span> <span class="hl sym">(</span>complement #<span class="hl sym">'</span>find-system<span class="hl sym">)</span> weakly-depends-on<span class="hl sym">))))</span>
    1190 <a id="l_1102"></a><span class="hl line"> 1102 </span>      <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">boundp</span> <span class="hl sym">'*</span>serial-depends-on<span class="hl sym">*)</span>
    1191 <a id="l_1103"></a><span class="hl line"> 1103 </span>        <span class="hl sym">(</span>setf depends-on
    1192 <a id="l_1104"></a><span class="hl line"> 1104 </span>              <span class="hl sym">(</span>concatenate <span class="hl sym">'</span><span class="hl kwa">list</span> <span class="hl sym">*</span>serial-depends-on<span class="hl sym">*</span> depends-on<span class="hl sym">)))</span>
    1193 <a id="l_1105"></a><span class="hl line"> 1105 </span>      <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>reinitialize-instance ret
    1194 <a id="l_1106"></a><span class="hl line"> 1106 </span>             <span class="hl sym">:</span>name <span class="hl sym">(</span>coerce-name name<span class="hl sym">)</span>
    1195 <a id="l_1107"></a><span class="hl line"> 1107 </span>             <span class="hl sym">:</span>pathname pathname
    1196 <a id="l_1108"></a><span class="hl line"> 1108 </span>             <span class="hl sym">:</span>parent parent
    1197 <a id="l_1109"></a><span class="hl line"> 1109 </span>             other-args<span class="hl sym">)</span>
    1198 <a id="l_1110"></a><span class="hl line"> 1110 </span>      <span class="hl sym">(</span>when <span class="hl sym">(</span>typep ret <span class="hl sym">'</span>module<span class="hl sym">)</span>
    1199 <a id="l_1111"></a><span class="hl line"> 1111 </span>        <span class="hl sym">(</span>setf <span class="hl sym">(</span>module-default-component-class ret<span class="hl sym">)</span>
    1200 <a id="l_1112"></a><span class="hl line"> 1112 </span>              <span class="hl sym">(</span><span class="hl kwa">or</span> default-component-class
    1201 <a id="l_1113"></a><span class="hl line"> 1113 </span>                  <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(</span>typep parent <span class="hl sym">'</span>module<span class="hl sym">)</span>
    1202 <a id="l_1114"></a><span class="hl line"> 1114 </span>                       <span class="hl sym">(</span>module-default-component-class parent<span class="hl sym">))))</span>
    1203 <a id="l_1115"></a><span class="hl line"> 1115 </span>        <span class="hl sym">(</span>let <span class="hl sym">((*</span>serial-depends-on<span class="hl sym">*</span> nil<span class="hl sym">))</span>
    1204 <a id="l_1116"></a><span class="hl line"> 1116 </span>          <span class="hl sym">(</span>setf <span class="hl sym">(</span>module-components ret<span class="hl sym">)</span>
    1205 <a id="l_1117"></a><span class="hl line"> 1117 </span>                <span class="hl sym">(</span>loop for c-form in components
    1206 <a id="l_1118"></a><span class="hl line"> 1118 </span>                      for c <span class="hl sym">= (</span>parse-component-form ret c-form<span class="hl sym">)</span>
    1207 <a id="l_1119"></a><span class="hl line"> 1119 </span>                      collect c
    1208 <a id="l_1120"></a><span class="hl line"> 1120 </span>                      <span class="hl kwa">if</span> serial
    1209 <a id="l_1121"></a><span class="hl line"> 1121 </span>                      do <span class="hl sym">(</span>push <span class="hl sym">(</span>component-name c<span class="hl sym">) *</span>serial-depends-on<span class="hl sym">*))))</span>
    1210 <a id="l_1122"></a><span class="hl line"> 1122 </span>
    1211 <a id="l_1123"></a><span class="hl line"> 1123 </span>        <span class="hl slc">;; check for duplicate names</span>
    1212 <a id="l_1124"></a><span class="hl line"> 1124 </span>        <span class="hl sym">(</span>let <span class="hl sym">((</span>name-hash <span class="hl sym">(</span>make-hash-table <span class="hl sym">:</span>test #<span class="hl sym">'</span><span class="hl kwa">equal</span><span class="hl sym">)))</span>
    1213 <a id="l_1125"></a><span class="hl line"> 1125 </span>          <span class="hl sym">(</span>loop for c in <span class="hl sym">(</span>module-components ret<span class="hl sym">)</span>
    1214 <a id="l_1126"></a><span class="hl line"> 1126 </span>                do
    1215 <a id="l_1127"></a><span class="hl line"> 1127 </span>                <span class="hl sym">(</span><span class="hl kwa">if</span> <span class="hl sym">(</span>gethash <span class="hl sym">(</span>component-name c<span class="hl sym">)</span>
    1216 <a id="l_1128"></a><span class="hl line"> 1128 </span>                             name-hash<span class="hl sym">)</span>
    1217 <a id="l_1129"></a><span class="hl line"> 1129 </span>                    <span class="hl sym">(</span>error <span class="hl sym">'</span>duplicate-names
    1218 <a id="l_1130"></a><span class="hl line"> 1130 </span>                           <span class="hl sym">:</span>name <span class="hl sym">(</span>component-name c<span class="hl sym">))</span>
    1219 <a id="l_1131"></a><span class="hl line"> 1131 </span>                    <span class="hl sym">(</span>setf <span class="hl sym">(</span>gethash <span class="hl sym">(</span>component-name c<span class="hl sym">)</span>
    1220 <a id="l_1132"></a><span class="hl line"> 1132 </span>                                   name-hash<span class="hl sym">)</span>
    1221 <a id="l_1133"></a><span class="hl line"> 1133 </span>                          t<span class="hl sym">)))))</span>
    1222 <a id="l_1134"></a><span class="hl line"> 1134 </span>
    1223 <a id="l_1135"></a><span class="hl line"> 1135 </span>      <span class="hl sym">(</span>setf <span class="hl sym">(</span>slot-value ret <span class="hl sym">'</span>in-order-to<span class="hl sym">)</span>
    1224 <a id="l_1136"></a><span class="hl line"> 1136 </span>            <span class="hl sym">(</span>union-of-dependencies
    1225 <a id="l_1137"></a><span class="hl line"> 1137 </span>             in-order-to
    1226 <a id="l_1138"></a><span class="hl line"> 1138 </span>             `<span class="hl sym">((</span>compile-op <span class="hl sym">(</span>compile-op <span class="hl sym">,</span>&#64;depends-on<span class="hl sym">))</span>
    1227 <a id="l_1139"></a><span class="hl line"> 1139 </span>               <span class="hl sym">(</span><span class="hl kwa">load</span>-op <span class="hl sym">(</span><span class="hl kwa">load</span>-op <span class="hl sym">,</span>&#64;depends-on<span class="hl sym">))))</span>
    1228 <a id="l_1140"></a><span class="hl line"> 1140 </span>            <span class="hl sym">(</span>slot-value ret <span class="hl sym">'</span>do-first<span class="hl sym">)</span> `<span class="hl sym">((</span>compile-op <span class="hl sym">(</span><span class="hl kwa">load</span>-op <span class="hl sym">,</span>&#64;depends-on<span class="hl sym">))))</span>
    1229 <a id="l_1141"></a><span class="hl line"> 1141 </span>
    1230 <a id="l_1142"></a><span class="hl line"> 1142 </span>      <span class="hl sym">(</span>%remove-component-inline-methods ret rest<span class="hl sym">)</span>
    1231 <a id="l_1143"></a><span class="hl line"> 1143 </span>
    1232 <a id="l_1144"></a><span class="hl line"> 1144 </span>      ret<span class="hl sym">)))</span>
    1233 <a id="l_1145"></a><span class="hl line"> 1145 </span>
    1234 <a id="l_1146"></a><span class="hl line"> 1146 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> %remove-component-inline-methods <span class="hl sym">(</span>ret rest<span class="hl sym">)</span>
    1235 <a id="l_1147"></a><span class="hl line"> 1147 </span>  <span class="hl sym">(</span>loop for name in <span class="hl sym">+</span>asdf-methods<span class="hl sym">+</span>
    1236 <a id="l_1148"></a><span class="hl line"> 1148 </span>        do <span class="hl sym">(</span>map <span class="hl sym">'</span>nil
    1237 <a id="l_1149"></a><span class="hl line"> 1149 </span>                <span class="hl slc">;; this is inefficient as most of the stored</span>
    1238 <a id="l_1150"></a><span class="hl line"> 1150 </span>                <span class="hl slc">;; methods will not be for this particular gf n</span>
    1239 <a id="l_1151"></a><span class="hl line"> 1151 </span>                <span class="hl slc">;; But this is hardly performance-critical</span>
    1240 <a id="l_1152"></a><span class="hl line"> 1152 </span>                <span class="hl sym">(</span><span class="hl kwa">lambda</span> <span class="hl sym">(</span>m<span class="hl sym">)</span>
    1241 <a id="l_1153"></a><span class="hl line"> 1153 </span>                  <span class="hl sym">(</span>remove-method <span class="hl sym">(</span>symbol-function name<span class="hl sym">)</span> m<span class="hl sym">))</span>
    1242 <a id="l_1154"></a><span class="hl line"> 1154 </span>                <span class="hl sym">(</span>component-inline-methods ret<span class="hl sym">)))</span>
    1243 <a id="l_1155"></a><span class="hl line"> 1155 </span>  <span class="hl slc">;; clear methods, then add the new ones</span>
    1244 <a id="l_1156"></a><span class="hl line"> 1156 </span>  <span class="hl sym">(</span>setf <span class="hl sym">(</span>component-inline-methods ret<span class="hl sym">)</span> nil<span class="hl sym">)</span>
    1245 <a id="l_1157"></a><span class="hl line"> 1157 </span>  <span class="hl sym">(</span>loop for name in <span class="hl sym">+</span>asdf-methods<span class="hl sym">+</span>
    1246 <a id="l_1158"></a><span class="hl line"> 1158 </span>        for v <span class="hl sym">= (</span>getf rest <span class="hl sym">(</span>intern <span class="hl sym">(</span>symbol-name name<span class="hl sym">) :</span>keyword<span class="hl sym">))</span>
    1247 <a id="l_1159"></a><span class="hl line"> 1159 </span>        when v do
    1248 <a id="l_1160"></a><span class="hl line"> 1160 </span>        <span class="hl sym">(</span>destructuring-bind <span class="hl sym">(</span>op qual <span class="hl sym">(</span>o c<span class="hl sym">) &amp;</span>body body<span class="hl sym">)</span> v
    1249 <a id="l_1161"></a><span class="hl line"> 1161 </span>          <span class="hl sym">(</span>pushnew
    1250 <a id="l_1162"></a><span class="hl line"> 1162 </span>           <span class="hl sym">(</span><span class="hl kwa">eval</span> `<span class="hl sym">(</span>defmethod <span class="hl sym">,</span>name <span class="hl sym">,</span>qual <span class="hl sym">((,</span>o <span class="hl sym">,</span>op<span class="hl sym">) (,</span>c <span class="hl sym">(</span>eql <span class="hl sym">,</span>ret<span class="hl sym">)))</span>
    1251 <a id="l_1163"></a><span class="hl line"> 1163 </span>                             <span class="hl sym">,</span>&#64;body<span class="hl sym">))</span>
    1252 <a id="l_1164"></a><span class="hl line"> 1164 </span>           <span class="hl sym">(</span>component-inline-methods ret<span class="hl sym">)))))</span>
    1253 <a id="l_1165"></a><span class="hl line"> 1165 </span>
    1254 <a id="l_1166"></a><span class="hl line"> 1166 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> check-component-input <span class="hl sym">(</span><span class="hl kwa">type</span> name weakly-depends-on depends-on components in-order-to<span class="hl sym">)</span>
    1255 <a id="l_1167"></a><span class="hl line"> 1167 </span>  <span class="hl str">&quot;A partial test of the values of a component.&quot;</span>
    1256 <a id="l_1168"></a><span class="hl line"> 1168 </span>  <span class="hl sym">(</span>when weakly-depends-on <span class="hl sym">(</span>warn <span class="hl str">&quot;We got one! XXXXX&quot;</span><span class="hl sym">))</span>
    1257 <a id="l_1169"></a><span class="hl line"> 1169 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span><span class="hl kwa">listp</span> depends-on<span class="hl sym">)</span>
    1258 <a id="l_1170"></a><span class="hl line"> 1170 </span>    <span class="hl sym">(</span>sysdef-error-component <span class="hl str">&quot;:depends-on must be a list.&quot;</span>
    1259 <a id="l_1171"></a><span class="hl line"> 1171 </span>                            <span class="hl kwa">type</span> name depends-on<span class="hl sym">))</span>
    1260 <a id="l_1172"></a><span class="hl line"> 1172 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span><span class="hl kwa">listp</span> weakly-depends-on<span class="hl sym">)</span>
    1261 <a id="l_1173"></a><span class="hl line"> 1173 </span>    <span class="hl sym">(</span>sysdef-error-component <span class="hl str">&quot;:weakly-depends-on must be a list.&quot;</span>
    1262 <a id="l_1174"></a><span class="hl line"> 1174 </span>                            <span class="hl kwa">type</span> name weakly-depends-on<span class="hl sym">))</span>
    1263 <a id="l_1175"></a><span class="hl line"> 1175 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span><span class="hl kwa">listp</span> components<span class="hl sym">)</span>
    1264 <a id="l_1176"></a><span class="hl line"> 1176 </span>    <span class="hl sym">(</span>sysdef-error-component <span class="hl str">&quot;:components must be NIL or a list of components.&quot;</span>
    1265 <a id="l_1177"></a><span class="hl line"> 1177 </span>                            <span class="hl kwa">type</span> name components<span class="hl sym">))</span>
    1266 <a id="l_1178"></a><span class="hl line"> 1178 </span>  <span class="hl sym">(</span>unless <span class="hl sym">(</span><span class="hl kwa">and</span> <span class="hl sym">(</span><span class="hl kwa">listp</span> in-order-to<span class="hl sym">) (</span><span class="hl kwa">listp</span> <span class="hl sym">(</span><span class="hl kwa">car</span> in-order-to<span class="hl sym">)))</span>
    1267 <a id="l_1179"></a><span class="hl line"> 1179 </span>    <span class="hl sym">(</span>sysdef-error-component <span class="hl str">&quot;:in-order-to must be NIL or a list of components.&quot;</span>
    1268 <a id="l_1180"></a><span class="hl line"> 1180 </span>                            <span class="hl kwa">type</span> name in-order-to<span class="hl sym">)))</span>
    1269 <a id="l_1181"></a><span class="hl line"> 1181 </span>
    1270 <a id="l_1182"></a><span class="hl line"> 1182 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> sysdef-error-component <span class="hl sym">(</span>msg <span class="hl kwa">type</span> name value<span class="hl sym">)</span>
    1271 <a id="l_1183"></a><span class="hl line"> 1183 </span>  <span class="hl sym">(</span>sysdef-error <span class="hl sym">(</span>concatenate <span class="hl sym">'</span>string msg
    1272 <a id="l_1184"></a><span class="hl line"> 1184 </span>                             <span class="hl str">&quot;~&amp;The value specified for ~(~A~) ~A is ~W&quot;</span><span class="hl sym">)</span>
    1273 <a id="l_1185"></a><span class="hl line"> 1185 </span>                <span class="hl kwa">type</span> name value<span class="hl sym">))</span>
    1274 <a id="l_1186"></a><span class="hl line"> 1186 </span>
    1275 <a id="l_1187"></a><span class="hl line"> 1187 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> resolve-symlinks <span class="hl sym">(</span>path<span class="hl sym">)</span>
    1276 <a id="l_1188"></a><span class="hl line"> 1188 </span>  #-allegro <span class="hl sym">(</span>truename path<span class="hl sym">)</span>
    1277 <a id="l_1189"></a><span class="hl line"> 1189 </span>  #<span class="hl sym">+</span>allegro <span class="hl sym">(</span>excl<span class="hl sym">:</span>pathname-resolve-symbolic-links path<span class="hl sym">)</span>
    1278 <a id="l_1190"></a><span class="hl line"> 1190 </span>  <span class="hl sym">)</span>
    1279 <a id="l_1191"></a><span class="hl line"> 1191 </span>
    1280 <a id="l_1192"></a><span class="hl line"> 1192 </span><span class="hl slc">;;; optional extras</span>
    1281 <a id="l_1193"></a><span class="hl line"> 1193 </span>
    1282 <a id="l_1194"></a><span class="hl line"> 1194 </span><span class="hl slc">;;; run-shell-command functions for other lisp implementations will be</span>
    1283 <a id="l_1195"></a><span class="hl line"> 1195 </span><span class="hl slc">;;; gratefully accepted, if they do the same thing.  If the docstring</span>
    1284 <a id="l_1196"></a><span class="hl line"> 1196 </span><span class="hl slc">;;; is ambiguous, send a bug report</span>
    1285 <a id="l_1197"></a><span class="hl line"> 1197 </span>
    1286 <a id="l_1198"></a><span class="hl line"> 1198 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> run-shell-<span class="hl kwa">command</span> <span class="hl sym">(</span>control-string <span class="hl sym">&amp;</span>rest args<span class="hl sym">)</span>
    1287 <a id="l_1199"></a><span class="hl line"> 1199 </span>  <span class="hl str">&quot;Interpolate ARGS into CONTROL-STRING as if by FORMAT, and</span>
    1288 <a id="l_1200"></a><span class="hl line"> 1200 </span><span class="hl str">synchronously execute the result using a Bourne-compatible shell, with</span>
    1289 <a id="l_1201"></a><span class="hl line"> 1201 </span><span class="hl str">output to *VERBOSE-OUT*.  Returns the shell's exit code.&quot;</span>
    1290 <a id="l_1202"></a><span class="hl line"> 1202 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span><span class="hl kwa">command</span> <span class="hl sym">(</span><span class="hl kwa">apply</span> #<span class="hl sym">'</span>format nil control-string args<span class="hl sym">)))</span>
    1291 <a id="l_1203"></a><span class="hl line"> 1203 </span>    <span class="hl sym">(</span>format <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span> <span class="hl str">&quot;; $ ~A~%&quot;</span> <span class="hl kwa">command</span><span class="hl sym">)</span>
    1292 <a id="l_1204"></a><span class="hl line"> 1204 </span>    #<span class="hl sym">+</span>sbcl
    1293 <a id="l_1205"></a><span class="hl line"> 1205 </span>    <span class="hl sym">(</span>sb-ext<span class="hl sym">:</span>process-<span class="hl kwa">exit</span>-code
    1294 <a id="l_1206"></a><span class="hl line"> 1206 </span>     <span class="hl sym">(</span>sb-ext<span class="hl sym">:</span>run-program
    1295 <a id="l_1207"></a><span class="hl line"> 1207 </span>      #<span class="hl sym">+</span>win32 <span class="hl str">&quot;sh&quot;</span> #-win32 <span class="hl str">&quot;/bin/sh&quot;</span>
    1296 <a id="l_1208"></a><span class="hl line"> 1208 </span>      <span class="hl sym">(</span><span class="hl kwa">list</span>  <span class="hl str">&quot;-c&quot;</span> <span class="hl kwa">command</span><span class="hl sym">)</span>
    1297 <a id="l_1209"></a><span class="hl line"> 1209 </span>      #<span class="hl sym">+</span>win32 #<span class="hl sym">+</span>win32 <span class="hl sym">:</span>search t
    1298 <a id="l_1210"></a><span class="hl line"> 1210 </span>      <span class="hl sym">:</span>input nil <span class="hl sym">:</span>output <span class="hl sym">*</span>verbose-out<span class="hl sym">*))</span>
    1299 <a id="l_1211"></a><span class="hl line"> 1211 </span>
    1300 <a id="l_1212"></a><span class="hl line"> 1212 </span>    #<span class="hl sym">+(</span><span class="hl kwa">or</span> cmu scl<span class="hl sym">)</span>
    1301 <a id="l_1213"></a><span class="hl line"> 1213 </span>    <span class="hl sym">(</span>ext<span class="hl sym">:</span>process-<span class="hl kwa">exit</span>-code
    1302 <a id="l_1214"></a><span class="hl line"> 1214 </span>     <span class="hl sym">(</span>ext<span class="hl sym">:</span>run-program
    1303 <a id="l_1215"></a><span class="hl line"> 1215 </span>      <span class="hl str">&quot;/bin/sh&quot;</span>
    1304 <a id="l_1216"></a><span class="hl line"> 1216 </span>      <span class="hl sym">(</span><span class="hl kwa">list</span>  <span class="hl str">&quot;-c&quot;</span> <span class="hl kwa">command</span><span class="hl sym">)</span>
    1305 <a id="l_1217"></a><span class="hl line"> 1217 </span>      <span class="hl sym">:</span>input nil <span class="hl sym">:</span>output <span class="hl sym">*</span>verbose-out<span class="hl sym">*))</span>
    1306 <a id="l_1218"></a><span class="hl line"> 1218 </span>
    1307 <a id="l_1219"></a><span class="hl line"> 1219 </span>    #<span class="hl sym">+</span>allegro
    1308 <a id="l_1220"></a><span class="hl line"> 1220 </span>    <span class="hl sym">(</span>excl<span class="hl sym">:</span>run-shell-<span class="hl kwa">command command</span> <span class="hl sym">:</span>input nil <span class="hl sym">:</span>output <span class="hl sym">*</span>verbose-out<span class="hl sym">*)</span>
    1309 <a id="l_1221"></a><span class="hl line"> 1221 </span>
    1310 <a id="l_1222"></a><span class="hl line"> 1222 </span>    #<span class="hl sym">+</span>lispworks
    1311 <a id="l_1223"></a><span class="hl line"> 1223 </span>    <span class="hl sym">(</span>system<span class="hl sym">:</span>call-system-showing-output
    1312 <a id="l_1224"></a><span class="hl line"> 1224 </span>     <span class="hl kwa">command</span>
    1313 <a id="l_1225"></a><span class="hl line"> 1225 </span>     <span class="hl sym">:</span>shell-<span class="hl kwa">type</span> <span class="hl str">&quot;/bin/sh&quot;</span>
    1314 <a id="l_1226"></a><span class="hl line"> 1226 </span>     <span class="hl sym">:</span>output-stream <span class="hl sym">*</span>verbose-out<span class="hl sym">*)</span>
    1315 <a id="l_1227"></a><span class="hl line"> 1227 </span>
    1316 <a id="l_1228"></a><span class="hl line"> 1228 </span>    #<span class="hl sym">+</span>clisp                     <span class="hl slc">;XXX not exactly *verbose-out*, I know</span>
    1317 <a id="l_1229"></a><span class="hl line"> 1229 </span>    <span class="hl sym">(</span>ext<span class="hl sym">:</span>run-shell-<span class="hl kwa">command  command</span> <span class="hl sym">:</span>output <span class="hl sym">:</span>terminal <span class="hl sym">:</span>wait t<span class="hl sym">)</span>
    1318 <a id="l_1230"></a><span class="hl line"> 1230 </span>
    1319 <a id="l_1231"></a><span class="hl line"> 1231 </span>    #<span class="hl sym">+</span>openmcl
    1320 <a id="l_1232"></a><span class="hl line"> 1232 </span>    <span class="hl sym">(</span><span class="hl kwa">nth</span>-value <span class="hl num">1</span>
    1321 <a id="l_1233"></a><span class="hl line"> 1233 </span>               <span class="hl sym">(</span>ccl<span class="hl sym">:</span>external-process-status
    1322 <a id="l_1234"></a><span class="hl line"> 1234 </span>                <span class="hl sym">(</span>ccl<span class="hl sym">:</span>run-program <span class="hl str">&quot;/bin/sh&quot;</span> <span class="hl sym">(</span><span class="hl kwa">list</span> <span class="hl str">&quot;-c&quot;</span> <span class="hl kwa">command</span><span class="hl sym">)</span>
    1323 <a id="l_1235"></a><span class="hl line"> 1235 </span>                                 <span class="hl sym">:</span>input nil <span class="hl sym">:</span>output <span class="hl sym">*</span>verbose-out<span class="hl sym">*</span>
    1324 <a id="l_1236"></a><span class="hl line"> 1236 </span>                                 <span class="hl sym">:</span>wait t<span class="hl sym">)))</span>
    1325 <a id="l_1237"></a><span class="hl line"> 1237 </span>    #<span class="hl sym">+</span>ecl <span class="hl slc">;; courtesy of Juan Jose Garcia Ripoll</span>
    1326 <a id="l_1238"></a><span class="hl line"> 1238 </span>    <span class="hl sym">(</span>si<span class="hl sym">:</span>system <span class="hl kwa">command</span><span class="hl sym">)</span>
    1327 <a id="l_1239"></a><span class="hl line"> 1239 </span>    #-<span class="hl sym">(</span><span class="hl kwa">or</span> openmcl clisp lispworks allegro scl cmu sbcl ecl<span class="hl sym">)</span>
    1328 <a id="l_1240"></a><span class="hl line"> 1240 </span>    <span class="hl sym">(</span>error <span class="hl str">&quot;RUN-SHELL-PROGRAM not implemented for this Lisp&quot;</span><span class="hl sym">)</span>
    1329 <a id="l_1241"></a><span class="hl line"> 1241 </span>    <span class="hl sym">))</span>
    1330 <a id="l_1242"></a><span class="hl line"> 1242 </span>
    1331 <a id="l_1243"></a><span class="hl line"> 1243 </span>
    1332 <a id="l_1244"></a><span class="hl line"> 1244 </span><span class="hl sym">(</span>defgeneric hyperdocumentation <span class="hl sym">(</span>package name doc-<span class="hl kwa">type</span><span class="hl sym">))</span>
    1333 <a id="l_1245"></a><span class="hl line"> 1245 </span><span class="hl sym">(</span>defmethod hyperdocumentation <span class="hl sym">((</span>package symbol<span class="hl sym">)</span> name doc-<span class="hl kwa">type</span><span class="hl sym">)</span>
    1334 <a id="l_1246"></a><span class="hl line"> 1246 </span>  <span class="hl sym">(</span>hyperdocumentation <span class="hl sym">(</span>find-package package<span class="hl sym">)</span> name doc-<span class="hl kwa">type</span><span class="hl sym">))</span>
    1335 <a id="l_1247"></a><span class="hl line"> 1247 </span>
    1336 <a id="l_1248"></a><span class="hl line"> 1248 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> hyperdoc <span class="hl sym">(</span>name doc-<span class="hl kwa">type</span><span class="hl sym">)</span>
    1337 <a id="l_1249"></a><span class="hl line"> 1249 </span>  <span class="hl sym">(</span>hyperdocumentation <span class="hl sym">(</span>symbol-package name<span class="hl sym">)</span> name doc-<span class="hl kwa">type</span><span class="hl sym">))</span>
    1338 <a id="l_1250"></a><span class="hl line"> 1250 </span>
    1339 <a id="l_1251"></a><span class="hl line"> 1251 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> system-source-file <span class="hl sym">(</span>system-name<span class="hl sym">)</span>
    1340 <a id="l_1252"></a><span class="hl line"> 1252 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>system <span class="hl sym">(</span>asdf<span class="hl sym">:</span>find-system system-name<span class="hl sym">)))</span>
    1341 <a id="l_1253"></a><span class="hl line"> 1253 </span>    <span class="hl sym">(</span>make-pathname
    1342 <a id="l_1254"></a><span class="hl line"> 1254 </span>     <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl str">&quot;asd&quot;</span>
    1343 <a id="l_1255"></a><span class="hl line"> 1255 </span>     <span class="hl sym">:</span>name <span class="hl sym">(</span>asdf<span class="hl sym">:</span>component-name system<span class="hl sym">)</span>
    1344 <a id="l_1256"></a><span class="hl line"> 1256 </span>     <span class="hl sym">:</span>defaults <span class="hl sym">(</span>asdf<span class="hl sym">:</span>component-relative-pathname system<span class="hl sym">))))</span>
    1345 <a id="l_1257"></a><span class="hl line"> 1257 </span>
    1346 <a id="l_1258"></a><span class="hl line"> 1258 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> system-source-directory <span class="hl sym">(</span>system-name<span class="hl sym">)</span>
    1347 <a id="l_1259"></a><span class="hl line"> 1259 </span>  <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>name nil
    1348 <a id="l_1260"></a><span class="hl line"> 1260 </span>                 <span class="hl sym">:</span><span class="hl kwa">type</span> nil
    1349 <a id="l_1261"></a><span class="hl line"> 1261 </span>                 <span class="hl sym">:</span>defaults <span class="hl sym">(</span>system-source-file system-name<span class="hl sym">)))</span>
    1350 <a id="l_1262"></a><span class="hl line"> 1262 </span>
    1351 <a id="l_1263"></a><span class="hl line"> 1263 </span><span class="hl sym">(</span><span class="hl kwa">defun</span> system-relative-pathname <span class="hl sym">(</span>system pathname <span class="hl sym">&amp;</span>key name <span class="hl kwa">type</span><span class="hl sym">)</span>
    1352 <a id="l_1264"></a><span class="hl line"> 1264 </span>  <span class="hl sym">(</span>let <span class="hl sym">((</span>directory <span class="hl sym">(</span>pathname-directory pathname<span class="hl sym">)))</span>
    1353 <a id="l_1265"></a><span class="hl line"> 1265 </span>    <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">eq</span> <span class="hl sym">(</span><span class="hl kwa">car</span> directory<span class="hl sym">) :</span>absolute<span class="hl sym">)</span>
    1354 <a id="l_1266"></a><span class="hl line"> 1266 </span>      <span class="hl sym">(</span>setf <span class="hl sym">(</span><span class="hl kwa">car</span> directory<span class="hl sym">) :</span>relative<span class="hl sym">))</span>
    1355 <a id="l_1267"></a><span class="hl line"> 1267 </span>    <span class="hl sym">(</span>merge-pathnames
    1356 <a id="l_1268"></a><span class="hl line"> 1268 </span>     <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>name <span class="hl sym">(</span><span class="hl kwa">or</span> name <span class="hl sym">(</span>pathname-name pathname<span class="hl sym">))</span>
    1357 <a id="l_1269"></a><span class="hl line"> 1269 </span>                    <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl sym">(</span><span class="hl kwa">or type</span> <span class="hl sym">(</span>pathname-<span class="hl kwa">type</span> pathname<span class="hl sym">))</span>
    1358 <a id="l_1270"></a><span class="hl line"> 1270 </span>                    <span class="hl sym">:</span>directory directory<span class="hl sym">)</span>
    1359 <a id="l_1271"></a><span class="hl line"> 1271 </span>     <span class="hl sym">(</span>system-source-directory system<span class="hl sym">))))</span>
    1360 <a id="l_1272"></a><span class="hl line"> 1272 </span>
    1361 <a id="l_1273"></a><span class="hl line"> 1273 </span>
    1362 <a id="l_1274"></a><span class="hl line"> 1274 </span><span class="hl sym">(</span>pushnew <span class="hl sym">:</span>asdf <span class="hl sym">*</span>features<span class="hl sym">*)</span>
    1363 <a id="l_1275"></a><span class="hl line"> 1275 </span>
    1364 <a id="l_1276"></a><span class="hl line"> 1276 </span>#<span class="hl sym">+</span>sbcl
    1365 <a id="l_1277"></a><span class="hl line"> 1277 </span><span class="hl sym">(</span><span class="hl kwa">eval</span>-when <span class="hl sym">(:</span>compile-toplevel <span class="hl sym">:</span><span class="hl kwa">load</span>-toplevel <span class="hl sym">:</span>execute<span class="hl sym">)</span>
    1366 <a id="l_1278"></a><span class="hl line"> 1278 </span>  <span class="hl sym">(</span>when <span class="hl sym">(</span>sb-ext<span class="hl sym">:</span>posix-<span class="hl kwa">getenv</span> <span class="hl str">&quot;SBCL_BUILDING_CONTRIB&quot;</span><span class="hl sym">)</span>
    1367 <a id="l_1279"></a><span class="hl line"> 1279 </span>    <span class="hl sym">(</span>pushnew <span class="hl sym">:</span>sbcl-hooks-require <span class="hl sym">*</span>features<span class="hl sym">*)))</span>
    1368 <a id="l_1280"></a><span class="hl line"> 1280 </span>
    1369 <a id="l_1281"></a><span class="hl line"> 1281 </span>#<span class="hl sym">+(</span><span class="hl kwa">and</span> sbcl sbcl-hooks-require<span class="hl sym">)</span>
    1370 <a id="l_1282"></a><span class="hl line"> 1282 </span><span class="hl sym">(</span><span class="hl kwa">progn</span>
    1371 <a id="l_1283"></a><span class="hl line"> 1283 </span>  <span class="hl sym">(</span><span class="hl kwa">defun</span> module-provide-asdf <span class="hl sym">(</span>name<span class="hl sym">)</span>
    1372 <a id="l_1284"></a><span class="hl line"> 1284 </span>    <span class="hl sym">(</span>handler-bind <span class="hl sym">((</span>style-warning #<span class="hl sym">'</span>muffle-warning<span class="hl sym">))</span>
    1373 <a id="l_1285"></a><span class="hl line"> 1285 </span>      <span class="hl sym">(</span>let<span class="hl sym">* ((*</span>verbose-out<span class="hl sym">* (</span>make-broadcast-stream<span class="hl sym">))</span>
    1374 <a id="l_1286"></a><span class="hl line"> 1286 </span>             <span class="hl sym">(</span>system <span class="hl sym">(</span>asdf<span class="hl sym">:</span>find-system name nil<span class="hl sym">)))</span>
    1375 <a id="l_1287"></a><span class="hl line"> 1287 </span>        <span class="hl sym">(</span>when system
    1376 <a id="l_1288"></a><span class="hl line"> 1288 </span>          <span class="hl sym">(</span>asdf<span class="hl sym">:</span>operate <span class="hl sym">'</span>asdf<span class="hl sym">:</span><span class="hl kwa">load</span>-op name<span class="hl sym">)</span>
    1377 <a id="l_1289"></a><span class="hl line"> 1289 </span>          t<span class="hl sym">))))</span>
    1378 <a id="l_1290"></a><span class="hl line"> 1290 </span>
    1379 <a id="l_1291"></a><span class="hl line"> 1291 </span>  <span class="hl sym">(</span><span class="hl kwa">defun</span> contrib-sysdef-search <span class="hl sym">(</span>system<span class="hl sym">)</span>
    1380 <a id="l_1292"></a><span class="hl line"> 1292 </span>    <span class="hl sym">(</span>let <span class="hl sym">((</span>home <span class="hl sym">(</span>sb-ext<span class="hl sym">:</span>posix-<span class="hl kwa">getenv</span> <span class="hl str">&quot;SBCL_HOME&quot;</span><span class="hl sym">)))</span>
    1381 <a id="l_1293"></a><span class="hl line"> 1293 </span>      <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> home <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>string<span class="hl sym">=</span> home <span class="hl str">&quot;&quot;</span><span class="hl sym">)))</span>
    1382 <a id="l_1294"></a><span class="hl line"> 1294 </span>        <span class="hl sym">(</span>let<span class="hl sym">* ((</span>name <span class="hl sym">(</span>coerce-name system<span class="hl sym">))</span>
    1383 <a id="l_1295"></a><span class="hl line"> 1295 </span>               <span class="hl sym">(</span>home <span class="hl sym">(</span>truename home<span class="hl sym">))</span>
    1384 <a id="l_1296"></a><span class="hl line"> 1296 </span>               <span class="hl sym">(</span>contrib <span class="hl sym">(</span>merge-pathnames
    1385 <a id="l_1297"></a><span class="hl line"> 1297 </span>                         <span class="hl sym">(</span>make-pathname <span class="hl sym">:</span>directory `<span class="hl sym">(:</span>relative <span class="hl sym">,</span>name<span class="hl sym">)</span>
    1386 <a id="l_1298"></a><span class="hl line"> 1298 </span>                                        <span class="hl sym">:</span>name name
    1387 <a id="l_1299"></a><span class="hl line"> 1299 </span>                                        <span class="hl sym">:</span><span class="hl kwa">type</span> <span class="hl str">&quot;asd&quot;</span>
    1388 <a id="l_1300"></a><span class="hl line"> 1300 </span>                                        <span class="hl sym">:</span>case <span class="hl sym">:</span>local
    1389 <a id="l_1301"></a><span class="hl line"> 1301 </span>                                        <span class="hl sym">:</span>version <span class="hl sym">:</span>newest<span class="hl sym">)</span>
    1390 <a id="l_1302"></a><span class="hl line"> 1302 </span>                         home<span class="hl sym">)))</span>
    1391 <a id="l_1303"></a><span class="hl line"> 1303 </span>          <span class="hl sym">(</span>probe-file contrib<span class="hl sym">)))))</span>
    1392 <a id="l_1304"></a><span class="hl line"> 1304 </span>
    1393 <a id="l_1305"></a><span class="hl line"> 1305 </span>  <span class="hl sym">(</span>pushnew
    1394 <a id="l_1306"></a><span class="hl line"> 1306 </span>   <span class="hl sym">'(</span>let <span class="hl sym">((</span>home <span class="hl sym">(</span>sb-ext<span class="hl sym">:</span>posix-<span class="hl kwa">getenv</span> <span class="hl str">&quot;SBCL_HOME&quot;</span><span class="hl sym">)))</span>
    1395 <a id="l_1307"></a><span class="hl line"> 1307 </span>      <span class="hl sym">(</span>when <span class="hl sym">(</span><span class="hl kwa">and</span> home <span class="hl sym">(</span><span class="hl kwa">not</span> <span class="hl sym">(</span>string<span class="hl sym">=</span> home <span class="hl str">&quot;&quot;</span><span class="hl sym">)))</span>
    1396 <a id="l_1308"></a><span class="hl line"> 1308 </span>        <span class="hl sym">(</span>merge-pathnames <span class="hl str">&quot;site-systems/&quot;</span> <span class="hl sym">(</span>truename home<span class="hl sym">))))</span>
    1397 <a id="l_1309"></a><span class="hl line"> 1309 </span>   <span class="hl sym">*</span>central-registry<span class="hl sym">*)</span>
    1398 <a id="l_1310"></a><span class="hl line"> 1310 </span>
    1399 <a id="l_1311"></a><span class="hl line"> 1311 </span>  <span class="hl sym">(</span>pushnew
    1400 <a id="l_1312"></a><span class="hl line"> 1312 </span>   <span class="hl sym">'(</span>merge-pathnames <span class="hl str">&quot;.sbcl/systems/&quot;</span>
    1401 <a id="l_1313"></a><span class="hl line"> 1313 </span>     <span class="hl sym">(</span>user-homedir-pathname<span class="hl sym">))</span>
    1402 <a id="l_1314"></a><span class="hl line"> 1314 </span>   <span class="hl sym">*</span>central-registry<span class="hl sym">*)</span>
    1403 <a id="l_1315"></a><span class="hl line"> 1315 </span>
    1404 <a id="l_1316"></a><span class="hl line"> 1316 </span>  <span class="hl sym">(</span>pushnew <span class="hl sym">'</span>module-provide-asdf sb-ext<span class="hl sym">:*</span>module-provider-functions<span class="hl sym">*)</span>
    1405 <a id="l_1317"></a><span class="hl line"> 1317 </span>  <span class="hl sym">(</span>pushnew <span class="hl sym">'</span>contrib-sysdef-search <span class="hl sym">*</span>system-definition-search-functions<span class="hl sym">*))</span>
    1406 <a id="l_1318"></a><span class="hl line"> 1318 </span>
    1407 <a id="l_1319"></a><span class="hl line"> 1319 </span><span class="hl sym">(</span>provide <span class="hl sym">'</span>asdf<span class="hl sym">)</span>
    1408 </pre></div>
    1409 
    1410 <hr />
    1411 <table>
    1412 <tr>
    1413 <td>
    1414 <address><a href="http://sourceforge.net/">Back to SourceForge.net</a></address><br />
    1415 Powered by <a href="http://viewvc.tigris.org/">ViewVC 1.0.3</a>
    1416 </td>
    1417 <td style="text-align:right;">
    1418 <h3><a href="/*docroot*/help_rootview.html">ViewVC and Help</a></h3>
    1419 </td>
    1420 </tr>
    1421 </table>
    1422 </body>
    1423 </html>
    1424 
     1;;; This is asdf: Another System Definition Facility.  $Revision$
     2;;;
     3;;; Feedback, bug reports, and patches are all welcome: please mail to
     4;;; <cclan-list@lists.sf.net>.  But note first that the canonical
     5;;; source for asdf is presently the cCLan CVS repository at
     6;;; <URL:http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/>
     7;;;
     8;;; If you obtained this copy from anywhere else, and you experience
     9;;; trouble using it, or find bugs, you may want to check at the
     10;;; location above for a more recent version (and for documentation
     11;;; and test files, if your copy came without them) before reporting
     12;;; bugs.  There are usually two "supported" revisions - the CVS HEAD
     13;;; is the latest development version, whereas the revision tagged
     14;;; RELEASE may be slightly older but is considered `stable'
     15
     16;;; Copyright (c) 2001-2007 Daniel Barlow and contributors
     17;;;
     18;;; Permission is hereby granted, free of charge, to any person obtaining
     19;;; a copy of this software and associated documentation files (the
     20;;; "Software"), to deal in the Software without restriction, including
     21;;; without limitation the rights to use, copy, modify, merge, publish,
     22;;; distribute, sublicense, and/or sell copies of the Software, and to
     23;;; permit persons to whom the Software is furnished to do so, subject to
     24;;; the following conditions:
     25;;;
     26;;; The above copyright notice and this permission notice shall be
     27;;; included in all copies or substantial portions of the Software.
     28;;;
     29;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
     30;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
     31;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
     32;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
     33;;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
     34;;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
     35;;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     36
     37;;; the problem with writing a defsystem replacement is bootstrapping:
     38;;; we can't use defsystem to compile it.  Hence, all in one file
     39
     40(defpackage #:asdf
     41  (:export #:defsystem #:oos #:operate #:find-system #:run-shell-command
     42           #:system-definition-pathname #:find-component ; miscellaneous
     43           #:hyperdocumentation #:hyperdoc
     44
     45           #:compile-op #:load-op #:load-source-op #:test-system-version
     46           #:test-op
     47           #:operation                  ; operations
     48           #:feature                    ; sort-of operation
     49           #:version                    ; metaphorically sort-of an operation
     50
     51           #:input-files #:output-files #:perform       ; operation methods
     52           #:operation-done-p #:explain
     53
     54           #:component #:source-file
     55           #:c-source-file #:cl-source-file #:java-source-file
     56           #:static-file
     57           #:doc-file
     58           #:html-file
     59           #:text-file
     60           #:source-file-type
     61           #:module                     ; components
     62           #:system
     63           #:unix-dso
     64
     65           #:module-components          ; component accessors
     66           #:component-pathname
     67           #:component-relative-pathname
     68           #:component-name
     69           #:component-version
     70           #:component-parent
     71           #:component-property
     72           #:component-system
     73
     74           #:component-depends-on
     75
     76           #:system-description
     77           #:system-long-description
     78           #:system-author
     79           #:system-maintainer
     80           #:system-license
     81           #:system-licence
     82           #:system-source-file
     83           #:system-relative-pathname
     84
     85           #:operation-on-warnings
     86           #:operation-on-failure
     87
     88           ;#:*component-parent-pathname*
     89           #:*system-definition-search-functions*
     90           #:*central-registry*         ; variables
     91           #:*compile-file-warnings-behaviour*
     92           #:*compile-file-failure-behaviour*
     93           #:*asdf-revision*
     94
     95           #:operation-error #:compile-failed #:compile-warned #:compile-error
     96           #:error-component #:error-operation
     97           #:system-definition-error
     98           #:missing-component
     99           #:missing-dependency
     100           #:circular-dependency        ; errors
     101           #:duplicate-names
     102
     103           #:retry
     104           #:accept                     ; restarts
     105
     106           #:preference-file-for-system/operation
     107           #:load-preferences
     108           )
     109  (:use :cl))
     110
     111
     112#+nil
     113(error "The author of this file habitually uses #+nil to comment out ~
     114        forms. But don't worry, it was unlikely to work in the New ~
     115        Implementation of Lisp anyway")
     116
     117(in-package #:asdf)
     118
     119(defvar *asdf-revision* (let* ((v "$Revision$")
     120                               (colon (or (position #\: v) -1))
     121                               (dot (position #\. v)))
     122                          (and v colon dot
     123                               (list (parse-integer v :start (1+ colon)
     124                                                      :junk-allowed t)
     125                                     (parse-integer v :start (1+ dot)
     126                                                      :junk-allowed t)))))
     127
     128(defvar *compile-file-warnings-behaviour* :warn)
     129
     130(defvar *compile-file-failure-behaviour* #+sbcl :error #-sbcl :warn)
     131
     132(defvar *verbose-out* nil)
     133
     134(defparameter +asdf-methods+
     135  '(perform explain output-files operation-done-p))
     136
     137;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     138;; utility stuff
     139
     140(defmacro aif (test then &optional else)
     141  `(let ((it ,test)) (if it ,then ,else)))
     142
     143(defun pathname-sans-name+type (pathname)
     144  "Returns a new pathname with same HOST, DEVICE, DIRECTORY as PATHNAME,
     145and NIL NAME and TYPE components"
     146  (make-pathname :name nil :type nil :defaults pathname))
     147
     148(define-modify-macro appendf (&rest args)
     149  append "Append onto list")
     150
     151;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     152;; classes, condiitons
     153
     154(define-condition system-definition-error (error) ()
     155  ;; [this use of :report should be redundant, but unfortunately it's not.
     156  ;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function
     157  ;; over print-object; this is always conditions::%print-condition for
     158  ;; condition objects, which in turn does inheritance of :report options at
     159  ;; run-time.  fortunately, inheritance means we only need this kludge here in
     160  ;; order to fix all conditions that build on it.  -- rgr, 28-Jul-02.]
     161  #+cmu (:report print-object))
     162
     163(define-condition formatted-system-definition-error (system-definition-error)
     164  ((format-control :initarg :format-control :reader format-control)
     165   (format-arguments :initarg :format-arguments :reader format-arguments))
     166  (:report (lambda (c s)
     167             (apply #'format s (format-control c) (format-arguments c)))))
     168
     169(define-condition circular-dependency (system-definition-error)
     170  ((components :initarg :components :reader circular-dependency-components)))
     171
     172(define-condition duplicate-names (system-definition-error)
     173  ((name :initarg :name :reader duplicate-names-name)))
     174
     175(define-condition missing-component (system-definition-error)
     176  ((requires :initform "(unnamed)" :reader missing-requires :initarg :requires)
     177   (version :initform nil :reader missing-version :initarg :version)
     178   (parent :initform nil :reader missing-parent :initarg :parent)))
     179
     180(define-condition missing-dependency (missing-component)
     181  ((required-by :initarg :required-by :reader missing-required-by)))
     182
     183(define-condition operation-error (error)
     184  ((component :reader error-component :initarg :component)
     185   (operation :reader error-operation :initarg :operation))
     186  (:report (lambda (c s)
     187             (format s "~@<erred while invoking ~A on ~A~@:>"
     188                     (error-operation c) (error-component c)))))
     189(define-condition compile-error (operation-error) ())
     190(define-condition compile-failed (compile-error) ())
     191(define-condition compile-warned (compile-error) ())
     192
     193(defclass component ()
     194  ((name :accessor component-name :initarg :name :documentation
     195         "Component name: designator for a string composed of portable pathname characters")
     196   (version :accessor component-version :initarg :version)
     197   (in-order-to :initform nil :initarg :in-order-to)
     198   ;; XXX crap name
     199   (do-first :initform nil :initarg :do-first)
     200   ;; methods defined using the "inline" style inside a defsystem form:
     201   ;; need to store them somewhere so we can delete them when the system
     202   ;; is re-evaluated
     203   (inline-methods :accessor component-inline-methods :initform nil)
     204   (parent :initarg :parent :initform nil :reader component-parent)
     205   ;; no direct accessor for pathname, we do this as a method to allow
     206   ;; it to default in funky ways if not supplied
     207   (relative-pathname :initarg :pathname)
     208   (operation-times :initform (make-hash-table )
     209                    :accessor component-operation-times)
     210   ;; XXX we should provide some atomic interface for updating the
     211   ;; component properties
     212   (properties :accessor component-properties :initarg :properties
     213               :initform nil)))
     214
     215;;;; methods: conditions
     216
     217(defmethod print-object ((c missing-dependency) s)
     218  (format s "~@<~A, required by ~A~@:>"
     219          (call-next-method c nil) (missing-required-by c)))
     220
     221(defun sysdef-error (format &rest arguments)
     222  (error 'formatted-system-definition-error :format-control format :format-arguments arguments))
     223
     224;;;; methods: components
     225
     226(defmethod print-object ((c missing-component) s)
     227  (format s "~@<component ~S not found~
     228             ~@[ or does not match version ~A~]~
     229             ~@[ in ~A~]~@:>"
     230          (missing-requires c)
     231          (missing-version c)
     232          (when (missing-parent c)
     233            (component-name (missing-parent c)))))
     234
     235(defgeneric component-system (component)
     236  (:documentation "Find the top-level system containing COMPONENT"))
     237
     238(defmethod component-system ((component component))
     239  (aif (component-parent component)
     240       (component-system it)
     241       component))
     242
     243(defmethod print-object ((c component) stream)
     244  (print-unreadable-object (c stream :type t :identity t)
     245    (ignore-errors
     246      (prin1 (component-name c) stream))))
     247
     248(defclass module (component)
     249  ((components :initform nil :accessor module-components :initarg :components)
     250   ;; what to do if we can't satisfy a dependency of one of this module's
     251   ;; components.  This allows a limited form of conditional processing
     252   (if-component-dep-fails :initform :fail
     253                           :accessor module-if-component-dep-fails
     254                           :initarg :if-component-dep-fails)
     255   (default-component-class :accessor module-default-component-class
     256     :initform 'cl-source-file :initarg :default-component-class)))
     257
     258(defgeneric component-pathname (component)
     259  (:documentation "Extracts the pathname applicable for a particular component."))
     260
     261(defun component-parent-pathname (component)
     262  (aif (component-parent component)
     263       (component-pathname it)
     264       *default-pathname-defaults*))
     265
     266(defgeneric component-relative-pathname (component)
     267  (:documentation "Extracts the relative pathname applicable for a particular component."))
     268
     269(defmethod component-relative-pathname ((component module))
     270  (or (slot-value component 'relative-pathname)
     271      (make-pathname
     272       :directory `(:relative ,(component-name component))
     273       :host (pathname-host (component-parent-pathname component)))))
     274
     275(defmethod component-pathname ((component component))
     276  (let ((*default-pathname-defaults* (component-parent-pathname component)))
     277    (merge-pathnames (component-relative-pathname component))))
     278
     279(defgeneric component-property (component property))
     280
     281(defmethod component-property ((c component) property)
     282  (cdr (assoc property (slot-value c 'properties) :test #'equal)))
     283
     284(defgeneric (setf component-property) (new-value component property))
     285
     286(defmethod (setf component-property) (new-value (c component) property)
     287  (let ((a (assoc property (slot-value c 'properties) :test #'equal)))
     288    (if a
     289        (setf (cdr a) new-value)
     290        (setf (slot-value c 'properties)
     291              (acons property new-value (slot-value c 'properties))))))
     292
     293(defclass system (module)
     294  ((description :accessor system-description :initarg :description)
     295   (long-description
     296    :accessor system-long-description :initarg :long-description)
     297   (author :accessor system-author :initarg :author)
     298   (maintainer :accessor system-maintainer :initarg :maintainer)
     299   (licence :accessor system-licence :initarg :licence
     300            :accessor system-license :initarg :license)))
     301
     302;;; version-satisfies
     303
     304;;; with apologies to christophe rhodes ...
     305(defun split (string &optional max (ws '(#\Space #\Tab)))
     306  (flet ((is-ws (char) (find char ws)))
     307    (nreverse
     308     (let ((list nil) (start 0) (words 0) end)
     309       (loop
     310         (when (and max (>= words (1- max)))
     311           (return (cons (subseq string start) list)))
     312         (setf end (position-if #'is-ws string :start start))
     313         (push (subseq string start end) list)
     314         (incf words)
     315         (unless end (return list))
     316         (setf start (1+ end)))))))
     317
     318(defgeneric version-satisfies (component version))
     319
     320(defmethod version-satisfies ((c component) version)
     321  (unless (and version (slot-boundp c 'version))
     322    (return-from version-satisfies t))
     323  (let ((x (mapcar #'parse-integer
     324                   (split (component-version c) nil '(#\.))))
     325        (y (mapcar #'parse-integer
     326                   (split version nil '(#\.)))))
     327    (labels ((bigger (x y)
     328               (cond ((not y) t)
     329                     ((not x) nil)
     330                     ((> (car x) (car y)) t)
     331                     ((= (car x) (car y))
     332                      (bigger (cdr x) (cdr y))))))
     333      (and (= (car x) (car y))
     334           (or (not (cdr y)) (bigger (cdr x) (cdr y)))))))
     335
     336;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     337;;; finding systems
     338
     339(defvar *defined-systems* (make-hash-table :test 'equal))
     340(defun coerce-name (name)
     341  (typecase name
     342    (component (component-name name))
     343    (symbol (string-downcase (symbol-name name)))
     344    (string name)
     345    (t (sysdef-error "~@<invalid component designator ~A~@:>" name))))
     346
     347;;; for the sake of keeping things reasonably neat, we adopt a
     348;;; convention that functions in this list are prefixed SYSDEF-
     349
     350(defvar *system-definition-search-functions*
     351  '(sysdef-central-registry-search))
     352
     353(defun system-definition-pathname (system)
     354  (some (lambda (x) (funcall x system))
     355        *system-definition-search-functions*))
     356
     357(defvar *central-registry*
     358  '(*default-pathname-defaults*
     359    #+nil "/home/dan/src/sourceforge/cclan/asdf/systems/"
     360    #+nil "telent:asdf;systems;"))
     361
     362(defun sysdef-central-registry-search (system)
     363  (let ((name (coerce-name system)))
     364    (block nil
     365      (dolist (dir *central-registry*)
     366        (let* ((defaults (eval dir))
     367               (file (and defaults
     368                          (make-pathname
     369                           :defaults defaults :version :newest
     370                           :name name :type "asd" :case :local))))
     371          (if (and file (probe-file file))
     372              (return file)))))))
     373
     374(defun make-temporary-package ()
     375  (flet ((try (counter)
     376           (ignore-errors
     377             (make-package (format nil "ASDF~D" counter)
     378                           :use '(:cl :asdf)))))
     379    (do* ((counter 0 (+ counter 1))
     380          (package (try counter) (try counter)))
     381         (package package))))
     382
     383(defun find-system (name &optional (error-p t))
     384  (let* ((name (coerce-name name))
     385         (in-memory (gethash name *defined-systems*))
     386         (on-disk (system-definition-pathname name)))
     387    (when (and on-disk
     388               (or (not in-memory)
     389                   (< (car in-memory) (file-write-date on-disk))))
     390      (let ((package (make-temporary-package)))
     391        (unwind-protect
     392             (let ((*package* package))
     393               (format
     394                *verbose-out*
     395                "~&~@<; ~@;loading system definition from ~A into ~A~@:>~%"
     396                ;; FIXME: This wants to be (ENOUGH-NAMESTRING
     397                ;; ON-DISK), but CMUCL barfs on that.
     398                on-disk
     399                *package*)
     400               (load on-disk))
     401          (delete-package package))))
     402    (let ((in-memory (gethash name *defined-systems*)))
     403      (if in-memory
     404          (progn (if on-disk (setf (car in-memory) (file-write-date on-disk)))
     405                 (cdr in-memory))
     406          (if error-p (error 'missing-component :requires name))))))
     407
     408(defun register-system (name system)
     409  (format *verbose-out* "~&~@<; ~@;registering ~A as ~A~@:>~%" system name)
     410  (setf (gethash (coerce-name  name) *defined-systems*)
     411        (cons (get-universal-time) system)))
     412
     413(defun system-registered-p (name)
     414  (gethash (coerce-name name) *defined-systems*))
     415
     416;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     417;;; finding components
     418
     419(defgeneric find-component (module name &optional version)
     420  (:documentation "Finds the component with name NAME present in the
     421MODULE module; if MODULE is nil, then the component is assumed to be a
     422system."))
     423
     424(defmethod find-component ((module module) name &optional version)
     425  (if (slot-boundp module 'components)
     426      (let ((m (find name (module-components module)
     427                     :test #'equal :key #'component-name)))
     428        (if (and m (version-satisfies m version)) m))))
     429
     430
     431;;; a component with no parent is a system
     432(defmethod find-component ((module (eql nil)) name &optional version)
     433  (let ((m (find-system name nil)))
     434    (if (and m (version-satisfies m version)) m)))
     435
     436;;; component subclasses
     437
     438(defclass source-file (component) ())
     439
     440(defclass cl-source-file (source-file) ())
     441(defclass c-source-file (source-file) ())
     442(defclass java-source-file (source-file) ())
     443(defclass static-file (source-file) ())
     444(defclass doc-file (static-file) ())
     445(defclass html-file (doc-file) ())
     446
     447(defgeneric source-file-type (component system))
     448(defmethod source-file-type ((c cl-source-file) (s module)) "lisp")
     449(defmethod source-file-type ((c c-source-file) (s module)) "c")
     450(defmethod source-file-type ((c java-source-file) (s module)) "java")
     451(defmethod source-file-type ((c html-file) (s module)) "html")
     452(defmethod source-file-type ((c static-file) (s module)) nil)
     453
     454(defmethod component-relative-pathname ((component source-file))
     455  (let ((relative-pathname (slot-value component 'relative-pathname)))
     456    (if relative-pathname
     457        (merge-pathnames
     458         relative-pathname
     459         (make-pathname
     460          :type (source-file-type component (component-system component))))
     461        (let* ((*default-pathname-defaults*
     462                (component-parent-pathname component))
     463               (name-type
     464                (make-pathname
     465                 :name (component-name component)
     466                 :type (source-file-type component
     467                                         (component-system component)))))
     468          name-type))))
     469
     470;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     471;;; operations
     472
     473;;; one of these is instantiated whenever (operate ) is called
     474
     475(defclass operation ()
     476  ((forced :initform nil :initarg :force :accessor operation-forced)
     477   (original-initargs :initform nil :initarg :original-initargs
     478                      :accessor operation-original-initargs)
     479   (visited-nodes :initform nil :accessor operation-visited-nodes)
     480   (visiting-nodes :initform nil :accessor operation-visiting-nodes)
     481   (parent :initform nil :initarg :parent :accessor operation-parent)))
     482
     483(defmethod print-object ((o operation) stream)
     484  (print-unreadable-object (o stream :type t :identity t)
     485    (ignore-errors
     486      (prin1 (operation-original-initargs o) stream))))
     487
     488(defmethod shared-initialize :after ((operation operation) slot-names
     489                                     &key force
     490                                     &allow-other-keys)
     491  (declare (ignore slot-names force))
     492  ;; empty method to disable initarg validity checking
     493  )
     494
     495(defgeneric perform (operation component))
     496(defgeneric operation-done-p (operation component))
     497(defgeneric explain (operation component))
     498(defgeneric output-files (operation component))
     499(defgeneric input-files (operation component))
     500
     501(defun node-for (o c)
     502  (cons (class-name (class-of o)) c))
     503
     504(defgeneric operation-ancestor (operation)
     505  (:documentation
     506   "Recursively chase the operation's parent pointer until we get to
     507the head of the tree"))
     508
     509(defmethod operation-ancestor ((operation operation))
     510  (aif (operation-parent operation)
     511       (operation-ancestor it)
     512       operation))
     513
     514
     515(defun make-sub-operation (c o dep-c dep-o)
     516  (let* ((args (copy-list (operation-original-initargs o)))
     517         (force-p (getf args :force)))
     518    ;; note explicit comparison with T: any other non-NIL force value
     519    ;; (e.g. :recursive) will pass through
     520    (cond ((and (null (component-parent c))
     521                (null (component-parent dep-c))
     522                (not (eql c dep-c)))
     523           (when (eql force-p t)
     524             (setf (getf args :force) nil))
     525           (apply #'make-instance dep-o
     526                  :parent o
     527                  :original-initargs args args))
     528          ((subtypep (type-of o) dep-o)
     529           o)
     530          (t
     531           (apply #'make-instance dep-o
     532                  :parent o :original-initargs args args)))))
     533
     534
     535(defgeneric visit-component (operation component data))
     536
     537(defmethod visit-component ((o operation) (c component) data)
     538  (unless (component-visited-p o c)
     539    (push (cons (node-for o c) data)
     540          (operation-visited-nodes (operation-ancestor o)))))
     541
     542(defgeneric component-visited-p (operation component))
     543
     544(defmethod component-visited-p ((o operation) (c component))
     545  (assoc (node-for o c)
     546         (operation-visited-nodes (operation-ancestor o))
     547         :test 'equal))
     548
     549(defgeneric (setf visiting-component) (new-value operation component))
     550
     551(defmethod (setf visiting-component) (new-value operation component)
     552  ;; MCL complains about unused lexical variables
     553  (declare (ignorable new-value operation component)))
     554
     555(defmethod (setf visiting-component) (new-value (o operation) (c component))
     556  (let ((node (node-for o c))
     557        (a (operation-ancestor o)))
     558    (if new-value
     559        (pushnew node (operation-visiting-nodes a) :test 'equal)
     560        (setf (operation-visiting-nodes a)
     561              (remove node  (operation-visiting-nodes a) :test 'equal)))))
     562
     563(defgeneric component-visiting-p (operation component))
     564
     565(defmethod component-visiting-p ((o operation) (c component))
     566  (let ((node (cons o c)))
     567    (member node (operation-visiting-nodes (operation-ancestor o))
     568            :test 'equal)))
     569
     570(defgeneric component-depends-on (operation component)
     571  (:documentation
     572   "Returns a list of dependencies needed by the component to perform
     573    the operation.  A dependency has one of the following forms:
     574
     575      (<operation> <component>*), where <operation> is a class
     576        designator and each <component> is a component
     577        designator, which means that the component depends on
     578        <operation> having been performed on each <component>; or
     579
     580      (FEATURE <feature>), which means that the component depends
     581        on <feature>'s presence in *FEATURES*.
     582
     583    Methods specialized on subclasses of existing component types
     584    should usually append the results of CALL-NEXT-METHOD to the
     585    list."))
     586
     587(defmethod component-depends-on ((op-spec symbol) (c component))
     588  (component-depends-on (make-instance op-spec) c))
     589
     590(defmethod component-depends-on ((o operation) (c component))
     591  (cdr (assoc (class-name (class-of o))
     592              (slot-value c 'in-order-to))))
     593
     594(defgeneric component-self-dependencies (operation component))
     595
     596(defmethod component-self-dependencies ((o operation) (c component))
     597  (let ((all-deps (component-depends-on o c)))
     598    (remove-if-not (lambda (x)
     599                     (member (component-name c) (cdr x) :test #'string=))
     600                   all-deps)))
     601
     602(defmethod input-files ((operation operation) (c component))
     603  (let ((parent (component-parent c))
     604        (self-deps (component-self-dependencies operation c)))
     605    (if self-deps
     606        (mapcan (lambda (dep)
     607                  (destructuring-bind (op name) dep
     608                    (output-files (make-instance op)
     609                                  (find-component parent name))))
     610                self-deps)
     611        ;; no previous operations needed?  I guess we work with the
     612        ;; original source file, then
     613        (list (component-pathname c)))))
     614
     615(defmethod input-files ((operation operation) (c module)) nil)
     616
     617(defmethod operation-done-p ((o operation) (c component))
     618  (flet ((fwd-or-return-t (file)
     619           ;; if FILE-WRITE-DATE returns NIL, it's possible that the
     620           ;; user or some other agent has deleted an input file.  If
     621           ;; that's the case, well, that's not good, but as long as
     622           ;; the operation is otherwise considered to be done we
     623           ;; could continue and survive.
     624           (let ((date (file-write-date file)))
     625             (cond
     626               (date)
     627               (t
     628                (warn "~@<Missing FILE-WRITE-DATE for ~S: treating ~
     629                       operation ~S on component ~S as done.~@:>"
     630                      file o c)
     631                (return-from operation-done-p t))))))
     632    (let ((out-files (output-files o c))
     633          (in-files (input-files o c)))
     634      (cond ((and (not in-files) (not out-files))
     635             ;; arbitrary decision: an operation that uses nothing to
     636             ;; produce nothing probably isn't doing much
     637             t)
     638            ((not out-files)
     639             (let ((op-done
     640                    (gethash (type-of o)
     641                             (component-operation-times c))))
     642               (and op-done
     643                    (>= op-done
     644                        (apply #'max
     645                               (mapcar #'fwd-or-return-t in-files))))))
     646            ((not in-files) nil)
     647            (t
     648             (and
     649              (every #'probe-file out-files)
     650              (> (apply #'min (mapcar #'file-write-date out-files))
     651                 (apply #'max (mapcar #'fwd-or-return-t in-files)))))))))
     652
     653;;; So you look at this code and think "why isn't it a bunch of
     654;;; methods".  And the answer is, because standard method combination
     655;;; runs :before methods most->least-specific, which is back to front
     656;;; for our purposes.  And CLISP doesn't have non-standard method
     657;;; combinations, so let's keep it simple and aspire to portability
     658
     659(defgeneric traverse (operation component))
     660(defmethod traverse ((operation operation) (c component))
     661  (let ((forced nil))
     662    (labels ((do-one-dep (required-op required-c required-v)
     663               (let* ((dep-c (or (find-component
     664                                  (component-parent c)
     665                                  ;; XXX tacky.  really we should build the
     666                                  ;; in-order-to slot with canonicalized
     667                                  ;; names instead of coercing this late
     668                                  (coerce-name required-c) required-v)
     669                                 (error 'missing-dependency
     670                                        :required-by c
     671                                        :version required-v
     672                                        :requires required-c)))
     673                      (op (make-sub-operation c operation dep-c required-op)))
     674                 (traverse op dep-c)))
     675             (do-dep (op dep)
     676               (cond ((eq op 'feature)
     677                      (or (member (car dep) *features*)
     678                          (error 'missing-dependency
     679                                 :required-by c
     680                                 :requires (car dep)
     681                                 :version nil)))
     682                     (t
     683                      (dolist (d dep)
     684                        (cond ((consp d)
     685                               (assert (string-equal
     686                                        (symbol-name (first d))
     687                                        "VERSION"))
     688                               (appendf forced
     689                                        (do-one-dep op (second d) (third d))))
     690                              (t
     691                               (appendf forced (do-one-dep op d nil)))))))))
     692      (aif (component-visited-p operation c)
     693           (return-from traverse
     694             (if (cdr it) (list (cons 'pruned-op c)) nil)))
     695      ;; dependencies
     696      (if (component-visiting-p operation c)
     697          (error 'circular-dependency :components (list c)))
     698      (setf (visiting-component operation c) t)
     699      (loop for (required-op . deps) in (component-depends-on operation c)
     700            do (do-dep required-op deps))
     701      ;; constituent bits
     702      (let ((module-ops
     703             (when (typep c 'module)
     704               (let ((at-least-one nil)
     705                     (forced nil)
     706                     (error nil))
     707                 (loop for kid in (module-components c)
     708                       do (handler-case
     709                              (appendf forced (traverse operation kid ))
     710                            (missing-dependency (condition)
     711                              (if (eq (module-if-component-dep-fails c) :fail)
     712                                  (error condition))
     713                              (setf error condition))
     714                            (:no-error (c)
     715                              (declare (ignore c))
     716                              (setf at-least-one t))))
     717                 (when (and (eq (module-if-component-dep-fails c) :try-next)
     718                            (not at-least-one))
     719                   (error error))
     720                 forced))))
     721        ;; now the thing itself
     722        (when (or forced module-ops
     723                  (not (operation-done-p operation c))
     724                  (let ((f (operation-forced (operation-ancestor operation))))
     725                    (and f (or (not (consp f))
     726                               (member (component-name
     727                                        (operation-ancestor operation))
     728                                       (mapcar #'coerce-name f)
     729                                       :test #'string=)))))
     730          (let ((do-first (cdr (assoc (class-name (class-of operation))
     731                                      (slot-value c 'do-first)))))
     732            (loop for (required-op . deps) in do-first
     733                  do (do-dep required-op deps)))
     734          (setf forced (append (delete 'pruned-op forced :key #'car)
     735                               (delete 'pruned-op module-ops :key #'car)
     736                               (list (cons operation c))))))
     737      (setf (visiting-component operation c) nil)
     738      (visit-component operation c (and forced t))
     739      forced)))
     740
     741
     742(defmethod perform ((operation operation) (c source-file))
     743  (sysdef-error
     744   "~@<required method PERFORM not implemented ~
     745    for operation ~A, component ~A~@:>"
     746   (class-of operation) (class-of c)))
     747
     748(defmethod perform ((operation operation) (c module))
     749  nil)
     750
     751(defmethod explain ((operation operation) (component component))
     752  (format *verbose-out* "~&;;; ~A on ~A~%" operation component))
     753
     754;;; compile-op
     755
     756(defclass compile-op (operation)
     757  ((proclamations :initarg :proclamations :accessor compile-op-proclamations :initform nil)
     758   (on-warnings :initarg :on-warnings :accessor operation-on-warnings
     759                :initform *compile-file-warnings-behaviour*)
     760   (on-failure :initarg :on-failure :accessor operation-on-failure
     761               :initform *compile-file-failure-behaviour*)))
     762
     763(defmethod perform :before ((operation compile-op) (c source-file))
     764  (map nil #'ensure-directories-exist (output-files operation c)))
     765
     766(defmethod perform :after ((operation operation) (c component))
     767  (setf (gethash (type-of operation) (component-operation-times c))
     768        (get-universal-time))
     769  (load-preferences c operation))
     770
     771;;; perform is required to check output-files to find out where to put
     772;;; its answers, in case it has been overridden for site policy
     773(defmethod perform ((operation compile-op) (c cl-source-file))
     774  #-:broken-fasl-loader
     775  (let ((source-file (component-pathname c))
     776        (output-file (car (output-files operation c))))
     777    (multiple-value-bind (output warnings-p failure-p)
     778        (compile-file source-file :output-file output-file)
     779      (when warnings-p
     780        (case (operation-on-warnings operation)
     781          (:warn (warn
     782                  "~@<COMPILE-FILE warned while performing ~A on ~A.~@:>"
     783                  operation c))
     784          (:error (error 'compile-warned :component c :operation operation))
     785          (:ignore nil)))
     786      (when failure-p
     787        (case (operation-on-failure operation)
     788          (:warn (warn
     789                  "~@<COMPILE-FILE failed while performing ~A on ~A.~@:>"
     790                  operation c))
     791          (:error (error 'compile-failed :component c :operation operation))
     792          (:ignore nil)))
     793      (unless output
     794        (error 'compile-error :component c :operation operation)))))
     795
     796(defmethod output-files ((operation compile-op) (c cl-source-file))
     797  #-:broken-fasl-loader (list (compile-file-pathname (component-pathname c)))
     798  #+:broken-fasl-loader (list (component-pathname c)))
     799
     800(defmethod perform ((operation compile-op) (c static-file))
     801  nil)
     802
     803(defmethod output-files ((operation compile-op) (c static-file))
     804  nil)
     805
     806(defmethod input-files ((op compile-op) (c static-file))
     807  nil)
     808
     809
     810;;; load-op
     811
     812(defclass basic-load-op (operation) ())
     813
     814(defclass load-op (basic-load-op) ())
     815
     816(defmethod perform ((o load-op) (c cl-source-file))
     817  (mapcar #'load (input-files o c)))
     818
     819(defmethod perform ((operation load-op) (c static-file))
     820  nil)
     821(defmethod operation-done-p ((operation load-op) (c static-file))
     822  t)
     823
     824(defmethod output-files ((o operation) (c component))
     825  nil)
     826
     827(defmethod component-depends-on ((operation load-op) (c component))
     828  (cons (list 'compile-op (component-name c))
     829        (call-next-method)))
     830
     831;;; load-source-op
     832
     833(defclass load-source-op (basic-load-op) ())
     834
     835(defmethod perform ((o load-source-op) (c cl-source-file))
     836  (let ((source (component-pathname c)))
     837    (setf (component-property c 'last-loaded-as-source)
     838          (and (load source)
     839               (get-universal-time)))))
     840
     841(defmethod perform ((operation load-source-op) (c static-file))
     842  nil)
     843
     844(defmethod output-files ((operation load-source-op) (c component))
     845  nil)
     846
     847;;; FIXME: we simply copy load-op's dependencies.  this is Just Not Right.
     848(defmethod component-depends-on ((o load-source-op) (c component))
     849  (let ((what-would-load-op-do (cdr (assoc 'load-op
     850                                           (slot-value c 'in-order-to)))))
     851    (mapcar (lambda (dep)
     852              (if (eq (car dep) 'load-op)
     853                  (cons 'load-source-op (cdr dep))
     854                  dep))
     855            what-would-load-op-do)))
     856
     857(defmethod operation-done-p ((o load-source-op) (c source-file))
     858  (if (or (not (component-property c 'last-loaded-as-source))
     859          (> (file-write-date (component-pathname c))
     860             (component-property c 'last-loaded-as-source)))
     861      nil t))
     862
     863(defclass test-op (operation) ())
     864
     865(defmethod perform ((operation test-op) (c component))
     866  nil)
     867
     868(defgeneric load-preferences (system operation)
     869  (:documentation
     870   "Called to load system preferences after <perform operation
     871system>. Typical uses are to set parameters that don't exist until
     872after the system has been loaded."))
     873
     874(defgeneric preference-file-for-system/operation (system operation)
     875  (:documentation
     876   "Returns the pathname of the preference file for this system.
     877Called by 'load-preferences to determine what file to load."))
     878
     879(defmethod load-preferences ((s t) (operation t))
     880  ;; do nothing
     881  (values))
     882
     883(defmethod load-preferences ((s system) (operation basic-load-op))
     884  (let* ((*package* (find-package :common-lisp))
     885         (file (probe-file (preference-file-for-system/operation s operation))))
     886    (when file
     887      (when *verbose-out*
     888        (format *verbose-out*
     889                "~&~@<; ~@;loading preferences for ~A/~(~A~) from ~A~@:>~%"
     890                (component-name s)
     891                (type-of operation) file))
     892      (load file))))
     893
     894(defmethod preference-file-for-system/operation ((system t) (operation t))
     895  ;; cope with anything other than systems
     896  (preference-file-for-system/operation (find-system system t) operation))
     897
     898(defmethod preference-file-for-system/operation ((s system) (operation t))
     899  (let ((*default-pathname-defaults*
     900         (make-pathname :name nil :type nil
     901                        :defaults *default-pathname-defaults*)))
     902     (merge-pathnames
     903      (make-pathname :name (component-name s)
     904                     :type "lisp"
     905                     :directory '(:relative ".asdf"))
     906      (truename (user-homedir-pathname)))))
     907
     908;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     909;;; invoking operations
     910
     911(defvar *operate-docstring*
     912  "Operate does three things:
     913
     9141. It creates an instance of `operation-class` using any keyword parameters
     915as initargs.
     9162. It finds the  asdf-system specified by `system` (possibly loading
     917it from disk).
     9183. It then calls `traverse` with the operation and system as arguments
     919
     920The traverse operation is wrapped in `with-compilation-unit` and error
     921handling code. If a `version` argument is supplied, then operate also
     922ensures that the system found satisfies it using the `version-satisfies`
     923method.")
     924
     925(defun operate (operation-class system &rest args &key (verbose t) version
     926                &allow-other-keys)
     927  (let* ((op (apply #'make-instance operation-class
     928                    :original-initargs args
     929                    args))
     930         (*verbose-out* (if verbose *standard-output* (make-broadcast-stream)))
     931         (system (if (typep system 'component) system (find-system system))))
     932    (unless (version-satisfies system version)
     933      (error 'missing-component :requires system :version version))
     934    (let ((steps (traverse op system)))
     935      (with-compilation-unit ()
     936        (loop for (op . component) in steps do
     937                 (loop
     938                   (restart-case
     939                       (progn (perform op component)
     940                              (return))
     941                     (retry ()
     942                       :report
     943                       (lambda (s)
     944                         (format s "~@<Retry performing ~S on ~S.~@:>"
     945                                 op component)))
     946                     (accept ()
     947                       :report
     948                       (lambda (s)
     949                         (format s "~@<Continue, treating ~S on ~S as ~
     950                                   having been successful.~@:>"
     951                                 op component))
     952                       (setf (gethash (type-of op)
     953                                      (component-operation-times component))
     954                             (get-universal-time))
     955                       (return)))))))))
     956
     957(setf (documentation 'operate 'function)
     958      *operate-docstring*)
     959
     960(defun oos (operation-class system &rest args &key force (verbose t) version)
     961  (declare (ignore force verbose version))
     962  (apply #'operate operation-class system args))
     963
     964(setf (documentation 'oos 'function)
     965      (format nil
     966              "Short for _operate on system_ and an alias for the `operate` function. ~&~&~a"
     967              *operate-docstring*))
     968
     969;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
     970;;; syntax
     971
     972(defun remove-keyword (key arglist)
     973  (labels ((aux (key arglist)
     974             (cond ((null arglist) nil)
     975                   ((eq key (car arglist)) (cddr arglist))
     976                   (t (cons (car arglist) (cons (cadr arglist)
     977                                                (remove-keyword
     978                                                 key (cddr arglist))))))))
     979    (aux key arglist)))
     980
     981(defmacro defsystem (name &body options)
     982  (destructuring-bind (&key (pathname nil pathname-arg-p) (class 'system)
     983                            &allow-other-keys)
     984      options
     985    (let ((component-options (remove-keyword :class options)))
     986      `(progn
     987         ;; system must be registered before we parse the body, otherwise
     988         ;; we recur when trying to find an existing system of the same name
     989         ;; to reuse options (e.g. pathname) from
     990         (let ((s (system-registered-p ',name)))
     991           (cond ((and s (eq (type-of (cdr s)) ',class))
     992                  (setf (car s) (get-universal-time)))
     993                 (s
     994                  #+clisp
     995                  (sysdef-error "Cannot redefine the existing system ~A with a different class" s)
     996                  #-clisp
     997                  (change-class (cdr s) ',class))
     998                 (t
     999                  (register-system (quote ,name)
     1000                                   (make-instance ',class :name ',name)))))
     1001         (parse-component-form nil (apply
     1002                                    #'list
     1003                                    :module (coerce-name ',name)
     1004                                    :pathname
     1005                                    ;; to avoid a note about unreachable code
     1006                                    ,(if pathname-arg-p
     1007                                         pathname
     1008                                         `(or (when *load-truename*
     1009                                                (pathname-sans-name+type
     1010                                                 (resolve-symlinks
     1011                                                  *load-truename*)))
     1012                                              *default-pathname-defaults*))
     1013                                    ',component-options))))))
     1014
     1015
     1016(defun class-for-type (parent type)
     1017  (let* ((extra-symbols (list (find-symbol (symbol-name type) *package*)
     1018                              (find-symbol (symbol-name type)
     1019                                           (load-time-value
     1020                                            (package-name :asdf)))))
     1021         (class (dolist (symbol (if (keywordp type)
     1022                                    extra-symbols
     1023                                    (cons type extra-symbols)))
     1024                  (when (and symbol
     1025                             (find-class symbol nil)
     1026                             (subtypep symbol 'component))
     1027                    (return (find-class symbol))))))
     1028    (or class
     1029        (and (eq type :file)
     1030             (or (module-default-component-class parent)
     1031                 (find-class 'cl-source-file)))
     1032        (sysdef-error "~@<don't recognize component type ~A~@:>" type))))
     1033
     1034(defun maybe-add-tree (tree op1 op2 c)
     1035  "Add the node C at /OP1/OP2 in TREE, unless it's there already.
     1036Returns the new tree (which probably shares structure with the old one)"
     1037  (let ((first-op-tree (assoc op1 tree)))
     1038    (if first-op-tree
     1039        (progn
     1040          (aif (assoc op2 (cdr first-op-tree))
     1041               (if (find c (cdr it))
     1042                   nil
     1043                   (setf (cdr it) (cons c (cdr it))))
     1044               (setf (cdr first-op-tree)
     1045                     (acons op2 (list c) (cdr first-op-tree))))
     1046          tree)
     1047        (acons op1 (list (list op2 c)) tree))))
     1048
     1049(defun union-of-dependencies (&rest deps)
     1050  (let ((new-tree nil))
     1051    (dolist (dep deps)
     1052      (dolist (op-tree dep)
     1053        (dolist (op  (cdr op-tree))
     1054          (dolist (c (cdr op))
     1055            (setf new-tree
     1056                  (maybe-add-tree new-tree (car op-tree) (car op) c))))))
     1057    new-tree))
     1058
     1059
     1060(defun remove-keys (key-names args)
     1061  (loop for ( name val ) on args by #'cddr
     1062        unless (member (symbol-name name) key-names
     1063                       :key #'symbol-name :test 'equal)
     1064        append (list name val)))
     1065
     1066(defvar *serial-depends-on*)
     1067
     1068(defun parse-component-form (parent options)
     1069
     1070  (destructuring-bind
     1071        (type name &rest rest &key
     1072              ;; the following list of keywords is reproduced below in the
     1073              ;; remove-keys form.  important to keep them in sync
     1074              components pathname default-component-class
     1075              perform explain output-files operation-done-p
     1076              weakly-depends-on
     1077              depends-on serial in-order-to
     1078              ;; list ends
     1079              &allow-other-keys) options
     1080    (declare (ignorable perform explain output-files operation-done-p))
     1081    (check-component-input type name weakly-depends-on depends-on components in-order-to)
     1082
     1083    (when (and parent
     1084               (find-component parent name)
     1085               ;; ignore the same object when rereading the defsystem
     1086               (not
     1087                (typep (find-component parent name)
     1088                       (class-for-type parent type))))
     1089      (error 'duplicate-names :name name))
     1090
     1091    (let* ((other-args (remove-keys
     1092                        '(components pathname default-component-class
     1093                          perform explain output-files operation-done-p
     1094                          weakly-depends-on
     1095                          depends-on serial in-order-to)
     1096                        rest))
     1097           (ret
     1098            (or (find-component parent name)
     1099                (make-instance (class-for-type parent type)))))
     1100      (when weakly-depends-on
     1101        (setf depends-on (append depends-on (remove-if (complement #'find-system) weakly-depends-on))))
     1102      (when (boundp '*serial-depends-on*)
     1103        (setf depends-on
     1104              (concatenate 'list *serial-depends-on* depends-on)))
     1105      (apply #'reinitialize-instance ret
     1106             :name (coerce-name name)
     1107             :pathname pathname
     1108             :parent parent
     1109             other-args)
     1110      (when (typep ret 'module)
     1111        (setf (module-default-component-class ret)
     1112              (or default-component-class
     1113                  (and (typep parent 'module)
     1114                       (module-default-component-class parent))))
     1115        (let ((*serial-depends-on* nil))
     1116          (setf (module-components ret)
     1117                (loop for c-form in components
     1118                      for c = (parse-component-form ret c-form)
     1119                      collect c
     1120                      if serial
     1121                      do (push (component-name c) *serial-depends-on*))))
     1122
     1123        ;; check for duplicate names
     1124        (let ((name-hash (make-hash-table :test #'equal)))
     1125          (loop for c in (module-components ret)
     1126                do
     1127                (if (gethash (component-name c)
     1128                             name-hash)
     1129                    (error 'duplicate-names
     1130                           :name (component-name c))
     1131                    (setf (gethash (component-name c)
     1132                                   name-hash)
     1133                          t)))))
     1134
     1135      (setf (slot-value ret 'in-order-to)
     1136            (union-of-dependencies
     1137             in-order-to
     1138             `((compile-op (compile-op ,@depends-on))
     1139               (load-op (load-op ,@depends-on))))
     1140            (slot-value ret 'do-first) `((compile-op (load-op ,@depends-on))))
     1141
     1142      (%remove-component-inline-methods ret rest)
     1143
     1144      ret)))
     1145
     1146(defun %remove-component-inline-methods (ret rest)
     1147  (loop for name in +asdf-methods+
     1148        do (map 'nil
     1149                ;; this is inefficient as most of the stored
     1150                ;; methods will not be for this particular gf n
     1151                ;; But this is hardly performance-critical
     1152                (lambda (m)
     1153                  (remove-method (symbol-function name) m))
     1154                (component-inline-methods ret)))
     1155  ;; clear methods, then add the new ones
     1156  (setf (component-inline-methods ret) nil)
     1157  (loop for name in +asdf-methods+
     1158        for v = (getf rest (intern (symbol-name name) :keyword))
     1159        when v do
     1160        (destructuring-bind (op qual (o c) &body body) v
     1161          (pushnew
     1162           (eval `(defmethod ,name ,qual ((,o ,op) (,c (eql ,ret)))
     1163                             ,@body))
     1164           (component-inline-methods ret)))))
     1165
     1166(defun check-component-input (type name weakly-depends-on depends-on components in-order-to)
     1167  "A partial test of the values of a component."
     1168  (when weakly-depends-on (warn "We got one! XXXXX"))
     1169  (unless (listp depends-on)
     1170    (sysdef-error-component ":depends-on must be a list."
     1171                            type name depends-on))
     1172  (unless (listp weakly-depends-on)
     1173    (sysdef-error-component ":weakly-depends-on must be a list."
     1174                            type name weakly-depends-on))
     1175  (unless (listp components)
     1176    (sysdef-error-component ":components must be NIL or a list of components."
     1177                            type name components))
     1178  (unless (and (listp in-order-to) (listp (car in-order-to)))
     1179    (sysdef-error-component ":in-order-to must be NIL or a list of components."
     1180                            type name in-order-to)))
     1181
     1182(defun sysdef-error-component (msg type name value)
     1183  (sysdef-error (concatenate 'string msg
     1184                             "~&The value specified for ~(~A~) ~A is ~W")
     1185                type name value))
     1186
     1187(defun resolve-symlinks (path)
     1188  #-allegro (truename path)
     1189  #+allegro (excl:pathname-resolve-symbolic-links path)
     1190  )
     1191
     1192;;; optional extras
     1193
     1194;;; run-shell-command functions for other lisp implementations will be
     1195;;; gratefully accepted, if they do the same thing.  If the docstring
     1196;;; is ambiguous, send a bug report
     1197
     1198(defun run-shell-command (control-string &rest args)
     1199  "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and
     1200synchronously execute the result using a Bourne-compatible shell, with
     1201output to *VERBOSE-OUT*.  Returns the shell's exit code."
     1202  (let ((command (apply #'format nil control-string args)))
     1203    (format *verbose-out* "; $ ~A~%" command)
     1204    #+sbcl
     1205    (sb-ext:process-exit-code
     1206     (sb-ext:run-program
     1207      #+win32 "sh" #-win32 "/bin/sh"
     1208      (list  "-c" command)
     1209      #+win32 #+win32 :search t
     1210      :input nil :output *verbose-out*))
     1211
     1212    #+(or cmu scl)
     1213    (ext:process-exit-code
     1214     (ext:run-program
     1215      "/bin/sh"
     1216      (list  "-c" command)
     1217      :input nil :output *verbose-out*))
     1218
     1219    #+allegro
     1220    (excl:run-shell-command command :input nil :output *verbose-out*)
     1221
     1222    #+lispworks
     1223    (system:call-system-showing-output
     1224     command
     1225     :shell-type "/bin/sh"
     1226     :output-stream *verbose-out*)
     1227
     1228    #+clisp                     ;XXX not exactly *verbose-out*, I know
     1229    (ext:run-shell-command  command :output :terminal :wait t)
     1230
     1231    #+openmcl
     1232    (nth-value 1
     1233               (ccl:external-process-status
     1234                (ccl:run-program "/bin/sh" (list "-c" command)
     1235                                 :input nil :output *verbose-out*
     1236                                 :wait t)))
     1237    #+ecl ;; courtesy of Juan Jose Garcia Ripoll
     1238    (si:system command)
     1239    #-(or openmcl clisp lispworks allegro scl cmu sbcl ecl)
     1240    (error "RUN-SHELL-PROGRAM not implemented for this Lisp")
     1241    ))
     1242
     1243
     1244(defgeneric hyperdocumentation (package name doc-type))
     1245(defmethod hyperdocumentation ((package symbol) name doc-type)
     1246  (hyperdocumentation (find-package package) name doc-type))
     1247
     1248(defun hyperdoc (name doc-type)
     1249  (hyperdocumentation (symbol-package name) name doc-type))
     1250
     1251(defun system-source-file (system-name)
     1252  (let ((system (asdf:find-system system-name)))
     1253    (make-pathname
     1254     :type "asd"
     1255     :name (asdf:component-name system)
     1256     :defaults (asdf:component-relative-pathname system))))
     1257
     1258(defun system-source-directory (system-name)
     1259  (make-pathname :name nil
     1260                 :type nil
     1261                 :defaults (system-source-file system-name)))
     1262
     1263(defun system-relative-pathname (system pathname &key name type)
     1264  (let ((directory (pathname-directory pathname)))
     1265    (when (eq (car directory) :absolute)
     1266      (setf (car directory) :relative))
     1267    (merge-pathnames
     1268     (make-pathname :name (or name (pathname-name pathname))
     1269                    :type (or type (pathname-type pathname))
     1270                    :directory directory)
     1271     (system-source-directory system))))
     1272
     1273
     1274(pushnew :asdf *features*)
     1275
     1276#+sbcl
     1277(eval-when (:compile-toplevel :load-toplevel :execute)
     1278  (when (sb-ext:posix-getenv "SBCL_BUILDING_CONTRIB")
     1279    (pushnew :sbcl-hooks-require *features*)))
     1280
     1281#+(and sbcl sbcl-hooks-require)
     1282(progn
     1283  (defun module-provide-asdf (name)
     1284    (handler-bind ((style-warning #'muffle-warning))
     1285      (let* ((*verbose-out* (make-broadcast-stream))
     1286             (system (asdf:find-system name nil)))
     1287        (when system
     1288          (asdf:operate 'asdf:load-op name)
     1289          t))))
     1290
     1291  (defun contrib-sysdef-search (system)
     1292    (let ((home (sb-ext:posix-getenv "SBCL_HOME")))
     1293      (when (and home (not (string= home "")))
     1294        (let* ((name (coerce-name system))
     1295               (home (truename home))
     1296               (contrib (merge-pathnames
     1297                         (make-pathname :directory `(:relative ,name)
     1298                                        :name name
     1299                                        :type "asd"
     1300                                        :case :local
     1301                                        :version :newest)
     1302                         home)))
     1303          (probe-file contrib)))))
     1304
     1305  (pushnew
     1306   '(let ((home (sb-ext:posix-getenv "SBCL_HOME")))
     1307      (when (and home (not (string= home "")))
     1308        (merge-pathnames "site-systems/" (truename home))))
     1309   *central-registry*)
     1310
     1311  (pushnew
     1312   '(merge-pathnames ".sbcl/systems/"
     1313     (user-homedir-pathname))
     1314   *central-registry*)
     1315
     1316  (pushnew 'module-provide-asdf sb-ext:*module-provider-functions*)
     1317  (pushnew 'contrib-sysdef-search *system-definition-search-functions*))
     1318
     1319(provide 'asdf)
Note: See TracChangeset for help on using the changeset viewer.