diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2020-11-03 00:56:26 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2020-11-03 00:56:26 +0000 |
commit | 6d5d6429d5880f9fdf4b4b54c0fb53e44b3927f9 (patch) | |
tree | db7a5d68a7b148f62f63c9562391af1272e3f376 /deskutils/calibre/files/patch-icu68 | |
parent | graphics/mesa-devel: update to 20.2.b.3686 (diff) |
devel/icu: update to 68.1
Changes: http://site.icu-project.org/download/68
ABI: https://abi-laboratory.pro/tracker/timeline/icu4c/
Reported by: GitHub (watch releases)
Diffstat (limited to 'deskutils/calibre/files/patch-icu68')
-rw-r--r-- | deskutils/calibre/files/patch-icu68 | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/deskutils/calibre/files/patch-icu68 b/deskutils/calibre/files/patch-icu68 new file mode 100644 index 000000000000..0b7d2be8208c --- /dev/null +++ b/deskutils/calibre/files/patch-icu68 @@ -0,0 +1,97 @@ +Regressed by https://github.com/unicode-org/icu/commit/c3fe7e09d844 + +src/calibre/utils/icu.c:246:29: error: use of undeclared identifier 'TRUE' + if (asz == 0) { found = TRUE; goto end; } + ^ +src/calibre/utils/icu.c:253:42: error: use of undeclared identifier 'TRUE' + if (pos != USEARCH_DONE) found = TRUE; + ^ + +--- src/calibre/utils/icu.c.orig 2020-08-21 01:39:18 UTC ++++ src/calibre/utils/icu.c +@@ -243,14 +243,14 @@ icu_Collator_contains(icu_Collator *self, PyObject *ar + + a = python_to_icu(a_, &asz); + if (a == NULL) goto end; +- if (asz == 0) { found = TRUE; goto end; } ++ if (asz == 0) { found = true; goto end; } + b = python_to_icu(b_, &bsz); + if (b == NULL) goto end; + + search = usearch_openFromCollator(a, asz, b, bsz, self->collator, NULL, &status); + if (U_SUCCESS(status)) { + pos = usearch_first(search, &status); +- if (pos != USEARCH_DONE) found = TRUE; ++ if (pos != USEARCH_DONE) found = true; + } + end: + if (search != NULL) usearch_close(search); +--- src/calibre/utils/matcher.c.orig 2020-08-21 01:39:18 UTC ++++ src/calibre/utils/matcher.c +@@ -15,9 +15,6 @@ + #define inline + #endif + +-typedef unsigned char bool; +-#define TRUE 1 +-#define FALSE 0 + #define MAX(x, y) ((x > y) ? x : y) + #define nullfree(x) if(x != NULL) free(x); x = NULL; + +@@ -240,10 +237,10 @@ static bool create_searches(UStringSearch **searches, + U16_FWD_1(needle, i, needle_len); + if (pos == i) break; + searches[pos] = usearch_openFromCollator(needle + pos, i - pos, haystack, haystack_len, collator, NULL, &status); +- if (U_FAILURE(status)) { PyErr_SetString(PyExc_ValueError, u_errorName(status)); searches[pos] = NULL; return FALSE; } ++ if (U_FAILURE(status)) { PyErr_SetString(PyExc_ValueError, u_errorName(status)); searches[pos] = NULL; return false; } + } + +- return TRUE; ++ return true; + } + + static void free_searches(UStringSearch **searches, int32_t count) { +@@ -259,14 +256,14 @@ static bool match(UChar **items, int32_t *item_lengths + int32_t i = 0, maxhl = 0; + int32_t r = 0, *positions = NULL; + MatchInfo *matches = NULL; +- bool ok = FALSE; ++ bool ok = false; + MemoryItem ***memo = NULL; + int32_t needle_len = u_strlen(needle); + UStringSearch **searches = NULL; + + if (needle_len <= 0 || item_count <= 0) { + for (i = 0; i < (int32_t)item_count; i++) match_results[i].score = 0.0; +- ok = TRUE; ++ ok = true; + goto end; + } + +@@ -289,7 +286,7 @@ static bool match(UChar **items, int32_t *item_lengths + + if (maxhl <= 0) { + for (i = 0; i < (int32_t)item_count; i++) match_results[i].score = 0.0; +- ok = TRUE; ++ ok = true; + goto end; + } + +@@ -308,7 +305,7 @@ static bool match(UChar **items, int32_t *item_lengths + convert_positions(positions, final_positions + i * needle_char_len, matches[i].haystack, needle_char_len, needle_len, match_results[i].score); + } + +- ok = TRUE; ++ ok = true; + end: + nullfree(positions); + nullfree(stack.items); +@@ -401,7 +398,7 @@ static PyObject * + Matcher_calculate_scores(Matcher *self, PyObject *args) { + int32_t *final_positions = NULL, *p; + Match *matches = NULL; +- bool ok = FALSE; ++ bool ok = false; + uint32_t i = 0, needle_char_len = 0, j = 0; + PyObject *items = NULL, *score = NULL, *positions = NULL, *pneedle = NULL; + UChar *needle = NULL; |