Custom Query (1630 matches)
Results (25 - 27 of 1630)
Ticket | Resolution | Summary | Owner | Reporter |
---|---|---|---|---|
#831 | fixed | utf8: Errors in xstring-copy! and utf8-case-map | ||
Description |
utf8-srfi-13 has a problem where it's missing a set of parentheses; it's passing the procedure #;1> (use utf8-srfi-13) #;2> (define s1 "foo") #;3> (define s2 (make-string 3)) #;4> (string-xcopy! s2 0 s1 1) ;; never stops, should put "oof" in s2 This is simple to fix: Index: utf8-srfi-13.scm =================================================================== --- utf8-srfi-13.scm (revision 26685) +++ utf8-srfi-13.scm (working copy) @@ -570,7 +570,7 @@ (define (string-xcopy target tstart s from . opt) (let-optionals* opt ((to1 #f) (start 0) (end (utf8-string-length s))) - (let ((to (or to1 (+ from - end start)))) + (let ((to (or to1 (+ from (- end start))))) (string-append (utf8-substring target 0 tstart) (xsubstring s from to start end) (utf8-substring target There's another bug in utf8-case-map, which I don't know how to trigger (might be worthwhile trying to figure that out to add it as a regression test). There's two places where u32vector-ref is called with only one argument. This is also simple to fix, but as I wasn't able to trigger the bug I'm not sure this is correct: Index: utf8-case-map.scm =================================================================== --- utf8-case-map.scm (revision 26685) +++ utf8-case-map.scm (working copy) @@ -122,9 +122,9 @@ (>= hi lo) (cond ((= i (u32vector-ref tab (* lo 4))) - (u32vector-ref (+ (* lo 4) off))) + (u32vector-ref tab (+ (* lo 4) off))) ((= i (u32vector-ref tab (* hi 4))) - (u32vector-ref (+ (* hi 4) off))) + (u32vector-ref tab (+ (* hi 4) off))) (else (let loop ((a lo) (b hi)) (if (= a b) These bugs were found by the scrutinizer, see http://parenteses.org/mario/misc/specialize-report/install/utf8.html |
|||
#832 | fixed | tokyocabinet: Error in tc-bdb-fwm-keys procedure | ||
Description |
There seems to be a problem in the order and types of arguments passed to the C function "tcbdbfwmkeys", as indicated by the scrutinizer at http://parenteses.org/mario/misc/specialize-report/install/tokyocabinet.html I don't have the Tokyocabinet library installed, so the patch below was not tested. Index: tokyocabinet.scm =================================================================== --- tokyocabinet.scm (revision 26685) +++ tokyocabinet.scm (working copy) @@ -431,7 +431,7 @@ ;; negative max for no limit (define (tc-bdb-fwm-keys bdb prefix max) (let ((tc-list - (make-tc-list (%tc-bdb-fwmkeys (string-length prefix) bdb prefix max)))) + (make-tc-list (%tc-bdb-fwmkeys bdb prefix (string-length prefix) max)))) (and (tc-list-ptr tc-list) tc-list))) |
|||
#885 | fixed | pty egg: example doesn't work | ||
Description |
The example from the egg wiki doesn't work. $ csi -v && cat ptytest.scm && csi -nbq ptytest.scm CHICKEN (c)2008-2011 The Chicken Team (c)2000-2007 Felix L. Winkelmann Version 4.7.5 (rev 0e44970) linux-unix-gnu-x86 [ manyargs dload ptables ] compiled 2012-07-10 on shiro (Linux) (use pty) (call-with-pty-process-io "ssh myfirewall" (lambda (in out pid) (peek-char in) (display (gui-get-password) out) (newline out) (read-line in) (display "dhclient 2>/dev/null && echo OK || echo FAIL\n" out) (unless (equal? "OK" (read-line in)) (error "couldn't launch dhclient")))) Error: can't read from FD - Resource temporarily unavailable: 4 Call history: <eval> (call-with-pty-process-io "ssh myfirewall" (lambda (in out pid) (peek-char in) (display (gui-get-pas...... ##sys#substring-index pty.scm:196: string-split pty.scm:202: process-fork pty.scm:231: open-file-io/non-blocking ##sys#make-string pty.scm:90: make-input-port pty.scm:134: make-output-port pty.scm:236: proc <eval> (peek-char in) pty.scm:94: file-read/maybe pty.scm:111: g68 pty.scm:76: ##sys#update-errno ##sys#peek-c-string pty.scm:77: ##sys#string-append pty.scm:77: ##sys#signal-hook <-- |