summaryrefslogtreecommitdiff
path: root/enc/emacs_mule.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-11 10:34:59 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-11 10:34:59 +0000
commitd51b0615658aeb4c62a6437e43fb6aefa5d7df9e (patch)
tree3d849af06bcba39e2193a61b4edb959c4de9ebea /enc/emacs_mule.c
parent9886722caa675951b0d67c306ae143ecaf7ce067 (diff)
* include/ruby/oniguruma.h (OnigCodePoint): unsigned long to unsigned int.
* include/ruby/encoding.h (rb_enc_codepoint): ditto. * encoding.c (rb_enc_codepoint): signed int to unsigned int. * encoding.c (rb_enc_ascget): ditto. * string.c (rb_str_casecmp): ditto. * string.c (enc_succ_alnum_char): ditto. * string.c (rb_str_inspect): ditto. * string.c (rb_str_upcase_bang): ditto. * string.c (rb_str_downcase_bang): ditto. * string.c (rb_str_capitalize_bang): ditto. * string.c (rb_str_swapcase_bang): ditto. * string.c (struct tr): ditto. * string.c (trnext): ditto. * string.c (tr_trans): ditto. * string.c (tr_setup_table): ditto. * string.c (tr_find): ditto. * string.c (rb_str_delete_bang): ditto. * string.c (rb_str_squeeze_bang): ditto. * string.c (rb_str_count): ditto. * string.c (rb_str_split_m): ditto. * string.c (rb_str_each_line): ditto. * string.c (rb_str_lstrip_bang): ditto. * string.c (rb_str_rstrip_bang): ditto. * string.c (rb_str_intern): ditto. * dir.c (char_casecmp): ditto. * sprintf.c (rb_str_format): ditto. * enc/emacs_mule.c (mbc_to_code): to be 32bit clean. * enc/emacs_mule.c (code_to_mbc): ditto. * enc/gb18030.c (mbc_to_code): ditto. * enc/gb18030.c (code_to_mbc): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19295 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'enc/emacs_mule.c')
-rw-r--r--enc/emacs_mule.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/enc/emacs_mule.c b/enc/emacs_mule.c
index 9ebb443..e97bb6a 100644
--- a/enc/emacs_mule.c
+++ b/enc/emacs_mule.c
@@ -237,7 +237,6 @@ mbc_to_code(const UChar* p, const UChar* end, OnigEncoding enc)
c = *p++;
n <<= 8; n += c;
}
- n &= 0x7FFFFFFF;
return n;
}
@@ -258,7 +257,7 @@ code_to_mbc(OnigCodePoint code, UChar *buf, OnigEncoding enc)
{
UChar *p = buf;
- if ((code & 0xff000000) != 0) *p++ = (UChar )(((code >> 24) | 0x80));
+ if ((code & 0xff000000) != 0) *p++ = (UChar )(((code >> 24) & 0xff));
if ((code & 0xff0000) != 0) *p++ = (UChar )(((code >> 16) & 0xff));
if ((code & 0xff00) != 0) *p++ = (UChar )(((code >> 8) & 0xff));
*p++ = (UChar )(code & 0xff);