mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15010 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b866ecbc42
commit
e699dda504
4 changed files with 16 additions and 11 deletions
|
@ -1,3 +1,9 @@
|
|||
Sun Jan 13 01:52:31 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* 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 <naruse@ruby-lang.org>
|
||||
|
||||
* enc/make_encdb.rb: added. search enc/*.c and make encoding database.
|
||||
|
|
|
@ -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 $@
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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[];
|
||||
|
|
Loading…
Reference in a new issue