[#33169] a cool Ruby script. — Yuji Asakawa <namu@...>
From: Yuji Asakawa <namu@venus.dti.ne.jp>
From: Yuji Asakawa <namu@venus.dti.ne.jp>
[#33172] [ANN] Ruby/zlib 0.5.0-pre1 — UENO Katsuhiro <unnie@...>
うえのです。
[#33183] [ANN] TMail 0.10 — Minero Aoki <aamine@...>
あおきです。
[#33185] rd-mode: rd-intelligent-newline — "Shirai,Kaoru" <shirai@...1jp.com>
白井といいます。
[#33208] Method passing block — sinara@...
原(信)です。
[#33229] ruby のインストールがうまくいかない — satoshi SAKAI <gau_sato@...9.dion.ne.jp>
はじめまして。
At Tue, 8 Jan 2002 19:58:55 +0900,
サカイです。
なかだです。
サカイです。
From: satoshi SAKAI <gau_sato@d9.dion.ne.jp>
In the message <20020109102738.TQIO11600.femail11.im.home.ne.jp@witch>,
さくです。
いわおかです。
さくです。
In message <20020110020553.61dd3936.crouton@weatherlight.org>
[#33234] DB のカラム名をもった各行のオブジェクトへ向けて — encore ann <i@...>
もりかわです。
[#33235] " 差分ベースモジュール " in Ruby — Taku Nakajima <tnakajima@...>
中島@ブレーンです。
ただただしです。
Toshです。
In article <A5EF3ECC-04BE-11D6-B67B-003065DC8B1C@yb3.so-net.ne.jp>,
In article <hvoell014rl.fsf@coulee.a02.aist.go.jp>,
まつもと ゆきひろです
In article <1010559765.279084.16212.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1010566232.053696.16272.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1010568827.806757.16317.nullmailer@ev.netlab.jp>,
なかだです。
nobu.nakada@nifty.ne.jpさんの
[#33263] RDtool インストールでの疑問 — satoshi SAKAI <gau_sato@...9.dion.ne.jp>
サカイです。
[#33288] HTML から BODY を抜き出す — m_seki@...
坂野 正明です。
MoonWolfです。
[#33300] 日付順のソートについて — "Tatsuaki Nagai" <Tatsuaki_Nagai@...>
永井@KCです。
[#33326] [ 質問 ] クラスメソッドのモジュールによる実現方法 — Hiroyuki Komatsu <komatsu@...>
小松と申します. はじめまして.
[#33346] IPSocket.getaddress — "Sadayuki Sakamoto" <sakacom@...>
酒本です。
酒本です。
In article <009501c19c02$aaa39740$65bc80da@pc0>,
In article <hvo66668ztc.fsf@coulee.a02.aist.go.jp>,
まつもと ゆきひろです
[#33356] about pty and expect on 1.7.x — YANAGAWA Kazuhisa <kjana@...4lab.to>
ruby-talk の話見ててちょっと思いだしたんですが....
[#33367] [ANN] rb2exe-preview1 — Yuya Kato <yuya@4th.to>
[#33381] [ANN] WString 0.0.8 — takuma ozawa <metal@...>
小澤といいます。
[#33392] Re: [ANN] rb2exe-preview1 — Nagai T <idonagai@...>
なかだです。
ひだかです。
ふたたびひだかです。
またひだかですが(^_^;
[#33398] ruby-mode のインデント不具合 (} + の次の行) — MALTA Koji <malta@...>
丸田と申します。
[#33416] No such file to load -- dbm — satoshi SAKAI <gau_sato@...9.dion.ne.jp>
サカイと言います。(以前もお世話になりました。)
まつもと ゆきひろです
ただただしです。まいどどうも(?)。
サカイです。
[#33427] CGI でキャッシュ — Fujikawa Norihide <ruby@...>
てんしゅう@ねむぅ。
[#33443] libpgsql-ruby-0.6.5 で Linux+PostgreSQL+Ruby について — "井上 浩一" <kyoui32@...>
井上です。
[#33462] Re: Mysql/Ruby のコンパイル — "井上 浩一" <kyoui32@...>
井上です。
ひだかです。
なかだです。
ひだかです。
なかだです。
ひだかです。
なかだです。
ひだかです。
なかだです。
ひだかです。
たむらです。
なかだです。
たむらです。
西山和広です。
たむらです。
高橋征義です。
たむらです。
[#33477] about nest class — sheepman <sheepman@...>
こんにちは
まつもと ゆきひろです
あおきです。
まつもと ゆきひろです
なかだです。
まつもと ゆきひろです
[#33517] [BUG] Can't compile ruby on Solaris2.6 — IWAMURO Motonori <iwa@...>
岩室です。
まつもと ゆきひろです
岩室です。
わたなべです。
[#33520] IP に関するライブラリ cygwin & linux — "井上 浩一" <kyoui32@...>
井上です。
さくです。
In article <20020125163631.076601cb.crouton@weatherlight.org>,
さくです。
[#33535] broken symbolic link and File::mtime — Go Nakagawa <nakagawa@...>
中川といいます。
まつもと ゆきひろです
In message <1012002148.661980.9788.nullmailer@ev.netlab.jp>
西山和広です。
In message <20020127213735.2369.ZN@mbf.nifty.com>
西山和広です。
まつもと ゆきひろです
In article <1012194192.456224.19148.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1012208486.646506.19793.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1012212090.162851.19949.nullmailer@ev.netlab.jp>,
まつもと ゆきひろです
In article <1012227444.855288.20722.nullmailer@ev.netlab.jp>,
In message <hvoy9ii4eon.fsf@coulee.a02.aist.go.jp>
In article <200201281639.g0SGdRH29664@edge.sky.yamashina.kyoto.jp>,
さくです。
うぅむ。もうすこし早く Subject: を変えるべきであった...
まつもと ゆきひろです
In article <1012282185.518684.23103.nullmailer@ev.netlab.jp>,
In article <1012208486.646506.19793.nullmailer@ev.netlab.jp>,
[#33547] racc fails on alpha-freebsd — Minero Aoki <aamine@...>
あおきです。
In message <20020126123640V.aamine@mx.edit.ne.jp>
あおきです。
[#33556] Cgi::session in eRuby — kyosuke kiyooka <k@7ruby.com>
きよおかです。
きよおかです。
[#33570] NHK スペシャル「変革の世紀」 — rubiben <ozaki@...>
[#33613] Re: ある文字列以外の部分にマッチさせる方法 — "Tatsuaki Nagai" <Tatsuaki_Nagai@...>
永井です。
[#33664] rd2 コマンド( RDtool )が動かない。 — Seiji Yoneda <yoneda@...>
米田と申します。はじめて投稿します。
有馬です。
サイトウさん、有馬さん、ありがとうございます。
たむらです。
ひだかです。
[#33689] Windows をリブートするスクリプトはありますか?。 — Take_tk <ggb03124@...>
どちら様か、Windows をリブートするスクリプトを既に作っておられないでしょ
[ruby-list:33459] warning silence patch for regex.c
野首と申します。 Namazu Project の方で regex.c を使わせていただいているのですが、これ に対して神戸さんが警告を減らすパッチを作成されました。利用していた regex.c が古かったので、最新の安定版に適用できる形に直してこちらにも一 応お送りします。 Ruby 1.6.6 の regex.c に対するパッチで、それぞれ以下のような変更を施 しています。 * patch-ruby-regex-warn-fix-1 cast, 変数の初期化、||, && 演算子近辺への () の付加など * patch-ruby-regex-warn-fix-2 実際には利用していない関数や enum symbol のコメントアウト 後者はなんらかの意図があって残してありそうなので、そのまま適用できそ うな部分と分けました。これらのパッチの採用/不採用に関してはおまかせし ますので、よろしくお願いします。 -- 野首 貴嗣 E-mail: knok@daionet.gr.jp knok@namazu.org / knok@debian.org
Attachments (2)
diff -u regex-orig/regex.c regex-new/regex.c
--- regex-orig/regex.c Fri Jan 18 15:55:21 2002
+++ regex-new/regex.c Fri Jan 18 15:43:05 2002
@@ -376,7 +376,7 @@
wordbeg, /* Succeeds if at word beginning. */
wordend, /* Succeeds if at word end. */
wordbound, /* Succeeds if at a word boundary. */
- notwordbound,/* Succeeds if not at a word boundary. */
+ notwordbound /* Succeeds if not at a word boundary. */
};
@@ -461,7 +461,7 @@
int n = mbclen(c) - 1; \
c &= (1<<(BYTEWIDTH-2-n)) - 1; \
while (n--) { \
- c = c << 6 | *p++ & ((1<<6)-1); \
+ c = c << 6 | (*p++ & ((1<<6)-1)); \
} \
} \
else { \
@@ -502,23 +502,28 @@
{
if (current_mbctype == MBCTYPE_UTF8) {
if (c < 0x80)
- printf("%c", c);
+ printf("%c", (int)c);
else if (c <= 0x7ff)
- printf("%c%c", utf8_firstbyte(c), c&0x3f);
+ printf("%c%c", (int)utf8_firstbyte(c), (int)(c & 0x3f));
else if (c <= 0xffff)
- printf("%c%c%c", utf8_firstbyte(c), (c>>6)&0x3f, c&0x3f);
+ printf("%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 6) & 0x3f),
+ (int)(c & 0x3f));
else if (c <= 0x1fffff)
- printf("%c%c%c%c", utf8_firstbyte(c), (c>>12)&0x3f, (c>>6)&0x3f, c&0x3f);
+ printf("%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 12) & 0x3f),
+ (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
else if (c <= 0x3ffffff)
- printf("%c%c%c%c%c", utf8_firstbyte(c), (c>>18)&0x3f, (c>>12)&0x3f, (c>>6)&0x3f, c&0x3f);
+ printf("%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 18) & 0x3f),
+ (int)((c >> 12) & 0x3f), (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
else if (c <= 0x7fffffff)
- printf("%c%c%c%c%c%c", utf8_firstbyte(c), (c>>24)&0x3f, (c>>18)&0x3f, (c>>12)&0x3f, (c>>6)&0x3f, c&0x3f);
+ printf("%c%c%c%c%c%c", (int)utf8_firstbyte(c), (int)((c >> 24) & 0x3f),
+ (int)((c >> 18) & 0x3f), (int)((c >> 12) & 0x3f),
+ (int)((c >> 6) & 0x3f), (int)(c & 0x3f));
}
else if (c < 0xff) {
- printf("\\%o", c);
+ printf("\\%o", (int)c);
}
else {
- printf("%c%c", c>>BYTEWIDTH, c&0xff);
+ printf("%c%c", (int)(c >> BYTEWIDTH), (int)(c &0xff));
}
}
@@ -1184,7 +1189,7 @@
register const char *p = pattern;
const char *nextp;
const char *pend = pattern + size;
- register unsigned int c, c1;
+ register unsigned int c, c1 = 0;
const char *p0;
int numlen;
#define ERROR_MSG_MAX_SIZE 200
@@ -1484,8 +1489,8 @@
case 'W':
for (c = 0; c < (1 << BYTEWIDTH); c++) {
if (SYNTAX(c) != Sword &&
- (current_mbctype && !re_mbctab[c] ||
- !current_mbctype && SYNTAX(c) != Sword2))
+ ((current_mbctype && !re_mbctab[c]) ||
+ (!current_mbctype && SYNTAX(c) != Sword2)))
SET_LIST_BIT(c);
}
had_char_class = 1;
diff -u regex-fix1/regex-ruby.c regex-new/regex-ruby.c
--- regex-fix1/regex-ruby.c Fri Jan 18 15:58:24 2002
+++ regex-new/regex-ruby.c Fri Jan 18 16:01:36 2002
@@ -169,7 +169,9 @@
static void insert_jump _((int, char*, char*, char*));
static void store_jump_n _((char*, int, char*, unsigned));
static void insert_jump_n _((int, char*, char*, char*, unsigned));
+#if 0
static void insert_op _((int, char*, char*));
+#endif
static void insert_op_2 _((int, char*, char*, int, int));
static int memcmp_translate _((unsigned char*, unsigned char*, int));
@@ -370,7 +372,9 @@
duplicate, /* Match a duplicate of something remembered.
Followed by one byte containing the index of the memory
register. */
+#if 0
fail, /* always fails. */
+#endif
wordchar, /* Matches any word-constituent character. */
notwordchar, /* Matches any char that is not a word-constituent. */
wordbeg, /* Succeeds if at word beginning. */
@@ -724,6 +728,7 @@
return 0;
}
+#if 0
static void
print_partial_compiled_pattern(start, end)
unsigned char *start;
@@ -978,6 +983,7 @@
print_partial_compiled_pattern(buffer, buffer + bufp->used);
}
+#endif
static char*
calculate_must_string(start, end)
@@ -1251,7 +1257,9 @@
int *stackb = stacka;
int *stackp = stackb;
int *stacke = stackb + 40;
+#if 0
int *stackt;
+#endif
/* Counts ('s as they are encountered. Remembered for the matching ),
where it becomes the register number to put in the stop_memory
@@ -2567,6 +2575,7 @@
If you call this function, you must zero out pending_exact. */
+#if 0
static void
insert_op(op, there, current_end)
int op;
@@ -2580,6 +2589,7 @@
there[0] = (char)op;
}
+#endif
/* Open up space at location THERE, and insert operation OP followed by
diff -u regex-fix1/regex.c regex-new/regex.c
--- regex-fix1/regex.c Fri Jan 18 15:58:24 2002
+++ regex-new/regex.c Fri Jan 18 16:03:56 2002
@@ -169,7 +169,9 @@
static void insert_jump _((int, char*, char*, char*));
static void store_jump_n _((char*, int, char*, unsigned));
static void insert_jump_n _((int, char*, char*, char*, unsigned));
+#if 0
static void insert_op _((int, char*, char*));
+#endif
static void insert_op_2 _((int, char*, char*, int, int));
static int memcmp_translate _((unsigned char*, unsigned char*, int));
@@ -370,7 +372,9 @@
duplicate, /* Match a duplicate of something remembered.
Followed by one byte containing the index of the memory
register. */
+#if 0
fail, /* always fails. */
+#endif
wordchar, /* Matches any word-constituent character. */
notwordchar, /* Matches any char that is not a word-constituent. */
wordbeg, /* Succeeds if at word beginning. */
@@ -496,6 +500,7 @@
#endif
}
+#if 0
static void
print_mbc(c)
unsigned int c;
@@ -526,6 +531,7 @@
printf("%c%c", (int)(c >> BYTEWIDTH), (int)(c &0xff));
}
}
+#endif
/* If the buffer isn't allocated when it comes in, use this. */
#define INIT_BUF_SIZE 28
@@ -724,6 +730,7 @@
return 0;
}
+#if 0
static void
print_partial_compiled_pattern(start, end)
unsigned char *start;
@@ -978,6 +985,7 @@
print_partial_compiled_pattern(buffer, buffer + bufp->used);
}
+#endif
static char*
calculate_must_string(start, end)
@@ -1251,7 +1259,9 @@
int *stackb = stacka;
int *stackp = stackb;
int *stacke = stackb + 40;
+#if 0
int *stackt;
+#endif
/* Counts ('s as they are encountered. Remembered for the matching ),
where it becomes the register number to put in the stop_memory
@@ -2567,6 +2577,7 @@
If you call this function, you must zero out pending_exact. */
+#if 0
static void
insert_op(op, there, current_end)
int op;
@@ -2580,6 +2591,7 @@
there[0] = (char)op;
}
+#endif
/* Open up space at location THERE, and insert operation OP followed by