diff options
Diffstat (limited to 'lib/unicase/u-is-invariant.h')
| -rw-r--r-- | lib/unicase/u-is-invariant.h | 21 |
1 files changed, 8 insertions, 13 deletions
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) |
