aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_flipped.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-28 19:52:45 +0100
committerMattias Andrée <m@maandree.se>2026-01-28 19:52:45 +0100
commit579e91697244d5813a667bf49209ea4102bcd360 (patch)
tree2910e440fbaf968e8010b054e29c8e57b60b8935 /libcharconv_flipped.c
parentAdd ROTATED CAPITAL Q (diff)
downloadcharconv-579e91697244d5813a667bf49209ea4102bcd360.tar.gz
charconv-579e91697244d5813a667bf49209ea4102bcd360.tar.bz2
charconv-579e91697244d5813a667bf49209ea4102bcd360.tar.xz
Misc stuff
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libcharconv_flipped.c')
-rw-r--r--libcharconv_flipped.c10
1 files changed, 9 insertions, 1 deletions
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) {