Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > e3d62627d1d1aab7ab1be2dd7f65a872 > files > 344

ecl-10.4.1-1.fc14.x86_64.rpm

<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>ffi:clines</title><link rel="stylesheet" href="ecl.css" type="text/css"><meta name="generator" content="DocBook XSL Stylesheets V1.75.2"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="ch18s05.html" title="3.5.&#160;FFI Reference"><link rel="prev" href="ch18s05.html" title="3.5.&#160;FFI Reference"><link rel="next" href="re14.html" title="ffi:c-inline"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><code class="function">ffi:clines</code></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch18s05.html">Prev</a>&#160;</td><th width="60%" align="center">3.5.&#160;FFI Reference</th><td width="20%" align="right">&#160;<a accesskey="n" href="re14.html">Next</a></td></tr></table><hr></div><div class="refentry" title="ffi:clines"><a name="ref.clines"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p><code class="function">ffi:clines</code> &#8212; Insert C declarations and definitions</p></div><div class="refsynopsisdiv" title="Special form"><h2>Special form</h2><div class="funcsynopsis"><p><code class="funcdef">(ffi:cline</code> <var class="pdparam">c-code</var>*)</p></div><table border="0" summary="Simple list" class="simplelist"><tr><td><em class="replaceable"><code>c-code</code></em></td><td>One or more strings with C definitions. Not evaluated</td></tr><tr><td>returns</td><td>No value.</td></tr></table></div><div class="refsect1" title="Description"><a name="id657787"></a><h2>Description</h2><p>This special form inserts C code directly in the file that results
    from compiling lisp sources. Contrary to <a class="xref" href="re14.html" title="ffi:c-inline"><code class="function">ffi:c-inline</code></a>,
    this function may have no executable statements, accepts no input value and
    returnsn no value.</p><p>The main use of <code class="function">FFI:CLINES</code> is to declare or
    define C variables and functions that are going to be used later in other
    <span class="application">FFI</span> statements.</p><p><code class="function">FFI:CLINES</code> is a special form that can only be
    used in lisp compiled files as a toplevel form. Other uses will lead to an
    error being signaled, either at compilation time or when loading the
    file.</p></div><div class="refsect1" title="Examples"><a name="id657830"></a><h2>Examples</h2><p>In this example the <code class="function">FFI:CLINES</code> statement is
    required to get access to the C function <code class="function">cos()</code></p><pre class="programlisting">(ffi:clines "#include &lt;math.h&gt;")
(defun cos (x)
  (ffi:c-inline (x) (:double) :double "cos(#0)" :on-liner t))</pre></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch18s05.html">Prev</a>&#160;</td><td width="20%" align="center"><a accesskey="u" href="ch18s05.html">Up</a></td><td width="40%" align="right">&#160;<a accesskey="n" href="re14.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">3.5.&#160;FFI Reference&#160;</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">&#160;<code class="function">ffi:c-inline</code></td></tr></table></div></body></html>