aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_latin.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-24 21:31:58 +0100
committerMattias Andrée <m@maandree.se>2026-01-24 21:31:58 +0100
commit6b568aa1bca7f7f502af7b57303ec2673b331c8f (patch)
tree584870f81a8f5ecb093af3ff05aab8114de96b7d /libcharconv_latin.c
parentAdd superscript and subscript (so far only with digits) and lycian and lydian (diff)
downloadcharconv-6b568aa1bca7f7f502af7b57303ec2673b331c8f.tar.gz
charconv-6b568aa1bca7f7f502af7b57303ec2673b331c8f.tar.bz2
charconv-6b568aa1bca7f7f502af7b57303ec2673b331c8f.tar.xz
Add domino tiles
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to '')
-rw-r--r--libcharconv_latin.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/libcharconv_latin.c b/libcharconv_latin.c
index 60a2fb5..77ab4c9 100644
--- a/libcharconv_latin.c
+++ b/libcharconv_latin.c
@@ -327,6 +327,19 @@ libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz
c = (uint_least32_t)"aebBgdiwzDjkqlmnMNupKrstTAEhx"[c - UINT32_C(0x10280)];
goto conv;
+ } else if (UINT32_C(0x1F031) <= c && c <= UINT32_C(0x1F061)) {
+ /* domino tiles */
+ c1 = (char)(((uint_least32_t)c - UINT32_C(0x1F031)) / 7u + (unsigned)'0');
+ c3 = (char)(((uint_least32_t)c - UINT32_C(0x1F031)) % 7u + (unsigned)'0');
+ c2 = '|';
+ goto conv3;
+ } else if (UINT32_C(0x1F063) <= c && c <= UINT32_C(0x1F093)) {
+ /* domino tiles */
+ c1 = (char)(((uint_least32_t)c - UINT32_C(0x1F063)) / 7u + (unsigned)'0');
+ c3 = (char)(((uint_least32_t)c - UINT32_C(0x1F063)) % 7u + (unsigned)'0');
+ c2 = '-';
+ goto conv3;
+
} else {
switch (c) {
/* shogi */
@@ -459,6 +472,10 @@ libcharconv_latin(const char *s, size_t slen, size_t *n, uint_least32_t *cp, siz
/* lydian */
case UINT32_C(0x1093F): c = (uint_least32_t)'"'; goto conv;
+ /* domino tiles */
+ case UINT32_C(0x1F030): c1 = '#'; c2 = '|'; c3 = '#'; goto conv3;
+ case UINT32_C(0x1F062): c1 = '#'; c2 = '-'; c3 = '#'; goto conv3;
+
default:
no_match:
*n += clen;