Changeset 8078 in project


Ignore:
Timestamp:
02/02/08 22:37:24 (11 years ago)
Author:
kon
Message:

Added '(define ...)' for '(set! ...)' introduced identifiers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/library.scm

    r8029 r8078  
    10201020(define (odd? n) (##core#inline "C_i_oddp" n))
    10211021
     1022(define max)
     1023(define min)
     1024
    10221025(let ([> >]
    10231026      [< <] )
     
    10361039                                nbest)
    10371040                            (##sys#slot ns 1) ) ) ) ) ) ] )
     1041
    10381042    (set! max (lambda (n1 . ns) (maxmin n1 ns >)))
    10391043    (set! min (lambda (n1 . ns) (maxmin n1 ns <))) ) )
     
    11311135  (##sys#intern-symbol str) )
    11321136
     1137(define ##sys#symbol->string)
     1138(define ##sys#symbol->qualified-string)
     1139(define ##sys#qualified-symbol-prefix)
     1140
    11331141(let ([string-append string-append]
    11341142      [string-copy string-copy] )
     1143
    11351144  (define (split str len)
    11361145    (let ([b0 (##sys#byte str 0)])      ; we fetch the byte, wether len is 0 or not
     
    11381147          (fx+ b0 1)
    11391148          #f) ) )
     1149
    11401150  (set! ##sys#symbol->string
    11411151    (lambda (s)
     
    11441154             [i (split str len)] )
    11451155        (if i (##sys#substring str i len) str) ) ) )
     1156
    11461157  (set! ##sys#symbol->qualified-string
    11471158    (lambda (s)
     
    11521163            (string-append "##" (##sys#substring str 1 i) "#" (##sys#substring str i len))
    11531164            str) ) ) )
     1165
    11541166  (set! ##sys#qualified-symbol-prefix
    11551167    (lambda (s)
     
    14171429  (##core#inline "C_make_character"
    14181430             (##core#inline tolower (##core#inline "C_character_code" c)) ) )
     1431
     1432(define char-ci=?)
     1433(define char-ci>?)
     1434(define char-ci<?)
     1435(define char-ci>=?)
     1436(define char-ci<=?)
    14191437
    14201438(let ((char-downcase char-downcase))
     
    15391557            (else (##sys#not-a-proper-list-error lst0 'map)) ) ] ) ) )
    15401558
     1559(define for-each)
     1560(define map)
     1561
    15411562(let ([car car]
    15421563      [cdr cdr] )
     
    15601581                             (loop (##sys#slot lsts 1)) ) ) )
    15611582                  (##sys#error loc "lists are not of same length" lsts) ) ) ) )
     1583
    15621584    (set! for-each
    15631585          (lambda (fn lst1 . lsts)
     
    15701592                           (loop (mapsafe cdr all #t 'for-each)) )
    15711593                          (else (check all #t 'for-each)) ) ) ) ) ) )
     1594
    15721595    (set! map
    15731596          (lambda (fn lst1 . lsts)
     
    18581881            "") ) ) ) )
    18591882
     1883(define open-input-file)
     1884(define open-output-file)
     1885(define close-input-file)
     1886(define close-output-file)
     1887
    18601888(let ()
     1889 
    18611890  (define (open name inp modes loc)
    18621891    (##sys#check-string name loc)
     
    18831912           port) ) )
    18841913     #:open (not inp) modes) )
     1914
    18851915  (define (close port loc)
    18861916    (##sys#check-port port loc)
     
    18891919      (##sys#setislot port 8 #t) )
    18901920    (##core#undefined) )
     1921
    18911922  (set! open-input-file (lambda (name . mode) (open name #t mode 'open-input-file)))
    18921923  (set! open-output-file (lambda (name . mode) (open name #f mode 'open-output-file)))
     
    26452676
    26462677(let ((crt current-read-table))
    2647   (define ((syntax-setter loc slot wrap) chr proc)
     2678 
     2679 (define ((syntax-setter loc slot wrap) chr proc)
    26482680    (cond ((symbol? chr) (##sys#set-read-mark! chr proc))
    26492681          (else
     
    26552687               (##sys#check-range i 0 256 loc)
    26562688               (##sys#setslot (##sys#slot crt slot) i (wrap proc)) ) ) ) ) )
     2689 
    26572690  (set! set-read-syntax!
    26582691    (syntax-setter
     
    26622695         (##sys#read-char-0 port)
    26632696         (proc port) ) ) ) )
     2697
    26642698  (set! set-sharp-read-syntax!
    26652699    (syntax-setter
     
    26692703         (##sys#read-char-0 port)
    26702704         (proc port) ) ) ) )
     2705
    26712706  (set! set-parameterized-read-syntax!
    26722707    (syntax-setter
     
    32693304(define ##sys#features '(#:chicken #:srfi-23 #:srfi-30 #:srfi-39 #:srfi-62 #:srfi-17 #:srfi-12))
    32703305
     3306;; Add system features:
     3307
    32713308(let ((check (lambda (f)
    32723309               (unless (eq? 'unknown f)
     
    40234060(define-foreign-variable ##sys#errno int "errno")
    40244061
     4062(define ##sys#update-errno)
     4063(define errno)
     4064
    40254065(let ([rn 0])
    40264066  (set! ##sys#update-errno (lambda () (set! rn ##sys#errno) rn))
     
    40284068
    40294069
    4030 ;;; Format error string for unterminated here-docs
     4070;;; Format error string for unterminated here-docs:
     4071
    40314072(define (##sys#format-here-doc-warning end)
    40324073  (##sys#print-to-string `("unterminated here-doc string literal `" ,end "'")))
Note: See TracChangeset for help on using the changeset viewer.