Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[d0e0b7]: uffi / ref_primitive.xml Maximize Restore History

Download this file

ref_primitive.xml    288 lines (279 with data), 8.2 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % eclent SYSTEM "../ecl.ent">
%eclent;
]>
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
<reference xml:id="uffi.primitives">
<title>Primitive Types</title>
<partintro>
<title>Overview</title>
<para>
Primitive types have a single value, these include
characters, numbers, and pointers. They are all symbols in
the keyword package.
</para>
<itemizedlist>
<listitem>
<para><constant>:char</constant> - Signed 8-bits. A
dereferenced :char pointer returns an character.
</para>
</listitem>
<listitem>
<para><constant>:unsigned-char</constant> - Unsigned 8-bits. A dereferenced :unsigned-char
pointer returns an character.
</para>
</listitem>
<listitem>
<para><constant>:byte</constant> - Signed 8-bits. A
dereferenced :byte pointer returns an integer.
</para>
</listitem>
<listitem>
<para><constant>:unsigned-byte</constant> - Unsigned 8-bits. A
dereferenced :unsigned-byte pointer returns an integer.
</para>
</listitem>
<listitem>
<para><constant>:short</constant> - Signed 16-bits.
</para>
</listitem>
<listitem>
<para><constant>:unsigned-short</constant> - Unsigned 16-bits.
</para>
</listitem>
<listitem>
<para><constant>:int</constant> - Signed 32-bits.</para>
</listitem>
<listitem>
<para><constant>:unsigned-int</constant> - Unsigned 32-bits.</para>
</listitem>
<listitem>
<para><constant>:long</constant> - Signed 32 or 64 bits, depending upon the platform.</para>
</listitem>
<listitem>
<para><constant>:unsigned-long</constant> - Unsigned 32 or 64 bits, depending upon the platform.</para>
</listitem>
<listitem>
<para><constant>:float</constant> - 32-bit floating point.</para>
</listitem>
<listitem>
<para><constant>:double</constant> - 64-bit floating point.</para>
</listitem>
<listitem>
<para><constant>:cstring</constant> -
A &NULL; terminated string used for passing and returning characters strings with a &C; function.
</para>
</listitem>
<listitem>
<para><constant>:void</constant> -
The absence of a value. Used to indicate that a function does not return a value.
</para>
</listitem>
<listitem>
<para><constant>:pointer-void</constant> - Points to a generic object.</para>
</listitem>
<listitem>
<para><constant>*</constant> - Used to declare a pointer to an object</para>
</listitem>
</itemizedlist>
</partintro>
<refentry xml:id="uffi.def-constant">
<refnamediv>
<refname><function>def-constant</function></refname>
<refpurpose>Binds a symbol to a constant.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Macro</title>
<funcsynopsis>
<funcprototype>
<funcdef>def-constant</funcdef>
<paramdef><parameter>name</parameter></paramdef>
<paramdef><parameter>value</parameter></paramdef>
<paramdef><parameter>&key;</parameter></paramdef>
<paramdef><parameter>export</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>A symbol that will be bound to the value.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>An evaluated form that is bound the the name.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>export</parameter></term>
<listitem>
<para>When &t;, the name is exported from the current package. The default is &nil;</para>
</listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>This is a thin wrapper around <function>defconstant</function>. It evaluates at
compile-time and optionally exports the symbol from the package.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<screen>
(def-constant pi2 (* 2 pi))
(def-constant exported-pi2 (* 2 pi) :export t)</screen>
</refsect1>
<refsect1>
<title>Side Effects</title>
<para>Creates a new special variable..</para>
</refsect1>
<refsect1>
<title>Affected by</title>
<para>None.</para>
</refsect1>
<refsect1>
<title>Exceptional Situations</title>
<para>None.</para>
</refsect1>
</refentry>
<refentry xml:id="uffi.def-foreign-type">
<refnamediv>
<refname><function>def-foreign-type</function></refname>
<refpurpose>Defines a new foreign type.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Macro</title>
<funcsynopsis>
<funcprototype>
<funcdef>def-foreign-type</funcdef>
<paramdef><parameter>name</parameter></paramdef>
<paramdef><parameter>type</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term><parameter>name</parameter></term>
<listitem>
<para>A symbol naming the new foreign type.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>value</parameter></term>
<listitem>
<para>A form that is not evaluated that defines the new
foreign type.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>Defines a new foreign type.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<screen>
(def-foreign-type my-generic-pointer :pointer-void)
(def-foreign-type a-double-float :double-float)
(def-foreign-type char-ptr (* :char))</screen>
</refsect1>
<refsect1>
<title>Side Effects</title>
<para>Defines a new foreign type.
</para>
</refsect1>
<refsect1>
<title>Affected by</title>
<para>None.</para>
</refsect1>
<refsect1>
<title>Exceptional Situations</title>
<para>None.</para>
</refsect1>
</refentry>
<refentry xml:id="uffi.null-char-p">
<refnamediv>
<refname><function>null-char-p</function></refname>
<refpurpose>Tests a character for &NULL; value.
</refpurpose>
</refnamediv>
<refsynopsisdiv>
<title>Macro</title>
<funcsynopsis>
<funcprototype>
<funcdef>null-char-p</funcdef>
<paramdef><parameter>char</parameter></paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term><parameter>char</parameter></term>
<listitem>
<para>A character or integer.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>returns</term>
<listitem>
<para>A boolean flag indicating if char is a &NULL; value.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Description</title>
<para>A predicate testing if a character or integer is &NULL;. This
abstracts the difference in implementations where some return a
<computeroutput>character</computeroutput> and some return a
<computeroutput>integer</computeroutput> whence dereferencing a
<computeroutput>C</computeroutput> character pointer.
</para>
</refsect1>
<refsect1>
<title>Examples</title>
<screen>
(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))))
=> &nil;
&t;</screen>
</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>
</book>
<!-- Keep this comment at the end of the file
Local variables:
mode: nxml
sgml-indent-step: 1
nxml-child-indent: 1
nxml-outline-child-indent: 0
fill-column: 79
End:
-->