Changeset 10100 in project for chicken/branches/prerelease


Ignore:
Timestamp:
03/23/08 10:20:41 (12 years ago)
Author:
Ivan Raikov
Message:

Merged with trunk up to r9887 (dev snapshot 3.0.10).

Location:
chicken/branches/prerelease
Files:
14 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/prerelease/NEWS

    r9599 r10100  
    1 3.0.8
     13.0.10
    22
    33- svnrevision.sh - cleaned logic to prevent invalid error message
    44- csc - fixed bug preventing static linking of executables (build order issues)
     5- unit regex: PCRE 7.6
    56- unit regex: avoid string copy in regex matching [Jim Ursetto]
    67- chicken-setup: eggs are downloaded to and compiled in a temporary
     
    89  variables, or by -build-prefix and -download-dir options,
    910  respectively; -destdir option is replaced with -install-prefix.
    10 - unit regex: PCRE 7.6
    1111- unit tcp: use of offset into string rather than substring for faster
    1212  socket write [Jim Ursetto]
     
    1515- unit library: added "flonum-print-precision" for changing the default of
    1616  16
     17- unit posix: create-directory can now handle DOS drive letters
     18  in the given path
    1719- unit posix: added stat- predicates for file types
    1820- unit posix: added strftime format string support to "time->string"
  • chicken/branches/prerelease/README

    r9599 r10100  
    33  (c)2000-2008 Felix L. Winkelmann
    44
    5   version 3.0.8
     5  version 3.0.10
    66
    77 1. Introduction:
     
    278278          (`Makefile.mingw-msys' and `Makefile.mingw').
    279279
     280        - When installing under the mingw-msys platform, PREFIX must be an
     281          absolute path name (i.e. it must include the drive letter).
     282
    280283        - Cygwin will not be able to find the chicken shared libraries
    281284          until Windows is rebooted.
  • chicken/branches/prerelease/buildversion

    r9599 r10100  
    1 3.0.8
     13.0.10
  • chicken/branches/prerelease/chicken-setup.scm

    r9599 r10100  
    172172(define setup-build-prefix
    173173  (make-parameter
    174    (or (getenv "CHICKEN_TMPDIR") (getenv "TMPDIR")
     174   (or (getenv "CHICKEN_TMPDIR") (getenv "TMPDIR")
     175       (getenv "TMP") (getenv "TEMP")
    175176       ((lambda (user)
    176177          (and user  (file-write-access? "/tmp")
     
    182183       (current-directory))))
    183184
    184 (define setup-download-directory  (make-parameter (conc (setup-build-prefix) "/downloads")))
     185(define setup-download-directory  (make-parameter (make-pathname (setup-build-prefix) "downloads")))
    185186(define setup-root-directory      (make-parameter #f))
    186187(define setup-build-directory     (make-parameter #f))
     
    234235        (lambda (dir)
    235236          (verb dir)
    236           (create-directory/parents dir) )
     237          (system* "mkdir \"~a\"" (quotewrap dir)))
     238          ; (create-directory/parents dir) )
    237239        (lambda (dir)
    238240          (verb dir)
     
    591593            (write-setup-info (with-output-to-file setup-file
    592594                                (cut pp info))))
    593         (unless *windows-shell* (run (chmod a+r ,setup-file)))
     595        (unless *windows-shell* (run (chmod a+r ,(quotewrap setup-file))))
    594596        write-setup-info))))
    595597
     
    659661                 (v (setup-verbose-flag)) )
    660662             (if (testgz fn2)
    661                  (run (,*gzip-program* -d -c ,fn2 |\|| ,*tar-program* ,(if v 'xvf 'xf) -))
    662                  (run (,*tar-program* ,(if v 'xvf 'xf) ,fn2)) ) ) ) )
     663                 (run (,*gzip-program* -d -c ,(quotewrap fn2) |\|| ,*tar-program* ,(if v 'xvf 'xf) -))
     664                 (run (,*tar-program* ,(if v 'xvf 'xf) ,(quotewrap fn2))) ) ) ) )
    663665    ))
    664666
     
    725727                           (when (and (not *windows*)
    726728                                      (equal? "so" (pathname-extension to)))
    727                              (run (,*remove-command* ,to)) )
     729                             (run (,*remove-command* ,(quotewrap to)) ))
    728730                           (copy-file from to)
    729731                           (unless *windows-shell*
    730                              (run (chmod a+r ,to)))
     732                             (run (chmod a+r ,(quotewrap to))))
    731733                           (and-let* ((static (assq 'static info)))
    732734                             (when (and (eq? (software-version) 'macosx)
    733735                                        (equal? (cadr static) from)
    734736                                        (equal? (pathname-extension to) "a"))
    735                                (run (ranlib ,to)) ) )
     737                               (run (ranlib ,(quotewrap to)) ) ))
    736738                           (make-dest-pathname rpath f)))
    737739                       files) ) )
     
    755757               (copy-file f destf #f)
    756758               (unless *windows-shell*
    757                  (run (chmod a+rx ,destf))) ) )
     759                 (run (chmod a+rx ,(quotewrap destf))) ) ))
    758760           (cdr exs))
    759761          (newline) ))
     
    781783                           (copy-file from to)
    782784                           (unless *windows-shell*
    783                                    (run (chmod a+r ,to)))
     785                                   (run (chmod a+r ,(quotewrap to))))
    784786                           to) )
    785787                       files) ) )
     
    796798                            (copy-file from to)
    797799                            (unless *windows-shell*
    798                                     (run (chmod a+r ,to)))
     800                                    (run (chmod a+r ,(quotewrap to))))
    799801                            to) )
    800802                        files) ) )
     
    837839          (create-directory dir)
    838840          (unless *windows-shell*
    839                   (run (chmod a+x ,dir)))))))
     841                  (run (chmod a+x ,(quotewrap dir))))))))
    840842
    841843(define (try-compile code #!key c++ (cc (if c++ *cxx* *cc*)) (cflags "") (ldflags "")
     
    994996               (fpath (make-pathname (setup-download-directory) p "egg-dir")))
    995997           (run (svn co ,(if *revision* (conc "--revision " *revision*) "")
    996                      ,(make-pathname *svn-repository* p) ,fpath))
     998                     ,(make-pathname *svn-repository* p) ,(quotewrap fpath)))
    997999           fpath))
    9981000
  • chicken/branches/prerelease/defaults.make

    r9381 r10100  
    4141
    4242DESTDIR =
    43 ifeq ($(PLATFORM),mingw)
     43ifeq ($(PLATFORM),mingw-msys)
    4444PREFIX ?= c:/devtools
    4545else
     46ifeq ($(PLATFORM),mingw)
     47PREFIX ?= c:/devtools
     48else
    4649PREFIX ?= /usr/local
     50endif
    4751endif
    4852
  • chicken/branches/prerelease/extras.scm

    r9599 r10100  
    13381338(define fprintf0
    13391339  (let ((write write)
    1340         (newline newline)
    1341         (display display)
    1342         (open-output-string open-output-string)
    1343         (get-output-string get-output-string))
     1340        (newline newline)
     1341        (display display)
     1342        (open-output-string open-output-string)
     1343        (get-output-string get-output-string))
    13441344    (lambda (loc port msg args)
    1345       (let rec ([msg msg] [args args])
    1346         (##sys#check-string msg loc)
    1347         (when port (##sys#check-port port loc))
    1348         (let ((index 0)
    1349               (len (##sys#size msg))
    1350               (out (if (and port (##sys#tty-port? port))
    1351                        port
    1352                        (open-output-string))))
    1353           (define (fetch)
    1354             (let ((c (##core#inline "C_subchar" msg index)))
    1355               (set! index (fx+ index 1))
    1356               c) )
    1357           (define (next)
    1358             (if (cond-expand [unsafe #f] [else (##core#inline "C_eqp" args '())])
    1359                 (##sys#error loc "too few arguments to formatted output procedure")
    1360                 (let ((x (##sys#slot args 0)))
    1361                   (set! args (##sys#slot args 1))
    1362                   x) ) )
    1363           (let loop ()
    1364             (unless (fx>= index len)
    1365               (let ((c (fetch)))
    1366                 (if (and (eq? c #\~) (fx< index len))
    1367                     (let ((dchar (fetch)))
    1368                       (case (char-upcase dchar)
    1369                         ((#\S) (write (next) out))
    1370                         ((#\A) (display (next) out))
    1371                         ((#\C) (##sys#write-char-0 (next) out))
    1372                         ((#\B) (display (##sys#number->string (next) 2) out))
    1373                         ((#\O) (display (##sys#number->string (next) 8) out))
    1374                         ((#\X) (display (##sys#number->string (next) 16) out))
    1375                         ((#\!) (##sys#flush-output out))
    1376                         ((#\?)
    1377                          (let* ([fstr (next)]
    1378                                 [lst (next)] )
    1379                            (##sys#check-list lst loc)
    1380                            (display (rec fstr lst) out) ) )
    1381                         ((#\~) (##sys#write-char-0 #\~ out))
    1382                         ((#\% #\N) (newline out))
    1383                         (else
    1384                          (if (char-whitespace? dchar)
    1385                              (let skip ((c (fetch)))
    1386                                (if (char-whitespace? c)
    1387                                    (skip (fetch))
    1388                                    (set! index (fx- index 1)) ) )
    1389                              (##sys#error loc "illegal format-string character" dchar) ) ) ) )
    1390                     (##sys#write-char-0 c out) )
    1391                 (loop) ) ) )
    1392           (cond ((not port) (get-output-string out))
    1393                 ((not (eq? out port))
    1394                  (##sys#print (get-output-string out) #f port) ) ) ) ) ) ) )
     1345      (when port (##sys#check-port port loc))
     1346      (let ((out (if (and port (##sys#tty-port? port)) port (open-output-string))))
     1347        (let rec ([msg msg] [args args])
     1348          (##sys#check-string msg loc)
     1349          (let ((index 0)
     1350                (len (##sys#size msg)) )
     1351            (define (fetch)
     1352              (let ((c (##core#inline "C_subchar" msg index)))
     1353                (set! index (fx+ index 1))
     1354                c) )
     1355            (define (next)
     1356              (if (cond-expand [unsafe #f] [else (##core#inline "C_eqp" args '())])
     1357                  (##sys#error loc "too few arguments to formatted output procedure")
     1358                  (let ((x (##sys#slot args 0)))
     1359                    (set! args (##sys#slot args 1))
     1360                    x) ) )
     1361            (let loop ()
     1362              (unless (fx>= index len)
     1363                (let ((c (fetch)))
     1364                  (if (and (eq? c #\~) (fx< index len))
     1365                      (let ((dchar (fetch)))
     1366                        (case (char-upcase dchar)
     1367                          ((#\S) (write (next) out))
     1368                          ((#\A) (display (next) out))
     1369                          ((#\C) (##sys#write-char-0 (next) out))
     1370                          ((#\B) (display (##sys#number->string (next) 2) out))
     1371                          ((#\O) (display (##sys#number->string (next) 8) out))
     1372                          ((#\X) (display (##sys#number->string (next) 16) out))
     1373                          ((#\!) (##sys#flush-output out))
     1374                          ((#\?)
     1375                           (let* ([fstr (next)]
     1376                                  [lst (next)] )
     1377                             (##sys#check-list lst loc)
     1378                             (rec fstr lst) ) )
     1379                          ((#\~) (##sys#write-char-0 #\~ out))
     1380                          ((#\% #\N) (newline out))
     1381                          (else
     1382                           (if (char-whitespace? dchar)
     1383                               (let skip ((c (fetch)))
     1384                                 (if (char-whitespace? c)
     1385                                     (skip (fetch))
     1386                                     (set! index (fx- index 1)) ) )
     1387                               (##sys#error loc "illegal format-string character" dchar) ) ) ) )
     1388                      (##sys#write-char-0 c out) )
     1389                  (loop) ) ) )
     1390            (cond ((not port) (get-output-string out))
     1391                  ((not (eq? out port))
     1392                   (##sys#print (get-output-string out) #f port) ) ) ) ) ) ) ) )
    13951393
    13961394(define (fprintf port fstr . args)
  • chicken/branches/prerelease/manual/The User's Manual

    r9599 r10100  
    33== The User's Manual
    44
    5 This is the user's manual for the Chicken Scheme compiler, version 3.0.8
     5This is the user's manual for the Chicken Scheme compiler, version 3.0.10
    66
    77; [[Overview]] : What is Chicken?
  • chicken/branches/prerelease/manual/Unit extras

    r9599 r10100  
    44== Unit extras
    55
    6 This unit contains a collection of useful utility definitions. 
     6This unit contains a collection of useful utility definitions.
    77This unit is used by default, unless the program
    88is compiled with the {{-explicit-use}} option.
     9
    910
    1011
     
    6768(chop '(a b c d) 3)     ==> ((a b c) (d))
    6869</enscript>
    69 
    7070
    7171
     
    230230=== Hash tables
    231231
    232 CHICKEN implements SRFI-69. For more information,
    233 see [[http://srfi.schemers.org/srfi-69/srfi-69.html|SRFI-69]].
     232CHICKEN implements SRFI 69 with SRFI 90 extensions. For more information, see
     233[[http://srfi.schemers.org/srfi-69/srfi-69.html|SRFI-69]] and
     234[[http://srfi.schemers.org/srfi-90/srfi-90.html|SRFI-90]].
     235
     236
     237==== make-hash-table
     238
     239 [procedure] (make-hash-table [TEST HASH SIZE] #:TEST #:HASH #:SIZE #:INITIAL #:MIN-LOAD #:MAX-LOAD #:WEAK-KEYS #:WEAK-VALUES)
     240
     241Returns a new {{HASH-TABLE}} with the supplied configuration.
     242
     243; {{TEST}} : The equivalence function.
     244; {{HASH}} : The hash function.
     245; {{SIZE}} : The expected number of table elements.
     246; {{INITIAL}} : The default initial value.
     247; {{MIN-LOAD}} : The minimum load factor. A {{flonum}} in (0.0 1.0).
     248; {{MAX-LOAD}} : The maximum load factor. A {{flonum}} in (0.0 1.0).
     249; {{WEAK-KEYS}} : Use weak references for keys. (Ignored)
     250; {{WEAK-VALUES}} : Use weak references for values. (Ignored)
     251
     252(No, the keyword parameters are not uppercase.)
     253
     254
     255==== hash-table?
     256
     257 [procedure] (hash-table? OBJECT)
     258
     259Is the {{OBJECT}} a {{hash-table}}?
     260
     261
     262==== hash-table-size
     263
     264 [procedure] (hash-table-size HASH-TABLE)
     265
     266The {{HASH-TABLE}} size.
     267
     268
     269==== hash-table-equivalence-function
     270
     271 [procedure] (hash-table-equivalence-function HASH-TABLE)
     272
     273The {{HASH-TABLE}} {{equivalence-function}}.
     274
     275
     276==== hash-table-hash-function
     277
     278 [procedure] (hash-table-hash-function HASH-TABLE)
     279
     280The {{HASH-TABLE}} {{hash-function}}.
     281
     282
     283==== hash-table-min-load
     284
     285 [procedure] (hash-table-min-load HASH-TABLE)
     286
     287The {{HASH-TABLE}} minimum load factor.
     288
     289
     290==== hash-table-max-load
     291
     292 [procedure] (hash-table-max-load HASH-TABLE)
     293
     294The {{HASH-TABLE}} maximum load factor.
     295
     296
     297==== hash-table-weak-keys
     298
     299 [procedure] (hash-table-weak-keys HASH-TABLE)
     300
     301Does the {{HASH-TABLE}} weak references for keys?
     302
     303
     304==== hash-table-weak-values
     305
     306 [procedure] (hash-table-weak-values HASH-TABLE)
     307
     308Does the {{HASH-TABLE}} weak references for values?
     309
     310
     311==== hash-table-has-initial?
     312
     313 [procedure] (hash-table-has-initial? HASH-TABLE)
     314
     315Does the {{HASH-TABLE}} have a default initial value?
     316
     317
     318==== hash-table-initial
     319
     320 [procedure] (hash-table-initial HASH-TABLE)
     321
     322The {{HASH-TABLE}} default initial value.
     323
     324
     325==== hash-table-keys
     326
     327 [procedure] (hash-table-keys HASH-TABLE)
     328
     329Returns a list of the keys in the {{HASH-TABLE}} population.
     330
     331
     332==== hash-table-values
     333
     334 [procedure] (hash-table-values HASH-TABLE)
     335
     336Returns a list of the values in the {{HASH-TABLE}} population.
     337
     338
     339==== hash-table->alist
     340
     341 [procedure] (hash-table->alist HASH-TABLE)
     342
     343Returns the population of the {{HASH-TABLE}} as an {{association-list}}.
     344
     345
     346==== alist->hash-table
     347
     348 [procedure] (alist->hash-table ASSOCIATION-LIST [MAKE-HASH-TABLE-PARAMETER ...])
     349
     350Returns a new {{HASH-TABLE}}, configured using the optional
     351{{MAKE-HASH-TABLE-PARAMETER ...}}. The {{HASH-TABLE}} is populated from the
     352{{ASSOCIATION-LIST}}.
     353
     354
     355==== hash-table-ref
     356
     357 [procedure] (hash-table-ref HASH-TABLE KEY)
     358
     359Returns the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}.
     360
     361Aborts with an exception when the {{KEY}} is missing.
     362
     363
     364==== hash-table-ref/default
     365
     366 [procedure] (hash-table-ref/default HASH-TABLE KEY DEFAULT)
     367
     368Returns the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}, or the {{DEFAULT}}
     369when the {{KEY}} is missing.
     370
     371
     372==== hash-table-exists?
     373
     374 [procedure] (hash-table-exists? HASH-TABLE KEY)
     375
     376Does the {{KEY}} exist in the {{HASH-TABLE}}?
     377
     378
     379==== hash-table-set!
     380
     381 [procedure] (hash-table-set! HASH-TABLE KEY VALUE)
     382
     383Set the {{VALUE}} for the {{KEY}} in the {{HASH-TABLE}}.
    234384
    235385A setter for {{hash-table-ref}} is defined, so
    236386
    237387<enscript highlight=scheme>
    238 (set! (hash-table-ref HT KEY) VAL)
     388(set! (hash-table-ref HASH-TABLE KEY) VALUE)
    239389</enscript>
    240390
     
    242392
    243393<enscript highlight=scheme>
    244 (hash-table-set! HT KEY VAL)
    245 </enscript>
    246 
    247 As an extension to SRFI-69, {{hash-table-update!}} and {{hash-table-update!/default}} return
    248 the new value (after applying the update procedure).
     394(hash-table-set! HASH-TABLE KEY VALUE)
     395</enscript>
     396
     397
     398==== hash-table-update!
     399
     400 [procedure] (hash-table-update! HASH-TABLE KEY [UPDATE-FUNCTION [DEFAULT-VALUE-FUNCTION]])
     401
     402Sets or replaces the {{VALUE}} for {{KEY}} in the {{HASH-TABLE}}.
     403
     404The {{UPDATE-FUNCTION}} takes the existing {{VALUE}} for {{KEY}} and returns
     405the new {{VALUE}}. The default is {{identity}}
     406
     407The {{DEFAULT-VALUE-FUNCTION}} is called when the entry for {{KEY}} is missing.
     408The default uses the {{(hash-table-initial-value)}}, if provided. Otherwise
     409aborts with an exception.
     410
     411Returns the new {{VALUE}}.
     412
     413
     414==== hash-table-update!/default
     415
     416 [procedure] (hash-table-update! HASH-TABLE KEY UPDATE-FUNCTION DEFAULT-VALUE)
     417
     418Sets or replaces the {{VALUE}} for {{KEY}} in the {{HASH-TABLE}}.
     419
     420The {{UPDATE-FUNCTION}} takes the existing {{VALUE}} for {{KEY}} and returns
     421the new {{VALUE}}.
     422
     423The {{DEFAULT-VALUE}} is used when the entry for {{KEY}} is missing.
     424
     425Returns the new {{VALUE}}.
     426
     427
     428==== hash-table-copy
     429
     430 [procededure] (hash-table-copy HASH-TABLE)
     431
     432Returns a shallow copy of the {{HASH-TABLE}}.
     433
     434
     435==== hash-table-delete!
     436
     437 [procedure] (hash-table-delete! HASH-TABLE KEY)
     438
     439Deletes the entry for {{KEY}} in the {{HASH-TABLE}}.
     440
    249441
    250442==== hash-table-remove!
    251443
    252  [procedure] (hash-table-remove! HASHTABLE PROC)
    253 
    254 Calls {{PROC}} for all entries in {{HASHTABLE}} with the key and value of each
     444 [procedure] (hash-table-remove! HASH-TABLE PROC)
     445
     446Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
    255447entry. If {{PROC}} returns true, then that entry is removed.
     448
     449
     450==== hash-table-merge
     451
     452 [procedure] (hash-table-merge HASH-TABLE-1 HASH-TABLE-2)
     453
     454Returns a new {{HASH-TABLE}} with the union of {{HASH-TABLE-1}} and
     455{{HASH-TABLE-2}}.
     456
     457
     458==== hash-table-merge!
     459
     460 [procedure] (hash-table-merge! HASH-TABLE-1 HASH-TABLE-2)
     461
     462Returns {{HASH-TABLE-1}} as the union of {{HASH-TABLE-1}} and
     463{{HASH-TABLE-2}}.
     464
     465
     466==== hash-table-map
     467
     468 [procedure] (hash-table-map HASH-TABLE FUNC)
     469
     470Calls {{FUNC}} for all entries in {{HASH-TABLE}} with the key and value of each
     471entry.
     472
     473Returns a list of the results of each call.
     474
     475
     476==== hash-table-fold
     477
     478 [procedure] (hash-table-fold HASH-TABLE FUNC INIT)
     479
     480Calls {{FUNC}} for all entries in {{HASH-TABLE}} with the key and value of each
     481entry, and the current folded value. The initial folded value is {{INIT}}.
     482
     483Returns the final folded value.
     484
     485
     486==== hash-table-for-each
     487
     488 [procedure] (hash-table-for-each HASH-TABLE PROC)
     489
     490Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
     491entry.
     492
     493
     494==== hash-table-walk
     495
     496 [procedure] (hash-table-walk HASH-TABLE PROC)
     497
     498Calls {{PROC}} for all entries in {{HASH-TABLE}} with the key and value of each
     499entry.
     500
     501
     502=== Hash Functions
     503
     504All hash functions return a {{fixnum}} in the range [0 {{BOUND}}).
     505
     506
     507==== number-hash
     508
     509 [procedure] (number-hash NUMBER [BOUND])
     510
     511For use with {{=}} as a {{hash-table-equivalence-function}}.
     512
     513
     514==== object-uid-hash
     515
     516 [procedure] (object-uid-hash OBJECT [BOUND])
     517
     518Currently a synonym for {{equal?-hash}}.
     519
     520
     521==== symbol-hash
     522
     523 [procedure] (symbol-hash SYMBOL [BOUND])
     524
     525For use with {{eq?}} as a {{hash-table-equivalence-function}}.
     526
     527
     528==== keyword-hash
     529
     530 [procedure] (keyword-hash KEYWORD [BOUND])
     531
     532For use with {{eq?}} as a {{hash-table-equivalence-function}}.
     533
     534
     535==== string-hash
     536
     537 [procedure] (string-hash STRING [BOUND])
     538
     539For use with {{string=?}} as a {{hash-table-equivalence-function}}.
     540
     541
     542==== string-ci-hash
     543
     544 [procedure] (string-ci-hash STRING [BOUND])
     545
     546For use with {{string-ci=?}} as a {{hash-table-equivalence-function}}.
     547
     548
     549==== eq?-hash
     550
     551 [procedure] (eq?-hash OBJECT [BOUND])
     552
     553For use with {{eq?}} as a {{hash-table-equivalence-function}}.
     554
     555
     556==== eqv?-hash
     557
     558 [procedure] (eqv?-hash OBJECT [BOUND])
     559
     560For use with {{eqv?}} as a {{hash-table-equivalence-function}}.
     561
     562
     563==== equal?-hash
     564
     565 [procedure] (equal?-hash OBJECT [BOUND])
     566
     567For use with {{equal?}} as a {{hash-table-equivalence-function}}.
     568
     569
     570==== hash
     571
     572 [procedure] (hash OBJECT [BOUND])
     573
     574Synonym for {{equal?-hash}}.
     575
     576
     577==== hash-by-identity
     578
     579 [procedure] (hash-by-identity OBJECT [BOUND])
     580
     581Synonym for {{eq?-hash}}.
    256582
    257583
     
    386712 [procedure] (random-seed [SEED])
    387713
    388 Seeds the random number generator with {{SEED}} (an exact integer) or 
     714Seeds the random number generator with {{SEED}} (an exact integer) or
    389715{{(current-seconds)}} if {{SEED}} is not given.
    390716
     
    470796input is read from the port that is the current value of {{(current-input-port)}}.
    471797After all expressions are read, and if the argument is a port, then the port will
    472 not be closed. The {{READER}} argument specifies the procedure used to read 
     798not be closed. The {{READER}} argument specifies the procedure used to read
    473799expressions from the given file or port and defaults to {{read}}. The reader
    474800procedure will be called with a single argument (an input port).
     
    507833
    508834Read or write {{NUM}} characters from/to {{PORT}}, which defaults to the
    509 value of {{(current-input-port)}} or {{(current-output-port)}}, respectively. 
     835value of {{(current-input-port)}} or {{(current-output-port)}}, respectively.
    510836If {{NUM}} is {{#f}} or not given, then all data
    511837up to the end-of-file is read, or, in the case of {{write-string}} the whole
     
    631957
    632958Split string into substrings separated by the given delimiters. If
    633 no delimiters are specified, a string comprising the tab, newline and space characters 
     959no delimiters are specified, a string comprising the tab, newline and space characters
    634960is assumed. If the
    635961parameter {{KEEPEMPTY}} is given and not {{#f}}, then empty
     
    8041130
    8051131<enscript highlight=scheme>
    806 (lambda args 
     1132(lambda args
    8071133  (apply pp args)
    8081134  (apply eval args) )
  • chicken/branches/prerelease/manual/Unit library

    r9424 r10100  
    105105is negative or {{0}} if {{N}} is zero. {{signum}} is exactness preserving.
    106106
    107 
    108107==== finite?
    109108
     
    112111Returns {{#f}} if {{N}} is negative or positive infinity, and {{#t}} otherwise.
    113112
     113==== flonum-print-precision
     114
     115 [procedure] (flonum-print-precision [PRECISION])
     116
     117Returns the existing number of digits after the decimal place used in printing
     118a {{flonum}}.
     119
     120The optional {{non-negative-fixnum}} {{PRECISION}} sets the current print
     121precision.
    114122
    115123
  • chicken/branches/prerelease/manual/Unit posix

    r9424 r10100  
    124124
    125125Returns a canonical path for {{NAME}}, which should be a string
    126 containing a path-or-filename.  The string returned by 
     126containing a path-or-filename.  The string returned by
    127127{{canonical-path}} is OS dependent; it may be quoted and used in
    128128a shell on the calling machine. (Quoting is suggested as shell
     
    132132
    133133The prefix for {{NAME}} determines what path to prepend.  If {{NAME}}
    134 begins with a {{"~/"}}, this prefix is stripped and the user's 
     134begins with a {{"~/"}}, this prefix is stripped and the user's
    135135home directory is added.  If beginning with {{/}} or a DRIVE-LETTER:\\
    136136combination, no additional path is added.  Otherwise, the current
     
    139139a {{/}} or is empty, the appropriate slash is appended to the tail.
    140140
    141 No directories or files are actually tested for existence; this 
     141No directories or files are actually tested for existence; this
    142142procedure only canonicalises path syntax.
    143143
     
    467467 [procedure] (stat-socket? FILENAME)
    468468
    469 These procedures return {{#t}} if the {{FILENAME}} given is of the 
     469These procedures return {{#t}} if the {{FILENAME}} given is of the
    470470appropriate type.
    471471
     
    949949 [procedure] (seconds->local-time SECONDS)
    950950
    951 Breaks down the time value represented in {{SECONDS}} into a 10
    952 element vector of the form {{#(seconds minutes hours mday month
    953 year wday yday dstflag timezone)}}, in the following format:
     951Converts the time value represented in {{SECONDS}} into a ten-element vector
     952({{TIME-VECTOR}}) of the form {{#(seconds minutes hours mday month year wday
     953yday dstflag timezone)}}, in the following format:
    954954
    955955; seconds (0) : the number of seconds after the minute (0 - 59)
     
    966966==== local-time->seconds
    967967
    968  [procedure] (local-time->seconds VECTOR)
    969 
    970 Converts the ten-element vector {{VECTOR}} representing the time value relative to
    971 the current timezone into
    972 the number of seconds since the first of January, 1970 UTC.
     968 [procedure] (local-time->seconds TIME-VECTOR)
     969
     970Converts the {{TIME-VECTOR}} representing the time value relative to the
     971current timezone into the number of seconds since the first of January, 1970
     972UTC.
    973973
    974974==== local-timezone-abbreviation
     
    982982 [procedure] (seconds->string SECONDS)
    983983
    984 Converts the local time represented in {{SECONDS}} into a string
    985 of the form {{"Tue May 21 13:46:22 1991"}}.
     984Converts the local time represented in {{SECONDS}} into a string of the form
     985{{"Tue May 21 13:46:22 1991"}}.
    986986
    987987==== seconds->utc-time
     
    989989 [procedure] (seconds->utc-time SECONDS)
    990990
    991 Similar to {{seconds->local-time}}, but interpretes {{SECONDS}}
    992 as UTC time.
     991Similar to {{seconds->local-time}}, but interprets {{SECONDS}} as UTC time.
    993992
    994993==== utc-time->seconds
    995994
    996  [procedure] (utc-time->seconds VECTOR)
    997 
    998 Converts the ten-element vector {{VECTOR}} representing the UTC time value into
    999 the number of seconds since the first of January, 1970 UTC.
     995 [procedure] (utc-time->seconds TIME-VECTOR)
     996
     997Converts the {{TIME-VECTOR}} representing the UTC time value into the number of
     998seconds since the first of January, 1970 UTC.
    1000999
    10011000==== time->string
    10021001
    1003  [procedure] (time->string VECTOR)
    1004 
    1005 Converts the broken down time represented in the 10 element vector
    1006 {{VECTOR}} into a string of the form {{"Tue May 21 13:46:22
     1002 [procedure] (time->string TIME-VECTOR [FORMAT-STRING])
     1003
     1004Converts the {{TIME-VECTOR}} into a string of the form {{"Tue May 21 13:46:22
    100710051991"}}.
     1006
     1007When the optional {{FORMAT-STRING}} is supplied the time is formatted using
     1008the C library routine {{strftime}}.
     1009
     1010==== string->time
     1011
     1012 [procedure] (string->time TIME-STRING [FORMAT-STRING])
     1013
     1014Parse the {{TIME-STRING}} using the C library routine {{strptime}} and return a
     1015{{TIME-VECTOR}}.
     1016
     1017Not available for the ''Windows'' platform.
    10081018
    10091019
     
    12551265 set-root-directory!
    12561266 utc-time->seconds
     1267 string->time
    12571268
    12581269==== Additional Definitions
  • chicken/branches/prerelease/posixunix.scm

    r9381 r10100  
    932932          (getenv     getenv)
    933933          (user       current-user-name)
    934           (cwd        current-directory))
     934          (cwd        (let ((cw   current-directory))
     935                          (lambda ()
     936                              (condition-case (cw)
     937                                  (var ()    "/"))))))
    935938        (lambda (path)
    936939            (##sys#check-string path 'canonical-path)
  • chicken/branches/prerelease/posixwin.scm

    r9381 r10100  
    12461246          (sep?       (lambda (c) (or (char=? #\/ c) (char=? #\\ c))))
    12471247          (user       current-user-name)
    1248           (cwd        current-directory))
     1248          (cwd        (let ((cw   current-directory))
     1249                          (lambda ()
     1250                              (condition-case (cw)
     1251                                  (var ()    "c:\\"))))))
    12491252        (lambda (path)
    12501253            (##sys#check-string path 'canonical-path)
  • chicken/branches/prerelease/runtime.c

    r9381 r10100  
    84178417void C_ccall C_register_finalizer(C_word c, C_word closure, C_word k, C_word x, C_word proc)
    84188418{
    8419   if(C_immediatep(x)) C_kontinue(k, x );
     8419  if(C_immediatep(x)) C_kontinue(k, x);
    84208420
    84218421  C_do_register_finalizer(x, proc);
  • chicken/branches/prerelease/version.scm

    r9599 r10100  
    1 (define-constant +build-version+ "3.0.8")
     1(define-constant +build-version+ "3.0.10")
Note: See TracChangeset for help on using the changeset viewer.