summaryrefslogtreecommitdiff
path: root/src/sjis.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
committerJörg Frings-Fürst <debian@jff.email>2018-12-21 20:06:28 +0100
commitf883fa5bd37b6420f5dc25027a68289c64028063 (patch)
tree80452d3b1840e553402538830e903ed9fecdb3a8 /src/sjis.c
parent66dfd6613394a8903701840bbc9d67de537e597e (diff)
parentf1aff0cc17934fa45d9520dae6986562e033cb8f (diff)
Merge branch 'release/debian/6.9.1-1'debian/6.9.1-1
Diffstat (limited to 'src/sjis.c')
-rw-r--r--src/sjis.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/sjis.c b/src/sjis.c
index 4ffd44b..aaf4cb8 100644
--- a/src/sjis.c
+++ b/src/sjis.c
@@ -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
};