diff options
author | Jörg Frings-Fürst <debian@jff.email> | 2018-12-21 13:48:39 +0100 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff.email> | 2018-12-21 13:48:39 +0100 |
commit | dba488ef4af76742cde7f5b03ef6f5453146eda6 (patch) | |
tree | 11c318e8ebd9eaab67edb50af33d510092264b90 /src/sjis.c | |
parent | eb5b295d37e9150e169cc95cbbc39f6ab7b88b2f (diff) | |
parent | 70de057dbb5ea79536834e156f534279347f96f3 (diff) |
Update upstream source from tag 'upstream/6.9.1'
Update to upstream version '6.9.1'
with Debian dir 30a97dee62f9f2b7c7a57e0e6622d9f503cf0256
Diffstat (limited to 'src/sjis.c')
-rw-r--r-- | src/sjis.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -113,10 +113,7 @@ static int code_to_mbclen(OnigCodePoint code) { if (code < 256) { - if (EncLen_SJIS[(int )code] == 1) - return 1; - else - return 0; + return EncLen_SJIS[(int )code] == 1; } else if (code <= 0xffff) { return 2; @@ -188,7 +185,7 @@ is_mbc_ambiguous(OnigCaseFoldType flag, const UChar** pp, const UChar* end) { return onigenc_mbn_is_mbc_ambiguous(ONIG_ENCODING_SJIS, flag, pp, end); - + } #endif @@ -223,7 +220,7 @@ left_adjust_char_head(const UChar* start, const UChar* s) p++; break; } - } + } } len = enclen(ONIG_ENCODING_SJIS, p); if (p + len > s) return (UChar* )p; @@ -338,6 +335,6 @@ OnigEncodingType OnigEncodingSJIS = { NULL, /* init */ NULL, /* is_initialized */ is_valid_mbc_string, - ENC_FLAG_ASCII_COMPATIBLE, + ENC_FLAG_ASCII_COMPATIBLE|ENC_FLAG_SKIP_OFFSET_1_OR_0, 0, 0 }; |