chicken-janitors
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-janitors] #676: bug in dict egg


From: Chicken Trac
Subject: Re: [Chicken-janitors] #676: bug in dict egg
Date: Wed, 31 Aug 2011 10:43:02 -0000

#676: bug in dict egg
-------------------------+--------------------------------------------------
  Reporter:  felix       |       Owner:  certainty
      Type:  defect      |      Status:  new      
  Priority:  major       |   Milestone:           
 Component:  extensions  |     Version:  4.7.x    
Resolution:              |    Keywords:  dict     
-------------------------+--------------------------------------------------
Description changed by felix:

Old description:

> There seems to be a typo in dict.scm:
>
> {{
>  (define (parse-status-151 input)
>     (let ((ws (string-index input #\space)))
>       (unless ws (complain "Malformed status 151 response. Expected
> `word`" input))
>       (let ((word (string-trim-both (string-take input ws) #\"))
>             (ws2 (string-index input #\space (+ ws 1))))
>         ;;      vv  should be ws2?
>         (unless ws (complain "Malformed status 151 response. Expected
> `databasename`"  input))
>         (let ((db (string-trim-both (string-take (string-drop input (+ ws
> 1)) (- ws2 (+ 1 ws))) #\"\
> ))
>               (descr (string-trim-both (string-trim-both (string-drop
> input (+ 1 ws2)) #\space) #\"\
> )))
>           (list word db descr)))))
> }}

New description:

 There seems to be a typo in dict.scm:

 {{{
  (define (parse-status-151 input)
     (let ((ws (string-index input #\space)))
       (unless ws (complain "Malformed status 151 response. Expected
 `word`" input))
       (let ((word (string-trim-both (string-take input ws) #\"))
             (ws2 (string-index input #\space (+ ws 1))))
         ;;      vv  should be ws2?
         (unless ws (complain "Malformed status 151 response. Expected
 `databasename`"  input))
         (let ((db (string-trim-both (string-take (string-drop input (+ ws
 1)) (- ws2 (+ 1 ws))) #\"\
 ))
               (descr (string-trim-both (string-trim-both (string-drop
 input (+ 1 ws2)) #\space) #\"\
 )))
           (list word db descr)))))
 }}}

--

-- 
Ticket URL: <https://bugs.call-cc.org/ticket/676#comment:1>
Chicken Scheme <http://www.call-with-current-continuation.org/>
Chicken Scheme is a compiler for the Scheme programming language.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]