summaryrefslogtreecommitdiff
path: root/lib/uninorm/u-normcmp.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:33 +0100
commit5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch)
tree056a4477fd870d454d5be5868cddab829a47f4d2 /lib/uninorm/u-normcmp.h
parent27dae84ed92f1ef0300263091972338d12e78348 (diff)
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'lib/uninorm/u-normcmp.h')
-rw-r--r--lib/uninorm/u-normcmp.h22
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)