Changeset 9325 in project


Ignore:
Timestamp:
03/08/08 15:42:19 (12 years ago)
Author:
elf
Message:

fixed error

Location:
chicken/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/posixunix.scm

    r9322 r9325  
    791791  (foreign-value "C_islink" bool) )
    792792
    793 (let ((stat-type
    794          (lambda (name func)
    795              (lambda (fname)
    796                  (##sys#check-string fname name)
    797                  (##sys#stat fname #t name)
    798                  (foreign-value func bool)))))
    799     (set! stat-regular? (stat-type 'stat-regular? "C_isreg"))
    800     (set! stat-directory? (stat-type 'stat-directory? "C_isdir"))
    801     (set! stat-char-device? (stat-type 'stat-char-device? "C_ischr"))
    802     (set! stat-block-device? (stat-type 'stat-block-device? "C_isblk"))
    803     (set! stat-fifo? (stat-type 'stat-fifo? "C_isfifo"))
    804     (set! stat-symlink? (stat-type 'stat-symlink? "C_islink"))
    805     (set! stat-socket? (stat-type 'stat-socket? "C_issock")))
     793(define (stat-regular? fname)
     794    (##sys#check-string fname 'stat-regular?)
     795    (##sys#stat fname #t 'stat-regular?)
     796    (foreign-value "C_isreg" bool))
     797
     798(define (stat-directory? fname)
     799    (##sys#check-string fname 'stat-directory?)
     800    (##sys#stat fname #t 'stat-directory?)
     801    (foreign-value "C_isdir" bool))
     802
     803(define (stat-char-device? fname)
     804    (##sys#check-string fname 'stat-char-device?)
     805    (##sys#stat fname #t 'stat-char-device?)
     806    (foreign-value "C_ischr" bool))
     807
     808(define (stat-block-device? fname)
     809    (##sys#check-string fname 'stat-block-device?)
     810    (##sys#stat fname #t 'stat-block-device?)
     811    (foreign-value "C_isblk" bool))
     812
     813(define (stat-fifo? fname)
     814    (##sys#check-string fname 'stat-fifo?)
     815    (##sys#stat fname #t 'stat-fifo?)
     816    (foreign-value "C_isfifo" bool))
     817
     818(define (stat-symlink? fname)
     819    (##sys#check-string fname 'stat-symlink?)
     820    (##sys#stat fname #t 'stat-symlink?)
     821    (foreign-value "C_islink" bool))
     822
     823(define (stat-socket? fname)
     824    (##sys#check-string fname 'stat-socket?)
     825    (##sys#stat fname #t 'stat-socket?)
     826    (foreign-value "C_issock" bool))
    806827
    807828(define set-file-position!              ; DEPRECATED
  • chicken/trunk/posixwin.scm

    r9323 r9325  
    11221122
    11231123(let ((stat-type
    1124          (lambda (name func)
     1124         (lambda (name)
    11251125             (lambda (fname)
    11261126                 (##sys#check-string fname name)
    11271127                 #f))))
    11281128    (set! stat-regular? regular-file?)
    1129     (set! stat-directory? (stat-type 'stat-directory? "C_isdir"))
    1130     (set! stat-char-device? (stat-type 'stat-char-device? "C_ischr"))
    1131     (set! stat-block-device? (stat-type 'stat-block-device? "C_isblk"))
    1132     (set! stat-fifo? (stat-type 'stat-fifo? "C_isfifo"))
    1133     (set! stat-symlink? (stat-type 'stat-symlink? "C_islink"))
    1134     (set! stat-socket? (stat-type 'stat-socket? "C_issock")))
     1129    (set! stat-directory? (stat-type 'stat-directory?))
     1130    (set! stat-char-device? (stat-type 'stat-char-device?))
     1131    (set! stat-block-device? (stat-type 'stat-block-device?))
     1132    (set! stat-fifo? (stat-type 'stat-fifo?))
     1133    (set! stat-symlink? (stat-type 'stat-symlink?))
     1134    (set! stat-socket? (stat-type 'stat-socket?)))
    11351135
    11361136(define file-position
Note: See TracChangeset for help on using the changeset viewer.