1 | From a4d5e7089fe1d919e795a904e22b4e65b41e744c Mon Sep 17 00:00:00 2001 |
---|
2 | Message-Id: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
3 | From: zbigniew <zbigniewsz@gmail.com> |
---|
4 | Date: Sat, 5 Dec 2009 23:56:14 -0600 |
---|
5 | Subject: Sync wiki SVN 16089-16579 to core manual |
---|
6 | Status: O |
---|
7 | |
---|
8 | One-way synchronize SVN 16089-16579 (HEAD) |
---|
9 | to the core manual. Any changes in the core manual |
---|
10 | are not copied back to the wiki. |
---|
11 | |
---|
12 | zbigniew (6): |
---|
13 | Sync changes from wiki manual to core: SVN 16089-16461 |
---|
14 | Sync changes from wiki manual to core: SVN 16461-16516 |
---|
15 | Sync changes from wiki manual to core: SVN 16516-16521 |
---|
16 | Sync changes from wiki manual to core: SVN 16521-16552 |
---|
17 | Sync changes from wiki manual to core: SVN 16552-16559 (R5RS |
---|
18 | standard) |
---|
19 | Sync changes from wiki manual to core: SVN 16559-16579 (SRFI-1 |
---|
20 | import) |
---|
21 | |
---|
22 | manual/Accessing external objects | 20 +- |
---|
23 | manual/Callbacks | 4 +- |
---|
24 | manual/Data representation | 51 +- |
---|
25 | manual/Declarations | 36 +- |
---|
26 | manual/Embedding | 2 +- |
---|
27 | manual/Extensions | 46 +- |
---|
28 | manual/Locations | 8 +- |
---|
29 | manual/Modules and macros | 20 +- |
---|
30 | manual/Non-standard macros and special forms | 106 +- |
---|
31 | manual/Other support procedures | 2 +- |
---|
32 | manual/Parameters | 2 +- |
---|
33 | manual/Supported language | 1 + |
---|
34 | manual/The R5RS standard | 3060 ++++++++++++++++++++++++++ |
---|
35 | manual/Unit data-structures | 123 +- |
---|
36 | manual/Unit eval | 26 +- |
---|
37 | manual/Unit expand | 6 +- |
---|
38 | manual/Unit extras | 38 +- |
---|
39 | manual/Unit files | 22 +- |
---|
40 | manual/Unit library | 48 +- |
---|
41 | manual/Unit lolevel | 156 +- |
---|
42 | manual/Unit posix | 275 ++-- |
---|
43 | manual/Unit regex | 26 +- |
---|
44 | manual/Unit srfi-1 | 1354 ++++++++++++- |
---|
45 | manual/Unit srfi-18 | 16 +- |
---|
46 | manual/Unit srfi-4 | 88 +- |
---|
47 | manual/Unit srfi-69 | 86 +- |
---|
48 | manual/Unit tcp | 10 +- |
---|
49 | manual/Unit utils | 6 +- |
---|
50 | manual/Using the interpreter | 4 +- |
---|
51 | 29 files changed, 5018 insertions(+), 624 deletions(-) |
---|
52 | create mode 100644 manual/The R5RS standard |
---|
53 | |
---|
54 | From 637100b05153f643b9497f2017bbf8d8eac573b7 Mon Sep 17 00:00:00 2001 |
---|
55 | Message-Id: <637100b05153f643b9497f2017bbf8d8eac573b7.1260078974.git.zbigniewsz@gmail.com> |
---|
56 | In-Reply-To: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
57 | References: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
58 | From: zbigniew <zbigniewsz@gmail.com> |
---|
59 | Date: Sat, 5 Dec 2009 22:38:04 -0600 |
---|
60 | Subject: Sync changes from wiki manual to core: SVN 16089-16461 |
---|
61 | Status: O |
---|
62 | |
---|
63 | |
---|
64 | Signed-off-by: zbigniew <zbigniewsz@gmail.com> |
---|
65 | --- |
---|
66 | manual/Data representation | 51 +++++++++++++++++++++---------------------- |
---|
67 | manual/Declarations | 34 ++++++++++++++-------------- |
---|
68 | manual/Modules and macros | 2 +- |
---|
69 | manual/Unit library | 4 --- |
---|
70 | 4 files changed, 43 insertions(+), 48 deletions(-) |
---|
71 | |
---|
72 | diff --git a/manual/Data representation b/manual/Data representation |
---|
73 | index 53049dc..3fff312 100644 |
---|
74 | --- a/manual/Data representation |
---|
75 | +++ b/manual/Data representation |
---|
76 | @@ -1,56 +1,55 @@ |
---|
77 | [[tags: manual]] |
---|
78 | |
---|
79 | -== Data representation |
---|
80 | |
---|
81 | -''Note: In all cases below, bits are numbered starting at 1 and beginning with the lowest-order bit.'' |
---|
82 | +== Data representation |
---|
83 | |
---|
84 | There exist two different kinds of data objects in the CHICKEN system: |
---|
85 | immediate and non-immediate objects. |
---|
86 | |
---|
87 | === Immediate objects |
---|
88 | |
---|
89 | -Immediate objects are represented by a single machine word, which is usually of 32 bits length, or 64 bits |
---|
90 | -on 64-bit architectures. The immediate objects |
---|
91 | -come in four different flavors: |
---|
92 | +Immediate objects are represented by a single machine word, 32 or 64 bits depending on the architecture. They come in four different flavors: |
---|
93 | |
---|
94 | -'''fixnums''', that is, small exact integers, where bit 1 is |
---|
95 | +'''fixnums''', that is, small exact integers, where the lowest order bit is |
---|
96 | set to 1. This gives fixnums a range of 31 bits for the actual |
---|
97 | numeric value (63 bits on 64-bit architectures). |
---|
98 | |
---|
99 | -'''characters''', where bits 1-4 are equal to {{C_CHARACTER_BITS}}. The |
---|
100 | -Unicode code point of the character is encoded in bits 9 to 32. |
---|
101 | +'''characters''', where the four lowest-order bits are equal to |
---|
102 | +{{C_CHARACTER_BITS}}, currently 1010. The Unicode code point |
---|
103 | +of the character is encoded in the next 24 bits. |
---|
104 | |
---|
105 | -'''booleans''', where bits 1-4 are equal to {{C_BOOLEAN_BITS}}. Bit 5 |
---|
106 | -is one for #t and zero for #f. |
---|
107 | +'''booleans''', where the four lowest-order bits are equal to {{C_BOOLEAN_BITS}}, |
---|
108 | +currently 0110. The next bit is one for #t and zero for #f. |
---|
109 | |
---|
110 | '''other values''': the empty list, the value of unbound identifiers, |
---|
111 | -the undefined value (void), and end-of-file. Bits 1-4 are equal to {{C_SPECIAL_BITS}}; bits 5 to 8 contain an identifying |
---|
112 | -number for this type of object. The following constants are |
---|
113 | -defined: {{C_SCHEME_END_OF_LIST C_SCHEME_UNDEFINED C_SCHEME_UNBOUND |
---|
114 | -C_SCHEME_END_OF_FILE}} |
---|
115 | - |
---|
116 | -Collectively, bits 1 and 2 are known as the ''immediate mark bits''. When bit 1 is set, the object is a fixnum, as described above, and bit 2 is part of its value. When bit 1 is clear but bit 2 is set, it is an immediate object other than a fixnum. If neither bit 1 nor bit 2 is set, the object is non-immediate, as described below. |
---|
117 | +the undefined value (void), and end-of-file. The four lowest-order bits are equal to |
---|
118 | +{{C_SPECIAL_BITS}}, currently 1110. The next four bits contain an identifying |
---|
119 | +number for this type of object, one of: |
---|
120 | +{{C_SCHEME_END_OF_LIST}}, currently 0000; |
---|
121 | +{{C_SCHEME_UNDEFINED}}, currently 0001; |
---|
122 | +{{C_SCHEME_UNBOUND}}, currently 0010; or |
---|
123 | +{{C_SCHEME_END_OF_FILE}}, currently 0011. |
---|
124 | |
---|
125 | === Non-immediate objects |
---|
126 | |
---|
127 | +Collectively, the two lowest-order bits are known as the ''immediate mark bits''. When the lowest bit is set, the object is a fixnum, as described above, and the next bit is part of its value. When the lowest bit is clear but the next bit is set, it is an immediate object other than a fixnum. If neither bit is set, the object is non-immediate, as described below. |
---|
128 | + |
---|
129 | Non-immediate objects are blocks of data represented by a pointer into |
---|
130 | -the heap. The pointer's immediate mark bits (bits 1 and 2) must be zero to indicate the object is non-immediate; |
---|
131 | +the heap. The pointer's immediate mark bits must be zero to indicate the object is non-immediate; |
---|
132 | this guarantees the data block is aligned on a 4-byte boundary, at minimum. Alignment of data words |
---|
133 | is required on modern architectures anyway, so we get the ability to distinguish between immediate and non-immediate objects for free. |
---|
134 | |
---|
135 | The first word of the data block contains a header, which gives |
---|
136 | -information about the type of the object. The header has the size of a |
---|
137 | -machine word, usually 32 bits (64 bits on 64 bit architectures). |
---|
138 | - |
---|
139 | -Bits 1 to 24 contain the length of the data object, which is either |
---|
140 | -the number of bytes in a string (or byte-vector) or the the number |
---|
141 | -of elements for a vector or for a structure type. |
---|
142 | +information about the type of the object. The header is a |
---|
143 | +single machine word. |
---|
144 | |
---|
145 | -Bits 25 to 28 contain the type code of the object. |
---|
146 | +The 24 lowest-order bits contain the length of the data object, which is either |
---|
147 | +the number of bytes in a string or byte-vector, or the the number |
---|
148 | +of elements for a vector or record type. |
---|
149 | |
---|
150 | -Bits 29 to 32 contain miscellaneous flags used for garbage |
---|
151 | +The remaining bits are placed in the high-order end of the header. |
---|
152 | +The four highest-order bits are used for garbage |
---|
153 | collection or internal data type dispatching. |
---|
154 | -These flags are: |
---|
155 | |
---|
156 | ; C_GC_FORWARDING_BIT : Flag used for forwarding garbage collected object pointers. |
---|
157 | |
---|
158 | diff --git a/manual/Declarations b/manual/Declarations |
---|
159 | index deabbee..572fa49 100644 |
---|
160 | --- a/manual/Declarations |
---|
161 | +++ b/manual/Declarations |
---|
162 | @@ -284,26 +284,26 @@ given here: |
---|
163 | |
---|
164 | BASIC --> * |
---|
165 | | string |
---|
166 | - | symbol |
---|
167 | - | char |
---|
168 | - | number |
---|
169 | - | boolean |
---|
170 | - | list |
---|
171 | - | pair |
---|
172 | - | procedure |
---|
173 | - | vector |
---|
174 | - | null |
---|
175 | - | eof |
---|
176 | - | port |
---|
177 | - | blob |
---|
178 | - | pointer |
---|
179 | - | locative |
---|
180 | - | fixnum |
---|
181 | - | float |
---|
182 | + | symbol |
---|
183 | + | char |
---|
184 | + | number |
---|
185 | + | boolean |
---|
186 | + | list |
---|
187 | + | pair |
---|
188 | + | procedure |
---|
189 | + | vector |
---|
190 | + | null |
---|
191 | + | eof |
---|
192 | + | port |
---|
193 | + | blob |
---|
194 | + | pointer |
---|
195 | + | locative |
---|
196 | + | fixnum |
---|
197 | + | float |
---|
198 | |
---|
199 | RESULTS --> * |
---|
200 | | (RVAL1 ...) |
---|
201 | - |
---|
202 | + |
---|
203 | RVAL --> undefined |
---|
204 | | noreturn |
---|
205 | |
---|
206 | diff --git a/manual/Modules and macros b/manual/Modules and macros |
---|
207 | index bc4be9d..01d995e 100644 |
---|
208 | --- a/manual/Modules and macros |
---|
209 | +++ b/manual/Modules and macros |
---|
210 | @@ -307,7 +307,7 @@ a module): |
---|
211 | |
---|
212 | (begin |
---|
213 | (import m1) |
---|
214 | - ... ; imports not visible here |
---|
215 | + ...) ; imports not visible here |
---|
216 | |
---|
217 | ... ; imports visible here |
---|
218 | |
---|
219 | diff --git a/manual/Unit library b/manual/Unit library |
---|
220 | index d652b40..73b4c51 100644 |
---|
221 | --- a/manual/Unit library |
---|
222 | +++ b/manual/Unit library |
---|
223 | @@ -519,10 +519,6 @@ argument. If the condition does not have a value for the desired property and |
---|
224 | if the optional argument is given, no error is signaled and the accessor |
---|
225 | returns the third argument. |
---|
226 | |
---|
227 | -* In composite conditions all properties are currently collected in a single |
---|
228 | -property-list, so in the case that to conditions have the same named property, |
---|
229 | -only one will be visible. |
---|
230 | - |
---|
231 | |
---|
232 | |
---|
233 | === Environment information and system interface |
---|
234 | -- |
---|
235 | 1.6.5.2 |
---|
236 | |
---|
237 | |
---|
238 | From 7e8bb73a8fcc3dd228889a31c407ca76c80620f6 Mon Sep 17 00:00:00 2001 |
---|
239 | Message-Id: <7e8bb73a8fcc3dd228889a31c407ca76c80620f6.1260078974.git.zbigniewsz@gmail.com> |
---|
240 | In-Reply-To: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
241 | References: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
242 | From: zbigniew <zbigniewsz@gmail.com> |
---|
243 | Date: Sat, 5 Dec 2009 22:44:22 -0600 |
---|
244 | Subject: Sync changes from wiki manual to core: SVN 16461-16516 |
---|
245 | Status: O |
---|
246 | |
---|
247 | |
---|
248 | Signed-off-by: zbigniew <zbigniewsz@gmail.com> |
---|
249 | --- |
---|
250 | manual/Unit posix | 2 +- |
---|
251 | manual/Unit srfi-69 | 2 +- |
---|
252 | 2 files changed, 2 insertions(+), 2 deletions(-) |
---|
253 | |
---|
254 | diff --git a/manual/Unit posix b/manual/Unit posix |
---|
255 | index 74f6164..055a4f9 100644 |
---|
256 | --- a/manual/Unit posix |
---|
257 | +++ b/manual/Unit posix |
---|
258 | @@ -889,7 +889,7 @@ nothing happens. |
---|
259 | |
---|
260 | ==== memory-mapped-file? |
---|
261 | |
---|
262 | - [pocedure] (memory-mapped-file? X) |
---|
263 | + [procedure] (memory-mapped-file? X) |
---|
264 | |
---|
265 | Returns {{#t}}, if {{X}} is an object representing a memory |
---|
266 | mapped file, or {{#f}} otherwise. |
---|
267 | diff --git a/manual/Unit srfi-69 b/manual/Unit srfi-69 |
---|
268 | index c215ee3..d637884 100644 |
---|
269 | --- a/manual/Unit srfi-69 |
---|
270 | +++ b/manual/Unit srfi-69 |
---|
271 | @@ -202,7 +202,7 @@ Returns the new {{VALUE}}. |
---|
272 | |
---|
273 | ==== hash-table-copy |
---|
274 | |
---|
275 | - [procededure] (hash-table-copy HASH-TABLE) |
---|
276 | + [procedure] (hash-table-copy HASH-TABLE) |
---|
277 | |
---|
278 | Returns a shallow copy of the {{HASH-TABLE}}. |
---|
279 | |
---|
280 | -- |
---|
281 | 1.6.5.2 |
---|
282 | |
---|
283 | |
---|
284 | From 1b0593b802e43cdedd0dc01f321e248d6eb7662e Mon Sep 17 00:00:00 2001 |
---|
285 | Message-Id: <1b0593b802e43cdedd0dc01f321e248d6eb7662e.1260078974.git.zbigniewsz@gmail.com> |
---|
286 | In-Reply-To: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
287 | References: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
288 | From: zbigniew <zbigniewsz@gmail.com> |
---|
289 | Date: Sat, 5 Dec 2009 23:17:15 -0600 |
---|
290 | Subject: Sync changes from wiki manual to core: SVN 16516-16521 |
---|
291 | Status: O |
---|
292 | |
---|
293 | |
---|
294 | Signed-off-by: zbigniew <zbigniewsz@gmail.com> |
---|
295 | --- |
---|
296 | manual/Accessing external objects | 20 +- |
---|
297 | manual/Callbacks | 4 +- |
---|
298 | manual/Declarations | 2 +- |
---|
299 | manual/Embedding | 2 +- |
---|
300 | manual/Extensions | 42 +++--- |
---|
301 | manual/Locations | 8 +- |
---|
302 | manual/Modules and macros | 18 +- |
---|
303 | manual/Non-standard macros and special forms | 82 +++++----- |
---|
304 | manual/Other support procedures | 2 +- |
---|
305 | manual/Parameters | 2 +- |
---|
306 | manual/Unit data-structures | 123 +++++++------- |
---|
307 | manual/Unit eval | 26 ++-- |
---|
308 | manual/Unit expand | 6 +- |
---|
309 | manual/Unit extras | 38 ++-- |
---|
310 | manual/Unit library | 44 +++--- |
---|
311 | manual/Unit lolevel | 156 +++++++++--------- |
---|
312 | manual/Unit posix | 237 +++++++++++++------------ |
---|
313 | manual/Unit regex | 26 ++-- |
---|
314 | manual/Unit srfi-18 | 16 +- |
---|
315 | manual/Unit srfi-4 | 88 +++++----- |
---|
316 | manual/Unit srfi-69 | 86 +++++----- |
---|
317 | manual/Unit tcp | 10 +- |
---|
318 | manual/Unit utils | 6 +- |
---|
319 | manual/Using the interpreter | 4 +- |
---|
320 | 24 files changed, 528 insertions(+), 520 deletions(-) |
---|
321 | |
---|
322 | diff --git a/manual/Accessing external objects b/manual/Accessing external objects |
---|
323 | index 4da3c0c..8d1771b 100644 |
---|
324 | --- a/manual/Accessing external objects |
---|
325 | +++ b/manual/Accessing external objects |
---|
326 | @@ -6,7 +6,7 @@ |
---|
327 | |
---|
328 | === foreign-code |
---|
329 | |
---|
330 | - [syntax] (foreign-code STRING ...) |
---|
331 | +<macro>(foreign-code STRING ...)</macro> |
---|
332 | |
---|
333 | Executes the embedded C/C++ code {{STRING ...}}, which should |
---|
334 | be a sequence of C statements, which are executed and return an unspecified result. |
---|
335 | @@ -20,7 +20,7 @@ Code wrapped inside {{foreign-code}} may not invoke callbacks into Scheme. |
---|
336 | |
---|
337 | === foreign-value |
---|
338 | |
---|
339 | - [syntax] (foreign-value CODE TYPE) |
---|
340 | +<macro>(foreign-value CODE TYPE)</macro> |
---|
341 | |
---|
342 | Evaluates the embedded C/C++ expression {{CODE}} (which may be a string or symbol), returning a value of type given |
---|
343 | in the foreign-type specifier {{TYPE}}. |
---|
344 | @@ -32,14 +32,14 @@ in the foreign-type specifier {{TYPE}}. |
---|
345 | |
---|
346 | === foreign-declare |
---|
347 | |
---|
348 | - [syntax] (foreign-declare STRING ...) |
---|
349 | +<macro>(foreign-declare STRING ...)</macro> |
---|
350 | |
---|
351 | Include given strings verbatim into header of generated file. |
---|
352 | |
---|
353 | |
---|
354 | === define-foreign-type |
---|
355 | |
---|
356 | - [syntax] (define-foreign-type NAME TYPE [ARGCONVERT [RETCONVERT]]) |
---|
357 | +<macro>(define-foreign-type NAME TYPE [ARGCONVERT [RETCONVERT]])</macro> |
---|
358 | |
---|
359 | Defines an alias for {{TYPE}} with the name {{NAME}} (a symbol). |
---|
360 | {{TYPE}} may be a type-specifier or a string naming a C type. The |
---|
361 | @@ -72,7 +72,7 @@ in multiple files. |
---|
362 | |
---|
363 | === define-foreign-variable |
---|
364 | |
---|
365 | - [syntax] (define-foreign-variable NAME TYPE [STRING]) |
---|
366 | +<macro>(define-foreign-variable NAME TYPE [STRING])</macro> |
---|
367 | |
---|
368 | Defines a foreign variable of name {{NAME}} (a symbol). {{STRING}} |
---|
369 | should be the real name of a foreign variable or parameterless |
---|
370 | @@ -88,7 +88,7 @@ even have to specify an lvalue. |
---|
371 | |
---|
372 | === foreign-lambda |
---|
373 | |
---|
374 | - [syntax] (foreign-lambda RETURNTYPE NAME ARGTYPE ...) |
---|
375 | +<macro>(foreign-lambda RETURNTYPE NAME ARGTYPE ...)</macro> |
---|
376 | |
---|
377 | Represents a |
---|
378 | binding to an external routine. This form can be used in the position |
---|
379 | @@ -98,7 +98,7 @@ name of the external procedure and should be a string or a symbol. |
---|
380 | |
---|
381 | === foreign-lambda* |
---|
382 | |
---|
383 | - [syntax] (foreign-lambda* RETURNTYPE ((ARGTYPE VARIABLE) ...) STRING ...) |
---|
384 | +<macro>(foreign-lambda* RETURNTYPE ((ARGTYPE VARIABLE) ...) STRING ...)</macro> |
---|
385 | |
---|
386 | Similar to {{foreign-lambda}}, but instead of generating code to |
---|
387 | call an external function, the body of the C procedure is directly given |
---|
388 | @@ -120,7 +120,7 @@ commences in the calling code. |
---|
389 | |
---|
390 | === foreign-safe-lambda |
---|
391 | |
---|
392 | - [syntax] (foreign-safe-lambda RETURNTYPE NAME ARGTYPE ...) |
---|
393 | +<macro>(foreign-safe-lambda RETURNTYPE NAME ARGTYPE ...)</macro> |
---|
394 | |
---|
395 | This is similar to {{foreign-lambda}}, but also allows the called |
---|
396 | function to call Scheme functions and allocate Scheme data-objects. See [[Callbacks]]. |
---|
397 | @@ -128,7 +128,7 @@ function to call Scheme functions and allocate Scheme data-objects. See [[Callba |
---|
398 | |
---|
399 | === foreign-safe-lambda* |
---|
400 | |
---|
401 | - [syntax] (foreign-safe-lambda* RETURNTYPE ((ARGTYPE VARIABLE)...) STRING ...) |
---|
402 | +<macro>(foreign-safe-lambda* RETURNTYPE ((ARGTYPE VARIABLE)...) STRING ...)</macro> |
---|
403 | |
---|
404 | This is similar to {{foreign-lambda*}}, but also allows the called |
---|
405 | function to call Scheme functions and allocate Scheme data-objects. See [[Callbacks]]. |
---|
406 | @@ -137,7 +137,7 @@ function to call Scheme functions and allocate Scheme data-objects. See [[Callba |
---|
407 | |
---|
408 | === foreign-primitive |
---|
409 | |
---|
410 | - [syntax] (foreign-primitive [RETURNTYPE] ((ARGTYPE VARIABLE) ...) STRING ...) |
---|
411 | +<macro>(foreign-primitive [RETURNTYPE] ((ARGTYPE VARIABLE) ...) STRING ...)</macro> |
---|
412 | |
---|
413 | This is also similar to {{foreign-lambda*}} but the code will be executed |
---|
414 | in a ''primitive'' CPS context, which means it will not actually return, but |
---|
415 | diff --git a/manual/Callbacks b/manual/Callbacks |
---|
416 | index 8490b58..0f45f2f 100644 |
---|
417 | --- a/manual/Callbacks |
---|
418 | +++ b/manual/Callbacks |
---|
419 | @@ -30,8 +30,8 @@ a different callback, your program is likely to crash. |
---|
420 | |
---|
421 | === define-external |
---|
422 | |
---|
423 | - [syntax] (define-external [QUALIFIERS] (NAME (ARGUMENTTYPE1 VARIABLE1) ...) RETURNTYPE BODY ...) |
---|
424 | - [syntax] (define-external NAME TYPE [INIT]) |
---|
425 | +<macro>(define-external [QUALIFIERS] (NAME (ARGUMENTTYPE1 VARIABLE1) ...) RETURNTYPE BODY ...)</macro><br> |
---|
426 | +<macro>(define-external NAME TYPE [INIT])</macro> |
---|
427 | |
---|
428 | The first form defines an externally callable Scheme |
---|
429 | procedure. {{NAME}} should be a symbol, which, when converted to a |
---|
430 | diff --git a/manual/Declarations b/manual/Declarations |
---|
431 | index 572fa49..e3f6cee 100644 |
---|
432 | --- a/manual/Declarations |
---|
433 | +++ b/manual/Declarations |
---|
434 | @@ -7,7 +7,7 @@ |
---|
435 | |
---|
436 | === declare |
---|
437 | |
---|
438 | - [syntax] (declare DECLSPEC ...) |
---|
439 | +<macro>(declare DECLSPEC ...)</macro> |
---|
440 | |
---|
441 | Process declaration specifiers. Declarations always override |
---|
442 | any command-line settings. Declarations are valid for the whole |
---|
443 | diff --git a/manual/Embedding b/manual/Embedding |
---|
444 | index 45c6c5c..f1133a3 100644 |
---|
445 | --- a/manual/Embedding |
---|
446 | +++ b/manual/Embedding |
---|
447 | @@ -61,7 +61,7 @@ Scheme program. |
---|
448 | |
---|
449 | === return-to-host |
---|
450 | |
---|
451 | - [procedure] (return-to-host) |
---|
452 | +<procedure>(return-to-host)</procedure> |
---|
453 | |
---|
454 | Exits the Scheme code and returns to the invoking context that called {{CHICKEN_run}} |
---|
455 | or {{CHICKEN_continue}}. |
---|
456 | diff --git a/manual/Extensions b/manual/Extensions |
---|
457 | index dbd98ac..f7bfdb9 100644 |
---|
458 | --- a/manual/Extensions |
---|
459 | +++ b/manual/Extensions |
---|
460 | @@ -146,14 +146,14 @@ string. |
---|
461 | |
---|
462 | ==== install-program |
---|
463 | |
---|
464 | - [procedure] (install-program ID FILELIST [INFOLIST]) |
---|
465 | +<procedure>(install-program ID FILELIST [INFOLIST])</procedure> |
---|
466 | |
---|
467 | Similar to {{install-extension}}, but installs an executable program in the |
---|
468 | executable path (usually {{/usr/local/bin}}). |
---|
469 | |
---|
470 | ==== install-script |
---|
471 | |
---|
472 | - [procedure] (install-script ID FILELIST [INFOLIST]) |
---|
473 | +<procedure>(install-script ID FILELIST [INFOLIST])</procedure> |
---|
474 | |
---|
475 | Similar to {{install-program}}, but additionally changes the file permissions of all |
---|
476 | files in {{FILELIST}} to executable (for installing shell-scripts). |
---|
477 | @@ -179,7 +179,7 @@ a simple single-file extension. This is roughly equivalent to: |
---|
478 | |
---|
479 | ==== run |
---|
480 | |
---|
481 | - [syntax] (run FORM ...) |
---|
482 | +<macro>(run FORM ...)</macro> |
---|
483 | |
---|
484 | Runs the shell command {{FORM}}, which is wrapped in an implicit {{quasiquote}}. |
---|
485 | {{(run (csc ...))}} is treated specially and passes {{-v}} (if {{-verbose}} has been given |
---|
486 | @@ -187,13 +187,13 @@ to {{chicken-install}}) and {{-feature compiling-extension}} options to the comp |
---|
487 | |
---|
488 | ==== compile |
---|
489 | |
---|
490 | - [syntax] (compile FORM ...) |
---|
491 | +<macro>(compile FORM ...)</macro> |
---|
492 | |
---|
493 | Equivalent to {{(run (csc FORM ...))}}. |
---|
494 | |
---|
495 | ==== make |
---|
496 | |
---|
497 | - [syntax] (make ((TARGET (DEPENDENT ...) COMMAND ...) ...) ARGUMENTS) |
---|
498 | +<macro>(make ((TARGET (DEPENDENT ...) COMMAND ...) ...) ARGUMENTS)</macro> |
---|
499 | |
---|
500 | A ''make'' macro that executes the expressions {{COMMAND ...}}, when any of the dependents |
---|
501 | {{DEPENDENT ...}} have changed, to build {{TARGET}}. This is the same as the {{make}} |
---|
502 | @@ -203,7 +203,7 @@ extension, which is available separately. For more information, see |
---|
503 | |
---|
504 | ==== patch |
---|
505 | |
---|
506 | - [procedure] (patch WHICH REGEX SUBST) |
---|
507 | +<procedure>(patch WHICH REGEX SUBST)</procedure> |
---|
508 | |
---|
509 | Replaces all occurrences of the regular expression {{REGEX}} with the string {{SUBST}}, |
---|
510 | in the file given in {{WHICH}}. If {{WHICH}} is a string, the file will be patched and |
---|
511 | @@ -212,28 +212,28 @@ overwritten. If {{WHICH}} is a list of the form {{OLD NEW}}, then a different fi |
---|
512 | |
---|
513 | ==== copy-file |
---|
514 | |
---|
515 | - [procedure] (copy-file FROM TO) |
---|
516 | +<procedure>(copy-file FROM TO)</procedure> |
---|
517 | |
---|
518 | Copies the file or directory (recursively) given in the string {{FROM}} to the destination |
---|
519 | file or directory {{TO}}. |
---|
520 | |
---|
521 | ==== move-file |
---|
522 | |
---|
523 | - [procedure] (move-file FROM TO) |
---|
524 | +<procedure>(move-file FROM TO)</procedure> |
---|
525 | |
---|
526 | Moves the file or directory (recursively) given in the string {{FROM}} to the destination |
---|
527 | file or directory {{TO}}. |
---|
528 | |
---|
529 | ==== remove-file* |
---|
530 | |
---|
531 | - [procedure] (remove-file* PATH) |
---|
532 | +<procedure>(remove-file* PATH)</procedure> |
---|
533 | |
---|
534 | Removes the file or directory given in the string {{PATH}}. |
---|
535 | |
---|
536 | |
---|
537 | ==== find-library |
---|
538 | |
---|
539 | - [procedure] (find-library NAME PROC) |
---|
540 | +<procedure>(find-library NAME PROC)</procedure> |
---|
541 | |
---|
542 | Returns {{#t}} if the library named {{libNAME.[a|so]}} (unix) or {{NAME.lib}} (windows) |
---|
543 | could be found by compiling and linking a test program. {{PROC}} should be the name of a |
---|
544 | @@ -242,13 +242,13 @@ be resolved, {{#f}} is returned. |
---|
545 | |
---|
546 | ==== find-header |
---|
547 | |
---|
548 | - [procedure] (find-header NAME) |
---|
549 | +<procedure>(find-header NAME)</procedure> |
---|
550 | |
---|
551 | Returns {{#t}} if a C include-file with the given name is available, or {{#f}} otherwise. |
---|
552 | |
---|
553 | ==== try-compile |
---|
554 | |
---|
555 | - [procedure] (try-compile CODE #!key cc cflags ldflags compile-only c++) |
---|
556 | +<procedure>(try-compile CODE #!key cc cflags ldflags compile-only c++)</procedure> |
---|
557 | |
---|
558 | Returns {{#t}} if the C code in {{CODE}} compiles and links successfully, or {{#f}} otherwise. |
---|
559 | The keyword parameters {{cc}} (compiler name, defaults to the C compiler used to build this system), |
---|
560 | @@ -259,20 +259,20 @@ If the keyword argument {{c++}} is given and true, then the code will be compile |
---|
561 | |
---|
562 | ==== create-directory |
---|
563 | |
---|
564 | - [procedure] (create-directory PATH) |
---|
565 | +<procedure>(create-directory PATH)</procedure> |
---|
566 | |
---|
567 | Creates the directory given in the string {{PATH}}, with all parent directories as needed. |
---|
568 | |
---|
569 | |
---|
570 | ==== chicken-prefix |
---|
571 | |
---|
572 | - [parameter] chicken-prefix |
---|
573 | +<parameter>chicken-prefix</parameter> |
---|
574 | |
---|
575 | The installation prefix specified when CHICKEN was built. |
---|
576 | |
---|
577 | ==== installation-prefix |
---|
578 | |
---|
579 | - [parameter] installation-prefix |
---|
580 | +<parameter>installation-prefix</parameter> |
---|
581 | |
---|
582 | An alternative installation prefix that will be prepended to extension |
---|
583 | installation paths if specified. It is set by the {{-install-prefix}} |
---|
584 | @@ -280,7 +280,7 @@ option or environment variable {{CHICKEN_INSTALL_PREFIX}}. |
---|
585 | |
---|
586 | ==== program-path |
---|
587 | |
---|
588 | - [parameter] (program-path [PATH]) |
---|
589 | +<parameter>(program-path [PATH])</parameter> |
---|
590 | |
---|
591 | Holds the path where executables are installed and defaults to either {{$CHICKEN_PREFIX/bin}}, |
---|
592 | if the environment variable {{CHICKEN_PREFIX}} is set or the |
---|
593 | @@ -289,21 +289,21 @@ path where the CHICKEN binaries ({{chicken}}, {{csi}}, etc.) are installed. |
---|
594 | |
---|
595 | ==== setup-root-directory |
---|
596 | |
---|
597 | - [parameter] (setup-root-directory [PATH]) |
---|
598 | +<parameter>(setup-root-directory [PATH])</parameter> |
---|
599 | |
---|
600 | Contains the path of the directory where {{chicken-install}} was invoked. |
---|
601 | |
---|
602 | |
---|
603 | ==== setup-install-mode |
---|
604 | |
---|
605 | - [parameter] (setup-install-mode [BOOL]) |
---|
606 | +<parameter>(setup-install-mode [BOOL])</parameter> |
---|
607 | |
---|
608 | Reflects the setting of the {{-no-install}} option, i.e. is {{#f}}, if {{-no-install}} was |
---|
609 | given to {{chicken-install}}. |
---|
610 | |
---|
611 | ==== required-chicken-version |
---|
612 | |
---|
613 | - [procedure] (required-chicken-version VERSION) |
---|
614 | +<procedure>(required-chicken-version VERSION)</procedure> |
---|
615 | |
---|
616 | Signals an error if the version of CHICKEN that this script runs under is lexicographically less than |
---|
617 | {{VERSION}} (the argument will be converted to a string, first). |
---|
618 | @@ -311,7 +311,7 @@ Signals an error if the version of CHICKEN that this script runs under is lexico |
---|
619 | |
---|
620 | ==== required-extension-version |
---|
621 | |
---|
622 | - [procedure] (required-extension-version EXTENSION1 VERSION1 ...) |
---|
623 | +<procedure>(required-extension-version EXTENSION1 VERSION1 ...)</procedure> |
---|
624 | |
---|
625 | Checks whether the extensions {{EXTENSION1 ...}} are installed and at least of version {{VERSION1 ...}}. |
---|
626 | The test is made by lexicographically comparing the string-representations of the given version with the version |
---|
627 | @@ -321,7 +321,7 @@ or is of a version older than the one specified. |
---|
628 | |
---|
629 | ==== host-extension |
---|
630 | |
---|
631 | - [parameter] host-extension |
---|
632 | +<parameter>host-extension</parameter> |
---|
633 | |
---|
634 | For a cross-compiling CHICKEN, when compiling an extension, then it |
---|
635 | should be built for the host environment (as opposed to the target |
---|
636 | diff --git a/manual/Locations b/manual/Locations |
---|
637 | index c2fd820..c4fd2b4 100644 |
---|
638 | --- a/manual/Locations |
---|
639 | +++ b/manual/Locations |
---|
640 | @@ -14,7 +14,7 @@ machine word, and double-precision floating point values. |
---|
641 | |
---|
642 | === define-location |
---|
643 | |
---|
644 | - [syntax] (define-location NAME TYPE [INIT]) |
---|
645 | +<macro>(define-location NAME TYPE [INIT])</macro> |
---|
646 | |
---|
647 | Identical to {{(define-external NAME TYPE [INIT])}}, but the variable |
---|
648 | is not accessible from outside of the current compilation unit (it is |
---|
649 | @@ -22,14 +22,14 @@ declared {{static}}). |
---|
650 | |
---|
651 | === let-location |
---|
652 | |
---|
653 | - [syntax] (let-location ((NAME TYPE [INIT]) ...) BODY ...) |
---|
654 | +<macro>(let-location ((NAME TYPE [INIT]) ...) BODY ...)</macro> |
---|
655 | |
---|
656 | Defines a lexically bound location. |
---|
657 | |
---|
658 | === location |
---|
659 | |
---|
660 | - [syntax] (location NAME) |
---|
661 | - [syntax] (location X) |
---|
662 | +<macro>(location NAME)</macro><br> |
---|
663 | +<macro>(location X)</macro> |
---|
664 | |
---|
665 | This form returns a pointer object |
---|
666 | that contains the address of the variable {{NAME}}. |
---|
667 | diff --git a/manual/Modules and macros b/manual/Modules and macros |
---|
668 | index 01d995e..483b5b0 100644 |
---|
669 | --- a/manual/Modules and macros |
---|
670 | +++ b/manual/Modules and macros |
---|
671 | @@ -13,7 +13,7 @@ macro system based on ''explicit renaming''. |
---|
672 | |
---|
673 | ==== define-syntax |
---|
674 | |
---|
675 | - [syntax] (define-syntax IDENTIFIER TRANSFORMER) |
---|
676 | +<macro>(define-syntax IDENTIFIER TRANSFORMER)</macro> |
---|
677 | |
---|
678 | Defines a macro named {{IDENTIFIER}} that will transform an expression |
---|
679 | with {{IDENTIFIER}} in operator position according to {{TRANSFORMER}}. |
---|
680 | @@ -50,7 +50,7 @@ transformer procedure is undefined. |
---|
681 | |
---|
682 | ==== define-compiled-syntax |
---|
683 | |
---|
684 | - [syntax] (define-compiled-syntax IDENTIFIER TRANSFORMER) |
---|
685 | +<macro>(define-compiled-syntax IDENTIFIER TRANSFORMER)</macro> |
---|
686 | |
---|
687 | Equivalent to {{define-syntax}}, but when compiled, will also define the macro |
---|
688 | at runtime. |
---|
689 | @@ -58,7 +58,7 @@ at runtime. |
---|
690 | |
---|
691 | ==== syntax |
---|
692 | |
---|
693 | - [syntax] (syntax EXPRESSION) |
---|
694 | +<macro>(syntax EXPRESSION)</macro> |
---|
695 | |
---|
696 | Similar to {{quote}} but retains syntactical context information for |
---|
697 | embedded identifiers. |
---|
698 | @@ -66,7 +66,7 @@ embedded identifiers. |
---|
699 | |
---|
700 | ==== strip-syntax |
---|
701 | |
---|
702 | - [procedure] (strip-syntax EXPRESSION) |
---|
703 | +<procedure>(strip-syntax EXPRESSION)</procedure> |
---|
704 | |
---|
705 | Strips all syntactical information from {{EXPRESSION}}, returning a new expression |
---|
706 | where symbols have all context-information removed. |
---|
707 | @@ -241,8 +241,8 @@ CHICKEN's module system has the following features and shortcomings: |
---|
708 | |
---|
709 | ==== module |
---|
710 | |
---|
711 | - [syntax] (module NAME (EXPORT ...) BODY ...) |
---|
712 | - [syntax] (module NAME * BODY ...) |
---|
713 | +<macro>(module NAME (EXPORT ...) BODY ...)</macro><br> |
---|
714 | +<macro>(module NAME * BODY ...)</macro> |
---|
715 | |
---|
716 | Defines a module with the name {{NAME}}, a set of exported bindings |
---|
717 | and a contained sequence of toplevel expressions that are evaluated in |
---|
718 | @@ -278,7 +278,7 @@ will modify the original, imported definition. |
---|
719 | |
---|
720 | ==== export |
---|
721 | |
---|
722 | - [syntax] (export EXPORT ...) |
---|
723 | +<macro>(export EXPORT ...)</macro> |
---|
724 | |
---|
725 | Allows augmenting module-exports from inside the module-body. |
---|
726 | {{EXPORT}} is if the same form as an export-specifier in a |
---|
727 | @@ -287,7 +287,7 @@ Allows augmenting module-exports from inside the module-body. |
---|
728 | |
---|
729 | ==== import |
---|
730 | |
---|
731 | - [syntax] (import IMPORT ...) |
---|
732 | +<macro>(import IMPORT ...)</macro> |
---|
733 | |
---|
734 | Imports module bindings into the current syntactical environment. |
---|
735 | The visibility of any imported bindings is limited to the current |
---|
736 | @@ -339,7 +339,7 @@ Prefixes all imported identifiers with {{SYMBOL}}. |
---|
737 | |
---|
738 | ==== import-for-syntax |
---|
739 | |
---|
740 | - [syntax] (import-for-syntax IMPORT ...) |
---|
741 | +<macro>(import-for-syntax IMPORT ...)</macro> |
---|
742 | |
---|
743 | Similar to {{import}}, but imports exported bindings of a module into |
---|
744 | the environment in which macro transformers are evaluated. |
---|
745 | diff --git a/manual/Non-standard macros and special forms b/manual/Non-standard macros and special forms |
---|
746 | index b30bad0..43f9be8 100644 |
---|
747 | --- a/manual/Non-standard macros and special forms |
---|
748 | +++ b/manual/Non-standard macros and special forms |
---|
749 | @@ -8,7 +8,7 @@ |
---|
750 | |
---|
751 | ==== require-library |
---|
752 | |
---|
753 | - [syntax] (require-library ID ...) |
---|
754 | +<macro>(require-library ID ...)</macro> |
---|
755 | |
---|
756 | This form does all the necessary steps to make the libraries or extensions given |
---|
757 | in {{ID ...}} available. It loads syntactic extensions, if needed and generates |
---|
758 | @@ -47,7 +47,7 @@ See also: {{set-extension-specifier!}} |
---|
759 | |
---|
760 | ==== require-extension |
---|
761 | |
---|
762 | - [syntax] (require-extension ID ...) |
---|
763 | +<macro>(require-extension ID ...)</macro> |
---|
764 | |
---|
765 | This is equivalent to {{(require-library ID ...)}} but performs an implicit |
---|
766 | {{import}}. |
---|
767 | @@ -56,7 +56,7 @@ This implementation of {{require-extension}} is compliant with [[http://srfi.sch |
---|
768 | |
---|
769 | ==== use |
---|
770 | |
---|
771 | - [syntax] (use ID ...) |
---|
772 | +<macro>(use ID ...)</macro> |
---|
773 | |
---|
774 | {{use}} is just a shorter alias for {{require-extension}}. |
---|
775 | |
---|
776 | @@ -65,7 +65,7 @@ This implementation of {{require-extension}} is compliant with [[http://srfi.sch |
---|
777 | |
---|
778 | ==== optional |
---|
779 | |
---|
780 | - [syntax] (optional ARGS DEFAULT) |
---|
781 | +<macro>(optional ARGS DEFAULT)</macro> |
---|
782 | |
---|
783 | Use this form for procedures that take a single optional argument. If |
---|
784 | {{ARGS}} is the empty list {{DEFAULT}} is evaluated and |
---|
785 | @@ -79,7 +79,7 @@ an error if {{ARGS}} contains more than one value. |
---|
786 | </enscript> |
---|
787 | ==== case-lambda |
---|
788 | |
---|
789 | - [syntax] (case-lambda (LAMBDA-LIST1 EXP1 ...) ...) |
---|
790 | +<macro>(case-lambda (LAMBDA-LIST1 EXP1 ...) ...)</macro> |
---|
791 | |
---|
792 | Expands into a lambda that invokes the body following the first |
---|
793 | matching lambda-list. |
---|
794 | @@ -103,7 +103,7 @@ For more information see the documentation for |
---|
795 | |
---|
796 | ==== let-optionals |
---|
797 | |
---|
798 | - [syntax] (let-optionals ARGS ((VAR1 DEFAULT1) ...) BODY ...) |
---|
799 | +<macro> (let-optionals ARGS ((VAR1 DEFAULT1) ...) BODY ...)</macro> |
---|
800 | |
---|
801 | Binding constructs for optional procedure arguments. {{ARGS}} should |
---|
802 | be a rest-parameter taken from a lambda-list. {{let-optionals}} |
---|
803 | @@ -120,7 +120,7 @@ arguments are provided. |
---|
804 | |
---|
805 | ==== let-optionals* |
---|
806 | |
---|
807 | - [syntax] (let-optionals* ARGS ((VAR1 DEFAULT1) ... [RESTVAR]) BODY ...) |
---|
808 | +<macro> (let-optionals* ARGS ((VAR1 DEFAULT1) ... [RESTVAR]) BODY ...)</macro> |
---|
809 | |
---|
810 | Binding constructs for optional procedure arguments. {{ARGS}} should |
---|
811 | be a rest-parameter taken from a lambda-list. {{let-optionals}} |
---|
812 | @@ -141,7 +141,7 @@ an error if any excess arguments are provided. |
---|
813 | |
---|
814 | ==== and-let* |
---|
815 | |
---|
816 | - [syntax] (and-let* (BINDING ...) EXP1 EXP2 ...) |
---|
817 | +<macro>(and-let* (BINDING ...) EXP1 EXP2 ...)</macro> |
---|
818 | |
---|
819 | SRFI-2. Bind sequentially and execute body. {{BINDING}} can |
---|
820 | be a list of a variable and an expression, a list with a single |
---|
821 | @@ -156,8 +156,8 @@ result of the {{and-let*}} form. See also the documentation for |
---|
822 | |
---|
823 | ==== rec |
---|
824 | |
---|
825 | - [syntax] (rec NAME EXPRESSION) |
---|
826 | - [syntax] (rec (NAME VARIABLE ...) BODY ...) |
---|
827 | +<macro>(rec NAME EXPRESSION)</macro><br> |
---|
828 | +<macro>(rec (NAME VARIABLE ...) BODY ...)</macro> |
---|
829 | |
---|
830 | Allows simple definition of recursive definitions. {{(rec NAME EXPRESSION)}} is |
---|
831 | equivalent to {{(letrec ((NAME EXPRESSION)) NAME)}} and {{(rec (NAME VARIABLE ...) BODY ...)}} |
---|
832 | @@ -165,35 +165,35 @@ is the same as {{(letrec ((NAME (lambda (VARIABLE ...) BODY ...))) NAME)}}. |
---|
833 | |
---|
834 | ==== cut |
---|
835 | |
---|
836 | - [syntax] (cut SLOT ...) |
---|
837 | - [syntax] (cute SLOT ...) |
---|
838 | +<macro>(cut SLOT ...)</macro><br> |
---|
839 | +<macro>(cute SLOT ...)</macro> |
---|
840 | |
---|
841 | [[http://srfi.schemers.org/srfi-26/srfi-26.html|Syntactic sugar for specializing parameters]]. |
---|
842 | |
---|
843 | ==== define-values |
---|
844 | |
---|
845 | - [syntax] (define-values (NAME ...) EXP) |
---|
846 | +<macro>(define-values (NAME ...) EXP)</macro> |
---|
847 | |
---|
848 | Defines several variables at once, with the result values of expression |
---|
849 | {{EXP}}. |
---|
850 | |
---|
851 | ==== fluid-let |
---|
852 | |
---|
853 | - [syntax] (fluid-let ((VAR1 X1) ...) BODY ...) |
---|
854 | +<macro>(fluid-let ((VAR1 X1) ...) BODY ...)</macro> |
---|
855 | |
---|
856 | Binds the variables {{VAR1 ...}} dynamically to the values {{X1 ...}} |
---|
857 | during execution of {{BODY ...}}. |
---|
858 | |
---|
859 | ==== let-values |
---|
860 | |
---|
861 | - [syntax] (let-values (((NAME ...) EXP) ...) BODY ...) |
---|
862 | +<macro>(let-values (((NAME ...) EXP) ...) BODY ...)</macro> |
---|
863 | |
---|
864 | SRFI 11. Binds multiple variables to the result values of {{EXP ...}}. |
---|
865 | All variables are bound simultaneously. |
---|
866 | |
---|
867 | ==== let*-values |
---|
868 | |
---|
869 | - [syntax] (let*-values (((NAME ...) EXP) ...) BODY ...) |
---|
870 | +<macro>(let*-values (((NAME ...) EXP) ...) BODY ...)</macro> |
---|
871 | |
---|
872 | SRFI 11. Binds multiple variables to the result values of {{EXP ...}}. |
---|
873 | The variables are bound sequentially. |
---|
874 | @@ -206,7 +206,7 @@ The variables are bound sequentially. |
---|
875 | |
---|
876 | ==== letrec-values |
---|
877 | |
---|
878 | - [syntax] (letrec-values (((NAME ...) EXP) ...) BODY ...) |
---|
879 | +<macro>(letrec-values (((NAME ...) EXP) ...) BODY ...)</macro> |
---|
880 | |
---|
881 | Binds the result values of {{EXP ...}} to multiple variables at once. |
---|
882 | All variables are mutually recursive. |
---|
883 | @@ -221,7 +221,7 @@ All variables are mutually recursive. |
---|
884 | |
---|
885 | ==== parameterize |
---|
886 | |
---|
887 | - [syntax] (parameterize ((PARAMETER1 X1) ...) BODY ...) |
---|
888 | +<macro>(parameterize ((PARAMETER1 X1) ...) BODY ...)</macro> |
---|
889 | |
---|
890 | Binds the parameters {{PARAMETER1 ...}} dynamically to the values |
---|
891 | {{X1 ...}} during execution of {{BODY ...}}. (see also: |
---|
892 | @@ -230,8 +230,8 @@ expression that evaluates to a parameter procedure. |
---|
893 | |
---|
894 | ==== receive |
---|
895 | |
---|
896 | - [syntax] (receive (NAME1 ... [. NAMEn]) VALUEEXP BODY ...) |
---|
897 | - [syntax] (receive VALUEEXP) |
---|
898 | +<macro>(receive (NAME1 ... [. NAMEn]) VALUEEXP BODY ...)</macro><br> |
---|
899 | +<macro>(receive VALUEEXP)</macro> |
---|
900 | |
---|
901 | SRFI-8. Syntactic sugar for {{call-with-values}}. Binds variables |
---|
902 | to the result values of {{VALUEEXP}} and evaluates {{BODY ...}}. |
---|
903 | @@ -250,7 +250,7 @@ is equivalent to |
---|
904 | |
---|
905 | ==== set!-values |
---|
906 | |
---|
907 | - [syntax] (set!-values (NAME ...) EXP) |
---|
908 | +<macro>(set!-values (NAME ...) EXP)</macro> |
---|
909 | |
---|
910 | Assigns the result values of expression {{EXP}} to multiple |
---|
911 | variables. |
---|
912 | @@ -260,7 +260,7 @@ variables. |
---|
913 | |
---|
914 | ==== define-constant |
---|
915 | |
---|
916 | - [syntax] (define-constant NAME CONST) |
---|
917 | +<macro>(define-constant NAME CONST)</macro> |
---|
918 | |
---|
919 | Define a variable with a constant value, evaluated at compile-time. |
---|
920 | Any reference to such a |
---|
921 | @@ -277,8 +277,8 @@ This for should only be used at top-level. |
---|
922 | |
---|
923 | ==== define-inline |
---|
924 | |
---|
925 | - [syntax] (define-inline (NAME VAR ... [. VAR]) BODY ...) |
---|
926 | - [syntax] (define-inline NAME EXP) |
---|
927 | +<macro>(define-inline (NAME VAR ... [. VAR]) BODY ...)</macro><br> |
---|
928 | +<macro>(define-inline NAME EXP)</macro> |
---|
929 | |
---|
930 | Defines an inline procedure. Any occurrence of {{NAME}} will be |
---|
931 | replaced by {{EXP}} or {{(lambda (VAR ... [. VAR]) BODY ...)}}. |
---|
932 | @@ -295,8 +295,8 @@ definitions should only appear at toplevel. |
---|
933 | |
---|
934 | ==== define-for-syntax |
---|
935 | |
---|
936 | - [syntax] (define-for-syntax (NAME VAR ... [. VAR]) EXP1 ...) |
---|
937 | - [syntax] (define-for-syntax NAME [VALUE]) |
---|
938 | +<macro>(define-for-syntax (NAME VAR ... [. VAR]) EXP1 ...)</macro><br> |
---|
939 | +<macro>(define-for-syntax NAME [VALUE])</macro> |
---|
940 | |
---|
941 | Defines the toplevel variable {{NAME}} at macro-expansion time. This can |
---|
942 | be helpful when you want to define support procedures for use in macro-transformers, |
---|
943 | @@ -341,13 +341,13 @@ Allows definition local compiler macros, which are only applicable inside {{BODY |
---|
944 | |
---|
945 | ==== select |
---|
946 | |
---|
947 | - [syntax] (select EXP ((KEY ...) EXP1 ...) ... [(else EXPn ...)]) |
---|
948 | +<macro>(select EXP ((KEY ...) EXP1 ...) ... [(else EXPn ...)])</macro> |
---|
949 | |
---|
950 | This is similar to {{case}}, but the keys are evaluated. |
---|
951 | |
---|
952 | ==== unless |
---|
953 | |
---|
954 | - [syntax] (unless TEST EXP1 EXP2 ...) |
---|
955 | +<macro>(unless TEST EXP1 EXP2 ...)</macro> |
---|
956 | |
---|
957 | Equivalent to: |
---|
958 | |
---|
959 | @@ -357,7 +357,7 @@ Equivalent to: |
---|
960 | |
---|
961 | ==== when |
---|
962 | |
---|
963 | - [syntax] (when TEST EXP1 EXP2 ...) |
---|
964 | +<macro>(when TEST EXP1 EXP2 ...)</macro> |
---|
965 | |
---|
966 | Equivalent to: |
---|
967 | |
---|
968 | @@ -370,7 +370,7 @@ Equivalent to: |
---|
969 | |
---|
970 | ==== define-record |
---|
971 | |
---|
972 | - [syntax] (define-record NAME SLOTNAME ...) |
---|
973 | +<macro>(define-record NAME SLOTNAME ...)</macro> |
---|
974 | |
---|
975 | Defines a record type. Call {{make-NAME}} to create an instance |
---|
976 | of the structure (with one initialization-argument for each slot). |
---|
977 | @@ -389,7 +389,7 @@ and updated using {{(NAME-SLOTNAME-set!}} {{STRUCT}} {{VALUE)}}. |
---|
978 | |
---|
979 | ==== define-record-type |
---|
980 | |
---|
981 | - [syntax] (define-record-type NAME |
---|
982 | +<macro>(define-record-type NAME</macro><br> |
---|
983 | (CONSTRUCTOR TAG ...) |
---|
984 | PREDICATE |
---|
985 | (FIELD ACCESSOR [MODIFIER]) ...) |
---|
986 | @@ -400,8 +400,8 @@ SRFI-9 record types. For more information see the documentation for |
---|
987 | |
---|
988 | ==== define-record-printer |
---|
989 | |
---|
990 | - [syntax] (define-record-printer (NAME RECORDVAR PORTVAR) BODY ...) |
---|
991 | - [syntax] (define-record-printer NAME PROCEDURE) |
---|
992 | +<macro>(define-record-printer (NAME RECORDVAR PORTVAR) BODY ...)</macro><br> |
---|
993 | +<macro>(define-record-printer NAME PROCEDURE)</macro> |
---|
994 | |
---|
995 | Defines a printing method for record of the type {{NAME}} by |
---|
996 | associating a procedure with the record type. When a record of this |
---|
997 | @@ -430,7 +430,7 @@ s ==> "#,(foo 1 2 3)" |
---|
998 | |
---|
999 | ==== assert |
---|
1000 | |
---|
1001 | - [syntax] (assert EXP [STRING ARG ...]) |
---|
1002 | +<macro>(assert EXP [STRING ARG ...])</macro> |
---|
1003 | |
---|
1004 | Signals an error if {{EXP}} evaluates to false. An optional message |
---|
1005 | {{STRING}} and arguments {{ARG ...}} may be supplied to give a |
---|
1006 | @@ -442,7 +442,7 @@ The result is the value of {{EXP}}. |
---|
1007 | |
---|
1008 | ==== begin-for-syntax |
---|
1009 | |
---|
1010 | - [syntax] (begin-for-syntax EXP ...) |
---|
1011 | +<macro>(begin-for-syntax EXP ...)</macro> |
---|
1012 | |
---|
1013 | Equivalent to {{(begin EXP ...)}}, but performs the evaluation of |
---|
1014 | the expression during macro-expansion time. |
---|
1015 | @@ -450,7 +450,7 @@ the expression during macro-expansion time. |
---|
1016 | |
---|
1017 | ==== cond-expand |
---|
1018 | |
---|
1019 | - [syntax] (cond-expand FEATURE-CLAUSE ...) |
---|
1020 | +<macro>(cond-expand FEATURE-CLAUSE ...)</macro> |
---|
1021 | |
---|
1022 | Expands by selecting feature clauses. This form is allowed to appear in non-toplevel expressions. |
---|
1023 | |
---|
1024 | @@ -470,7 +470,7 @@ For further information, see the documentation for [[http://srfi.schemers.org/sr |
---|
1025 | |
---|
1026 | ==== ensure |
---|
1027 | |
---|
1028 | - [syntax] (ensure PREDICATE EXP [ARGUMENTS ...]) |
---|
1029 | +<macro>(ensure PREDICATE EXP [ARGUMENTS ...])</macro> |
---|
1030 | |
---|
1031 | Evaluates the expression {{EXP}} and applies the one-argument |
---|
1032 | procedure {{PREDICATE}} to the result. If the predicate returns |
---|
1033 | @@ -485,7 +485,7 @@ with the offending value and {{PREDICATE}} expression. |
---|
1034 | |
---|
1035 | ==== eval-when |
---|
1036 | |
---|
1037 | - [syntax] (eval-when (SITUATION ...) EXP ...) |
---|
1038 | +<macro>(eval-when (SITUATION ...) EXP ...)</macro> |
---|
1039 | |
---|
1040 | Controls evaluation/compilation of subforms. {{SITUATION}} should |
---|
1041 | be one of the symbols {{eval}}, {{compile}} or {{load}}. |
---|
1042 | @@ -508,7 +508,7 @@ The following table should make this clearer: |
---|
1043 | |
---|
1044 | ==== include |
---|
1045 | |
---|
1046 | - [syntax] (include STRING) |
---|
1047 | +<macro>(include STRING)</macro> |
---|
1048 | |
---|
1049 | Include toplevel-expressions from the given source file in the currently |
---|
1050 | compiled/interpreted program. If the included file has the extension |
---|
1051 | @@ -518,14 +518,14 @@ current directory and, if not found, in all directories specified in the |
---|
1052 | |
---|
1053 | ==== nth-value |
---|
1054 | |
---|
1055 | - [syntax] (nth-value N EXP) |
---|
1056 | +<macro>(nth-value N EXP)</macro> |
---|
1057 | |
---|
1058 | Returns the {{N}}th value (counting from zero) of the values returned |
---|
1059 | by expression {{EXP}}. |
---|
1060 | |
---|
1061 | ==== time |
---|
1062 | |
---|
1063 | - [syntax] (time EXP1 ...) |
---|
1064 | +<macro>(time EXP1 ...)</macro> |
---|
1065 | |
---|
1066 | Evaluates {{EXP1 ...}} and prints elapsed time and some |
---|
1067 | values about GC use, like time spent in major GCs, number of minor |
---|
1068 | diff --git a/manual/Other support procedures b/manual/Other support procedures |
---|
1069 | index 23d915b..2866a38 100644 |
---|
1070 | --- a/manual/Other support procedures |
---|
1071 | +++ b/manual/Other support procedures |
---|
1072 | @@ -5,7 +5,7 @@ |
---|
1073 | |
---|
1074 | === argc+argv |
---|
1075 | |
---|
1076 | - [procedure] (argc+argv) |
---|
1077 | +<procedure>(argc+argv)</procedure> |
---|
1078 | |
---|
1079 | Returns two values: an integer and a foreign-pointer object representing the {{argc}} |
---|
1080 | and {{argv}} arguments passed to the current process. |
---|
1081 | diff --git a/manual/Parameters b/manual/Parameters |
---|
1082 | index b1c7d7c..aa8ddc5 100644 |
---|
1083 | --- a/manual/Parameters |
---|
1084 | +++ b/manual/Parameters |
---|
1085 | @@ -25,7 +25,7 @@ CHICKEN implements [[http://srfi.schemers.org/srfi-39/srfi-39.html|SRFI-39]]. |
---|
1086 | |
---|
1087 | === make-parameter |
---|
1088 | |
---|
1089 | - [procedure] (make-parameter VALUE [GUARD]) |
---|
1090 | +<procedure>(make-parameter VALUE [GUARD])</procedure> |
---|
1091 | |
---|
1092 | Returns a procedure that accepts zero or one argument. Invoking the |
---|
1093 | procedure with zero arguments returns {{VALUE}}. Invoking the |
---|
1094 | diff --git a/manual/Unit data-structures b/manual/Unit data-structures |
---|
1095 | index dd50f23..34df6e4 100644 |
---|
1096 | --- a/manual/Unit data-structures |
---|
1097 | +++ b/manual/Unit data-structures |
---|
1098 | @@ -12,7 +12,7 @@ structures. |
---|
1099 | |
---|
1100 | ==== alist-ref |
---|
1101 | |
---|
1102 | - [procedure] (alist-ref KEY ALIST [TEST [DEFAULT]]) |
---|
1103 | +<procedure>(alist-ref KEY ALIST [TEST [DEFAULT]])</procedure> |
---|
1104 | |
---|
1105 | Looks up {{KEY}} in {{ALIST}} using {{TEST}} as the comparison function (or {{eqv?}} if |
---|
1106 | no test was given) and returns the cdr of the found pair, or {{DEFAULT}} (which defaults to {{#f}}). |
---|
1107 | @@ -20,7 +20,7 @@ no test was given) and returns the cdr of the found pair, or {{DEFAULT}} (which |
---|
1108 | |
---|
1109 | ==== alist-update! |
---|
1110 | |
---|
1111 | - [procedure] (alist-update! KEY VALUE ALIST [TEST]) |
---|
1112 | +<procedure>(alist-update! KEY VALUE ALIST [TEST])</procedure> |
---|
1113 | |
---|
1114 | If the list {{ALIST}} contains a pair of the form {{(KEY . X)}}, then this procedure |
---|
1115 | replaces {{X}} with {{VALUE}} and returns {{ALIST}}. If {{ALIST}} contains no such item, then |
---|
1116 | @@ -31,7 +31,7 @@ and defaults to {{eqv?}}. |
---|
1117 | |
---|
1118 | ==== atom? |
---|
1119 | |
---|
1120 | - [procedure] (atom? X) |
---|
1121 | +<procedure>(atom? X)</procedure> |
---|
1122 | |
---|
1123 | Returns {{#t}} if {{X}} is not a pair. This is identical to {{not-pair?}} from [[Unit srfi-1]] but |
---|
1124 | kept for historical reasons. |
---|
1125 | @@ -39,7 +39,7 @@ kept for historical reasons. |
---|
1126 | |
---|
1127 | ==== rassoc |
---|
1128 | |
---|
1129 | - [procedure] (rassoc KEY LIST [TEST]) |
---|
1130 | +<procedure>(rassoc KEY LIST [TEST])</procedure> |
---|
1131 | |
---|
1132 | Similar to {{assoc}}, but compares {{KEY}} with the {{cdr}} of each pair in {{LIST}} using |
---|
1133 | {{TEST}} as the comparison procedures (which defaults to {{eqv?}}. |
---|
1134 | @@ -47,14 +47,14 @@ Similar to {{assoc}}, but compares {{KEY}} with the {{cdr}} of each pair in {{LI |
---|
1135 | |
---|
1136 | ==== butlast |
---|
1137 | |
---|
1138 | - [procedure] (butlast LIST) |
---|
1139 | +<procedure>(butlast LIST)</procedure> |
---|
1140 | |
---|
1141 | Returns a fresh list with all elements but the last of {{LIST}}. |
---|
1142 | |
---|
1143 | |
---|
1144 | ==== chop |
---|
1145 | |
---|
1146 | - [procedure] (chop LIST N) |
---|
1147 | +<procedure>(chop LIST N)</procedure> |
---|
1148 | |
---|
1149 | Returns a new list of sublists, where each sublist contains {{N}} |
---|
1150 | elements of {{LIST}}. If {{LIST}} has a length that is not |
---|
1151 | @@ -69,7 +69,7 @@ elements. |
---|
1152 | |
---|
1153 | ==== compress |
---|
1154 | |
---|
1155 | - [procedure] (compress BLIST LIST) |
---|
1156 | +<procedure>(compress BLIST LIST)</procedure> |
---|
1157 | |
---|
1158 | Returns a new list with elements taken from {{LIST}} with |
---|
1159 | corresponding true values in the list {{BLIST}}. |
---|
1160 | @@ -82,7 +82,7 @@ corresponding true values in the list {{BLIST}}. |
---|
1161 | |
---|
1162 | ==== flatten |
---|
1163 | |
---|
1164 | - [procedure] (flatten LIST1 ...) |
---|
1165 | +<procedure>(flatten LIST1 ...)</procedure> |
---|
1166 | |
---|
1167 | Returns {{LIST1 ...}} concatenated together, with nested lists |
---|
1168 | removed (flattened). |
---|
1169 | @@ -90,14 +90,14 @@ removed (flattened). |
---|
1170 | |
---|
1171 | ==== intersperse |
---|
1172 | |
---|
1173 | - [procedure] (intersperse LIST X) |
---|
1174 | +<procedure>(intersperse LIST X)</procedure> |
---|
1175 | |
---|
1176 | Returns a new list with {{X}} placed between each element. |
---|
1177 | |
---|
1178 | |
---|
1179 | ==== join |
---|
1180 | |
---|
1181 | - [procedure] (join LISTOFLISTS [LIST]) |
---|
1182 | +<procedure>(join LISTOFLISTS [LIST])</procedure> |
---|
1183 | |
---|
1184 | Concatenates the lists in {{LISTOFLISTS}} with {{LIST}} placed |
---|
1185 | between each sublist. {{LIST}} defaults to the empty list. |
---|
1186 | @@ -117,7 +117,7 @@ between each sublist. {{LIST}} defaults to the empty list. |
---|
1187 | |
---|
1188 | ==== shuffle |
---|
1189 | |
---|
1190 | - [procedure] (shuffle LIST RANDOM) |
---|
1191 | +<procedure>(shuffle LIST RANDOM)</procedure> |
---|
1192 | |
---|
1193 | Returns {{LIST}} with its elements sorted in a random order given by |
---|
1194 | procedure {{RANDOM}}. |
---|
1195 | @@ -125,7 +125,7 @@ procedure {{RANDOM}}. |
---|
1196 | |
---|
1197 | ==== tail? |
---|
1198 | |
---|
1199 | - [procedure] (tail? X LIST) |
---|
1200 | +<procedure>(tail? X LIST)</procedure> |
---|
1201 | |
---|
1202 | Returns true if {{X}} is one of the tails (cdr's) of {{LIST}}. |
---|
1203 | |
---|
1204 | @@ -134,7 +134,7 @@ Returns true if {{X}} is one of the tails (cdr's) of {{LIST}}. |
---|
1205 | |
---|
1206 | ==== list->queue |
---|
1207 | |
---|
1208 | - [procedure] (list->queue LIST) |
---|
1209 | +<procedure>(list->queue LIST)</procedure> |
---|
1210 | |
---|
1211 | Returns {{LIST}} converted into a queue, where the first element |
---|
1212 | of the list is the same as the first element of the queue. The resulting |
---|
1213 | @@ -144,21 +144,21 @@ after this operation. |
---|
1214 | |
---|
1215 | ==== make-queue |
---|
1216 | |
---|
1217 | - [procedure] (make-queue) |
---|
1218 | +<procedure>(make-queue)</procedure> |
---|
1219 | |
---|
1220 | Returns a newly created queue. |
---|
1221 | |
---|
1222 | |
---|
1223 | ==== queue? |
---|
1224 | |
---|
1225 | - [procedure] (queue? X) |
---|
1226 | +<procedure>(queue? X)</procedure> |
---|
1227 | |
---|
1228 | Returns {{#t}} if {{X}} is a queue, or {{#f}} otherwise. |
---|
1229 | |
---|
1230 | |
---|
1231 | ==== queue->list |
---|
1232 | |
---|
1233 | - [procedure] (queue->list QUEUE) |
---|
1234 | +<procedure>(queue->list QUEUE)</procedure> |
---|
1235 | |
---|
1236 | Returns {{QUEUE}} converted into a list, where the first element |
---|
1237 | of the list is the same as the first element of the queue. The resulting |
---|
1238 | @@ -167,21 +167,21 @@ list may share memory with the queue object and should not be modified. |
---|
1239 | |
---|
1240 | ==== queue-add! |
---|
1241 | |
---|
1242 | - [procedure] (queue-add! QUEUE X) |
---|
1243 | +<procedure>(queue-add! QUEUE X)</procedure> |
---|
1244 | |
---|
1245 | Adds {{X}} to the rear of {{QUEUE}}. |
---|
1246 | |
---|
1247 | |
---|
1248 | ==== queue-empty? |
---|
1249 | |
---|
1250 | - [procedure] (queue-empty? QUEUE) |
---|
1251 | +<procedure>(queue-empty? QUEUE)</procedure> |
---|
1252 | |
---|
1253 | Returns {{#t}} if {{QUEUE}} is empty, or {{#f}} otherwise. |
---|
1254 | |
---|
1255 | |
---|
1256 | ==== queue-first |
---|
1257 | |
---|
1258 | - [procedure] (queue-first QUEUE) |
---|
1259 | +<procedure>(queue-first QUEUE)</procedure> |
---|
1260 | |
---|
1261 | Returns the first element of {{QUEUE}}. If {{QUEUE}} is empty |
---|
1262 | an error is signaled |
---|
1263 | @@ -189,7 +189,7 @@ an error is signaled |
---|
1264 | |
---|
1265 | ==== queue-last |
---|
1266 | |
---|
1267 | - [procedure] (queue-last QUEUE) |
---|
1268 | +<procedure>(queue-last QUEUE)</procedure> |
---|
1269 | |
---|
1270 | Returns the last element of {{QUEUE}}. If {{QUEUE}} is empty |
---|
1271 | an error is signaled |
---|
1272 | @@ -197,7 +197,7 @@ an error is signaled |
---|
1273 | |
---|
1274 | ==== queue-remove! |
---|
1275 | |
---|
1276 | - [procedure] (queue-remove! QUEUE) |
---|
1277 | +<procedure>(queue-remove! QUEUE)</procedure> |
---|
1278 | |
---|
1279 | Removes and returns the first element of {{QUEUE}}. If {{QUEUE}} |
---|
1280 | is empty an error is signaled |
---|
1281 | @@ -205,7 +205,7 @@ is empty an error is signaled |
---|
1282 | |
---|
1283 | ==== queue-push-back! |
---|
1284 | |
---|
1285 | - [procedure] (queue-push-back! QUEUE ITEM) |
---|
1286 | +<procedure>(queue-push-back! QUEUE ITEM)</procedure> |
---|
1287 | |
---|
1288 | Pushes an item into the first position of a queue, i.e. the next |
---|
1289 | {{queue-remove!}} will return {{ITEM}}. |
---|
1290 | @@ -213,7 +213,7 @@ Pushes an item into the first position of a queue, i.e. the next |
---|
1291 | |
---|
1292 | ==== queue-push-back-list! |
---|
1293 | |
---|
1294 | - [procedure] (queue-push-back-list! QUEUE LIST) |
---|
1295 | +<procedure>(queue-push-back-list! QUEUE LIST)</procedure> |
---|
1296 | |
---|
1297 | Pushes the items in item-list back onto the queue, |
---|
1298 | so that {{(car LIST)}} becomes the next removable item. |
---|
1299 | @@ -225,8 +225,8 @@ so that {{(car LIST)}} becomes the next removable item. |
---|
1300 | |
---|
1301 | ==== merge |
---|
1302 | |
---|
1303 | - [procedure] (merge LIST1 LIST2 LESS?) |
---|
1304 | - [procedure] (merge! LIST1 LIST2 LESS?) |
---|
1305 | +<procedure>(merge LIST1 LIST2 LESS?)</procedure><br> |
---|
1306 | +<procedure>(merge! LIST1 LIST2 LESS?)</procedure> |
---|
1307 | |
---|
1308 | Joins two lists in sorted order. {{merge!}} is the destructive |
---|
1309 | version of merge. {{LESS? }} should be a procedure of two arguments, |
---|
1310 | @@ -236,8 +236,8 @@ second argument. |
---|
1311 | |
---|
1312 | ==== sort |
---|
1313 | |
---|
1314 | - [procedure] (sort SEQUENCE LESS?) |
---|
1315 | - [procedure] (sort! SEQUENCE LESS?) |
---|
1316 | +<procedure>(sort SEQUENCE LESS?)</procedure><br> |
---|
1317 | +<procedure>(sort! SEQUENCE LESS?)</procedure> |
---|
1318 | |
---|
1319 | Sort {{SEQUENCE}}, which should be a list or a vector. {{sort!}} |
---|
1320 | is the destructive version of sort. |
---|
1321 | @@ -249,7 +249,6 @@ is the destructive version of sort. |
---|
1322 | |
---|
1323 | Returns true if the list or vector {{SEQUENCE}} is already sorted. |
---|
1324 | |
---|
1325 | - |
---|
1326 | ==== topological-sort |
---|
1327 | |
---|
1328 | [procedure] (topological-sort DAG PRED) |
---|
1329 | @@ -288,7 +287,7 @@ Time complexity: O (|V| + |E|) |
---|
1330 | |
---|
1331 | ==== conc |
---|
1332 | |
---|
1333 | - [procedure] (conc X ...) |
---|
1334 | +<procedure>(conc X ...)</procedure> |
---|
1335 | |
---|
1336 | Returns a string with the string-represenation of all arguments concatenated |
---|
1337 | together. {{conc}} could be implemented as |
---|
1338 | @@ -302,14 +301,14 @@ together. {{conc}} could be implemented as |
---|
1339 | |
---|
1340 | ==== ->string |
---|
1341 | |
---|
1342 | - [procedure] (->string X) |
---|
1343 | +<procedure>(->string X)</procedure> |
---|
1344 | |
---|
1345 | Returns a string-representation of {{X}}. |
---|
1346 | |
---|
1347 | |
---|
1348 | ==== string-chop |
---|
1349 | |
---|
1350 | - [procedure] (string-chop STRING LENGTH) |
---|
1351 | +<procedure>(string-chop STRING LENGTH)</procedure> |
---|
1352 | |
---|
1353 | Returns a list of substrings taken by ''chopping'' {{STRING}} every {{LENGTH}} |
---|
1354 | characters: |
---|
1355 | @@ -322,7 +321,7 @@ characters: |
---|
1356 | |
---|
1357 | ==== string-chomp |
---|
1358 | |
---|
1359 | - [procedure] (string-chomp STRING [SUFFIX]) |
---|
1360 | +<procedure>(string-chomp STRING [SUFFIX])</procedure> |
---|
1361 | |
---|
1362 | If {{STRING}} ends with {{SUFFIX}}, then this procedure returns a copy of its first argument with the suffix |
---|
1363 | removed, otherwise returns {{STRING}} unchanged. {{SUFFIX}} defaults to {{"\n"}}. |
---|
1364 | @@ -330,8 +329,8 @@ removed, otherwise returns {{STRING}} unchanged. {{SUFFIX}} defaults to {{"\n"}} |
---|
1365 | |
---|
1366 | ==== string-compare3 |
---|
1367 | |
---|
1368 | - [procedure] (string-compare3 STRING1 STRING2) |
---|
1369 | - [procedure] (string-compare3-ci STRING1 STRING2) |
---|
1370 | +<procedure>(string-compare3 STRING1 STRING2)</procedure><br> |
---|
1371 | +<procedure>(string-compare3-ci STRING1 STRING2)</procedure> |
---|
1372 | |
---|
1373 | Perform a three-way comparison between the {{STRING1}} and {{STRING2}}, |
---|
1374 | returning either {{-1}} if {{STRING1}} is lexicographically less |
---|
1375 | @@ -341,7 +340,7 @@ than {{STRING2}}, {{0}} if it is equal, or {{1}} if it s greater. |
---|
1376 | |
---|
1377 | ==== string-intersperse |
---|
1378 | |
---|
1379 | - [procedure] (string-intersperse LIST [STRING]) |
---|
1380 | +<procedure>(string-intersperse LIST [STRING])</procedure> |
---|
1381 | |
---|
1382 | Returns a string that contains all strings in {{LIST}} concatenated |
---|
1383 | together. {{STRING}} is placed between each concatenated string and |
---|
1384 | @@ -360,7 +359,7 @@ is equivalent to |
---|
1385 | |
---|
1386 | ==== string-split |
---|
1387 | |
---|
1388 | - [procedure] (string-split STRING [DELIMITER-STRING [KEEPEMPTY]]) |
---|
1389 | +<procedure>(string-split STRING [DELIMITER-STRING [KEEPEMPTY]])</procedure> |
---|
1390 | |
---|
1391 | Split string into substrings separated by the given delimiters. If |
---|
1392 | no delimiters are specified, a string comprising the tab, newline and space characters |
---|
1393 | @@ -376,7 +375,7 @@ substrings are retained: |
---|
1394 | |
---|
1395 | ==== string-translate |
---|
1396 | |
---|
1397 | - [procedure] (string-translate STRING FROM [TO]) |
---|
1398 | +<procedure>(string-translate STRING FROM [TO])</procedure> |
---|
1399 | |
---|
1400 | Returns a fresh copy of {{STRING}} with characters matching |
---|
1401 | {{FROM}} translated to {{TO}}. If {{TO}} is omitted, then |
---|
1402 | @@ -388,7 +387,7 @@ as the matching character in {{FROM}} is substituted. |
---|
1403 | |
---|
1404 | ==== string-translate* |
---|
1405 | |
---|
1406 | - [procedure] (string-translate* STRING SMAP) |
---|
1407 | +<procedure>(string-translate* STRING SMAP)</procedure> |
---|
1408 | |
---|
1409 | Substitutes elements of {{STRING}} according to {{SMAP}}. |
---|
1410 | {{SMAP}} should be an association-list where each element of the list |
---|
1411 | @@ -406,8 +405,8 @@ the string {{MATCH}} in {{STRING}} will be replaced by the string |
---|
1412 | |
---|
1413 | ==== substring=? |
---|
1414 | |
---|
1415 | - [procedure] (substring=? STRING1 STRING2 [START1 [START2 [LENGTH]]]) |
---|
1416 | - [procedure] (substring-ci=? STRING1 STRING2 [START1 [START2 [LENGTH]]]) |
---|
1417 | +<procedure>(substring=? STRING1 STRING2 [START1 [START2 [LENGTH]]])</procedure><br> |
---|
1418 | +<procedure>(substring-ci=? STRING1 STRING2 [START1 [START2 [LENGTH]]])</procedure> |
---|
1419 | |
---|
1420 | Returns {{#t}} if the strings {{STRING1}} and {{STRING2}} are equal, or |
---|
1421 | {{#f}} otherwise. |
---|
1422 | @@ -418,8 +417,8 @@ length of both strings). |
---|
1423 | |
---|
1424 | ==== substring-index |
---|
1425 | |
---|
1426 | - [procedure] (substring-index WHICH WHERE [START]) |
---|
1427 | - [procedure] (substring-index-ci WHICH WHERE [START]) |
---|
1428 | +<procedure>(substring-index WHICH WHERE [START])</procedure><br> |
---|
1429 | +<procedure>(substring-index-ci WHICH WHERE [START])</procedure> |
---|
1430 | |
---|
1431 | Searches for first index in string {{WHERE}} where string |
---|
1432 | {{WHICH}} occurs. If the optional argument {{START}} is given, |
---|
1433 | @@ -429,7 +428,7 @@ is a case-insensitive version of {{substring-index}}. |
---|
1434 | |
---|
1435 | ==== reverse-string-append |
---|
1436 | |
---|
1437 | - [procedure] (reverse-string-append LIST) |
---|
1438 | +<procedure>(reverse-string-append LIST)</procedure> |
---|
1439 | |
---|
1440 | {{(apply string-append (reverse LIST))}} |
---|
1441 | |
---|
1442 | @@ -439,35 +438,35 @@ is a case-insensitive version of {{substring-index}}. |
---|
1443 | |
---|
1444 | ==== any? |
---|
1445 | |
---|
1446 | - [procedure] (any? X) |
---|
1447 | +<procedure>(any? X)</procedure> |
---|
1448 | |
---|
1449 | Ignores its argument and always returns {{#t}}. This is actually useful sometimes. |
---|
1450 | |
---|
1451 | |
---|
1452 | ==== none? |
---|
1453 | |
---|
1454 | - [procedure] (none? X) |
---|
1455 | +<procedure>(none? X)</procedure> |
---|
1456 | |
---|
1457 | Ignores its argument and always returns {{#f}}. This is actually useful sometimes. |
---|
1458 | |
---|
1459 | |
---|
1460 | ==== always? |
---|
1461 | |
---|
1462 | - [procedure] (always? X) |
---|
1463 | +<procedure>(always? X)</procedure> |
---|
1464 | |
---|
1465 | Ignores its arguments and always returns {{#t}}. This is actually useful sometimes. |
---|
1466 | |
---|
1467 | |
---|
1468 | ==== never? |
---|
1469 | |
---|
1470 | - [procedure] (never? X) |
---|
1471 | +<procedure>(never? X)</procedure> |
---|
1472 | |
---|
1473 | Ignores its arguments and always returns {{#f}}. This is actually useful sometimes. |
---|
1474 | |
---|
1475 | |
---|
1476 | ==== constantly |
---|
1477 | |
---|
1478 | - [procedure] (constantly X ...) |
---|
1479 | +<procedure>(constantly X ...)</procedure> |
---|
1480 | |
---|
1481 | Returns a procedure that always returns the values {{X ...}} regardless of the number and value of its arguments. |
---|
1482 | |
---|
1483 | @@ -478,7 +477,7 @@ Returns a procedure that always returns the values {{X ...}} regardless of the n |
---|
1484 | |
---|
1485 | ==== complement |
---|
1486 | |
---|
1487 | - [procedure] (complement PROC) |
---|
1488 | +<procedure>(complement PROC)</procedure> |
---|
1489 | |
---|
1490 | Returns a procedure that returns the boolean inverse of {{PROC}}. |
---|
1491 | |
---|
1492 | @@ -489,7 +488,7 @@ Returns a procedure that returns the boolean inverse of {{PROC}}. |
---|
1493 | |
---|
1494 | ==== compose |
---|
1495 | |
---|
1496 | - [procedure] (compose PROC1 PROC2 ...) |
---|
1497 | +<procedure>(compose PROC1 PROC2 ...)</procedure> |
---|
1498 | |
---|
1499 | Returns a procedure that represents the composition of the |
---|
1500 | argument-procedures {{PROC1 PROC2 ...}}. |
---|
1501 | @@ -506,7 +505,7 @@ argument-procedures {{PROC1 PROC2 ...}}. |
---|
1502 | |
---|
1503 | ==== conjoin |
---|
1504 | |
---|
1505 | - [procedure] (conjoin PRED ...) |
---|
1506 | +<procedure>(conjoin PRED ...)</procedure> |
---|
1507 | |
---|
1508 | Returns a procedure that returns {{#t}} if its argument satisfies the |
---|
1509 | predicates {{PRED ...}}. |
---|
1510 | @@ -518,7 +517,7 @@ predicates {{PRED ...}}. |
---|
1511 | |
---|
1512 | ==== disjoin |
---|
1513 | |
---|
1514 | - [procedure] (disjoin PRED ...) |
---|
1515 | +<procedure>(disjoin PRED ...)</procedure> |
---|
1516 | |
---|
1517 | Returns a procedure that returns {{#t}} if its argument satisfies any |
---|
1518 | predicate {{PRED ...}}. |
---|
1519 | @@ -530,7 +529,7 @@ predicate {{PRED ...}}. |
---|
1520 | |
---|
1521 | ==== each |
---|
1522 | |
---|
1523 | - [procedure] (each PROC ...) |
---|
1524 | +<procedure>(each PROC ...)</procedure> |
---|
1525 | |
---|
1526 | Returns a procedure that applies {{PROC ...}} to its arguments, and returns the result(s) |
---|
1527 | of the last procedure application. For example |
---|
1528 | @@ -553,7 +552,7 @@ is equivalent to |
---|
1529 | |
---|
1530 | ==== flip |
---|
1531 | |
---|
1532 | - [procedure] (flip PROC) |
---|
1533 | +<procedure>(flip PROC)</procedure> |
---|
1534 | |
---|
1535 | Returns a two-argument procedure that calls {{PROC}} with its |
---|
1536 | arguments swapped: |
---|
1537 | @@ -564,21 +563,21 @@ arguments swapped: |
---|
1538 | |
---|
1539 | ==== identity |
---|
1540 | |
---|
1541 | - [procedure] (identity X) |
---|
1542 | +<procedure>(identity X)</procedure> |
---|
1543 | |
---|
1544 | Returns its sole argument {{X}}. |
---|
1545 | |
---|
1546 | |
---|
1547 | ==== project |
---|
1548 | |
---|
1549 | - [procedure] (project N) |
---|
1550 | +<procedure>(project N)</procedure> |
---|
1551 | |
---|
1552 | Returns a procedure that returns its {{N}}th argument (starting from 0). |
---|
1553 | |
---|
1554 | |
---|
1555 | ==== list-of? |
---|
1556 | |
---|
1557 | - [procedure] (list-of? PRED) |
---|
1558 | +<procedure>(list-of? PRED)</procedure> |
---|
1559 | |
---|
1560 | Returns a procedure of one argument that returns {{#t}} when |
---|
1561 | applied to a list of elements that all satisfy the predicate procedure |
---|
1562 | @@ -592,14 +591,14 @@ applied to a list of elements that all satisfy the predicate procedure |
---|
1563 | |
---|
1564 | ==== noop |
---|
1565 | |
---|
1566 | - [procedure] (noop X ...) |
---|
1567 | +<procedure>(noop X ...)</procedure> |
---|
1568 | |
---|
1569 | Ignores its arguments, does nothing and returns an unspecified value. |
---|
1570 | |
---|
1571 | |
---|
1572 | ==== o |
---|
1573 | |
---|
1574 | - [procedure] (o PROC ...) |
---|
1575 | +<procedure>(o PROC ...)</procedure> |
---|
1576 | |
---|
1577 | A single value version of {{compose}} (slightly faster). {{(o)}} is equivalent |
---|
1578 | to {{identity}}. |
---|
1579 | @@ -607,7 +606,7 @@ to {{identity}}. |
---|
1580 | |
---|
1581 | ==== left-section |
---|
1582 | |
---|
1583 | - [procedure] (left-section PROC ARG0 ...) |
---|
1584 | +<procedure>(left-section PROC ARG0 ...)</procedure> |
---|
1585 | |
---|
1586 | Returns a procedure that partially applies some of its arguments starting from the left. |
---|
1587 | |
---|
1588 | @@ -618,7 +617,7 @@ Returns a procedure that partially applies some of its arguments starting from t |
---|
1589 | |
---|
1590 | ==== right-section |
---|
1591 | |
---|
1592 | - [procedure] (right-section PROC ARG0 ...) |
---|
1593 | +<procedure>(right-section PROC ARG0 ...)</procedure> |
---|
1594 | |
---|
1595 | Returns a procedure that partially applies some of its arguments starting from the right. |
---|
1596 | |
---|
1597 | @@ -633,7 +632,7 @@ Returns a procedure that partially applies some of its arguments starting from t |
---|
1598 | |
---|
1599 | ==== binary-search |
---|
1600 | |
---|
1601 | - [procedure] (binary-search SEQUENCE PROC) |
---|
1602 | +<procedure>(binary-search SEQUENCE PROC)</procedure> |
---|
1603 | |
---|
1604 | Performs a binary search in {{SEQUENCE}}, which should be a sorted |
---|
1605 | list or vector. {{PROC}} is called to compare items in the sequence, |
---|
1606 | diff --git a/manual/Unit eval b/manual/Unit eval |
---|
1607 | index aa10955..f92997c 100644 |
---|
1608 | --- a/manual/Unit eval |
---|
1609 | +++ b/manual/Unit eval |
---|
1610 | @@ -11,7 +11,7 @@ option. |
---|
1611 | |
---|
1612 | ==== load |
---|
1613 | |
---|
1614 | - [procedure] (load FILE [EVALPROC]) |
---|
1615 | +<procedure>(load FILE [EVALPROC])</procedure> |
---|
1616 | |
---|
1617 | Loads and evaluates expressions from the given source file, which may |
---|
1618 | be either a string or an input port. Each expression read is passed to |
---|
1619 | @@ -42,14 +42,14 @@ Support for reloading compiled code dynamically is still experimental. |
---|
1620 | |
---|
1621 | ==== load-relative |
---|
1622 | |
---|
1623 | - [procedure] (load-relative FILE [EVALPROC]) |
---|
1624 | +<procedure>(load-relative FILE [EVALPROC])</procedure> |
---|
1625 | |
---|
1626 | Similar to {{load}}, but loads {{FILE}} relative to the path |
---|
1627 | of the currently loaded file. |
---|
1628 | |
---|
1629 | ==== load-noisily |
---|
1630 | |
---|
1631 | - [procedure] (load-noisily FILE #!key EVALUATOR TIME PRINTER) |
---|
1632 | +<procedure>(load-noisily FILE #!key EVALUATOR TIME PRINTER)</procedure> |
---|
1633 | |
---|
1634 | As {{load}} but the result(s) of each evaluated toplevel-expression |
---|
1635 | is written to standard output. If {{EVALUATOR}} is given and not {{#f}}, |
---|
1636 | @@ -63,7 +63,7 @@ argument, which should be a one-argument procedure. |
---|
1637 | See also the [[http://chicken.wiki.br/Parameters#load-verbose|load-verbose]] parameter. |
---|
1638 | ==== load-library |
---|
1639 | |
---|
1640 | - [procedure] (load-library UNIT [LIBRARYFILE]) |
---|
1641 | +<procedure>(load-library UNIT [LIBRARYFILE])</procedure> |
---|
1642 | |
---|
1643 | On platforms that support dynamic loading, {{load-library}} loads |
---|
1644 | the compiled library unit {{UNIT}} (which should be a symbol). If the |
---|
1645 | @@ -82,7 +82,7 @@ the {{load-library}} does nothing. |
---|
1646 | |
---|
1647 | ==== set-dynamic-load-mode! |
---|
1648 | |
---|
1649 | - [procedure] (set-dynamic-load-mode! MODELIST) |
---|
1650 | +<procedure>(set-dynamic-load-mode! MODELIST)</procedure> |
---|
1651 | |
---|
1652 | On systems that support dynamic loading of compiled code via the {{dlopen(3)}} |
---|
1653 | interface (for example Linux and Solaris), some options can be specified to |
---|
1654 | @@ -102,7 +102,7 @@ this facility is mainly of interest when accessing foreign code. |
---|
1655 | |
---|
1656 | ==== repl |
---|
1657 | |
---|
1658 | - [procedure] (repl) |
---|
1659 | +<procedure>(repl)</procedure> |
---|
1660 | |
---|
1661 | Start a new read-eval-print loop. Sets the {{reset-handler}} so that |
---|
1662 | any invocation of {{reset}} restarts the read-eval-print loop. Also |
---|
1663 | @@ -125,7 +125,7 @@ or the default library path |
---|
1664 | |
---|
1665 | ==== extension-information |
---|
1666 | |
---|
1667 | - [procedure] (extension-information ID) |
---|
1668 | +<procedure>(extension-information ID)</procedure> |
---|
1669 | |
---|
1670 | If an extension with the name {{ID}} is installed and if it has a setup-information |
---|
1671 | list registered in the extension repository, then the info-list is returned. Otherwise |
---|
1672 | @@ -133,21 +133,21 @@ list registered in the extension repository, then the info-list is returned. Oth |
---|
1673 | |
---|
1674 | ==== provide |
---|
1675 | |
---|
1676 | - [procedure] (provide ID ...) |
---|
1677 | +<procedure>(provide ID ...)</procedure> |
---|
1678 | |
---|
1679 | Registers the extension IDs {{ID ...}} as loaded. This is mainly |
---|
1680 | intended to provide aliases for certain extension identifiers. |
---|
1681 | |
---|
1682 | ==== provided? |
---|
1683 | |
---|
1684 | - [procedure] (provided? ID ...) |
---|
1685 | +<procedure>(provided? ID ...)</procedure> |
---|
1686 | |
---|
1687 | Returns {{#t}} if the extension with the IDs {{ID ...}} |
---|
1688 | are currently loaded, or {{#f}} otherwise. |
---|
1689 | |
---|
1690 | ==== require |
---|
1691 | |
---|
1692 | - [procedure] (require ID ...) |
---|
1693 | +<procedure>(require ID ...)</procedure> |
---|
1694 | |
---|
1695 | If the extension library {{ID}} is not already loaded into the |
---|
1696 | system, then {{require}} will lookup the location of the shared |
---|
1697 | @@ -164,7 +164,7 @@ from one of the following locations: |
---|
1698 | |
---|
1699 | ==== set-extension-specifier! |
---|
1700 | |
---|
1701 | - [procedure] (set-extension-specifier! SYMBOL PROC) |
---|
1702 | +<procedure>(set-extension-specifier! SYMBOL PROC)</procedure> |
---|
1703 | |
---|
1704 | Registers the handler-procedure {{PROC}} as a extension-specifier with the |
---|
1705 | name {{SYMBOL}}. This facility allows extending the set of valid extension |
---|
1706 | @@ -195,7 +195,7 @@ visible in compiled code. |
---|
1707 | |
---|
1708 | ==== chicken-home |
---|
1709 | |
---|
1710 | - [procedure] (chicken-home) |
---|
1711 | +<procedure>(chicken-home)</procedure> |
---|
1712 | |
---|
1713 | Returns a string given the installation directory (usually {{/usr/local/share/chicken}} on UNIX-like systems). |
---|
1714 | As a last option, |
---|
1715 | @@ -207,7 +207,7 @@ if the environment variable {{CHICKEN_PREFIX}} is set, then {{chicken-home}} wil |
---|
1716 | |
---|
1717 | ==== eval |
---|
1718 | |
---|
1719 | - [procedure] (eval EXP [ENVIRONMENT]) |
---|
1720 | +<procedure>(eval EXP [ENVIRONMENT])</procedure> |
---|
1721 | |
---|
1722 | Evaluates {{EXP}} and returns the result of the evaluation. The second argument is optional |
---|
1723 | and defaults to the value of {{(interaction-environment)}}. |
---|
1724 | diff --git a/manual/Unit expand b/manual/Unit expand |
---|
1725 | index 47f0ad8..f024fc9 100644 |
---|
1726 | --- a/manual/Unit expand |
---|
1727 | +++ b/manual/Unit expand |
---|
1728 | @@ -11,7 +11,7 @@ option. |
---|
1729 | |
---|
1730 | ==== get-line-number |
---|
1731 | |
---|
1732 | - [procedure] (get-line-number EXPR) |
---|
1733 | +<procedure>(get-line-number EXPR)</procedure> |
---|
1734 | |
---|
1735 | If {{EXPR}} is a pair with the car being a symbol, and line-number |
---|
1736 | information is available for this expression, then this procedure returns |
---|
1737 | @@ -21,14 +21,14 @@ expressions is only available in the compiler. |
---|
1738 | |
---|
1739 | ==== expand |
---|
1740 | |
---|
1741 | - [procedure] (expand X) |
---|
1742 | +<procedure>(expand X)</procedure> |
---|
1743 | |
---|
1744 | If {{X}} is a macro-form, expand the macro (and repeat expansion |
---|
1745 | until expression is a non-macro form). Returns the resulting expression. |
---|
1746 | |
---|
1747 | ==== syntax-error |
---|
1748 | |
---|
1749 | - [procedure] (syntax-error [LOCATION] MESSAGE ARGUMENT ...) |
---|
1750 | +<procedure>(syntax-error [LOCATION] MESSAGE ARGUMENT ...)</procedure> |
---|
1751 | |
---|
1752 | Signals an exception of the kind {{(exn syntax)}}. Otherwise identical to |
---|
1753 | {{error}}. |
---|
1754 | diff --git a/manual/Unit extras b/manual/Unit extras |
---|
1755 | index 7ca6349..4eb46d4 100644 |
---|
1756 | --- a/manual/Unit extras |
---|
1757 | +++ b/manual/Unit extras |
---|
1758 | @@ -14,7 +14,7 @@ option. |
---|
1759 | |
---|
1760 | ==== random-seed |
---|
1761 | |
---|
1762 | - [procedure] (random-seed [SEED]) |
---|
1763 | +<procedure>(random-seed [SEED])</procedure> |
---|
1764 | |
---|
1765 | Seeds the random number generator with {{SEED}} (an {{integer}}) or |
---|
1766 | {{(current-seconds)}} if {{SEED}} is not given. |
---|
1767 | @@ -22,7 +22,7 @@ Seeds the random number generator with {{SEED}} (an {{integer}}) or |
---|
1768 | |
---|
1769 | ==== randomize |
---|
1770 | |
---|
1771 | - [procedure] (randomize [SEED]) |
---|
1772 | +<procedure>(randomize [SEED])</procedure> |
---|
1773 | |
---|
1774 | Set random-number seed. If {{SEED}} (an {{exact integer}}) is not supplied, the |
---|
1775 | current time is used. On startup (when Unit {{extras}} is initialized), the |
---|
1776 | @@ -31,7 +31,7 @@ random number generator is initialized with the current time. |
---|
1777 | |
---|
1778 | ==== random |
---|
1779 | |
---|
1780 | - [procedure] (random N) |
---|
1781 | +<procedure>(random N)</procedure> |
---|
1782 | |
---|
1783 | Returns a random {{integer}} in {{[0 N-1]}}. {{N}} is an {{integer}}. |
---|
1784 | |
---|
1785 | @@ -46,9 +46,9 @@ On '''Windows''' {{N}} and the random value are {{exact integer}}. |
---|
1786 | ==== fprintf |
---|
1787 | ==== sprintf |
---|
1788 | |
---|
1789 | - [procedure] (fprintf PORT FORMATSTRING [ARG...]) |
---|
1790 | - [procedure] (printf FORMATSTRING [ARG...]) |
---|
1791 | - [procedure] (sprintf FORMATSTRING [ARG...]) |
---|
1792 | +<procedure>(fprintf PORT FORMATSTRING [ARG...])</procedure><br> |
---|
1793 | +<procedure>(printf FORMATSTRING [ARG...])</procedure><br> |
---|
1794 | +<procedure>(sprintf FORMATSTRING [ARG...])</procedure> |
---|
1795 | |
---|
1796 | Simple formatted output to a given port ({{fprintf}}), the |
---|
1797 | value of {{(current-output-port)}} ({{printf}}), or a string |
---|
1798 | @@ -85,7 +85,7 @@ invoke formatted output routine recursively with the next two arguments as forma |
---|
1799 | |
---|
1800 | ==== format |
---|
1801 | |
---|
1802 | - [procedure] (format [DESTINATION] FORMATSTRING [ARG...]) |
---|
1803 | +<procedure>(format [DESTINATION] FORMATSTRING [ARG...])</procedure> |
---|
1804 | |
---|
1805 | The parameters {{FORMATSTRING}} and {{ARG...}} are as for {{printf}}. |
---|
1806 | |
---|
1807 | @@ -102,8 +102,8 @@ The optional {{DESTINATION}}, when supplied, performs: |
---|
1808 | |
---|
1809 | ==== pretty-print |
---|
1810 | |
---|
1811 | - [procedure] (pretty-print EXP [PORT]) |
---|
1812 | - [procedure] (pp EXP [PORT]) |
---|
1813 | +<procedure>(pretty-print EXP [PORT])</procedure><br> |
---|
1814 | +<procedure>(pp EXP [PORT])</procedure> |
---|
1815 | |
---|
1816 | Print expression nicely formatted. {{PORT}} defaults to the value |
---|
1817 | of {{(current-output-port)}}. |
---|
1818 | @@ -119,15 +119,15 @@ wrap will occur. |
---|
1819 | ==== read-byte |
---|
1820 | ==== write-byte |
---|
1821 | |
---|
1822 | - [procedure] (read-byte [PORT]) |
---|
1823 | - [procedure] (write-byte BYTE [PORT]) |
---|
1824 | +<procedure>(read-byte [PORT])</procedure><br> |
---|
1825 | +<procedure>(write-byte BYTE [PORT])</procedure> |
---|
1826 | |
---|
1827 | Read/write a byte to the port given in {{PORT}}, which default to the values |
---|
1828 | of {{(current-input-port)}} and {{(current-output-port)}}, respectively. |
---|
1829 | |
---|
1830 | ==== read-file |
---|
1831 | |
---|
1832 | - [procedure] (read-file [FILE-OR-PORT [READER [MAXCOUNT]]]) |
---|
1833 | +<procedure>(read-file [FILE-OR-PORT [READER [MAXCOUNT]]])</procedure> |
---|
1834 | |
---|
1835 | Returns a list containing all toplevel expressions |
---|
1836 | read from the file or port {{FILE-OR-PORT}}. If no argument is given, |
---|
1837 | @@ -142,8 +142,8 @@ If {{MAXCOUNT}} is given then only up to {{MAXCOUNT}} expressions will be read i |
---|
1838 | ==== read-line |
---|
1839 | ==== write-line |
---|
1840 | |
---|
1841 | - [procedure] (read-line [PORT [LIMIT]]) |
---|
1842 | - [procedure] (write-line STRING [PORT]) |
---|
1843 | +<procedure>(read-line [PORT [LIMIT]])</procedure><br> |
---|
1844 | +<procedure>(write-line STRING [PORT])</procedure> |
---|
1845 | |
---|
1846 | Line-input and -output. {{PORT}} defaults to the value of |
---|
1847 | {{(current-input-port)}} and {{(current-output-port)}}, |
---|
1848 | @@ -154,7 +154,7 @@ characters per line. {{read-line}} returns a string without the terminating newl |
---|
1849 | |
---|
1850 | ==== read-lines |
---|
1851 | |
---|
1852 | - [procedure] (read-lines [PORT [MAX]]) |
---|
1853 | +<procedure>(read-lines [PORT [MAX]])</procedure> |
---|
1854 | |
---|
1855 | Read {{MAX}} or fewer lines from {{PORT}}. {{PORT}} |
---|
1856 | defaults to the value of {{(current-input-port)}}. {{PORT}} may optionally be |
---|
1857 | @@ -165,9 +165,9 @@ a string naming a file. Returns a list of strings, each string representing a li |
---|
1858 | ==== read-string! |
---|
1859 | ==== write-string |
---|
1860 | |
---|
1861 | - [procedure] (read-string [NUM [PORT]]) |
---|
1862 | - [procedure] (read-string! NUM STRING [PORT [START]]) |
---|
1863 | - [procedure] (write-string STRING [NUM [PORT]] |
---|
1864 | +<procedure>(read-string [NUM [PORT]])</procedure><br> |
---|
1865 | +<procedure>(read-string! NUM STRING [PORT [START]])</procedure><br> |
---|
1866 | +<procedure>(write-string STRING [NUM [PORT]])</procedure> |
---|
1867 | |
---|
1868 | Read or write {{NUM}} characters from/to {{PORT}}, which defaults to the |
---|
1869 | value of {{(current-input-port)}} or {{(current-output-port)}}, respectively. |
---|
1870 | @@ -182,7 +182,7 @@ the read characters are stored starting at that position. |
---|
1871 | |
---|
1872 | ==== read-token |
---|
1873 | |
---|
1874 | - [procedure] (read-token PREDICATE [PORT]) |
---|
1875 | +<procedure>(read-token PREDICATE [PORT])</procedure> |
---|
1876 | |
---|
1877 | Reads characters from {{PORT}} (which defaults to the value of {{(current-input-port)}}) |
---|
1878 | and calls the procedure {{PREDICATE}} with each character until {{PREDICATE}} returns |
---|
1879 | diff --git a/manual/Unit library b/manual/Unit library |
---|
1880 | index 73b4c51..27ca46d 100644 |
---|
1881 | --- a/manual/Unit library |
---|
1882 | +++ b/manual/Unit library |
---|
1883 | @@ -19,18 +19,18 @@ Adds/subtracts 1 from {{N}}. |
---|
1884 | |
---|
1885 | ==== Binary integer operations |
---|
1886 | |
---|
1887 | -Binary integer operations. {{arithmetic-shift}} shifts the argument {{N1}} by |
---|
1888 | -{{N2}} bits to the left. If {{N2}} is negative, than {{N1}} is shifted to the |
---|
1889 | -right. These operations only accept exact integers or inexact integers in word |
---|
1890 | -range (32 bit signed on 32-bit platforms, or 64 bit signed on 64-bit |
---|
1891 | -platforms). |
---|
1892 | - |
---|
1893 | <procedure>(bitwise-and N1 ...)</procedure> |
---|
1894 | <procedure>(bitwise-ior N1 ...)</procedure> |
---|
1895 | <procedure>(bitwise-xor N1 ...)</procedure> |
---|
1896 | <procedure>(bitwise-not N)</procedure> |
---|
1897 | <procedure>(arithmetic-shift N1 N2)</procedure> |
---|
1898 | |
---|
1899 | +Binary integer operations. {{arithmetic-shift}} shifts the argument {{N1}} by |
---|
1900 | +{{N2}} bits to the left. If {{N2}} is negative, then {{N1}} is shifted to the |
---|
1901 | +right. These operations only accept exact integers or inexact integers in word |
---|
1902 | +range (32 bit signed on 32-bit platforms, or 64 bit signed on 64-bit |
---|
1903 | +platforms). |
---|
1904 | + |
---|
1905 | ==== bit-set? |
---|
1906 | |
---|
1907 | <procedure>(bit-set? N INDEX)</procedure> |
---|
1908 | @@ -38,18 +38,8 @@ platforms). |
---|
1909 | Returns {{#t}} if the bit at the position {{INDEX}} in the integer {{N}} is |
---|
1910 | set, or {{#f}} otherwise. The rightmost/least-significant bit is bit 0. |
---|
1911 | |
---|
1912 | - |
---|
1913 | ==== Arithmetic fixnum operations |
---|
1914 | |
---|
1915 | -These procedures do not check their arguments, so non-fixnum parameters will |
---|
1916 | -result in incorrect results. {{fxneg}} negates its argument. |
---|
1917 | - |
---|
1918 | -On division by zero, {{fx/}} and {{fxmod}} signal a condition of kind |
---|
1919 | -{{(exn arithmetic)}}. |
---|
1920 | - |
---|
1921 | -{{fxshl}} and {{fxshr}} perform arithmetic shift left and right, |
---|
1922 | -respectively. |
---|
1923 | - |
---|
1924 | <procedure>(fx+ N1 N2)</procedure> |
---|
1925 | <procedure>(fx- N1 N2)</procedure> |
---|
1926 | <procedure>(fx* N1 N2)</procedure> |
---|
1927 | @@ -70,9 +60,19 @@ respectively. |
---|
1928 | <procedure>(fxshl N1 N2)</procedure> |
---|
1929 | <procedure>(fxshr N1 N2)</procedure> |
---|
1930 | |
---|
1931 | +{{fx+}} and friends are arithmetic fixnum operations. These procedures do not |
---|
1932 | +check their arguments, so non-fixnum parameters will result in incorrect |
---|
1933 | +results. {{fxneg}} negates its argument. |
---|
1934 | + |
---|
1935 | +On division by zero, {{fx/}} and {{fxmod}} signal a condition of kind |
---|
1936 | +{{(exn arithmetic)}}. |
---|
1937 | + |
---|
1938 | +{{fxshl}} and {{fxshr}} perform arithmetic shift left and right, |
---|
1939 | +respectively. |
---|
1940 | + |
---|
1941 | ==== fixnum? |
---|
1942 | |
---|
1943 | - [procedure] (fixnum? X) |
---|
1944 | +<procedure>(fixnum? X)</procedure> |
---|
1945 | |
---|
1946 | Returns {{#t}} if {{X}} is a fixnum, or {{#f}} otherwise. |
---|
1947 | |
---|
1948 | @@ -126,7 +126,7 @@ Note: {{fpround}} implements POSIX, which is different from R5RS. |
---|
1949 | |
---|
1950 | ==== flonum? |
---|
1951 | |
---|
1952 | - [procedure] (flonum? X) |
---|
1953 | +<procedure>(flonum? X)</procedure> |
---|
1954 | |
---|
1955 | Returns {{#t}} if {{X}} is a flonum, or {{#f}} otherwise. |
---|
1956 | |
---|
1957 | @@ -160,7 +160,7 @@ Returns {{#f}} if {{N}} is negative or positive infinity, and {{#t}} otherwise. |
---|
1958 | |
---|
1959 | ==== signum |
---|
1960 | |
---|
1961 | - [procedure] (signum N) |
---|
1962 | +<procedure>(signum N)</procedure> |
---|
1963 | |
---|
1964 | Returns {{1}} if {{N}} is positive, {{-1}} if {{N}} |
---|
1965 | is negative or {{0}} if {{N}} is zero. {{signum}} is exactness preserving. |
---|
1966 | @@ -405,7 +405,7 @@ more information, see the |
---|
1967 | |
---|
1968 | ==== condition-case |
---|
1969 | |
---|
1970 | - [syntax] (condition-case EXPRESSION CLAUSE ...) |
---|
1971 | +<macro>(condition-case EXPRESSION CLAUSE ...)</macro> |
---|
1972 | |
---|
1973 | Evaluates {{EXPRESSION}} and handles any exceptions that are covered by |
---|
1974 | {{CLAUSE ...}}, where {{CLAUSE}} should be of the following form: |
---|
1975 | @@ -577,8 +577,8 @@ Returns the error code of the last system call. |
---|
1976 | |
---|
1977 | ==== get-environment-variable |
---|
1978 | |
---|
1979 | - [procedure] (get-environment-variable STRING) |
---|
1980 | - [procedure] (getenv STRING) |
---|
1981 | +<procedure>(get-environment-variable STRING)</procedure><br> |
---|
1982 | +<procedure>(getenv STRING)</procedure> |
---|
1983 | |
---|
1984 | Returns the value of the environment variable {{STRING}} or |
---|
1985 | {{#f}} if that variable is not defined. See also [[http://srfi.schemers.org/srfi-98/|SRFI-98]]. |
---|
1986 | diff --git a/manual/Unit lolevel b/manual/Unit lolevel |
---|
1987 | index d145c03..324e832 100644 |
---|
1988 | --- a/manual/Unit lolevel |
---|
1989 | +++ b/manual/Unit lolevel |
---|
1990 | @@ -29,7 +29,7 @@ object'', but a ''pointer-like object''. The distinction is artificial. |
---|
1991 | |
---|
1992 | ==== address->pointer |
---|
1993 | |
---|
1994 | - [procedure] (address->pointer ADDRESS) |
---|
1995 | +<procedure>(address->pointer ADDRESS)</procedure> |
---|
1996 | |
---|
1997 | Creates a new foreign pointer object initialized to point to the address |
---|
1998 | given in the integer {{ADDRESS}}. |
---|
1999 | @@ -37,7 +37,7 @@ given in the integer {{ADDRESS}}. |
---|
2000 | |
---|
2001 | ==== allocate |
---|
2002 | |
---|
2003 | - [procedure] (allocate BYTES) |
---|
2004 | +<procedure>(allocate BYTES)</procedure> |
---|
2005 | |
---|
2006 | Returns a foreign pointer object to a freshly allocated region of static |
---|
2007 | memory. |
---|
2008 | @@ -51,7 +51,7 @@ This procedure could be defined as follows: |
---|
2009 | |
---|
2010 | ==== free |
---|
2011 | |
---|
2012 | - [procedure] (free POINTER) |
---|
2013 | +<procedure>(free POINTER)</procedure> |
---|
2014 | |
---|
2015 | Frees the memory pointed to by {{POINTER}}. |
---|
2016 | |
---|
2017 | @@ -64,14 +64,14 @@ This procedure could be defined as follows: |
---|
2018 | |
---|
2019 | ==== null-pointer |
---|
2020 | |
---|
2021 | - [procedure] (null-pointer) |
---|
2022 | +<procedure>(null-pointer)</procedure> |
---|
2023 | |
---|
2024 | Another way to say {{(address->pointer 0)}}. |
---|
2025 | |
---|
2026 | |
---|
2027 | ==== null-pointer? |
---|
2028 | |
---|
2029 | - [procedure] (null-pointer? POINTER*) |
---|
2030 | +<procedure>(null-pointer? POINTER*)</procedure> |
---|
2031 | |
---|
2032 | Returns {{#t}} if the pointer-like object {{POINTER*}} contains a {{NULL}} pointer, |
---|
2033 | or {{#f}} otherwise. |
---|
2034 | @@ -79,7 +79,7 @@ or {{#f}} otherwise. |
---|
2035 | |
---|
2036 | ==== object->pointer |
---|
2037 | |
---|
2038 | - [procedure] (object->pointer X) |
---|
2039 | +<procedure>(object->pointer X)</procedure> |
---|
2040 | |
---|
2041 | Returns a foreign pointer object pointing to the Scheme object X, which should |
---|
2042 | be a non-immediate object. ("foreign" here is a bit of a misnomer.) |
---|
2043 | @@ -89,7 +89,7 @@ Note that data in the garbage collected heap moves during garbage collection. |
---|
2044 | |
---|
2045 | ==== pointer->object |
---|
2046 | |
---|
2047 | - [procedure] (pointer->object POINTER) |
---|
2048 | +<procedure>(pointer->object POINTER)</procedure> |
---|
2049 | |
---|
2050 | Returns the Scheme object pointed to by the pointer object {{POINTER}}. |
---|
2051 | |
---|
2052 | @@ -98,21 +98,21 @@ at your own risk. |
---|
2053 | |
---|
2054 | ==== pointer? |
---|
2055 | |
---|
2056 | - [procedure] (pointer? X) |
---|
2057 | +<procedure>(pointer? X)</procedure> |
---|
2058 | |
---|
2059 | Returns {{#t}} if {{X}} is a pointer object, or {{#f}} otherwise. |
---|
2060 | |
---|
2061 | |
---|
2062 | ==== pointer-like? |
---|
2063 | |
---|
2064 | - [procedure] (pointer-like? X) |
---|
2065 | +<procedure>(pointer-like? X)</procedure> |
---|
2066 | |
---|
2067 | Returns {{#t}} if {{X}} is a pointer-like object, or {{#f}} otherwise. |
---|
2068 | |
---|
2069 | |
---|
2070 | ==== pointer=? |
---|
2071 | |
---|
2072 | - [procedure] (pointer=? POINTER*1 POINTER*2) |
---|
2073 | +<procedure>(pointer=? POINTER*1 POINTER*2)</procedure> |
---|
2074 | |
---|
2075 | Returns {{#t}} if the pointer-like objects {{POINTER*1}} and {{POINTER*2}} point |
---|
2076 | to the same address, or {{#f}} otherwise. |
---|
2077 | @@ -120,14 +120,14 @@ to the same address, or {{#f}} otherwise. |
---|
2078 | |
---|
2079 | ==== pointer->address |
---|
2080 | |
---|
2081 | - [procedure] (pointer->address POINTER*) |
---|
2082 | +<procedure>(pointer->address POINTER*)</procedure> |
---|
2083 | |
---|
2084 | Returns the address, to which the pointer-like object {{POINTER*}} points. |
---|
2085 | |
---|
2086 | |
---|
2087 | ==== pointer-offset |
---|
2088 | |
---|
2089 | - [procedure] (pointer-offset POINTER* N) |
---|
2090 | +<procedure>(pointer-offset POINTER* N)</procedure> |
---|
2091 | |
---|
2092 | Returns a new foreign pointer object representing the pointer-like object |
---|
2093 | {{POINTER*}} address value increased by the byte-offset {{N}}. |
---|
2094 | @@ -137,7 +137,7 @@ Use of anything other than a pointer object as an argument is questionable. |
---|
2095 | |
---|
2096 | ==== align-to-word |
---|
2097 | |
---|
2098 | - [procedure] (align-to-word POINTER*-OR-INT) |
---|
2099 | +<procedure>(align-to-word POINTER*-OR-INT)</procedure> |
---|
2100 | |
---|
2101 | Accepts either a pointer-like object or an integer as the argument and returns |
---|
2102 | a new foreign pointer or integer aligned to the native word size of the host |
---|
2103 | @@ -155,120 +155,120 @@ However, as usual, use of anything other than a pointer object is questionable. |
---|
2104 | |
---|
2105 | ==== pointer-u8-ref |
---|
2106 | |
---|
2107 | - [procedure] (pointer-u8-ref POINTER) |
---|
2108 | +<procedure>(pointer-u8-ref POINTER)</procedure> |
---|
2109 | |
---|
2110 | Returns the unsigned byte at the address designated by {{POINTER}}. |
---|
2111 | |
---|
2112 | |
---|
2113 | ==== pointer-s8-ref |
---|
2114 | |
---|
2115 | - [procedure] (pointer-s8-ref POINTER) |
---|
2116 | +<procedure>(pointer-s8-ref POINTER)</procedure> |
---|
2117 | |
---|
2118 | Returns the signed byte at the address designated by {{POINTER}}. |
---|
2119 | |
---|
2120 | |
---|
2121 | ==== pointer-u16-ref |
---|
2122 | |
---|
2123 | - [procedure] (pointer-u16-ref POINTER) |
---|
2124 | +<procedure>(pointer-u16-ref POINTER)</procedure> |
---|
2125 | |
---|
2126 | Returns the unsigned 16-bit integer at the address designated by {{POINTER}}. |
---|
2127 | |
---|
2128 | |
---|
2129 | ==== pointer-s16-ref |
---|
2130 | |
---|
2131 | - [procedure] (pointer-s16-ref POINTER) |
---|
2132 | +<procedure>(pointer-s16-ref POINTER)</procedure> |
---|
2133 | |
---|
2134 | Returns the signed 16-bit integer at the address designated by {{POINTER}}. |
---|
2135 | |
---|
2136 | |
---|
2137 | ==== pointer-u32-ref |
---|
2138 | |
---|
2139 | - [procedure] (pointer-u32-ref POINTER) |
---|
2140 | +<procedure>(pointer-u32-ref POINTER)</procedure> |
---|
2141 | |
---|
2142 | Returns the unsigned 32-bit integer at the address designated by {{POINTER}}. |
---|
2143 | |
---|
2144 | |
---|
2145 | ==== pointer-s32-ref |
---|
2146 | |
---|
2147 | - [procedure] (pointer-s32-ref POINTER) |
---|
2148 | +<procedure>(pointer-s32-ref POINTER)</procedure> |
---|
2149 | |
---|
2150 | Returns the signed 32-bit integer at the address designated by {{POINTER}}. |
---|
2151 | |
---|
2152 | |
---|
2153 | ==== pointer-f32-ref |
---|
2154 | |
---|
2155 | - [procedure] (pointer-f32-ref POINTER) |
---|
2156 | +<procedure>(pointer-f32-ref POINTER)</procedure> |
---|
2157 | |
---|
2158 | Returns the 32-bit float at the address designated by {{POINTER}}. |
---|
2159 | |
---|
2160 | |
---|
2161 | ==== pointer-f64-ref |
---|
2162 | |
---|
2163 | - [procedure] (pointer-f64-ref POINTER) |
---|
2164 | +<procedure>(pointer-f64-ref POINTER)</procedure> |
---|
2165 | |
---|
2166 | Returns the 64-bit double at the address designated by {{POINTER}}. |
---|
2167 | |
---|
2168 | |
---|
2169 | ==== pointer-u8-set! |
---|
2170 | |
---|
2171 | - [procedure] (pointer-u8-set! POINTER N) |
---|
2172 | - [procedure] (set! (pointer-u8-ref POINTER) N) |
---|
2173 | +<procedure>(pointer-u8-set! POINTER N)</procedure><br> |
---|
2174 | +<procedure>(set! (pointer-u8-ref POINTER) N)</procedure> |
---|
2175 | |
---|
2176 | Stores the unsigned byte {{N}} at the address designated by {{POINTER}}. |
---|
2177 | |
---|
2178 | |
---|
2179 | ==== pointer-s8-set! |
---|
2180 | |
---|
2181 | - [procedure] (pointer-s8-set! POINTER N) |
---|
2182 | - [procedure] (set! (pointer-s8-ref POINTER) N) |
---|
2183 | +<procedure>(pointer-s8-set! POINTER N)</procedure><br> |
---|
2184 | +<procedure>(set! (pointer-s8-ref POINTER) N)</procedure> |
---|
2185 | |
---|
2186 | Stores the signed byte {{N}} at the address designated by {{POINTER}}. |
---|
2187 | |
---|
2188 | |
---|
2189 | ==== pointer-u16-set! |
---|
2190 | |
---|
2191 | - [procedure] (pointer-u16-set! POINTER N) |
---|
2192 | - [procedure] (set! (pointer-u16-ref POINTER) N) |
---|
2193 | +<procedure>(pointer-u16-set! POINTER N)</procedure><br> |
---|
2194 | +<procedure>(set! (pointer-u16-ref POINTER) N)</procedure> |
---|
2195 | |
---|
2196 | Stores the unsigned 16-bit integer {{N}} at the address designated by {{POINTER}}. |
---|
2197 | |
---|
2198 | |
---|
2199 | ==== pointer-s16-set! |
---|
2200 | |
---|
2201 | - [procedure] (pointer-s16-set! POINTER N) |
---|
2202 | - [procedure] (set! (pointer-s16-ref POINTER) N) |
---|
2203 | +<procedure>(pointer-s16-set! POINTER N)</procedure><br> |
---|
2204 | +<procedure>(set! (pointer-s16-ref POINTER) N)</procedure> |
---|
2205 | |
---|
2206 | Stores the signed 16-bit integer {{N}} at the address designated by {{POINTER}}. |
---|
2207 | |
---|
2208 | |
---|
2209 | ==== pointer-u32-set! |
---|
2210 | |
---|
2211 | - [procedure] (pointer-u32-set! POINTER N) |
---|
2212 | - [procedure] (set! (pointer-u32-ref POINTER) N) |
---|
2213 | +<procedure>(pointer-u32-set! POINTER N)</procedure><br> |
---|
2214 | +<procedure>(set! (pointer-u32-ref POINTER) N)</procedure> |
---|
2215 | |
---|
2216 | Stores the unsigned 32-bit integer {{N}} at the address designated by {{POINTER}}. |
---|
2217 | |
---|
2218 | |
---|
2219 | ==== pointer-s32-set! |
---|
2220 | |
---|
2221 | - [procedure] (pointer-s32-set! POINTER N) |
---|
2222 | - [procedure] (set! (pointer-s32-ref POINTER) N) |
---|
2223 | +<procedure>(pointer-s32-set! POINTER N)</procedure><br> |
---|
2224 | +<procedure>(set! (pointer-s32-ref POINTER) N)</procedure> |
---|
2225 | |
---|
2226 | Stores the 32-bit integer {{N}} at the address designated by {{POINTER}}. |
---|
2227 | |
---|
2228 | |
---|
2229 | ==== pointer-f32-set! |
---|
2230 | |
---|
2231 | - [procedure] (pointer-f32-set! POINTER N) |
---|
2232 | - [procedure] (set! (pointer-f32-ref POINTER) N) |
---|
2233 | +<procedure>(pointer-f32-set! POINTER N)</procedure><br> |
---|
2234 | +<procedure>(set! (pointer-f32-ref POINTER) N)</procedure> |
---|
2235 | |
---|
2236 | Stores the 32-bit floating-point number {{N}} at the address designated by {{POINTER}}. |
---|
2237 | |
---|
2238 | |
---|
2239 | ==== pointer-f64-set! |
---|
2240 | |
---|
2241 | - [procedure] (pointer-f64-set! POINTER N) |
---|
2242 | - [procedure] (set! (pointer-f64-ref POINTER) N) |
---|
2243 | +<procedure>(pointer-f64-set! POINTER N)</procedure><br> |
---|
2244 | +<procedure>(set! (pointer-f64-ref POINTER) N)</procedure> |
---|
2245 | |
---|
2246 | Stores the 64-bit floating-point number {{N}} at the address designated by {{POINTER}}. |
---|
2247 | |
---|
2248 | @@ -281,7 +281,7 @@ Stores the 64-bit floating-point number {{N}} at the address designated by {{POI |
---|
2249 | |
---|
2250 | ==== tag-pointer |
---|
2251 | |
---|
2252 | - [procedure] (tag-pointer POINTER* TAG) |
---|
2253 | +<procedure>(tag-pointer POINTER* TAG)</procedure> |
---|
2254 | |
---|
2255 | Creates a new tagged foreign pointer object from the pointer-like object |
---|
2256 | {{POINTER*}} with the tag {{TAG}}, which may an arbitrary Scheme object. |
---|
2257 | @@ -290,7 +290,7 @@ Use of anything other than a pointer object is questionable. |
---|
2258 | |
---|
2259 | ==== tagged-pointer? |
---|
2260 | |
---|
2261 | - [procedure] (tagged-pointer? X [TAG]) |
---|
2262 | +<procedure>(tagged-pointer? X [TAG])</procedure> |
---|
2263 | |
---|
2264 | Returns {{#t}} if {{X}} is a tagged foreign pointer object, or {{#f}} otherwise. |
---|
2265 | |
---|
2266 | @@ -300,7 +300,7 @@ Further, returns {{#t}} when {{X}} has the optional tag {{TAG}} (using an |
---|
2267 | |
---|
2268 | ==== pointer-tag |
---|
2269 | |
---|
2270 | - [procedure] (pointer-tag POINTER*) |
---|
2271 | +<procedure>(pointer-tag POINTER*)</procedure> |
---|
2272 | |
---|
2273 | If {{POINTER}} is a tagged foreign pointer object, its tag is returned. If {{POINTER*}} |
---|
2274 | is any other kind of pointer-like object {{#f}} is returned. Otherwise an |
---|
2275 | @@ -323,7 +323,7 @@ The effect of creating locatives for evicted data (see {{object-evict}}) is unde |
---|
2276 | |
---|
2277 | ==== make-locative |
---|
2278 | |
---|
2279 | - [procedure] (make-locative OBJ [INDEX]) |
---|
2280 | +<procedure>(make-locative OBJ [INDEX])</procedure> |
---|
2281 | |
---|
2282 | Creates a locative that refers to the element of the non-immediate object |
---|
2283 | {{OBJ}} at position {{INDEX}}. {{OBJ}} may be a vector, pair, string, blob, |
---|
2284 | @@ -333,7 +333,7 @@ SRFI-4 number-vector, or record structure. {{INDEX}} should be a fixnum. |
---|
2285 | |
---|
2286 | ==== make-weak-locative |
---|
2287 | |
---|
2288 | - [procedure] (make-weak-locative OBJ [INDEX]) |
---|
2289 | +<procedure>(make-weak-locative OBJ [INDEX])</procedure> |
---|
2290 | |
---|
2291 | Creates a ''weak'' locative. Even though the locative refers to an element of a container object, |
---|
2292 | the container object will still be reclaimed by garbage collection if no other references |
---|
2293 | @@ -342,14 +342,14 @@ to it exist. |
---|
2294 | |
---|
2295 | ==== locative? |
---|
2296 | |
---|
2297 | - [procedure] (locative? X) |
---|
2298 | +<procedure>(locative? X)</procedure> |
---|
2299 | |
---|
2300 | Returns {{#t}} if {{X}} is a locative, or {{#f}} otherwise. |
---|
2301 | |
---|
2302 | |
---|
2303 | ==== locative-ref |
---|
2304 | |
---|
2305 | - [procedure] (locative-ref LOC) |
---|
2306 | +<procedure>(locative-ref LOC)</procedure> |
---|
2307 | |
---|
2308 | Returns the element to which the locative {{LOC}} refers. If the containing |
---|
2309 | object has been reclaimed by garbage collection, an error is signalled. |
---|
2310 | @@ -358,8 +358,8 @@ object has been reclaimed by garbage collection, an error is signalled. |
---|
2311 | |
---|
2312 | ==== locative-set! |
---|
2313 | |
---|
2314 | - [procedure] (locative-set! LOC X) |
---|
2315 | - [procedure] (set! (locative-ref LOC) X) |
---|
2316 | +<procedure>(locative-set! LOC X)</procedure><br> |
---|
2317 | +<procedure>(set! (locative-ref LOC) X)</procedure> |
---|
2318 | |
---|
2319 | Changes the element to which the locative {{LOC}} refers to {{X}}. |
---|
2320 | If the containing |
---|
2321 | @@ -368,7 +368,7 @@ object has been reclaimed by garbage collection, an error is signalled. |
---|
2322 | |
---|
2323 | ==== locative->object |
---|
2324 | |
---|
2325 | - [procedure] (locative->object LOC) |
---|
2326 | +<procedure>(locative->object LOC)</procedure> |
---|
2327 | |
---|
2328 | Returns the object that contains the element referred to by {{LOC}} or |
---|
2329 | {{#f}} if the container has been reclaimed by garbage collection. |
---|
2330 | @@ -382,7 +382,7 @@ Returns the object that contains the element referred to by {{LOC}} or |
---|
2331 | |
---|
2332 | ==== extend-procedure |
---|
2333 | |
---|
2334 | - [procedure] (extend-procedure PROCEDURE X) |
---|
2335 | +<procedure>(extend-procedure PROCEDURE X)</procedure> |
---|
2336 | |
---|
2337 | Returns a copy of the procedure {{PROCEDURE}} which contains an additional data |
---|
2338 | slot initialized to {{X}}. If {{PROCEDURE}} is already an extended procedure, |
---|
2339 | @@ -392,7 +392,7 @@ returned. Signals an error when {{PROCEDURE}} is not a procedure. |
---|
2340 | |
---|
2341 | ==== extended-procedure? |
---|
2342 | |
---|
2343 | - [procedure] (extended-procedure? PROCEDURE) |
---|
2344 | +<procedure>(extended-procedure? PROCEDURE)</procedure> |
---|
2345 | |
---|
2346 | Returns {{#t}} if {{PROCEDURE}} is an extended procedure, |
---|
2347 | or {{#f}} otherwise. |
---|
2348 | @@ -400,7 +400,7 @@ or {{#f}} otherwise. |
---|
2349 | |
---|
2350 | ==== procedure-data |
---|
2351 | |
---|
2352 | - [procedure] (procedure-data PROCEDURE) |
---|
2353 | +<procedure>(procedure-data PROCEDURE)</procedure> |
---|
2354 | |
---|
2355 | Returns the data object contained in the extended procedure {{PROCEDURE}}, or |
---|
2356 | {{#f}} if it is not an extended procedure. |
---|
2357 | @@ -408,7 +408,7 @@ Returns the data object contained in the extended procedure {{PROCEDURE}}, or |
---|
2358 | |
---|
2359 | ==== set-procedure-data! |
---|
2360 | |
---|
2361 | - [procedure] (set-procedure-data! PROCEDURE X) |
---|
2362 | +<procedure>(set-procedure-data! PROCEDURE X)</procedure> |
---|
2363 | |
---|
2364 | Changes the data object contained in the extended procedure {{PROCEDURE}} to |
---|
2365 | {{X}}. Signals an error when {{PROCEDURE}} is not an extended procedure. |
---|
2366 | @@ -436,7 +436,7 @@ Note that strings and blobs are not considered vector-like. |
---|
2367 | |
---|
2368 | ==== block-ref |
---|
2369 | |
---|
2370 | - [procedure] (block-ref VECTOR* INDEX) |
---|
2371 | +<procedure>(block-ref VECTOR* INDEX)</procedure> |
---|
2372 | |
---|
2373 | Returns the contents of the {{INDEX}}th slot of the vector-like object |
---|
2374 | {{VECTOR*}}. |
---|
2375 | @@ -444,22 +444,22 @@ Returns the contents of the {{INDEX}}th slot of the vector-like object |
---|
2376 | |
---|
2377 | ==== block-set! |
---|
2378 | |
---|
2379 | - [procedure] (block-set! VECTOR* INDEX X) |
---|
2380 | - [procedure] (set! (block-ref VECTOR* INDEX) X) |
---|
2381 | +<procedure>(block-set! VECTOR* INDEX X)</procedure><br> |
---|
2382 | +<procedure>(set! (block-ref VECTOR* INDEX) X)</procedure> |
---|
2383 | |
---|
2384 | Sets the contents of the {{INDEX}}th slot of the vector-like object {{VECTOR*}} |
---|
2385 | to the value of {{X}}. |
---|
2386 | |
---|
2387 | ==== number-of-slots |
---|
2388 | |
---|
2389 | - [procedure] (number-of-slots VECTOR*) |
---|
2390 | +<procedure>(number-of-slots VECTOR*)</procedure> |
---|
2391 | |
---|
2392 | Returns the number of slots that the vector-like object {{VECTOR*}} contains. |
---|
2393 | |
---|
2394 | |
---|
2395 | ==== number-of-bytes |
---|
2396 | |
---|
2397 | - [procedure] (number-of-bytes BLOCK) |
---|
2398 | +<procedure>(number-of-bytes BLOCK)</procedure> |
---|
2399 | |
---|
2400 | Returns the number of bytes that the object {{BLOCK}} contains. {{BLOCK}} may |
---|
2401 | be any non-immediate value. |
---|
2402 | @@ -467,7 +467,7 @@ be any non-immediate value. |
---|
2403 | |
---|
2404 | ==== object-copy |
---|
2405 | |
---|
2406 | - [procedure] (object-copy X) |
---|
2407 | +<procedure>(object-copy X)</procedure> |
---|
2408 | |
---|
2409 | Copies {{X}} recursively and returns the fresh copy. Objects allocated in |
---|
2410 | static memory are copied back into garbage collected storage. |
---|
2411 | @@ -475,7 +475,7 @@ static memory are copied back into garbage collected storage. |
---|
2412 | |
---|
2413 | ==== move-memory! |
---|
2414 | |
---|
2415 | - [procedure] (move-memory! FROM TO [BYTES [FROM-OFFSET [TO-OFFSET]]) |
---|
2416 | +<procedure>(move-memory! FROM TO [BYTES [FROM-OFFSET [TO-OFFSET]]])</procedure> |
---|
2417 | |
---|
2418 | Copies {{BYTES}} bytes of memory from {{FROM}} to {{TO}}. {{FROM}} and {{TO}} |
---|
2419 | may be strings, blobs, SRFI-4 number-vectors (see: @ref{Unit srfi-4}), memory |
---|
2420 | @@ -498,7 +498,7 @@ Signals an error if any of the above constraints is violated. |
---|
2421 | |
---|
2422 | ==== object-evict |
---|
2423 | |
---|
2424 | - [procedure] (object-evict X [ALLOCATOR]) |
---|
2425 | +<procedure>(object-evict X [ALLOCATOR])</procedure> |
---|
2426 | |
---|
2427 | Copies the object {{X}} recursively into the memory pointed to by the foreign |
---|
2428 | pointer object returned by {{ALLOCATOR}}, which should be a procedure of a |
---|
2429 | @@ -528,7 +528,7 @@ The {{ALLOCATOR}} defaults to {{allocate}}. |
---|
2430 | |
---|
2431 | ==== object-evict-to-location |
---|
2432 | |
---|
2433 | - [procedure] (object-evict-to-location X POINTER* [LIMIT]) |
---|
2434 | +<procedure>(object-evict-to-location X POINTER* [LIMIT])</procedure> |
---|
2435 | |
---|
2436 | As {{object-evict}} but moves the object at the address pointed to by |
---|
2437 | the pointer-like object {{POINTER*}}. If the number of copied bytes exceeds |
---|
2438 | @@ -543,7 +543,7 @@ questionable. |
---|
2439 | |
---|
2440 | ==== object-evicted? |
---|
2441 | |
---|
2442 | - [procedure] (object-evicted? X) |
---|
2443 | +<procedure>(object-evicted? X)</procedure> |
---|
2444 | |
---|
2445 | Returns {{#t}} if {{X}} is a non-immediate evicted data object, or {{#f}} |
---|
2446 | otherwise. |
---|
2447 | @@ -551,7 +551,7 @@ otherwise. |
---|
2448 | |
---|
2449 | ==== object-release |
---|
2450 | |
---|
2451 | - [procedure] (object-release X [RELEASER]) |
---|
2452 | +<procedure>(object-release X [RELEASER])</procedure> |
---|
2453 | |
---|
2454 | Frees memory occupied by the evicted object {{X}} recursively. |
---|
2455 | {{RELEASER}} should be a procedure of a single argument (a foreign |
---|
2456 | @@ -561,7 +561,7 @@ pointer object to the static memory to be freed) and defaults to |
---|
2457 | |
---|
2458 | ==== object-unevict |
---|
2459 | |
---|
2460 | - [procedure] (object-unevict X [FULL]) |
---|
2461 | +<procedure>(object-unevict X [FULL])</procedure> |
---|
2462 | |
---|
2463 | Copies the object {{X}} and nested objects back into the normal Scheme heap. |
---|
2464 | Symbols are re-interned into the symbol table. Strings and byte-vectors are |
---|
2465 | @@ -570,7 +570,7 @@ Symbols are re-interned into the symbol table. Strings and byte-vectors are |
---|
2466 | |
---|
2467 | ==== object-size |
---|
2468 | |
---|
2469 | - [procedure] (object-size X) |
---|
2470 | +<procedure>(object-size X)</procedure> |
---|
2471 | |
---|
2472 | Returns the number of bytes that would be needed to evict the data object |
---|
2473 | {{X}}. |
---|
2474 | @@ -582,7 +582,7 @@ Returns the number of bytes that would be needed to evict the data object |
---|
2475 | |
---|
2476 | ==== global-bound? |
---|
2477 | |
---|
2478 | - [procedure] (global-bound? SYMBOL) |
---|
2479 | +<procedure>(global-bound? SYMBOL)</procedure> |
---|
2480 | |
---|
2481 | Returns {{#t}}, if the global (''toplevel'') variable with the name {{SYMBOL}} |
---|
2482 | is bound to a value, or {{#f}} otherwise. |
---|
2483 | @@ -590,7 +590,7 @@ is bound to a value, or {{#f}} otherwise. |
---|
2484 | |
---|
2485 | ==== global-ref |
---|
2486 | |
---|
2487 | - [procedure] (global-ref SYMBOL) |
---|
2488 | +<procedure>(global-ref SYMBOL)</procedure> |
---|
2489 | |
---|
2490 | Returns the value of the global variable {{SYMBOL}}. |
---|
2491 | If no variable under that name is bound, an error is signalled. |
---|
2492 | @@ -602,8 +602,8 @@ or if the code has been compiled in {{block}} mode. |
---|
2493 | |
---|
2494 | ==== global-set! |
---|
2495 | |
---|
2496 | - [procedure] (global-set! SYMBOL X) |
---|
2497 | - [procedure] (set! (global-ref SYMBOL) X) |
---|
2498 | +<procedure>(global-set! SYMBOL X)</procedure><br> |
---|
2499 | +<procedure>(set! (global-ref SYMBOL) X)</procedure> |
---|
2500 | |
---|
2501 | Sets the global variable named {{SYMBOL}} to the value {{X}}. |
---|
2502 | |
---|
2503 | @@ -614,7 +614,7 @@ Sets the global variable named {{SYMBOL}} to the value {{X}}. |
---|
2504 | |
---|
2505 | ==== make-record-instance |
---|
2506 | |
---|
2507 | - [procedure] (make-record-instance SYMBOL ARG1 ...) |
---|
2508 | +<procedure>(make-record-instance SYMBOL ARG1 ...)</procedure> |
---|
2509 | |
---|
2510 | Returns a new instance of the record type {{SYMBOL}}, with its |
---|
2511 | slots initialized to {{ARG1 ...}}. To illustrate: |
---|
2512 | @@ -643,7 +643,7 @@ expands into something quite similar to: |
---|
2513 | |
---|
2514 | ==== record-instance? |
---|
2515 | |
---|
2516 | - [procedure] (record-instance? X [SYMBOL]) |
---|
2517 | +<procedure>(record-instance? X [SYMBOL])</procedure> |
---|
2518 | |
---|
2519 | Returns {{#t}} if {{X}} is a record structure, or {{#f}} otherwise. |
---|
2520 | |
---|
2521 | @@ -652,7 +652,7 @@ Further, returns {{#t}} if {{X}} is of type {{SYMBOL}}, or {{#f}} otherwise. |
---|
2522 | |
---|
2523 | ==== record-instance-type |
---|
2524 | |
---|
2525 | - [procedure] (record-instance-type RECORD) |
---|
2526 | +<procedure>(record-instance-type RECORD)</procedure> |
---|
2527 | |
---|
2528 | Returns type symbol of the record structure {{RECORD}}. Signals an error if |
---|
2529 | {{RECORD}} is not a record structure. |
---|
2530 | @@ -660,7 +660,7 @@ Returns type symbol of the record structure {{RECORD}}. Signals an error if |
---|
2531 | |
---|
2532 | ==== record-instance-length |
---|
2533 | |
---|
2534 | - [procedure] (record-instance-length RECORD) |
---|
2535 | +<procedure>(record-instance-length RECORD)</procedure> |
---|
2536 | |
---|
2537 | Returns number of slots for the record structure {{RECORD}}. The |
---|
2538 | record-instance type is not counted. Signals an error if |
---|
2539 | @@ -669,7 +669,7 @@ record-instance type is not counted. Signals an error if |
---|
2540 | |
---|
2541 | ==== record-instance-slot |
---|
2542 | |
---|
2543 | - [procedure] (record-instance-slot RECORD INDEX) |
---|
2544 | +<procedure>(record-instance-slot RECORD INDEX)</procedure> |
---|
2545 | |
---|
2546 | Returns the contents of the {{INDEX}}th slot of the record structure |
---|
2547 | {{RECORD}}. The slot index range is the open interval (([0 |
---|
2548 | @@ -679,8 +679,8 @@ structure. |
---|
2549 | |
---|
2550 | ==== record-instance-slot-set! |
---|
2551 | |
---|
2552 | - [procedure] (record-instance-slot-set! RECORD INDEX X) |
---|
2553 | - [procedure] (set! (record-instance-slot RECORD INDEX) X) |
---|
2554 | +<procedure>(record-instance-slot-set! RECORD INDEX X)</procedure><br> |
---|
2555 | +<procedure>(set! (record-instance-slot RECORD INDEX) X)</procedure> |
---|
2556 | |
---|
2557 | Sets the {{INDEX}}th slot of the record structure {{RECORD}} to {{X}}. The slot |
---|
2558 | index range is the open interval (([0 record-instance-length)}}. Signals an |
---|
2559 | @@ -689,7 +689,7 @@ error if {{RECORD}} is not a record structure. |
---|
2560 | |
---|
2561 | ==== record->vector |
---|
2562 | |
---|
2563 | - [procedure] (record->vector RECORD) |
---|
2564 | +<procedure>(record->vector RECORD)</procedure> |
---|
2565 | |
---|
2566 | Returns a new vector with the type and the elements of the record structure |
---|
2567 | {{RECORD}}. Signals an error if {{RECORD}} is not a record structure. |
---|
2568 | @@ -700,7 +700,7 @@ Returns a new vector with the type and the elements of the record structure |
---|
2569 | |
---|
2570 | ==== object-become! |
---|
2571 | |
---|
2572 | - [procedure] (object-become! ALIST) |
---|
2573 | +<procedure>(object-become! ALIST)</procedure> |
---|
2574 | |
---|
2575 | Changes the identity of the value of the car of each pair in {{ALIST}} to the |
---|
2576 | value of the cdr. Both values may not be immediate (i.e. exact integers, |
---|
2577 | @@ -723,7 +723,7 @@ is undefined. |
---|
2578 | |
---|
2579 | ==== mutate-procedure |
---|
2580 | |
---|
2581 | - [procedure] (mutate-procedure OLD PROC) |
---|
2582 | +<procedure>(mutate-procedure OLD PROC)</procedure> |
---|
2583 | |
---|
2584 | Replaces the procedure {{OLD}} with the result of calling the one-argument |
---|
2585 | procedure {{PROC}}. {{PROC}} will receive a copy of {{OLD}} that will be |
---|
2586 | diff --git a/manual/Unit posix b/manual/Unit posix |
---|
2587 | index 055a4f9..554a711 100644 |
---|
2588 | --- a/manual/Unit posix |
---|
2589 | +++ b/manual/Unit posix |
---|
2590 | @@ -17,58 +17,64 @@ of kind {{(exn i/o file)}}. |
---|
2591 | |
---|
2592 | ==== File-control Commands |
---|
2593 | |
---|
2594 | -===== fcntl/dupfd |
---|
2595 | -===== fcntl/getfd |
---|
2596 | -===== fcntl/setfd |
---|
2597 | -===== fcntl/getfl |
---|
2598 | -===== fcntl/setfl |
---|
2599 | +<constant>fcntl/dupfd</constant><br> |
---|
2600 | +<constant>fcntl/getfd</constant><br> |
---|
2601 | +<constant>fcntl/setfd</constant><br> |
---|
2602 | +<constant>fcntl/getfl</constant><br> |
---|
2603 | +<constant>fcntl/setfl</constant> |
---|
2604 | + |
---|
2605 | +Operations used with {{file-control}}. |
---|
2606 | |
---|
2607 | ==== Standard I/O file-descriptors |
---|
2608 | |
---|
2609 | -===== fileno/stdin |
---|
2610 | -===== fileno/stdout |
---|
2611 | -===== fileno/stderr |
---|
2612 | +<constant>fileno/stdin</constant><br> |
---|
2613 | +<constant>fileno/stdout</constant><br> |
---|
2614 | +<constant>fileno/stderr</constant> |
---|
2615 | + |
---|
2616 | +Standard I/O file descriptor numbers, used with procedures |
---|
2617 | +such as {{open-input-file*}} which take file descriptors. |
---|
2618 | |
---|
2619 | ==== Open flags |
---|
2620 | |
---|
2621 | -===== open/rdonly |
---|
2622 | -===== open/wronly |
---|
2623 | -===== open/rdwr |
---|
2624 | -===== open/read |
---|
2625 | -Synonym for {{open/rdonly}}. |
---|
2626 | - |
---|
2627 | -===== open/write |
---|
2628 | -Synonym for {{open/wronly}}. |
---|
2629 | - |
---|
2630 | -===== open/creat |
---|
2631 | -===== open/append |
---|
2632 | -===== open/excl |
---|
2633 | -===== open/noctty |
---|
2634 | -===== open/nonblock |
---|
2635 | -===== open/trunc |
---|
2636 | -===== open/sync |
---|
2637 | -===== open/fsync |
---|
2638 | -===== open/binary |
---|
2639 | -===== open/text |
---|
2640 | +<constant>open/rdonly</constant><br> |
---|
2641 | +<constant>open/wronly</constant><br> |
---|
2642 | +<constant>open/rdwr</constant><br> |
---|
2643 | +<constant>open/read</constant><br> |
---|
2644 | +<constant>open/write</constant><br> |
---|
2645 | +<constant>open/creat</constant><br> |
---|
2646 | +<constant>open/append</constant><br> |
---|
2647 | +<constant>open/excl</constant><br> |
---|
2648 | +<constant>open/noctty</constant><br> |
---|
2649 | +<constant>open/nonblock</constant><br> |
---|
2650 | +<constant>open/trunc</constant><br> |
---|
2651 | +<constant>open/sync</constant><br> |
---|
2652 | +<constant>open/fsync</constant><br> |
---|
2653 | +<constant>open/binary</constant><br> |
---|
2654 | +<constant>open/text</constant> |
---|
2655 | + |
---|
2656 | +Open flags used with the {{file-open}} procedure. {{open/read}} is a |
---|
2657 | +convenience synonym for {{open/rdonly}}, as is {{open/write}} |
---|
2658 | +for {{open/wronly}}. |
---|
2659 | |
---|
2660 | ==== Permission bits |
---|
2661 | |
---|
2662 | -===== perm/irusr |
---|
2663 | -===== perm/iwusr |
---|
2664 | -===== perm/ixusr |
---|
2665 | -===== perm/irgrp |
---|
2666 | -===== perm/iwgrp |
---|
2667 | -===== perm/ixgrp |
---|
2668 | -===== perm/iroth |
---|
2669 | -===== perm/iwoth |
---|
2670 | -===== perm/ixoth |
---|
2671 | -===== perm/irwxu |
---|
2672 | -===== perm/irwxg |
---|
2673 | -===== perm/irwxo |
---|
2674 | -===== perm/isvtx |
---|
2675 | -===== perm/isuid |
---|
2676 | -===== perm/isgid |
---|
2677 | - |
---|
2678 | +<constant>perm/irusr</constant><br> |
---|
2679 | +<constant>perm/iwusr</constant><br> |
---|
2680 | +<constant>perm/ixusr</constant><br> |
---|
2681 | +<constant>perm/irgrp</constant><br> |
---|
2682 | +<constant>perm/iwgrp</constant><br> |
---|
2683 | +<constant>perm/ixgrp</constant><br> |
---|
2684 | +<constant>perm/iroth</constant><br> |
---|
2685 | +<constant>perm/iwoth</constant><br> |
---|
2686 | +<constant>perm/ixoth</constant><br> |
---|
2687 | +<constant>perm/irwxu</constant><br> |
---|
2688 | +<constant>perm/irwxg</constant><br> |
---|
2689 | +<constant>perm/irwxo</constant><br> |
---|
2690 | +<constant>perm/isvtx</constant><br> |
---|
2691 | +<constant>perm/isuid</constant><br> |
---|
2692 | +<constant>perm/isgid</constant> |
---|
2693 | + |
---|
2694 | +Permission bits used with, for example, {{file-open}}. |
---|
2695 | |
---|
2696 | === Directories |
---|
2697 | |
---|
2698 | @@ -137,7 +143,7 @@ If the current process has no root permissions, the operation will fail. |
---|
2699 | ==== call-with-input-pipe |
---|
2700 | ==== call-with-output-pipe |
---|
2701 | |
---|
2702 | -<procedure>(call-with-input-pipe CMDLINE PROC [MODE])</procedure> |
---|
2703 | +<procedure>(call-with-input-pipe CMDLINE PROC [MODE])</procedure><br> |
---|
2704 | <procedure>(call-with-output-pipe CMDLINE PROC [MODE])</procedure> |
---|
2705 | |
---|
2706 | Call {{PROC}} with a single argument: a input- or output port |
---|
2707 | @@ -148,7 +154,7 @@ are returned. |
---|
2708 | ==== close-input-pipe |
---|
2709 | ==== close-output-pipe |
---|
2710 | |
---|
2711 | -<procedure>(close-input-pipe PORT)</procedure> |
---|
2712 | +<procedure>(close-input-pipe PORT)</procedure><br> |
---|
2713 | <procedure>(close-output-pipe PORT)</procedure> |
---|
2714 | |
---|
2715 | Closes the pipe given in {{PORT}} and waits until the connected |
---|
2716 | @@ -188,7 +194,7 @@ atomically into a pipe or FIFO. |
---|
2717 | ==== with-input-from-pipe |
---|
2718 | ==== with-output-to-pipe |
---|
2719 | |
---|
2720 | -<procedure>(with-input-from-pipe CMDLINE THUNK [MODE])</procedure> |
---|
2721 | +<procedure>(with-input-from-pipe CMDLINE THUNK [MODE])</procedure><br> |
---|
2722 | <procedure>(with-output-to-pipe CMDLINE THUNK [MODE])</procedure> |
---|
2723 | |
---|
2724 | Temporarily set the value of |
---|
2725 | @@ -340,7 +346,7 @@ meaningful depending on the {{COMMAND}}. |
---|
2726 | ==== open-input-file* |
---|
2727 | ==== open-output-file* |
---|
2728 | |
---|
2729 | -<procedure>(open-input-file* FILENO [OPENMODE])</procedure> |
---|
2730 | +<procedure>(open-input-file* FILENO [OPENMODE])</procedure><br> |
---|
2731 | <procedure>(open-output-file* FILENO [OPENMODE])</procedure> |
---|
2732 | |
---|
2733 | Opens file for the file-descriptor {{FILENO}} for input or output |
---|
2734 | @@ -363,8 +369,8 @@ this port. Otherwise an error is signaled. |
---|
2735 | ==== file-change-time |
---|
2736 | ==== file-modification-time |
---|
2737 | |
---|
2738 | -<procedure>(file-access-time FILE)</procedure> |
---|
2739 | -<procedure>(file-change-time FILE)</procedure> |
---|
2740 | +<procedure>(file-access-time FILE)</procedure><br> |
---|
2741 | +<procedure>(file-change-time FILE)</procedure><br> |
---|
2742 | <procedure>(file-modification-time FILE)</procedure> |
---|
2743 | |
---|
2744 | Returns time (in seconds) of the last access, modification or change of {{FILE}}. {{FILE}} |
---|
2745 | @@ -433,8 +439,8 @@ values. {{FILE}} may be a filename or a file-descriptor. |
---|
2746 | ==== file-write-access? |
---|
2747 | ==== file-execute-access? |
---|
2748 | |
---|
2749 | -<procedure>(file-read-access? FILENAME)</procedure> |
---|
2750 | -<procedure>(file-write-access? FILENAME)</procedure> |
---|
2751 | +<procedure>(file-read-access? FILENAME)</procedure><br> |
---|
2752 | +<procedure>(file-write-access? FILENAME)</procedure><br> |
---|
2753 | <procedure>(file-execute-access? FILENAME)</procedure> |
---|
2754 | |
---|
2755 | These procedures return {{#t}} if the current user has read, |
---|
2756 | @@ -446,9 +452,9 @@ write or execute permissions on the file named {{FILENAME}}. |
---|
2757 | ==== fifo? |
---|
2758 | ==== socket? |
---|
2759 | |
---|
2760 | -<procedure>(character-device? FILENAME)</procedure> |
---|
2761 | -<procedure>(block-device? FILENAME)</procedure> |
---|
2762 | -<procedure>(fifo? FILENAME)</procedure> |
---|
2763 | +<procedure>(character-device? FILENAME)</procedure><br> |
---|
2764 | +<procedure>(block-device? FILENAME)</procedure><br> |
---|
2765 | +<procedure>(fifo? FILENAME)</procedure><br> |
---|
2766 | <procedure>(socket? FILENAME)</procedure> |
---|
2767 | |
---|
2768 | These procedures return {{#t}} if the {{FILENAME}} given is of the |
---|
2769 | @@ -468,7 +474,7 @@ or a file-descriptor. |
---|
2770 | |
---|
2771 | ==== set-file-position! |
---|
2772 | |
---|
2773 | -<procedure>(set-file-position! FILE POSITION [WHENCE])</procedure> |
---|
2774 | +<procedure>(set-file-position! FILE POSITION [WHENCE])</procedure><br> |
---|
2775 | <procedure>(set! (file-position FILE) POSITION)</procedure> |
---|
2776 | |
---|
2777 | Sets the current read/write position of {{FILE}} to |
---|
2778 | @@ -543,7 +549,7 @@ with no arguments and terminates. |
---|
2779 | |
---|
2780 | ==== process-run |
---|
2781 | |
---|
2782 | -<procedure>(process-run COMMANDLINE)</procedure> |
---|
2783 | +<procedure>(process-run COMMANDLINE)</procedure><br> |
---|
2784 | <procedure>(process-run COMMAND ARGUMENT-LIST)</procedure> |
---|
2785 | |
---|
2786 | Creates a new child process. The PID of the new process is returned. |
---|
2787 | @@ -577,7 +583,7 @@ returns three values: |
---|
2788 | |
---|
2789 | ==== process |
---|
2790 | |
---|
2791 | -<procedure>(process COMMANDLINE)</procedure> |
---|
2792 | +<procedure>(process COMMANDLINE)</procedure><br> |
---|
2793 | <procedure>(process COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST])</procedure> |
---|
2794 | |
---|
2795 | Creates a subprocess and returns three values: an input port from |
---|
2796 | @@ -596,7 +602,7 @@ Not using the shell may be preferrable for security reasons. |
---|
2797 | |
---|
2798 | ==== process* |
---|
2799 | |
---|
2800 | -<procedure>(process* COMMANDLINE)</procedure> |
---|
2801 | +<procedure>(process* COMMANDLINE)</procedure><br> |
---|
2802 | <procedure>(process* COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST])</procedure> |
---|
2803 | |
---|
2804 | Like {{process}} but returns 4 values: an input port from |
---|
2805 | @@ -830,31 +836,33 @@ Masks (blocks) the signal for the code {{SIGNUM}}. |
---|
2806 | |
---|
2807 | Unmasks (unblocks) the signal for the code {{SIGNUM}}. |
---|
2808 | |
---|
2809 | -==== signal/term |
---|
2810 | -==== signal/kill |
---|
2811 | -==== signal/int |
---|
2812 | -==== signal/hup |
---|
2813 | -==== signal/fpe |
---|
2814 | -==== signal/ill |
---|
2815 | -==== signal/segv |
---|
2816 | -==== signal/abrt |
---|
2817 | -==== signal/trap |
---|
2818 | -==== signal/quit |
---|
2819 | -==== signal/alrm |
---|
2820 | -==== signal/vtalrm |
---|
2821 | -==== signal/prof |
---|
2822 | -==== signal/io |
---|
2823 | -==== signal/urg |
---|
2824 | -==== signal/chld |
---|
2825 | -==== signal/cont |
---|
2826 | -==== signal/stop |
---|
2827 | -==== signal/tstp |
---|
2828 | -==== signal/pipe |
---|
2829 | -==== signal/xcpu |
---|
2830 | -==== signal/xfsz |
---|
2831 | -==== signal/usr1 |
---|
2832 | -==== signal/usr2 |
---|
2833 | -==== signal/winch |
---|
2834 | +==== Signal codes |
---|
2835 | + |
---|
2836 | +<constant>signal/term</constant><br> |
---|
2837 | +<constant>signal/kill</constant><br> |
---|
2838 | +<constant>signal/int</constant><br> |
---|
2839 | +<constant>signal/hup</constant><br> |
---|
2840 | +<constant>signal/fpe</constant><br> |
---|
2841 | +<constant>signal/ill</constant><br> |
---|
2842 | +<constant>signal/segv</constant><br> |
---|
2843 | +<constant>signal/abrt</constant><br> |
---|
2844 | +<constant>signal/trap</constant><br> |
---|
2845 | +<constant>signal/quit</constant><br> |
---|
2846 | +<constant>signal/alrm</constant><br> |
---|
2847 | +<constant>signal/vtalrm</constant><br> |
---|
2848 | +<constant>signal/prof</constant><br> |
---|
2849 | +<constant>signal/io</constant><br> |
---|
2850 | +<constant>signal/urg</constant><br> |
---|
2851 | +<constant>signal/chld</constant><br> |
---|
2852 | +<constant>signal/cont</constant><br> |
---|
2853 | +<constant>signal/stop</constant><br> |
---|
2854 | +<constant>signal/tstp</constant><br> |
---|
2855 | +<constant>signal/pipe</constant><br> |
---|
2856 | +<constant>signal/xcpu</constant><br> |
---|
2857 | +<constant>signal/xfsz</constant><br> |
---|
2858 | +<constant>signal/usr1</constant><br> |
---|
2859 | +<constant>signal/usr2</constant><br> |
---|
2860 | +<constant>signal/winch</constant> |
---|
2861 | |
---|
2862 | These variables contain signal codes for use with {{process-signal}}, {{set-signal-handler!}}, {{signal-handler}}, {{signal-masked?}}, {{signal-mask!}}, or {{signal-unmask!}}. |
---|
2863 | |
---|
2864 | @@ -863,7 +871,7 @@ These variables contain signal codes for use with {{process-signal}}, {{set-sig |
---|
2865 | |
---|
2866 | ==== current-environment |
---|
2867 | |
---|
2868 | - [procedure] (get-environment-variables) |
---|
2869 | +<procedure>(get-environment-variables)</procedure> |
---|
2870 | |
---|
2871 | Returns a association list of the environment variables and their |
---|
2872 | current values (see also [[http://srfi.schemers.org/srfi-98/|SRFI-98]]). |
---|
2873 | @@ -889,7 +897,7 @@ nothing happens. |
---|
2874 | |
---|
2875 | ==== memory-mapped-file? |
---|
2876 | |
---|
2877 | - [procedure] (memory-mapped-file? X) |
---|
2878 | +<procedure>(memory-mapped-file? X)</procedure> |
---|
2879 | |
---|
2880 | Returns {{#t}}, if {{X}} is an object representing a memory |
---|
2881 | mapped file, or {{#f}} otherwise. |
---|
2882 | @@ -1002,7 +1010,7 @@ The {{FORMAT}} string follows the rules for the C library procedure {{strftime}} |
---|
2883 | |
---|
2884 | ==== string->time |
---|
2885 | |
---|
2886 | - [procedure] (string->time TIME [FORMAT]) |
---|
2887 | +<procedure>(string->time TIME [FORMAT])</procedure> |
---|
2888 | |
---|
2889 | Converts a string of the form represented by the {{FORMAT}} string |
---|
2890 | into the broken down time represented in a 10 element vector. The |
---|
2891 | @@ -1025,29 +1033,30 @@ is not called when this procedure is invoked. The optional return-code |
---|
2892 | |
---|
2893 | === ERRNO values |
---|
2894 | |
---|
2895 | -==== errno/perm |
---|
2896 | -==== errno/noent |
---|
2897 | -==== errno/srch |
---|
2898 | -==== errno/intr |
---|
2899 | -==== errno/io |
---|
2900 | -==== errno/noexec |
---|
2901 | -==== errno/badf |
---|
2902 | -==== errno/child |
---|
2903 | -==== errno/nomem |
---|
2904 | -==== errno/acces |
---|
2905 | -==== errno/fault |
---|
2906 | -==== errno/busy |
---|
2907 | -==== errno/notdir |
---|
2908 | -==== errno/isdir |
---|
2909 | -==== errno/inval |
---|
2910 | -==== errno/mfile |
---|
2911 | -==== errno/nospc |
---|
2912 | -==== errno/spipe |
---|
2913 | -==== errno/pipe |
---|
2914 | -==== errno/again |
---|
2915 | -==== errno/rofs |
---|
2916 | -==== errno/exist |
---|
2917 | -==== errno/wouldblock |
---|
2918 | +<constant>errno/perm</constant><br> |
---|
2919 | +<constant>errno/noent</constant><br> |
---|
2920 | +<constant>errno/srch</constant><br> |
---|
2921 | +<constant>errno/intr</constant><br> |
---|
2922 | +<constant>errno/io</constant><br> |
---|
2923 | +<constant>errno/noexec</constant><br> |
---|
2924 | +<constant>errno/badf</constant><br> |
---|
2925 | +<constant>errno/child</constant><br> |
---|
2926 | +<constant>errno/nomem</constant><br> |
---|
2927 | +<constant>errno/acces</constant><br> |
---|
2928 | +<constant>errno/fault</constant><br> |
---|
2929 | +<constant>errno/busy</constant><br> |
---|
2930 | +<constant>errno/notdir</constant><br> |
---|
2931 | +<constant>errno/isdir</constant><br> |
---|
2932 | +<constant>errno/inval</constant><br> |
---|
2933 | +<constant>errno/mfile</constant><br> |
---|
2934 | +<constant>errno/nospc</constant><br> |
---|
2935 | +<constant>errno/spipe</constant><br> |
---|
2936 | +<constant>errno/pipe</constant><br> |
---|
2937 | +<constant>errno/again</constant><br> |
---|
2938 | +<constant>errno/rofs</constant><br> |
---|
2939 | +<constant>errno/exist</constant><br> |
---|
2940 | +<constant>errno/wouldblock</constant> |
---|
2941 | + |
---|
2942 | These variables contain error codes as returned by {{errno}}. |
---|
2943 | |
---|
2944 | |
---|
2945 | @@ -1121,7 +1130,7 @@ Returns {{#t}} if {{PORT}} is connected to a terminal and |
---|
2946 | |
---|
2947 | ==== terminal-size |
---|
2948 | |
---|
2949 | - [procedure] (terminal-size) |
---|
2950 | +<procedure>(terminal-size)</procedure> |
---|
2951 | |
---|
2952 | Returns two values, the number of columns and rows of the |
---|
2953 | current terminal window or {{0}}, {{0}} if the terminal |
---|
2954 | @@ -1231,9 +1240,9 @@ The optional parameter {{MODE}}, default {{open/binary | open/noinherit}}. This |
---|
2955 | status is available. (Windows does not provide signals as an interprocess |
---|
2956 | communication method.) |
---|
2957 | |
---|
2958 | -<procedure>(process-execute PATHNAME [ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]]])</procedure> |
---|
2959 | -<procedure>(process COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]])</procedure> |
---|
2960 | -<procedure>(process* COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]])</procedure> |
---|
2961 | +<procedure>(process-execute PATHNAME [ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]]])</procedure><br> |
---|
2962 | +<procedure>(process COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]])</procedure><br> |
---|
2963 | +<procedure>(process* COMMAND ARGUMENT-LIST [ENVIRONMENT-LIST [EXACT-FLAG]])</procedure><br> |
---|
2964 | |
---|
2965 | The optional parameter {{EXACT-FLAG}}, default {{#f}}. When {{#f}} any argument string with |
---|
2966 | embedded whitespace will be wrapped in quotes. When {{#t}} no such wrapping occurs. |
---|
2967 | @@ -1306,7 +1315,7 @@ Returns: |
---|
2968 | * the PID when asynchronous |
---|
2969 | * -1 when failure |
---|
2970 | |
---|
2971 | ---- |
---|
2972 | +---- |
---|
2973 | Previous: [[Unit srfi-69]] |
---|
2974 | |
---|
2975 | Next: [[Unit utils]] |
---|
2976 | diff --git a/manual/Unit regex b/manual/Unit regex |
---|
2977 | index 23b78e5..eb8720b 100644 |
---|
2978 | --- a/manual/Unit regex |
---|
2979 | +++ b/manual/Unit regex |
---|
2980 | @@ -21,7 +21,7 @@ just use normal Scheme lists, with quasiquote if you like. |
---|
2981 | |
---|
2982 | === grep |
---|
2983 | |
---|
2984 | - [procedure] (grep REGEX LIST [ACCESSOR]) |
---|
2985 | +<procedure>(grep REGEX LIST [ACCESSOR])</procedure> |
---|
2986 | |
---|
2987 | Returns all items of {{LIST}} that match the regular expression |
---|
2988 | {{REGEX}}. This procedure could be defined as follows: |
---|
2989 | @@ -39,7 +39,7 @@ matching. {{ACCESSOR}} defaults to the identity function. |
---|
2990 | |
---|
2991 | === glob->regexp |
---|
2992 | |
---|
2993 | - [procedure] (glob->regexp PATTERN) |
---|
2994 | +<procedure>(glob->regexp PATTERN)</procedure> |
---|
2995 | |
---|
2996 | Converts the file-pattern {{PATTERN}} into a regular expression. |
---|
2997 | |
---|
2998 | @@ -59,7 +59,7 @@ Converts the file-pattern {{PATTERN}} into a regular expression. |
---|
2999 | |
---|
3000 | === glob? |
---|
3001 | |
---|
3002 | - [procedure] (glob? STRING) |
---|
3003 | +<procedure>(glob? STRING)</procedure> |
---|
3004 | |
---|
3005 | Does the {{STRING}} have any "glob" wildcards? |
---|
3006 | |
---|
3007 | @@ -69,7 +69,7 @@ even though it technically is a valid "glob" file-pattern. |
---|
3008 | |
---|
3009 | === regexp |
---|
3010 | |
---|
3011 | - [procedure] (regexp STRING [IGNORECASE [IGNORESPACE [UTF8]]]) |
---|
3012 | +<procedure>(regexp STRING [IGNORECASE [IGNORESPACE [UTF8]]])</procedure> |
---|
3013 | |
---|
3014 | Returns a precompiled regular expression object for {{string}}. |
---|
3015 | The optional arguments {{IGNORECASE}}, {{IGNORESPACE}} and {{UTF8}} |
---|
3016 | @@ -85,7 +85,7 @@ below. |
---|
3017 | |
---|
3018 | === regexp? |
---|
3019 | |
---|
3020 | - [procedure] (regexp? X) |
---|
3021 | +<procedure>(regexp? X)</procedure> |
---|
3022 | |
---|
3023 | Returns {{#t}} if {{X}} is a precompiled regular expression, |
---|
3024 | or {{#f}} otherwise. |
---|
3025 | @@ -94,8 +94,8 @@ or {{#f}} otherwise. |
---|
3026 | === string-match |
---|
3027 | === string-match-positions |
---|
3028 | |
---|
3029 | - [procedure] (string-match REGEXP STRING [START]) |
---|
3030 | - [procedure] (string-match-positions REGEXP STRING [START]) |
---|
3031 | +<procedure>(string-match REGEXP STRING [START])</procedure><br> |
---|
3032 | +<procedure>(string-match-positions REGEXP STRING [START])</procedure> |
---|
3033 | |
---|
3034 | Matches the regular expression in {{REGEXP}} (a string or a precompiled |
---|
3035 | regular expression) with |
---|
3036 | @@ -117,8 +117,8 @@ If invoked with a precompiled regular expression argument (by using |
---|
3037 | === string-search |
---|
3038 | === string-search-positions |
---|
3039 | |
---|
3040 | - [procedure] (string-search REGEXP STRING [START [RANGE]]) |
---|
3041 | - [procedure] (string-search-positions REGEXP STRING [START [RANGE]]) |
---|
3042 | +<procedure>(string-search REGEXP STRING [START [RANGE]])</procedure><br> |
---|
3043 | +<procedure>(string-search-positions REGEXP STRING [START [RANGE]])</procedure> |
---|
3044 | |
---|
3045 | Searches for the first match of the regular expression in |
---|
3046 | {{REGEXP}} with {{STRING}}. The search can be limited to |
---|
3047 | @@ -127,7 +127,7 @@ Searches for the first match of the regular expression in |
---|
3048 | |
---|
3049 | === string-split-fields |
---|
3050 | |
---|
3051 | - [procedure] (string-split-fields REGEXP STRING [MODE [START]]) |
---|
3052 | +<procedure>(string-split-fields REGEXP STRING [MODE [START]])</procedure> |
---|
3053 | |
---|
3054 | Splits {{STRING}} into a list of fields according to {{MODE}}, |
---|
3055 | where {{MODE}} can be the keyword {{#:infix}} ({{REGEXP}} |
---|
3056 | @@ -154,7 +154,7 @@ which is the default. |
---|
3057 | |
---|
3058 | === string-substitute |
---|
3059 | |
---|
3060 | - [procedure] (string-substitute REGEXP SUBST STRING [MODE]) |
---|
3061 | +<procedure>(string-substitute REGEXP SUBST STRING [MODE])</procedure> |
---|
3062 | |
---|
3063 | Searches substrings in {{STRING}} that match {{REGEXP}} |
---|
3064 | and substitutes them with the string {{SUBST}}. The substitution |
---|
3065 | @@ -176,7 +176,7 @@ signal an error. |
---|
3066 | |
---|
3067 | === string-substitute* |
---|
3068 | |
---|
3069 | - [procedure] (string-substitute* STRING SMAP [MODE]) |
---|
3070 | +<procedure>(string-substitute* STRING SMAP [MODE])</procedure> |
---|
3071 | |
---|
3072 | Substitutes elements of {{STRING}} with {{string-substitute}} according to {{SMAP}}. |
---|
3073 | {{SMAP}} should be an association-list where each element of the list |
---|
3074 | @@ -193,7 +193,7 @@ the regular expression {{MATCH}} in {{STRING}} will be replaced by the string |
---|
3075 | |
---|
3076 | === regexp-escape |
---|
3077 | |
---|
3078 | - [procedure] (regexp-escape STRING) |
---|
3079 | +<procedure>(regexp-escape STRING)</procedure> |
---|
3080 | |
---|
3081 | Escapes all special characters in {{STRING}} with {{\}}, so that the string can be embedded |
---|
3082 | into a regular expression. |
---|
3083 | diff --git a/manual/Unit srfi-18 b/manual/Unit srfi-18 |
---|
3084 | index eacf6ea..1386f81 100644 |
---|
3085 | --- a/manual/Unit srfi-18 |
---|
3086 | +++ b/manual/Unit srfi-18 |
---|
3087 | @@ -40,7 +40,7 @@ The following procedures are provided, in addition to the procedures defined in |
---|
3088 | |
---|
3089 | === thread-signal! |
---|
3090 | |
---|
3091 | - [procedure] (thread-signal! THREAD X) |
---|
3092 | +<procedure>(thread-signal! THREAD X)</procedure> |
---|
3093 | |
---|
3094 | This will cause {{THREAD}} to signal the condition {{X}} once it is scheduled |
---|
3095 | for execution. After signalling the condition, the thread continues with its normal |
---|
3096 | @@ -48,32 +48,32 @@ execution. |
---|
3097 | |
---|
3098 | === thread-quantum |
---|
3099 | |
---|
3100 | - [procedure] (thread-quantum THREAD) |
---|
3101 | +<procedure>(thread-quantum THREAD)</procedure> |
---|
3102 | |
---|
3103 | Returns the quantum of {{THREAD}}, which is an exact integer |
---|
3104 | specifying the approximate time-slice of the thread in milliseconds. |
---|
3105 | |
---|
3106 | === thread-quantum-set! |
---|
3107 | |
---|
3108 | - [procedure] (thread-quantum-set! THREAD QUANTUM) |
---|
3109 | +<procedure>(thread-quantum-set! THREAD QUANTUM)</procedure> |
---|
3110 | |
---|
3111 | Sets the quantum of {{THREAD}} to {{QUANTUM}}. |
---|
3112 | |
---|
3113 | === thread-suspend! |
---|
3114 | |
---|
3115 | - [procedure] (thread-suspend! THREAD) |
---|
3116 | +<procedure>(thread-suspend! THREAD)</procedure> |
---|
3117 | |
---|
3118 | Suspends the execution of {{THREAD}} until resumed. |
---|
3119 | |
---|
3120 | === thread-resume! |
---|
3121 | |
---|
3122 | - [procedure] (thread-resume! THREAD) |
---|
3123 | +<procedure>(thread-resume! THREAD)</procedure> |
---|
3124 | |
---|
3125 | Readies the suspended thread {{THREAD}}. |
---|
3126 | |
---|
3127 | === thread-wait-for-i/o! |
---|
3128 | |
---|
3129 | - [procedure] (thread-wait-for-i/o! FD [MODE]) |
---|
3130 | +<procedure>(thread-wait-for-i/o! FD [MODE])</procedure> |
---|
3131 | |
---|
3132 | Suspends the current thread until input ({{MODE}} is {{#:input}}), output ({{MODE}} is {{#:output}}) |
---|
3133 | or both ({{MODE}} is {{#:all}}) is available. {{FD}} should be a file-descriptor (not a port!) open |
---|
3134 | @@ -81,14 +81,14 @@ for input or output, respectively. |
---|
3135 | |
---|
3136 | === time->milliseconds |
---|
3137 | |
---|
3138 | - [procedure] (time->milliseconds TIME) |
---|
3139 | +<procedure>(time->milliseconds TIME)</procedure> |
---|
3140 | |
---|
3141 | Converts a time object (as created via {{current-time}}) into an exact integer representing |
---|
3142 | the number of milliseconds since process startup. |
---|
3143 | |
---|
3144 | === milliseconds->time |
---|
3145 | |
---|
3146 | - [procedure] (milliseconds->time ms) |
---|
3147 | +<procedure>(milliseconds->time ms)</procedure> |
---|
3148 | |
---|
3149 | Converts into a time object an exact integer representing |
---|
3150 | the number of milliseconds since process startup. |
---|
3151 | diff --git a/manual/Unit srfi-4 b/manual/Unit srfi-4 |
---|
3152 | index 6e62919..ee1ab66 100644 |
---|
3153 | --- a/manual/Unit srfi-4 |
---|
3154 | +++ b/manual/Unit srfi-4 |
---|
3155 | @@ -11,7 +11,7 @@ collected memory: |
---|
3156 | |
---|
3157 | === make-XXXvector |
---|
3158 | |
---|
3159 | - [procedure] (make-XXXvector SIZE [INIT NONGC FINALIZE]) |
---|
3160 | +<procedure>(make-XXXvector SIZE [INIT NONGC FINALIZE])</procedure> |
---|
3161 | |
---|
3162 | Creates a SRFI-4 homogenous number vector of length {{SIZE}}. If {{INIT}} is given, it specifies the initial |
---|
3163 | value for each slot in the vector. The optional arguments {{NONGC}} and {{FINALIZE}} define whether the |
---|
3164 | @@ -41,22 +41,22 @@ Additionally, the following procedures are provided: |
---|
3165 | === f32vector->blob/shared |
---|
3166 | === f64vector->blob/shared |
---|
3167 | |
---|
3168 | - [procedure] (u8vector->blob U8VECTOR) |
---|
3169 | - [procedure] (s8vector->blob S8VECTOR) |
---|
3170 | - [procedure] (u16vector->blob U16VECTOR) |
---|
3171 | - [procedure] (s16vector->blob S16VECTOR) |
---|
3172 | - [procedure] (u32vector->blob U32VECTOR) |
---|
3173 | - [procedure] (s32vector->blob S32VECTOR) |
---|
3174 | - [procedure] (f32vector->blob F32VECTOR) |
---|
3175 | - [procedure] (f64vector->blob F64VECTOR) |
---|
3176 | - [procedure] (u8vector->blob/shared U8VECTOR) |
---|
3177 | - [procedure] (s8vector->blob/shared S8VECTOR) |
---|
3178 | - [procedure] (u16vector->blob/shared U16VECTOR) |
---|
3179 | - [procedure] (s16vector->blob/shared S16VECTOR) |
---|
3180 | - [procedure] (u32vector->blob/shared U32VECTOR) |
---|
3181 | - [procedure] (s32vector->blob/shared S32VECTOR) |
---|
3182 | - [procedure] (f32vector->blob/shared F32VECTOR) |
---|
3183 | - [procedure] (f64vector->blob/shared F64VECTOR) |
---|
3184 | +<procedure>(u8vector->blob U8VECTOR)</procedure><br> |
---|
3185 | +<procedure>(s8vector->blob S8VECTOR)</procedure><br> |
---|
3186 | +<procedure>(u16vector->blob U16VECTOR)</procedure><br> |
---|
3187 | +<procedure>(s16vector->blob S16VECTOR)</procedure><br> |
---|
3188 | +<procedure>(u32vector->blob U32VECTOR)</procedure><br> |
---|
3189 | +<procedure>(s32vector->blob S32VECTOR)</procedure><br> |
---|
3190 | +<procedure>(f32vector->blob F32VECTOR)</procedure><br> |
---|
3191 | +<procedure>(f64vector->blob F64VECTOR)</procedure><br> |
---|
3192 | +<procedure>(u8vector->blob/shared U8VECTOR)</procedure><br> |
---|
3193 | +<procedure>(s8vector->blob/shared S8VECTOR)</procedure><br> |
---|
3194 | +<procedure>(u16vector->blob/shared U16VECTOR)</procedure><br> |
---|
3195 | +<procedure>(s16vector->blob/shared S16VECTOR)</procedure><br> |
---|
3196 | +<procedure>(u32vector->blob/shared U32VECTOR)</procedure><br> |
---|
3197 | +<procedure>(s32vector->blob/shared S32VECTOR)</procedure><br> |
---|
3198 | +<procedure>(f32vector->blob/shared F32VECTOR)</procedure><br> |
---|
3199 | +<procedure>(f64vector->blob/shared F64VECTOR)</procedure> |
---|
3200 | |
---|
3201 | Each of these procedures return the contents of the given vector as a |
---|
3202 | 'packed' blob. The byte order in that vector is platform-dependent |
---|
3203 | @@ -81,22 +81,22 @@ variants return a blob that shares memory with the contents of the vector. |
---|
3204 | === blob->f32vector/shared |
---|
3205 | === blob->f64vector/shared |
---|
3206 | |
---|
3207 | - [procedure] (blob->u8vector BLOB) |
---|
3208 | - [procedure] (blob->s8vector BLOB) |
---|
3209 | - [procedure] (blob->u16vector BLOB) |
---|
3210 | - [procedure] (blob->s16vector BLOB) |
---|
3211 | - [procedure] (blob->u32vector BLOB) |
---|
3212 | - [procedure] (blob->s32vector BLOB) |
---|
3213 | - [procedure] (blob->f32vector BLOB) |
---|
3214 | - [procedure] (blob->f64vector BLOB) |
---|
3215 | - [procedure] (blob->u8vector/shared BLOB) |
---|
3216 | - [procedure] (blob->s8vector/shared BLOB) |
---|
3217 | - [procedure] (blob->u16vector/shared BLOB) |
---|
3218 | - [procedure] (blob->s16vector/shared BLOB) |
---|
3219 | - [procedure] (blob->u32vector/shared BLOB) |
---|
3220 | - [procedure] (blob->s32vector/shared BLOB) |
---|
3221 | - [procedure] (blob->f32vector/shared BLOB) |
---|
3222 | - [procedure] (blob->f64vector/shared BLOB) |
---|
3223 | +<procedure>(blob->u8vector BLOB)</procedure><br> |
---|
3224 | +<procedure>(blob->s8vector BLOB)</procedure><br> |
---|
3225 | +<procedure>(blob->u16vector BLOB)</procedure><br> |
---|
3226 | +<procedure>(blob->s16vector BLOB)</procedure><br> |
---|
3227 | +<procedure>(blob->u32vector BLOB)</procedure><br> |
---|
3228 | +<procedure>(blob->s32vector BLOB)</procedure><br> |
---|
3229 | +<procedure>(blob->f32vector BLOB)</procedure><br> |
---|
3230 | +<procedure>(blob->f64vector BLOB)</procedure><br> |
---|
3231 | +<procedure>(blob->u8vector/shared BLOB)</procedure><br> |
---|
3232 | +<procedure>(blob->s8vector/shared BLOB)</procedure><br> |
---|
3233 | +<procedure>(blob->u16vector/shared BLOB)</procedure><br> |
---|
3234 | +<procedure>(blob->s16vector/shared BLOB)</procedure><br> |
---|
3235 | +<procedure>(blob->u32vector/shared BLOB)</procedure><br> |
---|
3236 | +<procedure>(blob->s32vector/shared BLOB)</procedure><br> |
---|
3237 | +<procedure>(blob->f32vector/shared BLOB)</procedure><br> |
---|
3238 | +<procedure>(blob->f64vector/shared BLOB)</procedure> |
---|
3239 | |
---|
3240 | Each of these procedures return a vector where the argument |
---|
3241 | {{BLOB}} is taken as a 'packed' representation of the contents |
---|
3242 | @@ -113,14 +113,14 @@ shares memory with the contents of the blob. |
---|
3243 | === subf32vector |
---|
3244 | === subf64vector |
---|
3245 | |
---|
3246 | - [procedure] (subu8vector U8VECTOR FROM TO) |
---|
3247 | - [procedure] (subu16vector U16VECTOR FROM TO) |
---|
3248 | - [procedure] (subu32vector U32VECTOR FROM TO) |
---|
3249 | - [procedure] (subs8vector S8VECTOR FROM TO) |
---|
3250 | - [procedure] (subs16vector S16VECTOR FROM TO) |
---|
3251 | - [procedure] (subs32vector S32VECTOR FROM TO) |
---|
3252 | - [procedure] (subf32vector F32VECTOR FROM TO) |
---|
3253 | - [procedure] (subf64vector F64VECTOR FROM TO) |
---|
3254 | +<procedure>(subu8vector U8VECTOR FROM TO)</procedure><br> |
---|
3255 | +<procedure>(subu16vector U16VECTOR FROM TO)</procedure><br> |
---|
3256 | +<procedure>(subu32vector U32VECTOR FROM TO)</procedure><br> |
---|
3257 | +<procedure>(subs8vector S8VECTOR FROM TO)</procedure><br> |
---|
3258 | +<procedure>(subs16vector S16VECTOR FROM TO)</procedure><br> |
---|
3259 | +<procedure>(subs32vector S32VECTOR FROM TO)</procedure><br> |
---|
3260 | +<procedure>(subf32vector F32VECTOR FROM TO)</procedure><br> |
---|
3261 | +<procedure>(subf64vector F64VECTOR FROM TO)</procedure> |
---|
3262 | |
---|
3263 | Creates a number vector of the same type as the argument vector with the elements at the positions {{FROM}} up to but |
---|
3264 | not including {{TO}}. |
---|
3265 | @@ -130,7 +130,7 @@ SRFI-17 Setters for {{XXXvector-ref}} are defined. |
---|
3266 | |
---|
3267 | === read-u8vector |
---|
3268 | |
---|
3269 | - [procedure] (read-u8vector LENGTH [PORT]) |
---|
3270 | +<procedure>(read-u8vector LENGTH [PORT])</procedure> |
---|
3271 | |
---|
3272 | Reads {{LENGTH}} bytes from the {{PORT}} and returns a fresh |
---|
3273 | {{u8vector}} or less if end-of-file is encountered. {{PORT}} defaults to the |
---|
3274 | @@ -140,7 +140,7 @@ If {{LENGTH}} is {{#f}}, the vector will be filled completely until end-of-file |
---|
3275 | |
---|
3276 | === read-u8vector! |
---|
3277 | |
---|
3278 | - [procedure] (read-u8vector! LENGTH U8VECTOR [PORT [START]]) |
---|
3279 | +<procedure>(read-u8vector! LENGTH U8VECTOR [PORT [START]])</procedure> |
---|
3280 | |
---|
3281 | Reads {{LENGTH}} bytes from the {{PORT}} writing the read input into |
---|
3282 | {{U8VECTOR}} beginning at {{START}} (or 0 if not given). {{PORT}} defaults |
---|
3283 | @@ -151,7 +151,7 @@ This procedure returns the number of bytes read. |
---|
3284 | |
---|
3285 | === write-u8vector |
---|
3286 | |
---|
3287 | - [procedure] (write-u8vector U8VECTOR [PORT [START [END]]]) |
---|
3288 | +<procedure>(write-u8vector U8VECTOR [PORT [START [END]]])</procedure> |
---|
3289 | |
---|
3290 | Writes the bytes {{U8VECTOR}} between the indices {{START}} (inclusive) and {{END}} (exclusive) to {{PORT}}. |
---|
3291 | {{PORT}} defaults to the value of {{(current-output-port)}}. |
---|
3292 | diff --git a/manual/Unit srfi-69 b/manual/Unit srfi-69 |
---|
3293 | index d637884..a584af5 100644 |
---|
3294 | --- a/manual/Unit srfi-69 |
---|
3295 | +++ b/manual/Unit srfi-69 |
---|
3296 | @@ -13,7 +13,7 @@ CHICKEN implements SRFI 69 with SRFI 90 extensions. For more information, see |
---|
3297 | |
---|
3298 | ==== make-hash-table |
---|
3299 | |
---|
3300 | - [procedure] (make-hash-table [TEST HASH SIZE] [#:test TEST] [#:hash HASH] [#:size SIZE] [#:initial INITIAL] [#:min-load MIN-LOAD] [#:max-load MAX-LOAD] [#:weak-keys WEAK-KEYS] [#:weak-values WEAK-VALUES]) |
---|
3301 | +<procedure>(make-hash-table [TEST HASH SIZE] [#:test TEST] [#:hash HASH] [#:size SIZE] [#:initial INITIAL] [#:min-load MIN-LOAD] [#:max-load MAX-LOAD] [#:weak-keys WEAK-KEYS] [#:weak-values WEAK-VALUES])</procedure> |
---|
3302 | |
---|
3303 | Returns a new {{HASH-TABLE}} with the supplied configuration. |
---|
3304 | |
---|
3305 | @@ -29,7 +29,7 @@ Returns a new {{HASH-TABLE}} with the supplied configuration. |
---|
3306 | |
---|
3307 | ==== alist->hash-table |
---|
3308 | |
---|
3309 | - [procedure] (alist->hash-table A-LIST [#:test TEST] [#:hash HASH] [#:size SIZE] [#:initial INITIAL] [#:min-load MIN-LOAD] [#:max-load MAX-LOAD] [#:weak-keys WEAK-KEYS] [#:weak-values WEAK-VALUES]) |
---|
3310 | +<procedure>(alist->hash-table A-LIST [#:test TEST] [#:hash HASH] [#:size SIZE] [#:initial INITIAL] [#:min-load MIN-LOAD] [#:max-load MAX-LOAD] [#:weak-keys WEAK-KEYS] [#:weak-values WEAK-VALUES])</procedure> |
---|
3311 | |
---|
3312 | Returns a new {{HASH-TABLE}}. The {{HASH-TABLE}} is populated from the |
---|
3313 | {{A-LIST}}. The keyword arguments are per {{make-hash-table}}. |
---|
3314 | @@ -37,91 +37,91 @@ Returns a new {{HASH-TABLE}}. The {{HASH-TABLE}} is populated from the |
---|
3315 | |
---|
3316 | ==== hash-table? |
---|
3317 | |
---|
3318 | - [procedure] (hash-table? OBJECT) |
---|
3319 | +<procedure>(hash-table? OBJECT)</procedure> |
---|
3320 | |
---|
3321 | Is the {{OBJECT}} a {{hash-table}}? |
---|
3322 | |
---|
3323 | |
---|
3324 | ==== hash-table-size |
---|
3325 | |
---|
3326 | - [procedure] (hash-table-size HASH-TABLE) |
---|
3327 | +<procedure>(hash-table-size HASH-TABLE)</procedure> |
---|
3328 | |
---|
3329 | The {{HASH-TABLE}} size. |
---|
3330 | |
---|
3331 | |
---|
3332 | ==== hash-table-equivalence-function |
---|
3333 | |
---|
3334 | - [procedure] (hash-table-equivalence-function HASH-TABLE) |
---|
3335 | +<procedure>(hash-table-equivalence-function HASH-TABLE)</procedure> |
---|
3336 | |
---|
3337 | The {{HASH-TABLE}} {{equivalence-function}}. |
---|
3338 | |
---|
3339 | |
---|
3340 | ==== hash-table-hash-function |
---|
3341 | |
---|
3342 | - [procedure] (hash-table-hash-function HASH-TABLE) |
---|
3343 | +<procedure>(hash-table-hash-function HASH-TABLE)</procedure> |
---|
3344 | |
---|
3345 | The {{HASH-TABLE}} {{hash-function}}. |
---|
3346 | |
---|
3347 | |
---|
3348 | ==== hash-table-min-load |
---|
3349 | |
---|
3350 | - [procedure] (hash-table-min-load HASH-TABLE) |
---|
3351 | +<procedure>(hash-table-min-load HASH-TABLE)</procedure> |
---|
3352 | |
---|
3353 | The {{HASH-TABLE}} minimum load factor. |
---|
3354 | |
---|
3355 | |
---|
3356 | ==== hash-table-max-load |
---|
3357 | |
---|
3358 | - [procedure] (hash-table-max-load HASH-TABLE) |
---|
3359 | +<procedure>(hash-table-max-load HASH-TABLE)</procedure> |
---|
3360 | |
---|
3361 | The {{HASH-TABLE}} maximum load factor. |
---|
3362 | |
---|
3363 | |
---|
3364 | ==== hash-table-weak-keys |
---|
3365 | |
---|
3366 | - [procedure] (hash-table-weak-keys HASH-TABLE) |
---|
3367 | +<procedure>(hash-table-weak-keys HASH-TABLE)</procedure> |
---|
3368 | |
---|
3369 | Does the {{HASH-TABLE}} weak references for keys? |
---|
3370 | |
---|
3371 | |
---|
3372 | ==== hash-table-weak-values |
---|
3373 | |
---|
3374 | - [procedure] (hash-table-weak-values HASH-TABLE) |
---|
3375 | +<procedure>(hash-table-weak-values HASH-TABLE)</procedure> |
---|
3376 | |
---|
3377 | Does the {{HASH-TABLE}} weak references for values? |
---|
3378 | |
---|
3379 | |
---|
3380 | ==== hash-table-has-initial? |
---|
3381 | |
---|
3382 | - [procedure] (hash-table-has-initial? HASH-TABLE) |
---|
3383 | +<procedure>(hash-table-has-initial? HASH-TABLE)</procedure> |
---|
3384 | |
---|
3385 | Does the {{HASH-TABLE}} have a default initial value? |
---|
3386 | |
---|
3387 | |
---|
3388 | ==== hash-table-initial |
---|
3389 | |
---|
3390 | - [procedure] (hash-table-initial HASH-TABLE) |
---|
3391 | +<procedure>(hash-table-initial HASH-TABLE)</procedure> |
---|
3392 | |
---|
3393 | The {{HASH-TABLE}} default initial value. |
---|
3394 | |
---|
3395 | |
---|
3396 | ==== hash-table-keys |
---|
3397 | |
---|
3398 | - [procedure] (hash-table-keys HASH-TABLE) |
---|
3399 | +<procedure>(hash-table-keys HASH-TABLE)</procedure> |
---|
3400 | |
---|
3401 | Returns a list of the keys in the {{HASH-TABLE}} population. |
---|
3402 | |
---|
3403 | |
---|
3404 | ==== hash-table-values |
---|
3405 | |
---|
3406 | - [procedure] (hash-table-values HASH-TABLE) |
---|
3407 | +<procedure>(hash-table-values HASH-TABLE)</procedure> |
---|
3408 | |
---|
3409 | Returns a list of the values in the {{HASH-TABLE}} population. |
---|
3410 | |
---|
3411 | |
---|
3412 | ==== hash-table->alist |
---|
3413 | |
---|
3414 | - [procedure] (hash-table->alist HASH-TABLE) |
---|
3415 | +<procedure>(hash-table->alist HASH-TABLE)</procedure> |
---|
3416 | |
---|
3417 | Returns the population of the {{HASH-TABLE}} as an {{a-list}}. |
---|
3418 | |
---|
3419 | @@ -129,7 +129,7 @@ Returns the population of the {{HASH-TABLE}} as an {{a-list}}. |
---|
3420 | |
---|
3421 | ==== hash-table-ref |
---|
3422 | |
---|
3423 | - [procedure] (hash-table-ref HASH-TABLE KEY) |
---|
3424 | +<procedure>(hash-table-ref HASH-TABLE KEY)</procedure> |
---|
3425 | |
---|
3426 | Returns the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}. |
---|
3427 | |
---|
3428 | @@ -138,7 +138,7 @@ Aborts with an exception when the {{KEY}} is missing. |
---|
3429 | |
---|
3430 | ==== hash-table-ref/default |
---|
3431 | |
---|
3432 | - [procedure] (hash-table-ref/default HASH-TABLE KEY DEFAULT) |
---|
3433 | +<procedure>(hash-table-ref/default HASH-TABLE KEY DEFAULT)</procedure> |
---|
3434 | |
---|
3435 | Returns the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}, or the {{DEFAULT}} |
---|
3436 | when the {{KEY}} is missing. |
---|
3437 | @@ -146,14 +146,14 @@ when the {{KEY}} is missing. |
---|
3438 | |
---|
3439 | ==== hash-table-exists? |
---|
3440 | |
---|
3441 | - [procedure] (hash-table-exists? HASH-TABLE KEY) |
---|
3442 | +<procedure>(hash-table-exists? HASH-TABLE KEY)</procedure> |
---|
3443 | |
---|
3444 | Does the {{KEY}} exist in the {{HASH-TABLE}}? |
---|
3445 | |
---|
3446 | |
---|
3447 | ==== hash-table-set! |
---|
3448 | |
---|
3449 | - [procedure] (hash-table-set! HASH-TABLE KEY VALUE) |
---|
3450 | +<procedure>(hash-table-set! HASH-TABLE KEY VALUE)</procedure> |
---|
3451 | |
---|
3452 | Set the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}. |
---|
3453 | |
---|
3454 | @@ -172,7 +172,7 @@ is equivalent to |
---|
3455 | |
---|
3456 | ==== hash-table-update! |
---|
3457 | |
---|
3458 | - [procedure] (hash-table-update! HASH-TABLE KEY [UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION]]) |
---|
3459 | +<procedure>(hash-table-update! HASH-TABLE KEY [UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION]])</procedure> |
---|
3460 | |
---|
3461 | Sets or replaces the {{VALUE}} for {{KEY}} in the {{HASH-TABLE}}. |
---|
3462 | |
---|
3463 | @@ -188,7 +188,7 @@ Returns the new {{VALUE}}. |
---|
3464 | |
---|
3465 | ==== hash-table-update!/default |
---|
3466 | |
---|
3467 | - [procedure] (hash-table-update! HASH-TABLE KEY UPDATE-FUNCTION DEFAULT-VALUE) |
---|
3468 | +<procedure>(hash-table-update!/default HASH-TABLE KEY UPDATE-FUNCTION DEFAULT-VALUE)</procedure> |
---|
3469 | |
---|
3470 | Sets or replaces the {{VALUE}} for {{KEY}} in the {{HASH-TABLE}}. |
---|
3471 | |
---|
3472 | @@ -202,21 +202,21 @@ Returns the new {{VALUE}}. |
---|
3473 | |
---|
3474 | ==== hash-table-copy |
---|
3475 | |
---|
3476 | - [procedure] (hash-table-copy HASH-TABLE) |
---|
3477 | +<procedure>(hash-table-copy HASH-TABLE)</procedure> |
---|
3478 | |
---|
3479 | Returns a shallow copy of the {{HASH-TABLE}}. |
---|
3480 | |
---|
3481 | |
---|
3482 | ==== hash-table-delete! |
---|
3483 | |
---|
3484 | - [procedure] (hash-table-delete! HASH-TABLE KEY) |
---|
3485 | +<procedure>(hash-table-delete! HASH-TABLE KEY)</procedure> |
---|
3486 | |
---|
3487 | Deletes the entry for {{KEY}} in the {{HASH-TABLE}}. |
---|
3488 | |
---|
3489 | |
---|
3490 | ==== hash-table-remove! |
---|
3491 | |
---|
3492 | - [procedure] (hash-table-remove! HASH-TABLE PROC) |
---|
3493 | +<procedure>(hash-table-remove! HASH-TABLE PROC)</procedure> |
---|
3494 | |
---|
3495 | Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each |
---|
3496 | entry. If {{PROC}} returns true, then that entry is removed. |
---|
3497 | @@ -224,14 +224,14 @@ entry. If {{PROC}} returns true, then that entry is removed. |
---|
3498 | |
---|
3499 | ==== hash-table-clear! |
---|
3500 | |
---|
3501 | - [procedure] (hash-table-clear! HASH-TABLE) |
---|
3502 | +<procedure>(hash-table-clear! HASH-TABLE)</procedure> |
---|
3503 | |
---|
3504 | Deletes all entries in {{HASH-TABLE}}. |
---|
3505 | |
---|
3506 | |
---|
3507 | ==== hash-table-merge |
---|
3508 | |
---|
3509 | - [procedure] (hash-table-merge HASH-TABLE-1 HASH-TABLE-2) |
---|
3510 | +<procedure>(hash-table-merge HASH-TABLE-1 HASH-TABLE-2)</procedure> |
---|
3511 | |
---|
3512 | Returns a new {{HASH-TABLE}} with the union of {{HASH-TABLE-1}} and |
---|
3513 | {{HASH-TABLE-2}}. |
---|
3514 | @@ -239,7 +239,7 @@ Returns a new {{HASH-TABLE}} with the union of {{HASH-TABLE-1}} and |
---|
3515 | |
---|
3516 | ==== hash-table-merge! |
---|
3517 | |
---|
3518 | - [procedure] (hash-table-merge! HASH-TABLE-1 HASH-TABLE-2) |
---|
3519 | +<procedure>(hash-table-merge! HASH-TABLE-1 HASH-TABLE-2)</procedure> |
---|
3520 | |
---|
3521 | Returns {{HASH-TABLE-1}} as the union of {{HASH-TABLE-1}} and |
---|
3522 | {{HASH-TABLE-2}}. |
---|
3523 | @@ -247,7 +247,7 @@ Returns {{HASH-TABLE-1}} as the union of {{HASH-TABLE-1}} and |
---|
3524 | |
---|
3525 | ==== hash-table-map |
---|
3526 | |
---|
3527 | - [procedure] (hash-table-map HASH-TABLE FUNC) |
---|
3528 | +<procedure>(hash-table-map HASH-TABLE FUNC)</procedure> |
---|
3529 | |
---|
3530 | Calls {{FUNC}} for all entries in {{HASH-TABLE}} with the key and value of each |
---|
3531 | entry. |
---|
3532 | @@ -257,7 +257,7 @@ Returns a list of the results of each call. |
---|
3533 | |
---|
3534 | ==== hash-table-fold |
---|
3535 | |
---|
3536 | - [procedure] (hash-table-fold HASH-TABLE FUNC INIT) |
---|
3537 | +<procedure>(hash-table-fold HASH-TABLE FUNC INIT)</procedure> |
---|
3538 | |
---|
3539 | Calls {{FUNC}} for all entries in {{HASH-TABLE}} with the key and value of each |
---|
3540 | entry, and the current folded value. The initial folded value is {{INIT}}. |
---|
3541 | @@ -267,7 +267,7 @@ Returns the final folded value. |
---|
3542 | |
---|
3543 | ==== hash-table-for-each |
---|
3544 | |
---|
3545 | - [procedure] (hash-table-for-each HASH-TABLE PROC) |
---|
3546 | +<procedure>(hash-table-for-each HASH-TABLE PROC)</procedure> |
---|
3547 | |
---|
3548 | Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each |
---|
3549 | entry. |
---|
3550 | @@ -275,7 +275,7 @@ entry. |
---|
3551 | |
---|
3552 | ==== hash-table-walk |
---|
3553 | |
---|
3554 | - [procedure] (hash-table-walk HASH-TABLE PROC) |
---|
3555 | +<procedure>(hash-table-walk HASH-TABLE PROC)</procedure> |
---|
3556 | |
---|
3557 | Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each |
---|
3558 | entry. |
---|
3559 | @@ -288,35 +288,35 @@ All hash functions return a {{fixnum}} in the range [0 {{BOUND}}). |
---|
3560 | |
---|
3561 | ==== number-hash |
---|
3562 | |
---|
3563 | - [procedure] (number-hash NUMBER [BOUND]) |
---|
3564 | +<procedure>(number-hash NUMBER [BOUND])</procedure> |
---|
3565 | |
---|
3566 | For use with {{=}} as a {{hash-table-equivalence-function}}. |
---|
3567 | |
---|
3568 | |
---|
3569 | ==== object-uid-hash |
---|
3570 | |
---|
3571 | - [procedure] (object-uid-hash OBJECT [BOUND]) |
---|
3572 | +<procedure>(object-uid-hash OBJECT [BOUND])</procedure> |
---|
3573 | |
---|
3574 | Currently a synonym for {{equal?-hash}}. |
---|
3575 | |
---|
3576 | |
---|
3577 | ==== symbol-hash |
---|
3578 | |
---|
3579 | - [procedure] (symbol-hash SYMBOL [BOUND]) |
---|
3580 | +<procedure>(symbol-hash SYMBOL [BOUND])</procedure> |
---|
3581 | |
---|
3582 | For use with {{eq?}} as a {{hash-table-equivalence-function}}. |
---|
3583 | |
---|
3584 | |
---|
3585 | ==== keyword-hash |
---|
3586 | |
---|
3587 | - [procedure] (keyword-hash KEYWORD [BOUND]) |
---|
3588 | +<procedure>(keyword-hash KEYWORD [BOUND])</procedure> |
---|
3589 | |
---|
3590 | For use with {{eq?}} as a {{hash-table-equivalence-function}}. |
---|
3591 | |
---|
3592 | |
---|
3593 | ==== string-hash |
---|
3594 | |
---|
3595 | - [procedure] (string-hash STRING [BOUND START END]) |
---|
3596 | +<procedure>(string-hash STRING [BOUND START END])</procedure> |
---|
3597 | |
---|
3598 | For use with {{string=?}} as a {{hash-table-equivalence-function}}. |
---|
3599 | The optional {{START}} and {{END}} arguments may be given to limit |
---|
3600 | @@ -325,43 +325,43 @@ the hash calculation to a specific sub-section of {{STRING}}. |
---|
3601 | |
---|
3602 | ==== string-ci-hash |
---|
3603 | |
---|
3604 | - [procedure] (string-hash-ci STRING [BOUND START END]) |
---|
3605 | - [procedure] (string-ci-hash STRING [BOUND START END]) |
---|
3606 | +<procedure>(string-hash-ci STRING [BOUND START END])</procedure><br> |
---|
3607 | +<procedure>(string-ci-hash STRING [BOUND START END])</procedure> |
---|
3608 | |
---|
3609 | For use with {{string-ci=?}} as a {{hash-table-equivalence-function}}. |
---|
3610 | |
---|
3611 | |
---|
3612 | ==== eq?-hash |
---|
3613 | |
---|
3614 | - [procedure] (eq?-hash OBJECT [BOUND]) |
---|
3615 | +<procedure>(eq?-hash OBJECT [BOUND])</procedure> |
---|
3616 | |
---|
3617 | For use with {{eq?}} as a {{hash-table-equivalence-function}}. |
---|
3618 | |
---|
3619 | |
---|
3620 | ==== eqv?-hash |
---|
3621 | |
---|
3622 | - [procedure] (eqv?-hash OBJECT [BOUND]) |
---|
3623 | +<procedure>(eqv?-hash OBJECT [BOUND])</procedure> |
---|
3624 | |
---|
3625 | For use with {{eqv?}} as a {{hash-table-equivalence-function}}. |
---|
3626 | |
---|
3627 | |
---|
3628 | ==== equal?-hash |
---|
3629 | |
---|
3630 | - [procedure] (equal?-hash OBJECT [BOUND]) |
---|
3631 | +<procedure>(equal?-hash OBJECT [BOUND])</procedure> |
---|
3632 | |
---|
3633 | For use with {{equal?}} as a {{hash-table-equivalence-function}}. |
---|
3634 | |
---|
3635 | |
---|
3636 | ==== hash |
---|
3637 | |
---|
3638 | - [procedure] (hash OBJECT [BOUND]) |
---|
3639 | +<procedure>(hash OBJECT [BOUND])</procedure> |
---|
3640 | |
---|
3641 | Synonym for {{equal?-hash}}. |
---|
3642 | |
---|
3643 | |
---|
3644 | ==== hash-by-identity |
---|
3645 | |
---|
3646 | - [procedure] (hash-by-identity OBJECT [BOUND]) |
---|
3647 | +<procedure>(hash-by-identity OBJECT [BOUND])</procedure> |
---|
3648 | |
---|
3649 | Synonym for {{eq?-hash}}. |
---|
3650 | |
---|
3651 | diff --git a/manual/Unit tcp b/manual/Unit tcp |
---|
3652 | index f4ec584..cb6bfd3 100644 |
---|
3653 | --- a/manual/Unit tcp |
---|
3654 | +++ b/manual/Unit tcp |
---|
3655 | @@ -129,7 +129,7 @@ without breaking the connection. |
---|
3656 | |
---|
3657 | === tcp-buffer-size |
---|
3658 | |
---|
3659 | - [parameter] tcp-buffer-size |
---|
3660 | +<parameter>tcp-buffer-size</parameter> |
---|
3661 | |
---|
3662 | Sets the size of the output buffer. By default no output-buffering for |
---|
3663 | TCP output is done, but to improve performance by minimizing the |
---|
3664 | @@ -145,7 +145,7 @@ Closing the output port will flush automatically. |
---|
3665 | |
---|
3666 | === tcp-read-timeout |
---|
3667 | |
---|
3668 | - [parameter] tcp-read-timeout |
---|
3669 | +<parameter>tcp-read-timeout</parameter> |
---|
3670 | |
---|
3671 | Determines the timeout for TCP read operations in milliseconds. A timeout of |
---|
3672 | {{#f}} disables timeout checking. The default read timeout is 60000, i.e. |
---|
3673 | @@ -155,7 +155,7 @@ is thrown. |
---|
3674 | |
---|
3675 | === tcp-write-timeout |
---|
3676 | |
---|
3677 | - [parameter] tcp-write-timeout |
---|
3678 | +<parameter>tcp-write-timeout</parameter> |
---|
3679 | |
---|
3680 | Determines the timeout for TCP write operations in milliseconds. A timeout of |
---|
3681 | {{#f}} disables timeout checking. The default write timeout is 60000, i.e. |
---|
3682 | @@ -165,7 +165,7 @@ is thrown. |
---|
3683 | |
---|
3684 | === tcp-connect-timeout |
---|
3685 | |
---|
3686 | - [parameter] tcp-connect-timeout |
---|
3687 | +<parameter>tcp-connect-timeout</parameter> |
---|
3688 | |
---|
3689 | Determines the timeout for {{tcp-connect}} operations in milliseconds. A timeout of |
---|
3690 | {{#f}} disables timeout checking and is the default. |
---|
3691 | @@ -175,7 +175,7 @@ is thrown. |
---|
3692 | |
---|
3693 | === tcp-accept-timeout |
---|
3694 | |
---|
3695 | - [parameter] tcp-accept-timeout |
---|
3696 | +<parameter>tcp-accept-timeout</parameter> |
---|
3697 | |
---|
3698 | Determines the timeout for {{tcp-accept}} operations in milliseconds. A timeout of |
---|
3699 | {{#f}} disables timeout checking and is the default. |
---|
3700 | diff --git a/manual/Unit utils b/manual/Unit utils |
---|
3701 | index 8e5b88e..f7622b9 100644 |
---|
3702 | --- a/manual/Unit utils |
---|
3703 | +++ b/manual/Unit utils |
---|
3704 | @@ -15,7 +15,7 @@ This unit uses the {{extras}} and {{srfi-13}} units. |
---|
3705 | |
---|
3706 | ==== system* |
---|
3707 | |
---|
3708 | - [procedure] (system* FORMATSTRING ARGUMENT1 ...) |
---|
3709 | +<procedure>(system* FORMATSTRING ARGUMENT1 ...)</procedure> |
---|
3710 | |
---|
3711 | Similar to {{(system (sprintf FORMATSTRING ARGUMENT1 ...))}}, |
---|
3712 | but signals an error if the invoked program should return a nonzero |
---|
3713 | @@ -25,7 +25,7 @@ exit status. |
---|
3714 | |
---|
3715 | ==== read-all |
---|
3716 | |
---|
3717 | - [procedure] (read-all [FILE-OR-PORT]) |
---|
3718 | +<procedure>(read-all [FILE-OR-PORT])</procedure> |
---|
3719 | |
---|
3720 | If {{FILE-OR-PORT}} is a string, then this procedure returns the contents of the file |
---|
3721 | as a string. If {{FILE-OR-PORT}} is a port, all remaining input is read and returned as |
---|
3722 | @@ -37,7 +37,7 @@ port that is the current value of {{(current-input-port)}}. |
---|
3723 | |
---|
3724 | ==== qs |
---|
3725 | |
---|
3726 | - [procedure] (qs STRING [PLATFORM]) |
---|
3727 | +<procedure>(qs STRING [PLATFORM])</procedure> |
---|
3728 | |
---|
3729 | Escapes {{STRING}} suitably for passing to a shell command on {{PLATFORM}}. |
---|
3730 | {{PLATFORM}} defaults to the value of {{(build-platform)}} and indicates in |
---|
3731 | diff --git a/manual/Using the interpreter b/manual/Using the interpreter |
---|
3732 | index 04c09dc..fec1ab5 100644 |
---|
3733 | --- a/manual/Using the interpreter |
---|
3734 | +++ b/manual/Using the interpreter |
---|
3735 | @@ -156,7 +156,7 @@ procedure: |
---|
3736 | |
---|
3737 | === toplevel-command |
---|
3738 | |
---|
3739 | - [procedure] (toplevel-command SYMBOL PROC [HELPSTRING]) |
---|
3740 | +<procedure>(toplevel-command SYMBOL PROC [HELPSTRING])</procedure> |
---|
3741 | |
---|
3742 | Defines or redefines a toplevel interpreter command which can be invoked by entering |
---|
3743 | {{,SYMBOL}}. {{PROC}} will be invoked when the command is entered and may |
---|
3744 | @@ -174,7 +174,7 @@ Note that the value returned is implicitly quoted. |
---|
3745 | |
---|
3746 | === set-describer! |
---|
3747 | |
---|
3748 | - [procedure] (set-describer! TAG PROC) |
---|
3749 | +<procedure>(set-describer! TAG PROC)</procedure> |
---|
3750 | |
---|
3751 | Sets a custom description handler that invokes {{PROC}} when the {{,d}} command is invoked |
---|
3752 | with a record-type object that has the type {{TAG}} (a symbol). {{PROC}} is called with |
---|
3753 | -- |
---|
3754 | 1.6.5.2 |
---|
3755 | |
---|
3756 | |
---|
3757 | From fa21d86f15d9cec12f0d0b22a11b39e9d7f9dba2 Mon Sep 17 00:00:00 2001 |
---|
3758 | Message-Id: <fa21d86f15d9cec12f0d0b22a11b39e9d7f9dba2.1260078974.git.zbigniewsz@gmail.com> |
---|
3759 | In-Reply-To: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
3760 | References: <cover.1260078974.git.zbigniewsz@gmail.com> |
---|
3761 | From: zbigniew <zbigniewsz@gmail.com> |
---|
3762 | Date: Sat, 5 Dec 2009 23:29:37 -0600 |
---|
3763 | Subject: Sync changes from wiki manual to core: SVN 16521-16552 |
---|
3764 | Status: O |
---|
3765 | |
---|
3766 | |
---|
3767 | Signed-off-by: zbigniew <zbigniewsz@gmail.com> |
---|
3768 | --- |
---|
3769 | manual/Extensions | 4 +- |
---|
3770 | manual/Non-standard macros and special forms | 34 +++++++--------------- |
---|
3771 | manual/Unit files | 22 ++++----------- |
---|
3772 | manual/Unit posix | 38 +++++++++++++++---------- |
---|
3773 | 4 files changed, 42 insertions(+), 56 deletions(-) |
---|
3774 | |
---|
3775 | diff --git a/manual/Extensions b/manual/Extensions |
---|
3776 | index f7bfdb9..2c3d4b0 100644 |
---|
3777 | --- a/manual/Extensions |
---|
3778 | +++ b/manual/Extensions |
---|
3779 | @@ -81,7 +81,7 @@ script has to be in the root path of the archive. |
---|
3780 | |
---|
3781 | ==== install-extension |
---|
3782 | |
---|
3783 | - (install-extension ID FILELIST [INFOLIST]) |
---|
3784 | +<procedure>(install-extension ID FILELIST [INFOLIST])</procedure> |
---|
3785 | |
---|
3786 | Installs the extension library with the name {{ID}}. All files given in the list of strings |
---|
3787 | {{FILELIST}} will be copied to the extension repository. It should be noted here that |
---|
3788 | @@ -92,7 +92,7 @@ by the {{require-at-runtime}} property. |
---|
3789 | {{FILELIST}} may be a filename, a list of filenames, or a list of pairs of |
---|
3790 | the form {{(SOURCE DEST)}} (if you want to copy into a particular sub-directory - the |
---|
3791 | destination directory will be created as needed). If {{DEST}} is a relative pathname, |
---|
3792 | -< it will be copied into the extension repository. |
---|
3793 | +it will be copied into the extension repository. |
---|
3794 | |
---|
3795 | The optional argument {{INFOLIST}} should be an association list that |
---|
3796 | maps symbols to values, this list will be stored as {{ID.setup-info}} at the same |
---|
3797 | diff --git a/manual/Non-standard macros and special forms b/manual/Non-standard macros and special forms |
---|
3798 | index 43f9be8..6529beb 100644 |
---|
3799 | --- a/manual/Non-standard macros and special forms |
---|
3800 | +++ b/manual/Non-standard macros and special forms |
---|
3801 | @@ -230,23 +230,14 @@ expression that evaluates to a parameter procedure. |
---|
3802 | |
---|
3803 | ==== receive |
---|
3804 | |
---|
3805 | -<macro>(receive (NAME1 ... [. NAMEn]) VALUEEXP BODY ...)</macro><br> |
---|
3806 | +<macro>(receive (NAME ...) VALUEEXP BODY ...)</macro><br> |
---|
3807 | +<macro>(receive (NAME1 ... NAMEn . NAMEn+1) VALUEEXP BODY ...)</macro><br> |
---|
3808 | <macro>(receive VALUEEXP)</macro> |
---|
3809 | |
---|
3810 | SRFI-8. Syntactic sugar for {{call-with-values}}. Binds variables |
---|
3811 | to the result values of {{VALUEEXP}} and evaluates {{BODY ...}}. |
---|
3812 | |
---|
3813 | -The syntax |
---|
3814 | - |
---|
3815 | -<enscript highlight=scheme> |
---|
3816 | -(receive VALUEEXP) |
---|
3817 | -</enscript> |
---|
3818 | - |
---|
3819 | -is equivalent to |
---|
3820 | - |
---|
3821 | -<enscript highlight=scheme> |
---|
3822 | -(receive _ VALUEEXP _) |
---|
3823 | -</enscript> |
---|
3824 | +{{(receive VALUEEXP)}} is equivalent to {{(receive _ VALUEEXP _)}}. |
---|
3825 | |
---|
3826 | ==== set!-values |
---|
3827 | |
---|
3828 | @@ -255,7 +246,6 @@ is equivalent to |
---|
3829 | Assigns the result values of expression {{EXP}} to multiple |
---|
3830 | variables. |
---|
3831 | |
---|
3832 | - |
---|
3833 | === Substitution forms and macros |
---|
3834 | |
---|
3835 | ==== define-constant |
---|
3836 | @@ -277,7 +267,8 @@ This for should only be used at top-level. |
---|
3837 | |
---|
3838 | ==== define-inline |
---|
3839 | |
---|
3840 | -<macro>(define-inline (NAME VAR ... [. VAR]) BODY ...)</macro><br> |
---|
3841 | +<macro>(define-inline (NAME VAR ...) BODY ...)</macro><br> |
---|
3842 | +<macro>(define-inline (NAME VAR1 ... VARn . VARn+1) BODY ...)</macro><br> |
---|
3843 | <macro>(define-inline NAME EXP)</macro> |
---|
3844 | |
---|
3845 | Defines an inline procedure. Any occurrence of {{NAME}} will be |
---|
3846 | @@ -295,8 +286,8 @@ definitions should only appear at toplevel. |
---|
3847 | |
---|
3848 | ==== define-for-syntax |
---|
3849 | |
---|
3850 | -<macro>(define-for-syntax (NAME VAR ... [. VAR]) EXP1 ...)</macro><br> |
---|
3851 | -<macro>(define-for-syntax NAME [VALUE])</macro> |
---|
3852 | +<macro>(define-for-syntax (NAME VAR ...) EXP1 ...)</macro><br> |
---|
3853 | +<macro>(define-for-syntax (NAME VAR1 ... VARn . VARn+1) EXP1 ...)</macro><br> |
---|
3854 | |
---|
3855 | Defines the toplevel variable {{NAME}} at macro-expansion time. This can |
---|
3856 | be helpful when you want to define support procedures for use in macro-transformers, |
---|
3857 | @@ -305,8 +296,8 @@ for example. |
---|
3858 | |
---|
3859 | ==== define-compiler-syntax |
---|
3860 | |
---|
3861 | - [syntax] (define-compiler-syntax NAME TRANSFORMER) |
---|
3862 | - [syntax] (define-compiler-syntax (NAME VAR ...) BODY ...) |
---|
3863 | +<macro>(define-compiler-syntax NAME TRANSFORMER)</macro><br> |
---|
3864 | +<macro>(define-compiler-syntax (NAME VAR ...) BODY ...)</macro> |
---|
3865 | |
---|
3866 | Defines what is usually called a ''compiler macro'': {{NAME}} should be the |
---|
3867 | name of a globally or locally bound procedure. Any direct call to this procedure |
---|
3868 | @@ -332,7 +323,7 @@ exported. |
---|
3869 | |
---|
3870 | ==== let-compiler-syntax |
---|
3871 | |
---|
3872 | - [syntax] (let-compiler-syntax ((NAME TRANSFORMER) ...) BODY ...) |
---|
3873 | +<macro>(let-compiler-syntax ((NAME TRANSFORMER) ...) BODY ...)</macro> |
---|
3874 | |
---|
3875 | Allows definition local compiler macros, which are only applicable inside {{BODY ...}}. |
---|
3876 | |
---|
3877 | @@ -389,10 +380,7 @@ and updated using {{(NAME-SLOTNAME-set!}} {{STRUCT}} {{VALUE)}}. |
---|
3878 | |
---|
3879 | ==== define-record-type |
---|
3880 | |
---|
3881 | -<macro>(define-record-type NAME</macro><br> |
---|
3882 | - (CONSTRUCTOR TAG ...) |
---|
3883 | - PREDICATE |
---|
3884 | - (FIELD ACCESSOR [MODIFIER]) ...) |
---|
3885 | +<macro>(define-record-type NAME (CONSTRUCTOR TAG ...) PREDICATE (FIELD ACCESSOR [MODIFIER]) ...)</macro> |
---|
3886 | |
---|
3887 | SRFI-9 record types. For more information see the documentation for |
---|
3888 | [[http://srfi.schemers.org/srfi-9/srfi-9.html|SRFI-9]]. |
---|
3889 | diff --git a/manual/Unit files b/manual/Unit files |
---|
3890 | index 8657159..fdf399a 100644 |
---|
3891 | --- a/manual/Unit files |
---|
3892 | +++ b/manual/Unit files |
---|
3893 | @@ -27,7 +27,7 @@ For any component that is not contained in {{PATHNAME}}, {{#f}} is returned. |
---|
3894 | ==== make-pathname |
---|
3895 | ==== make-absolute-pathname |
---|
3896 | |
---|
3897 | -<procedure>(make-pathname DIRECTORY FILENAME [EXTENSION])</procedure> |
---|
3898 | +<procedure>(make-pathname DIRECTORY FILENAME [EXTENSION])</procedure><br> |
---|
3899 | <procedure>(make-absolute-pathname DIRECTORY FILENAME [EXTENSION])</procedure> |
---|
3900 | |
---|
3901 | Returns a string that names the file with the |
---|
3902 | @@ -43,41 +43,31 @@ and {{EXTENSION}} should be strings or {{#f}}. |
---|
3903 | The {{[SEPARATOR]}} argument is deprecated. |
---|
3904 | |
---|
3905 | ==== pathname-directory |
---|
3906 | - |
---|
3907 | -<procedure>(pathname-directory PATHNAME)</procedure> |
---|
3908 | - |
---|
3909 | ==== pathname-file |
---|
3910 | - |
---|
3911 | -<procedure>(pathname-file PATHNAME)</procedure> |
---|
3912 | - |
---|
3913 | ==== pathname-extension |
---|
3914 | |
---|
3915 | +<procedure>(pathname-directory PATHNAME)</procedure><br> |
---|
3916 | +<procedure>(pathname-file PATHNAME)</procedure><br> |
---|
3917 | <procedure>(pathname-extension PATHNAME)</procedure> |
---|
3918 | |
---|
3919 | Accessors for the components of {{PATHNAME}}. If the pathname does |
---|
3920 | not contain the accessed component, then {{#f}} is returned. |
---|
3921 | |
---|
3922 | ==== pathname-replace-directory |
---|
3923 | - |
---|
3924 | -<procedure>(pathname-replace-directory PATHNAME DIRECTORY)</procedure> |
---|
3925 | - |
---|
3926 | ==== pathname-replace-file |
---|
3927 | - |
---|
3928 | -<procedure>(pathname-replace-file PATHNAME FILENAME)</procedure> |
---|
3929 | - |
---|
3930 | ==== pathname-replace-extension |
---|
3931 | |
---|
3932 | +<procedure>(pathname-replace-directory PATHNAME DIRECTORY)</procedure><br> |
---|
3933 | +<procedure>(pathname-replace-file PATHNAME FILENAME)</procedure><br> |
---|
3934 | <procedure>(pathname-replace-extension PATHNAME EXTENSION)</procedure> |
---|
3935 | |
---|
3936 | Return a new pathname with the specified component of {{PATHNAME}} |
---|
3937 | replaced by a new value. |
---|
3938 | |
---|
3939 | ==== pathname-strip-directory |
---|
3940 | - |
---|
3941 | -<procedure>(pathname-strip-directory PATHNAME)</procedure> |
---|
3942 | - |
---|
3943 | ==== pathname-strip-extension |
---|
3944 | |
---|
3945 | +<procedure>(pathname-strip-directory PATHNAME)</procedure><br> |
---|
3946 | <procedure>(pathname-strip-extension PATHNAME)</procedure> |
---|
3947 | |
---|
3948 | Return a new pathname with the specified component of {{PATHNAME}} |
---|
3949 | diff --git a/manual/Unit posix b/manual/Unit posix |
---|
3950 | index 554a711..55993bb 100644 |
---|
3951 | --- a/manual/Unit posix |
---|
3952 | +++ b/manual/Unit posix |
---|
3953 | @@ -118,7 +118,8 @@ Files beginning with {{.}} are included only if {{SHOW-DOTFILES?}} is given and |
---|
3954 | <procedure>(directory? NAME)</procedure> |
---|
3955 | |
---|
3956 | Returns {{#t}} if there exists a file with the name {{NAME}} |
---|
3957 | -and if that file is a directory, or {{#f}} otherwise. |
---|
3958 | +and if that file is a directory or a symbolic link pointing |
---|
3959 | +to a directory. Otherwise, it returns {{#f}}. |
---|
3960 | |
---|
3961 | ==== glob |
---|
3962 | |
---|
3963 | @@ -1066,24 +1067,31 @@ These variables contain error codes as returned by {{errno}}. |
---|
3964 | |
---|
3965 | <procedure>(find-files DIRECTORY PREDICATE [ACTION [IDENTITY [LIMIT]]])</procedure> |
---|
3966 | |
---|
3967 | -Recursively traverses the contents of {{DIRECTORY}} (which should |
---|
3968 | -be a string) and invokes the procedure {{ACTION}} for all files |
---|
3969 | -in which the procedure {{PREDICATE}} is true. {{PREDICATE}} |
---|
3970 | -may me a procedure of one argument or a regular-expression string. |
---|
3971 | -{{ACTION}} should be a procedure of two arguments: the currently |
---|
3972 | -encountered file and the result of the previous invocation of |
---|
3973 | -{{ACTION}}, or, if this is the first invocation, the value |
---|
3974 | -of {{IDENTITY}}. {{ACTION}} defaults to {{cons}}, |
---|
3975 | -{{IDENTITY}} defaults to {{()}}. {{LIMIT}} should be a |
---|
3976 | -procedure of one argument that is called for each nested directory |
---|
3977 | -and which should return true, if that directory is to be traversed |
---|
3978 | -recursively. {{LIMIT}} may also be an exact integer that |
---|
3979 | -gives the maximum recursion depth. For example, a depth of {{0}} means that only files in the top-level, specified directory are to be traversed. In this case, all nested directories are ignored. {{LIMIT}} may also be {{#f}} (the default), |
---|
3980 | -which is equivalent to {{(constantly #t)}}. |
---|
3981 | +Recursively traverses the contents of {{DIRECTORY}} (which should be a |
---|
3982 | +string) and invokes the procedure {{ACTION}} for all files in which |
---|
3983 | +the procedure {{PREDICATE}} is true. {{PREDICATE}} may be a procedure |
---|
3984 | +of one argument or a regular-expression string. {{ACTION}} should be |
---|
3985 | +a procedure of two arguments: the currently encountered file and the |
---|
3986 | +result of the previous invocation of {{ACTION}}, or, if this is the |
---|
3987 | +first invocation, the value of {{IDENTITY}}. {{ACTION}} defaults to |
---|
3988 | +{{cons}}, {{IDENTITY}} defaults to {{()}}. {{LIMIT}} should be a |
---|
3989 | +procedure of one argument that is called for each nested directory and |
---|
3990 | +which should return true, if that directory is to be traversed |
---|
3991 | +recursively. {{LIMIT}} may also be an exact integer that gives the |
---|
3992 | +maximum recursion depth. For example, a depth of {{0}} means that only |
---|
3993 | +files in the top-level, specified directory are to be traversed. In |
---|
3994 | +this case, all nested directories are ignored. {{LIMIT}} may also be |
---|
3995 | +{{#f}} (the default), which is equivalent to {{(constantly #t)}}. |
---|
3996 | |
---|
3997 | Note that {{ACTION}} is called with the full pathname of each file, |
---|
3998 | including the directory prefix. |
---|
3999 | |
---|
4000 | +Also note that {{find-files}} will traverse symbolic links pointing to |
---|
4001 | +directories, which may lead to symlink loops or duplication of files. |
---|
4002 | +To avoid traversing symlinks, you can pass something like this as the |
---|
4003 | +{{LIMIT}} procedure: |
---|
4004 | + |
---|
4005 | + (lambda (x) (not (symbolic-link? x))) |
---|
4006 | |
---|
4007 | === Getting the hostname and system information |
---|
4008 | |
---|
4009 | -- |
---|
4010 | 1.6.5.2 |
---|
4011 | |
---|
4012 | |
---|