Gauche:Bugs:log9

Gauche:Bugs:log9

最新のもの: Gauche:Bugs

mingw環境でsys-normalize-pathnameがうまく動かない (0.8.9 mingw)

shinya(2007/04/18 20:24:19 PDT):

C:\>gosh
gosh> (sys-normalize-pathname "c:\\Program Files")
"c:\\am Files"

パッチ

Index: system.c
===================================================================
RCS file: /cvsroot/gauche/Gauche/src/system.c,v
retrieving revision 1.87
diff -u -r1.87 system.c
--- system.c    2 Mar 2007 07:39:14 -0000       1.87
+++ system.c    19 Apr 2007 03:08:59 -0000
@@ -392,11 +392,11 @@
     while (srcp < end) {
         ScmChar ch;
         if (*srcp == '/' || *srcp == '\\') {
-            Scm_DStringPutc(dst, SEPARATOR);
+            ch = SEPARATOR;
         } else {
             SCM_CHAR_GET(srcp, ch);
-            Scm_DStringPutc(dst, ch);
         }
+        Scm_DStringPutc(dst, ch);
         srcp += SCM_CHAR_NBYTES(ch);
     }
 }

cgi-mainにおいて、エラーハンドラが実行されない

(2007/04/15 07:51:45 PDT): 以前は実行されていた気がするんですが、何かの修正漏れ?

--- lib/www/cgi.scm     13 Apr 2007 11:39:09 -0000      1.33
+++ lib/www/cgi.scm     15 Apr 2007 14:48:39 -0000
@@ -392,7 +392,7 @@
                        (output-proc cgi-default-output)
                        (merge-cookies #f)
                        (part-handlers '()))
-    (guard (e (else (cut output-proc (on-error e))))
+    (guard (e (else (output-proc (on-error e))))
       (let1 params (cgi-parse-parameters :merge-cookies merge-cookies
                                          :part-handlers part-handlers)
         (output-proc (proc params))))

リファレンスマニュアルの atan の引数が逆になっている

koguro(2007/04/14 19:57:04 PDT): Gaucheユーザリファレンスに "Function: atan x y" とありますが、正しくは "Function: atan y x" ではないでしょうか?

Content-Length: 0なPOSTリクエストに対してcgi-parse-parametersがブロックする

(2007/04/12 19:37:30 PDT): パラメータが一つもないPOSTリクエストをcgi-parse-parametersで処理しようとするとブロックしちゃいます。

--- lib/www/cgi.scm     2 Mar 2007 07:39:11 -0000       1.32
+++ lib/www/cgi.scm     13 Apr 2007 02:34:46 -0000
@@ -164,7 +164,7 @@
              (or (and-let* ((lenp (or content-length
                                       (get-meta "CONTENT_LENGTH")))
                             (len  (x->integer lenp))
-                            ((positive? len)))
+                            ((<= 0 len)))
                    (string-incomplete->complete (read-block len)))
                  (port->string (current-input-port)))))
           (else
@@ -337,7 +337,7 @@
                (result (handler name filename part-info inp)))
           (list name result))))))
 
