~ chicken-core (chicken-5) 52b28d56c9aed4e6d36aaf2b2f314c4c03aafb1b


commit 52b28d56c9aed4e6d36aaf2b2f314c4c03aafb1b
Author:     Christian Kellermann <ckeen@pestilenz.org>
AuthorDate: Tue Apr 24 22:02:30 2012 +0200
Commit:     felix <felix@call-with-current-continuation.org>
CommitDate: Fri Apr 27 23:00:12 2012 +0200

    Merge manual changes from the wiki
    
    Signed-off-by: felix <felix@call-with-current-continuation.org>

diff --git a/manual/Unit irregex b/manual/Unit irregex
index 155946cb..0548a354 100644
--- a/manual/Unit irregex	
+++ b/manual/Unit irregex	
@@ -347,7 +347,7 @@ exactly.
 
 <enscript highlight=scheme>
 (irregex-search "needle" "hayneedlehay") => #<match>
-</enscipt>
+</enscript>
 
 By default the match is case-sensitive, though you can control this
 either with the compiler flags or local overrides:
diff --git a/manual/Unit lolevel b/manual/Unit lolevel
index 494feabe..42236655 100644
--- a/manual/Unit lolevel	
+++ b/manual/Unit lolevel	
@@ -294,7 +294,7 @@ error is signalled.
 
 === Pointer vectors
 
