From 6b568aa1bca7f7f502af7b57303ec2673b331c8f Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sat, 24 Jan 2026 21:31:58 +0100 Subject: Add domino tiles MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcharconv_latin.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libcharconv_latin.c') 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; -- cgit v1.2.3-70-g09d2