Changeset 9422 in project


Ignore:
Timestamp:
03/11/08 07:00:20 (12 years ago)
Author:
Ivan Raikov
Message:

Version number updated in the documentation.

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/chicken.texi

    r9356 r9422  
    6464
    6565
    66 @emph{(This document describes version 3.0.5)}
    67 
    68 @b{CHICKEN is a compiler that translates Scheme source files into C}, which in turn can be fed to a C-compiler to generate a standalone executable.  An interpreter is also available and can be used as a scripting environment or for testing programs before compilation.
    69 
    70 This package is distributed under the @b{BSD license} and as such is free to use and modify.
    71 
    72 The method of compilation and the design of the runtime-system follow closely Henry Baker's @uref{http://home.pipeline.com/~hbaker1/CheneyMTA.html, CONS Should Not CONS Its Arguments, Part II: Cheney on the M.T.A.} paper and expose a number of interesting properties:
    73 
    74 @itemize
    75 @item Consing (creation of data on the heap) is relatively inexpensive, because a generational garbage collection scheme is used, in which short-lived data structures are reclaimed extremely quickly.
    76 
    77 @item Moreover, @code{call-with-current-continuation} is practically for free and CHICKEN does not suffer under any performance penalties if first-class continuations are used in complex ways.
    78 
    79 
    80 @end itemize
    81 The generated C code is fully tail-recursive.
    82 
    83 Some of the features supported by CHICKEN:
    84 
    85 @itemize
    86 @item SRFIs 0, 1, 2, 4, 6-19, 23, 25-31, 37-40, 42, 43, 45, 47, 55, 57, 60-63, 66, 69, 72, 78, 85 and 95.
    87 
    88 @item Lightweight threads based on first-class continuations
    89 
    90 @item Pattern matching with Andrew Wright's @code{match} package
    91 
    92 @item Record structures
    93 
    94 @item Extended comment- and string-literal syntaxes
    95 
    96 @item Libraries for regular expressions, string handling
    97 
    98 @item UNIX system calls and extended data structures
    99 
    100 @item Create interpreted or compiled shell scripts written in Scheme for UNIX or Windows
    101 
    102 @item Compiled C files can be easily distributed
    103 
    104 @item Allows the creation of fully self-contained statically linked executables
    105 
    106 @item On systems that support it, compiled code can be loaded dynamically
    107 
    108 
    109 @end itemize
    110 This manual is merely a reference for the CHICKEN system and assumes a working knowledge of Scheme.
    111 
    112 The manual is split in the following sections:
     66This is the user's manual for the Chicken Scheme compiler, version 3.0.6.
    11367
    11468@table @b
     69@item @ref{Overview, Overview}
     70
     71What is Chicken?
    11572@item @ref{Basic mode of operation, Basic mode of operation}
    11673
     
    29772934* Unit library - Arithmetic - Arithmetic fixnum operations::
    29782935* Unit library - Arithmetic - Arithmetic floating-point operations::
    2979 * Unit library - Arithmetic - flonum-print-precision::
    29802936* Unit library - Arithmetic - signum::
    29812937* Unit library - Arithmetic - finite?::
     
    31113067
    31123068@end table
    3113 @node Unit library - Arithmetic - Arithmetic floating-point operations, Unit library - Arithmetic - flonum-print-precision, Unit library - Arithmetic - Arithmetic fixnum operations, Unit library - Arithmetic
     3069@node Unit library - Arithmetic - Arithmetic floating-point operations, Unit library - Arithmetic - signum, Unit library - Arithmetic - Arithmetic fixnum operations, Unit library - Arithmetic
    31143070@subsection Arithmetic floating-point operations
    31153071
     
    31593115
    31603116@end table
    3161 @node Unit library - Arithmetic - flonum-print-precision, Unit library - Arithmetic - signum, Unit library - Arithmetic - Arithmetic floating-point operations, Unit library - Arithmetic
    3162 @subsection flonum-print-precision
    3163 
    3164 
    3165 @verbatim
    3166 [procedure] (flonum-print-precision [PRECISION])
    3167 @end verbatim
    3168 Gets and sets the number of significant digits printed for a floating-point number. @code{PRECISION} must be a positive @code{fixnum}. Always returns the setting in effect at the moment of invocation.
    3169 
    3170 @node Unit library - Arithmetic - signum, Unit library - Arithmetic - finite?, Unit library - Arithmetic - flonum-print-precision, Unit library - Arithmetic
     3117@node Unit library - Arithmetic - signum, Unit library - Arithmetic - finite?, Unit library - Arithmetic - Arithmetic floating-point operations, Unit library - Arithmetic
    31713118@subsection signum
    31723119
     
    47774724* Unit extras - String-port extensions::
    47784725* Unit extras - Formatted output::
    4779 * Unit extras - Hash Tables::
     4726* Unit extras - Hash tables::
    47804727* Unit extras - Queues::
    47814728* Unit extras - Sorting::
     
    47894736
    47904737
    4791 This unit contains a collection of useful utility definitions. This unit is used by default, unless the program is compiled with the @code{-explicit-use} option.
     4738This unit contains a collection of useful utility definitions.  This unit is used by default, unless the program is compiled with the @code{-explicit-use} option.
    47924739
    47934740@node Unit extras - Lists, Unit extras - String-port extensions,  , Unit extras
     
    49854932Call procedure @code{THUNK} with the current output-port temporarily bound to a string-output-port and return the accumulated output string.
    49864933
    4987 @node Unit extras - Formatted output, Unit extras - Hash Tables, Unit extras - String-port extensions, Unit extras
     4934@node Unit extras - Formatted output, Unit extras - Hash tables, Unit extras - String-port extensions, Unit extras
    49884935@section Formatted output
    49894936
     
    50294976The optional @code{DESTINATION}, when supplied, performs a (@code{sprintf}) for a  @code{#f}, a (@code{printf}) for a @code{#t}, and a (@code{fprintf}) for an output-port. When missing a (@code{sprintf}) is performed.
    50304977
    5031 @node Unit extras - Hash Tables, Unit extras - Queues, Unit extras - Formatted output, Unit extras
    5032 @section Hash Tables
    5033 
    5034 @menu
    5035 * Unit extras - Hash Tables - make-hash-table::
    5036 * Unit extras - Hash Tables - hash-table-min-load::
    5037 * Unit extras - Hash Tables - hash-table-max-load::
    5038 * Unit extras - Hash Tables - hash-table-weak-keys::
    5039 * Unit extras - Hash Tables - hash-table-weak-values::
    5040 * Unit extras - Hash Tables - hash-table-has-initial::
    5041 * Unit extras - Hash Tables - hash-table-initial::
    5042 * Unit extras - Hash Tables - hash-table-update!::
    5043 * Unit extras - Hash Tables - hash-table-update!/default::
    5044 * Unit extras - Hash Tables - hash-table-remove!::
    5045 * Unit extras - Hash Tables - hash-table-merge::
    5046 * Unit extras - Hash Tables - hash-table-map::
    5047 * Unit extras - Hash Tables - hash-table-for-each::
    5048 * Unit extras - Hash Tables - number-hash::
    5049 * Unit extras - Hash Tables - object-uid-hash::
    5050 * Unit extras - Hash Tables - symbol-hash::
    5051 * Unit extras - Hash Tables - keyword-hash::
    5052 * Unit extras - Hash Tables - eq?-hash::
    5053 * Unit extras - Hash Tables - eqv?-hash::
    5054 * Unit extras - Hash Tables - equal?-hash::
    5055 
    5056 @end menu
    5057 
    5058 
    5059 CHICKEN implements an extended SRFI-69. For more information, see @uref{http://srfi.schemers.org/srfi-69/srfi-69.html, SRFI-69} and @uref{http://srfi.schemers.org/srfi-69/srfi-90.html, SRFI-90}.
     4978@node Unit extras - Hash tables, Unit extras - Queues, Unit extras - Formatted output, Unit extras
     4979@section Hash tables
     4980
     4981@menu
     4982* Unit extras - Hash tables - hash-table-remove!::
     4983
     4984@end menu
     4985
     4986
     4987CHICKEN implements SRFI-69. For more information,  see @uref{http://srfi.schemers.org/srfi-69/srfi-69.html, SRFI-69}.
    50604988
    50614989A setter for @code{hash-table-ref} is defined, so
     
    50694997(hash-table-set! HT KEY VAL)
    50704998@end example
    5071 @node Unit extras - Hash Tables - make-hash-table, Unit extras - Hash Tables - hash-table-min-load,  , Unit extras - Hash Tables
    5072 @subsection make-hash-table
    5073 
    5074 
    5075 @verbatim
    5076 [procedure] (make-hash-table [TEST [HASH [SIZE]]] [#:TEST #:HASH #:SIZE #:INITIAL #:MIN-LOAD #:MAX-LOAD #:WEAK-KEYS #:WEAK-VALUES])
    5077 @end verbatim
    5078 The SRFI-69 procedure is extended:
    5079 
    5080 Returns a new @code{HASH-TABLE}, parameterized as follows:
    5081 
    5082 @code{TEST} is a procedure of one argument, @code{(object -> boolean)}; an equality predicate. The first argument is a @code{KEY}.
    5083 
    5084 @code{HASH} is a procedure of two arguments, @code{(object (fixnum positive) -> (fixnum (<= 0 _ _2)))}; a bounded hash function, where the returned hash value is in @code{[0 BOUND)}. The first argument is a @code{KEY} and the second argument is the @code{BOUND}.
    5085 
    5086 @code{SIZE} is a @code{fixnum}; the initial size of the hash-table.
    5087 
    5088 @code{INITIAL} is an @code{object}; the default initial value for any @code{KEY}.
    5089 
    5090 @code{MIN-LOAD} is a @code{flonum} in @code{(0.0 1.0)}; the lower bound for resizing the table.
    5091 
    5092 @code{MAX-LOAD} is a @code{flonum} in @code{(0.0 1.0)}; the upper bound for resizing the table.
    5093 
    5094 @code{WEAK-KEYS} is a @code{boolean}; always @code{#f} (until further notice).
    5095 
    5096 @code{WEAK-VALUES} is a @code{boolean}; always @code{#f} (until further notice).
    5097 
    5098 Keyword arguments take precedence over optional arguments when both are specified.
    5099 
    5100 @node Unit extras - Hash Tables - hash-table-min-load, Unit extras - Hash Tables - hash-table-max-load, Unit extras - Hash Tables - make-hash-table, Unit extras - Hash Tables
    5101 @subsection hash-table-min-load
    5102 
    5103 
    5104 @verbatim
    5105 [procedure] (hash-table-min-load HASH-TABLE)
    5106 @end verbatim
    5107 Returns the @code{MIN-LOAD} property of the @code{HASH-TABLE}.
    5108 
    5109 @node Unit extras - Hash Tables - hash-table-max-load, Unit extras - Hash Tables - hash-table-weak-keys, Unit extras - Hash Tables - hash-table-min-load, Unit extras - Hash Tables
    5110 @subsection hash-table-max-load
    5111 
    5112 
    5113 @verbatim
    5114 [procedure] (hash-table-max-load HASH-TABLE)
    5115 @end verbatim
    5116 Returns the @code{MAX-LOAD} property of the @code{HASH-TABLE}.
    5117 
    5118 @node Unit extras - Hash Tables - hash-table-weak-keys, Unit extras - Hash Tables - hash-table-weak-values, Unit extras - Hash Tables - hash-table-max-load, Unit extras - Hash Tables
    5119 @subsection hash-table-weak-keys
    5120 
    5121 
    5122 @verbatim
    5123 [procedure] (hash-table-weak-keys HASH-TABLE)
    5124 @end verbatim
    5125 Returns the @code{WEAK-KEYS} property of the @code{HASH-TABLE}.
    5126 
    5127 @node Unit extras - Hash Tables - hash-table-weak-values, Unit extras - Hash Tables - hash-table-has-initial, Unit extras - Hash Tables - hash-table-weak-keys, Unit extras - Hash Tables
    5128 @subsection hash-table-weak-values
    5129 
    5130 
    5131 @verbatim
    5132 [procedure] (hash-table-weak-values HASH-TABLE)
    5133 @end verbatim
    5134 Returns the @code{WEAK-VALUES} property of the @code{HASH-TABLE}.
    5135 
    5136 @node Unit extras - Hash Tables - hash-table-has-initial, Unit extras - Hash Tables - hash-table-initial, Unit extras - Hash Tables - hash-table-weak-values, Unit extras - Hash Tables
    5137 @subsection hash-table-has-initial
    5138 
    5139 
    5140 @verbatim
    5141 [procedure] (hash-table-has-initial HASH-TABLE)
    5142 @end verbatim
    5143 Does the @code{HASH-TABLE} have an @code{INITIAL} property.
    5144 
    5145 @node Unit extras - Hash Tables - hash-table-initial, Unit extras - Hash Tables - hash-table-update!, Unit extras - Hash Tables - hash-table-has-initial, Unit extras - Hash Tables
    5146 @subsection hash-table-initial
    5147 
    5148 
    5149 @verbatim
    5150 [procedure] (hash-table-initial HASH-TABLE)
    5151 @end verbatim
    5152 Returns the @code{INITIAL} property of the @code{HASH-TABLE}.
    5153 
    5154 @node Unit extras - Hash Tables - hash-table-update!, Unit extras - Hash Tables - hash-table-update!/default, Unit extras - Hash Tables - hash-table-initial, Unit extras - Hash Tables
    5155 @subsection hash-table-update!
    5156 
    5157 
    5158 @verbatim
    5159 [procedure] (hash-table-update! HASH-TABLE KEY [FUNCTION [THUNK]])
    5160 @end verbatim
    5161 The SRFI-69 procedure is extended:
    5162 
    5163 @code{FUNCTION} is optional. The default is @code{identity}.
    5164 
    5165 @code{THUNK} is optional. The default is @code{(lambda () (hash-table-initial HASH-TABLE))}; when the @code{HASH-TABLE} has no initial value an error is signaled.
    5166 
    5167 Returns the new value, after the update.
    5168 
    5169 @node Unit extras - Hash Tables - hash-table-update!/default, Unit extras - Hash Tables - hash-table-remove!, Unit extras - Hash Tables - hash-table-update!, Unit extras - Hash Tables
    5170 @subsection hash-table-update!/default
    5171 
    5172 
    5173 @verbatim
    5174 [procedure] (hash-table-update!/default HASH-TABLE KEY FUNCTION DEFAULT)
    5175 @end verbatim
    5176 The SRFI-69 procedure is extended:
    5177 
    5178 Returns the new value, after the update.
    5179 
    5180 @node Unit extras - Hash Tables - hash-table-remove!, Unit extras - Hash Tables - hash-table-merge, Unit extras - Hash Tables - hash-table-update!/default, Unit extras - Hash Tables
     4999As an extension to SRFI-69, @code{hash-table-update!} and @code{hash-table-update!/default} return the new value (after applying the update procedure).
     5000
     5001@node Unit extras - Hash tables - hash-table-remove!,  ,  , Unit extras - Hash tables
    51815002@subsection hash-table-remove!
    51825003
    51835004
    51845005@verbatim
    5185 [procedure] (hash-table-remove! HASH-TABLE PROC)
    5186 @end verbatim
    5187 Calls @code{PROC} for all entries in @code{HASH-TABLE} with the key and value of each entry. If @code{PROC} returns true, then that entry is removed.
    5188 
    5189 @node Unit extras - Hash Tables - hash-table-merge, Unit extras - Hash Tables - hash-table-map, Unit extras - Hash Tables - hash-table-remove!, Unit extras - Hash Tables
    5190 @subsection hash-table-merge
    5191 
    5192 
    5193 @verbatim
    5194 [procedure] (hash-table-merge HASH-TABLE-1 HASH-TABLE-2)
    5195 @end verbatim
    5196 Returns a new @code{hash-table}, the merged result of @code{HASH-TABLE-1} & @code{HASH-TABLE-2}.
    5197 
    5198 @node Unit extras - Hash Tables - hash-table-map, Unit extras - Hash Tables - hash-table-for-each, Unit extras - Hash Tables - hash-table-merge, Unit extras - Hash Tables
    5199 @subsection hash-table-map
    5200 
    5201 
    5202 @verbatim
    5203 [procedure] (hash-table-map HASH-TABLE PROC)
    5204 @end verbatim
    5205 Calls @code{PROC} for all entries in @code{HASH-TABLE} with the key and value of each entry.
    5206 
    5207 @code{PROC} is a procedure of 2 arguments, @code{(object object -> object)}; the first argument is the @code{KEY}, and the second argument is the @code{VALUE}. The return value is collected in a list.
    5208 
    5209 Returns the list collection.
    5210 
    5211 @node Unit extras - Hash Tables - hash-table-for-each, Unit extras - Hash Tables - number-hash, Unit extras - Hash Tables - hash-table-map, Unit extras - Hash Tables
    5212 @subsection hash-table-for-each
    5213 
    5214 
    5215 @verbatim
    5216 [procedure] (hash-table-for-each HASH-TABLE PROC)
    5217 @end verbatim
    5218 Calls @code{PROC} for all entries in @code{HASH-TABLE} with the key and value of each entry.
    5219 
    5220 @code{PROC} is a procedure of 2 arguments, @code{(object object -> unspecified)}; the first argument is the @code{KEY}, and the second argument is the @code{VALUE}.
    5221 
    5222 No return value.
    5223 
    5224 A synonym for @code{hash-table-walk}.
    5225 
    5226 @node Unit extras - Hash Tables - number-hash, Unit extras - Hash Tables - object-uid-hash, Unit extras - Hash Tables - hash-table-for-each, Unit extras - Hash Tables
    5227 @subsection number-hash
    5228 
    5229 
    5230 @verbatim
    5231 [procedure] (number-hash NUMBER [BOUND])
    5232 @end verbatim
    5233 Returns a hash value for the @code{NUMBER}, with optional @code{BOUND}.
    5234 
    5235 @node Unit extras - Hash Tables - object-uid-hash, Unit extras - Hash Tables - symbol-hash, Unit extras - Hash Tables - number-hash, Unit extras - Hash Tables
    5236 @subsection object-uid-hash
    5237 
    5238 
    5239 @verbatim
    5240 [procedure] (object-uid-hash OBJECT [BOUND])
    5241 @end verbatim
    5242 Returns a hash value for the @code{OBJECT}, with optional @code{BOUND}.
    5243 
    5244 Currently this is a synonym for @code{equal?-hash}.
    5245 
    5246 @node Unit extras - Hash Tables - symbol-hash, Unit extras - Hash Tables - keyword-hash, Unit extras - Hash Tables - object-uid-hash, Unit extras - Hash Tables
    5247 @subsection symbol-hash
    5248 
    5249 
    5250 @verbatim
    5251 [procedure] (symbol-hash SYMBOL [BOUND])
    5252 @end verbatim
    5253 Returns a hash value for the @code{SYMBOL}, with optional @code{BOUND}.
    5254 
    5255 @node Unit extras - Hash Tables - keyword-hash, Unit extras - Hash Tables - eq?-hash, Unit extras - Hash Tables - symbol-hash, Unit extras - Hash Tables
    5256 @subsection keyword-hash
    5257 
    5258 
    5259 @verbatim
    5260 [procedure] (keyword-hash KEYWORD [BOUND])
    5261 @end verbatim
    5262 Returns a hash value for the @code{KEYWORD}, with optional @code{BOUND}.
    5263 
    5264 @node Unit extras - Hash Tables - eq?-hash, Unit extras - Hash Tables - eqv?-hash, Unit extras - Hash Tables - keyword-hash, Unit extras - Hash Tables
    5265 @subsection eq?-hash
    5266 
    5267 
    5268 @verbatim
    5269 [procedure] (eq?-hash OBJECT [BOUND])
    5270 @end verbatim
    5271 Returns a hash value for the @code{OBJECT}, with optional @code{BOUND}.
    5272 
    5273 For use with @code{eq?} as @code{TEST}.
    5274 
    5275 @code{hash-by-identity} is a synonym.
    5276 
    5277 Uses @code{object-uid-hash} for non-immediate, non-symbol objects.
    5278 
    5279 @node Unit extras - Hash Tables - eqv?-hash, Unit extras - Hash Tables - equal?-hash, Unit extras - Hash Tables - eq?-hash, Unit extras - Hash Tables
    5280 @subsection eqv?-hash
    5281 
    5282 
    5283 @verbatim
    5284 [procedure] (eqv?-hash OBJECT [BOUND])
    5285 @end verbatim
    5286 Returns a hash value for the @code{OBJECT}, with optional @code{BOUND}.
    5287 
    5288 For use with @code{eqv?} as @code{TEST}.
    5289 
    5290 Uses @code{object-uid-hash} for non-immediate, non-number, non-symbol objects.
    5291 
    5292 @node Unit extras - Hash Tables - equal?-hash,  , Unit extras - Hash Tables - eqv?-hash, Unit extras - Hash Tables
    5293 @subsection equal?-hash
    5294 
    5295 
    5296 @verbatim
    5297 [procedure] (equal?-hash OBJECT [BOUND])
    5298 @end verbatim
    5299 Returns a hash value for the @code{OBJECT}, with optional @code{BOUND}.
    5300 
    5301 For use with @code{equal?} as @code{TEST}.
    5302 
    5303 @code{hash} is a synonym.
    5304 
    5305 @node Unit extras - Queues, Unit extras - Sorting, Unit extras - Hash Tables, Unit extras
     5006[procedure] (hash-table-remove! HASHTABLE PROC)
     5007@end verbatim
     5008Calls @code{PROC} for all entries in @code{HASHTABLE} with the key and value of each entry. If @code{PROC} returns true, then that entry is removed.
     5009
     5010@node Unit extras - Queues, Unit extras - Sorting, Unit extras - Hash tables, Unit extras
    53065011@section Queues
    53075012
     
    54655170
    54665171@menu
     5172* Unit extras - Random numbers - random-seed::
    54675173* Unit extras - Random numbers - random::
    54685174* Unit extras - Random numbers - randomize::
     
    54715177
    54725178
    5473 @node Unit extras - Random numbers - random, Unit extras - Random numbers - randomize,  , Unit extras - Random numbers
     5179@node Unit extras - Random numbers - random-seed, Unit extras - Random numbers - random,  , Unit extras - Random numbers
     5180@subsection random-seed
     5181
     5182
     5183@verbatim
     5184[procedure] (random-seed [SEED])
     5185@end verbatim
     5186Seeds the random number generator with @code{SEED} (an exact integer) or  @code{(current-seconds)} if @code{SEED} is not given.
     5187
     5188@node Unit extras - Random numbers - random, Unit extras - Random numbers - randomize, Unit extras - Random numbers - random-seed, Unit extras - Random numbers
    54745189@subsection random
    54755190
     
    55695284[procedure] (read-file [FILE-OR-PORT [READER [MAXCOUNT]]])
    55705285@end verbatim
    5571 Returns a list containing all toplevel expressions read from the file or port @code{FILE-OR-PORT}. If no argument is given, input is read from the port that is the current value of @code{(current-input-port)}. After all expressions are read, and if the argument is a port, then the port will not be closed. The @code{READER} argument specifies the procedure used to read expressions from the given file or port and defaults to @code{read}. The reader procedure will be called with a single argument (an input port). If @code{MAXCOUNT} is given then only up to @code{MAXCOUNT} expressions will be read in.
     5286Returns a list containing all toplevel expressions read from the file or port @code{FILE-OR-PORT}. If no argument is given, input is read from the port that is the current value of @code{(current-input-port)}. After all expressions are read, and if the argument is a port, then the port will not be closed. The @code{READER} argument specifies the procedure used to read  expressions from the given file or port and defaults to @code{read}. The reader procedure will be called with a single argument (an input port). If @code{MAXCOUNT} is given then only up to @code{MAXCOUNT} expressions will be read in.
    55725287
    55735288@node Unit extras - Input/Output extensions - read-line, Unit extras - Input/Output extensions - write-line, Unit extras - Input/Output extensions - read-file, Unit extras - Input/Output extensions
     
    56115326[procedure] (write-string STRING [NUM [PORT]]
    56125327@end verbatim
    5613 Read or write @code{NUM} characters from/to @code{PORT}, which defaults to the value of @code{(current-input-port)} or @code{(current-output-port)}, respectively. If @code{NUM} is @code{#f} or not given, then all data up to the end-of-file is read, or, in the case of @code{write-string} the whole string is written. If no more input is available, @code{read-string} returns the empty string. @code{read-string!} reads destructively into the given @code{STRING} argument, but never more characters that would fit into @code{STRING}. If @code{START} is given, then the read characters are stored starting at that position. @code{read-string!} returns the actual number of characters read.
     5328Read or write @code{NUM} characters from/to @code{PORT}, which defaults to the value of @code{(current-input-port)} or @code{(current-output-port)}, respectively.  If @code{NUM} is @code{#f} or not given, then all data up to the end-of-file is read, or, in the case of @code{write-string} the whole string is written. If no more input is available, @code{read-string} returns the empty string. @code{read-string!} reads destructively into the given @code{STRING} argument, but never more characters that would fit into @code{STRING}. If @code{START} is given, then the read characters are stored starting at that position. @code{read-string!} returns the actual number of characters read.
    56145329
    56155330@node Unit extras - Input/Output extensions - read-token, Unit extras - Input/Output extensions - with-error-output-to-port, Unit extras - Input/Output extensions - write-string, Unit extras - Input/Output extensions
     
    57455460[procedure] (string-split STRING [DELIMITER-STRING [KEEPEMPTY]])
    57465461@end verbatim
    5747 Split string into substrings separated by the given delimiters. If no delimiters are specified, a string comprising the tab, newline and space characters is assumed. If the parameter @code{KEEPEMPTY} is given and not @code{#f}, then empty substrings are retained:
     5462Split string into substrings separated by the given delimiters. If no delimiters are specified, a string comprising the tab, newline and space characters  is assumed. If the parameter @code{KEEPEMPTY} is given and not @code{#f}, then empty substrings are retained:
    57485463
    57495464@example
     
    57735488  @strong{"<h1>this is a \"string\"</h1>"}
    57745489  '((@strong{"<"} . @strong{"&lt;"}) (@strong{">"} . @strong{"&gt;"}) (@strong{"\""} . @strong{"&quot;"})) )
    5775 @strong{=>}  @strong{"&lt;h1&gt;this is a &quot;string&quot;&lt;/ht&gt;"}
     5490@strong{=>}  @strong{"&lt;h1&gt;this is a &quot;string&quot;&lt;/h1&gt;"}
    57765491@end example
    57775492@node Unit extras - Strings - substring=?, Unit extras - Strings - substring-index, Unit extras - Strings - string-translate*, Unit extras - Strings
     
    58005515@menu
    58015516* Unit extras - Combinators - any?::
    5802 * Unit extras - Combinators - none?::
    5803 * Unit extras - Combinators - always?::
    5804 * Unit extras - Combinators - never?::
    58055517* Unit extras - Combinators - constantly::
    58065518* Unit extras - Combinators - complement::
     
    58155527* Unit extras - Combinators - noop::
    58165528* Unit extras - Combinators - o::
    5817 * Unit extras - Combinators - left-section::
    5818 * Unit extras - Combinators - right-section::
    5819 
    5820 @end menu
    5821 
    5822 
    5823 @node Unit extras - Combinators - any?, Unit extras - Combinators - none?,  , Unit extras - Combinators
     5529
     5530@end menu
     5531
     5532
     5533@node Unit extras - Combinators - any?, Unit extras - Combinators - constantly,  , Unit extras - Combinators
    58245534@subsection any?
    58255535
     
    58305540Ignores its argument and always returns @code{#t}. This is actually useful sometimes.
    58315541
    5832 @node Unit extras - Combinators - none?, Unit extras - Combinators - always?, Unit extras - Combinators - any?, Unit extras - Combinators
    5833 @subsection none?
    5834 
    5835 
    5836 @verbatim
    5837 [procedure] (none? X)
    5838 @end verbatim
    5839 Ignores its argument and always returns @code{#f}. This is actually useful sometimes.
    5840 
    5841 @node Unit extras - Combinators - always?, Unit extras - Combinators - never?, Unit extras - Combinators - none?, Unit extras - Combinators
    5842 @subsection always?
    5843 
    5844 
    5845 @verbatim
    5846 [procedure] (always? X ...)
    5847 @end verbatim
    5848 Ignores its arguments and always returns @code{#t}. This is actually useful sometimes.
    5849 
    5850 @node Unit extras - Combinators - never?, Unit extras - Combinators - constantly, Unit extras - Combinators - always?, Unit extras - Combinators
    5851 @subsection never?
    5852 
    5853 
    5854 @verbatim
    5855 [procedure] (never? X ...)
    5856 @end verbatim
    5857 Ignores its arguments and always returns @code{#f}. This is actually useful sometimes.
    5858 
    5859 @node Unit extras - Combinators - constantly, Unit extras - Combinators - complement, Unit extras - Combinators - never?, Unit extras - Combinators
     5542@node Unit extras - Combinators - constantly, Unit extras - Combinators - complement, Unit extras - Combinators - any?, Unit extras - Combinators
    58605543@subsection constantly
    58615544
     
    59395622
    59405623@example
    5941 (@strong{lambda} args
     5624(@strong{lambda} args 
    59425625  (apply pp args)
    59435626  (apply eval args) )
     
    59975680Ignores it's arguments, does nothing and returns an unspecified value.
    59985681
    5999 @node Unit extras - Combinators - o, Unit extras - Combinators - left-section, Unit extras - Combinators - noop, Unit extras - Combinators
     5682@node Unit extras - Combinators - o,  , Unit extras - Combinators - noop, Unit extras - Combinators
    60005683@subsection o
    60015684
     
    60055688@end verbatim
    60065689A single value version of @code{compose} (slightly faster). @code{(o)} is equivalent to @code{identity}.
    6007 
    6008 @node Unit extras - Combinators - left-section, Unit extras - Combinators - right-section, Unit extras - Combinators - o, Unit extras - Combinators
    6009 @subsection left-section
    6010 
    6011 
    6012 @verbatim
    6013 [procedure] (left-section PROC ARG ...)
    6014 @end verbatim
    6015 A left section partially applies arguments starting from the left.
    6016 
    6017 Returns a variadic procedure in which some prefix of its arguments, @code{ARG ...}, are partially applied to @code{PROC}.
    6018 
    6019 @node Unit extras - Combinators - right-section,  , Unit extras - Combinators - left-section, Unit extras - Combinators
    6020 @subsection right-section
    6021 
    6022 
    6023 @verbatim
    6024 [procedure] (right-section PROC ARG ...)
    6025 @end verbatim
    6026 A right section partially applies arguments starting from the right.
    6027 
    6028 Returns a variadic procedure in which some reversed suffix of its arguments, @code{ARG ...}, are partially applied to @code{PROC}.
    60295690
    60305691@node Unit extras - Binary searching,  , Unit extras - Combinators, Unit extras
     
    64216082* Unit regex - glob->regexp::
    64226083* Unit regex - glob?::
    6423 * Unit regex - regex-chardef-table?::
    6424 * Unit regex - regex-chardef-table::
    64256084* Unit regex - regexp::
    64266085* Unit regex - regexp*::
     
    64406099
    64416100
    6442 This library unit provides support for regular expressions. The regular expression package used is @code{PCRE} (@emph{Perl Compatible Regular Expressions}) written by Philip Hazel. See @uref{http://www.pcre.org, http://www.pcre.org} for information about the particular regexp flavor and extensions provided by this library.
     6101This library unit provides support for regular expressions. The regular  expression package used is @code{PCRE} (@emph{Perl Compatible Regular Expressions}) written by Philip Hazel. See @uref{http://www.pcre.org, http://www.pcre.org} for information about the particular regexp flavor and extensions provided by this library.
    64436102
    64446103To test that PCRE support has been built into Chicken properly, try:
     
    64466105@example
    64476106(require 'regex)
    6448 (test-feature? 'pcre) @strong{=>} #t
     6107(test-feature? 'pcre) @strong{=>} t
    64496108@end example
    64506109@node Unit regex - grep, Unit regex - glob->regexp,  , Unit regex
     
    64836142?
    64846143@end verbatim
    6485 @node Unit regex - glob?, Unit regex - regex-chardef-table?, Unit regex - glob->regexp, Unit regex
     6144@node Unit regex - glob?, Unit regex - regexp, Unit regex - glob->regexp, Unit regex
    64866145@section glob?
    64876146
     
    64946153A string without any "glob" wildcards does not meet the criteria, even though it technically is a valid "glob" file-pattern.
    64956154
    6496 @node Unit regex - regex-chardef-table?, Unit regex - regex-chardef-table, Unit regex - glob?, Unit regex
    6497 @section regex-chardef-table?
    6498 
    6499 
    6500 @verbatim
    6501 [procedure] (regex-chardef-table? OBJECT)
    6502 @end verbatim
    6503 Returns @code{#t} if the @code{OBJECT} is a @code{character definitions table}, and @code{#f} otherwise.
    6504 
    6505 @node Unit regex - regex-chardef-table, Unit regex - regexp, Unit regex - regex-chardef-table?, Unit regex
    6506 @section regex-chardef-table
    6507 
    6508 
    6509 @verbatim
    6510 [procedure] (regex-chardef-table)
    6511 @end verbatim
    6512 Returns a new @code{character definitions table}.
    6513 
    6514 @node Unit regex - regexp, Unit regex - regexp*, Unit regex - regex-chardef-table, Unit regex
     6155@node Unit regex - regexp, Unit regex - regexp*, Unit regex - glob?, Unit regex
    65156156@section regexp
    65166157
     
    65246165@section regexp*
    65256166
    6526 @menu
    6527 * Unit regex - regexp* - Option Symbols;::
    6528 
    6529 @end menu
    6530 
    6531 
    6532 @verbatim
    6533 [procedure] (regexp* STRING [OPTIONS [CHARDEFS-TABLE]])
    6534 @end verbatim
    6535 Returns a precompiled regular expression object for @code{string}. The optional argument @code{OPTIONS} must be a list of option symbols. The optional argument @code{CHARDEFS-TABLE} must be a character definitions table.
    6536 
    6537 @node Unit regex - regexp* - Option Symbols;,  ,  , Unit regex - regexp*
    6538 @subsection Option Symbols:
    6539 
     6167
     6168@verbatim
     6169[procedure] (regexp* STRING [OPTIONS [TABLES]])
     6170@end verbatim
     6171Returns a precompiled regular expression object for @code{string}. The optional argument @code{OPTIONS} must be a list of option symbols. The optional argument @code{TABLES} must be a character definitions table (not defined here).
     6172
     6173Option Symbols:
    65406174
    65416175@table @b
     
    66386272@verbatim
    66396273[procedure] (regexp-optimize RX)
     6274
    66406275@end verbatim
    66416276Perform available optimizations for the precompiled regular expression @code{RX}. Returns @code{#t} when optimization performed, and @code{#f} otherwise.
     
    66906325
    66916326(string-split-fields @strong{","} s #:suffix)
    6692 
     6327 
    66936328  @strong{=>} (@strong{"this is a string 1"} @strong{" 2"} @strong{" 3"})
    66946329@end example
     
    67006335[procedure] (string-substitute REGEXP SUBST STRING [MODE])
    67016336@end verbatim
    6702 Searches substrings in @code{STRING} that match @code{REGEXP} and substitutes them with the string @code{SUBST}. The substitution can contain references to subexpressions in @code{REGEXP} with the @code{\NUM} notation, where @code{NUM} refers to the NUMth parenthesized expression. The optional argument @code{MODE} defaults to 1 and specifies the number of the match to be substituted. Any non-numeric index specifies that all matches are to be substituted.
     6337Searches substrings in @code{STRING} that match @code{REGEXP} and substitutes them with the string @code{SUBST}. The substitution can contain references to subexpressions in  @code{REGEXP} with the @code{\NUM} notation, where @code{NUM} refers to the NUMth parenthesized expression. The optional argument @code{MODE} defaults to 1 and specifies the number of the match to be substituted. Any non-numeric index specifies that all matches are to be substituted.
    67036338
    67046339@example
     
    71516786* Unit posix - Directories - directory?::
    71526787* Unit posix - Directories - glob::
     6788* Unit posix - Directories - canonical-path::
    71536789* Unit posix - Directories - set-root-directory!::
    71546790
     
    72106846Returns @code{#t} if there exists a file with the name @code{NAME} and if that file is a directory, or @code{#f} otherwise.
    72116847
    7212 @node Unit posix - Directories - glob, Unit posix - Directories - set-root-directory!, Unit posix - Directories - directory?, Unit posix - Directories
     6848@node Unit posix - Directories - glob, Unit posix - Directories - canonical-path, Unit posix - Directories - directory?, Unit posix - Directories
    72136849@subsection glob
    72146850
     
    72196855Returns a list of the pathnames of all existing files matching @code{PATTERN1 ...}, which should be strings containing the usual file-patterns (with @code{*} matching zero or more characters and @code{?} matching zero or one character).
    72206856
    7221 @node Unit posix - Directories - set-root-directory!,  , Unit posix - Directories - glob, Unit posix - Directories
     6857@node Unit posix - Directories - canonical-path, Unit posix - Directories - set-root-directory!, Unit posix - Directories - glob, Unit posix - Directories
     6858@subsection canonical-path
     6859
     6860
     6861@verbatim
     6862[procedure] (canonical-path NAME)
     6863@end verbatim
     6864Returns a canonical path for @code{NAME}, which should be a string containing a path-or-filename.  The string returned by  @code{canonical-path} is OS dependent; it may be quoted and used in a shell on the calling machine. (Quoting is suggested as shell special characters, including space, are not escaped.)  However, all path separators and prefixes are handled in an OS independent fashion.  Any appearance of @code{/} below imply @code{\\} is also handled.
     6865
     6866The prefix for @code{NAME} determines what path to prepend.  If @code{NAME} begins with a @code{"~/"}, this prefix is stripped and the user's  home directory is added.  If beginning with @code{/} or a DRIVE-LETTER:\\ combination, no additional path is added.  Otherwise, the current directory and separator are added.  All relative path elements and duplicate separators are processed and removed.  If @code{NAME} ends with a @code{/} or is empty, the appropriate slash is appended to the tail.
     6867
     6868No directories or files are actually tested for existence; this  procedure only canonicalises path syntax.
     6869
     6870@node Unit posix - Directories - set-root-directory!,  , Unit posix - Directories - canonical-path, Unit posix - Directories
    72226871@subsection set-root-directory!
    72236872
     
    75077156* Unit posix - Retrieving file attributes - file-write-access?::
    75087157* Unit posix - Retrieving file attributes - file-execute-access?::
     7158* Unit posix - Retrieving file attributes - stat-regular?::
     7159* Unit posix - Retrieving file attributes - stat-directory?::
     7160* Unit posix - Retrieving file attributes - stat-char-device?::
     7161* Unit posix - Retrieving file attributes - stat-block-device?::
     7162* Unit posix - Retrieving file attributes - stat-fifo?::
     7163* Unit posix - Retrieving file attributes - stat-symlink?::
     7164* Unit posix - Retrieving file attributes - stat-socket?::
    75097165
    75107166@end menu
     
    75927248
    75937249
    7594 @node Unit posix - Retrieving file attributes - file-execute-access?,  , Unit posix - Retrieving file attributes - file-write-access?, Unit posix - Retrieving file attributes
     7250@node Unit posix - Retrieving file attributes - file-execute-access?, Unit posix - Retrieving file attributes - stat-regular?, Unit posix - Retrieving file attributes - file-write-access?, Unit posix - Retrieving file attributes
    75957251@subsection file-execute-access?
    75967252
     
    76027258@end verbatim
    76037259These procedures return @code{#t} if the current user has read, write or execute permissions on the file named @code{FILENAME}.
     7260
     7261@node Unit posix - Retrieving file attributes - stat-regular?, Unit posix - Retrieving file attributes - stat-directory?, Unit posix - Retrieving file attributes - file-execute-access?, Unit posix - Retrieving file attributes
     7262@subsection stat-regular?
     7263
     7264
     7265@node Unit posix - Retrieving file attributes - stat-directory?, Unit posix - Retrieving file attributes - stat-char-device?, Unit posix - Retrieving file attributes - stat-regular?, Unit posix - Retrieving file attributes
     7266@subsection stat-directory?
     7267
     7268
     7269@node Unit posix - Retrieving file attributes - stat-char-device?, Unit posix - Retrieving file attributes - stat-block-device?, Unit posix - Retrieving file attributes - stat-directory?, Unit posix - Retrieving file attributes
     7270@subsection stat-char-device?
     7271
     7272
     7273@node Unit posix - Retrieving file attributes - stat-block-device?, Unit posix - Retrieving file attributes - stat-fifo?, Unit posix - Retrieving file attributes - stat-char-device?, Unit posix - Retrieving file attributes
     7274@subsection stat-block-device?
     7275
     7276
     7277@node Unit posix - Retrieving file attributes - stat-fifo?, Unit posix - Retrieving file attributes - stat-symlink?, Unit posix - Retrieving file attributes - stat-block-device?, Unit posix - Retrieving file attributes
     7278@subsection stat-fifo?
     7279
     7280
     7281@node Unit posix - Retrieving file attributes - stat-symlink?, Unit posix - Retrieving file attributes - stat-socket?, Unit posix - Retrieving file attributes - stat-fifo?, Unit posix - Retrieving file attributes
     7282@subsection stat-symlink?
     7283
     7284
     7285@node Unit posix - Retrieving file attributes - stat-socket?,  , Unit posix - Retrieving file attributes - stat-symlink?, Unit posix - Retrieving file attributes
     7286@subsection stat-socket?
     7287
     7288
     7289@verbatim
     7290[procedure] (stat-regular? FILENAME)
     7291[procedure] (stat-directory? FILENAME)
     7292[procedure] (stat-char-device? FILENAME)
     7293[procedure] (stat-block-device? FILENAME)
     7294[procedure] (stat-fifo? FILENAME)
     7295[procedure] (stat-symlink? FILENAME)
     7296[procedure] (stat-socket? FILENAME)
     7297@end verbatim
     7298These procedures return @code{#t} if the @code{FILENAME} given is of the  appropriate type.
    76047299
    76057300@node Unit posix - Changing file attributes, Unit posix - Processes, Unit posix - Retrieving file attributes, Unit posix
     
    83458040* Unit posix - Date and time routines - utc-time->seconds::
    83468041* Unit posix - Date and time routines - time->string::
    8347 * Unit posix - Date and time routines - string->time::
    83488042
    83498043@end menu
     
    84378131Converts the ten-element vector @code{VECTOR} representing the UTC time value into the number of seconds since the first of January, 1970 UTC.
    84388132
    8439 @node Unit posix - Date and time routines - time->string, Unit posix - Date and time routines - string->time, Unit posix - Date and time routines - utc-time->seconds, Unit posix - Date and time routines
     8133@node Unit posix - Date and time routines - time->string,  , Unit posix - Date and time routines - utc-time->seconds, Unit posix - Date and time routines
    84408134@subsection time->string
    84418135
    84428136
    84438137@verbatim
    8444 [procedure] (time->string VECTOR [FORMAT])
    8445 @end verbatim
    8446 Without a @code{FORMAT} string converts the broken out time represented in the 10 element vector @code{VECTOR} into a string of the form @code{"Tue May 21 13:46:22 1991"}.
    8447 
    8448 Otherwise returns the time as a string formatted per the @code{FORMAT} string.
    8449 
    8450 See the @code{strftime} C procedure for a specification of the @code{FORMAT} string.
    8451 
    8452 @node Unit posix - Date and time routines - string->time,  , Unit posix - Date and time routines - time->string, Unit posix - Date and time routines
    8453 @subsection string->time
    8454 
    8455 
    8456 @verbatim
    8457 [procedure] (string->time STRING [FORMAT])
    8458 @end verbatim
    8459 Returns the time string parsed per the @code{FORMAT} string as a broken out time 10 element vector.
    8460 
    8461 The default @code{FORMAT} string is @code{"%a %b %e %H:%M:%S %Z %Y"}. (The default @code{date} command format.)
    8462 
    8463 See the @code{strptime} C procedure for a specification of the @code{FORMAT} string.
     8138[procedure] (time->string VECTOR)
     8139@end verbatim
     8140Converts the broken down time represented in the 10 element vector @code{VECTOR} into a string of the form @code{"Tue May 21 13:46:22 1991"}.
    84648141
    84658142@node Unit posix - Raw exit, Unit posix - ERRNO values, Unit posix - Date and time routines, Unit posix
     
    86788355* Unit posix - Terminal ports - terminal-name::
    86798356* Unit posix - Terminal ports - terminal-port?::
    8680 * Unit posix - Terminal ports - terminal-size::
    86818357
    86828358@end menu
     
    86928368Returns the name of the terminal that is connected to @code{PORT}.
    86938369
    8694 @node Unit posix - Terminal ports - terminal-port?, Unit posix - Terminal ports - terminal-size, Unit posix - Terminal ports - terminal-name, Unit posix - Terminal ports
     8370@node Unit posix - Terminal ports - terminal-port?,  , Unit posix - Terminal ports - terminal-name, Unit posix - Terminal ports
    86958371@subsection terminal-port?
    86968372
     
    87008376@end verbatim
    87018377Returns @code{#t} if @code{PORT} is connected to a terminal and @code{#f} otherwise.
    8702 
    8703 @node Unit posix - Terminal ports - terminal-size,  , Unit posix - Terminal ports - terminal-port?, Unit posix - Terminal ports
    8704 @subsection terminal-size
    8705 
    8706 
    8707 @verbatim
    8708 [procedure] (terminal-size PORT)
    8709 @end verbatim
    8710 Returns two values: The height and width of the terminal connected to @code{PORT}.
    87118378
    87128379@node Unit posix - How Scheme procedures relate to UNIX C functions, Unit posix - Windows specific notes, Unit posix - Terminal ports, Unit posix
     
    87148381
    87158382
    8716 <table> <tr><td> change-directory chdir </td></tr><tr><td> change-file-mode chmod </td></tr><tr><td> change-file-owner chown </td></tr><tr><td> create-directory mkdir </td></tr><tr><td> create-fifo mkfifo </td></tr><tr><td> create-pipe pipe </td></tr><tr><td> create-session setsid </td></tr><tr><td> create-symbolic-link link </td></tr><tr><td> current-directory curdir </td></tr><tr><td> current-effective-groupd-id getegid </td></tr><tr><td> current-effective-user-id geteuid </td></tr><tr><td> current-group-id getgid </td></tr><tr><td> current-parent-id getppid </td></tr><tr><td> current-process-id getpid </td></tr><tr><td> current-user-id getuid </td></tr><tr><td> delete-directory rmdir </td></tr><tr><td> duplicate-fileno dup/dup2 </td></tr><tr><td> _exit _exit </td></tr><tr><td> file-close close </td></tr><tr><td> file-access-time stat </td></tr><tr><td> file-change-time stat </td></tr><tr><td> file-modification-time stat </td></tr><tr><td> file-execute-access? access </td></tr><tr><td> file-open open </td></tr><tr><td> file-lock fcntl </td></tr><tr><td> file-position ftell/lseek </td></tr><tr><td> file-read read </td></tr><tr><td> file-read-access? access </td></tr><tr><td> file-select select </td></tr><tr><td> file-control fcntl </td></tr><tr><td> file-stat stat </td></tr><tr><td> file-test-lock fcntl </td></tr><tr><td> file-truncate truncate/ftruncate </td></tr><tr><td> file-unlock fcntl </td></tr><tr><td> file-write write </td></tr><tr><td> file-write-access? access </td></tr><tr><td> get-groups getgroups </td></tr><tr><td> get-host-name gethostname </td></tr><tr><td> initialize-groups initgroups </td></tr><tr><td> local-time->seconds mktime </td></tr><tr><td> local-timezone-abbreviation localtime </td></tr><tr><td> map-file-to-memory mmap </td></tr><tr><td> open-input-file* fdopen </td></tr><tr><td> open-output-file* fdopen </td></tr><tr><td> open-input-pipe popen </td></tr><tr><td> open-output-pipe popen </td></tr><tr><td> port->fileno fileno </td></tr><tr><td> process-execute execvp </td></tr><tr><td> process-fork fork </td></tr><tr><td> process-group-id getpgid </td></tr><tr><td> process-signal kill </td></tr><tr><td> process-wait waitpid </td></tr><tr><td> close-input-pipe pclose </td></tr><tr><td> close-output-pipe pclose </td></tr><tr><td> read-symbolic-link readlink </td></tr><tr><td> seconds->local-time localtime </td></tr><tr><td> seconds->string ctime </td></tr><tr><td> seconds->utc-time gmtime </td></tr><tr><td> set-alarm! alarm </td></tr><tr><td> set-buffering-mode! setvbuf </td></tr><tr><td> set-file-position! fseek/seek </td></tr><tr><td> set-groups! setgroups </td></tr><tr><td> set-signal-mask! sigprocmask </td></tr><tr><td> set-group-id! setgid </td></tr><tr><td> set-process-group-id! setpgid </td></tr><tr><td> set-user-id! setuid </td></tr><tr><td> set-root-directory! chroot </td></tr><tr><td> setenv setenv/putenv </td></tr><tr><td> sleep sleep </td></tr><tr><td> system-information uname </td></tr><tr><td> terminal-name ttyname </td></tr><tr><td> terminal-port? isatty </td></tr><tr><td> time->string asctime </td></tr><tr><td> unsetenv putenv </td></tr><tr><td> unmap-file-from-memory munmap </td></tr><tr><td> user-information getpwnam/getpwuid </td></tr><tr><td> utc-time->seconds timegm </td></tr></table>
    8717 
     8383@table @b
     8384@item @code{change-directory}
     8385
     8386@code{chdir}
     8387@item @code{change-file-mode}
     8388
     8389@code{chmod}
     8390@item @code{change-file-owner}
     8391
     8392@code{chown}
     8393@item @code{create-directory}
     8394
     8395@code{mkdir}
     8396@item @code{create-fifo}
     8397
     8398@code{mkfifo}
     8399@item @code{create-pipe}
     8400
     8401@code{pipe}
     8402@item @code{create-session}
     8403
     8404@code{setsid}
     8405@item @code{create-symbolic-link}
     8406
     8407@code{link}
     8408@item @code{current-directory}
     8409
     8410@code{curdir}
     8411@item @code{current-effective-groupd-id}
     8412
     8413@code{getegid}
     8414@item @code{current-effective-user-id}
     8415
     8416@code{geteuid}
     8417@item @code{current-group-id}
     8418
     8419@code{getgid}
     8420@item @code{current-parent-id}
     8421
     8422@code{getppid}
     8423@item @code{current-process-id}
     8424
     8425@code{getpid}
     8426@item @code{current-user-id}
     8427
     8428@code{getuid}
     8429@item @code{delete-directory}
     8430
     8431@code{rmdir}
     8432@item @code{duplicate-fileno}
     8433
     8434@code{dup/dup2}
     8435@item @code{_exit}
     8436
     8437@code{_exit}
     8438@item @code{file-close}
     8439
     8440@code{close}
     8441@item @code{file-access-time}
     8442
     8443@code{stat}
     8444@item @code{file-change-time}
     8445
     8446@code{stat}
     8447@item @code{file-modification-time}
     8448
     8449@code{stat}
     8450@item @code{file-execute-access?}
     8451
     8452@code{access}
     8453@item @code{file-open}
     8454
     8455@code{open}
     8456@item @code{file-lock}
     8457
     8458@code{fcntl}
     8459@item @code{file-position}
     8460
     8461@code{ftell/lseek}
     8462@item @code{file-read}
     8463
     8464@code{read}
     8465@item @code{file-read-access?}
     8466
     8467@code{access}
     8468@item @code{file-select}
     8469
     8470@code{select}
     8471@item @code{file-control}
     8472
     8473@code{fcntl}
     8474@item @code{file-stat}
     8475
     8476@code{stat}
     8477@item @code{file-test-lock}
     8478
     8479@code{fcntl}
     8480@item @code{file-truncate}
     8481
     8482@code{truncate/ftruncate}
     8483@item @code{file-unlock}
     8484
     8485@code{fcntl}
     8486@item @code{file-write}
     8487
     8488@code{write}
     8489@item @code{file-write-access?}
     8490
     8491@code{access}
     8492@item @code{get-groups}
     8493
     8494@code{getgroups}
     8495@item @code{get-host-name}
     8496
     8497@code{gethostname}
     8498@item @code{initialize-groups}
     8499
     8500@code{initgroups}
     8501@item @code{local-time->seconds}
     8502
     8503@code{mktime}
     8504@item @code{local-timezone-abbreviation}
     8505
     8506@code{localtime}
     8507@item @code{map-file-to-memory}
     8508
     8509@code{mmap}
     8510@item @code{open-input-file*}
     8511
     8512@code{fdopen}
     8513@item @code{open-output-file*}
     8514
     8515@code{fdopen}
     8516@item @code{open-input-pipe}
     8517
     8518@code{popen}
     8519@item @code{open-output-pipe}
     8520
     8521@code{popen}
     8522@item @code{port->fileno}
     8523
     8524@code{fileno}
     8525@item @code{process-execute}
     8526
     8527@code{execvp}
     8528@item @code{process-fork}
     8529
     8530@code{fork}
     8531@item @code{process-group-id}
     8532
     8533@code{getpgid}
     8534@item @code{process-signal}
     8535
     8536@code{kill}
     8537@item @code{process-wait}
     8538
     8539@code{waitpid}
     8540@item @code{close-input-pipe}
     8541
     8542@code{pclose}
     8543@item @code{close-output-pipe}
     8544
     8545@code{pclose}
     8546@item @code{read-symbolic-link}
     8547
     8548@code{readlink}
     8549@item @code{seconds->local-time}
     8550
     8551@code{localtime}
     8552@item @code{seconds->string}
     8553
     8554@code{ctime}
     8555@item @code{seconds->utc-time}
     8556
     8557@code{gmtime}
     8558@item @code{set-alarm!}
     8559
     8560@code{alarm}
     8561@item @code{set-buffering-mode!}
     8562
     8563@code{setvbuf}
     8564@item @code{set-file-position!}
     8565
     8566@code{fseek/seek}
     8567@item @code{set-groups!}
     8568
     8569@code{setgroups}
     8570@item @code{set-signal-mask!}
     8571
     8572@code{sigprocmask}
     8573@item @code{set-group-id!}
     8574
     8575@code{setgid}
     8576@item @code{set-process-group-id!}
     8577
     8578@code{setpgid}
     8579@item @code{set-user-id!}
     8580
     8581@code{setuid}
     8582@item @code{set-root-directory!}
     8583
     8584@code{chroot}
     8585@item @code{setenv}
     8586
     8587@code{setenv/putenv}
     8588@item @code{sleep}
     8589
     8590@code{sleep}
     8591@item @code{system-information}
     8592
     8593@code{uname}
     8594@item @code{terminal-name}
     8595
     8596@code{ttyname}
     8597@item @code{terminal-port?}
     8598
     8599@code{isatty}
     8600@item @code{time->string}
     8601
     8602@code{asctime}
     8603@item @code{unsetenv}
     8604
     8605@code{putenv}
     8606@item @code{unmap-file-from-memory}
     8607
     8608@code{munmap}
     8609@item @code{user-information}
     8610
     8611@code{getpwnam/getpwuid}
     8612@item @code{utc-time->seconds}
     8613
     8614@code{timegm}
     8615
     8616@end table
    87188617@node Unit posix - Windows specific notes,  , Unit posix - How Scheme procedures relate to UNIX C functions, Unit posix
    87198618@section Windows specific notes
     
    87808679map-file-to-memory  unmap-file-from-memory  memory-mapped-file-pointer  memory-mapped-file?
    87818680set-alarm!
    8782 terminal-port?  terminal-name terminal-size
     8681terminal-port?  terminal-name
    87838682process-fork  process-signal
    87848683parent-process-id
    87858684set-root-directory!
    87868685utc-time->seconds
    8787 string->time
    87888686@end verbatim
    87898687@node Unit posix - Windows specific notes - Additional Definitions, Unit posix - Windows specific notes - process-spawn, Unit posix - Windows specific notes - Unsupported Definitions, Unit posix - Windows specific notes
     
    1045610354@verbatim
    1045710355
    10458 (TYPENAME-SLOTNAME-set! FOREIGN-RECORD-POINTER [INXDEX] VALUE)
     10356(TYPENAME-SLOTNAME-set! FOREIGN-RECORD-POINTER [INDEX] VALUE)
    1045910357@end verbatim
    1046010358A procedure of two arguments (a pointer to a C structure) and a value, that sets the slot value of the slot @code{SLOTNAME} in the structure. If a @code{SIZE} has been given in the slot definition, then an additional argument @code{INDEX} is required for the array index.
     
    1200211900* chicken-setup - Procedures and macros available in setup scripts - try-compile::
    1200311901* chicken-setup - Procedures and macros available in setup scripts - create-directory::
     11902* chicken-setup - Procedures and macros available in setup scripts - chicken-prefix::
    1200411903* chicken-setup - Procedures and macros available in setup scripts - installation-prefix::
    1200511904* chicken-setup - Procedures and macros available in setup scripts - program-path::
     
    1222512124Returns @code{#t} if the C code in @code{CODE} compiles and links successfully, or @code{#f} otherwise. The keyword parameters @code{cc} (compiler name, defaults to the C compiler used to build this system), @code{cflags} and @code{ldflags} accept additional compilation and linking options. If @code{compile-only} is true, then no linking step takes place. If the keyword argument @code{c++} is given and true, then the code will be compiled in C++ mode.
    1222612125
    12227 @node chicken-setup - Procedures and macros available in setup scripts - create-directory, chicken-setup - Procedures and macros available in setup scripts - installation-prefix, chicken-setup - Procedures and macros available in setup scripts - try-compile, chicken-setup - Procedures and macros available in setup scripts
     12126@node chicken-setup - Procedures and macros available in setup scripts - create-directory, chicken-setup - Procedures and macros available in setup scripts - chicken-prefix, chicken-setup - Procedures and macros available in setup scripts - try-compile, chicken-setup - Procedures and macros available in setup scripts
    1222812127@subsection create-directory
    1222912128
     
    1223412133Creates the directory given in the string @code{PATH}, with all parent directories as needed.
    1223512134
    12236 @node chicken-setup - Procedures and macros available in setup scripts - installation-prefix, chicken-setup - Procedures and macros available in setup scripts - program-path, chicken-setup - Procedures and macros available in setup scripts - create-directory, chicken-setup - Procedures and macros available in setup scripts
     12135@node chicken-setup - Procedures and macros available in setup scripts - chicken-prefix, chicken-setup - Procedures and macros available in setup scripts - installation-prefix, chicken-setup - Procedures and macros available in setup scripts - create-directory, chicken-setup - Procedures and macros available in setup scripts
     12136@subsection chicken-prefix
     12137
     12138
     12139@verbatim
     12140[parameter] chicken-prefix
     12141@end verbatim
     12142The installation prefix specified when CHICKEN was built.
     12143
     12144@node chicken-setup - Procedures and macros available in setup scripts - installation-prefix, chicken-setup - Procedures and macros available in setup scripts - program-path, chicken-setup - Procedures and macros available in setup scripts - chicken-prefix, chicken-setup - Procedures and macros available in setup scripts
    1223712145@subsection installation-prefix
    1223812146
     
    1224112149[parameter] installation-prefix
    1224212150@end verbatim
    12243 Holds the prefix under which CHICKEN executables and libraries have been installed (either the value of the environment variable @code{CHICKEN_PREFIX} or whatever prefix was specified at the time the system was built.
     12151An alternative installation prefix that will be prepended to extension installation paths if specified. It is set by the @code{-install-prefix} option or environment variable @code{CHICKEN_INSTALL_PREFIX}.
    1224412152
    1224512153@node chicken-setup - Procedures and macros available in setup scripts - program-path, chicken-setup - Procedures and macros available in setup scripts - setup-root-directory, chicken-setup - Procedures and macros available in setup scripts - installation-prefix, chicken-setup - Procedures and macros available in setup scripts
     
    1254912457
    1255012458Fetch extension from local file
    12551 @item @code{-destdir PATHNAME}
     12459@item @code{-install-prefix PATHNAME}
    1255212460
    1255312461Specify alternative installation prefix (for packaging)
     
    1255512463
    1255612464Compile extension in "host" mode (sets the parameter @code{host-extension} to @code{#f})
     12465@item @code{-build-prefix PATHNAME}
     12466
     12467Location where chicken-setup will create egg build directories  (default: the value of environment variable CHICKEN_TMPDIR, or @code{/tmp/chicken-@{MAJOR-VERSION-build-@{USER}@}@})
     12468@item @code{-download-path PATHNAME}
     12469
     12470Location where chicken-setup will save downloaded files  (default: @code{build-prefix/downloads})
    1255712471@item @code{--}
    1255812472
     
    1276412678@menu
    1276512679* FAQ - General - Why yet another Scheme implementation?::
     12680* FAQ - General - Why call it 'Chicken'?::
    1276612681* FAQ - General - What should I do if I find a bug?::
    1276712682* FAQ - General - Why are values defined with define-foreign-variable or define-constant or define-inline not seen outside of the containing source file?::
     
    1277912694
    1278012695
    12781 @node FAQ - General - Why yet another Scheme implementation?, FAQ - General - What should I do if I find a bug?,  , FAQ - General
     12696@node FAQ - General - Why yet another Scheme implementation?, FAQ - General - Why call it 'Chicken'?,  , FAQ - General
    1278212697@subsection Why yet another Scheme implementation?
    1278312698
     
    1279812713
    1279912714@end itemize
    12800 @node FAQ - General - What should I do if I find a bug?, FAQ - General - Why are values defined with define-foreign-variable or define-constant or define-inline not seen outside of the containing source file?, FAQ - General - Why yet another Scheme implementation?, FAQ - General
     12715@node FAQ - General - Why call it 'Chicken'?, FAQ - General - What should I do if I find a bug?, FAQ - General - Why yet another Scheme implementation?, FAQ - General
     12716@subsection Why call it 'Chicken'?
     12717
     12718
     12719According to @uref{http://chicken.wiki.br/felix winkelmann, felix}:
     12720
     12721@quotation
     12722Well, it's pretty boring, really: when I started the project and needed some name, the first thing that met my eyes was the "chicken" (actually a disguised penguin)  from the Wallace + Gromit movie... And then there is of course the ever occurring chicken-and-egg problem with bootstrapped compilers.
     12723
     12724
     12725@end quotation
     12726@node FAQ - General - What should I do if I find a bug?, FAQ - General - Why are values defined with define-foreign-variable or define-constant or define-inline not seen outside of the containing source file?, FAQ - General - Why call it 'Chicken'?, FAQ - General
    1280112727@subsection What should I do if I find a bug?
    1280212728
    1280312729
    12804 Send e-mail to @uref{mailto:chicken-janitors@@nongnu.org, chicken-janitors@@nongnu.org} (preferably using the @code{chicken-bug(1)} tool) with some hints about the problem, like version/build of the compiler, platform, system configuration, code that causes the bug, etc.
     12730Send e-mail to @uref{mailto:felix@@call-with-current-continuation.org, felix@@call-with-current-continuation.org} with some hints about the problem, like version/build of the compiler, platform, system configuration, code that causes the bug, etc.
    1280512731
    1280612732@node FAQ - General - Why are values defined with define-foreign-variable or define-constant or define-inline not seen outside of the containing source file?, FAQ - General - How does cond-expand know which features are registered in used units?, FAQ - General - What should I do if I find a bug?, FAQ - General
     
    1285912785- Dispatching of arithmetic operations is more efficient.
    1286012786
    12861 There is an extension based on the GNU Multiprecision Package that implements most of the full numeric tower, see @uref{http://chicken.wiki.br/numbers, http://chicken.wiki.br/numbers}.
     12787There is an extension based on the GNU Multiprecision Package that implements most of the full numeric tower, see @uref{http://chicken.wiki.br/numbers, numbers}.
    1286212788
    1286312789@node FAQ - General - How can I specialize a generic function method to match instances of every class?, FAQ - General - Does CHICKEN support native threads?, FAQ - General - Why doesn't CHICKEN support the full numeric tower by default?, FAQ - General
     
    1335813284
    1335913285
    13360 Many thanks to Nico Amtsberg, William Annis, Marc Baily, Peter Barabas, Jonah Beckford, Arto Bendiken, Peter Bex, Jean-Francois Bignolles, Alaric Blagrave-Snellpym, Dave Bodenstab, Fabian Boehlke, T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence Brannon, Roy Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor Campbell, Naruto Canada, Esteban U. Caamano Castro, Franklin Chen, Thomas Chust, Gian Paolo Ciceri, John Cowan, Grzegorz Chrupa&#322;a, James Crippen, Tollef Fog Heen, Alejandro Forero Cuervo, Linh Dang, Brian Denheyer, dgym, Don, Chris Double, Jarod Eells, Petter Egesund, Steve Elkins, Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley, Fizzie, Kimura Fuyuki, Tony Garnock-Jones, Martin Gasbichler, Joey Gibson, Stephen C. Gilardi, Joshua Griffith, Johannes Groedem, Damian Gryski, Mario Domenech Goulart, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Huebner, Markus Huelsmann, Goetz Isenmann, Andrei Ivushkin, Paulo Jabardo, David Janssens, Christian Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller, Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof Kowa&#322;czyk, Andre Kuehne, Todd R. Kueny Sr, Goran Krampe, David Krentzlin, Ben Kurtz, Micky Latowicki, John Lenz, Kirill Lisovsky, Juergen Lorenz, Kon Lovett, Dennis Marti, Charles Martin, Bob McIsaac, Alain Mellan, Eric Merrit, Perry Metzger, Scott G. Miller, Mikael, Bruce Mitchener, Chris Moline, Eric E. Moore, Julian Morrison, Dan Muresan, Lars Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi Pearson, Nicolas Pelletier, Carlos Pita, Robin Lee Powell, Pupeno, Davide Puricelli, Doug Quale, Eric Raible, Ivan Raikov, Joel Reymont, Eric Rochester, Andreas Rottman, David Rush, Lars Rustemeier, Daniel Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald Schroeder, Spencer Schumann, Alex Shinn, Ivan Shmakov, Shmul, Tony Sidaway, Jeffrey B. Siegal, Andrey Sidorenko, Michele Simionato, Volker Stolz, Jon Strait, Dorai Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein, Sunnan, Zbigniew Szadkowski, Rick Taube, Mike Thomas, Minh Thu, Christian Tismer, Andre van Tonder, John Tobey, Henrik Tramberend, Vladimir Tsichevsky, Neil van Dyke, Sander Vesik, Jaques Vidrine, Panagiotis Vossos, Shawn Wagner, Peter Wang, Ed Watkeys, Brad Watson, Thomas Weidner, Goeran Weinholt, Matthew Welland, Joerg Wittenberger, Peter Wright, Mark Wutka, Richard Zidlicky and Houman Zolfaghari for bug-fixes, tips and suggestions.
     13286Many thanks to Nico Amtsberg, William Annis, Marc Baily, Peter Barabas, Jonah Beckford, Arto Bendiken, Peter Bex, Jean-Francois Bignolles, Alaric Blagrave-Snellpym, Dave Bodenstab, Fabian Boehlke, T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence Brannon, Roy Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor Campbell, Naruto Canada, Esteban U. Caamano Castro, Franklin Chen, Thomas Chust, Gian Paolo Ciceri, John Cowan, Grzegorz Chrupa&#322;a, James Crippen, Tollef Fog Heen, Alejandro Forero Cuervo, Linh Dang, Brian Denheyer, dgym, Don, Chris Double, Jarod Eells, Petter Egesund, Steve Elkins, Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley, Fizzie, Kimura Fuyuki, Tony Garnock-Jones, Martin Gasbichler, Joey Gibson, Stephen C. Gilardi, Joshua Griffith, Johannes Groedem, Damian Gryski, Mario Domenech Goulart, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Huebner, Markus Huelsmann, Goetz Isenmann, Paulo Jabardo, David Janssens, Christian Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller, Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof Kowa&#322;czyk, Andre Kuehne, Todd R. Kueny Sr, Goran Krampe, David Krentzlin, Ben Kurtz, Micky Latowicki, John Lenz, Kirill Lisovsky, Juergen Lorenz, Kon Lovett, Dennis Marti, Charles Martin, Bob McIsaac, Alain Mellan, Eric Merrit, Perry Metzger, Scott G. Miller, Mikael, Bruce Mitchener, Chris Moline, Eric E. Moore, Julian Morrison, Dan Muresan, Lars Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi Pearson, Nicolas Pelletier, Carlos Pita, Robin Lee Powell, Pupeno, Davide Puricelli, Doug Quale, Eric Raible, Ivan Raikov, Joel Reymont, Eric Rochester, Andreas Rottman, David Rush, Lars Rustemeier, Daniel Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald Schroeder, Spencer Schumann, Alex Shinn, Ivan Shmakov, Shmul, Tony Sidaway, Jeffrey B. Siegal, Andrey Sidorenko, Michele Simionato, Volker Stolz, Jon Strait, Dorai Sitaram, Robert Skeels, Jason Songhurst, Clifford Stein, Sunnan, Zbigniew Szadkowski, Rick Taube, Mike Thomas, Minh Thu, Christian Tismer, Andre van Tonder, John Tobey, Henrik Tramberend, Vladimir Tsichevsky, Neil van Dyke, Sander Vesik, Jaques Vidrine, Panagiotis Vossos, Shawn Wagner, Peter Wang, Ed Watkeys, Brad Watson, Thomas Weidner, Goeran Weinholt, Matthew Welland, Joerg Wittenberger, Peter Wright, Mark Wutka, Richard Zidlicky and Houman Zolfaghari for bug-fixes, tips and suggestions.
    1336113287
    1336213288CHICKEN uses the PCRE regular expression package (@uref{http://www.pcre.org, http://www.pcre.org}), which is written by Philip Hazel.
     
    1339513321
    1339613322pattern matcher.
    13397 @item Alex Shinn
     13323@item @uref{http://chicken.wiki.br/Alex Shinn, Alex Shinn}
    1339813324
    1339913325@code{scheme-complete.el} emacs tab-completion
  • chicken/trunk/manual/The User's Manual

    r9418 r9422  
    33== The User's Manual
    44
    5 This is the user's manual for the Chicken Scheme compiler, version 3.0.4.
     5This is the user's manual for the Chicken Scheme compiler, version 3.0.6.
    66
    77; [[Overview]] : What is Chicken?
Note: See TracChangeset for help on using the changeset viewer.