diff options
| author | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
|---|---|---|
| committer | Jörg Frings-Fürst <debian@jff.email> | 2026-03-08 17:28:33 +0100 |
| commit | 5f59a34ab747dde8ede7357f3431bf06bd6002fe (patch) | |
| tree | 056a4477fd870d454d5be5868cddab829a47f4d2 /lib/unicase/u-casexfrm.h | |
| parent | 27dae84ed92f1ef0300263091972338d12e78348 (diff) | |
New upstream version 1.4.2upstream/1.4.2upstream
Diffstat (limited to 'lib/unicase/u-casexfrm.h')
| -rw-r--r-- | lib/unicase/u-casexfrm.h | 30 |
1 files changed, 12 insertions, 18 deletions
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) |
