Changeset 15321 in project for chicken


Ignore:
Timestamp:
08/05/09 08:21:08 (10 years ago)
Author:
felix
Message:

documentation fixes, read-symbolic-link enhancement by mario; rational? fixed (thanks to John Cowan)

Location:
chicken/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk

  • chicken/trunk/c-platform.scm

    r15246 r15321  
    539539(rewrite 'number? 2 1 "C_i_numberp" #t #f)
    540540(rewrite 'complex? 2 1 "C_i_numberp" #t #f)
    541 (rewrite 'rational? 2 1 "C_i_numberp" #t #f)
     541(rewrite 'rational? 2 1 "C_i_rationalp" #t #f)
    542542(rewrite 'real? 2 1 "C_i_numberp" #t #f)
    543543(rewrite 'integer? 2 1 "C_i_integerp" #t #f)
  • chicken/trunk/chicken.h

    r15276 r15321  
    15321532C_fctexport C_word C_fcall C_i_stringp(C_word x) C_regparm;
    15331533C_fctexport C_word C_fcall C_i_numberp(C_word x) C_regparm;
     1534C_fctexport C_word C_fcall C_i_rationalp(C_word x) C_regparm;
    15341535C_fctexport C_word C_fcall C_i_integerp(C_word x) C_regparm;
    15351536C_fctexport C_word C_fcall C_i_flonump(C_word x) C_regparm;
  • chicken/trunk/library.scm

    r15119 r15321  
    909909(define complex? number?)
    910910(define real? number?)
    911 (define rational? number?)
     911(define (rational? n) (##core#inline "C_i_rationalp" n))
    912912(define ##sys#flonum-fraction (##core#primitive "C_flonum_fraction"))
    913913(define (##sys#integer? x) (##core#inline "C_i_integerp" x))
  • chicken/trunk/manual

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • chicken/trunk/manual/Deviations from the standard

    r15059 r15321  
    4141extended-precision integers (bignums). The routines {{complex?}},
    4242{{real?}} and {{rational?}} are identical to the standard procedure
    43 {{number?}}. The procedures {{numerator}}, {{denominator}},
    44 {{rationalize}}, {{make-rectangular}} and {{make-polar}} are not
    45 implemented. Fixnums are limited to ±2<nowiki><sup>30</sup></nowiki>
    46 (or ±2<nowiki><sup>62</sup></nowiki> on 64-bit hardware).  Support for
    47 extended numbers is available as a separate package, provided the GNU
    48 multiprecision library is installed.
     43{{number?}}. The procedures {{rationalize}}, {{make-rectangular}} and
     44{{make-polar}} are not implemented. Fixnums are limited to
     45±2<nowiki><sup>30</sup></nowiki> (or ±2<nowiki><sup>62</sup></nowiki>
     46on 64-bit hardware). Support for extended numbers is available as a
     47separate package, provided the GNU multiprecision library is
     48installed.
    4949
    5050[6.2.6] The procedure {{string->number}} does not obey read/write
  • chicken/trunk/manual/Unit posix

    r15119 r15321  
    639639==== read-symbolic-link
    640640
    641 <procedure>(read-symbolic-link FILENAME)</procedure>
     641<procedure>(read-symbolic-link FILENAME [CANONICALIZE])</procedure>
    642642
    643643Returns the filename to which the symbolic link {{FILENAME}} points.
     644If {{CANONICALIZE}} is given and true, then symbolic links are
     645resolved repeatedly until the result is not a link.
    644646
    645647==== file-link
  • chicken/trunk/posixunix.scm

    r15119 r15321  
    15341534  (let ([substring substring]
    15351535        [buf (make-string (fx+ _filename_max 1))] )
    1536     (lambda (fname)
     1536    (lambda (fname #!optional canonicalize)
    15371537      (##sys#check-string fname 'read-symbolic-link)
    15381538      (let ([len (##core#inline "C_readlink" (##sys#make-c-string (##sys#expand-home-path fname)) buf)])
    15391539      (when (fx< len 0)
    15401540        (posix-error #:file-error 'read-symbolic-link "cannot read symbolic link" fname) )
    1541       (substring buf 0 len) ) ) ) )
     1541      (let ((pathname (substring buf 0 len)))
     1542        (if (and canonicalize (symbolic-link? pathname))
     1543            (read-symbolic-link pathname 'canonicalize)
     1544            pathname ) ) ) ) ) )
    15421545
    15431546(define file-link
  • chicken/trunk/runtime.c

    r15292 r15321  
    47044704
    47054705
     4706C_regparm C_word C_fcall C_i_rationalp(C_word x)
     4707{
     4708  if((x & C_FIXNUM_BIT) != 0) return C_SCHEME_TRUE;
     4709
     4710  if((!C_immediatep(x) && C_block_header(x) == C_FLONUM_TAG)) {
     4711    double n = C_flonum_magnitude(x);
     4712
     4713    if(C_isinf(n) || C_isnan(n)) return C_SCHEME_FALSE;
     4714  }
     4715
     4716  return C_SCHEME_TRUE;
     4717}
     4718
     4719
    47064720C_regparm C_word C_fcall C_i_integerp(C_word x)
    47074721{
  • chicken/trunk/site/index.html

    r15304 r15321  
    157157<h3>DOCUMENTATION</h3>
    158158<p>
    159 Browse the <a href="http://chicken.wiki.br/man/4/">User's manual</a> at the CHICKEN
     159Browse the <a href="http://chicken.wiki.br/man/4/The User's Manual">User's manual</a> at the CHICKEN
    160160<a href="http://chicken.wiki.br/">wiki</a>
    161161</p>
Note: See TracChangeset for help on using the changeset viewer.