From 579e91697244d5813a667bf49209ea4102bcd360 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 28 Jan 2026 19:52:45 +0100 Subject: Misc stuff MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libcharconv_flipped.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libcharconv_flipped.c') diff --git a/libcharconv_flipped.c b/libcharconv_flipped.c index 9423bdd..49f2c9b 100644 --- a/libcharconv_flipped.c +++ b/libcharconv_flipped.c @@ -32,7 +32,9 @@ static struct { {UINT32_C(0x23BE), UINT32_C(0x23BF)}, {UINT32_C(0x23CB), UINT32_C(0x23CC)}, {UINT32_C(0x23C9), UINT32_C(0x23CA)}, - {UINT32_C(0x23C1), UINT32_C(0x23C2)} + {UINT32_C(0x23C1), UINT32_C(0x23C2)}, + {UINT32_C(0x238F), UINT32_C(0x2390)}, + {UINT32_C(0x2391), UINT32_C(0x2392)} }; @@ -88,6 +90,12 @@ libcharconv_flipped(const char *s, size_t slen, size_t *n, uint_least32_t *cp, s c |= (i & 1u) ? 32u : 0u; c = UINT32_C(0x4D00) | yijing_hexagrams[c]; goto conv; + } else if (UINT32_C(0x2800) <= c && c <= UINT32_C(0x28FF)) { + c = ((c & 0x01u) << 6) | ((c & 0x40u) >> 6) + | ((c & 0x12u) << 1) | ((c & 0x24u) >> 1) + | ((c & 0x08u) << 4) | ((c & 0x80u) >> 4) + | UINT32_C(0x2800); + goto conv; } else { for (i = 0u; i < sizeof(pairs) / sizeof(*pairs); i++) { if (c == pairs[i].a) { -- cgit v1.2.3-70-g09d2