aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_flipped.c
diff options
context:
space:
mode:
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) {