aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_latin.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-26 20:47:06 +0100
committerMattias Andrée <m@maandree.se>2026-01-26 20:47:06 +0100
commit606483d647c3167f4db87d43ff94c797ca711b03 (patch)
tree5bc743a9d6adca5bbbded56f5c896fa260ab7d8f /libcharconv_latin.c
parentAdd stacked (diff)
downloadcharconv-606483d647c3167f4db87d43ff94c797ca711b03.tar.gz
charconv-606483d647c3167f4db87d43ff94c797ca711b03.tar.bz2
charconv-606483d647c3167f4db87d43ff94c797ca711b03.tar.xz
Add counting rods
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libcharconv_latin.c')
-rw-r--r--libcharconv_latin.c11
1 files changed, 11 insertions, 0 deletions
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) {