mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
enc-unicode.rb: uniname2ctype_offset
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12b8058661
commit
8083a359d0
2 changed files with 790 additions and 788 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -436,6 +436,7 @@ struct uniname2ctype_struct {
|
||||||
short name;
|
short name;
|
||||||
unsigned short ctype;
|
unsigned short ctype;
|
||||||
};
|
};
|
||||||
|
#define uniname2ctype_offset(str) offsetof(struct uniname2ctype_pool_t, uniname2ctype_pool_##str)
|
||||||
|
|
||||||
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
|
static const struct uniname2ctype_struct *uniname2ctype_p(const char *, unsigned int);
|
||||||
%}
|
%}
|
||||||
|
|
@ -525,8 +526,8 @@ if header
|
||||||
IO.popen(%W[diff -DUSE_UNICODE_AGE_PROPERTIES #{fds[1].path} #{fds[0].path}], "r") {|age|
|
IO.popen(%W[diff -DUSE_UNICODE_AGE_PROPERTIES #{fds[1].path} #{fds[0].path}], "r") {|age|
|
||||||
IO.popen(%W[diff -DUSE_UNICODE_PROPERTIES #{fds[2].path} -], "r", in: age) {|f|
|
IO.popen(%W[diff -DUSE_UNICODE_PROPERTIES #{fds[2].path} -], "r", in: age) {|f|
|
||||||
f.each {|line|
|
f.each {|line|
|
||||||
line.gsub!(/\(int\)\(long\)&\(\((struct uniname2ctype_pool_t) \*\)0\)->(uniname2ctype_pool_str\d+),\s+/,
|
line.gsub!(/\(int\)\(long\)&\(\(struct uniname2ctype_pool_t \*\)0\)->uniname2ctype_pool_(str\d+),\s+/,
|
||||||
'offsetof(\1, \2), ')
|
'uniname2ctype_offset(\1), ')
|
||||||
puts line
|
puts line
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue