From: Kevin M. Rosenberg Date: Tue, 11 Nov 2003 05:37:57 +0000 (+0000) Subject: r8115: formatting changes X-Git-Tag: v1.6.1~165 X-Git-Url: http://git.kpe.io/?p=uffi.git;a=commitdiff_plain;h=4536279431c3b1dda383ae4ddb5c68cc6377b456 r8115: formatting changes --- diff --git a/doc/intro.xml b/doc/intro.xml index 104e0d3..be722e8 100644 --- a/doc/intro.xml +++ b/doc/intro.xml @@ -14,7 +14,7 @@ interface from Common Lisp to C-language compatible libraries. - + Background diff --git a/doc/ref_declare.xml b/doc/ref_declare.xml index 756ed87..5352722 100644 --- a/doc/ref_declare.xml +++ b/doc/ref_declare.xml @@ -7,7 +7,7 @@ Declarations - + Overview @@ -19,64 +19,64 @@ - - - def-type - Defines a Common Lisp type. - - Macro - - - Syntax - - def-type name type - - - - Arguments and Values - - - name - - A symbol naming the type - - - - type - - A form that is evaluated that specifies the &uffi; type. - - - - - - - Description - Defines a Common Lisp type based on a &uffi; type. - - - - Examples - + + + def-type + Defines a Common Lisp type. + + Macro + + + Syntax + + def-type name type + + + + Arguments and Values + + + name + + A symbol naming the type + + + + type + + A form that is evaluated that specifies the &uffi; type. + + + + + + + Description + Defines a Common Lisp type based on a &uffi; type. + + + + Examples + (def-type char-ptr '(* :char)) ... (defun foo (ptr) - (declare (type char-ptr ptr)) - ... - - - - Side Effects - Defines a new &cl; type. - - - Affected by - None. - - - Exceptional Situations - None. - - - +(declare (type char-ptr ptr)) +... + + + + Side Effects + Defines a new &cl; type. + + + Affected by + None. + + + Exceptional Situations + None. + + + diff --git a/doc/ref_primitive.xml b/doc/ref_primitive.xml index 2f43955..ca9d77e 100644 --- a/doc/ref_primitive.xml +++ b/doc/ref_primitive.xml @@ -6,267 +6,274 @@ ]> - Primitive Types - - Overview - - Primitive types have a single value, these include - characters, numbers, and pointers. They are all symbols in - the keyword package. + Primitive Types + + Overview + + Primitive types have a single value, these include + characters, numbers, and pointers. They are all symbols in + the keyword package. + + + + :char - Signed 8-bits. A + dereferenced :char pointer returns an character. - - - :char - Signed 8-bits. A -dereferenced :char pointer returns an character. - - - :unsigned-char - Unsigned 8-bits. A dereferenced :unsigned-char -pointer returns an character. - - - :byte - Signed 8-bits. A -dereferenced :byte pointer returns an integer. - - - :unsigned-byte - Unsigned 8-bits. A -dereferenced :unsigned-byte pointer returns an integer. - - - :short - Signed 16-bits. - - - :unsigned-short - Unsigned 16-bits. - - - :int - Signed 32-bits. - - - :unsigned-int - Unsigned 32-bits. - - - :long - Signed 32 or 64 bits, depending upon the platform. - + + + :unsigned-char - Unsigned 8-bits. A dereferenced :unsigned-char + pointer returns an character. + + + + :byte - Signed 8-bits. A + dereferenced :byte pointer returns an integer. + + + + :unsigned-byte - Unsigned 8-bits. A + dereferenced :unsigned-byte pointer returns an integer. + + + + :short - Signed 16-bits. + + + + :unsigned-short - Unsigned 16-bits. + + + + :int - Signed 32-bits. + + + :unsigned-int - Unsigned 32-bits. + + + :long - Signed 32 or 64 bits, depending upon the platform. + + + :unsigned-long - Unsigned 32 or 64 bits, depending upon the platform. + + + :float - 32-bit floating point. + + + :double - 64-bit floating point. + + + :cstring - + A &null; terminated string used for passing and returning characters strings with a &c; function. + + + + :void - + The absence of a value. Used to indicate that a function does not return a value. + + + + :pointer-void - Points to a generic object. + + + * - Used to declare a pointer to an object + + + + + + + def-constant + Binds a symbol to a constant. + + Macro + + + Syntax + + def-constant name value &key export + + + + Arguments and Values + + + name - :unsigned-long - Unsigned 32 or 64 bits, depending upon the platform. + A symbol that will be bound to the value. + + + + value - :float - 32-bit floating point. + An evaluated form that is bound the the name. + + + + export - :double - 64-bit floating point. + When &t;, the name is exported from the current package. The default is &nil; + + + + + Description + This is a thin wrapper around defconstant. It evaluates at + compile-time and optionally exports the symbol from the package. + + + + Examples + +(def-constant pi2 (* 2 pi)) +(def-constant exported-pi2 (* 2 pi) :export t) + + + + Side Effects + Creates a new special variable.. + + + Affected by + None. + + + Exceptional Situations + None. + + + + + + def-foreign-type + Defines a new foreign type. + + Macro + + + Syntax + + def-foreign-type name type + + + + Arguments and Values + + + name - :cstring - -A &null; terminated string used for passing and returning characters strings with a &c; function. + A symbol naming the new foreign type. + + + value - :void - -The absence of a value. Used to indicate that a function does not return a value. + A form that is not evaluated that defines the new + foreign type. + + + + + + Description + Defines a new foreign type. + + + + Examples + +(def-foreign-type my-generic-pointer :pointer-void) +(def-foreign-type a-double-float :double-float) +(def-foreign-type char-ptr (* :char)) + + + + Side Effects + Defines a new foreign type. + + + + Affected by + None. + + + Exceptional Situations + None. + + + + + + null-char-p + Tests a character for &null; value. + + Macro + + + Syntax + + null-char-p char => is-null + + + + Arguments and Values + + + char - :pointer-void - -Points to a generic object. + A character or integer. + + + + is-null - * - Used to declare a pointer to an object + A boolean flag indicating if char is a &null; value. + - - - - - - def-constant - Binds a symbol to a constant. - - Macro - - - Syntax - - def-constant name value &key export - - - - Arguments and Values - - - name - - A symbol that will be bound to the value. - - - - - value - - An evaluated form that is bound the the name. - - - - - export - - When &t;, the name is exported from the current package. The default is &nil; - - - - - - Description - - This is a thin wrapper around - defconstant. It evaluates at - compile-time and optionally exports the symbol from the package. - - - - Examples - -(def-constant pi2 (* 2 pi)) -(def-constant exported-pi2 (* 2 pi) :export t) - - - - Side Effects - Creates a new special variable.. - - - Affected by - None. - - - Exceptional Situations - None. - - - - - - def-foreign-type - Defines a new foreign type. - - Macro - - - Syntax - - def-foreign-type name type - - - - Arguments and Values - - - name - - A symbol naming the new foreign type. - - - - - value - - A form that is not evaluated that defines the new -foreign type. - - - - - - - Description - Defines a new foreign type. - - - - Examples - -(def-foreign-type my-generic-pointer :pointer-void) -(def-foreign-type a-double-float :double-float) -(def-foreign-type char-ptr (* :char)) - - - - Side Effects - Defines a new foreign type. - - - - Affected by - None. - - - Exceptional Situations - None. - - - - - - null-char-p - Tests a character for &null; value. - - Macro - - - Syntax - - null-char-p char => is-null - - - - Arguments and Values - - - char - - A character or integer. - - - - - is-null - - A boolean flag indicating if char is a &null; value. - - - - - - - Description - - A predicate testing if a character or integer is &null;. This -abstracts the difference in implementations where some return a -character and some return a -integer whence dereferencing a -C character pointer. - - - - Examples - + + + + + Description + + A predicate testing if a character or integer is &null;. This + abstracts the difference in implementations where some return a + character + and some return a + integer + whence dereferencing a + C + character pointer. + + + + Examples + (def-array-pointer ca :unsigned-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)))) + (values (null-char-p (deref-array fs 'ca 0)) + (null-char-p (deref-array fs 'ca 2)))) => &nil; &t; - - - - Side Effects - None. - - - - Affected by - None. - - - Exceptional Situations - None. - - - + + + + Side Effects + None. + + + + Affected by + None. + + + Exceptional Situations + None. + + +