From 606483d647c3167f4db87d43ff94c797ca711b03 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Mon, 26 Jan 2026 20:47:06 +0100 Subject: Add counting rods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcharconv_latin.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'libcharconv_latin.c') diff --git a/libcharconv_latin.c b/libcharconv_latin.c index f441d0c..5e050f0 100644 --- a/libcharconv_latin.c +++ b/libcharconv_latin.c @@ -605,6 +605,17 @@ libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz c1 = '1'; goto conv3; + } else if (UINT32_C(0x13D60) <= c && c <= UINT32_C(0x13D68)) { + /* counting rods */ + c -= (uint_least32_t)UINT32_C(0x13D60) - (uint_least32_t)'1'; + goto conv; + } else if (UINT32_C(0x13D69) <= c && c <= UINT32_C(0x13D71)) { + /* counting rods */ + c -= (uint_least32_t)UINT32_C(0x13D69) - (uint_least32_t)'1'; + c1 = (char)c; + c2 = '0'; + goto conv2; + } else { use_switch: switch (c) { -- cgit v1.2.3-70-g09d2