Changeset 7276 in project for chicken/branches/release/manual


Ignore:
Timestamp:
01/05/08 20:17:50 (12 years ago)
Author:
felix winkelmann
Message:

merged trunk

Location:
chicken/branches/release/manual
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/release/manual/Accessing external objects

    r5945 r7276  
    203203(some-struct-ycoord-set! C-POINTER NUMBER)
    204204</enscript>
     205
     206
    205207=== define-foreign-enum
    206208
    207  [syntax] (define-foreign-enum TYPENAME ITEM ...)
     209 [syntax] (define-foreign-enum TYPESPEC [USE-ALIASES] ENUMSPEC ...)
    208210
    209211Defines a foreign type (as with {{define-foreign-type}}) that maps the elements
     
    211213symbols.
    212214
    213 {{TYPENAME}} specifies a foreign type that converts a symbol argument from the
    214 set {{ITEM ...}} into the appropriate enum value when passed as an argument to
     215{{TYPESPEC}} specifies a foreign type that converts a symbol argument from the
     216set {{ENUMSPEC ...}} into the appropriate enum value when passed as an argument to
    215217a foreign function.
    216218
     
    220222supported in this case).
    221223
    222 {{TYPENAME}} maybe a symbol or a list of the form {{(SCHEMENAME REALTYPE
    223 [DEFAULT-SCHEME-VALUE])}}, where {{REALTYPE}} designates the native type used.
    224 The default native type is {{"TYPENAME"}}. The {{DEFAULT-SCHEME-VALUE}}
    225 overrides the default result of mapping from the native type; i.e. when no such
    226 mapping exists. When supplied the form is used unquoted, otherwise the result
    227 is {{'()}}.
    228 
    229 {{ITEM}} is a symbol or a list of the form {{(SCHEMENAME REALTYPE
     224{{TYPESPEC}} maybe a TYPENAME symbol or a list of the form {{(SCHEMENAME
     225REALTYPE [DEFAULT-SCHEME-VALUE])}}, where {{REALTYPE}} designates the native
     226type used. The default type specification is {{(TYPENAME TYPENAME)}}. The
     227{{DEFAULT-SCHEME-VALUE}} overrides the default result of mapping from the
     228native type; i.e. when no such mapping exists. When supplied the form is used
     229unquoted, otherwise the result is {{'()}}.
     230
     231{{ENUMSPEC}} is a TYPENAME symbol or a list of the form {{(SCHEMENAME REALTYPE
    230232[SCHEME-VALUE])}}, where {{REALTYPE}} designates the native type used. The
    231 default native type is {{"ITEM"}}. The {{SCHEME-VALUE}} overrides the result of
    232 mapping from the native type. When supplied the form is used unquoted,
    233 otherwise the {{SCHEMENAME}} symbol is returned.
     233default enum specification is {{(TYPENAME TYPENAME)}}. The {{SCHEME-VALUE}}
     234overrides the result of mapping from the native type. When supplied the form is
     235used unquoted, otherwise the {{SCHEMENAME}} symbol is returned.
     236
     237{{USE-ALIASES}} is an optional boolean flag that determines whether an alias or
     238the {{SCHEMENAME}} is used as the defined foreign variable name. The default
     239is {{#t}}.
    234240
    235241Additionally two procedures are defined named {{SCHEMENAME->number}} and
     
    238244takes one argument and converts a numeric value into its scheme value.
    239245
    240 Note that the specification of a scheme value override means the mapping may
    241 not be closed! {{(number->SCHEMENAME (SCHEMENAME->number SCHEMENAME))}} may not
    242 equal {{SCHEMENAME}}.
     246Note that the specification of a scheme value override ({{SCHEME-VALUE}}) means
     247the mapping may not be closed! {{(number->SCHEMENAME (SCHEMENAME->number
     248SCHEMENAME))}} may not equal {{SCHEMENAME}}.
    243249
    244250Here a heavily contrived example:
  • chicken/branches/release/manual/Acknowledgements

    r5945 r7276  
    88T. Kurt Bond, Ashley Bone, Dominique Boucher, Terence Brannon, Roy
    99Bryant, Adam Buchbinder, Hans Bulfone, Category 5, Taylor Campbell,
    10 Esteban U. Caamano Castro, Franklin Chen, Thomas Chust, Gian Paolo
    11 Ciceri, John Cowan, Grzegorz Chrupa&#322;a, James Crippen, Tollef Fog
    12 Heen, Alejandro Forero Cuervo, Linh Dang, Brian Denheyer, dgym, Chris
    13 Double, Jarod Eells, Petter Egesund, Steve Elkins, Daniel B. Faken,
    14 Will Farr, Graham Fawcett, Marc Feeley, Fizzie, Kimura Fuyuki, Tony
    15 Garnock-Jones, Martin Gasbichler, Joey Gibson, Stephen C. Gilardi,
    16 Joshua Griffith, Johannes Groedem, Damian Gryski, Mario Domenech
    17 Goulart, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro itojun Hagino,
    18 Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William P. Heinemann,
    19 Bill Hoffman, Bruce Hoult, Hans Huebner, Markus Huelsmann, Goetz
    20 Isenmann, Paulo Jabardo, David Janssens, Christian Jaeger, Dale
    21 Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller, Brad Kind, Ron
    22 Kneusel, Matthias Koeppe, Krysztof Kowa&#322;czyk, Andre Kuehne, Todd
    23 R. Kueny Sr, Goran Krampe, David Krentzlin, Ben Kurtz, Micky
    24 Latowicki, John Lenz, Kirill Lisovsky, Kon Lovett, Dennis Marti,
    25 Charles Martin, Bob McIsaac, Alain Mellan, Eric Merrit, Perry Metzger,
    26 Scott G. Miller, Mikael, Bruce Mitchener, Chris Moline, Eric E. Moore,
    27 Julian Morrison, Dan Muresan, Lars Nilsson, Ian Oversby, o.t., Gene
    28 Pavlovsky, Levi Pearson, Nicolas Pelletier, Carlos Pita, Robin Lee
    29 Powell, Pupeno, Davide Puricelli, Doug Quale, Eric Raible, Ivan
    30 Raikov, Joel Reymont, Andreas Rottman, David Rush, Lars Rustemeier,
    31 Daniel Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald
    32 Schroeder, Spencer Schumann, Alex Shinn, Ivan Shmakov, Shmul, Tony
    33 Sidaway, Jeffrey B. Siegal, Andrey Sidorenko, Michele Simionato,
    34 Volker Stolz, Jon Strait, Dorai Sitaram, Robert Skeels, Jason Songhurst, Clifford
    35 Stein, Sunnan, Zbigniew Szadkowski, Mike Thomas, Minh Thu, Christian
    36 Tismer, Andre van Tonder, John Tobey, Henrik Tramberend, Vladimir
    37 Tsichevsky, Neil van Dyke, Sander Vesik, Panagiotis Vossos, Shawn
    38 Wagner, Peter Wang, Ed Watkeys, Thomas Weidner, Goeran Weinholt,
    39 Matthew Welland, Joerg Wittenberger, Peter Wright, Mark Wutka, Richard
    40 Zidlicky and Houman Zolfaghari for bug-fixes, tips and suggestions.
     10Naruto Canada, Esteban U. Caamano Castro, Franklin Chen, Thomas Chust,
     11Gian Paolo Ciceri, John Cowan, Grzegorz Chrupa&#322;a, James Crippen,
     12Tollef Fog Heen, Alejandro Forero Cuervo, Linh Dang, Brian Denheyer,
     13dgym, Don, Chris Double, Jarod Eells, Petter Egesund, Steve Elkins,
     14Daniel B. Faken, Will Farr, Graham Fawcett, Marc Feeley, Fizzie,
     15Kimura Fuyuki, Tony Garnock-Jones, Martin Gasbichler, Joey Gibson,
     16Stephen C. Gilardi, Joshua Griffith, Johannes Groedem, Damian Gryski,
     17Mario Domenech Goulart, Andreas Gustafsson, Sven Hartrumpf, Jun-ichiro
     18itojun Hagino, Ahdi Hargo, Matthias Heiler, Karl M. Hegbloom, William
     19P. Heinemann, Bill Hoffman, Bruce Hoult, Hans Huebner, Markus
     20Huelsmann, Goetz Isenmann, Paulo Jabardo, David Janssens, Christian
     21Jaeger, Dale Jordan, Valentin Kamyshenko, Daishi Kato, Peter Keller,
     22Brad Kind, Ron Kneusel, Matthias Koeppe, Krysztof Kowa&#322;czyk,
     23Andre Kuehne, Todd R. Kueny Sr, Goran Krampe, David Krentzlin, Ben
     24Kurtz, Micky Latowicki, John Lenz, Kirill Lisovsky, Kon Lovett, Dennis
     25Marti, Charles Martin, Bob McIsaac, Alain Mellan, Eric Merrit, Perry
     26Metzger, Scott G. Miller, Mikael, Bruce Mitchener, Chris Moline, Eric
     27E. Moore, Julian Morrison, Dan Muresan, Lars Nilsson, Ian Oversby,
     28o.t., Gene Pavlovsky, Levi Pearson, Nicolas Pelletier, Carlos Pita,
     29Robin Lee Powell, Pupeno, Davide Puricelli, Doug Quale, Eric Raible,
     30Ivan Raikov, Joel Reymont, Eric Rochester, Andreas Rottman, David
     31Rush, Lars Rustemeier, Daniel Sadilek, Oskar Schirmer, Burton
     32Samograd, Reed Sheridan, Ronald Schroeder, Spencer Schumann, Alex
     33Shinn, Ivan Shmakov, Shmul, Tony Sidaway, Jeffrey B. Siegal, Andrey
     34Sidorenko, Michele Simionato, Volker Stolz, Jon Strait, Dorai Sitaram,
     35Robert Skeels, Jason Songhurst, Clifford Stein, Sunnan, Zbigniew
     36Szadkowski, Rick Taube, Mike Thomas, Minh Thu, Christian Tismer, Andre
     37van Tonder, John Tobey, Henrik Tramberend, Vladimir Tsichevsky, Neil
     38van Dyke, Sander Vesik, Panagiotis Vossos, Shawn Wagner, Peter Wang,
     39Ed Watkeys, Thomas Weidner, Goeran Weinholt, Matthew Welland, Joerg
     40Wittenberger, Peter Wright, Mark Wutka, Richard Zidlicky and Houman
     41Zolfaghari for bug-fixes, tips and suggestions.
    4142
    4243CHICKEN uses the PCRE regular expression package ([[http://www.pcre.org]]),
    4344which is written by Philip Hazel.
    4445
    45 Special thanks to Brandon van Every for contributing the
    46 [[http://www.cmake.org|CMake]] support and for helping
    47 with Windows build issues.
     46Special thanks to Brandon van Every for contributing the (now defunct)
     47[[http://www.cmake.org|CMake]] support and for helping with Windows
     48build issues.
    4849
    4950Also special thanks to Benedikt Rosenau for his constant encouragement.
     
    5960; Andrew Wilcox : queues.
    6061; Andrew Wright : pattern matcher.
     62; [[Alex Shinn]] : {{scheme-complete.el}} emacs tab-completion
    6163
    6264Previous: [[FAQ]]
  • chicken/branches/release/manual/C interface

    r5945 r7276  
    283283
    284284
     285=== C_pre_gc_hook
     286
     287 [C Variable] void (*C_pre_gc_hook)(int mode)
     288
     289If not {{NULL}}, the function pointed to by this variable will be
     290called before each garbage collection with a flag indicating what kind
     291of collection was performed (either {{0}} for a minor collection or
     292{{2}} for a resizing collection). A "resizing" collection means a
     293secondary collection that moves all live data into a enlarged (or
     294shrinked) heap-space. Minor collections happen very frequently, so the
     295hook function should not consume too much time. The hook function may
     296not invoke Scheme callbacks.
     297
     298Note that resizing collections may be nested in normal major collections.
     299
    285300=== C_post_gc_hook
    286301
    287  [C Variable] void (*C_post_gc_hook)(int mode)
    288 
    289 If not {{NULL}}, the function pointed to by this variable will be called
    290 after each garbage collection with a flag indicating what kind of collection
    291 was performed (either {{0}} for a minor collection or {{1}} for a major
    292 collection). Minor collections happen very frequently, so the hook function
    293 should not consume too much time. The hook function may not invoke Scheme
    294 callbacks.
    295 
    296 
    297 
    298 An example:
     302 [C Variable] void (*C_post_gc_hook)(int mode, long ms)
     303
     304If not {{NULL}}, the function pointed to by this variable will be
     305called after each garbage collection with a flag indicating what kind
     306of collection was performed (either {{0}} for a minor collection,
     307{{1}} for a major collection or {{2}} for a resizing
     308collection). Minor collections happen very frequently, so the hook
     309function should not consume too much time. The hook function may not
     310invoke Scheme callbacks. The {{ms}} argument records the number of
     311milliseconds required for the garbage collection, if the collection
     312was a major one. For minor collections the value of the {{ms}} argument
     313is undefined.
     314
     315
     316
     317=== An example for simple calls to foreign code involving callbacks
    299318
    300319 % cat foo.scm
     
    335354
    336355
    337 '''Notes:'''
     356=== Notes:
    338357
    339358Scheme procedures can call C functions, and C functions can call
  • chicken/branches/release/manual/Callbacks

    r5945 r7276  
    7575stack with the {{C_save}} macro.
    7676
    77 === C_callback_adjust_stack_limits
     77=== C_callback_adjust_stack
    7878
    79  [C function] void C_callback_adjust_stack_limits (C_word *ptr)
     79 [C function] void C_callback_adjust_stack (C_word *ptr, int size)
    8080
    8181The runtime-system uses the stack as a special allocation area and
    82 internally holds pointers to estimated limits to distinguish between Scheme
    83 data objects inside the stack from objects outside of it.
    84 If you invoke callbacks at wildly differing stack-levels,
    85 these limits may shift from invocation to invocation. Callbacks defined
    86 with {{define-external}} will perform appropriate adjustments automatically,
    87 but if you invoke {{C_callback}} manually, you should perform a
    88 {{C_callback_adjust_stack_limits}} to make sure the internal limits are
    89 set properly. {{ptr}} should point to some data object on the stack. The
    90 call will make sure the limits are adjusted so that the value pointed to
    91 by {{ptr}} is located in the stack.
     82internally holds pointers to estimated limits to distinguish between
     83Scheme data objects inside the stack from objects outside of it.  If
     84you invoke callbacks at wildly differing stack-levels, these limits
     85may shift from invocation to invocation. Callbacks defined with
     86{{define-external}} will perform appropriate adjustments
     87automatically, but if you invoke {{C_callback}} manually, you should
     88perform a {{C_callback_adjust_stack}} to make sure the internal limits
     89are set properly. {{ptr}} should point to some data object on the
     90stack and {{size}} is the number of words contained in the data object
     91(or some estimate). The call will make sure the limits are adjusted so
     92that the value pointed to by {{ptr}} is located in the stack.
    9293
    9394Previous: [[Embedding]]
  • chicken/branches/release/manual/Data representation

    r5945 r7276  
    3131C_SCHEME_END_OF_FILE}}
    3232
    33 Collectively, bits 1 and 2 are known as the ''immediate mark bits''.  When bit 1 is set, the object is a fixnum, as described above.  When bit 2 is set, it is an immediate object other than a fixnum.  If neither is set, the object is non-immediate, as described below.  (By definition, bits 1 and 2 may not both be set.)
     33Collectively, bits 1 and 2 are known as the ''immediate mark bits''.  When bit 1 is set, the object is a fixnum, as described above, and bit 2 is part of its value.  When bit 1 is clear but bit 2 is set, it is an immediate object other than a fixnum.  If neither bit 1 nor bit 2 is set, the object is non-immediate, as described below.
    3434
    3535=== Non-immediate objects
  • chicken/branches/release/manual/Declarations

    r5945 r7276  
    7171
    7272
    73 === compress-literals
    74 
    75  [declaration specifier] (compress-literals [THRESHOLD [INITIALIZER]])
    76 
    77 The same as the {{-compress-literals}} compiler option.
    78 The threshold argument defaults to 50. If the optional argument {{INITIALIZER}}
    79 is given, then the literals will not be created at module startup,
    80 but when the procedure with this name will be called.
    81 
    8273=== constant
    8374
  • chicken/branches/release/manual/Deviations from the standard

    r5945 r7276  
    33== Deviations from the standard
    44
    5 * Identifiers are by default case-sensitive (see [[http://galinha.ucpel.tche.br:8080/Using%20the%20compiler#Compiler%20command%20line%20format|Compiler command line format]]).
     5Identifiers are by default case-sensitive (see
     6[[http://galinha.ucpel.tche.br:8080/Using%20the%20compiler#Compiler%20command%20line%20format|Compiler
     7command line format]]).
    68
    7 * [4.1.3] The maximal number of arguments that may be passed to a compiled procedure or macro is 120.  A macro-definition that has a single rest-parameter can have any number of arguments.  If the {{libffi}} library is available on this platform, and if it is installed, then CHICKEN can take advantage of this. See the [[http://chicken.wiki.br/chicken/README|README]] file for more details.
     9[4.1.3] The maximal number of arguments that may be passed to a
     10compiled procedure or macro is 120.  A macro-definition that has a
     11single rest-parameter can have any number of arguments.  If the
     12{{libffi}} library is available on this platform, and if it is
     13installed, then CHICKEN can take advantage of this. See the
     14[[http://chicken.wiki.br/chicken/README|README]] file for more
     15details.
    816
    9 * [4.2.2] {{letrec}} does evaluate the initial values for the bound variables sequentially and not in parallel, that is:
     17[4.2.2] {{letrec}} does evaluate the initial values for the bound
     18variables sequentially and not in parallel, that is:
    1019
    1120  (letrec ((x 1) (y 2)) (cons x y))
     
    2635      (cons x y) ) )
    2736
    28 * [4.3] {{syntax-rules}} macros are not provided but available separately.
     37[4.3] {{syntax-rules}} macros are not provided but available
     38separately.
    2939
    30 * [6.1] {{equal?}} compares all structured data recursively, while R5RS specifies that {{eqv?}} is used for data other than pairs, strings and vectors.
     40[6.1] {{equal?}} compares all structured data recursively, while R5RS
     41specifies that {{eqv?}} is used for data other than pairs, strings and
     42vectors.
    3143
    32 * [6.2.4]  The runtime system uses the numerical string-conversion routines of the underlying C library and so does only understand standard (C-library) syntax for floating-point constants.
     44[6.2.4] The runtime system uses the numerical string-conversion
     45routines of the underlying C library and so does only understand
     46standard (C-library) syntax for floating-point constants.
    3347
    34 * [6.2.5] There is no built-in support for rationals, complex numbers or extended-precision integers (bignums). The routines {{complex?}}, {{real?}} and {{rational?}} are identical to the standard procedure {{number?}}. The procedures {{numerator}}, {{denominator}}, {{rationalize}}, {{make-rectangular}} and {{make-polar}} are not implemented. Fixnums are limited to ±2<nowiki><sup>30</sup></nowiki> (or ±2<nowiki><sup>62</sup></nowiki> on 64-bit hardware).  Support for extended numbers is available as a separate package, provided the GNU multiprecision library is installed.
     48[6.2.5] There is no built-in support for rationals, complex numbers or
     49extended-precision integers (bignums). The routines {{complex?}},
     50{{real?}} and {{rational?}} are identical to the standard procedure
     51{{number?}}. The procedures {{numerator}}, {{denominator}},
     52{{rationalize}}, {{make-rectangular}} and {{make-polar}} are not
     53implemented. Fixnums are limited to ±2<nowiki><sup>30</sup></nowiki>
     54(or ±2<nowiki><sup>62</sup></nowiki> on 64-bit hardware).  Support for
     55extended numbers is available as a separate package, provided the GNU
     56multiprecision library is installed.
    3557
    36 * [6.2.6] The procedure {{string->number}} does not obey read/write invariance on inexact numbers.
     58[6.2.6] The procedure {{string->number}} does not obey read/write
     59invariance on inexact numbers.
    3760
    38 * [6.4] The maximum number of values that can be passed to continuations captured using {{call-with-current-continuation}} is 120.
     61[6.4] The maximum number of values that can be passed to continuations
     62captured using {{call-with-current-continuation}} is 120.
    3963
    40 * [6.5] Code evaluated in {{scheme-report-environment}} or {{null-environment}} still sees non-standard syntax.
     64[6.5] Code evaluated in {{scheme-report-environment}} or
     65{{null-environment}} still sees non-standard syntax.
    4166
    42 * [6.6.2] The procedure {{char-ready?}} always returns {{#t}} for terminal ports.  The procedure {{read}} does not obey read/write invariance on inexact numbers.
     67[6.6.2] The procedure {{char-ready?}} always returns {{#t}} for
     68terminal ports.  The procedure {{read}} does not obey read/write
     69invariance on inexact numbers.
    4370
    44 * [6.6.3] The procedures {{write}} and {{display}} do not obey read/write invariance to inexact numbers.
     71[6.6.3] The procedures {{write}} and {{display}} do not obey
     72read/write invariance to inexact numbers.
    4573
    46 * [6.6.4] The {{transcript-on}} and {{transcript-off}} procedures are not implemented.
     74[6.6.4] The {{transcript-on}} and {{transcript-off}} procedures are
     75not implemented.
    4776
    4877Previous: [[Supported language]]
  • chicken/branches/release/manual/Extensions to the standard

    r5945 r7276  
    66{{| ... |}}.
    77
    8 [2.3] The brackets {{[ ... ]}} are provided as an alternative syntax
    9 for {{( ... )}}.  A number of reader extensions is provided. See
    10 [[Non-standard read syntax]].
     8[2.3] The brackets {{[ ... ]}} and the braces {{ { ... } }} are
     9provided as an alternative syntax for {{( ... )}}.  A number of reader
     10extensions is provided. See [[Non-standard read syntax]].
    1111
    1212[4] Numerous non-standard macros are provided. See
     
    3131* Required-parameters are bound to successive arguments starting with the first argument. It shall be an error if there are fewer arguments than required-parameters.
    3232* Next, the optional-parameters are bound with the remaining arguments. If there are fewer arguments than optional-parameters, then the remaining optional-parameters are bound to the result of the evaluation of their corresponding <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
    33 * If there is a rest-parameter, then it is bound to a list containing all the remaining arguments left over after the argument bindings with required-parameters and optional-parameters have been made. These remaining arguments are also eligible to be bound to keyword-parameters, in which case the argument will be a member of both the rest-parameter list and the keyword-parameter. If there is no rest-parameter and there are no matching keyword-parameters, then it shall be an error for there to be any remaining arguments left unbound.
    34 * If {{#!key}} was specified in the parameter-list, there shall be an even number of remaining arguments. These are interpreted as a series of pairs, where the first member of each pair is a keyword specifying the parameter name, and the second member is the corresponding value. It shall be an error if the first member of an argument pair is not a keyword, unless there is a rest-parameter. If the same keyword occurs more than once in the list of arguments, then the corresponding value of the first keyword is the binding value. If there is no argument for a particular keyword-parameter, then the variable is bound to the result of evaluating <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
     33* If there is a rest-parameter, then it is bound to a list containing all the remaining arguments left over after the argument bindings with required-parameters and optional-parameters have been made.
     34* If {{#!key}} was specified in the parameter-list, there should be an even number of remaining arguments. These are interpreted as a series of pairs, where the first member of each pair is a keyword specifying the parameter name, and the second member is the corresponding value. If the same keyword occurs more than once in the list of arguments, then the corresponding value of the first keyword is the binding value. If there is no argument for a particular keyword-parameter, then the variable is bound to the result of evaluating <initializer>, if one was specified, otherwise {{#f}}. The corresponding <initializer> is evaluated in an environment in which all previous parameters have been bound.
     35
     36Needing a special mention is the close relationship between the rest-parameter and possible keyword-parameters.  Declaring a rest-parameter binds up all remaining arguments in a list, as described above. These same remaining arguments are also used for attempted matches with declared keyword-parameters, as described above, in which case a matching keyword-parameter binds to the corresponding value argument at the same time that both the keyword and value arguments are added to the rest parameter list.
     37Note that for efficiency reasons, the keyword-parameter matching does nothing more than simply attempt to match with pairs that may exist in the remaining arguments.  Extra arguments that don't match are simply unused and forgotten if no rest-parameter has been declared.  Because of this, the caller of a procedure containing one or more keyword-parameters cannot rely on any kind of system error to report wrong keywords being passed in.
    3538
    3639It shall be an error for an {{<ident>}} to appear more than once in a parameter-list.
    3740
    38 Keyword arguments are internally handled as rest-parameters with subsequent processing
    39 of the argument list. Extra arguments (for example by specifying keyword arguments
    40 but no rest argument) are not checked and simply ignored.
     41If there is no rest-parameter and no keyword-parameters in the parameter-list, then it shall be an error for any extra arguments to be passed to the procedure.
     42
    4143
    4244Example:
     
    155157{{#:append}}.
    156158
     159[6.7] The {{exit}} procedure exits a program right away and does ''not'' invoke pending {{dynamic-wind}} thunks.
     160
    157161Previous: [[Deviations from the standard]]
    158162
  • chicken/branches/release/manual/Foreign type specifiers

    r5945 r7276  
    1212
    1313As argument: any value ({{#f}} is false, anything else is true).
    14 As result: anything different from 0 and the {{NULL}}-pointer
    15 is {{#t}}.
     14
     15As result: anything different from 0 and the {{NULL}} pointer is {{#t}}.
    1616
    1717=== byte unsigned-byte
     
    4848=== number
    4949
    50 A floating-point number. Similar to {{double}}, but when used as a result
    51 type, then either an exact integer or a floating-point number is returned, depending
     50A floating-point number. Similar to {{double}}, but when used as a result type,
     51then either an exact integer or a floating-point number is returned, depending
    5252on whether the result fits into an exact integer or not.
    5353
     
    5555
    5656A symbol, which will be passed to foreign code as a zero-terminated string.
     57
    5758When declared as the result of foreign code, the result should be a string and
    5859a symbol with the same name will be interned in the symbol table (and returned
     
    6162=== scheme-pointer
    6263
    63 An untyped pointer to the contents of a non-immediate Scheme object
    64 (not allowed as return type).  The value {{#f}} is also allowed
    65 and is passed as a {{NULL}} pointer.
    66 Don't confuse this type with {{(pointer ...)}} which means something
     64An untyped pointer to the contents of a non-immediate Scheme object (not
     65allowed as return type). The value {{#f}} is also allowed and is passed as a
     66{{NULL}} pointer.
     67
     68Don't confuse this type with {{(c-pointer ...)}} which means something
    6769different (a machine-pointer object).
    6870
    6971=== nonnull-scheme-pointer
    7072
    71 As {{pointer}}, but guaranteed not to be {{#f}}.
    72 Don't confuse this type with {{(nonnull-pointer ...)}} which means something
     73As {{scheme-pointer}}, but guaranteed not to be {{#f}}.
     74
     75Don't confuse this type with {{(nonnull-c-pointer ...)}} which means something
    7376different (a machine-pointer object).
    7477
    7578=== c-pointer
    7679
    77 An untyped operating-system pointer or a locative.  The value {{#f}} is also
    78 allowed and is passed as a {{NULL}} pointer.  If uses as the type of
     80An untyped operating-system pointer or a locative. The value {{#f}} is also
     81allowed and is passed as a {{NULL}} pointer. If uses as the type of
    7982a return value, a {{NULL}} pointer will be returned as {{#f}}.
    8083
     
    8386As {{c-pointer}}, but guaranteed not to be {{#f/NULL}}.
    8487
    85 === [nonnull-] blob
    86 
    87 A blob object, passed as a pointer to its contents. Arguments
    88 of type {{blob}} may optionally be {{#f}}, which is
    89 passed as a NULL pointer.  This is not allowed as a return type.
    90 
    91 === [nonnull-] u8vector [nonnull-] u16vector [nonnull-] u32vector [nonnull-] s8vector [nonnull-] s16vector [nonnull-] s32vector [nonnull-] f32vector [nonnull-] f64vector
    92 
    93 A SRFI-4 number-vector object, passed as a pointer to its
    94 contents. These type specifiers are not allowed
    95 as return types.
     88=== blob
     89
     90A blob object, passed as a pointer to its contents. Arguments of type {{blob}}
     91may optionally be {{#f}}, which is passed as a NULL pointer.
     92
     93This is not allowed as a return type.
     94
     95=== nonnull-blob
     96
     97As {{blob}}, but guaranteed not to be {{#f}}.
     98
     99=== u8vector u16vector u32vector s8vector s16vector s32vector f32vector f64vector
     100
     101A SRFI-4 number-vector object, passed as a pointer to its contents.
     102
     103These type specifiers are not allowed as return types.
     104
     105=== nonnull-u8vector nonnull-u16vector nonnull-u32vector nonnull-s8vector nonnull-s16vector nonnull-s32vector nonnull-f32vector nonnull-f64vector
     106
     107As {{u8vector ...}}, but guaranteed not to be {{#f}}.
    96108
    97109=== c-string
    98110
    99 A C string (zero-terminated). The value {{#f}}
    100 is also allowed and is passed as a {{NULL}} pointer. If uses as
    101 the type of a return value, a {{NULL}} pointer will be returned as
    102 {{#f}}. Note that the string is copied (with a zero-byte appended)
    103 when passed as an argument to a foreign function. Also a return value
     111A C string (zero-terminated). The value {{#f}} is also allowed and is passed as
     112a {{NULL}} pointer. If uses as the type of a return value, a {{NULL}} pointer
     113will be returned as {{#f}}. Note that the string is copied (with a zero-byte
     114appended) when passed as an argument to a foreign function. Also a return value
    104115of this type is copied into garbage collected memory.
    105116
     
    110121=== [nonnull-] c-string*
    111122
    112 Similar to {{[nonnull-]c-string}}, but if used as a result-type,
    113 the pointer returned by the foreign code will be freed (using the
    114 C-libraries {{free(1)}})
    115 after copying. This type specifier is not valid as a result type
    116 for callbacks defined with {{define-external}}.
     123Similar to {{[nonnull-] c-string}}, but if used as a result-type, the pointer
     124returned by the foreign code will be freed (using the C-libraries {{free(1)}})
     125after copying. This type specifier is not valid as a result type for callbacks
     126defined with {{define-external}}.
    117127
    118128=== [nonnull-] unsigned-c-string[*]
     
    122132=== c-string-list
    123133
    124 Expects a pointer to a list of C strings teminated by a {{NULL}} pointer
    125 and returns a list of strings. Only valid as a result type of non-callback
    126 functions.
     134Expects a pointer to a list of C strings teminated by a {{NULL}} pointer and
     135returns a list of strings.
     136
     137Only valid as a result type of non-callback functions.
    127138
    128139=== c-string-list*
     
    133144=== void
    134145
    135 Specifies an undefined return value. Not allowed as argument type.
     146Specifies an undefined return value.
     147
     148Not allowed as argument type.
    136149
    137150=== (const TYPE)
     
    143156An enumeration type. Handled internally as an {{integer}}.
    144157
    145 === (pointer TYPE) (c-pointer TYPE)
     158=== (c-pointer TYPE)
    146159
    147160An operating-system pointer or a locative to an object of {{TYPE}}.
    148161
    149 === (nonnull-pointer TYPE) (nonnull-c-pointer TYPE)
    150 
    151 As {{(pointer TYPE)}}, but guaranteed not to be {{#f/NULL}}.
     162=== (nonnull-c-pointer TYPE)
     163
     164As {{(c-pointer TYPE)}}, but guaranteed not to be {{#f/NULL}}.
    152165
    153166=== (ref TYPE)
     
    158171=== (struct NAME)
    159172
    160 A struct of the name {{NAME}}, which should be a string. Structs
    161 can not be directly passed as arguments to foreign function, neither
     173A struct of the name {{NAME}}, which should be a string.
     174
     175Structs cannot be directly passed as arguments to foreign function, neither
    162176can they be result values. Pointers to structs are allowed, though.
    163177
    164178=== (template TYPE ARGTYPE ...)
    165179
    166 A C++ template type. For example {{vector<int>}} would be specified
    167 as {{(template "vector" int)}}. Template types can not be directly passed
    168 as arguments or returned as results.
     180A C++ template type. For example {{vector<int>}} would be specified as
     181{{(template "vector" int)}}.
     182
     183Template types cannot be directly passed as arguments or returned as results.
    169184
    170185=== (union NAME)
    171186
    172 A union of the name {{NAME}}, which should be a string. Unions can
    173 not be directly passed as arguments to foreign function, neither can
     187A union of the name {{NAME}}, which should be a string.
     188
     189Unions cannot be directly passed as arguments to foreign function, neither can
    174190they be result values. Pointers to unions are allowed, though.
    175191
    176192=== (instance CNAME SCHEMECLASS)
    177193
    178 A pointer to a C++ class instance. {{CNAME}} should designate
    179 the name of the C++ class, and {{SCHEMECLASS}} should be the class
    180 that wraps the instance pointer. Normally {{SCHEMECLASS}}
    181 should be a subclass of {{<c++-object>}}.
     194A pointer to a C++ class instance. {{CNAME}} should designate the name of the
     195C++ class, and {{SCHEMECLASS}} should be the class that wraps the instance
     196pointer. Normally {{SCHEMECLASS}} should be a subclass of {{<c++-object>}}.
    182197
    183198=== (instance-ref CNAME SCHEMECLASS)
     
    187202=== (function RESULTTYPE (ARGUMENTTYPE1 ... [...]) [CALLCONV])
    188203
    189 A function pointer. {{CALLCONV}} specifies an optional calling
    190 convention and should be a string. The meaning of this string is entirely
    191 platform dependent.  The value {{#f}} is also allowed and is passed
    192 as a {{NULL}} pointer.
     204A function pointer. {{CALLCONV}} specifies an optional calling convention and
     205should be a string. The meaning of this string is entirely platform dependent.
     206The value {{#f}} is also allowed and is passed as a {{NULL}} pointer.
    193207
    194208=== Mappings
     
    215229</td></tr><tr><td>number</td><td>
    216230double
    217 </td></tr><tr><td>[nonnull-]pointer</td><td>
    218 void *
    219231</td></tr><tr><td>[nonnull-]c-pointer</td><td>
    220232void *
     
    247259</td></tr><tr><td>void</td><td>
    248260void
    249 </td></tr><tr><td>([nonnull-]pointer TYPE)</td><td>
     261</td></tr><tr><td>([nonnull-]c-pointer TYPE)</td><td>
    250262TYPE *
    251263</td></tr><tr><td>(enum NAME)</td><td>
  • chicken/branches/release/manual/Locations

    r5945 r7276  
    5050<enscript highlight=scheme>
    5151(define-external foo int)
    52 ((foreign-lambda* void (((pointer int) ip)) "*ip = 123;")
     52((foreign-lambda* void (((c-pointer int) ip)) "*ip = 123;")
    5353  (location foo))
    5454foo                                                                               ==> 123
     
    6464
    6565(define modf
    66   (foreign-lambda double "modf" double (pointer double)) )
     66  (foreign-lambda double "modf" double (c-pointer double)) )
    6767
    6868(let-location ([i double])
  • chicken/branches/release/manual/Non-standard macros and special forms

    r5945 r7276  
    55== Non-standard macros and special forms
    66
    7 === Making extra libraries and extensions availablee
     7=== Making extra libraries and extensions available
    88
    99==== require-extension
     
    1212 [syntax] (use ID ...)
    1313
    14 This form does all necessary steps to make the libraries or extensions given
    15 in {{ID ...}} available. It loads syntactic extension, if needed and generates
     14This form does all the necessary steps to make the libraries or extensions given
     15in {{ID ...}} available. It loads syntactic extensions, if needed and generates
    1616code for loading/linking with core library modules or separately installed
    1717extensions. {{use}} is just a shorter alias for {{require-extension}}.
    18 This implementation of {{require-extension}} is compliant to [[http://srfi.schemers.org/srfi-55/srfi-55.html|SRFI-55]]
     18This implementation of {{require-extension}} is compliant with [[http://srfi.schemers.org/srfi-55/srfi-55.html|SRFI-55]]
    1919(see the [[http://srfi.schemers.org/srfi-55/srfi-55.html|SRFI-55]] document for more information).
    2020
     
    2424* If {{ID}} names a built-in feature {{chicken srfi-0 srfi-2 srfi-6 srfi-8 srfi-9 srfi-10 srfi-17 srfi-23 srfi-30 srfi-39 srfi-55}}, then nothing is done.
    2525* If {{ID}} names one of the syntactic extensions {{chicken-more-macros chicken-ffi-macros}}, then this extension will be loaded.
    26 * {{ID}} names one of the core library units shipped with CHICKEN, then a {{(load-library 'ID)}} will be performed.
    27 * {{ID}} names an installed extension with the {{syntax}} or {{require-at-runtime}} attribute, then the equivalent of {{(require-for-syntax 'ID)}} is performed, probably followed by {{(require ...)}} for any run-time requirements.
    28 * Otherwise {{(require-extension ID)}} is equivalent to {{(require 'ID)}}.
    29 
    30 During compilation one of the following happens instead:
     26* If {{ID}} names one of the core library units shipped with CHICKEN, then a {{(load-library 'ID)}} will be performed.
     27* If {{ID}} names an installed extension with the {{syntax}} or {{require-at-runtime}} attribute, then the equivalent of {{(require-for-syntax 'ID)}} is performed, probably followed by {{(require ...)}} for any run-time requirements.
     28* Otherwise, {{(require-extension ID)}} is equivalent to {{(require 'ID)}}.
     29
     30During compilation, one of the following happens instead:
    3131
    3232* If {{ID}} names a built-in feature {{chicken srfi-0 srfi-2 srfi-6 srfi-8 srfi-9 srfi-10 srfi-17 srfi-23 srfi-30 srfi-39 srfi-55}}, then nothing is done.
    3333* If {{ID}} names one of the syntactic extensions {{chicken-more-macros chicken-ffi-macros}}, then this extension will be loaded at compile-time, making the syntactic extensions available in compiled code.
    34 * If {{ID}} names one of the core library units shipped with CHICKEN, or if the option {{-uses ID}} has been passed to the compiler then a {{(declare (uses ID))}} is generated.
     34* If {{ID}} names one of the core library units shipped with CHICKEN, or if the option {{-uses ID}} has been passed to the compiler, then a {{(declare (uses ID))}} is generated.
    3535* If {{ID}} names an installed extension with the {{syntax}} or {{require-at-runtime}} attribute, then the equivalent of {{(require-for-syntax 'ID)}} is performed, and code is emitted to {{(require ...)}} any needed run-time requirements.
    3636* Otherwise {{(require-extension ID)}} is equivalent to {{(require 'ID)}}.
     
    483483The following feature-identifiers are available in all situations: {{(machine-byte-order)}}, {{(machine-type)}}, {{(software-type)}}, {{(software-version)}}, where the actual feature-identifier is platform dependent.
    484484
    485 In addition the following feature-identifiers may exist: {{applyhook}}, {{extraslot}}, {{ptables}}, {{dload}}, {{libffi}}.
     485In addition the following feature-identifiers may exist: {{applyhook}}, {{extraslot}}, {{ptables}}, {{dload}}.
    486486
    487487For further information, see the documentation for [[http://srfi.schemers.org/srfi-0/srfi-0.html|SRFI-0]].
  • chicken/branches/release/manual/The User's Manual

    r5945 r7276  
    33== The User's Manual
    44
    5 ''(This document describes version 2.702)''
     5''(This document describes version 2.739)''
    66
    77'''CHICKEN is a compiler that translates Scheme source files into C''', which in
  • chicken/branches/release/manual/Unit eval

    r5945 r7276  
    166166; [parameter] repository-path :
    167167Contains a string naming the path to the extension repository, which defaults to
    168 either the value of the environment variable {{CHICKEN_REPOSITORY}}, the value
    169 of the environment variable {{CHICKEN_HOME}} or the default library path
     168either the value of the environment variable {{CHICKEN_REPOSITORY}}
     169or the default library path
    170170(usually {{/usr/local/lib/chicken}} on UNIX systems).
    171171
     
    205205from one of the following locations:
    206206
    207 * the current include path, which defaults to the pathnames given in {{CHICKEN_INCLUDE_PATH}} and {{CHICKEN_HOME}}.
     207* the current include path, which defaults to the pathnames given in {{CHICKEN_INCLUDE_PATH}}.
    208208* the current directory
    209209
     
    249249
    250250Returns a string given the installation directory (usually {{/usr/local/share/chicken}} on UNIX-like systems).
    251 If the environment variable {{CHICKEN_HOME}} is set, then its value will be returned. As a last option,
     251As a last option,
    252252if the environment variable {{CHICKEN_PREFIX}} is set, then {{chicken-home}} will return
    253253{{$CHICKEN_PREFIX/share}}.
  • chicken/branches/release/manual/Unit extras

    r5945 r7276  
    177177
    178178 [procedure] (fprintf PORT FORMATSTRING ARG ...)
    179  [procedure] (printf FORMATSTRING ARG)
     179 [procedure] (printf FORMATSTRING ARG ...)
    180180 [procedure] (sprintf FORMATSTRING ARG ...)
    181181
    182182Simple formatted output to a given port ({{fprintf}}), the
    183 value of {{(current-output-port)}} ({{printf}}) or a string
     183value of {{(current-output-port)}} ({{printf}}), or a string
    184184({{sprintf}}).  The {{FORMATSTRING}} can contain any sequence
    185 of characters. The character `~' prefixes special formatting directives:
     185of characters.  There must be at least as many {{ARG}} arguments given as there are format directives that require an argument in {{FORMATSTRING}}.  Extra {{ARG}} arguments are ignored.  The character `~' prefixes special formatting directives:
    186186
    187187<table>
     
    476476Line-input and -output. {{PORT}} defaults to the value of
    477477{{(current-input-port)}} and {{(current-output-port)}},
    478 respectively. if the optional argument {{LIMIT}} is given and
     478respectively. If the optional argument {{LIMIT}} is given and
    479479not {{#f}}, then {{read-line}} reads at most {{LIMIT}}
    480 characters per line.
     480characters per line. {{read-line}} returns a string without the terminating newline and {{write-line}} adds a terminating newline  before outputting.
    481481
    482482
  • chicken/branches/release/manual/Unit library

    r5945 r7276  
    44== Unit library
    55
    6 This unit contains basic Scheme definitions. This unit is used by default, unless the program
    7 is compiled with the {{-explicit-use}} option.
     6This unit contains basic Scheme definitions. This unit is used by default,
     7unless the program is compiled with the {{-explicit-use}} option.
    88
    99=== Arithmetic
     
    1919==== Binary integer operations
    2020
    21 Binary integer operations. {{arithmetic-shift}} shifts the argument
    22 {{N1}} by {{N2}} bits to the left. If {{N2}} is negative, than {{N1}}
    23 is shifted to the right.  These operations only accept exact integers
    24 or inexact integers in word range (32 bit signed on 32-bit platforms,
    25 or 64 bit signed on 64-bit platforms).
     21Binary integer operations. {{arithmetic-shift}} shifts the argument {{N1}} by
     22{{N2}} bits to the left. If {{N2}} is negative, than {{N1}} is shifted to the
     23right. These operations only accept exact integers or inexact integers in word
     24range (32 bit signed on 32-bit platforms, or 64 bit signed on 64-bit
     25platforms).
    2626
    2727; [procedure] (bitwise-and N1 ...)
     
    3535 [procedure] (bit-set? N INDEX)
    3636
    37 Returns {{#t}} if the bit at the position {{INDEX}} in the integer {{N}} is set,
    38 or {{#f}} otherwise. The rightmost/least-significant bit is bit 0.
     37Returns {{#t}} if the bit at the position {{INDEX}} in the integer {{N}} is
     38set, or {{#f}} otherwise. The rightmost/least-significant bit is bit 0.
    3939
    4040
     
    4747==== Arithmetic fixnum operations
    4848
    49 These procedures do not check their arguments, so non-fixnum
    50 parameters will result in incorrect results. {{fxneg}} negates its
    51 argument.
     49These procedures do not check their arguments, so non-fixnum parameters will
     50result in incorrect results. {{fxneg}} negates its argument.
    5251
    5352On division by zero, {{fx/}} and {{fxmod}} signal a condition of kind
     
    8180
    8281In safe mode, these procedures throw a type error with non-float
    83 arguments (except {{flonum?}}, which returns {{#f}}).  In unsafe mode,
    84 these procedures do not check their arguments.  A non-flonum argument
     82arguments (except {{flonum?}}, which returns {{#f}}). In unsafe mode,
     83these procedures do not check their arguments. A non-flonum argument
    8584in unsafe mode can crash the system.
    8685
     
    104103 [procedure] (signum N)
    105104
    106 Returns {{1}} if {{N}} is positive, {{-1}} if {{N}} 
     105Returns {{1}} if {{N}} is positive, {{-1}} if {{N}}
    107106is negative or {{0}} if {{N}} is zero. {{signum}} is exactness preserving.
    108107
     
    122121 [procedure] (current-output-port [PORT])
    123122
    124 Returns default output port.  If {{PORT}} is given, then that port is selected as the new current output port.
    125 
    126 Note that the default output port is not buffered.
    127 Use [[Unit posix#Setting the file buffering mode|{{set-buffering-mode!}}]] if you need a different behaviour.
     123Returns default output port. If {{PORT}} is given, then that port is selected
     124as the new current output port.
     125
     126Note that the default output port is not buffered. Use [[Unit posix#Setting the
     127file buffering mode|{{set-buffering-mode!}}]] if you need a different behavior.
    128128
    129129==== current-error-port
     
    131131 [procedure] (current-error-port [PORT])
    132132
    133 Returns default error output port. If {{PORT}} is given, then that
    134 port is selected as the new current error output port.
    135 
    136 Note that the default error output port is not buffered.
    137 Use [[Unit posix#Setting the file buffering mode|{{set-buffering-mode!}}]] if you need a different behaviour.
     133Returns default error output port. If {{PORT}} is given, then that port is
     134selected as the new current error output port.
     135
     136Note that the default error output port is not buffered. Use [[Unit
     137posix#Setting the file buffering mode|{{set-buffering-mode!}}]] if you need a
     138different behavior.
    138139
    139140==== flush-output
     
    149150 [procedure] (port-name [PORT])
    150151
    151 Fetch filename from {{PORT}}. This returns the filename that was
    152 used to open this file.  Returns a special tag string, enclosed into
    153 parentheses for non-file ports. {{PORT}} defaults to the value of {{(current-input-port)}}.
     152Fetch filename from {{PORT}}. This returns the filename that was used to open
     153this file. Returns a special tag string, enclosed into parentheses for
     154non-file ports. {{PORT}} defaults to the value of {{(current-input-port)}}.
    154155
    155156
     
    158159 [procedure] (port-position [PORT])
    159160
    160 Returns the current position of {{PORT}} as two values: row and
    161 column number.  If the port does not support such an operation an error
    162 is signaled. This procedure is currently only available for input ports.
    163 {{PORT}} defaults to the value of {{(current-input-port)}}.
     161Returns the current position of {{PORT}} as two values: row and column number.
     162If the port does not support such an operation an error is signaled. This
     163procedure is currently only available for input ports. {{PORT}} defaults to the
     164value of {{(current-input-port)}}.
    164165
    165166
     
    172173
    173174
    174 
    175 
    176175=== Files
    177 
    178 
    179 
    180176
    181177==== delete-file
     
    203199
    204200
    205 
    206 
    207201=== String ports
    208 
    209 
    210 
    211202
    212203==== get-output-string
     
    239230
    240231CHICKEN maintains a global list of ''features'' naming functionality available
    241 int the current system. Additionally the {{cond-expand}} form accesses this
     232in the current system. Additionally the {{cond-expand}} form accesses this
    242233feature list to infer what features are provided. Predefined features are
    243234{{chicken}}, and the SRFIs (Scheme Request For Implementation) provided by the
     
    288279
    289280Keywords are special symbols prefixed with {{#:}} that evaluate
    290 to themselves.  Procedures can use keywords to accept optional named
    291 parameters in addition to normal required parameters.  Assignment to
     281to themselves. Procedures can use keywords to accept optional named
     282parameters in addition to normal required parameters. Assignment to
    292283and bindings of keyword symbols is not allowed.
    293284The parameter {{keyword-style}} and the compiler/interpreter option
     
    302293
    303294Returns the argument from {{ARGLIST}} specified under the keyword
    304 {{KEYWORD}}.  If the keyword is not found, then the zero-argument
     295{{KEYWORD}}. If the keyword is not found, then the zero-argument
    305296procedure {{THUNK}} is invoked and the result value is returned. If
    306297{{THUNK}} is not given, {{#f}} is returned.
     
    344335
    345336
    346 CHICKEN implements the (currently withdrawn) [[http://srfi.schemers.org/srfi-12/srfi-12.html|SRFI-12]]
    347 exception system. For more information, see the [[http://srfi.schemers.org/srfi-12/srfi-12.html|SRFI-12]]
    348 document.
     337CHICKEN implements the (currently withdrawn)
     338[[http://srfi.schemers.org/srfi-12/srfi-12.html|SRFI-12]] exception system. For
     339more information, see the
     340[[http://srfi.schemers.org/srfi-12/srfi-12.html|SRFI-12]] document.
    349341
    350342
     
    361353</enscript>
    362354
    363 If provided, {{VARIABLE}} will be bound to the signalled exception
     355If provided, {{VARIABLE}} will be bound to the signaled exception
    364356object. {{BODY ...}} is executed when the exception is a property-
    365357or composite condition with the kinds given {{KIND ...}} (unevaluated).
    366 If no clause applies, the exception is re-signalled in the same dynamic
     358If no clause applies, the exception is re-signaled in the same dynamic
    367359context as the {{condition-case}} form.
    368360
     
    388380 [procedure] (breakpoint [NAME])
    389381
    390 Programmatically triggers a breakpoint (similar to the {{,br}} top-level csi command).
    391 
    392 
    393 
    394 All error-conditions signalled by the system are of kind {{exn}}.
     382Programmatically triggers a breakpoint (similar to the {{,br}} top-level csi
     383command).
     384
     385All error-conditions signaled by the system are of kind {{exn}}.
    395386The following composite conditions are additionally defined:
    396387
     
    399390<tr><td> (exn arity)
    400391
    401 Signalled when a procedure is called with the wrong number of arguments.
     392Signaled when a procedure is called with the wrong number of arguments.
    402393
    403394</td></tr><tr><td> (exn type)
    404395
    405 Signalled on type-mismatch errors, for example when an argument of the wrong
    406 type is passed to a builtin procedure.
     396Signaled on type-mismatch errors, for example when an argument of the wrong
     397type is passed to a built-in procedure.
    407398
    408399</td></tr><tr><td> (exn arithmetic)
    409400
    410 Signalled on arithmetic errors, like division by zero.
     401Signaled on arithmetic errors, like division by zero.
    411402
    412403</td></tr><tr><td> (exn i/o)
    413404
    414 Signalled on input/output errors.
     405Signaled on input/output errors.
    415406
    416407</td></tr><tr><td> (exn i/o file)
    417408
    418 Signalled on file-related errors.
     409Signaled on file-related errors.
    419410
    420411</td></tr><tr><td> (exn i/o net)
    421412
    422 Signalled on network errors.
     413Signaled on network errors.
    423414
    424415</td></tr><tr><td> (exn bounds)
    425416
    426 Signalled on errors caused by accessing non-existent elements of a collection.
     417Signaled on errors caused by accessing non-existent elements of a collection.
    427418
    428419</td></tr><tr><td> (exn runtime)
    429420
    430 Signalled on low-level runtime-system error-situations.
     421Signaled on low-level runtime-system error-situations.
    431422
    432423</td></tr><tr><td> (exn runtime limit)
    433424
    434 Signalled when an internal limit is exceeded (like running out of memory).
     425Signaled when an internal limit is exceeded (like running out of memory).
    435426
    436427</td></tr><tr><td> (exn match)
    437428
    438 Signalled on errors raised by failed matches (see the section on {{match}}).
     429Signaled on errors raised by failed matches (see the section on {{match}}).
    439430
    440431</td></tr><tr><td> (exn syntax)
    441432
    442 Signalled on syntax errors.
     433Signaled on syntax errors.
    443434
    444435</td></tr><tr><td> (exn breakpoint)
    445436
    446 Signalled when a breakpoint is reached.
     437Signaled when a breakpoint is reached.
    447438
    448439</td></tr>
     
    454445* All error-exceptions (of the kind {{exn}}) are non-continuable.
    455446
    456 * Error-exceptions of the {{exn}} kind have additional {{arguments}} and {{location}} properties that contain the arguments passed to the exception-handler and the name of the procedure where the error occurred (if available).
    457 
    458 * When the {{posix}} unit is available and used, then a user-interrupt ({{signal/int}}) signals an exception of the kind {{user-interrupt}}.
    459 
    460 * the procedure {{condition-property-accessor}} accepts an optional third argument. If the condition does not have a value for the desired property and if the optional argument is given, no error is signalled and the accessor returns the third argument.
    461 
    462 * In composite conditionss all properties are currently collected in a single property-list, so in the case that to conditions have the same named property, only one will be visible.
     447* Error-exceptions of the {{exn}} kind have additional {{arguments}} and
     448{{location}} properties that contain the arguments passed to the
     449exception-handler and the name of the procedure where the error occurred (if
     450available).
     451
     452* When the {{posix}} unit is available and used, then a user-interrupt
     453({{signal/int}}) signals an exception of the kind {{user-interrupt}}.
     454
     455* the procedure {{condition-property-accessor}} accepts an optional third
     456argument. If the condition does not have a value for the desired property and
     457if the optional argument is given, no error is signaled and the accessor
     458returns the third argument.
     459
     460* In composite conditions all properties are currently collected in a single
     461property-list, so in the case that to conditions have the same named property,
     462only one will be visible.
    463463
    464464
     
    475475the list is a string containing the name of the executing program. The
    476476other items are the arguments passed to the application. This list is
    477 freshly created on every invocation of {{(argv)}}.  It depends on
     477freshly created on every invocation of {{(argv)}}. It depends on
    478478the host-shell whether arguments are expanded ('globbed') or not.
    479479
     
    486486(Invokes {{exit-handler}}).
    487487
    488 
     488Note that pending {{dynamic-wind}} thunks are ''not'' invoked when exiting your program in this way.
    489489==== build-platform
    490490
     
    530530 [procedure] (machine-byte-order)
    531531
    532 Returns the symbol {{little-endian}} or {{big-endian}}, depending on the machine's byte-order.
     532Returns the symbol {{little-endian}} or {{big-endian}}, depending on the
     533machine's byte-order.
    533534
    534535
     
    557558 [procedure] (on-exit THUNK)
    558559
    559 Schedules the zero-argument procexdures {{THUNK}} to be executed before
    560 the process exits, either explicitly via {{exit}} or implicitly after exection
    561 of the last toplevel form. Note that finalizers for unreferenced finalized
     560Schedules the zero-argument procedures {{THUNK}} to be executed before
     561the process exits, either explicitly via {{exit}} or implicitly after execution
     562of the last top-level form. Note that finalizers for unreferenced finalized
    562563data are run before exit procedures.
    563564
     
    600601 [procedure] (c-runtime)
    601602
    602 Returns a symbol that designates what kind of C runtime library has been linked with this version of the Chicken
    603 libraries. Possible return values are {{static}}, {{dynamic}} or {{unknown}}. On systems not compiled
    604 with the Microsoft C compiler, {{c-runtime}} always returns {{unknown}}.
     603Returns a symbol that designates what kind of C runtime library has been linked
     604with this version of the Chicken libraries. Possible return values are
     605{{static}}, {{dynamic}} or {{unknown}}. On systems not compiled with the
     606Microsoft C compiler, {{c-runtime}} always returns {{unknown}}.
    605607
    606608
     
    676678Prints error message, writes all extra arguments to the
    677679value of {{(current-error-port)}} and invokes the
    678 current exception-handler.  This conforms to
     680current exception-handler. This conforms to
    679681[[http://srfi.schemers.org/srfi-23/srfi-23.html|SRFI-23]].
    680682If {{LOCATION}} is given and a symbol, it specifies the ''location'' (the name
     
    690692is only generated in code compiled without {{-no-trace}} and evaluated code.
    691693If the optional argument {{START}} is given, the backtrace starts
    692 at this offset, i.e. when {{START}} is 1, the next to last trace-entry 
     694at this offset, i.e. when {{START}} is 1, the next to last trace-entry
    693695is printed, and so on. If the optional argument {{THREAD}} is given, then
    694696the call-chain will only be constructed for calls performed by this thread.
     
    755757 [procedure] (gc [FLAG])
    756758
    757 Invokes a garbage-collection and returns the number of free bytes
    758 in the heap. The flag specifies whether a minor ({{#f}}) or
    759 major ({{#t}}) GC is to be triggered. If no argument is given,
    760 {{#t}} is assumed. An explicit {{#t}} argument will cause all pending finalizers to be executed.
     759Invokes a garbage-collection and returns the number of free bytes in the heap.
     760The flag specifies whether a minor ({{#f}}) or major ({{#t}}) GC is to be
     761triggered. If no argument is given, {{#t}} is assumed. An explicit {{#t}}
     762argument will cause all pending finalizers to be executed.
     763
    761764==== memory-statistics
    762765
    763766 [procedure] (memory-statistics)
    764767
    765 Performs a major garbage collection and returns a three element vector 
     768Performs a major garbage collection and returns a three element vector
    766769containing the total heap size in bytes, the number of bytes currently
    767770used and the size of the nursery (the first heap generation). Note
     
    776779Registers a procedure of one argument {{PROC}}, that will be
    777780called as soon as the non-immediate data object {{X}} is about to
    778 be garbage-collected (with that object as its argument).  Note that
     781be garbage-collected (with that object as its argument). Note that
    779782the finalizer will '''not''' be called while interrupts are disabled.
    780783This procedure returns {{X}}.
     
    798801
    799802
    800 ==== andmap
    801 
    802  [procedure] (andmap PROC LIST1 ...)
    803 
    804 Repeatedly calls {{PROC}} with arguments taken from {{LIST1 ...}}. 
    805 If any invocation should return {{#f}}, the result of
    806 {{andmap}} is {{#f}}. If all invocations return a true result,
    807 then the result of {{andmap}} is {{#t}}.
    808 
    809 
    810 ==== ormap
    811 
    812  [procedure] (ormap PROC LIST1 ...)
    813 
    814 Repeatedly calls {{PROC}} with arguments taken from {{LIST1 ...}}. 
    815 If any invocation should return a value different from
    816 {{#f}}, then this value is returned as the  result of
    817 {{ormap}}. If all invocations return '''#f''',
    818 then the result of {{ormap}} is {{#f}}.
    819 
    820 
    821803==== promise?
    822804
     
    835817 [procedure] (reverse-list->string LIST)
    836818
    837 Returns a string with the characters in {{LIST}} in reverse order. This is equivalent to
    838 {{(list->string (reverse LIST))}}, but much more efficient.
     819Returns a string with the characters in {{LIST}} in reverse order. This is
     820equivalent to {{(list->string (reverse LIST))}}, but much more efficient.
    839821
    840822
    841823
    842824=== Generating uninterned symbols
    843 
    844 
    845825
    846826==== gensym
     
    860840
    861841
    862 
    863 
    864842=== Standard Input/Output
    865843
     
    878856Outputs the optional arguments {{EXP1 ...}} using {{display}} and
    879857writes a newline character to the port that is the value of
    880 {{(current-output-port)}}.  Returns its first argument, or
    881 {{(void)}} when no supplied arguments.
     858{{(current-output-port)}}. Returns {{(void)}}.
    882859
    883860
     
    887864
    888865Similar to {{print}}, but does not output a terminating newline
    889 character and performs a {{flush-outout}} after writing its arguments.
     866character and performs a {{flush-output}} after writing its arguments.
    890867
    891868
     
    893870
    894871=== User-defined named characters
    895 
    896 
    897872
    898873==== char-name
     
    904879If {{SYMBOL-OR-CHAR}} is a symbol, then {{char-name}} returns
    905880the character with this name, or {{#f}} if no character is defined
    906 under this name.  If {{SYMBOL-OR-CHAR}} is a character, then the
     881under this name. If {{SYMBOL-OR-CHAR}} is a character, then the
    907882name of the character is returned as a symbol, or {{#f}} if the
    908883character has no associated name.
     
    910885If the optional argument {{CHAR}} is provided, then
    911886{{SYMBOL-OR-CHAR}} should be a symbol that will be the new name of
    912 the given character.  If multiple names designate the same character,
     887the given character. If multiple names designate the same character,
    913888then the {{write}} will use the character name that was defined last.
    914889
     
    925900
    926901
    927 
    928 
    929902=== Blobs
    930903
     
    936909 [procedure] (make-blob SIZE)
    937910
    938 Returns a blob object of {{SIZE}} bytes,
    939 aligned on an 8-byte boundry,
    940 un-initialized.
     911Returns a blob object of {{SIZE}} bytes, aligned on an 8-byte boundary,
     912uninitialized.
    941913
    942914==== blob?
     
    967939
    968940
    969 
    970 
    971941=== Vectors
    972 
    973 
    974942
    975943==== vector-copy!
     
    989957 [procedure] (vector-resize VECTOR N [INIT])
    990958
    991 Creates and returns a new vector with the contents of {{VECTOR}} and length {{N}}.
    992 If {{N}} is greater than the original length of {{VECTOR}}, then all additional
    993 items are initialized to {{INIT}}. If {{INIT}} is not specified, the
     959Creates and returns a new vector with the contents of {{VECTOR}} and length
     960{{N}}. If {{N}} is greater than the original length of {{VECTOR}}, then all
     961additional items are initialized to {{INIT}}. If {{INIT}} is not specified, the
    994962contents are initialized to some unspecified value.
    995963
    996964
    997965
    998 
    999 
    1000966=== The unspecified value
    1001967
    1002 
    1003 
    1004968==== void
    1005969
     
    1010974
    1011975
    1012 
    1013 
    1014976=== Continuations
    1015977
    1016 
    1017 
    1018978==== call/cc
    1019979
     
    1027987 [procedure] (continuation-capture PROCEDURE)
    1028988
    1029 Creates a continuation object representing the current continuation and tail-calls
    1030 {{PROCEDURE}} with this continuation as the single argument.
     989Creates a continuation object representing the current continuation and
     990tail-calls {{PROCEDURE}} with this continuation as the single argument.
    1031991
    1032992More information about this continuation API can be found in the paper
    1033 [[http://repository.readscheme.org/ftp/papers/sw2001/feeley.pdf]] ''A Better API for first class
    1034 Continuations'' by Marc Feeley.
     993[[http://repository.readscheme.org/ftp/papers/sw2001/feeley.pdf]] ''A Better
     994API for first class Continuations'' by Marc Feeley.
    1035995
    1036996
     
    1039999 [procedure] (continuation? X)
    10401000
    1041 Returns {{#t}} if {{X}} is a continuation object, or {{#f}} otherwise.
     1001Returns {{#t}} if {{X}} is a continuation object, or {{#f}} otherwise. Please
     1002note that this applies only to continuations created by the Continuation API,
     1003but not by call/cc, i.e.: {{(call-with-current-continuation continuation?)}}
     1004returns {{#f}}, whereas {{(continuation-capture continuation?)}} returns
     1005{{#t}}.
    10421006
    10431007
     
    10681032=== Setters
    10691033
    1070 SRFI-17 is fully implemented. For more information see: [[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]].
     1034SRFI-17 is fully implemented. For more information see:
     1035[[http://srfi.schemers.org/srfi-17/srfi-17.html|SRFI-17]].
    10711036
    10721037==== setter
     
    10741039 [procedure] (setter PROCEDURE)
    10751040
    1076 Returns the setter-procedure of {{PROCEDURE}}, or signals an error if {{PROCEDURE}}
    1077 has no associated setter-procedure.
    1078 
    1079 Note that {{(set! (setter PROC) ...)}} for a procedure that has no associated setter procedure
    1080 yet is a very slow operation (the old procedure is replaced by a modified copy, which involves a
    1081 garbage collection).
     1041Returns the setter-procedure of {{PROCEDURE}}, or signals an error if
     1042{{PROCEDURE}} has no associated setter-procedure.
     1043
     1044Note that {{(set! (setter PROC) ...)}} for a procedure that has no associated
     1045setter procedure yet is a very slow operation (the old procedure is replaced by
     1046a modified copy, which involves a garbage collection).
    10821047
    10831048
     
    10861051 [procedure] (getter-with-setter GETTER SETTER)
    10871052
    1088 Returns a copy of the procedure {{GETTER}} with the associated setter procedure {{SETTER}}.
    1089 Contrary to the SRFI specification, the setter of the returned procedure may be changed.
     1053Returns a copy of the procedure {{GETTER}} with the associated setter procedure
     1054{{SETTER}}. Contrary to the SRFI specification, the setter of the returned
     1055procedure may be changed.
     1056
    10901057
    10911058
    10921059=== Reader extensions
    1093 
    1094 
    10951060
    10961061==== define-reader-ctor
     
    11061071 [procedure] (set-read-syntax! CHAR-OR-SYMBOL PROC)
    11071072
    1108 When the reader is encounting the non-whitespace character {{CHAR}} while reading
     1073When the reader encounters the non-whitespace character {{CHAR}} while reading
    11091074an expression from a given port, then the procedure {{PROC}} will be called with
    11101075that port as its argument. The procedure should return a value that will be returned
     
    11661131
    11671132
     1133=== Property lists
     1134
     1135As in other Lisp dialects, CHICKEN supports "property lists" associated with symbols.
     1136Properties are accessible via a key that can be any kind of value but which will
     1137be compared using {{eq?}}.
     1138
     1139==== get
     1140
     1141  [procedure] (get SYMBOL PROPERTY [DEFAULT])
     1142
     1143Returns the value stored under the key {{PROPERTY}} in the property
     1144list of {{SYMBOL}}. If no such property is stored, returns
     1145{{DEFAULT}}. The {{DEFAULT}} is optional and defaults to {{#f}}.
     1146
     1147==== put!
     1148
     1149  [procedure] (put! SYMBOL PROPERTY VALUE)
     1150  [setter] (set! (get SYMBOL PROPERTY) VALUE)
     1151
     1152Stores {{VALUE}} under the key {{PROPERTY}} in the property list of
     1153{{SYMBOL}} replacing any previously stored value.
     1154
     1155==== remprop!
     1156
     1157  [procedure] (remprop! SYMBOL PROPERTY)
     1158
     1159Deletes the first property matching the key {{PROPERTY}} in the property list
     1160of {{SYMBOL}}. Returns {{#t}} when a deletion performed, and {{#f}} otherwise.
     1161
     1162==== symbol-plist
     1163
     1164  [procedure] (symbol-plist SYMBOL)
     1165  [setter] (set! (symbol-plist SYMBOL) LST)
     1166
     1167Returns the property list of {{SYMBOL}} or sets it.
     1168
     1169==== get-properties
     1170
     1171  [procedure] (get-properties SYMBOL PROPERTIES)
     1172
     1173Searches the property list of {{SYMBOL}} for the first property with a key in
     1174the list {{PROPERTIES}}. Returns 3 values: the matching property key, value,
     1175and the tail of property list after the matching property. When no match found
     1176all values are {{#f}}.
     1177
     1178{{PROPERTIES}} may also be an atom, in which case it is treated as a list of
     1179one element.
     1180
    11681181
    11691182Previous: [[Parameters]]
  • chicken/branches/release/manual/Unit posix

    r5945 r7276  
    1212All errors related to failing file-operations will signal a condition
    1313of kind {{(exn i/o file)}}.
     14
     15
     16=== Constants
     17
     18==== File-control Commands
     19
     20===== fcntl/dupfd
     21===== fcntl/getfd
     22===== fcntl/setfd
     23===== fcntl/getfl
     24===== fcntl/setfl
     25
     26==== Standard I/O file-descriptors
     27
     28===== fileno/stdin
     29===== fileno/stdout
     30===== fileno/stderr
     31
     32==== Open flags
     33
     34===== open/rdonly
     35===== open/wronly
     36===== open/rdwr
     37===== open/read
     38===== open/write
     39===== open/creat
     40===== open/append
     41===== open/excl
     42===== open/noctty
     43===== open/nonblock
     44===== open/trunc
     45===== open/sync
     46===== open/fsync
     47===== open/binary
     48===== open/text
     49
     50==== Permission bits
     51
     52===== perm/irusr
     53===== perm/iwusr
     54===== perm/ixusr
     55===== perm/irgrp
     56===== perm/iwgrp
     57===== perm/ixgrp
     58===== perm/iroth
     59===== perm/iwoth
     60===== perm/ixoth
     61===== perm/irwxu
     62===== perm/irwxg
     63===== perm/irwxo
     64===== perm/isvtx
     65===== perm/isuid
     66===== perm/isgid
     67
    1468
    1569=== Directories
     
    141195
    142196<enscript highlight=scheme>
    143 (with-output-to-pipe 
     197(with-output-to-pipe
    144198  "gs -dNOPAUSE -sDEVICE=jpeg -dBATCH -sOutputFile=signballs.jpg -g600x600 -q -"
    145199  (lambda ()
     
    207261together).  The optional {{MODE}} should be a bitmask composed of one
    208262or more permission values like {{perm/irusr}} and is only relevant
    209 when a new file is created. The default mode is 
     263when a new file is created. The default mode is
    210264{{perm/irwxu | perm/irgrp | perm/iroth}}.
    211265
     
    268322==== file-control
    269323
    270  [procedure] (file-control FILENO COMMAND  [ARGUMENT])
     324 [procedure] (file-control FILENO COMMAND [ARGUMENT])
    271325
    272326Performs the fcntl operation {{COMMAND}} with the given
    273327{{FILENO}} and optional {{ARGUMENT}}. The return value is
    274328meaningful depending on the {{COMMAND}}.
    275 
    276 ==== fcntl/dupfd
    277 ==== fcntl/getfd
    278 ==== fcntl/setfd
    279 ==== fcntl/getfl
    280 ==== fcntl/setfl
    281 
    282 These variables contain commands for {{file-control}}.
    283 
    284 ==== fileno/stdin
    285 ==== fileno/stdout
    286 ==== fileno/stderr
    287 
    288 These variables contain file-descriptors for the standard I/O files.
    289 
    290 ==== open/rdonly
    291 ==== open/wronly
    292 ==== open/rdwr
    293 ==== open/read
    294 ==== open/write
    295 ==== open/creat
    296 ==== open/append
    297 ==== open/excl
    298 ==== open/noctty
    299 ==== open/nonblock
    300 ==== open/trunc
    301 ==== open/sync
    302 ==== open/fsync
    303 ==== open/binary
    304 ==== open/text
    305 
    306 Flags for use with {{file-open}}.
    307329
    308330==== open-input-file*
     
    354376not {{#f}}, then the file-statistics vector will be resolved for
    355377symbolic links (otherwise symbolic links are not resolved).
     378Note that for very large files, the {{file-size}} value may be an
     379inexact integer.
    356380
    357381==== file-position
     
    368392Returns the size of the file designated by {{FILE}}.  {{FILE}}
    369393may be a filename or a file-descriptor.  If the file does not exist,
    370 an error is signaled.
     394an error is signaled. Note that for very large files, {{file-size}} may
     395return an inexact integer.
    371396
    372397==== regular-file?
     
    375400
    376401Returns true, if {{FILENAME}} names a regular file (not a directory or symbolic link).
     402
     403==== file-owner
     404
     405 [procedure] (file-owner FILE)
     406
     407Returns the user-id of {{FILE}}.  {{FILE}} may be a filename
     408or a file-descriptor.
     409
     410==== file-permissions
     411
     412 [procedure] (file-permissions FILE)
     413
     414Returns the permission bits for {{FILE}}. You can test this value
     415by performing bitwise operations on the result and the {{perm/...}}
     416values.  {{FILE}} may be a filename or a file-descriptor.
     417
     418==== file-read-access?
     419==== file-write-access?
     420==== file-execute-access?
     421
     422 [procedure] (file-read-access? FILENAME)
     423 [procedure] (file-write-access? FILENAME)
     424 [procedure] (file-execute-access? FILENAME)
     425
     426These procedures return {{#t}} if the current user has read,
     427write or execute permissions on the file named {{FILENAME}}.
    377428
    378429
     
    402453Exceptions: {{(exn bounds)}}, {{(exn i/o file)}}
    403454
     455==== change-file-mode
     456
     457 [procedure] (change-file-mode FILENAME MODE)
     458
     459Changes the current file mode of the file named {{FILENAME}}
     460to {{MODE}} using the {{chmod()}} system call.  The
     461{{perm/...}} variables contain the various permission bits and can
     462be combinded with the {{bitwise-ior}} procedure.
     463
     464==== change-file-owner
     465
     466 [procedure] (change-file-owner FILENAME UID GID)
     467
     468Changes the owner information of the file named {{FILENAME}} to
     469the user- and group-ids {{UID}} and {{GID}} (which should be
     470exact integers) using the {{chown()}} system call.
     471
    404472
    405473=== Processes
     
    416484
    417485Returns the process ID of the parent of the current process.
     486
     487==== process-group-id
     488
     489 [procedure] (process-group-id PID)
     490
     491Returns the process group ID of the process specified by {{PID}}.
    418492
    419493==== process-execute
     
    512586if a signal occurred.
    513587
     588==== create-session
     589
     590 [procedure] (create-session)
     591
     592Creates a new session if the calling process is not a process group leader and returns
     593the session ID.
     594
    514595
    515596=== Hard and symbolic links
     
    541622
    542623
    543 === Permissions
    544 
    545 ==== file-owner
    546 
    547  [procedure] (file-owner FILE)
    548 
    549 Returns the user-id of {{FILE}}.  {{FILE}} may be a filename
    550 or a file-descriptor.
    551 
    552 ==== file-permissions
    553 
    554  [procedure] (file-permissions FILE)
    555 
    556 Returns the permission bits for {{FILE}}. You can test this value
    557 by performing bitwise operations on the result and the {{perm/...}}
    558 values.  {{FILE}} may be a filename or a file-descriptor.
    559 
    560 ==== file-read-access?
    561 ==== file-write-access?
    562 ==== file-execute-access?
    563 
    564  [procedure] (file-read-access? FILENAME)
    565  [procedure] (file-write-access? FILENAME)
    566  [procedure] (file-execute-access? FILENAME)
    567 
    568 These procedures return {{#t}} if the current user has read,
    569 write or execute permissions on the file named {{FILENAME}}.
    570 
    571 ==== change-file-mode
    572 
    573  [procedure] (change-file-mode FILENAME MODE)
    574 
    575 Changes the current file mode of the file named {{FILENAME}}
    576 to {{MODE}} using the {{chmod()}} system call.  The
    577 {{perm/...}} variables contain the various permission bits and can
    578 be combinded with the {{bitwise-ior}} procedure.
    579 
    580 ==== change-file-owner
    581 
    582  [procedure] (change-file-owner FILENAME UID GID)
    583 
    584 Changes the owner information of the file named {{FILENAME}} to
    585 the user- and group-ids {{UID}} and {{GID}} (which should be
    586 exact integers) using the {{chown()}} system call.
     624=== Retrieving user & group information
    587625
    588626==== current-user-id
    589 ==== current-group-id
    590 ==== current-effective-user-id
    591 ==== current-effective-group-id
    592627
    593628 [procedure] (current-user-id)
    594629 [setter] (set! (current-user-id) UID)
     630
     631Get or set the real user-id of the current process.
     632
     633==== current-effective-user-id
     634
     635 [procedure] (current-effective-user-id)
     636 [setter] (set! (current-effective-user-id) UID)
     637
     638Get or set the effective user-id of the current process.
     639
     640==== user-information
     641
     642 [procedure] (user-information USER [AS-VECTOR])
     643
     644If {{USER}} specifes a valid username (as a string) or user ID, then the user
     645database is consulted and a list of 7 values are returned: the user-name, the
     646encrypted password, the user ID, the group ID, a user-specific string, the home
     647directory and the default shell. When {{AS-VECTOR}} is {{#t}} a vector of 7
     648elements is returned instead of a list. If no user with this name or id then
     649{{#f}} is returned.
     650
     651==== current-group-id
     652
    595653 [procedure] (current-group-id)
    596654 [setter] (set! (current-group-id) GID)
    597  [procedure] (current-effective-user-id)
    598  [setter] (set! (current-effective-user-id) UID)
     655
     656Get or set the real group-id of the current process.
     657
     658==== current-effective-group-id
     659
    599660 [procedure] (current-effective-group-id)
    600661 [setter] (set! (current-effective-group-id) GID)
    601662
    602 Get or set the real/effective user- and group-ids of the current process.
    603 
    604 ==== process-group-id
    605 
    606  [procedure] (process-group-id PID)
    607 
    608 Returns the process group ID of the process specified by {{PID}}.
     663Get or set the effective group-id of the current process.
     664ID can be found, then {{#f}} is returned.
    609665
    610666==== group-information
     
    623679Returns a list with the supplementary group IDs of the current user.
    624680
     681
     682=== Changing user & group information
     683
    625684==== set-groups!
    626685
     
    635694 [procedure] (initialize-groups USERNAME BASEGID)
    636695
    637 Sets the supplementrary group IDs of the current user to the IDs from the user with name {{USERNAME}} 
     696Sets the supplementrary group IDs of the current user to the IDs from the user with name {{USERNAME}}
    638697(a string), including {{BASEGID}}.
    639698
    640699Only the superuser may invoke this procedure.
    641 
    642 ==== perm/irusr
    643 ==== perm/iwusr
    644 ==== perm/ixusr
    645 ==== perm/irgrp
    646 ==== perm/iwgrp
    647 ==== perm/ixgrp
    648 ==== perm/iroth
    649 ==== perm/iwoth
    650 ==== perm/ixoth
    651 ==== perm/irwxu
    652 ==== perm/irwxg
    653 ==== perm/irwxo
    654 ==== perm/isvtx
    655 ==== perm/isuid
    656 ==== perm/isgid
    657 
    658 These variables contain permission bits as used in {{change-file-mode}}.
    659700
    660701==== set-process-group-id!
     
    664705
    665706Sets the process group ID of the process specifed by {{PID}} to {{PGID}}.
    666 
    667 ==== user-information
    668 
    669  [procedure] (user-information USER)
    670 
    671 If {{USER}} specifes a valid username (as a string) or user ID, then
    672 the user database is consulted and a list of 7 values are returned: the user-name,
    673 the encrypted password, the user ID, the group ID, a user-specific string,
    674 the home directory and the default shell. If no user with this name or
    675 ID can be found, then {{#f}} is returned.
    676 
    677 ==== create-session
    678 
    679  [procedure] (create-session)
    680 
    681 Creates a new session if the calling process is not a process group leader and returns
    682 the session ID.
    683707
    684708
     
    813837
    814838Returns a association list of the environment variables and their
    815 current values. 
     839current values.
    816840
    817841==== setenv
     
    9891013Recursively traverses the contents of {{DIRECTORY}} (which should
    9901014be a string) and invokes the procedure {{ACTION}} for all files
    991 for which the procedure {{PREDICATE}} is true.  {{PREDICATE}}
     1015in which the procedure {{PREDICATE}} is true.  {{PREDICATE}}
    9921016may me a procedure of one argument or a regular-expression string.
    9931017{{ACTION}} should be a procedure of two arguments: the currently
     
    9951019{{ACTION}}, or, if this is the first invocation, the value
    9961020of {{IDENTITY}}. {{ACTION}} defaults to {{cons}},
    997 {{IDENTITY}} defaults to {{()}}.  {{LIMIT}} should a
     1021{{IDENTITY}} defaults to {{()}}.  {{LIMIT}} should be a
    9981022procedure of one argument that is called for each nested directory
    9991023and which should return true, if that directory is to be traversed
    10001024recursively. {{LIMIT}} may also be an exact integer that
    1001 gives the maximum recursion depth. A depth of {{0}} means the
    1002 files in the specified directory are traversed but not any nested
    1003 directories. {{LIMIT}} may also be {{#f}} (the default),
     1025gives the maximum recursion depth. For example, a depth of {{0}} means that only files in the top-level, specified directory are to be traversed. In this case, all nested directories are ignored.  {{LIMIT}} may also be {{#f}} (the default),
    10041026which is equivalent to {{(constantly #t)}}.
    10051027
     
    12571279 process-group-id  set-process-group-id!
    12581280 create-symbolic-link  read-symbolic-link
    1259  file-truncate 
     1281 file-truncate
    12601282 file-lock  file-lock/blocking  file-unlock  file-test-lock
    12611283 create-fifo  fifo?
     
    12661288 terminal-port?  terminal-name
    12671289 process-fork  process-signal
    1268  parent-process-id 
     1290 parent-process-id
    12691291 set-root-directory!
    12701292 utc-time->seconds
     
    12851307
    12861308These variables contains special flags that specify the exact semantics of {{process-spawn}}:
    1287 {{spawn/overlay}} replaces the current process with the new one. 
    1288 {{spawn/wait}} suspends execution of the current process until the spawned process returns. 
     1309{{spawn/overlay}} replaces the current process with the new one.
     1310{{spawn/wait}} suspends execution of the current process until the spawned process returns.
    12891311{{spawn/nowait}} does the opposite ({{spawn/nowaito}} is identical, according to the Microsoft
    12901312documentation) and runs the process asynchronously.
  • chicken/branches/release/manual/Unit regex

    r5945 r7276  
    7171
    7272
     73=== regexp*
     74
     75 [procedure] (regexp* STRING [OPTIONS [TABLES]])
     76
     77Returns a precompiled regular expression object for {{string}}. The optional
     78argument {{OPTIONS}} must be a list of option symbols. The optional argument
     79{{TABLES}} must be a character definitions table (not defined here).
     80
     81
     82Option Symbols:
     83
     84; caseless : Character case insensitive match
     85; multiline : Equivalent to Perl's /m option
     86; dotall : Equivalent to Perl's /s option
     87; extended : Ignore whitespace
     88; anchored : Anchor pattern match
     89; dollar-endonly : `$' metacharacter in the pattern matches only at the end of the subject string
     90; extra : Currently of very little use
     91; notbol : First character of the string is not the beginning of a line
     92; noteol : End of the string is not the end of a line
     93; ungreedy : Inverts the "greediness" of the quantifiers so that they are not greedy by default
     94; notempty : The empty string is not considered to be a valid match
     95; utf8 : UTF-8 encoded characters
     96; no-auto-capture : Disables the use of numbered capturing parentheses
     97; no-utf8-check : Skip valid UTF-8 sequence check
     98; auto-callout : Automatically inserts callout items (not defined here)
     99; partial : Partial match ok
     100; firstline : An unanchored pattern is required to match before or at the first newline
     101; dupnames : Names used to identify capturing subpatterns need not be unique
     102; newline-cr : Newline definition is `\r'
     103; newline-lf : Newline definition is `\n'
     104; newline-crlf : Newline definition is `\r\n'
     105; newline-anycrlf : Newline definition is any of `\r', `\n', or `\r\n'
     106; newline-any : ewline definition is any Unicode newline sequence
     107; bsr-anycrlf : `\R' escape sequence matches only CR, LF, or CRLF
     108; bsr-unicode : `\R' escape sequence matches only Unicode newline sequence
     109
     110; dfa-shortest : Currently unused
     111; dfa-restart : Currently unused
     112
     113
    73114=== regexp?
    74115
     
    77118Returns {{#t}} if {{X}} is a precompiled regular expression,
    78119or {{#f}} otherwise.
     120
     121
     122=== regexp-optimize
     123
     124 [procedure] (regexp-optimize RX)
     125 
     126Perform available optimizations for the precompiled regular expression {{RX}}.
     127Returns {{#t}} when optimization performed, and {{#f}} otherwise.
    79128
    80129
     
    134183  => ("this" "is" "a" "string" "1," "2," "3,")
    135184
    136 (string-split-fields "," s #:suffix))
     185(string-split-fields "," s #:suffix)
    137186 
    138187  => ("this is a string 1" " 2" " 3")
     
    175224<enscript highlight=scheme>
    176225(string-substitute* "<h1>Hello, world!</h1>"
    177                     '(("<[/A-Za-z0-9]+>" . ""))))
     226                    '(("<[/A-Za-z0-9]+>" . "")))
    178227
    179228=>  "Hello, world!"
     
    194243
    195244
     245=== make-anchored-pattern
     246
     247 [procedure] (make-anchored-pattern REGEXP [WITHOUT-BOL [WITHOUT-EOL]])
     248
     249Makes an anchored pattern from {{REGEXP}} (a string or a precompiled regular
     250expression) and returns the updated pattern. When {{WITHOUT-BOL}} is {{#t}} the
     251beginning-of-line anchor is not added. When {{WITHOUT-EOL}} is {{#t}} the
     252end-of-line anchor is not added.
     253
     254The {{WITHOUT-BOL}} and {WITHOUT-EOL}} arguments are ignored for a precompiled regular
     255expression.
     256
     257
    196258Previous: [[Unit match]]
    197259
  • chicken/branches/release/manual/Unit srfi-18

    r5945 r7276  
    7070Readies the suspended thread {{THREAD}}.
    7171
     72=== thread-wait-for-i/o!
     73
     74 [procedure] (thread-wait-for-i/o! FD [MODE])
     75
     76Suspends the current thread until input ({{MODE}} is {{#:input}}), output ({{MODE}} is {{#:output}})
     77or both ({{MODE}} is {{#:all}}) is available. {{FD}} should be a file-descriptor (not a port!) open
     78for input or output, respectively.
     79
    7280=== time->milliseconds
    7381
  • chicken/branches/release/manual/Unit utils

    r5945 r7276  
    143143
    144144Calls {{PROCEDURE}} for each line read from {{PORT}} (which defaults to the
    145 value of {{(current-input-port)}}. The argument passed to {{PORCEDURE}}
     145value of {{(current-input-port)}}. The argument passed to {{PROCEDURE}}
    146146is a string with the contents of the line, excluding any line-terminators.
    147147When all input has been read from the port, {{for-each-line}} returns some unspecified value.
     
    230230===  Miscellaneous handy things
    231231
    232 ==== shift!
     232==== shift! DEPRECATED
    233233
    234234 [procedure] (shift! LIST [DEFAULT])
     
    245245The list must contain at least 2 elements.
    246246
    247 ==== unshift!
     247==== unshift! DEPRECATED
    248248
    249249 [procedure] (unshift! X PAIR)
  • chicken/branches/release/manual/Using the compiler

    r5945 r7276  
    3636
    3737; -check-syntax : Aborts compilation process after macro-expansion and syntax checks.
    38 
    39 ; -compress-literals THRESHOLD : Compiles quoted literals that exceed the size {{THRESHOLD}} as strings and parse the strings at run-time. This reduces the size of the code and speeds up compile-times of the host C compiler, but has a small run-time performance penalty. The size of a literal is computed by counting recursively the objects in the literal, so a vector counts as 1 plus the count of the elements, a pair counts as the counts of the car and the cdr, respectively. All other objects count 1.
    4038
    4139; -debug MODES : Enables one or more compiler debugging modes. {{MODES}} is a string of characters that select debugging information about the compiler that will be printed to standard output.
     
    124122; -import FILENAME : Read exports from linked or loaded libraries from given file. See also {{-check-imports}}. This is equivalent to declaring {{(declare (import FILENAME))}}. Implies {{-check-imports}}.
    125123
    126 ; -include-path PATHNAME : Specifies an additional search path for files included via the {{include}} special form. This option may be given multiple times. If the environment variable {{CHICKEN_INCLUDE_PATH}} is set, it should contain a list of alternative include pathnames separated by {{;}}. The environment variable {{CHICKEN_HOME}} is also considered as a search path.
     124; -include-path PATHNAME : Specifies an additional search path for files included via the {{include}} special form. This option may be given multiple times. If the environment variable {{CHICKEN_INCLUDE_PATH}} is set, it should contain a list of alternative include pathnames separated by {{;}}.
    127125
    128126; -inline : Enable procedure inlining for known procedures of a size below the threshold (which can be set through the {{-inline-limit}} option).
    129127
    130 ; -inline-limit THRESHOLD : Sets the maximum size of a potentially inlinable procedure. This option is only effective when inlining has been enabled with the {{-inline}} option. The default threshold is {{10}}.
     128; -inline-limit THRESHOLD : Sets the maximum size of a potentially inlinable procedure. The default threshold is {{10}}.
    131129
    132130; -keyword-style STYLE : Enables alternative keyword syntax, where {{STYLE}} may be either {{prefix}} (as in Common Lisp), {{suffix}} (as in DSSSL) or {{none}}. Any other value is ignored. The default is {{suffix}}.
     
    397395Linux or FreeBSD:
    398396
    399 Let's take a simple "Hello, world!":
     397Let's take a simple example.
    400398
    401399<enscript highlight=scheme>
     
    405403</enscript>
    406404
     405  % chicken hello.scm -optimize-level 3 -output-file hello.c
     406
    407407Compiled to C, we get {{hello.c}}. We need the files {{chicken.h}} and
    408 {{runtime.c}}, which contain the basic runtime system, plus the three basic library
    409 files {{library.c}}, {{eval.c}} and {{extras.c}} which contain the same functionality as the
    410 library linked into a plain CHICKEN-compiled application, or which is available by default in the
     408{{runtime.c}}, which contain the basic runtime system, plus the three
     409basic library files {{library.c}}, {{eval.c}} and {{extras.c}} which
     410contain the same functionality as the library linked into a plain
     411CHICKEN-compiled application, or which is available by default in the
    411412interpreter, {{csi}}:
    412413
    413  % csc hello.scm -O2 -d1
    414 
    415 A simple makefile is needed as well:
    416 
    417 <enscript highlight=makefile>
    418 # Makefile for UNIX systems
    419 
    420 hello: hello.o runtime.o library.o eval.o extras.o
    421        $(CC) -o hello hello.o runtime.o library.o eval.o extras.o -lm
    422 
    423 hello.o: chicken.h
    424 runtime.o: chicken.h
    425 library.o: chicken.h
    426 eval.o: chicken.h
    427 extras.o: chicken.h
    428 </enscript>
     414  % cd /tmp
     415  %echo '(print "Hello World.")' > hello.scm
     416  % cp $CHICKEN_BUILD/runtime.c .
     417  % cp $CHICKEN_BUILD/library.c .
     418  % cp $CHICKEN_BUILD/eval.c    .
     419  % cp $CHICKEN_BUILD/extras.c  .
     420  % gcc -static -Os -fomit-frame-pointer runtime.c library.c eval.c \
     421    extras.c hello.c -o hello -lm
    429422
    430423Now we have all files together, and can create an tarball containing all the files:
     
    433426 % gzip hello.tar
    434427
    435 This is of naturally rather simplistic. Things like enabling dynamic loading, estimating
     428This is naturally rather simplistic. Things like enabling dynamic loading, estimating
    436429the optimal stack-size and selecting supported features of the host system would need
    437430more configuration- and build-time support. All this can be addressed using more
  • chicken/branches/release/manual/Using the interpreter

    r5945 r7276  
    3232; -h  -help : Write a summary of the available command line options to standard output and exit.
    3333
    34 ; -I  -include-path PATHNAME : Specifies an alternative search-path for files included via the {{include}} special form. This option may be given multiple times. If the environment variable {{CHICKEN_INCLUDE_PATH}} is set, it should contain a list of alternative include pathnames separated by {{;}}. The environment variable {{CHICKEN_HOME}} is also considered as a search path.
     34; -I  -include-path PATHNAME : Specifies an alternative search-path for files included via the {{include}} special form. This option may be given multiple times. If the environment variable {{CHICKEN_INCLUDE_PATH}} is set, it should contain a list of alternative include pathnames separated by {{;}}.
    3535
    3636; -k  -keyword-style STYLE : Enables alternative keyword syntax, where {{STYLE}} may be either {{prefix}} (as in Common Lisp) or {{suffix}} (as in DSSSL). Any other value is ignored.
     
    4040; -w  -no-warnings : Disables any warnings that might be issued by the reader or evaluated code.
    4141
    42 ; -q  -quiet : Do not print a startup message.
     42; -q  -quiet : Do not print a startup message. Also disables generation of call-trace information for interpreted code.
    4343
    4444; -s  -script PATHNAME : This is equivalent to {{-batch -quiet -no-init PATHNAME}}. Arguments following {{PATHNAME}} are available by using  {{command-line-arguments}} and are not processed as interpreter options. Extra options in the environment variable {{CSI_OPTIONS}} are ignored.
     
    155155#;5> (fac 3)                        ==> 6
    156156</enscript>
     157k
    157158
    158159; ,utr SYMBOL ... : Disables tracing of the given toplevel procedures.
     
    203204
    204205 #;1> (define-record point x y)
    205  #;2> (set-describer! 'point (lambda (pt o) (print "a point with x=" (point-x pt) " and y=" (point-y pt))))
     206 #;2> (set-describer! 'point
     207        (lambda (pt o)
     208          (print "a point with x=" (point-x pt) " and y=" (point-y pt))))
    206209 #;3> ,d (make-point 1 2)
    207210 a point with x=1 and y=2
     
    220223 (use readline regex)
    221224 (current-input-port (make-gnu-readline-port))
    222  (gnu-history-install-file-manager (string-append (or (getenv "HOME") ".") "/.csi.history"))
     225 (gnu-history-install-file-manager
     226   (string-append (or (getenv "HOME") ".") "/.csi.history"))
    223227
    224228More details are available in [[http://www.call-with-current-continuation.org/eggs/readline.html|the egg's documentation]].
  • chicken/branches/release/manual/chicken-setup

    r5945 r7276  
    8181
    8282The optional argument {{INFOLIST}} should be an association list that
    83 maps symbols to values, this list will be stored as {{ID.setup}} at the same
     83maps symbols to values, this list will be stored as {{ID.setup-info}} at the same
    8484location as the extension code. Currently the following properties are used:
    8585
     
    118118
    119119Copies the given files into the examples directory, which is usually
    120 {{$prefix/share/chicken/examples}} (equivalent to {{$CHICKEN_HOME/examples}}
     120{{$prefix/share/chicken/examples}}
    121121or {{(make-pathname (chicken-home) "examples")}}).
    122122
     
    270270
    271271Holds the path where executables are installed and defaults to either {{$CHICKEN_PREFIX/bin}},
    272 if the environment variable {{CHICKEN_PREFIX}} is set, {{$CHICKEN_HOME}} or the
     272if the environment variable {{CHICKEN_PREFIX}} is set or the
    273273path where the CHICKEN binaries ({{chicken}}, {{csi}}, etc.) are installed.
    274274
     
    325325 [procedure] (cross-chicken)
    326326
    327 Retrusn {{#t}} if this system is configured for cross-compilation or {{#f}}
     327Returns {{#t}} if this system is configured for cross-compilation or {{#f}}
    328328otherwise.
     329
     330
     331==== host-extension
     332
     333 [parameter] host-extension
     334
     335For a cross-compiling CHICKEN, when compiling an extension, then it
     336should be built for the host environment (as opposed to the target
     337environment). This parameter is controlled by the {{-host-extension}} command-line
     338option. A setup script should perform the proper steps of compiling any
     339code by passing {{-host}} when invoking {{csc}} or using the {{compile}}
     340macro.
    329341
    330342
     
    515527; {{-r  -run FILENAME}} : Load and execute given file.
    516528; {{-s  -script FILENAME}} :Executes the given Scheme source file with all remaining arguments and exit. The ''she-bang'' shell script header is recognized, so you can write Scheme scripts that use {{chicken-setup}} just as with {{csi}}.
    517 ; {{-e  -eval EXPRESSION}} : Evaluates the given expression(s).
    518 ; {{-v  -verbose}} : Display additional debug information.
    519 ; {{-k  -keep}} : Keep temporary files and directories.
    520 ; {{-c  -csc-option OPTION}} : Passes {{OPTION}} as an extra argument to invocations of the compiler-driver ({{csc}}). This works only if {{csc}} is invoked as {{(run (csc ...))}}.
    521 ; {{-d  -dont-ask}} : Do not ask the user before trying to download required extensions.
    522 ; {{-n  -no-install}} : Do not install generated binaries and/or support files. Any invocations of {{install-program}}, {{install-extension}} or {{install-script}} will be be no-ops.
    523 ; {{-i  -docindex}} : Displays the path to the index-page of any installed extension-documentation. If the index page does not exist, it is created.
     529; {{-e  -eval EXPRESSION}} : Evaluates the given expression(s)
     530; {{-v  -verbose}} : Display additional debug information
     531; {{-k  -keep}} : Keep temporary files and directories
     532; {{-c  -csc-option OPTION}} : Passes {{OPTION}} as an extra argument to invocations of the compiler-driver ({{csc}}); this works only if {{csc}} is invoked as {{(run (csc ...))}}
     533; {{-d  -dont-ask}} : Do not ask the user before trying to download required extensions
     534; {{-n  -no-install}} : Do not install generated binaries and/or support files; any invocations of {{install-program}}, {{install-extension}} or {{install-script}} will be be no-ops
     535; {{-i  -docindex}} : Displays the path to the index-page of any installed extension-documentation; if the index page does not exist, it is created
    524536; {{-t  -test EXTENSION ...}} : return success if all given extensions are installed
    525537; {{-ls EXTENSION}} : List installed files for extension
    526538; {{-fetch-tree}} : Download and print the repository catalog
    527 ; {{-t  -test}} : If the extension sources contain a directory named {{tests}} and this directory includes a file named {{run.scm}} then this file is executed (with {{tests}} being the current working directory).
     539; {{-create-tree DIRECTORY}} : Create a fresh, minimal repository catalog and writes it to stdout
     540; {{-t  -test}} : If the extension sources contain a directory named {{tests}} and this directory includes a file named {{run.scm}} then this file is executed (with {{tests}} being the current working directory)
    528541; {{-tree FILENAME}} : Download and show the repository catalog
    529542; {{-svn URL}} : Fetch extension from [[http://subversion.tigris.org|Subversion]] repository
     
    531544; {{-local PATHNAME}} : Fetch extension from local file
    532545; {{-destdir PATHNAME}} : Specify alternative installation prefix (for packaging)
    533 ; {{--}} : Ignore all following arguments.
     546; {{-host-extension}} : Compile extension in "host" mode (sets the parameter {{host-extension}} to {{#f}})
     547; {{--}} : Ignore all following arguments
    534548
    535549Note that the options are processed exactly in the order in which they appear in the command-line.
     
    543557{{chicken-setup -fetch}}) and extract its contents with a separate
    544558program (like {{winzip}}). the {{CHICKEN_REPOSITORY}} environment
    545 variable has to be set (in addition to {{CHICKEN_HOME}}) to a
     559variable has to be set to a
    546560directory where your compiled extensions should be located.
    547561
  • chicken/branches/release/manual/faq

    r5945 r7276  
    9595
    9696There is an extension based on the GNU Multiprecision Package that implements most of the full
    97 numeric tower, see http://www.call-with-current-continuation.org/eggs/numbers.html.
     97numeric tower, see [[numbers]].
    9898
    9999
     
    488488
    489489Under CHICKENs implementation policy, tail recursion is achieved simply by avoiding
    490 to return from a function call. Since the programs is CPS converted, a continuous
     490to return from a function call. Since the programs are CPS converted, a continuous
    491491sequence of nested procedure calls is performed. At some stage the stack-space has
    492492to run out and the current procedure and its parameters (including the current
     
    535535
    536536<enscript highlight=scheme>
    537 ; The regex egg is required for ##csi#name-of-symbols-starting-with
    538 (require 'readline)
     537(require-extension readline)
    539538(current-input-port (make-gnu-readline-port))
    540539(gnu-history-install-file-manager (string-append (or (getenv "HOME") ".") "/.csi.history"))
Note: See TracChangeset for help on using the changeset viewer.