summaryrefslogtreecommitdiff
path: root/src/unicode.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2019-11-29 11:26:35 +0100
committerJörg Frings-Fürst <debian@jff.email>2019-11-29 11:26:35 +0100
commit4216de6a3336cbc6dddb572cb7e6ab6193bf3729 (patch)
tree327a40dae71db474527a1281a205cc2ebddb2ce6 /src/unicode.c
parent40f3d0030e6e98bcb02d6523e5ee48497dec49a6 (diff)
New upstream version 6.9.4upstream/6.9.4
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++) {