r1742: *** empty log message ***
[uffi.git] / doc / ref.sgml
index 732204a47c7f6de8fd3eb8c686a1592333db5681..607edfced873810076050e650872e0270ec179d5 100644 (file)
@@ -2028,6 +2028,91 @@ a session.
       </refsect1>
     </refentry>
 
+      <refentry id="find-foreign-library">
+       <refnamediv>
+         <refname>find-foreign-library</refname>
+       <refpurpose>Finds a foreign library file.
+       </refpurpose>
+       <refclass>Function</refclass>
+      </refnamediv>
+      <refsect1>
+       <title>Syntax</title>
+<synopsis>
+         <function>find-foreign-library</function> <replaceable>names directories &amp; drive-letters types</replaceable> => <returnvalue>path</returnvalue>
+</synopsis>
+      </refsect1>
+      <refsect1>
+       <title>Arguments and Values</title>
+       <variablelist>
+         <varlistentry>
+           <term><parameter>names</parameter></term>
+           <listitem>
+             <para>A string or list of strings containing the base name of the library file.
+             </para>
+           </listitem>
+         </varlistentry>
+         <varlistentry>
+           <term><parameter>directories</parameter></term>
+           <listitem>
+             <para>A string or list of strings containing the directory the library file.
+             </para>
+           </listitem>
+         </varlistentry>
+         <varlistentry>
+           <term><parameter>drive-letters</parameter></term>
+           <listitem>
+             <para>A string or list of strings containing the drive letters for the library file.
+             </para>
+           </listitem>
+         </varlistentry>
+         <varlistentry>
+           <term><parameter>types</parameter></term>
+           <listitem>
+             <para>A string or list of strings containing the file type of the library file. Default
+is &nil;. If &nil;, will use a default type based on the currently running implementation.
+             </para>
+           </listitem>
+         </varlistentry>
+         <varlistentry>
+           <term><returnvalue>path</returnvalue></term>
+           <listitem>
+             <para>A path containing the path found, or &nil; if the library file was not found.
+             </para>
+           </listitem>
+         </varlistentry>
+       </variablelist>
+      </refsect1>
+      <refsect1>
+       <title>Description</title>
+       <para>Finds a foreign library by searching through a number of possible locations. Returns
+the path of the first found file.
+       </para>
+      </refsect1>
+      <refsect1>
+       <title>Examples</title>
+       <programlisting>
+(find-foreign-library '("libmysqlclient" "libmysql")
+    '("/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/mysql/lib/opt/")
+    :types '("so" "dll")
+    :drive-letters '("C" "D" "E"))
+=> #P"D:\\mysql\\lib\\opt\\libmysql.dll"
+       </programlisting>
+      </refsect1>
+      <refsect1>
+       <title>Side Effects</title>
+       <para>None.
+       </para>
+      </refsect1>
+      <refsect1>
+       <title>Affected by</title>
+       <para>None.</para>
+      </refsect1>
+      <refsect1>
+       <title>Exceptional Situations</title>
+       <para>None.</para>
+      </refsect1>
+    </refentry>
+
 </reference>