diff --git a/ChangeLog b/ChangeLog index 760f9eef18..8390eacb30 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sun Jan 13 01:52:31 2008 Yukihiro Matsumoto + + * enc/make_encdb.rb: should work on Ruby 1.8. [ruby-dev:33069] + + * common.mk (encdb.h): pass enc dir from outside to make_encdb.rb. + Sun Jan 13 00:01:07 2008 NARUSE, Yui * enc/make_encdb.rb: added. search enc/*.c and make encoding database. diff --git a/common.mk b/common.mk index 1b80b685d5..026c2dab9f 100644 --- a/common.mk +++ b/common.mk @@ -709,7 +709,7 @@ node_name.inc: {$(VPATH)}node.h $(BASERUBY) -n $(srcdir)/tool/node_name.rb $? > $@ encdb.h: $(srcdir)/enc/make_encdb.rb - $(BASERUBY) -I$(srcdir) $(srcdir)/enc/make_encdb.rb + $(BASERUBY) $(srcdir)/enc/make_encdb.rb $(srcdir)/enc miniprelude.c: $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $(BASERUBY) -I$(srcdir) $(srcdir)/tool/compile_prelude.rb $(srcdir)/prelude.rb $@ diff --git a/enc/make_encdb.rb b/enc/make_encdb.rb index 2cd7699944..b8b430190f 100755 --- a/enc/make_encdb.rb +++ b/enc/make_encdb.rb @@ -1,5 +1,3 @@ -#! ./miniruby - # # OnigEncodingDefine(foo, Foo) = { # .. @@ -11,13 +9,12 @@ # ENC_ALIAS("CP932", "Windows-31J") # -require 'mkmf' - encodings = [] replicas = {} aliases = {} -Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)}.each do |fn| - open(File.join($srcdir,fn)) do |f| +encdir = ARGV[0] +Dir.open(encdir) {|d| d.grep(/.+\.c\z/)}.each do |fn| + open(File.join(encdir,fn)) do |f| orig = nil name = nil f.each_line do |line| @@ -36,14 +33,16 @@ Dir.open($srcdir) {|d| d.grep(/.+\.c\z/)}.each do |fn| end end end +p aliases open('encdb.h', 'wb') do |f| f.puts 'static const char *enc_name_list[] = {' encodings.each {|name| f.puts' "%s",' % name} replicas.each_key {|name| f.puts' "%s",' % name} + aliases.each_key {|name| f.puts' "%s",' % name} f.puts(<<"_TEXT_") NULL }; -static const int enc_name_list_size = #{encodings.length + replicas.length}; +static const int enc_name_list_size = #{encodings.length + replicas.length + aliases.length}; static const int enc_aliases_size = #{aliases.length}; static st_table *enc_table_replica_name; static st_table *enc_table_alias_name; diff --git a/version.h b/version.h index 8e9961f2da..5ccddf7c00 100644 --- a/version.h +++ b/version.h @@ -1,7 +1,7 @@ #define RUBY_VERSION "1.9.0" -#define RUBY_RELEASE_DATE "2008-01-12" +#define RUBY_RELEASE_DATE "2008-01-13" #define RUBY_VERSION_CODE 190 -#define RUBY_RELEASE_CODE 20080112 +#define RUBY_RELEASE_CODE 20080113 #define RUBY_PATCHLEVEL 0 #define RUBY_VERSION_MAJOR 1 @@ -9,7 +9,7 @@ #define RUBY_VERSION_TEENY 0 #define RUBY_RELEASE_YEAR 2008 #define RUBY_RELEASE_MONTH 1 -#define RUBY_RELEASE_DAY 12 +#define RUBY_RELEASE_DAY 13 #ifdef RUBY_EXTERN RUBY_EXTERN const char ruby_version[];