summaryrefslogtreecommitdiff
path: root/lib/unictype/pr_byname.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
committerJörg Frings-Fürst <debian@jff.email>2026-03-10 13:24:07 +0100
commitcfd1f17f1a85d95ea12bca8dae42add7dad1ad11 (patch)
tree8016486f8ee7157213f2d09ff2491bfa9c94638a /lib/unictype/pr_byname.c
parent14e4d584d0121031ec40e6c35869745f1747ff29 (diff)
parent1403307d6e2fb4e7b5d97a35f40d1e95134561ab (diff)
Merge branch 'release/debian/1.4.2-1'HEADdebian/1.4.2-1master
Diffstat (limited to 'lib/unictype/pr_byname.c')
-rw-r--r--lib/unictype/pr_byname.c42
1 files changed, 22 insertions, 20 deletions
diff --git a/lib/unictype/pr_byname.c b/lib/unictype/pr_byname.c
index 25d12ba4..bd94ff91 100644
--- a/lib/unictype/pr_byname.c
+++ b/lib/unictype/pr_byname.c
@@ -1,5 +1,5 @@
/* Properties of Unicode characters.
- Copyright (C) 2007, 2011-2024 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2011-2026 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software.
@@ -146,27 +146,29 @@ uc_property_t
uc_property_byname (const char *property_name)
{
char buf[MAX_WORD_LENGTH + 1];
- const char *cp;
char *bp;
- unsigned int count;
- const struct named_property *found;
- for (cp = property_name, bp = buf, count = MAX_WORD_LENGTH + 1; ; cp++, bp++)
- {
- unsigned char c = (unsigned char) *cp;
- if (c >= 0x80)
- goto invalid;
- if (c >= 'A' && c <= 'Z')
- c += 'a' - 'A';
- else if (c == ' ' || c == '-')
- c = '_';
- *bp = c;
- if (c == '\0')
- break;
- if (--count == 0)
- goto invalid;
- }
- found = uc_property_lookup (buf, bp - buf);
+ {
+ const char *cp;
+ unsigned int count;
+ for (cp = property_name, bp = buf, count = MAX_WORD_LENGTH + 1; ; cp++, bp++)
+ {
+ unsigned char c = (unsigned char) *cp;
+ if (c >= 0x80)
+ goto invalid;
+ if (c >= 'A' && c <= 'Z')
+ c += 'a' - 'A';
+ else if (c == ' ' || c == '-')
+ c = '_';
+ *bp = c;
+ if (c == '\0')
+ break;
+ if (--count == 0)
+ goto invalid;
+ }
+ }
+
+ const struct named_property *found = uc_property_lookup (buf, bp - buf);
if (found != NULL)
/* Use a 'switch' statement here, because a table would introduce load-time
relocations. */