1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

remove trailing spaces

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46044 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2014-05-22 10:58:08 +00:00
parent 4c9ec80ece
commit bd403755d0
3 changed files with 8 additions and 8 deletions

View file

@ -6,19 +6,19 @@
end end
transcode_tblgen("", "amp_escape", [ transcode_tblgen("", "amp_escape", [
["{00-25,27-FF}", :nomap], ["{00-25,27-FF}", :nomap],
["26", hexstr("&")] ["26", hexstr("&")]
], nil) ], nil)
transcode_tblgen("", "xml_text_escape", [ transcode_tblgen("", "xml_text_escape", [
["{00-25,27-3B,3D,3F-FF}", :nomap], ["{00-25,27-3B,3D,3F-FF}", :nomap],
["26", hexstr("&")], ["26", hexstr("&")],
["3C", hexstr("<")], ["3C", hexstr("<")],
["3E", hexstr(">")] ["3E", hexstr(">")]
], nil) ], nil)
transcode_tblgen("", "xml_attr_content_escape", [ transcode_tblgen("", "xml_attr_content_escape", [
["{00-21,23-25,27-3B,3D,3F-FF}", :nomap], ["{00-21,23-25,27-3B,3D,3F-FF}", :nomap],
["22", hexstr(""")], ["22", hexstr(""")],
["26", hexstr("&")], ["26", hexstr("&")],
["3C", hexstr("<")], ["3C", hexstr("<")],

View file

@ -2,9 +2,9 @@
<% <%
require "gb18030-tbl" require "gb18030-tbl"
def linear(code) def linear(code)
bytes = [code].pack('H8').unpack 'C4' bytes = [code].pack('H8').unpack 'C4'
((bytes[0]*10+bytes[1])*126+bytes[2])*10+bytes[3] ((bytes[0]*10+bytes[1])*126+bytes[2])*10+bytes[3]
end end
@ -31,7 +31,7 @@
code code
end end
end end
def calculate_differences_utf_gb(table) def calculate_differences_utf_gb(table)
table_rev = table.map{|a,b| [b,a]} table_rev = table.map{|a,b| [b,a]}
table_rev.collect do |code| table_rev.collect do |code|
@ -123,7 +123,7 @@ fun_sio_to_gb18030(void *statep, const unsigned char *s, size_t l, VALUE info, u
{ {
unsigned int diff = (unsigned int)(info >> 8); unsigned int diff = (unsigned int)(info >> 8);
unsigned int u; /* Unicode Scalar Value */ unsigned int u; /* Unicode Scalar Value */
u = ((s[0]&0x0F)<<12) | ((s[1]&0x3F)<<6) | (s[2]&0x3F); u = ((s[0]&0x0F)<<12) | ((s[1]&0x3F)<<6) | (s[2]&0x3F);
if (diff & 0x20000) { /* GB18030 4 bytes */ if (diff & 0x20000) { /* GB18030 4 bytes */

View file

@ -25,7 +25,7 @@ get_fsname(VALUE self, VALUE str)
FilePathValue(str); FilePathValue(str);
path = RSTRING_PTR(str); path = RSTRING_PTR(str);
fp = setmntent("/etc/mtab", "r"); fp = setmntent("/etc/mtab", "r");
if (!fp) rb_sys_fail("setmntent(/etb/mtab)");; if (!fp) rb_sys_fail("setmntent(/etb/mtab)");;
while (getmntent_r(fp, &mntbuf, buf, buflen)) { while (getmntent_r(fp, &mntbuf, buf, buflen)) {