1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>CHUNGA - Portable chunked streams for Common Lisp</title>
<style type="text/css">
pre { padding:5px; background-color:#e0e0e0 }
h3, h4 { text-decoration: underline; }
a { text-decoration: none; }
a.noborder { border:0px }
a.noborder:hover { border:0px } a.none { border:1px solid white; }
a.none { border:1px solid white; }
a.none:hover { border:1px solid white; }
a { border:1px solid white; }
a:hover { border: 1px solid black; }
a.noborder { border:0px }
a.noborder:hover { border:0px }
</style>
</head>
<body bgcolor=white>
<h2>CHUNGA - Portable chunked streams for Common Lisp</h2>
<blockquote>
<br> <br><h3><a name=abstract class=none>Abstract</a></h3> Chunga
implements streams capable of chunked encoding on demand as defined in
RFC 2616. For an example of how these streams can be used
see <a href="http://weitz.de/drakma/">Drakma</a>.
<p>
The library needs a Common Lisp implementation that
supports <a
href="http://www.nhplace.com/kent/CL/Issues/stream-definition-by-user.html"><em>Gray
streams</em></a> and relies on David
Lichteblau's <a
href="http://www.cliki.net/trivial-gray-streams">trivial-gray-streams</a> to offer portability between different Lisps.
<p>
Chunga is currently not optimized towards performance - it is
rather intended to be easy to use and (if possible) to behave correctly.
<p>
The code comes with
a <a
href="http://www.opensource.org/licenses/bsd-license.php">BSD-style
license</a> so you can basically do with it whatever you want.
<p>
<font color=red>Download shortcut:</font> <a href="http://weitz.de/files/chunga.tar.gz">http://weitz.de/files/chunga.tar.gz</a>.
</blockquote>
<br> <br><h3><a class=none name="contents">Contents</a></h3>
<ol>
<li><a href="#download">Download and installation</a>
<li><a href="#mail">Support and mailing lists</a>
<li><a href="#dictionary">The Chunga dictionary</a>
<ol>
<li><a href="#streams">Chunked streams</a>
<ol>
<li><a href="#chunked-stream"><code>chunked-stream</code></a>
<li><a href="#chunked-input-stream"><code>chunked-input-stream</code></a>
<li><a href="#chunked-output-stream"><code>chunked-output-stream</code></a>
<li><a href="#chunked-io-stream"><code>chunked-io-stream</code></a>
<li><a href="#make-chunked-stream"><code>make-chunked-stream</code></a>
<li><a href="#chunked-stream-stream"><code>chunked-stream-stream</code></a>
<li><a href="#chunked-stream-input-chunking-p"><code>chunked-stream-input-chunking-p</code></a>
<li><a href="#chunked-stream-output-chunking-p"><code>chunked-stream-output-chunking-p</code></a>
<li><a href="#chunked-input-stream-extensions"><code>chunked-input-stream-extensions</code></a>
<li><a href="#chunked-input-stream-trailers"><code>chunked-input-stream-trailers</code></a>
</ol>
<li><a href="#conditions">Conditions</a>
<ol>
<li><a href="#input-chunking-body-corrupted"><code>input-chunking-body-corrupted</code></a>
<li><a href="#input-chunking-unexpected-end-of-file"><code>input-chunking-unexpected-end-of-file</code></a>
</ol>
<li><a href="#parse">RFC 2616 parsing</a>
<ol>
<li><a href="#read-line*"><code>read-line*</code></a>
<li><a href="#read-http-headers"><code>read-http-headers</code></a>
<li><a href="#read-token"><code>read-token</code></a>
<li><a href="#read-name-value-pair"><code>read-name-value-pair</code></a>
<li><a href="#read-name-value-pairs"><code>read-name-value-pairs</code></a>
<li><a href="#assert-char"><code>assert-char</code></a>
<li><a href="#skip-whitespace"><code>skip-whitespace</code></a>
<li><a href="#trim-whitespace"><code>trim-whitespace</code></a>
<li><a href="#*current-error-message*"><code>*current-error-message*</code></a>
</ol>
</ol>
<li><a href="#ack">Acknowledgements</a>
</ol>
<br> <br><h3><a class=none name="download">Download and installation</a></h3>
Chunga together with this documentation can be downloaded from <a
href="http://weitz.de/files/chunga.tar.gz">http://weitz.de/files/chunga.tar.gz</a>. The
current version is 0.2.0.
<p>
Chunga depends on
the <a href="http://weitz.de/flexi-streams/">FLEXI-STREAMS</a>
library. You can download and install Chunga and its dependencies
automatically
with <a href="http://www.cliki.net/ASDF-Install">ASDF-Install</a>, and
there's a port for <a href="http://www.cliki.net/gentoo">Gentoo
Linux</a> thanks to Matthew Kennedy.
<br> <br><h3><a name="mail" class=none>Support and mailing lists</a></h3>
For questions, bug reports, feature requests, improvements, or patches
please use the <a
href="http://common-lisp.net/mailman/listinfo/drakma-devel">drakma-devel
mailing list</a>. If you want to be notified about future releases
subscribe to the <a
href="http://common-lisp.net/mailman/listinfo/drakma-announce">drakma-announce
mailing list</a>. These mailing lists were made available thanks to
the services of <a href="http://common-lisp.net/">common-lisp.net</a>.
<br> <br><h3><a class=none name="dictionary">The Chunga dictionary</a></h3>
<h4><a name="stream" class=none>Chunked streams</a></h4>
<em>Chunked streams</em> are the core of the <a href="http://globalia.net/donlope/fz/songs/Chunga's_Revenge.html">Chunga</a> library. You
create them using the
function <a
href="#make-chunked-stream"><code>MAKE-CHUNKED-STREAM</code></a> which
takes an open binary stream (called the <em>underlying</em> stream) as its single argument.
A <em>binary</em> stream in this context means that if it's an <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_i.htm#input">input
stream</a>, you can
apply <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/f_rd_seq.htm"><code>READ-SEQUENCE</code></a>
to it where the sequence is an array of element
type <a href="http://weitz.de/flexi-streams/#octet"><code>OCTET</code></a>, and similarly for <a href="http://www.lispworks.com/documentation/HyperSpec/Body/f_wr_seq.htm"><code>WRITE-SEQUENCE</code></a> and <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_o.htm#output">output streams</a>. (Note that this specifically holds for <a href="http://www.lispworks.com/documentation/lw50/LWRM/html/lwref-91.htm"><em>bivalent</em> streams</a> like socket streams.)
<p>
A chunked stream behaves like an ordinary Lisp stream
of <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_e.htm#element_type">element
type</a> <a
href="http://weitz.de/flexi-streams/#octet"><code>OCTET</code></a>
with the addition that you can turn <em>chunking</em> on and off for
input as well as for output. With chunking turned on, data is read or
written according to
the <a href="http://www.rfc.net/rfc2616.html#s3.6.1">definition in RFC
2616</a>.
<!-- Entry for CHUNKED-STREAM -->
<p><br>[Standard class]<br><a class=none name='chunked-stream'><b>chunked-stream</b></a>
<blockquote><br>
Every <a href="#stream">chunked stream</a> returned by
<a href="#make-chunked-stream"><code>MAKE-CHUNKED-STREAM</code></a> is of this type which is a subtype of
<a href="http://www.lispworks.com/documentation/HyperSpec/Body/t_stream.htm"><code>STREAM</code></a>.
</blockquote>
<!-- End of entry for CHUNKED-STREAM -->
<!-- Entry for CHUNKED-INPUT-STREAM -->
<p><br>[Standard class]<br><a class=none name='chunked-input-stream'><b>chunked-input-stream</b></a>
<blockquote><br>
A <a href="#stream">chunked stream</a> is of this type if its
underlying stream is an <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_i.htm#input">input
stream</a>. This is a subtype of
<a href="#chunked-stream"><code>CHUNKED-STREAM</code></a>.
</blockquote>
<!-- End of entry for CHUNKED-INPUT-STREAM -->
<!-- Entry for CHUNKED-OUTPUT-STREAM -->
<p><br>[Standard class]<br><a class=none name='chunked-output-stream'><b>chunked-output-stream</b></a>
<blockquote><br>
A <a href="#stream">chunked stream</a> is of this type if its
underlying stream is an <a href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_o.htm#output">output stream</a>. This is a subtype of
<a href="#chunked-stream"><code>CHUNKED-STREAM</code></a>.
</blockquote>
<!-- End of entry for CHUNKED-OUTPUT-STREAM -->
<!-- Entry for CHUNKED-IO-STREAM -->
<p><br>[Standard class]<br><a class=none name='chunked-io-stream'><b>chunked-io-stream</b></a>
<blockquote><br>
A <a href="#stream">chunked stream</a> is of this type if it is both
a <a href="#chunked-input-stream"><code>CHUNKED-INPUT-STREAM</code></a> as well as a <a href="#chunked-output-stream"><code>CHUNKED-OUTPUT-STREAM</code></a>.
</blockquote>
<!-- End of entry for CHUNKED-IO-STREAM -->
<!-- Entry for MAKE-CHUNKED-STREAM -->
<p><br>[Function]<br><a class=none name='make-chunked-stream'><b>make-chunked-stream</b> <i>stream</i> => <i>chunked-stream</i></a>
<blockquote><br>
Creates and returns a <a href="#stream">chunked stream</a> (a stream of type
<a href="#chunked-stream"><code>CHUNKED-STREAM</code></a>) which wraps <code><i>stream</i></code>. <code><i>stream</i></code> must be an open
binary stream.
</blockquote>
<!-- End of entry for MAKE-CHUNKED-STREAM -->
<!-- Entry for CHUNKED-STREAM-STREAM -->
<p><br>[Specialized reader]<br><a class=none name='chunked-stream-stream'><b>chunked-stream-stream</b> <i>(stream chunked-stream)</i> => <i>underlying-stream</i></a>
<blockquote><br>
Returns the <a href="#stream">underlying stream</a> of the <a href="#chunked-stream">chunked stream</a> <code><i>stream</i></code>.
</blockquote>
<!-- End of entry for CHUNKED-STREAM-STREAM -->
<!-- Entry for CHUNKED-STREAM-INPUT-CHUNKING-P -->
<p><br>[Generic reader]<br><a class=none name='chunked-stream-input-chunking-p'><b>chunked-stream-input-chunking-p</b> <i>object</i> => <i>generalized-boolean</i></a>
<blockquote><br>
Returns a true value if <code><i>object</i></code> is of type <a href="#chunked-input-stream"><code>CHUNKED-INPUT-STREAM</code></a> and if input chunking is currently enabled.
</blockquote>
<p><br>[Specialized writer]<br><a class=none><tt>(setf (</tt><b>chunked-stream-input-chunking-p</b> <i>(stream chunked-input-stream)</i><tt>)</tt> <i>new-value</i><tt>)</tt></a>
<blockquote><br>
This function is used to switch input chunking
on <code><i>stream</i></code> on or off. Note that input chunking will
usally be turned off automatically when the last chunk is read.
</blockquote>
<!-- End of entry for CHUNKED-STREAM-INPUT-CHUNKING-P -->
<!-- Entry for CHUNKED-STREAM-OUTPUT-CHUNKING-P -->
<p><br>[Generic reader]<br><a class=none name='chunked-stream-output-chunking-p'><b>chunked-stream-output-chunking-p</b> <i>object</i> => <i>generalized-boolean</i></a>
<blockquote><br>
Returns a true value if <code><i>object</i></code> is of type <a href="#chunked-output-stream"><code>CHUNKED-OUTPUT-STREAM</code></a> and if output chunking is currently enabled.
</blockquote>
<p><br>[Specialized writer]<br><a class=none><tt>(setf (</tt><b>chunked-stream-output-chunking-p</b> <i>(stream chunked-output-stream)</i><tt>)</tt> <i>new-value</i><tt>)</tt></a>
<blockquote><br>
This function is used to switch output chunking
on <code><i>stream</i></code> on or off.
</blockquote>
<!-- End of entry for CHUNKED-STREAM-OUTPUT-CHUNKING-P -->
<!-- Entry for CHUNKED-INPUT-STREAM-EXTENSIONS -->
<p><br>[Specialized reader]<br><a class=none name='chunked-input-stream-extensions'><b>chunked-input-stream-extensions</b> <i>(stream chunked-input-stream)</i> => <i>extensions</i></a>
<blockquote><br>
Returns
an <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_a.htm#alist">alist</a>
of <a href="http://www.rfc.net/rfc2616.html#s3.6">attribute/value pairs</a> corresponding to the optional <a href="http://www.rfc.net/rfc2616.html#s3.6.1">"chunk
extensions"</a> which might have been encountered when reading
from <code><i>stream</i></code>.
</blockquote>
<!-- End of entry for CHUNKED-INPUT-STREAM-EXTENSIONS -->
<!-- Entry for CHUNKED-INPUT-STREAM-EXTENSIONS -->
<p><br>[Specialized reader]<br><a class=none name='chunked-input-stream-trailers'><b>chunked-input-stream-trailers</b> <i>(stream chunked-input-stream)</i> => <i>trailers</i></a>
<blockquote><br>
Returns the
optional <a href="http://www.rfc.net/rfc2616.html#s3.6.1">"trailer"
HTTP headers</a> which might have been sent after the last chunk,
i.e. directly before input chunking ended on <code><i>stream</i></code>.
The format of <code><i>trailers</i></code> is identical to that returned
by <a href="#read-http-headers"><code>READ-HTTP-HEADERS</code></a>.
</blockquote>
<!-- End of entry for CHUNKED-INPUT-STREAM-EXTENSIONS -->
<h4><a name="conditions" class=none>Conditions</a></h4>
Here are two conditions which might be signaled if something bad
happens while reading from a chunked stream:
<!-- Entry for INPUT-CHUNKING-BODY-CORRUPTED -->
<p><br>[Condition type]<br><a class=none name='input-chunking-body-corrupted'><b>input-chunking-body-corrupted</b></a>
<blockquote><br>
A condition of this type is signaled if an
unexpected character (octet) is read while reading from a
<a href="#stream">chunked stream</a> with input chunking enabled. This is a subtype of
<a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_stm_er.htm"><code>STREAM-ERROR</code></a>,
so <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/f_stm_er.htm"><code>STREAM-ERROR-STREAM</code></a>
can be used to access the offending stream.
</blockquote>
<!-- End of entry for INPUT-CHUNKING-BODY-CORRUPTED -->
<!-- Entry for INPUT-CHUNKING-UNEXPECTED-END-OF-FILE -->
<p><br>[Condition type]<br><a class=none name='input-chunking-unexpected-end-of-file'><b>input-chunking-unexpected-end-of-file</b></a>
<blockquote><br>
A condition of this type is signaled if we
reach an unexpected EOF on a <a href="#stream">chunked stream</a> with input chunking
enabled. This is a subtype of
<a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_stm_er.htm"><code>STREAM-ERROR</code></a>,
so <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/f_stm_er.htm"><code>STREAM-ERROR-STREAM</code></a>
can be used to access the offending stream.
</blockquote>
<!-- End of entry for INPUT-CHUNKING-UNEXPECTED-END-OF-FILE -->
<h4><a name="parse" class=none>RFC 2616 parsing</a></h4>
Chunga needs to know a bit
about <a href="http://www.rfc.net/rfc2616.html">RFC 2616 syntax</a> in
order to cope
with <a href="#chunked-input-stream-extensions">extensions</a>
and <a href="#chunked-input-stream-trailers">trailers</a>. As these
functions are in there anyway, they're exported, so they can be used
by other code like for
example <a href="http://weitz.de/drakma/">Drakma</a>.
<!-- Entry for READ-LINE* -->
<p><br>[Function]<br><a class=none name='read-line*'><b>read-line*</b> <i>stream <tt>&optional</tt> log-stream</i> => <i>line</i></a>
<blockquote><br>
Reads and assembles characters from the
stream <code><i>stream</i></code> until
a <a href="http://en.wikipedia.org/wiki/Carriage_return">carriage
return</a> is read. Makes sure that the following character is
a <a href="http://en.wikipedia.org/wiki/Line_feed">linefeed</a>.
Returns the string of characters read excluding the line break.
Additonally logs this string to <code><i>log-stream</i></code> if it is not <code>NIL</code>.
</blockquote>
<!-- End of entry for READ-LINE* -->
<!-- Entry for READ-HTTP-HEADERS -->
<p><br>[Function]<br><a class=none name='read-http-headers'><b>read-http-headers</b> <i>stream <tt>&optional</tt> log-stream</i> => <i>headers</i></a>
<blockquote><br>
Reads HTTP header lines from the stream <code><i>stream</i></code>
(except for the initial status line which is supposed to be read
already) and returns a
corresponding <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_a.htm#alist">alist</a>
of names and values where the names are keywords and the values are
strings. Multiple lines with the same name are combined into one
value, the individual values separated by commas. Header lines which
are spread across multiple lines are recognized and treated correctly.
Additonally logs the header lines to
<code><i>log-stream</i></code> if it is not <code>NIL</code>.
</blockquote>
<!-- End of entry for READ-HTTP-HEADERS -->
<!-- Entry for READ-TOKEN -->
<p><br>[Function]<br><a class=none name='read-token'><b>read-token</b> <i>stream</i> => <i>token</i></a>
<blockquote><br>
Read characters from the stream <code><i>stream</i></code> while they
are <em>token</em> constituents (according
to <a href="http://www.rfc.net/rfc2616.html">RFC 2616</a>). It is
assumed that there's a token character at the current position. The
token read is returned as a string. Doesn't signal an error (but
simply stops reading)
if <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm"><code>END-OF-FILE</code></a>
is encountered after the first character.
</blockquote>
<!-- End of entry for READ-TOKEN -->
<!-- Entry for READ-NAME-VALUE-PAIR -->
<p><br>[Function]<br><a class=none name='read-name-value-pair'><b>read-name-value-pair</b> <i>stream <tt>&key</tt> value-required-p cookie-syntax</i> => <i>pair</i></a>
<blockquote><br>
Reads a typical (in <a href="http://www.rfc.net/rfc2616.html">RFC
2616</a>) <a href="http://www.rfc.net/rfc2616.html#s3.6">name/value or
attribute/value combination</a> from the
stream <code><i>stream</i></code> - a <em>token</em> followed by
a <code>#\=</code> character and another token or a <em>quoted
string</em>. Returns
a <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_c.htm#cons">cons</a>
of the name and the value, both as strings.
If <code><i>value-required-p</i></code> is <code>NIL</code> (the
default is <code>T</code>), the <code>#\=</code> sign and the value
are optional. If <code><i>cookie-syntax</i></code> is true (the
default is <code>NIL</code>), the value is read like the value of
a <a href="http://weitz.de/drakma/#ccokies">cookie</a> header.
</blockquote>
<!-- End of entry for READ-NAME-VALUE-PAIR -->
<!-- Entry for READ-NAME-VALUE-PAIRS -->
<p><br>[Function]<br><a class=none name='read-name-value-pairs'><b>read-name-value-pairs</b> <i>stream <tt>&key</tt> value-required-p cookie-syntax</i> => <i>pairs</i></a>
<blockquote><br>
Uses <a href="#read-name-value-pair"><code>READ-NAME-VALUE-PAIR</code></a> to read and return an <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/26_glo_a.htm#alist">alist</a> of
name/value pairs from the stream <code><i>stream</i></code>. It is assumed that the pairs are
separated by semicolons and that the first char read (except for
whitespace) will be a semicolon. The parameters are used as in
<a href="#read-name-value-pair"><code>READ-NAME-VALUE-PAIR</code></a>.
Stops reading in case
of <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm"><code>END-OF-FILE</code></a>
(instead of signaling an error).
</blockquote>
<!-- End of entry for READ-NAME-VALUE-PAIRS -->
<!-- Entry for ASSERT-CHAR -->
<p><br>[Function]<br><a class=none name='assert-char'><b>assert-char</b> <i>stream expected-char</i> => <i>char</i></a>
<blockquote><br>
Reads the next character from the stream <code><i>stream</i></code> and checks if it is the
character <code><i>expected-char</i></code>. Signals an error otherwise.
</blockquote>
<!-- End of entry for ASSERT-CHAR -->
<!-- Entry for SKIP-WHITESPACE -->
<p><br>[Function]<br><a class=none name='skip-whitespace'><b>skip-whitespace</b> <i>stream</i> => <i>char-or-nil</i></a>
<blockquote><br>
Consume characters from the stream <code><i>stream</i></code> until an <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm"><code>END-OF-FILE</code></a> is
encountered or a non-whitespace (according to <a href="http://www.rfc.net/rfc2616.html">RFC 2616</a>)
characters is seen. This character is returned (or <code>NIL</code> in case
of <a
href="http://www.lispworks.com/documentation/HyperSpec/Body/e_end_of.htm"><code>END-OF-FILE</code></a>).
</blockquote>
<!-- End of entry for SKIP-WHITESPACE -->
<!-- Entry for TRIM-WHITESPACE -->
<p><br>[Function]<br><a class=none name='trim-whitespace'><b>trim-whitespace</b> <i>string</i> => <i>string'</i></a>
<blockquote><br>
Returns a version of the string <code><i>string</i></code> where spaces and tab
characters are trimmed from the start and the end.
</blockquote>
<!-- End of entry for TRIM-WHITESPACE -->
<!-- Entry for *CURRENT-ERROR-MESSAGE* -->
<p><br>[Special variable]<br><a class=none name='*current-error-message*'><b>*current-error-message*</b></a>
<blockquote><br>
Used by the parsing functions in <a href="#parse">this section</a> as
an introduction to a standardized error message. Must be a string if
one of these functions is called.
</blockquote>
<!-- End of entry for *CURRENT-ERROR-MESSAGE* -->
<br> <br><h3><a class=none name="ack">Acknowledgements</a></h3>
<p>
Thanks to Jochen Schmidt's chunking code in <a href="http://www.cliki.net/ACL-COMPAT">ACL-COMPAT</a> for inspiration.
This documentation was prepared with <a href="http://weitz.de/documentation-template/">DOCUMENTATION-TEMPLATE</a>.
</p>
<p>
$Header: /usr/local/cvsrep/chunga/doc/index.html,v 1.10 2006/10/06 11:58:03 edi Exp $
<p><a href="http://weitz.de/index.html">BACK TO MY HOMEPAGE</a>
</body>
</html>
|