uffi/doc html.tar.gz,1.18,1.19 ref.sgml,1.36,1.37 uffi.pdf,1.22,1.23

"Kevin M. Rosenberg" <[email protected]> Fri, 15 Aug 2003 02:34:36 +0000
Newsgroups gmane.lisp.uffi.cvs
Message-ID <[email protected]>
Update of /pubcvs/uffi/doc
In directory boa.b9.com:/tmp/cvs-serv27219/doc

Modified Files:
	html.tar.gz ref.sgml uffi.pdf 
Log Message:


Index: ref.sgml
===================================================================
RCS file: /pubcvs/uffi/doc/ref.sgml,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** ref.sgml	14 Aug 2003 21:40:13 -0000	1.36
--- ref.sgml	15 Aug 2003 02:34:34 -0000	1.37
***************
*** 1592,1595 ****
--- 1592,1710 ----
      </refentry>
  
+     <refentry id="def-foreign-var">
+       <refnamediv>
+ 	<refname>def-foreign-var</refname>
+ 	<refpurpose>
+ Defines a symbol macro to access a variable in foreign code
+ 	</refpurpose>
+ 	<refclass>Macro</refclass>
+       </refnamediv>
+       <refsynopsisdiv>
+ 	<title>Syntax</title>
+ 	<synopsis>
+ 	  <function>def-foreign-var</function> <replaceable>name type module</replaceable>
+ 	</synopsis>
+       </refsynopsisdiv>
+       <refsect1>
+ 	<title>Arguments and Values</title>
+ 	<variablelist>
+ 	  <varlistentry>
+ 	    <term><parameter>name</parameter></term>
+ 	    <listitem>
+ 	      <para>     
+ A string or list specificying the symbol macro's name. If it is a
+      string, that names the foreign variable. A Lisp name is created
+      by translating #\_ to #\- and by converting to upper-case in
+      case-insensitive Lisp implementations. If it is a list, the first
+      item is a string specifying the foreign variable name and the
+      second it is a symbol stating the Lisp name.
+ 	      </para>
+ 	    </listitem>
+ 	  </varlistentry>
+ 	  <varlistentry>
+ 	    <term><parameter>type</parameter></term>
+ 	    <listitem>
+ 	      <para>A foreign type of the foreign variable.
+ 	      </para>
+ 	    </listitem>
+ 	  </varlistentry>
+ 	  <varlistentry>
+ 	    <term><returnvalue>module</returnvalue></term>
+ 	    <listitem>
+ 	      <para>
+      A string specifying the module (or library) the foreign variable
+      resides in. (Required by Lispworks)
+ 	      </para>
+ 	    </listitem>
+ 	  </varlistentry>
+ 	</variablelist>
+       </refsect1>
+       <refsect1>
+ 	<title>Description</title>
+ 	<para>
+ Defines a symbol macro which can be used to access (get and set) the
+ value of a variable in foreign code.
+ 	</para>
+       </refsect1>
+       <refsect1>
+ 	<title>Examples</title>
+ 	<refsect2>
+ 	<title>C code</title>
+ <programlisting>
+   int baz = 3;
+ 
+   typedef struct {
+     int x;
+     double y;
+   } foo_struct;
+ 
+   foo_struct the_struct = { 42, 3.2 };
+ 
+   int foo () {
+     return baz;
+   }
+ </programlisting>
+ </refsect2>
+ <refsect2>
+ <title>Lisp code</title>
+ <programlisting>
+   (uffi:def-struct foo-struct
+     (x :int)
+     (y :double))
+ 
+   (uffi:def-function ("foo" foo)
+       ()
+     :returning :int
+     :module "foo")
+ 
+   (uffi:def-foreign-var ("baz" *baz*) :int "foo")
+   (uffi:def-foreign-var ("the_struct" *the-struct*) foo-struct "foo")
+ 
+ 
+ *baz*
+   => 3
+ 
+ (incf *baz*)
+   => 4
+ 
+ (foo)
+   => 4
+ </programlisting>
+ </refsect2>
+       </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>
  

Index: html.tar.gz
===================================================================
RCS file: /pubcvs/uffi/doc/html.tar.gz,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
Binary files /tmp/cvsKyg1Rb and /tmp/cvsMDHprd differ

Index: uffi.pdf
===================================================================
RCS file: /pubcvs/uffi/doc/uffi.pdf,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -d -r1.22 -r1.23
Binary files /tmp/cvsdzN7yd and /tmp/cvsBPMTPf differ