mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* tool/transcode-tblgen.rb (transcode_generated_code): defined for
generating table at once. (transcode_tblgen): returns an empty string. (transcode_generate_node): ditto. * enc/trans/newline.trans: use transcode_generated_code. * enc/trans/iso2022.trans: ditto. * enc/trans/single_byte.trans: ditto. * enc/trans/utf_16_32.trans: ditto. * enc/trans/japanese.trans: ditto. * enc/trans/korean.trans: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19006 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b2efe107f
commit
8841969485
8 changed files with 152 additions and 125 deletions
|
@ -3,9 +3,23 @@
|
|||
<%
|
||||
map_normalize = {}
|
||||
map_normalize["{00-ff}"] = :func_so
|
||||
|
||||
transcode_generate_node(ActionMap.parse(map_normalize), "universal_newline")
|
||||
|
||||
map_crlf = {}
|
||||
map_crlf["{00-09,0b-ff}"] = :nomap
|
||||
map_crlf["0a"] = "0d0a"
|
||||
|
||||
transcode_generate_node(ActionMap.parse(map_crlf), "crlf_newline")
|
||||
|
||||
map_cr = {}
|
||||
map_cr["{00-09,0b-ff}"] = :nomap
|
||||
map_cr["0a"] = "0d"
|
||||
|
||||
transcode_generate_node(ActionMap.parse(map_cr), "cr_newline")
|
||||
%>
|
||||
|
||||
<%= transcode_generate_node(ActionMap.parse(map_normalize), "universal_newline") %>
|
||||
<%= transcode_generated_code %>
|
||||
|
||||
static int
|
||||
fun_so_universal_newline(rb_transcoding* t, const unsigned char* s, size_t l, unsigned char* o)
|
||||
|
@ -48,14 +62,6 @@ rb_universal_newline = {
|
|||
NULL, NULL, NULL, fun_so_universal_newline
|
||||
};
|
||||
|
||||
<%
|
||||
map_crlf = {}
|
||||
map_crlf["{00-09,0b-ff}"] = :nomap
|
||||
map_crlf["0a"] = "0d0a"
|
||||
%>
|
||||
|
||||
<%= transcode_generate_node(ActionMap.parse(map_crlf), "crlf_newline") %>
|
||||
|
||||
static const rb_transcoder
|
||||
rb_crlf_newline = {
|
||||
"", "crlf_newline", &crlf_newline,
|
||||
|
@ -66,14 +72,6 @@ rb_crlf_newline = {
|
|||
NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
<%
|
||||
map_cr = {}
|
||||
map_cr["{00-09,0b-ff}"] = :nomap
|
||||
map_cr["0a"] = "0d"
|
||||
%>
|
||||
|
||||
<%= transcode_generate_node(ActionMap.parse(map_cr), "cr_newline") %>
|
||||
|
||||
static const rb_transcoder
|
||||
rb_cr_newline = {
|
||||
"", "cr_newline", &cr_newline,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue