aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_sans_serif.c
diff options
context:
space:
mode:
Diffstat (limited to 'libcharconv_sans_serif.c')
-rw-r--r--libcharconv_sans_serif.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/libcharconv_sans_serif.c b/libcharconv_sans_serif.c
index 787d14b..4edf373 100644
--- a/libcharconv_sans_serif.c
+++ b/libcharconv_sans_serif.c
@@ -10,16 +10,10 @@ libcharconv_sans_serif(const char *s, size_t slen, size_t *n, uint_least32_t *cp
*n = 0;
for (; slen--; s++) {
old_slen = slen;
- if ('A' <= *s && *s <= 'Z') {
- c = (uint_least32_t)(UINT32_C(0x1D5A0) + (unsigned)(*s - 'A'));
- goto conv;
- } else if ('a' <= *s && *s <= 'z') {
- c = (uint_least32_t)(UINT32_C(0x1D5BA) + (unsigned)(*s - 'a'));
- goto conv;
- } else if ('0' <= *s && *s <= '9') {
- c = (uint_least32_t)(UINT32_C(0x1D7E2) + (unsigned)(*s - '0'));
- goto conv;
- } else if ((unsigned char)s[0] == 0xE2u) {
+ PLAIN_RANGE('A', 'Z', 0x1D5A0);
+ PLAIN_RANGE('a', 'z', 0x1D5BA);
+ PLAIN_RANGE('0', '9', 0x1D7E2);
+ if ((unsigned char)s[0] == 0xE2u) {
if (!slen--)
goto indeterminate;
if ((unsigned char)s[1] == 0x93u) {