-/Pointer-vectors/ are specialized and space-efficient vectors or
+''Pointer vectors'' are specialized and space-efficient vectors for
 foreign pointer objects. All procedures defined below that accept
 a pointer object allow {{#f}} as an alternative representation of
 the {{NULL}}-pointer.
@@ -539,9 +539,9 @@ Signals an error if any of the above constraints is violated.
 <procedure>(object-evict X [ALLOCATOR])</procedure>
 
 Copies the object {{X}} recursively into the memory pointed to by the foreign
-pointer object returned by {{ALLOCATOR}}, which should be a procedure of a
-single argument (the number of bytes to allocate). The freshly copied object is
-returned.
+pointer object returned by {{ALLOCATOR}}.  The freshly copied object is
+returned.  {{ALLOCATOR}} should be a procedure of a single argument
+(the number of bytes to allocate), and defaults to {{allocate}}.
 
 This facility allows moving arbitrary objects into static memory, but care
 should be taken when mutating evicted data: setting slots in evicted
@@ -549,7 +549,9 @@ vector-like objects to non-evicted data is not allowed. It '''is''' possible to
 set characters/bytes in evicted strings or byte-vectors, though.  It is
 advisable '''not''' to evict ports, because they might be mutated by certain
 file-operations.  {{object-evict}} is able to handle circular and shared
-structures, but evicted symbols are no longer unique: a fresh copy of the
+structures.
+
+Evicted symbols are no longer unique: a fresh copy of the
 symbol is created, so
 
 <enscript highlight=scheme>
@@ -561,8 +563,16 @@ y                              ==> foo
 (eq? (car z) (cadr z))         ==> #t
 </enscript>
 
-The {{ALLOCATOR}} defaults to {{allocate}}.
+This loss of uniqueness also implies that an evicted structure --
+such as one created with {{define-record}} -- cannot be operated on with
+the existing predicate or accessors, as internally a symbol is used to
+denote the type:
 
+<enscript highlight=scheme>
+(define-record point x y)
+(point? (make-point x y))                  ; => #t
+(point? (object-evict (make-point x y)))   ; => #f
+</enscript>
 
 ==== object-evict-to-location
 
diff --git a/manual/Unit posix b/manual/Unit posix
index 309f80bf..5376149c 100644
--- a/manual/Unit posix	
+++ b/manual/Unit posix	
@@ -106,6 +106,11 @@ then {{(current-directory DIR)}} is equivalent to {{(change-directory DIR)}}.
 Creates a directory with the pathname {{NAME}}.  If the {{PARENTS?}} argument
 is given and not false, any nonexistent parent directories are also created.
 
+Notice that if {{NAME}} exists, {{create-directory}} won't try to create it
+and will return {{NAME}} (i.e., it won't raise an error when given a {{NAME}}
+that already exists).
+
+
 ==== delete-directory
 
 <procedure>(delete-directory NAME [RECURSIVE])</procedure>
diff --git a/manual/Unit srfi-18 b/manual/Unit srfi-18
index 418b4e11..c35e32fd 100644
--- a/manual/Unit srfi-18	
+++ b/manual/Unit srfi-18	
@@ -80,6 +80,21 @@ Suspends the current thread until input ({{MODE}} is {{#:input}}), output ({{MOD
 or both ({{MODE}} is {{#:all}}) is available. {{FD}} should be a file-descriptor (not a port!) open
 for input or output, respectively.
 
+<procedure>(thread-state thread)</procedure><br>
+
+Returns information about the state of the {{thread}}. The possible results
+are:
+
+
+* '''symbol {{created}}''': the {{thread}} is in the created state 
+* '''symbol {{ready}}''': the {{thread}} is in the ready state 
+* '''symbol {{running}}''': the {{thread}} is in the running state 
+* '''symbol {{blocked}}''': the {{thread}} is in the blocked state 
+* '''symbol {{suspended}}''': the {{thread}} is in the suspended state 
+* '''symbol {{sleeping}}''': the {{thread}} is in the sleeping state 
+* '''symbol {{terminated}}''': the {{thread}} is in the terminated state 
+* '''symbol {{dead}}''': the {{thread}} is in the dead state 
+
 
 == SRFI-18 specification
 
diff --git a/manual/Unit srfi-69 b/manual/Unit srfi-69
index 79532dd6..c4b909ef 100644
--- a/manual/Unit srfi-69	
+++ b/manual/Unit srfi-69	
@@ -26,6 +26,9 @@ Returns a new {{HASH-TABLE}} with the supplied configuration.
 ; {{WEAK-KEYS}} : Use weak references for keys. (Ignored)
 ; {{WEAK-VALUES}} : Use weak references for values. (Ignored)
 
+Please note that hash tables are ''not'' guaranteed to compare {{equal?}}
+to each other, even if they contain exactly the same key/value pairs.
+
 
 ==== alist->hash-table
 
diff --git a/manual/Using the compiler b/manual/Using the compiler
index 924356e7..568a2623 100644
--- a/manual/Using the compiler	
+++ b/manual/Using the compiler	
@@ -145,8 +145,8 @@ the source text should be read from standard input.
 
 ; -raw : Disables the generation of any implicit code that uses the Scheme libraries (that is all runtime system files besides {{runtime.c}} and {{chicken.h}}).
 
-; -require-extension NAME : Loads the extension {{NAME}} before the compilation process commences. This is identical to adding {{(require-extension NAME)}} at the start of the compiled program. If {{-uses NAME}} is also given on the command line, then any occurrences of {{-require-extension NAME}} are replaced with {{(declare (uses NAME))}}. Multiple names may be given and should be separated by {{,}}.
- 
+; -require-extension NAME : Loads the extension {{NAME}} before the compilation process commences. This is identical to adding {{(require-extension NAME)}} at the start of the compiled program. If {{-uses NAME}} is also given on the command line, then any occurrences of {{-require-extension NAME}} are replaced with {{(declare (uses NAME))}}. Multiple names may be given and should be separated by commas.
+
 ; -setup-mode : When locating extension, search the current directory first. By default, extensions are located first in the ''extension repository'', where {{chicken-install}} stores compiled extensions and their associated metadata.
 
 ; -scrutinize : Enable simple flow-analysis to catch common type errors and argument/result mismatches. You can also use the {{scrutinize}} declaration to enable scrutiny.
diff --git a/manual/Using the interpreter b/manual/Using the interpreter
index 07ea51e3..e3c0d7ca 100644
--- a/manual/Using the interpreter	
+++ b/manual/Using the interpreter	
@@ -61,7 +61,7 @@ The options recognized by the interpreter are:
 
 ; -R  -require-extension NAME : Equivalent to evaluating {{(require-extension NAME)}}.
 
-; -version : Write the banner with version information to standard output and exit.
+; -v  -version : Write the banner with version information to standard output and exit.
 
 
 === Writing Scheme scripts
Trap