[#46143] るびま 標準添付ライブラリ紹介 第3回のサンプル EUC-JPの結果 — eiichi_maekawa@...

62 messages 2009/07/02
[#46153] Re: るびま 標準添付ライブラリ紹介 第3回のサンプル EUC-JPの結果 — "NARUSE, Yui" <naruse@...> 2009/07/03

成瀬です。

[#46165] Re: に関する1.8.6→1.8.7または、1.9へのバージョンアップ — eiichi_maekawa@... 2009/07/05

前川です。

[#46281] rubyの変数の扱いについて — "前川 映一" <eiichi_maekawa@...> 2009/08/17

前川です。

[#46283] Re: rubyの変数の扱いについて — "(株)ネットフォレスト 植田裕之" <ueda@...> 2009/08/17

植田と申します。

[#46146] 文字変換 — eiichi_maekawa@...

16 messages 2009/07/03
[#46147] Re: 文字変換 — Hidetoshi NAGAI <nagai@...> 2009/07/03

永井@知能.九工大です.

[#46148] Re: 文字変換 — eiichi_maekawa@... 2009/07/03

前川です。

[ruby-list:46244] ruby-chasen パッチテスター募集

From: "KISHIMOTO, Makoto" <ksmakoto@...4u.or.jp>
Date: 2009-07-30 14:35:14 UTC
List: ruby-list #46244
きしもとです

ruby-chasen で不具合等あったので、パッチを作りました。
フィードバックとしてメンテナのかたに送る前に、他の環境で問題が
出たりしないか確認したいので、テストしてくださるかたを募集します。
差分はメールの最後にあります。

ruby extconf.rb を実行する際、chasen.h および libchasen の
ある場所に合わせて、--with-chasen-dir=??? または
--with-chasen-include=??? と --with-chasen-lib=??? を
必要であれば指定してください。

以下差分です。

diff -ru ../chasen1.6_ORG/chasen.c ./chasen.c
--- ../chasen1.6_ORG/chasen.c	2000-02-27 00:01:48.000000000 +0900
+++ ./chasen.c	2009-07-07 20:24:49.000000000 +0900
@@ -20,6 +20,8 @@
 #include "ruby.h"
 #include "rubyio.h"
 
+#include <chasen.h>
+
 static VALUE
 f_chasen_getopt(int argc, VALUE *argv, VALUE class){
    int i;
@@ -40,7 +42,7 @@
 static VALUE
 f_chasen_sparse_tostr(VALUE obj, VALUE str){
    Check_SafeStr(str);
-   return rb_str_new2((char*)chasen_sparse_tostr(RSTRING(str)->ptr));
+   return rb_str_new2(chasen_sparse_tostr(RSTRING(str)->ptr));
 }
 
 static VALUE
@@ -54,7 +56,7 @@
    rb_io_check_readable(fp);
    dst = rb_str_new(NULL, 0);
   
-   while ((buf = (char*)chasen_fparse_tostr(fp->f)) != NULL) {
+   while ((buf = chasen_fparse_tostr(fp->f)) != NULL) {
       rb_str_cat(dst, buf, strlen(buf));
    }
    return dst;
diff -ru ../chasen1.6_ORG/extconf.rb ./extconf.rb
--- ../chasen1.6_ORG/extconf.rb	1999-09-09 21:57:36.000000000 +0900
+++ ./extconf.rb	2009-07-08 14:19:55.000000000 +0900
@@ -1,20 +1,5 @@
-require "mkmf"
-require "parsearg"
+require 'mkmf'
 
-def usage()
-  printf "Usage:\n"
-  printf "%s [-L library_path]\n", $0
-end
-
-$USAGE = 'usage'
-parseArgs(0, "L", nil, "L:.")
-
-unless have_library("chasen", "chasen_getopt_argv")
-   $objs = Dir["*.{c,cc}"]
-   for f in $objs
-      f.sub!(/\.(c|cc)$/, ".o")
-   end
-   $objs.push File.join(["#{$OPT_L}", "libchasen.a"])
-end
-
-create_makefile("chasen")
+have_library 'stdc++'
+dir_config 'chasen'
+have_library 'chasen', 'chasen_getopt_argv' and create_makefile 'chasen'

In This Thread

Prev Next