summaryrefslogtreecommitdiff
path: root/lib/unicase
diff options
context:
space:
mode:
Diffstat (limited to 'lib/unicase')
-rw-r--r--lib/unicase/cased.c2
-rw-r--r--lib/unicase/casefold.h2
-rw-r--r--lib/unicase/caseprop.h2
-rw-r--r--lib/unicase/context.h2
-rw-r--r--lib/unicase/empty-prefix-context.c2
-rw-r--r--lib/unicase/empty-suffix-context.c2
-rw-r--r--lib/unicase/ignorable.c2
-rw-r--r--lib/unicase/invariant.h2
-rw-r--r--lib/unicase/locale-language.c5
-rw-r--r--lib/unicase/locale-languages.gperf2
-rw-r--r--lib/unicase/locale-languages.h12
-rw-r--r--lib/unicase/simple-mapping.h2
-rw-r--r--lib/unicase/special-casing.c2
-rw-r--r--lib/unicase/special-casing.in.h2
-rw-r--r--lib/unicase/tocasefold.c2
-rw-r--r--lib/unicase/tolower.c2
-rw-r--r--lib/unicase/totitle.c2
-rw-r--r--lib/unicase/toupper.c2
-rw-r--r--lib/unicase/u-casecmp.h22
-rw-r--r--lib/unicase/u-casecoll.h24
-rw-r--r--lib/unicase/u-casefold.h2
-rw-r--r--lib/unicase/u-casemap.h150
-rw-r--r--lib/unicase/u-casexfrm.h30
-rw-r--r--lib/unicase/u-ct-casefold.h26
-rw-r--r--lib/unicase/u-ct-totitle.h165
-rw-r--r--lib/unicase/u-is-cased.h31
-rw-r--r--lib/unicase/u-is-invariant.h21
-rw-r--r--lib/unicase/u-prefix-context.h2
-rw-r--r--lib/unicase/u-suffix-context.h2
-rw-r--r--lib/unicase/u-totitle.h2
-rw-r--r--lib/unicase/u16-casecmp.c2
-rw-r--r--lib/unicase/u16-casecoll.c2
-rw-r--r--lib/unicase/u16-casefold.c2
-rw-r--r--lib/unicase/u16-casemap.c2
-rw-r--r--lib/unicase/u16-casexfrm.c2
-rw-r--r--lib/unicase/u16-ct-casefold.c2
-rw-r--r--lib/unicase/u16-ct-tolower.c2
-rw-r--r--lib/unicase/u16-ct-totitle.c2
-rw-r--r--lib/unicase/u16-ct-toupper.c2
-rw-r--r--lib/unicase/u16-is-cased.c2
-rw-r--r--lib/unicase/u16-is-casefolded.c2
-rw-r--r--lib/unicase/u16-is-invariant.c2
-rw-r--r--lib/unicase/u16-is-lowercase.c2
-rw-r--r--lib/unicase/u16-is-titlecase.c2
-rw-r--r--lib/unicase/u16-is-uppercase.c2
-rw-r--r--lib/unicase/u16-prefix-context.c2
-rw-r--r--lib/unicase/u16-suffix-context.c2
-rw-r--r--lib/unicase/u16-tolower.c2
-rw-r--r--lib/unicase/u16-totitle.c2
-rw-r--r--lib/unicase/u16-toupper.c2
-rw-r--r--lib/unicase/u32-casecmp.c2
-rw-r--r--lib/unicase/u32-casecoll.c2
-rw-r--r--lib/unicase/u32-casefold.c2
-rw-r--r--lib/unicase/u32-casemap.c2
-rw-r--r--lib/unicase/u32-casexfrm.c2
-rw-r--r--lib/unicase/u32-ct-casefold.c2
-rw-r--r--lib/unicase/u32-ct-tolower.c2
-rw-r--r--lib/unicase/u32-ct-totitle.c2
-rw-r--r--lib/unicase/u32-ct-toupper.c2
-rw-r--r--lib/unicase/u32-is-cased.c2
-rw-r--r--lib/unicase/u32-is-casefolded.c2
-rw-r--r--lib/unicase/u32-is-invariant.c2
-rw-r--r--lib/unicase/u32-is-lowercase.c2
-rw-r--r--lib/unicase/u32-is-titlecase.c2
-rw-r--r--lib/unicase/u32-is-uppercase.c2
-rw-r--r--lib/unicase/u32-prefix-context.c2
-rw-r--r--lib/unicase/u32-suffix-context.c2
-rw-r--r--lib/unicase/u32-tolower.c2
-rw-r--r--lib/unicase/u32-totitle.c2
-rw-r--r--lib/unicase/u32-toupper.c2
-rw-r--r--lib/unicase/u8-casecmp.c2
-rw-r--r--lib/unicase/u8-casecoll.c2
-rw-r--r--lib/unicase/u8-casefold.c5
-rw-r--r--lib/unicase/u8-casemap.c2
-rw-r--r--lib/unicase/u8-casexfrm.c2
-rw-r--r--lib/unicase/u8-ct-casefold.c2
-rw-r--r--lib/unicase/u8-ct-tolower.c2
-rw-r--r--lib/unicase/u8-ct-totitle.c2
-rw-r--r--lib/unicase/u8-ct-toupper.c2
-rw-r--r--lib/unicase/u8-is-cased.c2
-rw-r--r--lib/unicase/u8-is-casefolded.c2
-rw-r--r--lib/unicase/u8-is-invariant.c2
-rw-r--r--lib/unicase/u8-is-lowercase.c2
-rw-r--r--lib/unicase/u8-is-titlecase.c2
-rw-r--r--lib/unicase/u8-is-uppercase.c2
-rw-r--r--lib/unicase/u8-prefix-context.c2
-rw-r--r--lib/unicase/u8-suffix-context.c2
-rw-r--r--lib/unicase/u8-tolower.c5
-rw-r--r--lib/unicase/u8-totitle.c5
-rw-r--r--lib/unicase/u8-toupper.c5
-rw-r--r--lib/unicase/ulc-casecmp.c16
-rw-r--r--lib/unicase/ulc-casecoll.c2
-rw-r--r--lib/unicase/ulc-casexfrm.c16
-rw-r--r--lib/unicase/unicasemap.h2
94 files changed, 314 insertions, 380 deletions
diff --git a/lib/unicase/cased.c b/lib/unicase/cased.c
index 580a6fd0..356e2e4e 100644
--- a/lib/unicase/cased.c
+++ b/lib/unicase/cased.c
@@ -1,5 +1,5 @@
/* Test whether a Unicode character is cased.
- Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/unicase/casefold.h b/lib/unicase/casefold.h
index 6373ced1..573ae4fd 100644
--- a/lib/unicase/casefold.h
+++ b/lib/unicase/casefold.h
@@ -1,5 +1,5 @@
/* Casefolding of Unicode characters.
- 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.
diff --git a/lib/unicase/caseprop.h b/lib/unicase/caseprop.h
index 2310dfd6..a469f316 100644
--- a/lib/unicase/caseprop.h
+++ b/lib/unicase/caseprop.h
@@ -1,5 +1,5 @@
/* Case related properties of Unicode characters.
- 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.
diff --git a/lib/unicase/context.h b/lib/unicase/context.h
index 2227e5b9..5b1c8b62 100644
--- a/lib/unicase/context.h
+++ b/lib/unicase/context.h
@@ -1,5 +1,5 @@
/* Case-mapping contexts of UTF-8/UTF-16/UTF-32 substring.
- 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.
diff --git a/lib/unicase/empty-prefix-context.c b/lib/unicase/empty-prefix-context.c
index 4c4d0b8b..897e9f40 100644
--- a/lib/unicase/empty-prefix-context.c
+++ b/lib/unicase/empty-prefix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of empty prefix string.
- 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.
diff --git a/lib/unicase/empty-suffix-context.c b/lib/unicase/empty-suffix-context.c
index c637857d..c000056f 100644
--- a/lib/unicase/empty-suffix-context.c
+++ b/lib/unicase/empty-suffix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of empty suffix string.
- 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.
diff --git a/lib/unicase/ignorable.c b/lib/unicase/ignorable.c
index e17ccaba..3e17f6af 100644
--- a/lib/unicase/ignorable.c
+++ b/lib/unicase/ignorable.c
@@ -1,5 +1,5 @@
/* Test whether a Unicode character is case-ignorable.
- Copyright (C) 2002, 2006-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/unicase/invariant.h b/lib/unicase/invariant.h
index d3a346b7..5059aef5 100644
--- a/lib/unicase/invariant.h
+++ b/lib/unicase/invariant.h
@@ -1,5 +1,5 @@
/* Internal functions for Unicode character case mappings.
- 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.
diff --git a/lib/unicase/locale-language.c b/lib/unicase/locale-language.c
index 8a064acf..0481e9b7 100644
--- a/lib/unicase/locale-language.c
+++ b/lib/unicase/locale-language.c
@@ -1,5 +1,5 @@
/* Language code of current locale.
- 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.
@@ -39,10 +39,9 @@ const char *
uc_locale_language (void)
{
const char *locale_name = gl_locale_name (LC_CTYPE, "LC_CTYPE");
- const char *p;
/* Find the end of the language portion. */
- p = locale_name;
+ const char *p = locale_name;
while (*p != '\0' && *p != '_' && *p != '.' && *p != '@')
p++;
diff --git a/lib/unicase/locale-languages.gperf b/lib/unicase/locale-languages.gperf
index 26a31f11..fb1eb1bc 100644
--- a/lib/unicase/locale-languages.gperf
+++ b/lib/unicase/locale-languages.gperf
@@ -1,5 +1,5 @@
/* Language codes of locales.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is free software.
It is dual-licensed under "the GNU LGPLv3+ or the GNU GPLv2+".
diff --git a/lib/unicase/locale-languages.h b/lib/unicase/locale-languages.h
index 373622f1..a82829b2 100644
--- a/lib/unicase/locale-languages.h
+++ b/lib/unicase/locale-languages.h
@@ -1,4 +1,4 @@
-/* ANSI-C code produced by gperf version 3.2 */
+/* ANSI-C code produced by gperf version 3.3 */
/* Command-line: gperf -m 10 unicase/locale-languages.gperf */
/* Computed positions: -k'1-3' */
@@ -84,17 +84,17 @@ uc_locale_language_hash (register const char *str, register size_t len)
{
default:
hval += asso_values[(unsigned char)str[2]+2];
-#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
-#elif defined __GNUC__ && __GNUC__ >= 7
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
case 2:
hval += asso_values[(unsigned char)str[1]+17];
-#if defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang_major__ && defined __clang_minor__ && __clang_major__ + (__clang_minor__ >= 9) > 3))
+#if (defined __cplusplus && (__cplusplus >= 201703L || (__cplusplus >= 201103L && defined __clang__ && __clang_major__ + (__clang_minor__ >= 9) > 3))) || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 202000L && ((defined __GNUC__ && __GNUC__ >= 10) || (defined __clang__ && __clang_major__ >= 9)))
[[fallthrough]];
-#elif defined __GNUC__ && __GNUC__ >= 7
+#elif (defined __GNUC__ && __GNUC__ >= 7) || (defined __clang__ && __clang_major__ >= 10)
__attribute__ ((__fallthrough__));
#endif
/*FALLTHROUGH*/
@@ -1034,7 +1034,7 @@ uc_locale_languages_lookup (register const char *str, register size_t len)
return s;
}
}
- return 0;
+ return (const char *) 0;
}
#line 295 "unicase/locale-languages.gperf"
diff --git a/lib/unicase/simple-mapping.h b/lib/unicase/simple-mapping.h
index 0c4c75b3..2b3d21d6 100644
--- a/lib/unicase/simple-mapping.h
+++ b/lib/unicase/simple-mapping.h
@@ -1,5 +1,5 @@
/* Simple case mapping for Unicode characters.
- Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/unicase/special-casing.c b/lib/unicase/special-casing.c
index 3f61bbdb..befde291 100644
--- a/lib/unicase/special-casing.c
+++ b/lib/unicase/special-casing.c
@@ -1,5 +1,5 @@
/* Special casing table.
- 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.
diff --git a/lib/unicase/special-casing.in.h b/lib/unicase/special-casing.in.h
index 6ea5f800..21ec9e12 100644
--- a/lib/unicase/special-casing.in.h
+++ b/lib/unicase/special-casing.in.h
@@ -1,5 +1,5 @@
/* Special casing table.
- 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.
diff --git a/lib/unicase/tocasefold.c b/lib/unicase/tocasefold.c
index c8d33866..60d4ca11 100644
--- a/lib/unicase/tocasefold.c
+++ b/lib/unicase/tocasefold.c
@@ -1,5 +1,5 @@
/* Casefold mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/unicase/tolower.c b/lib/unicase/tolower.c
index a1c898ef..89676ad6 100644
--- a/lib/unicase/tolower.c
+++ b/lib/unicase/tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/unicase/totitle.c b/lib/unicase/totitle.c
index 1b44a87a..32924213 100644
--- a/lib/unicase/totitle.c
+++ b/lib/unicase/totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software.
diff --git a/lib/unicase/toupper.c b/lib/unicase/toupper.c
index 36840a93..86cbffee 100644
--- a/lib/unicase/toupper.c
+++ b/lib/unicase/toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/lib/unicase/u-casecmp.h b/lib/unicase/u-casecmp.h
index 4869e335..f1515e11 100644
--- a/lib/unicase/u-casecmp.h
+++ b/lib/unicase/u-casecmp.h
@@ -1,5 +1,5 @@
/* Case and 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,29 +27,23 @@ int
FUNC (const SRC_UNIT *s1, size_t n1, const SRC_UNIT *s2, size_t n2,
const char *iso639_language, 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;
-
/* Optimization: There is no need to do canonical composition of each string.
Decomposition is enough. */
if (nf != NULL)
nf = uninorm_decomposing_form (nf);
/* Case-fold and normalize S1. */
- norms1_length = sizeof (buf1) / sizeof (UNIT);
- norms1 = U_CASEFOLD (s1, n1, iso639_language, nf, buf1, &norms1_length);
+ UNIT buf1[2048 / sizeof (UNIT)];
+ size_t norms1_length = sizeof (buf1) / sizeof (UNIT);
+ UNIT *norms1 = U_CASEFOLD (s1, n1, iso639_language, nf, buf1, &norms1_length);
if (norms1 == NULL)
/* errno is set here. */
return -1;
/* Case-fold and normalize S2. */
- norms2_length = sizeof (buf2) / sizeof (UNIT);
- norms2 = U_CASEFOLD (s2, n2, iso639_language, nf, buf2, &norms2_length);
+ UNIT buf2[2048 / sizeof (UNIT)];
+ size_t norms2_length = sizeof (buf2) / sizeof (UNIT);
+ UNIT *norms2 = U_CASEFOLD (s2, n2, iso639_language, nf, buf2, &norms2_length);
if (norms2 == NULL)
{
if (norms1 != buf1)
@@ -62,7 +56,7 @@ FUNC (const SRC_UNIT *s1, size_t n1, const SRC_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)
diff --git a/lib/unicase/u-casecoll.h b/lib/unicase/u-casecoll.h
index 8787b451..74c0697f 100644
--- a/lib/unicase/u-casecoll.h
+++ b/lib/unicase/u-casecoll.h
@@ -1,6 +1,6 @@
/* Locale dependent, case and 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.
@@ -28,25 +28,19 @@ int
FUNC (const UNIT *s1, size_t n1, const UNIT *s2, size_t n2,
const char *iso639_language, uninorm_t nf, int *resultp)
{
- char buf1[2048];
- char buf2[2048];
- char *transformed1;
- size_t transformed1_length;
- char *transformed2;
- size_t transformed2_length;
- int cmp;
-
/* Normalize and transform S1. */
- transformed1_length = sizeof (buf1);
- transformed1 =
+ char buf1[2048];
+ size_t transformed1_length = sizeof (buf1);
+ char *transformed1 =
U_CASEXFRM (s1, n1, iso639_language, nf, buf1, &transformed1_length);
if (transformed1 == NULL)
/* errno is set here. */
return -1;
/* Normalize and transform S2. */
- transformed2_length = sizeof (buf2);
- transformed2 =
+ char buf2[2048];
+ size_t transformed2_length = sizeof (buf2);
+ char *transformed2 =
U_CASEXFRM (s2, n2, iso639_language, nf, buf2, &transformed2_length);
if (transformed2 == NULL)
{
@@ -60,8 +54,8 @@ FUNC (const UNIT *s1, size_t n1, const UNIT *s2, size_t n2,
}
/* Compare the transformed strings. */
- cmp = memcmp2 (transformed1, transformed1_length,
- transformed2, transformed2_length);
+ int cmp = memcmp2 (transformed1, transformed1_length,
+ transformed2, transformed2_length);
if (cmp < 0)
cmp = -1;
else if (cmp > 0)
diff --git a/lib/unicase/u-casefold.h b/lib/unicase/u-casefold.h
index f87094cd..d4b6aa79 100644
--- a/lib/unicase/u-casefold.h
+++ b/lib/unicase/u-casefold.h
@@ -1,5 +1,5 @@
/* Casefolding mapping for Unicode strings (locale dependent).
- 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.
diff --git a/lib/unicase/u-casemap.h b/lib/unicase/u-casemap.h
index fba36655..abb67820 100644
--- a/lib/unicase/u-casemap.h
+++ b/lib/unicase/u-casemap.h
@@ -1,5 +1,5 @@
/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- 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.
@@ -35,10 +35,7 @@ FUNC (const UNIT *s, size_t n,
{
/* The result being accumulated. */
UNIT *result;
- size_t length;
size_t allocated;
-
- /* Initialize the accumulator. */
if (nf != NULL || resultbuf == NULL)
{
result = NULL;
@@ -49,7 +46,7 @@ FUNC (const UNIT *s, size_t n,
result = resultbuf;
allocated = *lengthp;
}
- length = 0;
+ size_t length = 0;
{
const UNIT *s_end = s + n;
@@ -97,10 +94,10 @@ FUNC (const UNIT *s, size_t n,
{
/* Does the context apply? */
int context = rule->context;
- bool applies;
-
if (context < 0)
context = - context;
+
+ bool applies;
switch (context)
{
case SCC_ALWAYS:
@@ -281,15 +278,65 @@ FUNC (const UNIT *s, size_t n,
found_mapping:
/* Found the mapping: uc maps to mapped_uc[0..mapped_count-1]. */
- {
- unsigned int i;
+ for (unsigned int i = 0; i < mapped_count; i++)
+ {
+ ucs4_t muc = mapped_uc[i];
- for (i = 0; i < mapped_count; i++)
+ /* Append muc to the result accumulator. */
+ if (length < allocated)
+ {
+ int ret = U_UCTOMB (result + length, muc, allocated - length);
+ if (ret == -1)
+ {
+ errno = EINVAL;
+ goto fail;
+ }
+ if (ret >= 0)
+ {
+ length += ret;
+ goto done_appending;
+ }
+ }
{
- ucs4_t muc = mapped_uc[i];
-
- /* Append muc to the result accumulator. */
- if (length < allocated)
+ size_t old_allocated = allocated;
+ size_t new_allocated = 2 * old_allocated;
+ if (new_allocated < 64)
+ new_allocated = 64;
+ if (new_allocated < old_allocated) /* integer overflow? */
+ abort ();
+ {
+ UNIT *larger_result;
+ if (result == NULL)
+ {
+ larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail;
+ }
+ }
+ else if (result == resultbuf)
+ {
+ larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail;
+ }
+ U_CPY (larger_result, resultbuf, length);
+ }
+ else
+ {
+ larger_result =
+ (UNIT *) realloc (result, new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail;
+ }
+ }
+ result = larger_result;
+ allocated = new_allocated;
{
int ret = U_UCTOMB (result + length, muc, allocated - length);
if (ret == -1)
@@ -297,69 +344,15 @@ FUNC (const UNIT *s, size_t n,
errno = EINVAL;
goto fail;
}
- if (ret >= 0)
- {
- length += ret;
- goto done_appending;
- }
- }
- {
- size_t old_allocated = allocated;
- size_t new_allocated = 2 * old_allocated;
- if (new_allocated < 64)
- new_allocated = 64;
- if (new_allocated < old_allocated) /* integer overflow? */
- abort ();
- {
- UNIT *larger_result;
- if (result == NULL)
- {
- larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail;
- }
- }
- else if (result == resultbuf)
- {
- larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail;
- }
- U_CPY (larger_result, resultbuf, length);
- }
- else
- {
- larger_result =
- (UNIT *) realloc (result, new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail;
- }
- }
- result = larger_result;
- allocated = new_allocated;
- {
- int ret = U_UCTOMB (result + length, muc, allocated - length);
- if (ret == -1)
- {
- errno = EINVAL;
- goto fail;
- }
- if (ret < 0)
- abort ();
- length += ret;
- goto done_appending;
- }
+ if (ret < 0)
+ abort ();
+ length += ret;
+ goto done_appending;
}
}
- done_appending: ;
}
- }
+ done_appending: ;
+ }
if (!uc_is_case_ignorable (uc))
last_char_except_ignorable = uc;
@@ -377,9 +370,8 @@ FUNC (const UNIT *s, size_t n,
if (nf != NULL)
{
/* Finally, normalize the result. */
- UNIT *normalized_result;
-
- normalized_result = U_NORMALIZE (nf, result, length, resultbuf, lengthp);
+ UNIT *normalized_result =
+ U_NORMALIZE (nf, result, length, resultbuf, lengthp);
if (normalized_result == NULL)
goto fail;
@@ -403,9 +395,7 @@ FUNC (const UNIT *s, size_t n,
else if (result != resultbuf && length < allocated)
{
/* Shrink the allocated memory if possible. */
- UNIT *memory;
-
- memory = (UNIT *) realloc (result, length * sizeof (UNIT));
+ UNIT *memory = (UNIT *) realloc (result, length * sizeof (UNIT));
if (memory != NULL)
result = memory;
}
diff --git a/lib/unicase/u-casexfrm.h b/lib/unicase/u-casexfrm.h
index c5d0c978..f9195c7f 100644
--- a/lib/unicase/u-casexfrm.h
+++ b/lib/unicase/u-casexfrm.h
@@ -1,6 +1,6 @@
/* Locale dependent transformation for case 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.
@@ -28,28 +28,22 @@ char *
FUNC (const UNIT *s, size_t n, const char *iso639_language, uninorm_t nf,
char *resultbuf, size_t *lengthp)
{
- UNIT foldedsbuf[2048 / sizeof (UNIT)];
- UNIT *foldeds;
- size_t foldeds_length;
- char convsbuf[2048];
- char *convs;
- size_t convs_length;
- char *result;
-
/* Casefold and normalize the Unicode string. */
- foldeds_length = sizeof (foldedsbuf) / sizeof (UNIT);
- foldeds = U_CASEFOLD (s, n, iso639_language, nf, foldedsbuf, &foldeds_length);
+ UNIT foldedsbuf[2048 / sizeof (UNIT)];
+ size_t foldeds_length = sizeof (foldedsbuf) / sizeof (UNIT);
+ UNIT *foldeds = U_CASEFOLD (s, n, iso639_language, nf, foldedsbuf, &foldeds_length);
if (foldeds == NULL)
/* errno is set here. */
return NULL;
/* Convert it to locale encoding. */
- convs_length = sizeof (convsbuf) - 1;
- convs = U_CONV_TO_ENCODING (locale_charset (),
- iconveh_error,
- foldeds, foldeds_length,
- NULL,
- convsbuf, &convs_length);
+ char convsbuf[2048];
+ size_t convs_length = sizeof (convsbuf) - 1;
+ char *convs = U_CONV_TO_ENCODING (locale_charset (),
+ iconveh_error,
+ foldeds, foldeds_length,
+ NULL,
+ convsbuf, &convs_length);
if (convs == NULL)
{
if (foldeds != foldedsbuf)
@@ -78,7 +72,7 @@ FUNC (const UNIT *s, size_t n, const char *iso639_language, uninorm_t nf,
}
/* Apply locale dependent transformations for comparison. */
- result = amemxfrm (convs, convs_length, resultbuf, lengthp);
+ char *result = amemxfrm (convs, convs_length, resultbuf, lengthp);
if (result == NULL)
{
if (convs != convsbuf)
diff --git a/lib/unicase/u-ct-casefold.h b/lib/unicase/u-ct-casefold.h
index bd8cee18..c2801e39 100644
--- a/lib/unicase/u-ct-casefold.h
+++ b/lib/unicase/u-ct-casefold.h
@@ -1,5 +1,5 @@
/* Casefolding mapping for Unicode substrings (locale dependent).
- 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.
@@ -53,27 +53,23 @@ FUNC (const UNIT *s, size_t n,
/* X -> nf(toCasefold(NFD(X))) or
X -> nf(toCasefold(nfd(toCasefold(NFD(X))))) */
int repeat = (uninorm_is_compat_decomposing (nf) ? 2 : 1);
- UNIT tmpbuf1[2048 / sizeof (UNIT)];
- UNIT tmpbuf2[2048 / sizeof (UNIT)];
- UNIT *tmp1;
- size_t tmp1_length;
- UNIT *tmp2;
- size_t tmp2_length;
- tmp1_length = sizeof (tmpbuf1) / sizeof (UNIT);
- tmp1 = U_NORMALIZE (UNINORM_NFD, s, n, tmpbuf1, &tmp1_length);
+ UNIT tmpbuf1[2048 / sizeof (UNIT)];
+ size_t tmp1_length = sizeof (tmpbuf1) / sizeof (UNIT);
+ UNIT *tmp1 = U_NORMALIZE (UNINORM_NFD, s, n, tmpbuf1, &tmp1_length);
if (tmp1 == NULL)
/* errno is set here. */
return NULL;
do
{
- tmp2_length = sizeof (tmpbuf2) / sizeof (UNIT);
- tmp2 = U_CASEMAP (tmp1, tmp1_length,
- prefix_context, suffix_context, iso639_language,
- uc_tocasefold, offsetof (struct special_casing_rule, casefold[0]),
- NULL,
- tmpbuf2, &tmp2_length);
+ UNIT tmpbuf2[2048 / sizeof (UNIT)];
+ size_t tmp2_length = sizeof (tmpbuf2) / sizeof (UNIT);
+ UNIT *tmp2 = U_CASEMAP (tmp1, tmp1_length,
+ prefix_context, suffix_context, iso639_language,
+ uc_tocasefold, offsetof (struct special_casing_rule, casefold[0]),
+ NULL,
+ tmpbuf2, &tmp2_length);
if (tmp2 == NULL)
{
int saved_errno = errno;
diff --git a/lib/unicase/u-ct-totitle.h b/lib/unicase/u-ct-totitle.h
index 94428726..803636c5 100644
--- a/lib/unicase/u-ct-totitle.h
+++ b/lib/unicase/u-ct-totitle.h
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-8/UTF-16/UTF-32 substrings (locale dependent).
- 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.
@@ -40,12 +40,7 @@ FUNC (const UNIT *s, size_t n,
{
/* The result being accumulated. */
UNIT *result;
- size_t length;
size_t allocated;
- /* An array containing the word break positions. */
- char *wordbreaks;
-
- /* Initialize the accumulator. */
if (nf != NULL || resultbuf == NULL)
{
result = NULL;
@@ -56,8 +51,10 @@ FUNC (const UNIT *s, size_t n,
result = resultbuf;
allocated = *lengthp;
}
- length = 0;
+ size_t length = 0;
+ /* An array containing the word break positions. */
+ char *wordbreaks;
/* Initialize the word breaks array. */
if (n > 0)
{
@@ -102,16 +99,13 @@ FUNC (const UNIT *s, size_t n,
ucs4_t uc;
int count = U_MBTOUC_UNSAFE (&uc, s, s_end - s);
- ucs4_t (*single_character_map) (ucs4_t);
- size_t offset_in_rule; /* offset in 'struct special_casing_rule' */
-
- ucs4_t mapped_uc[3];
- unsigned int mapped_count;
-
if (*wp)
/* Crossing a word boundary. */
in_word_first_part = true;
+ ucs4_t (*single_character_map) (ucs4_t);
+ size_t offset_in_rule; /* offset in 'struct special_casing_rule' */
+
/* Determine single_character_map, offset_in_rule.
There are three possibilities:
- uc should not be converted.
@@ -140,6 +134,9 @@ FUNC (const UNIT *s, size_t n,
offset_in_rule = offsetof (struct special_casing_rule, lower[0]);
}
+ ucs4_t mapped_uc[3];
+ unsigned int mapped_count;
+
/* Actually map uc. */
if (single_character_map == NULL)
{
@@ -173,10 +170,11 @@ FUNC (const UNIT *s, size_t n,
{
/* Does the context apply? */
int context = rule->context;
- bool applies;
if (context < 0)
context = - context;
+
+ bool applies;
switch (context)
{
case SCC_ALWAYS:
@@ -357,15 +355,65 @@ FUNC (const UNIT *s, size_t n,
found_mapping:
/* Found the mapping: uc maps to mapped_uc[0..mapped_count-1]. */
- {
- unsigned int i;
+ for (unsigned int i = 0; i < mapped_count; i++)
+ {
+ ucs4_t muc = mapped_uc[i];
- for (i = 0; i < mapped_count; i++)
+ /* Append muc to the result accumulator. */
+ if (length < allocated)
+ {
+ int ret = U_UCTOMB (result + length, muc, allocated - length);
+ if (ret == -1)
+ {
+ errno = EINVAL;
+ goto fail1;
+ }
+ if (ret >= 0)
+ {
+ length += ret;
+ goto done_appending;
+ }
+ }
{
- ucs4_t muc = mapped_uc[i];
-
- /* Append muc to the result accumulator. */
- if (length < allocated)
+ size_t old_allocated = allocated;
+ size_t new_allocated = 2 * old_allocated;
+ if (new_allocated < 64)
+ new_allocated = 64;
+ if (new_allocated < old_allocated) /* integer overflow? */
+ abort ();
+ {
+ UNIT *larger_result;
+ if (result == NULL)
+ {
+ larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail1;
+ }
+ }
+ else if (result == resultbuf)
+ {
+ larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail1;
+ }
+ U_CPY (larger_result, resultbuf, length);
+ }
+ else
+ {
+ larger_result =
+ (UNIT *) realloc (result, new_allocated * sizeof (UNIT));
+ if (larger_result == NULL)
+ {
+ errno = ENOMEM;
+ goto fail1;
+ }
+ }
+ result = larger_result;
+ allocated = new_allocated;
{
int ret = U_UCTOMB (result + length, muc, allocated - length);
if (ret == -1)
@@ -373,69 +421,15 @@ FUNC (const UNIT *s, size_t n,
errno = EINVAL;
goto fail1;
}
- if (ret >= 0)
- {
- length += ret;
- goto done_appending;
- }
- }
- {
- size_t old_allocated = allocated;
- size_t new_allocated = 2 * old_allocated;
- if (new_allocated < 64)
- new_allocated = 64;
- if (new_allocated < old_allocated) /* integer overflow? */
- abort ();
- {
- UNIT *larger_result;
- if (result == NULL)
- {
- larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail1;
- }
- }
- else if (result == resultbuf)
- {
- larger_result = (UNIT *) malloc (new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail1;
- }
- U_CPY (larger_result, resultbuf, length);
- }
- else
- {
- larger_result =
- (UNIT *) realloc (result, new_allocated * sizeof (UNIT));
- if (larger_result == NULL)
- {
- errno = ENOMEM;
- goto fail1;
- }
- }
- result = larger_result;
- allocated = new_allocated;
- {
- int ret = U_UCTOMB (result + length, muc, allocated - length);
- if (ret == -1)
- {
- errno = EINVAL;
- goto fail1;
- }
- if (ret < 0)
- abort ();
- length += ret;
- goto done_appending;
- }
+ if (ret < 0)
+ abort ();
+ length += ret;
+ goto done_appending;
}
}
- done_appending: ;
}
- }
+ done_appending: ;
+ }
if (!uc_is_case_ignorable (uc))
last_char_except_ignorable = uc;
@@ -456,9 +450,8 @@ FUNC (const UNIT *s, size_t n,
if (nf != NULL)
{
/* Finally, normalize the result. */
- UNIT *normalized_result;
-
- normalized_result = U_NORMALIZE (nf, result, length, resultbuf, lengthp);
+ UNIT *normalized_result =
+ U_NORMALIZE (nf, result, length, resultbuf, lengthp);
if (normalized_result == NULL)
goto fail2;
@@ -482,9 +475,7 @@ FUNC (const UNIT *s, size_t n,
else if (result != resultbuf && length < allocated)
{
/* Shrink the allocated memory if possible. */
- UNIT *memory;
-
- memory = (UNIT *) realloc (result, length * sizeof (UNIT));
+ UNIT *memory = (UNIT *) realloc (result, length * sizeof (UNIT));
if (memory != NULL)
result = memory;
}
diff --git a/lib/unicase/u-is-cased.h b/lib/unicase/u-is-cased.h
index f22282af..faddbb74 100644
--- a/lib/unicase/u-is-cased.h
+++ b/lib/unicase/u-is-cased.h
@@ -1,5 +1,5 @@
/* Test whether case matters for a Unicode string.
- 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,27 +27,20 @@ int
FUNC (const UNIT *s, size_t n, const char *iso639_language,
bool *resultp)
{
- UNIT normsbuf[2048 / sizeof (UNIT)];
- UNIT *norms;
- size_t norms_length;
- UNIT mappedbuf[2048 / sizeof (UNIT)];
- UNIT *mapped_toupper;
- UNIT *mapped_tolower;
- UNIT *mapped_totitle;
- size_t mapped_length;
-
/* Apply canonical decomposition to S. */
- norms_length = sizeof (normsbuf) / sizeof (UNIT);
- norms = U_NORMALIZE (UNINORM_NFD, s, n, normsbuf, &norms_length);
+ UNIT normsbuf[2048 / sizeof (UNIT)];
+ size_t norms_length = sizeof (normsbuf) / sizeof (UNIT);
+ UNIT *norms = U_NORMALIZE (UNINORM_NFD, s, n, normsbuf, &norms_length);
if (norms == NULL)
/* errno is set here. */
return -1;
- mapped_length = sizeof (mappedbuf) / sizeof (UNIT);
+ UNIT mappedbuf[2048 / sizeof (UNIT)];
+ size_t mapped_length = sizeof (mappedbuf) / sizeof (UNIT);
/* Apply toupper mapping. */
- mapped_toupper = U_TOUPPER (norms, norms_length, iso639_language, NULL,
- mappedbuf, &mapped_length);
+ UNIT *mapped_toupper = U_TOUPPER (norms, norms_length, iso639_language, NULL,
+ mappedbuf, &mapped_length);
if (mapped_toupper == NULL)
goto fail;
@@ -61,8 +54,8 @@ FUNC (const UNIT *s, size_t n, const char *iso639_language,
}
/* Apply tolower mapping. */
- mapped_tolower = U_TOLOWER (norms, norms_length, iso639_language, NULL,
- mapped_toupper, &mapped_length);
+ UNIT *mapped_tolower = U_TOLOWER (norms, norms_length, iso639_language, NULL,
+ mapped_toupper, &mapped_length);
if (mapped_tolower == NULL)
{
if (mapped_toupper != mappedbuf)
@@ -87,8 +80,8 @@ FUNC (const UNIT *s, size_t n, const char *iso639_language,
}
/* Apply totitle mapping. */
- mapped_totitle = U_TOTITLE (norms, norms_length, iso639_language, NULL,
- mapped_tolower, &mapped_length);
+ UNIT *mapped_totitle = U_TOTITLE (norms, norms_length, iso639_language, NULL,
+ mapped_tolower, &mapped_length);
if (mapped_totitle == NULL)
{
if (mapped_tolower != mappedbuf)
diff --git a/lib/unicase/u-is-invariant.h b/lib/unicase/u-is-invariant.h
index 131c1aa6..c859b4e5 100644
--- a/lib/unicase/u-is-invariant.h
+++ b/lib/unicase/u-is-invariant.h
@@ -1,5 +1,5 @@
/* Test whether a Unicode string is invariant under a given case mapping.
- 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.
@@ -31,24 +31,19 @@ FUNC (const UNIT *s, size_t n,
const char *iso639_language,
bool *resultp)
{
- UNIT normsbuf[2048 / sizeof (UNIT)];
- UNIT *norms;
- size_t norms_length;
- UNIT mappedbuf[2048 / sizeof (UNIT)];
- UNIT *mapped;
- size_t mapped_length;
-
/* Apply canonical decomposition to S. */
- norms_length = sizeof (normsbuf) / sizeof (UNIT);
- norms = U_NORMALIZE (UNINORM_NFD, s, n, normsbuf, &norms_length);
+ UNIT normsbuf[2048 / sizeof (UNIT)];
+ size_t norms_length = sizeof (normsbuf) / sizeof (UNIT);
+ UNIT *norms = U_NORMALIZE (UNINORM_NFD, s, n, normsbuf, &norms_length);
if (norms == NULL)
/* errno is set here. */
return -1;
/* Apply mapping. */
- mapped_length = sizeof (mappedbuf) / sizeof (UNIT);
- mapped = mapping (norms, norms_length, iso639_language, NULL,
- mappedbuf, &mapped_length);
+ UNIT mappedbuf[2048 / sizeof (UNIT)];
+ size_t mapped_length = sizeof (mappedbuf) / sizeof (UNIT);
+ UNIT *mapped = mapping (norms, norms_length, iso639_language, NULL,
+ mappedbuf, &mapped_length);
if (mapped == NULL)
{
if (norms != normsbuf)
diff --git a/lib/unicase/u-prefix-context.h b/lib/unicase/u-prefix-context.h
index 4b03a1ee..80598269 100644
--- a/lib/unicase/u-prefix-context.h
+++ b/lib/unicase/u-prefix-context.h
@@ -1,5 +1,5 @@
/* Case-mapping context of prefix UTF-8/UTF-16/UTF-32 string.
- 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.
diff --git a/lib/unicase/u-suffix-context.h b/lib/unicase/u-suffix-context.h
index f996f523..792adff5 100644
--- a/lib/unicase/u-suffix-context.h
+++ b/lib/unicase/u-suffix-context.h
@@ -1,5 +1,5 @@
/* Case-mapping context of suffix UTF-8/UTF-16/UTF-32 string.
- 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.
diff --git a/lib/unicase/u-totitle.h b/lib/unicase/u-totitle.h
index b6d62a84..e39d1954 100644
--- a/lib/unicase/u-totitle.h
+++ b/lib/unicase/u-totitle.h
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-casecmp.c b/lib/unicase/u16-casecmp.c
index e8b0ef9a..d98dd4ce 100644
--- a/lib/unicase/u16-casecmp.c
+++ b/lib/unicase/u16-casecmp.c
@@ -1,5 +1,5 @@
/* Case and normalization insensitive comparison of UTF-16 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.
diff --git a/lib/unicase/u16-casecoll.c b/lib/unicase/u16-casecoll.c
index ed7faa01..ae9bada9 100644
--- a/lib/unicase/u16-casecoll.c
+++ b/lib/unicase/u16-casecoll.c
@@ -1,6 +1,6 @@
/* Locale dependent, case and normalization insensitive comparison of UTF-16
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.
diff --git a/lib/unicase/u16-casefold.c b/lib/unicase/u16-casefold.c
index cd636b4f..ca9a7a79 100644
--- a/lib/unicase/u16-casefold.c
+++ b/lib/unicase/u16-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-16 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-casemap.c b/lib/unicase/u16-casemap.c
index 9406e99b..47b210c0 100644
--- a/lib/unicase/u16-casemap.c
+++ b/lib/unicase/u16-casemap.c
@@ -1,5 +1,5 @@
/* Case mapping for UTF-16 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-casexfrm.c b/lib/unicase/u16-casexfrm.c
index b44351c3..ffdb805e 100644
--- a/lib/unicase/u16-casexfrm.c
+++ b/lib/unicase/u16-casexfrm.c
@@ -1,6 +1,6 @@
/* Locale dependent transformation for case insensitive comparison of UTF-16
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.
diff --git a/lib/unicase/u16-ct-casefold.c b/lib/unicase/u16-ct-casefold.c
index 6e60d4ad..fb50cd17 100644
--- a/lib/unicase/u16-ct-casefold.c
+++ b/lib/unicase/u16-ct-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-16 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-ct-tolower.c b/lib/unicase/u16-ct-tolower.c
index 09e242aa..6ef80c6a 100644
--- a/lib/unicase/u16-ct-tolower.c
+++ b/lib/unicase/u16-ct-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-16 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-ct-totitle.c b/lib/unicase/u16-ct-totitle.c
index 555e149c..bf4a38f4 100644
--- a/lib/unicase/u16-ct-totitle.c
+++ b/lib/unicase/u16-ct-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-16 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-ct-toupper.c b/lib/unicase/u16-ct-toupper.c
index 1673376d..fb4a9459 100644
--- a/lib/unicase/u16-ct-toupper.c
+++ b/lib/unicase/u16-ct-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-16 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-is-cased.c b/lib/unicase/u16-is-cased.c
index 327816ee..92851fe8 100644
--- a/lib/unicase/u16-is-cased.c
+++ b/lib/unicase/u16-is-cased.c
@@ -1,5 +1,5 @@
/* Test whether case matters for an UTF-16 string.
- 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.
diff --git a/lib/unicase/u16-is-casefolded.c b/lib/unicase/u16-is-casefolded.c
index 9aa0018a..d7c34d31 100644
--- a/lib/unicase/u16-is-casefolded.c
+++ b/lib/unicase/u16-is-casefolded.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-16 string is already case-folded.
- 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.
diff --git a/lib/unicase/u16-is-invariant.c b/lib/unicase/u16-is-invariant.c
index 8f0487ab..7b44c054 100644
--- a/lib/unicase/u16-is-invariant.c
+++ b/lib/unicase/u16-is-invariant.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-16 string is invariant under a given case mapping.
- 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.
diff --git a/lib/unicase/u16-is-lowercase.c b/lib/unicase/u16-is-lowercase.c
index a5487dff..d4ed1939 100644
--- a/lib/unicase/u16-is-lowercase.c
+++ b/lib/unicase/u16-is-lowercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-16 string is entirely lower case.
- 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.
diff --git a/lib/unicase/u16-is-titlecase.c b/lib/unicase/u16-is-titlecase.c
index 360b2a53..a911bd53 100644
--- a/lib/unicase/u16-is-titlecase.c
+++ b/lib/unicase/u16-is-titlecase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-16 string is entirely title case.
- 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.
diff --git a/lib/unicase/u16-is-uppercase.c b/lib/unicase/u16-is-uppercase.c
index 18c918a0..a8f5865f 100644
--- a/lib/unicase/u16-is-uppercase.c
+++ b/lib/unicase/u16-is-uppercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-16 string is entirely upper case.
- 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.
diff --git a/lib/unicase/u16-prefix-context.c b/lib/unicase/u16-prefix-context.c
index 6538cdb9..ec67e0f5 100644
--- a/lib/unicase/u16-prefix-context.c
+++ b/lib/unicase/u16-prefix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of prefix UTF-16 string.
- 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.
diff --git a/lib/unicase/u16-suffix-context.c b/lib/unicase/u16-suffix-context.c
index 30b1bcf7..b6cfe6e4 100644
--- a/lib/unicase/u16-suffix-context.c
+++ b/lib/unicase/u16-suffix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of suffix UTF-16 string.
- 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.
diff --git a/lib/unicase/u16-tolower.c b/lib/unicase/u16-tolower.c
index 9fe111a0..b3a3b1db 100644
--- a/lib/unicase/u16-tolower.c
+++ b/lib/unicase/u16-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-16 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-totitle.c b/lib/unicase/u16-totitle.c
index 99fa10ba..5b4da8fb 100644
--- a/lib/unicase/u16-totitle.c
+++ b/lib/unicase/u16-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-16 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u16-toupper.c b/lib/unicase/u16-toupper.c
index 8c3c6346..e1f2635a 100644
--- a/lib/unicase/u16-toupper.c
+++ b/lib/unicase/u16-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-16 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-casecmp.c b/lib/unicase/u32-casecmp.c
index 84588670..6898823c 100644
--- a/lib/unicase/u32-casecmp.c
+++ b/lib/unicase/u32-casecmp.c
@@ -1,5 +1,5 @@
/* Case and normalization insensitive comparison of UTF-32 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.
diff --git a/lib/unicase/u32-casecoll.c b/lib/unicase/u32-casecoll.c
index c606310b..f43119ce 100644
--- a/lib/unicase/u32-casecoll.c
+++ b/lib/unicase/u32-casecoll.c
@@ -1,6 +1,6 @@
/* Locale dependent, case and normalization insensitive comparison of UTF-32
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.
diff --git a/lib/unicase/u32-casefold.c b/lib/unicase/u32-casefold.c
index 43614d8c..f54fd9d0 100644
--- a/lib/unicase/u32-casefold.c
+++ b/lib/unicase/u32-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-casemap.c b/lib/unicase/u32-casemap.c
index 52e96696..4f1161b5 100644
--- a/lib/unicase/u32-casemap.c
+++ b/lib/unicase/u32-casemap.c
@@ -1,5 +1,5 @@
/* Case mapping for UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-casexfrm.c b/lib/unicase/u32-casexfrm.c
index c105221f..85396426 100644
--- a/lib/unicase/u32-casexfrm.c
+++ b/lib/unicase/u32-casexfrm.c
@@ -1,6 +1,6 @@
/* Locale dependent transformation for case insensitive comparison of UTF-32
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.
diff --git a/lib/unicase/u32-ct-casefold.c b/lib/unicase/u32-ct-casefold.c
index 3da61533..5ea1ee74 100644
--- a/lib/unicase/u32-ct-casefold.c
+++ b/lib/unicase/u32-ct-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-32 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-ct-tolower.c b/lib/unicase/u32-ct-tolower.c
index c73126f4..95834829 100644
--- a/lib/unicase/u32-ct-tolower.c
+++ b/lib/unicase/u32-ct-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-32 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-ct-totitle.c b/lib/unicase/u32-ct-totitle.c
index 389680a4..6f93f008 100644
--- a/lib/unicase/u32-ct-totitle.c
+++ b/lib/unicase/u32-ct-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-32 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-ct-toupper.c b/lib/unicase/u32-ct-toupper.c
index 20b123d9..f457f49b 100644
--- a/lib/unicase/u32-ct-toupper.c
+++ b/lib/unicase/u32-ct-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-32 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-is-cased.c b/lib/unicase/u32-is-cased.c
index 2ef7ba05..14500c97 100644
--- a/lib/unicase/u32-is-cased.c
+++ b/lib/unicase/u32-is-cased.c
@@ -1,5 +1,5 @@
/* Test whether case matters for an UTF-32 string.
- 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.
diff --git a/lib/unicase/u32-is-casefolded.c b/lib/unicase/u32-is-casefolded.c
index 14b5fb56..a1a4ae0f 100644
--- a/lib/unicase/u32-is-casefolded.c
+++ b/lib/unicase/u32-is-casefolded.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-32 string is already case-folded.
- 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.
diff --git a/lib/unicase/u32-is-invariant.c b/lib/unicase/u32-is-invariant.c
index 8322d09f..312d0504 100644
--- a/lib/unicase/u32-is-invariant.c
+++ b/lib/unicase/u32-is-invariant.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-32 string is invariant under a given case mapping.
- 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.
diff --git a/lib/unicase/u32-is-lowercase.c b/lib/unicase/u32-is-lowercase.c
index 33e9b969..494ef976 100644
--- a/lib/unicase/u32-is-lowercase.c
+++ b/lib/unicase/u32-is-lowercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-32 string is entirely lower case.
- 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.
diff --git a/lib/unicase/u32-is-titlecase.c b/lib/unicase/u32-is-titlecase.c
index e27e84be..12162c34 100644
--- a/lib/unicase/u32-is-titlecase.c
+++ b/lib/unicase/u32-is-titlecase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-32 string is entirely title case.
- 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.
diff --git a/lib/unicase/u32-is-uppercase.c b/lib/unicase/u32-is-uppercase.c
index a1491875..95ea76f0 100644
--- a/lib/unicase/u32-is-uppercase.c
+++ b/lib/unicase/u32-is-uppercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-32 string is entirely upper case.
- 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.
diff --git a/lib/unicase/u32-prefix-context.c b/lib/unicase/u32-prefix-context.c
index 03c96dda..8e2da09b 100644
--- a/lib/unicase/u32-prefix-context.c
+++ b/lib/unicase/u32-prefix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of prefix UTF-32 string.
- 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.
diff --git a/lib/unicase/u32-suffix-context.c b/lib/unicase/u32-suffix-context.c
index 440de756..2849111d 100644
--- a/lib/unicase/u32-suffix-context.c
+++ b/lib/unicase/u32-suffix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of suffix UTF-32 string.
- 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.
diff --git a/lib/unicase/u32-tolower.c b/lib/unicase/u32-tolower.c
index 6ade7ca9..3c75471e 100644
--- a/lib/unicase/u32-tolower.c
+++ b/lib/unicase/u32-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-totitle.c b/lib/unicase/u32-totitle.c
index caf02bd3..918f5814 100644
--- a/lib/unicase/u32-totitle.c
+++ b/lib/unicase/u32-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u32-toupper.c b/lib/unicase/u32-toupper.c
index 928eac45..1ec20b43 100644
--- a/lib/unicase/u32-toupper.c
+++ b/lib/unicase/u32-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-32 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-casecmp.c b/lib/unicase/u8-casecmp.c
index 8ae141ca..4aa61d55 100644
--- a/lib/unicase/u8-casecmp.c
+++ b/lib/unicase/u8-casecmp.c
@@ -1,5 +1,5 @@
/* Case and normalization insensitive comparison of UTF-8 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.
diff --git a/lib/unicase/u8-casecoll.c b/lib/unicase/u8-casecoll.c
index 43833896..cd9d42d4 100644
--- a/lib/unicase/u8-casecoll.c
+++ b/lib/unicase/u8-casecoll.c
@@ -1,6 +1,6 @@
/* Locale dependent, case and normalization insensitive comparison of UTF-8
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.
diff --git a/lib/unicase/u8-casefold.c b/lib/unicase/u8-casefold.c
index 59dee49e..d446855c 100644
--- a/lib/unicase/u8-casefold.c
+++ b/lib/unicase/u8-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-8 strings (locale dependent).
- 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.
@@ -50,7 +50,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -66,7 +65,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
diff --git a/lib/unicase/u8-casemap.c b/lib/unicase/u8-casemap.c
index 9488db6d..780fbbf3 100644
--- a/lib/unicase/u8-casemap.c
+++ b/lib/unicase/u8-casemap.c
@@ -1,5 +1,5 @@
/* Case mapping for UTF-8 strings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-casexfrm.c b/lib/unicase/u8-casexfrm.c
index 6e6ef004..f88f1a0c 100644
--- a/lib/unicase/u8-casexfrm.c
+++ b/lib/unicase/u8-casexfrm.c
@@ -1,6 +1,6 @@
/* Locale dependent transformation for case insensitive comparison of UTF-8
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.
diff --git a/lib/unicase/u8-ct-casefold.c b/lib/unicase/u8-ct-casefold.c
index 6b84998d..d132af19 100644
--- a/lib/unicase/u8-ct-casefold.c
+++ b/lib/unicase/u8-ct-casefold.c
@@ -1,5 +1,5 @@
/* Casefolding mapping for UTF-8 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-ct-tolower.c b/lib/unicase/u8-ct-tolower.c
index b699c72a..93412107 100644
--- a/lib/unicase/u8-ct-tolower.c
+++ b/lib/unicase/u8-ct-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-8 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-ct-totitle.c b/lib/unicase/u8-ct-totitle.c
index c7a53567..ae4a123f 100644
--- a/lib/unicase/u8-ct-totitle.c
+++ b/lib/unicase/u8-ct-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-8 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-ct-toupper.c b/lib/unicase/u8-ct-toupper.c
index ca092c73..1d4ee155 100644
--- a/lib/unicase/u8-ct-toupper.c
+++ b/lib/unicase/u8-ct-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-8 substrings (locale dependent).
- 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.
diff --git a/lib/unicase/u8-is-cased.c b/lib/unicase/u8-is-cased.c
index 52c10c0a..e84ae088 100644
--- a/lib/unicase/u8-is-cased.c
+++ b/lib/unicase/u8-is-cased.c
@@ -1,5 +1,5 @@
/* Test whether case matters for an UTF-8 string.
- 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.
diff --git a/lib/unicase/u8-is-casefolded.c b/lib/unicase/u8-is-casefolded.c
index 034127bb..c242922b 100644
--- a/lib/unicase/u8-is-casefolded.c
+++ b/lib/unicase/u8-is-casefolded.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-8 string is already case-folded.
- 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.
diff --git a/lib/unicase/u8-is-invariant.c b/lib/unicase/u8-is-invariant.c
index 5e157247..11392017 100644
--- a/lib/unicase/u8-is-invariant.c
+++ b/lib/unicase/u8-is-invariant.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-8 string is invariant under a given case mapping.
- 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.
diff --git a/lib/unicase/u8-is-lowercase.c b/lib/unicase/u8-is-lowercase.c
index 9706901f..62ed1626 100644
--- a/lib/unicase/u8-is-lowercase.c
+++ b/lib/unicase/u8-is-lowercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-8 string is entirely lower case.
- 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.
diff --git a/lib/unicase/u8-is-titlecase.c b/lib/unicase/u8-is-titlecase.c
index 841227b9..0d7ff162 100644
--- a/lib/unicase/u8-is-titlecase.c
+++ b/lib/unicase/u8-is-titlecase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-8 string is entirely title case.
- 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.
diff --git a/lib/unicase/u8-is-uppercase.c b/lib/unicase/u8-is-uppercase.c
index e105f164..d177cf71 100644
--- a/lib/unicase/u8-is-uppercase.c
+++ b/lib/unicase/u8-is-uppercase.c
@@ -1,5 +1,5 @@
/* Test whether an UTF-8 string is entirely upper case.
- 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.
diff --git a/lib/unicase/u8-prefix-context.c b/lib/unicase/u8-prefix-context.c
index fa11aefd..1111b628 100644
--- a/lib/unicase/u8-prefix-context.c
+++ b/lib/unicase/u8-prefix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of prefix UTF-8 string.
- 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.
diff --git a/lib/unicase/u8-suffix-context.c b/lib/unicase/u8-suffix-context.c
index a1fb33e3..1ff29488 100644
--- a/lib/unicase/u8-suffix-context.c
+++ b/lib/unicase/u8-suffix-context.c
@@ -1,5 +1,5 @@
/* Case-mapping context of suffix UTF-8 string.
- 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.
diff --git a/lib/unicase/u8-tolower.c b/lib/unicase/u8-tolower.c
index 352a0ef9..cc4bc036 100644
--- a/lib/unicase/u8-tolower.c
+++ b/lib/unicase/u8-tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for UTF-8 strings (locale dependent).
- 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.
@@ -63,7 +63,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -79,7 +78,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
diff --git a/lib/unicase/u8-totitle.c b/lib/unicase/u8-totitle.c
index c72e5d82..2b0d3cf7 100644
--- a/lib/unicase/u8-totitle.c
+++ b/lib/unicase/u8-totitle.c
@@ -1,5 +1,5 @@
/* Titlecase mapping for UTF-8 strings (locale dependent).
- 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.
@@ -50,7 +50,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -66,7 +65,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
diff --git a/lib/unicase/u8-toupper.c b/lib/unicase/u8-toupper.c
index 2968d989..9dccf9d9 100644
--- a/lib/unicase/u8-toupper.c
+++ b/lib/unicase/u8-toupper.c
@@ -1,5 +1,5 @@
/* Uppercase mapping for UTF-8 strings (locale dependent).
- 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.
@@ -63,7 +63,6 @@ read_file (FILE *stream)
char *buf = NULL;
int alloc = 0;
int size = 0;
- int count;
while (! feof (stream))
{
@@ -79,7 +78,7 @@ read_file (FILE *stream)
exit (1);
}
}
- count = fread (buf + size, 1, BUFSIZE, stream);
+ int count = fread (buf + size, 1, BUFSIZE, stream);
if (count == 0)
{
if (ferror (stream))
diff --git a/lib/unicase/ulc-casecmp.c b/lib/unicase/ulc-casecmp.c
index ced4f8e4..3504addc 100644
--- a/lib/unicase/ulc-casecmp.c
+++ b/lib/unicase/ulc-casecmp.c
@@ -1,5 +1,5 @@
/* Case and normalization insensitive comparison of 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.
@@ -41,14 +41,10 @@ ulc_u8_casefold (const char *s, size_t n, const char *iso639_language,
uninorm_t nf,
uint8_t *resultbuf, size_t *lengthp)
{
- uint8_t convbuf[2048 / sizeof (uint8_t)];
- uint8_t *conv;
- size_t conv_length;
- uint8_t *result;
-
/* Convert the string to UTF-8. */
- conv_length = sizeof (convbuf) / sizeof (uint8_t);
- conv =
+ uint8_t convbuf[2048 / sizeof (uint8_t)];
+ size_t conv_length = sizeof (convbuf) / sizeof (uint8_t);
+ uint8_t *conv =
u8_conv_from_encoding (locale_charset (), iconveh_error, s, n, NULL,
convbuf, &conv_length);
if (conv == NULL)
@@ -56,8 +52,8 @@ ulc_u8_casefold (const char *s, size_t n, const char *iso639_language,
return NULL;
/* Case-fold and normalize. */
- result = u8_casefold (conv, conv_length, iso639_language, nf,
- resultbuf, lengthp);
+ uint8_t *result = u8_casefold (conv, conv_length, iso639_language, nf,
+ resultbuf, lengthp);
if (result == NULL)
{
if (conv != convbuf)
diff --git a/lib/unicase/ulc-casecoll.c b/lib/unicase/ulc-casecoll.c
index 1367e193..9cbfbb6a 100644
--- a/lib/unicase/ulc-casecoll.c
+++ b/lib/unicase/ulc-casecoll.c
@@ -1,5 +1,5 @@
/* Locale dependent, case and normalization insensitive comparison of 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.
diff --git a/lib/unicase/ulc-casexfrm.c b/lib/unicase/ulc-casexfrm.c
index f18ad566..ef27d2ad 100644
--- a/lib/unicase/ulc-casexfrm.c
+++ b/lib/unicase/ulc-casexfrm.c
@@ -1,5 +1,5 @@
/* Locale dependent transformation for case insensitive comparison of 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.
@@ -38,14 +38,10 @@ ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
uninorm_t nf,
char *resultbuf, size_t *lengthp)
{
- uint8_t convbuf[2048 / sizeof (uint8_t)];
- uint8_t *conv;
- size_t conv_length;
- char *result;
-
/* Convert the string to UTF-8. */
- conv_length = sizeof (convbuf) / sizeof (uint8_t);
- conv =
+ uint8_t convbuf[2048 / sizeof (uint8_t)];
+ size_t conv_length = sizeof (convbuf) / sizeof (uint8_t);
+ uint8_t *conv =
u8_conv_from_encoding (locale_charset (), iconveh_error, s, n, NULL,
convbuf, &conv_length);
if (conv == NULL)
@@ -53,8 +49,8 @@ ulc_casexfrm (const char *s, size_t n, const char *iso639_language,
return NULL;
/* Case-fold and normalize. */
- result = u8_casexfrm (conv, conv_length, iso639_language, nf,
- resultbuf, lengthp);
+ char *result = u8_casexfrm (conv, conv_length, iso639_language, nf,
+ resultbuf, lengthp);
if (result == NULL)
{
if (conv != convbuf)
diff --git a/lib/unicase/unicasemap.h b/lib/unicase/unicasemap.h
index 3aec2c61..ce80329e 100644
--- a/lib/unicase/unicasemap.h
+++ b/lib/unicase/unicasemap.h
@@ -1,5 +1,5 @@
/* Case mapping for UTF-8/UTF-16/UTF-32 strings (locale dependent).
- 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.