Fix symbol name
[uffi.git] / doc / ref_aggregate.xml
index 401c28186400a71b62b417ed648a0d84a8efccb4..c1892648ad5ef60af4fb3d818ce902af752f3fec 100644 (file)
@@ -1,7 +1,7 @@
-<?xml version='1.0' ?>   <!-- Mode: Docbook --> 
+<?xml version="1.0" encoding="utf-8"?>
 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
-               "file:///usr/share/sgml/docbook/dtd/xml/4.2/docbookx.dtd" [
-<!ENTITY % myents SYSTEM "entities.xml">
+               "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+<!ENTITY % myents SYSTEM "entities.inc">
 %myents;
 ]>
 
@@ -70,7 +70,7 @@ a foreign type with the name <parameter>name</parameter> of type
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (def-enum abc (:a :b :c)) 
 ;; Creates constants abc#a (1), abc#b (2), abc#c (3) and defines
 ;; the foreign type "abc" to be :int
@@ -78,7 +78,7 @@ a foreign type with the name <parameter>name</parameter> of type
 (def-enum efoo (:e1 (:e2 10) :e3) :separator-string "-")
 ;; Creates constants efoo-e1 (1), efoo-e2 (10), efoo-e3 (11) and defines
 ;; the foreign type efoo to be :int
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
@@ -138,12 +138,12 @@ structure. It's type is <constant>:pointer-self</constant>.
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (def-struct foo (a :unsigned-int) 
                 (b (* :char)) 
                 (c (:array :int 10)) 
                 (next :pointer-self))
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
@@ -209,14 +209,16 @@ structure. It's type is <constant>:pointer-self</constant>.
       <refsect1>
        <title>Description</title>
        <para>
-         Accesses a slot value from a structure.
+         Accesses a slot value from a structure. This is generalized
+         and can be used with <function>setf</function>.
        </para>
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (get-slot-value foo-ptr 'foo-structure 'field-name)
-       </programlisting>
+(setf (get-slot-value foo-ptr 'foo-structure 'field-name) 10)
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
@@ -287,9 +289,9 @@ structure. It's type is <constant>:pointer-self</constant>.
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (get-slot-pointer foo-ptr 'foo-structure 'my-char-ptr)
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
@@ -346,9 +348,9 @@ structure. It's type is <constant>:pointer-self</constant>.
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (def-array-pointer byte-array-pointer :unsigned-char)
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>
@@ -375,7 +377,7 @@ structure. It's type is <constant>:pointer-self</constant>.
       <refsynopsisdiv>
        <title>Syntax</title>
        <synopsis>
-         <function>deref-array</function> <replaceable>array type positon</replaceable> => <returnvalue>value</returnvalue>
+         <function>deref-array</function> <replaceable>array type position</replaceable> => <returnvalue>value</returnvalue>
        </synopsis>
       </refsynopsisdiv>
       <refsect1>
@@ -420,14 +422,14 @@ the array.
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (def-array-pointer ca :char)
 (let ((fs (convert-to-foreign-string "ab")))
    (values (null-char-p (deref-array fs 'ca 0))
            (null-char-p (deref-array fs 'ca 2))))
 => &nil;
    &t;
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Notes</title>
@@ -491,7 +493,7 @@ the array.
       </refsect1>
       <refsect1>
        <title>Examples</title>
-       <programlisting>
+       <screen>
 (def-union test-union
   (a-char :char)
   (an-int :int))
@@ -502,7 +504,7 @@ the array.
     (ensure-char-character (get-slot-value u 'test-union 'a-char))
     (free-foreign-object u)))
 => #\A
-       </programlisting>
+       </screen>
       </refsect1>
       <refsect1>
        <title>Side Effects</title>