summaryrefslogtreecommitdiff
path: root/ext/nkf/nkf-utf8
diff options
context:
space:
mode:
authorsvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-15 09:55:26 +0000
committersvn <svn@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-12-15 09:55:26 +0000
commit298180f0450df6e975057cc7e90b3ae3248586fc (patch)
treec80b5c584f5539a315eb3be4e7433c0cd4879d82 /ext/nkf/nkf-utf8
parent96b32a0108a0e2043d2546130f2c076111f19e57 (diff)
* expand tabs.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66407 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/nkf/nkf-utf8')
-rw-r--r--ext/nkf/nkf-utf8/nkf.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/ext/nkf/nkf-utf8/nkf.c b/ext/nkf/nkf-utf8/nkf.c
index cc438a5..ed091ef 100644
--- a/ext/nkf/nkf-utf8/nkf.c
+++ b/ext/nkf/nkf-utf8/nkf.c
@@ -1113,23 +1113,23 @@ encode_fallback_java(nkf_char c)
if(!nkf_char_unicode_bmp_p(c)){
int high = (c >> 10) + NKF_INT32_C(0xD7C0); /* high surrogate */
int low = (c & 0x3FF) + NKF_INT32_C(0xDC00); /* low surrogate */
- (*oconv)(0, 'u');
- (*oconv)(0, bin2hex(high>>12));
- (*oconv)(0, bin2hex(high>> 8));
- (*oconv)(0, bin2hex(high>> 4));
- (*oconv)(0, bin2hex(high ));
- (*oconv)(0, '\\');
- (*oconv)(0, 'u');
- (*oconv)(0, bin2hex(low>>12));
- (*oconv)(0, bin2hex(low>> 8));
- (*oconv)(0, bin2hex(low>> 4));
- (*oconv)(0, bin2hex(low ));
+ (*oconv)(0, 'u');
+ (*oconv)(0, bin2hex(high>>12));
+ (*oconv)(0, bin2hex(high>> 8));
+ (*oconv)(0, bin2hex(high>> 4));
+ (*oconv)(0, bin2hex(high ));
+ (*oconv)(0, '\\');
+ (*oconv)(0, 'u');
+ (*oconv)(0, bin2hex(low>>12));
+ (*oconv)(0, bin2hex(low>> 8));
+ (*oconv)(0, bin2hex(low>> 4));
+ (*oconv)(0, bin2hex(low ));
}else{
(*oconv)(0, 'u');
- (*oconv)(0, bin2hex(c>>12));
- (*oconv)(0, bin2hex(c>> 8));
- (*oconv)(0, bin2hex(c>> 4));
- (*oconv)(0, bin2hex(c ));
+ (*oconv)(0, bin2hex(c>>12));
+ (*oconv)(0, bin2hex(c>> 8));
+ (*oconv)(0, bin2hex(c>> 4));
+ (*oconv)(0, bin2hex(c ));
}
return;
}
@@ -1956,17 +1956,17 @@ unicode_to_jis_common(nkf_char c2, nkf_char c1, nkf_char c0, nkf_char *p2, nkf_c
}else return -1;
#ifdef SHIFTJIS_CP932
if (!ret&& is_eucg3(*p2)) {
- if (cp932inv_f) {
- if (encode_fallback) ret = 1;
- }
- else {
- nkf_char s2, s1;
- if (e2s_conv(*p2, *p1, &s2, &s1) == 0) {
- s2e_conv(s2, s1, p2, p1);
- }else{
- ret = 1;
- }
- }
+ if (cp932inv_f) {
+ if (encode_fallback) ret = 1;
+ }
+ else {
+ nkf_char s2, s1;
+ if (e2s_conv(*p2, *p1, &s2, &s1) == 0) {
+ s2e_conv(s2, s1, p2, p1);
+ }else{
+ ret = 1;
+ }
+ }
}
#endif
return ret;