diff options
Diffstat (limited to 'lib/unicase/ulc-casexfrm.c')
| -rw-r--r-- | lib/unicase/ulc-casexfrm.c | 16 |
1 files changed, 6 insertions, 10 deletions
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) |
