summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-11-29 11:26:57 +0100
committerJörg Frings-Fürst <debian@jff.email>2019-11-29 11:26:57 +0100
commit7f4e90f2759d6a15812172ee19f3ad5b58940beb (patch)
tree5f90c63b8ba73f4ecd23d6e642c1ab34dccea033 /src/unicode.c
parent68d1ec60c90d27c511d51ce0bef44b132a7ddf11 (diff)
parent7e149a97d276ce3b4c5e34f965766c8e40e03fef (diff)
Merge branch 'feature/upstream' into develop
Diffstat (limited to 'src/unicode.c')
-rw-r--r--src/unicode.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/unicode.c b/src/unicode.c
index 5820319..474436a 100644
--- a/src/unicode.c
+++ b/src/unicode.c
@@ -2,7 +2,7 @@
unicode.c - Oniguruma (regular expression library)
**********************************************************************/
/*-
- * Copyright (c) 2002-2019 K.Kosako <sndgk393 AT ybb DOT ne DOT jp>
+ * Copyright (c) 2002-2019 K.Kosako
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -356,16 +356,15 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (fn = 0; fn < 2; fn++) {
int index;
cs[fn][0] = FOLDS2_FOLD(buk->index)[fn];
+ ncs[fn] = 1;
index = onigenc_unicode_fold1_key(&cs[fn][0]);
if (index >= 0) {
int m = FOLDS1_UNFOLDS_NUM(index);
for (i = 0; i < m; i++) {
cs[fn][i+1] = FOLDS1_UNFOLDS(index)[i];
}
- ncs[fn] = m + 1;
+ ncs[fn] += m;
}
- else
- ncs[fn] = 1;
}
for (i = 0; i < ncs[0]; i++) {
@@ -393,16 +392,15 @@ onigenc_unicode_get_case_fold_codes_by_str(OnigEncoding enc,
for (fn = 0; fn < 3; fn++) {
int index;
cs[fn][0] = FOLDS3_FOLD(buk->index)[fn];
+ ncs[fn] = 1;
index = onigenc_unicode_fold1_key(&cs[fn][0]);
if (index >= 0) {
int m = FOLDS1_UNFOLDS_NUM(index);
for (i = 0; i < m; i++) {
cs[fn][i+1] = FOLDS1_UNFOLDS(index)[i];
}
- ncs[fn] = m + 1;
+ ncs[fn] += m;
}
- else
- ncs[fn] = 1;
}
for (i = 0; i < ncs[0]; i++) {