* ext/nkf/nkf-utf8/nkf.c (nkf_each_char_to_hex, encode_fallback_subchar,
e2w_conv): support C90 compiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
5e37739deb
commit
e72073102c
@ -1,3 +1,8 @@
|
|||||||
|
Wed Mar 29 10:11:31 2006 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/nkf/nkf-utf8/nkf.c (nkf_each_char_to_hex, encode_fallback_subchar,
|
||||||
|
e2w_conv): support C90 compiler.
|
||||||
|
|
||||||
Mon Mar 27 22:45:37 2006 NARUSE, Yui <naruse@ruby-lang.org>
|
Mon Mar 27 22:45:37 2006 NARUSE, Yui <naruse@ruby-lang.org>
|
||||||
|
|
||||||
* ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: imported nkf 2.0.6.
|
* ext/nkf/nkf-utf8/{nkf.c, utf8tbl.c}: imported nkf 2.0.6.
|
||||||
|
@ -3324,8 +3324,8 @@ nkf_each_char_to_hex(f, c)
|
|||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
const char *hex = "0123456789ABCDEF";
|
const char *hex = "0123456789ABCDEF";
|
||||||
c &= 0x00FFFFFF;
|
|
||||||
int shift = 20;
|
int shift = 20;
|
||||||
|
c &= 0x00FFFFFF;
|
||||||
while(shift >= 0){
|
while(shift >= 0){
|
||||||
if(c >= 1<<shift){
|
if(c >= 1<<shift){
|
||||||
while(shift >= 0){
|
while(shift >= 0){
|
||||||
@ -3414,10 +3414,10 @@ void
|
|||||||
encode_fallback_subchar(c)
|
encode_fallback_subchar(c)
|
||||||
int c;
|
int c;
|
||||||
{
|
{
|
||||||
|
int shift = 16;
|
||||||
c = unicode_subchar;
|
c = unicode_subchar;
|
||||||
(*oconv)((c>>8)&0xFF, c&0xFF);
|
(*oconv)((c>>8)&0xFF, c&0xFF);
|
||||||
return;
|
return;
|
||||||
int shift = 16;
|
|
||||||
while(shift >= 0){
|
while(shift >= 0){
|
||||||
if(c >= 1<<shift){
|
if(c >= 1<<shift){
|
||||||
while(shift >= 0){
|
while(shift >= 0){
|
||||||
@ -3446,10 +3446,10 @@ e2w_conv(c2, c1)
|
|||||||
p = euc_to_utf8_1byte;
|
p = euc_to_utf8_1byte;
|
||||||
#ifdef X0212_ENABLE
|
#ifdef X0212_ENABLE
|
||||||
} else if (c2 >> 8 == 0x8f){
|
} else if (c2 >> 8 == 0x8f){
|
||||||
|
extern const unsigned short *const x0212_to_utf8_2bytes[];
|
||||||
if(ms_ucs_map_f == UCS_MAP_ASCII&& c2 == 0x8F22 && c1 == 0x43){
|
if(ms_ucs_map_f == UCS_MAP_ASCII&& c2 == 0x8F22 && c1 == 0x43){
|
||||||
return 0xA6;
|
return 0xA6;
|
||||||
}
|
}
|
||||||
extern const unsigned short *const x0212_to_utf8_2bytes[];
|
|
||||||
c2 = (c2&0x7f) - 0x21;
|
c2 = (c2&0x7f) - 0x21;
|
||||||
if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
|
if (0<=c2 && c2<sizeof_euc_to_utf8_2bytes)
|
||||||
p = x0212_to_utf8_2bytes[c2];
|
p = x0212_to_utf8_2bytes[c2];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user