From 5f59a34ab747dde8ede7357f3431bf06bd6002fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 8 Mar 2026 17:28:33 +0100 Subject: New upstream version 1.4.2 --- lib/uninorm/u-normcmp.h | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'lib/uninorm/u-normcmp.h') 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 , 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) -- cgit v1.2.3