[#8530] Enumerable and rand — Koretsugu Daigoro <tmmcross@...>

これつぐです。

21 messages 1999/12/05
[#8534] Re: Enumerable and rand — matz@... (Yukihiro Matsumoto) 1999/12/06

まつもと ゆきひろです

[#8581] Re: [ruby-list:19228] Ruby 1.4.3 — Katsuyuki Komatsu <komatsu@...>

小松です。

19 messages 1999/12/07
[#8592] Re: [ruby-list:19228] Ruby 1.4.3 — matz@... (Yukihiro Matsumoto) 1999/12/07

まつもと ゆきひろです

[#8645] urllib and httplib — TAKAHASHI Masayoshi <maki@...>

高橋征義です。

47 messages 1999/12/14
[#8646] Re: urllib and httplib — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/12/14

なひです.

[#8653] Re: urllib and httplib — matz@... (Yukihiro Matsumoto) 1999/12/14

まつもと ゆきひろです

[#8656] Re: urllib and httplib — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/12/15

なひです.

[#8659] Re: urllib and httplib — Wakou Aoyama <wakou@...> 1999/12/15

青山です。

[#8685] Re: urllib and httplib — "NAKAMURA, Hiroshi" <nakahiro@...> 1999/12/21

なひです.

[#8687] Re: urllib and httplib — TAKAHASHI Masayoshi <maki@...> 1999/12/21

高橋征義です。

[#8690] Re: urllib and httplib — matz@... (Yukihiro Matsumoto) 1999/12/21

まつもと ゆきひろです

[#8717] Re: urllib and httplib — TAKAHASHI Masayoshi <maki@...> 1999/12/24

高橋征義です。

[#8963] Re: urllib and httplib — "NAKAMURA, Hiroshi" <nakahiro@...> 2000/01/19

なひです.

[#8650] [PATCH] Ruby/Tk — Koji Arai <JCA02266@...>

新井です。

20 messages 1999/12/14
[#8651] Re: [PATCH] Ruby/Tk — Koji Arai <JCA02266@...> 1999/12/14

新井です。

[#8692] [win] dir name — KANEKO Naoshi <wbs01621@...>

金子です。

22 messages 1999/12/21
[#8695] Re: [win] dir name — Koji Oda <oda@...1.qnes.nec.co.jp> 1999/12/22

小田@QNES です。

[#8741] Re: [ruby-list:19945] Re: array + empty string — Wakou Aoyama <wakou@...>

青山です。

18 messages 1999/12/27
[#8743] Re: [ruby-list:19945] Re: array + empty string — matz@... (Yukihiro Matsumoto) 1999/12/28

まつもと ゆきひろです

[#8742] [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Kazunori NISHI <kazunori@...>

西@九大です。

64 messages 1999/12/27
[#8744] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — matz@... (Yukihiro Matsumoto) 1999/12/28

まつもと ゆきひろです

[#8748] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Kazunori NISHI <kazunori@...> 1999/12/28

西@九大です。

[#8751] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — matz@... (Yukihiro Matsumoto) 1999/12/28

まつもと ゆきひろです

[#8767] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Kazunori NISHI <kazunori@...> 1999/12/29

西@九大です。

[#8777] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — matz@... (Yukihiro Matsumoto) 1999/12/30

まつもと ゆきひろです

[#8791] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Minero Aoki <aamine@...> 1999/12/31

あおきです。

[#8792] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — matz@... (Yukihiro Matsumoto) 1999/12/31

まつもと ゆきひろです

[#8793] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — ARIMA Yasuhiro <fit0298@...> 1999/12/31

有馬です。

[#8795] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Akinori MUSHA aka knu <knu@...> 1999/12/31

 knuです。

[#8798] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — matz@... (Yukihiro Matsumoto) 2000/01/01

まつもと ゆきひろです

[#8811] Re: [REQ] Array#each{|a,b,...|}, Array#shift/pop(num) — Akinori MUSHA aka knu <knu@...> 2000/01/03

 knuです。

[ruby-dev:8692] [win] dir name

From: KANEKO Naoshi <wbs01621@...>
Date: 1999-12-21 16:10:07 UTC
List: ruby-dev #8692
金子です。

DOS/Win 環境でライブラリ find.rb を使用するとき "x:\\" の形式の
ディレクトリ名を処理できません。
以下のような修正を取り込んではいただけないでしょうか。
1.4.3 への差分です。

===============================================================
diff -u lib/find.rb.orig lib/find.rb 
--- lib/find.rb.orig	Tue Oct 12 18:11:29 1999
+++ lib/find.rb	Sat Dec 18 00:58:37 1999
@@ -17,7 +17,9 @@
 	  begin
 	    for f in d
 	      next if f =~ /^\.\.?$/
-	      if file == "/" then
+	      if RUBY_PLATFORM =~ /djgpp|cygwin|mswin32/ and file =~ /^([\/\\]|[A-z]:[\/\\]?)$/ then
+		f = file + f
+	      elsif file == "/" then
 		f = "/" + f
 	      else
 		f = file + "/" + f
===============================================================


あとは mswin32 固有ですが、上と同様のディレクトリ名関連の処理の
修正です。
mswin32 の opendir が "x:" のような ':' で終了する形式や
2バイト目に '\\' を含む日本語ディレクトリ名を正しく処理できる
ようにしました。

日本語ディレクトリ名の判定には WinAPI の CharPrev() を使っている
ので、一応日本以外の環境でも問題はないつもりです。

===============================================================
diff -u -p win32/win32.c.orig win32/win32.c 
--- win32/win32.c.orig	Tue Nov 09 12:57:27 1999
+++ win32/win32.c	Sun Dec 19 22:46:25 1999
@@ -1245,8 +1245,10 @@ opendir(char *filename)
     // check to see if we\'ve got a directory
     //
 
-    if (stat (filename, &sbuf) < 0 ||
-	sbuf.st_mode & _S_IFDIR == 0) {
+    if ((stat (filename, &sbuf) < 0 ||
+	sbuf.st_mode & _S_IFDIR == 0) &&
+	(!isalpha(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
+	((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
 	return NULL;
     }
 
@@ -1264,7 +1266,7 @@ opendir(char *filename)
 
     strcpy(scanname, filename);
 
-    if (index("/\\", *(scanname + strlen(scanname) - 1)) == NULL)
+    if (index("/\\:", *CharPrev(scanname, scanname + strlen(scanname))) == NULL)
 	strcat(scanname, "/*");
     else
 	strcat(scanname, "*");
===============================================================
diff -u win32/Makefile.orig win32/Makefile 
--- win32/Makefile.orig	Wed Dec 08 01:18:25 1999
+++ win32/Makefile	Sun Dec 19 22:56:31 1999
@@ -18,7 +18,7 @@
 #LDFLAGS = $(CFLAGS) -Fm
 XLDFLAGS = 
 #EXTLIBS = 
-LIBS = advapi32.lib wsock32.lib $(EXTLIBS)
+LIBS = user32.lib advapi32.lib wsock32.lib $(EXTLIBS)
 MISSING = crypt.obj alloca.obj win32.obj isinf.obj isnan.obj
 LDSHARED = 
 DLDFLAGS = 
===============================================================


以下はオマケ。
括弧が逆になっていました。
VC++ では標準ヘッダの内部に必要に応じて extern "C" が入っていて
特に必要ではないため、くくり自体を削除しました。
VC++ の <math.h> では template 使っているので全体を
extern "C" でくくると逆にエラーになるようです。

===============================================================
diff -u -p win32/win32.h.orig win32/win32.h 
--- win32/win32.h.orig	Fri Aug 13 14:45:19 1999
+++ win32/win32.h	Mon Dec 20 22:10:07 1999
@@ -86,10 +86,6 @@
 #undef finally
 #undef leave
 
-#if defined(__cplusplus)
-}
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -101,10 +97,6 @@
 #include <sys/utime.h>
 #include <io.h>
 #include <malloc.h>
-
-#if defined(__cplusplus)
-extern "C" {
-#endif
 
 #define UIDTYPE int
 #define GIDTYPE int
===============================================================


-- 
金子 尚史 (KANEKO Naoshi)
e-mail: wbs01621@mail.wbs.ne.jp


In This Thread

Prev Next