-  (let* ((inp (if (and clength (positive? (x->integer clength)))
+  (let* ((inp (if (and clength (<= 0 (x->integer clength)))
                 (open-input-limited-length-port inp (x->integer clength))
                 inp))
          (result (mime-parse-message inp `(("content-type" ,ctype))

call-with-input-stringで特定のデータに依存するエラー(2007/03/27時点CVS HEAD)

(use gauche.charconv)
(use rfc.uri)
(use rfc.http)
(use sxml.ssax)

(receive (_ _ body)
    (http-get "webservices.amazon.co.jp"
              "/onca/xml?Service=AWSECommerceService&AWSAccessKeyId=01VJ9SBK29PKQ22ZNCR2&AssociateTag=webservices-20&Version=2005-10-05&Operation=ItemLookup&IdType=ASIN&ItemId=4062753537&ResponseGroup=Medium")
  (call-with-input-string
      (ces-convert body "*jp" (gauche-character-encoding))
    (lambda (in)
      (ssax:xml->sxml in '()))))

これを評価すると、call-with-input-stringでどうやらエラーになる。
ces-convertは文字列を返せてる様子。

環境はNetBSD Currentで、(gauche-character-encoding)はeuc-jpです。
一応www.kahua.orgのGNU/Linu上のGaucheでも再現してます。
このGaucheのversionは0.8.9と表示されます、これもeuc-jpです。

UTF-8からeuc-jpにした時点でBrandノードの内容が文字化けしている様に見えるので、 これかと思うがここまでしか追及できてません。cut-sea:2007/04/07 11:41:11 PDT

Shiro(2007/04/07 15:45:28 PDT): Amazon側のデータの問題がGauche側の手抜きを突っついたようです。 Amazonからのデータはutf-8エンコーディングで返って来てて、 問題のBrandノードの中身はバイト列をそのまま覗くと

 #*"\xc3\xa8\xc2\xac\xc2\x9b\xc3\xa8\xc2\xab\xc2\x87\xc3\xa7\xc2\xa4\xc2\xbe"

こいつをutf-8デコードすると

 U+00e8 U+00ac U+009b U+00e8 U+00ab U+0087 U+00e7 U+00a4 U+00be

これは意味をなさない文字列ですが、コードをよく見るといかにもutf-8に見えるので、 もう一度このバイト列をutf-8だと思って文字列にすると

 "講談社"

つまり、Amazon側で内部エンコーディング→utf-8の処理をダブってかけているのが 根本的な原因と。

で、中間段階の文字列をeuc-jpに変換しようとした時に、3番目のU+009bが euc-jpの (#\x8f #\x80 #\x9b) というならびに変換されてしまいますが、これは 未定義領域です。(#\x8f * *) は本来第3、4水準漢字のはずですが、定義されてるのは (#\x8f #\xa1 #\xa1)以降なので。変換ルーチンのチェックが甘いのが原因でしょう。 ちゃんと対応できれば、未定義文字が代替文字に置換されるだけで、他の部分は 正しく動くはず。0.8.10までに対応できたら対応します。

genstubでdefine-cmethodを使うとエラー (CVS HEAD)

shinya (2007/04/05 02:38:53 PDT): define-cmethodがエラーになります。以下のパッチでは、define-cmethodでcallを使うと引数の順が逆になるのとc-generic-nameの効果が無かったのも修正しています。

Index: genstub
===================================================================
RCS file: /cvsroot/gauche/Gauche/src/genstub,v
retrieving revision 1.132
diff -u -r1.132 genstub
--- genstub     16 Mar 2007 09:46:45 -0000      1.132
+++ genstub     5 Apr 2007 09:20:30 -0000
@@ -782,6 +782,8 @@
 (define-class <procstub> (<setter-mixin> <stub>)
   ((args            :initform '() :accessor args-of :init-keyword :args)
    (num-reqargs     :initform 0   :accessor num-reqargs-of :init-keyword :num-reqargs)
+   (keyword-args    :initform '() :accessor keyword-args-of
+                    :init-keyword :keyword-args)
    (have-rest-arg?  :initform #f  :accessor have-rest-arg? :init-keyword :have-rest-arg?)
    (decls           :initform '() :accessor decls-of)
    (stmts           :initform '() :accessor stmts-of)
@@ -808,8 +810,6 @@
 (define-class <cproc> (<procstub>)
   ((num-optargs       :initform 0   :accessor num-optargs-of
                       :init-keyword :num-optargs)
-   (keyword-args      :initform '() :accessor keyword-args-of
-                      :init-keyword :keyword-args)
    (allow-other-keys? :initform '() :accessor allow-other-keys?
                       :init-keyword :allow-other-keys?)
    (inliner           :initform #f  :accessor inliner-of)
@@ -1355,10 +1355,10 @@
         (match stmt
           ((? string?) (push-stmt! method stmt))
           (('c-generic-name gen-name)
-           (unless (string? (cadr stmt))
-             (error "c-generic-name requires a string:"
-                    gen-name)
-             (set! (c-generic-of method) gen-name)))
+           (if (string? (cadr stmt))
+               (set! (c-generic-of method) gen-name)
+               (error "c-generic-name requires a string:"
+                      gen-name)))
           (('body . spec) (process-body-spec method stmt))
           (('call . spec) (process-call-spec method stmt))
           (('expr . spec) (process-expr-spec method stmt))
@@ -1408,7 +1408,7 @@
              (args    '())
              (specs   '()))
     (cond ((null? arglist)
-           (values args specs (length args) #f))
+           (values (reverse args) specs (length args) #f))
           ((symbol? arglist)
            (values (cons (make-arg <rest-arg> arglist (length args))
                          args)

0以上1以下の分数のexpt結果をexact->inexactにかけると、#<nan>になる事がある (0.8.9)

nekoie(2007/03/26 04:08:55 PDT): 以下のように実行して確認しました。

gosh> (define n (/ 8 9))
n
gosh> n
8/9
gosh> (exact->inexact (expt n 341))
0.0
gosh> (exact->inexact (expt n 342))
#<nan>

要するに、分母と分子の両方が、inexact化すると#i1/0になるぐらい大きな数になってしまう状況の時に発生するようです(無限割る無限なので#<nan>)。 どう回避するのが良いのかはちょっと分からなかったので、とりあえず報告だけしておきます。

inet-address->string and inet-string->address w/ IPv6

(2007/03/22 09:26:14 PDT): まだ作業途中なのかもしれませんが、いくつか気づいたのでパッチを貼っておきます。

math.mt-randomの:seedがbignumの時に常に固定値になる問題が直っていない (0.8.9)

nekoie(2007/03/22 05:09:02 PDT): おそらく、この問題だと思うのですが、 ( http://practical-scheme.net/wiliki/wiliki.cgi?Gauche%3aBugs%3alog1#H-dq5rsb ) コードを見る限りでは、直っているように見えるのですが、実際にbignumを与えてみると、どんな値であっても固定の乱数しか出てこないようです。

MingwでコンパイルするとSCM_DEFINE_BUILTIN_CLASS失敗

齊藤(2007/03/22 04:59:51 PDT):このあいだチャットで報告しましたがあらためて書いておきます。 Scm_DefaultCPLが定数扱いにならないためにMingwではライブラリのコンパイルに失敗します。

sxml.ssaxでunbound variable: assert-curr-char (0.8.9)

shinya(2007/03/22 04:49:40 PDT): ssax:make-parserで作ったパーサにDOCTYPE宣言のあるxml文章を入れるとうまく動きません。

gosh> (use sxml.ssax)
#<undef>
gosh> (define xml "<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n\"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd\">\n<node></node>\n")
xml
gosh> (define parser
  (ssax:make-parser
   NEW-LEVEL-SEED (lambda args '())
   FINISH-ELEMENT (lambda args '())
   CHAR-DATA-HANDLER (lambda args '())))
parser
gosh> (parser (open-input-string xml) '())
*** ERROR: unbound variable: assert-curr-char
Stack Trace:
_______________________________________
  0  (assert-curr-char ssax:S-chars "XML [28], space after DOCTYPE" por ...
        [unknown location]
gosh> (use text.parse) ; これを入れると動く
#<undef>
gosh> (parser (open-input-string xml) '())
()

matchをマクロから呼ぶとエラー(0.8.9)

tabe(2007/03/17 01:06:40 PDT): define-syntaxで定義したマクロから呼ぶとエラーになります。

gosh> (use util.match)
#<undef>
gosh> (match '(0 1)
  ((a b) b))
1
gosh> (define-syntax foo
  (syntax-rules ()
    ((_)
     (match '(0 1)
       ((a b) b)))))
#<undef>
gosh> (foo)
*** ERROR: Compile Error: syntax error in pattern (#<identifier user#a> #<identifier user#b>)
"(stdin)":9:(foo)

Stack Trace:
_______________________________________
gosh>

www.cgiモジュールのcgi-main手続きの返り値が0でない (0.8.9)

nekoie (2007/03/16 11:12:28 PDT): GaucheRefj:cgi-mainでは、 返り値として0が返るように書いてありますが、コードの方はそうなってないようです。 (www/cgi.scmの410行目のfor-eachを実行して、#<undef>が返っているようです)

(round 10.5) -> 10.0 (0.8.9)

OsN (2007/03/15 01:43:38 PDT): ドキュメントに沿った挙動なのでバグではないんですが、四捨五入を意図したものでしたら 11 が返る方が自然ではないでしょうか。

Shiro(2007/03/15 02:28:08 PDT): roundは四捨五入ではありません。 四捨五入を行う手続きってのは提供されてないですが、 (floor (+ x 0.5)) でいいんじゃないかしらん。

roundの仕様がああなっているのは、四捨五入だと統計的に切り上げの方が多くなる バイアスが入るためです。

OsN (2007/03/15 03:42:36 PDT): おぉ、数少ない経験から round は四捨五入と思い込んでいました。失礼しました。今更ですが、検索して見つけた参考ページを示しときます。リンクがまずかったら、消してください。

Shiro(2007/03/15 05:00:01 PDT): 参考になるリンクはOKですよ。ここを見ているみんなにも 益になりますし。

(floor 10.5) -> 10.0 (0.8.9)

OsN (2007/03/15 01:43:38 PDT): 勘違いしているかもしれませんが、、、

gosh> (floor 10.5)
10.0

floor, ceiling, truncate, round は integer を返す、とドキュメントに ありますので、(floor 10.5) で 10 でなく、10.0 が返ってくるのが違和感あります。

INSTALL.inの記述がちょっと古い(CVS HEAD)

(2007/03/14 16:54:20 PDT): とりあえず気づいたので。

Index: INSTALL.in
===================================================================
RCS file: /cvsroot/gauche/Gauche/INSTALL.in,v
retrieving revision 1.2
diff -u -r1.2 INSTALL.in
--- INSTALL.in  11 Nov 2006 20:45:17 -0000      1.2
+++ INSTALL.in  14 Mar 2007 23:52:16 -0000
@@ -453,8 +453,9 @@
 
 
 @c JP
-* MacOS X - dlcompatライブラリ(libdl)がインストールされていることが必要です。
-      http://fink.sourceforge.netからダウンロードできます。システム標準の
+* Mac OS X - 10.2.x以前のバージョンでは、dlcompatライブラリ(libdl)が
+      インストールされていることが必要です。http://fink.sourceforge.net
+      からダウンロードできます。10.3以降では必要ありません。システム標準の
       場所以外にdlcompatライブラリをインストールした場合は、configureの
       --with-localオプションで場所を指定して下さい。
       また、GCがpthreadsを要求するようになったので、--enable-threads=pthreads
@@ -465,12 +466,12 @@
 
        とする)
 @c EN
-* MacOS X - You need to install the dlcompat library (libdl) from
+* Mac OS X - You need to install the dlcompat library (libdl) from
        Fink project (http://fink.sourceforge.net) before configuring
-       Gauche.   If the dlcompat library is installed in non-standard
-       location, you have to tell configure the place by --with-local.
-       Besides, GC now requires pthreads on MacOS X, so you need
-       --enable-threads=pthreads.
+       Gauche on 10.2.x or earlier.  If the dlcompat library is installed
+       in non-standard location, you have to tell configure the place by
+       --with-local. Besides, GC now requires pthreads on MacOS X, so you
+       need --enable-threads=pthreads.
 
        For example, if you have dlfcn.h in $HOME/include and libdl.a
        in $HOME/lib, you should do:

--disable-ipv6な環境だとmake checkがエラーになる(CVS HEAD)

(2007/03/05 07:07:18 PST): こうしないと--enable-ipv6をつけないでビルドした時に make checkでエラーになります。

--- ext/net/netaux.scm  5 Mar 2007 07:24:04 -0000       1.10
+++ ext/net/netaux.scm  5 Mar 2007 15:05:07 -0000
@@ -206,8 +206,9 @@
 (define-method sockaddr-name ((addr <sockaddr-in>))
   #`",(inet-address->string (sockaddr-addr addr) AF_INET):,(sockaddr-port addr)")
 
-(define-method sockaddr-name ((addr <sockaddr-in6>))
-  #`"[,(inet-address->string (sockaddr-addr addr) AF_INET6)]:,(sockaddr-port addr)")
+(if (global-variable-bound? (current-module) '<sockaddr-in6>)
+    (define-method sockaddr-name ((addr <sockaddr-in6>))
+      #`"[,(inet-address->string (sockaddr-addr addr) AF_INET6)]:,(sockaddr-port addr)"))
 
 
 ;; IP address parser.  Can deal with both v4 and v6 addresses.

Shiro(2007/03/05 14:35:33 PST): そうか。このfixだとdefine-methodがトップレベルに来ないのが ちょっと気持ち悪いなあ。

こういう時のためのcond-expandなんだけど、あいにくnetaux.scmの中では(今は)使えない。 (--enable-ipv6を付けた場合、フィーチャー gauche.net.ipv6が定義されるので本来は

(cond-expand
  (gauche.net.ipv6
    (define-method ...))
  (else #f))

のように書けてしかるべきなのだが、フィーチャーgauche.net.ipv6はモジュールgauche.net を読み込まないと使えるようにならず、gauche.net自身を構成するnetaux.scmの コンパイル中には見えない。)

cond-expandをCの#ifdef...#endifみたいに使いたいものだが…feature setを外から オーバライドできるようにしておけばいいかな (cc -D=HAVE_IPv6 みたいな感じで 使えるようにする)。

Typos in lib/rfc/ip.scm(CVS HEAD)

(2007/03/01 08:05:29 PST): コメント中のタイポです。

RCS file: /cvsroot/gauche/Gauche/lib/rfc/ip.scm,v
retrieving revision 1.3
diff -r1.3 ip.scm
55c55
< ;; IP sddress utilities
---
> ;; IP address utilities
152c152
< ;; returns the final protocl and offset
---
> ;; returns the final protocol and offset

ext/net/test.scm が NetBSD でエラーになる(CVS HEAD)

(2007/02/21 06:22:08 PST): ext/net/test.scmが以下のようなエラーになります。

Testing net ...                                                  failed.
discrepancies found.  Errors are:
test udp uvector API: expects (#t #t) => got #<error "bind failed to #<sockaddr inet \"0.0.0.0:6726\">: Address already in use">

子プロセスのステータスをwait()していないために子プロセスが成仏できず、ローカルアドレスが使用中になってしまうようです。

--- test.scm    21 Feb 2007 04:50:50 -0000      1.25
+++ test.scm    21 Feb 2007 14:17:06 -0000
@@ -287,7 +287,8 @@
          (socket-connect sock addr)
          (socket-send sock "abc")
          (begin0 (string-incomplete->complete (socket-recv sock 1024))
-                 (socket-close sock))))
+                 (socket-close sock)
+                (sys-wait))))
 
 (test* "udp uvector API" '(#t #t)
        (let ((s-sock (make-socket |PF_INET| |SOCK_DGRAM|))

Scm_Init_* の戻り値(CVS HEAD)

(2007/02/19 22:45:51 PST): gauche-package generate で生成されるモジュールの初期化関数(Scm_Init_<module-name>) は、

ScmObj Scm_Init_<module_name>(void)
{
...
}

のようになっていますが、関数の中身自体は何も返していません。また、load.cの 中でこの関数を呼び出している部分も、戻り値を使用していません。void Scm_Init_<module-name>(void) でいいんじゃないかと思います。

--- ext/template.extension.c    17 Jul 2005 06:17:25 -0000      1.3
+++ ext/template.extension.c    20 Feb 2007 06:45:08 -0000
@@ -19,7 +19,7 @@
  */
 extern void Scm_Init_@@extname@@lib(ScmModule*);
 
-ScmObj Scm_Init_@@extname@@(void)
+void Scm_Init_@@extname@@(void)
 {
     ScmModule *mod;

rbtree-update! の値(0.8.9)

tabe(2007/02/13 03:11:38 PST): マニュアルの記載と異なり戻り値がありません。マニュアルの間違い?

*** rbtree.scm.orig     2007-01-18 14:49:27.000000000 +0900
--- rbtree.scm  2007-02-13 19:45:18.000000000 +0900
***************
*** 289,297 ****
    (let1 node (get-node tree key)
      (if (nil? node)
        (let1 newval (proc (get-optional arg (error "red-black tree doesn't have an entry for key" key)))
!         (rbtree-put! tree key newval))
!       (set! (ref node 'value)
!             (proc (ref node 'value))))))

  (define (rbtree-num-entries tree)
    (let loop ((node (root-of tree)))
--- 289,299 ----
    (let1 node (get-node tree key)
      (if (nil? node)
        (let1 newval (proc (get-optional arg (error "red-black tree doesn't have an entry for key" key)))
!         (rbtree-put! tree key newval)
!         newval)
!       (let1 newval (proc (ref node 'value))
!         (set! (ref node 'value) newval)
!         newval))))

  (define (rbtree-num-entries tree)
    (let loop ((node (root-of tree)))

コンパイラのバグ (0.8.9)

Rui(2007/02/12 22:20:59 PST): 下の式が"foo: foo"という誤った結果を出力します(正しくは"foo: hoge"のはず)。

(let ((p (cut format #t "~a: ~a\n" <> <>)))
  (letrec ((p1 (lambda (s) (p "foo" s)))
           (p2 (lambda (s) (p "bar" s))))
    (p1 "hoge")))

修正箇所が正しい自信はないんですが、これをあてると直ります。

--- src/compile.scm     19 Jan 2007 05:42:19 -0000      1.53
+++ src/compile.scm     13 Feb 2007 06:17:23 -0000
@@ -1175 +1175 @@
-  (cond ((assoc lvar lv-alist) => (lambda (p) (cdr p)))
+  (cond ((assq lvar lv-alist) => (lambda (p) (cdr p)))

(= (/ 0 0) 数値) が #t になる場合がある

はやみず 2007/02/12 20:35:43 PST: バグ報告はしたことがないのですが、ここでよいのでしょうか。

(= (/ 0 0) 10)      => #t
(= (/ 0 0) (/ 3 5)) => #t
(= (/ 0 0) 0.1)     => #f 

このような振舞いが確認されました。exact な数値と (/ 0 0) を = で比較すると #t になるようです。

環境

letやlambda内での組込みの大域変数に対するset!の効果が無い

hori(2007/02/07 07:55:06 PST):

(let ()
  (set! + #f)
  (+ 1 2)) => 3
(+ 1 2) => error(invalid application)

というように、set!の直後で値が変更されません。どうやら、これは #<subr ...> と表示される関数のみに発生する現象のようです.

環境 OS: Fedora Core 6 gosh -V => Gauche scheme interpreter, version 0.8.9 [utf-8,pthreads]

gauche-config --reconfigure => ./configure '--build=i686-redhat-linux-gnu' '--host=i686-redhat-linux-gnu' '--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--with-rpath=no' '--enable-threads=pthreads' '--enable-multibyte=utf-8' 'CFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables' 'build_alias=i686-redhat-linux-gnu' 'host_alias=i686-redhat-linux-gnu' 'target_alias=i386-redhat-linux-gnu'

sxml.serializer のマニュアルの見出し (0.8.9)

kuma(2007/01/23 08:33:13 PST): HTMLのマニュアルの目次を見ていたら気になったので。

--- Gauche-0.8.9/doc/modutil.texi.orig  2007-01-09 19:25:25.000000000 +0900
+++ Gauche-0.8.9/doc/modutil.texi       2007-01-24 01:24:59.000000000 +0900
@@ -9313,7 +9313,7 @@
 @c ----------------------------------------------------------------------
 @node Serializing XML and HTML from SXML, CSV tables, Manipulating SXML structu
re, Library modules - Utilities
 @section @code{sxml.serializer} -  Serializing XML and HTML from SXML
-@c NODE SXMLからXMLとXHTMLのシリアライゼーション
+@c NODE SXMLからXMLとXHTMLのシリアライゼーション, @code{sxml.serializer} - SXML
からXMLとXHTMLのシリアライゼーション

 @deftp {Module} sxml.serializer
 @mdindex sxml.serializer

Missing escapes in a regexp (cvs head)

tabe 正規表現内で " がエスケープされていない箇所がありました。

Index: lib/rfc/ftp.scm
===================================================================
RCS file: /cvsroot/gauche/Gauche/lib/rfc/ftp.scm,v
retrieving revision 1.3
diff -c -r1.3 ftp.scm
*** lib/rfc/ftp.scm     19 Jan 2007 01:07:12 -0000      1.3
--- lib/rfc/ftp.scm     19 Jan 2007 04:21:37 -0000
***************
*** 149,155 ****
  (define-values (ftp-mkdir ftp-current-directory)
    (let1 parse-257 (lambda (res)
                      (rxmatch-if (#/^257 \"((?:[^\"]|\"\")+)\"/ res) (#f dirname)
!                       (regexp-replace-all #/""/ dirname "\"")
                        (ftp-error res)))
      (values (lambda (conn dirname)
                (parse-257 (simple-command conn "MKD" dirname)))
--- 149,155 ----
  (define-values (ftp-mkdir ftp-current-directory)
    (let1 parse-257 (lambda (res)
                      (rxmatch-if (#/^257 \"((?:[^\"]|\"\")+)\"/ res) (#f dirname)
!                       (regexp-replace-all #/\"\"/ dirname "\"")
                        (ftp-error res)))
      (values (lambda (conn dirname)
                (parse-257 (simple-command conn "MKD" dirname)))
More ...