diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:50 +0100 |
| commit | ff33e1d252f46bec1a33e28700da3282fc24047a (patch) | |
| tree | 5c15bc695be820b393a8496c5807ecafbbdeb89b /lib/uninorm/u-normcmp.h | |
| parent | b2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff) | |
| parent | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff) | |
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2'
with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'lib/uninorm/u-normcmp.h')
| -rw-r--r-- | lib/uninorm/u-normcmp.h | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/lib/uninorm/u-normcmp.h b/lib/uninorm/u-normcmp.h index 12f89d2b..ca1b24ba 100644 --- a/lib/uninorm/u-normcmp.h +++ b/lib/uninorm/u-normcmp.h @@ -1,5 +1,5 @@ /* Normalization insensitive comparison of Unicode strings. - Copyright (C) 2009-2025 Free Software Foundation, Inc. + Copyright (C) 2009-2026 Free Software Foundation, Inc. Written by Bruno Haible <bruno@clisp.org>, 2009. This file is free software. @@ -27,24 +27,18 @@ int FUNC (const UNIT *s1, size_t n1, const UNIT *s2, size_t n2, uninorm_t nf, int *resultp) { - UNIT buf1[2048 / sizeof (UNIT)]; - UNIT buf2[2048 / sizeof (UNIT)]; - UNIT *norms1; - size_t norms1_length; - UNIT *norms2; - size_t norms2_length; - int cmp; - /* Normalize S1. */ - norms1_length = sizeof (buf1) / sizeof (UNIT); - norms1 = U_NORMALIZE (nf, s1, n1, buf1, &norms1_length); + UNIT buf1[2048 / sizeof (UNIT)]; + size_t norms1_length = sizeof (buf1) / sizeof (UNIT); + UNIT *norms1 = U_NORMALIZE (nf, s1, n1, buf1, &norms1_length); if (norms1 == NULL) /* errno is set here. */ return -1; /* Normalize S2. */ - norms2_length = sizeof (buf2) / sizeof (UNIT); - norms2 = U_NORMALIZE (nf, s2, n2, buf2, &norms2_length); + UNIT buf2[2048 / sizeof (UNIT)]; + size_t norms2_length = sizeof (buf2) / sizeof (UNIT); + UNIT *norms2 = U_NORMALIZE (nf, s2, n2, buf2, &norms2_length); if (norms2 == NULL) { if (norms1 != buf1) @@ -57,7 +51,7 @@ FUNC (const UNIT *s1, size_t n1, const UNIT *s2, size_t n2, } /* Compare the normalized strings. */ - cmp = U_CMP2 (norms1, norms1_length, norms2, norms2_length); + int cmp = U_CMP2 (norms1, norms1_length, norms2, norms2_length); if (cmp > 0) cmp = 1; else if (cmp < 0) |
