diff options
Diffstat (limited to 'enc/make_encdb.rb')
-rwxr-xr-x | enc/make_encdb.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/enc/make_encdb.rb b/enc/make_encdb.rb index 6eda76e5c4..013eabe1d7 100755 --- a/enc/make_encdb.rb +++ b/enc/make_encdb.rb @@ -24,7 +24,9 @@ encodings = [] defs = {} encdir = ARGV[0] outhdr = ARGV[1] || 'encdb.h' -Dir.open(encdir) {|d| d.grep(/.+\.[ch]\z/)}.sort.each do |fn| +Dir.open(encdir) {|d| d.grep(/.+\.[ch]\z/)}.sort_by {|e| + e.scan(/(\d+)|(\D+)/).map {|n,a| a||[n.size,n.to_i]}.flatten +}.each do |fn| open(File.join(encdir,fn)) do |f| orig = nil name = nil |