From 40bf70fb8f23e5ff7212b568c69e0725372e5b57 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 28 Jan 2026 22:03:48 +0100 Subject: Clean up MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcharconv_buhid.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) (limited to 'libcharconv_buhid.c') diff --git a/libcharconv_buhid.c b/libcharconv_buhid.c index 8abad6a..881ca08 100644 --- a/libcharconv_buhid.c +++ b/libcharconv_buhid.c @@ -8,6 +8,9 @@ libcharconv_buhid(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz uint_least32_t c; *n = 0; for (; slen--; s++) { + PLAIN_CASE_SINGLE('k', 0x1743); + PLAIN_CASE_SINGLE('g', 0x1744); + PLAIN_CASE_SELECT("tdnpbmyrlwsh", 0x1746); switch (s[0]) { case 'A': case 'a': c = UINT32_C(0x1740); goto conv1; case 'I': case 'i': c = UINT32_C(0x1741); goto conv1; @@ -22,20 +25,6 @@ libcharconv_buhid(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz goto no_match; } goto no_match; - case 'B': case 'b': c = UINT32_C(0x174A); goto conv; - case 'D': case 'd': c = UINT32_C(0x1747); goto conv; - case 'G': case 'g': c = UINT32_C(0x1744); goto conv; - case 'H': case 'h': c = UINT32_C(0x1751); goto conv; - case 'K': case 'k': c = UINT32_C(0x1743); goto conv; - case 'L': case 'l': c = UINT32_C(0x174E); goto conv; - case 'M': case 'm': c = UINT32_C(0x174B); goto conv; - case 'N': case 'n': c = UINT32_C(0x1748); goto conv; - case 'P': case 'p': c = UINT32_C(0x1749); goto conv; - case 'R': case 'r': c = UINT32_C(0x174D); goto conv; - case 'S': case 's': c = UINT32_C(0x1750); goto conv; - case 'T': case 't': c = UINT32_C(0x1746); goto conv; - case 'Y': case 'y': c = UINT32_C(0x174C); goto conv; - case 'W': case 'w': c = UINT32_C(0x174F); goto conv; default: no_match: *n += 1u; -- cgit v1.2.3-70-g09d2