aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_turned.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libcharconv_turned.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/libcharconv_turned.c b/libcharconv_turned.c
index 081bd9b..ff51618 100644
--- a/libcharconv_turned.c
+++ b/libcharconv_turned.c
@@ -55,7 +55,9 @@ static struct {
{UINT32_C(0x23CB), UINT32_C(0x23BF)},
{UINT32_C(0x23C9), UINT32_C(0x23CA)},
{UINT32_C(0x23C1), UINT32_C(0x23C2)},
- {UINT32_C(0x23C7), UINT32_C(0x23C8)}
+ {UINT32_C(0x23C7), UINT32_C(0x23C8)},
+ {UINT32_C(0x238F), UINT32_C(0x2390)},
+ {UINT32_C(0x2391), UINT32_C(0x2392)}
};
@@ -128,6 +130,13 @@ libcharconv_turned(const char *s, size_t slen, size_t *n, uint_least32_t *cp, si
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) << 7) | ((c & 0x80u) >> 7)
+ | ((c & 0x02u) << 4) | ((c & 0x20u) >> 4)
+ | ((c & 0x04u) << 2) | ((c & 0x10u) >> 2)
+ | ((c & 0x08u) << 3) | ((c & 0x40u) >> 3)
+ | UINT32_C(0x2800);
+ goto conv;
} else {
for (i = 0u; i < sizeof(pairs) / sizeof(*pairs); i++) {
if (c == pairs[i].a) {