summaryrefslogtreecommitdiff
path: root/lib/unicase/u-is-cased.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-08 17:28:50 +0100
commitff33e1d252f46bec1a33e28700da3282fc24047a (patch)
tree5c15bc695be820b393a8496c5807ecafbbdeb89b /lib/unicase/u-is-cased.h
parentb2ac982cc8b5290699eb5f52fb043d3d15e2624b (diff)
parent5f59a34ab747dde8ede7357f3431bf06bd6002fe (diff)
Update upstream source from tag 'upstream/1.4.2'
Update to upstream version '1.4.2' with Debian dir 493e96bcd865e4f9990e20bee26408c96231d727
Diffstat (limited to 'lib/unicase/u-is-cased.h')
-rw-r--r--lib/unicase/u-is-cased.h31
1 files changed, 12 insertions, 19 deletions
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)