mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* unicode.c (onigenc_unicode_property_name_to_ctype):
ignore case of properties. * tool/enc-unicode.rb: downcase properties list. * enc/unicode/name2ctype.h, enc/unicode/name2ctype.h.blt, enc/unicode/name2ctype.kwd, enc/unicode/name2ctype.src: follow above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24836 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
e519c9d960
commit
ee4b59a419
7 changed files with 1312 additions and 1223 deletions
|
@ -176,6 +176,12 @@ def make_const(prop, pairs, name)
|
|||
puts "}; /* CR_#{prop} */"
|
||||
end
|
||||
|
||||
def normalize_propname(name)
|
||||
name = name.downcase
|
||||
name.gsub!(/[- _]/, '')
|
||||
name
|
||||
end
|
||||
|
||||
puts '%{'
|
||||
gcps, data = parse_unicode_data(ARGV[0])
|
||||
POSIX_NAMES.each do |name|
|
||||
|
@ -213,10 +219,10 @@ struct uniname2ctype_struct;
|
|||
%%
|
||||
__HEREDOC
|
||||
i = -1
|
||||
POSIX_NAMES.each {|name|puts"%-21s %3d"%[name+',', i+=1]}
|
||||
POSIX_NAMES.each {|name|puts"%-21s %3d" % [normalize_propname(name)+',', i+=1]}
|
||||
puts "#ifdef USE_UNICODE_PROPERTIES"
|
||||
gcps.each{|name|puts"%-21s %3d"%[name+',', i+=1]}
|
||||
scripts.each{|name|puts"%-21s %3d"%[name+',', i+=1]}
|
||||
gcps.each{|name|puts"%-21s %3d" % [normalize_propname(name)+',', i+=1]}
|
||||
scripts.each{|name|puts"%-21s %3d" % [normalize_propname(name)+',', i+=1]}
|
||||
puts "#endif /* USE_UNICODE_PROPERTIES */\n"
|
||||
puts(<<'__HEREDOC')
|
||||
%%
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue