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 | 930baa1e604efaba011174237bb45e5209b87391 (patch) | |
tree | a2ec760ce7a2b57de9459c2db4e3c0582d436303 /enc | |
parent | 6c1bb8051cd5bb6d2a25de55f8978d062a824d56 (diff) | |
download | ruby-930baa1e604efaba011174237bb45e5209b87391.tar.gz ruby-930baa1e604efaba011174237bb45e5209b87391.tar.xz ruby-930baa1e604efaba011174237bb45e5209b87391.zip |
* enc/trans/make_transdb.rb: converts only one transcoders for each
basename.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@18433 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc')
-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 ab48c4c94..aa69fc900 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) |