зеркало из https://github.com/github/ruby.git
* 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
This commit is contained in:
Родитель
2577fa6dcc
Коммит
73d3ff0074
|
@ -1,3 +1,8 @@
|
||||||
|
Fri Aug 8 16:03:32 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* enc/trans/make_transdb.rb: converts only one transcoders for each
|
||||||
|
basename.
|
||||||
|
|
||||||
Fri Aug 8 10:53:52 2008 Tanaka Akira <akr@fsij.org>
|
Fri Aug 8 10:53:52 2008 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* lib/resolv.rb: randomize source port and transaction id.
|
* lib/resolv.rb: randomize source port and transaction id.
|
||||||
|
|
|
@ -10,10 +10,13 @@ count = 0
|
||||||
converters = {}
|
converters = {}
|
||||||
outhdr = ARGV[0] || 'transdb.h'
|
outhdr = ARGV[0] || 'transdb.h'
|
||||||
transdirs = ARGV[1..-1] || 'enc/trans'
|
transdirs = ARGV[1..-1] || 'enc/trans'
|
||||||
|
files = {}
|
||||||
transdirs.each do |transdir|
|
transdirs.each do |transdir|
|
||||||
Dir.open(transdir) {|d| d.grep(/.+\.[ch]\z/).reject {|n| /\.erb\.c\z/ =~ n }}.sort_by {|e|
|
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
|
e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten
|
||||||
}.each do |fn|
|
}.each do |fn|
|
||||||
|
next if files[fn]
|
||||||
|
files[fn] = true
|
||||||
open(File.join(transdir,fn)) do |f|
|
open(File.join(transdir,fn)) do |f|
|
||||||
f.each_line do |line|
|
f.each_line do |line|
|
||||||
if (/^static const rb_transcoder/ =~ line)..(/"(.*?)"\s*,\s*"(.*?)"/ =~ line)
|
if (/^static const rb_transcoder/ =~ line)..(/"(.*?)"\s*,\s*"(.*?)"/ =~ line)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче