Loris  Check-in [4c3f253883]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Since R7RS is now mandatory, use #\null
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:4c3f253883fc5657828f6e057c0dba724b32f8b3
User & Date: jesper 2016-04-18 18:28:01
Context
2016-08-01
10:01
Add random-integer procedure to the platform module, and use it in dot-locking instead of using srfi 27. The srfi 27 egg is broken on Windows/MSYS2. The random procedure of Chickens extras module is good enough for our purposes here. check-in: f246cdf6ff user: jesper tags: trunk
2016-04-18
18:28
Since R7RS is now mandatory, use #\null check-in: 4c3f253883 user: jesper tags: trunk
18:27
Some fixes for getting a program-internal-name. check-in: 62e183d81d user: jesper tags: trunk
Changes

Changes to platform.scm.

87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
    ;; A ch parameter that is not char? causes an error.
    (define (allowed-in-filename? ch . tail)
      (let ((accept-allowed-but-ugly (if (null? tail)
                                         #f
                                         (car tail)))
            (pred? (lambda (o) (char=? o ch))))
        (if (eq? (software-type) 'windows)
            ;; #\null was added in Chicken 4.9.0, for R7RS compatibility.
            ;; The only character name available in earlier versions was #\nul
            (not (find pred? '(#\< #\> #\: #\" #\/ #\\ #\| #\? #\* #\nul)))
            (nor (find pred? '(#\/ #\nul))
                 (and accept-allowed-but-ugly
                      (find pred? '(#\| #\; #\* #\[ #\])))))))

    (define (program-available? str)
      (let ((available? (if (eq? 'windows (software-type))
                            (or (file-exists? str) (file-exists? (conc str ".exe")))
                            (let*-values (((in out pid) (process (conc "which " str " 2> /dev/null")))







<
<
|
|







87
88
89
90
91
92
93


94
95
96
97
98
99
100
101
102
    ;; A ch parameter that is not char? causes an error.
    (define (allowed-in-filename? ch . tail)
      (let ((accept-allowed-but-ugly (if (null? tail)
                                         #f
                                         (car tail)))
            (pred? (lambda (o) (char=? o ch))))
        (if (eq? (software-type) 'windows)


            (not (find pred? '(#\< #\> #\: #\" #\/ #\\ #\| #\? #\* #\null)))
            (nor (find pred? '(#\/ #\null))
                 (and accept-allowed-but-ugly
                      (find pred? '(#\| #\; #\* #\[ #\])))))))

    (define (program-available? str)
      (let ((available? (if (eq? 'windows (software-type))
                            (or (file-exists? str) (file-exists? (conc str ".exe")))
                            (let*-values (((in out pid) (process (conc "which " str " 2> /dev/null")))