diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-08 07:03:35 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-08-08 07:03:35 +0000 |
commit | 73d3ff007478b7e62316afd870b73d10a96a9ffe (patch) | |
tree | a2ec760ce7a2b57de9459c2db4e3c0582d436303 /enc/trans/make_transdb.rb | |
parent | 2577fa6dccd454fe92009b306af212e7e73bf906 (diff) | |
download | ruby-73d3ff007478b7e62316afd870b73d10a96a9ffe.tar.gz |
* enc/trans/make_transdb.rb: converts only one transcoders for each
basename.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/trans/make_transdb.rb')
-rw-r--r-- | enc/trans/make_transdb.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/enc/trans/make_transdb.rb b/enc/trans/make_transdb.rb index ab48c4c940..aa69fc9007 100644 --- a/enc/trans/make_transdb.rb +++ b/enc/trans/make_transdb.rb @@ -10,10 +10,13 @@ count = 0 converters = {} outhdr = ARGV[0] || 'transdb.h' transdirs = ARGV[1..-1] || 'enc/trans' +files = {} transdirs.each do |transdir| Dir.open(transdir) {|d| d.grep(/.+\.[ch]\z/).reject {|n| /\.erb\.c\z/ =~ n }}.sort_by {|e| e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten }.each do |fn| + next if files[fn] + files[fn] = true open(File.join(transdir,fn)) do |f| f.each_line do |line| if (/^static const rb_transcoder/ =~ line)..(/"(.*?)"\s*,\s*"(.*?)"/ =~ line) |