aboutsummaryrefslogtreecommitdiffstats
path: root/libcharconv_vulgar_fractions.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2026-01-28 22:03:48 +0100
committerMattias Andrée <m@maandree.se>2026-01-28 22:03:48 +0100
commit40bf70fb8f23e5ff7212b568c69e0725372e5b57 (patch)
tree0d4be706d0182ddeafd4eaafd073e12c2fa2a9e8 /libcharconv_vulgar_fractions.c
parentMisc stuff (diff)
downloadcharconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.gz
charconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.bz2
charconv-40bf70fb8f23e5ff7212b568c69e0725372e5b57.tar.xz
Clean up
Signed-off-by: Mattias Andrée <m@maandree.se>
Diffstat (limited to 'libcharconv_vulgar_fractions.c')
-rw-r--r--libcharconv_vulgar_fractions.c54
1 files changed, 18 insertions, 36 deletions
diff --git a/libcharconv_vulgar_fractions.c b/libcharconv_vulgar_fractions.c
index a89a02f..285c10d 100644
--- a/libcharconv_vulgar_fractions.c
+++ b/libcharconv_vulgar_fractions.c
@@ -33,42 +33,24 @@ libcharconv_vulgar_fractions(const char *s, size_t slen, size_t *n, uint_least32
return LIBCHARCONV_INDETERMINATE;
}
}
- if (s[0] == '0' && s[2] == '3') {
- c = UINT32_C(0x2189);
- } else if (s[0] == '2' && s[2] == '3') {
- c = UINT32_C(0x2154);
- } else if (s[0] == '2' && s[2] == '5') {
- c = UINT32_C(0x2156);
- } else if (s[0] == '3' && s[2] == '4') {
- c = UINT32_C(0x00BE);
- } else if (s[0] == '3' && s[2] == '5') {
- c = UINT32_C(0x2157);
- } else if (s[0] == '3' && s[2] == '8') {
- c = UINT32_C(0x215C);
- } else if (s[0] == '4' && s[2] == '5') {
- c = UINT32_C(0x2158);
- } else if (s[0] == '5' && s[2] == '6') {
- c = UINT32_C(0x215A);
- } else if (s[0] == '5' && s[2] == '8') {
- c = UINT32_C(0x215D);
- } else if (s[0] == '7' && s[2] == '8') {
- c = UINT32_C(0x215E);
- } else if (s[0] == '1' && s[2] == '2') {
- c = UINT32_C(0x00BD);
- } else if (s[0] == '1' && s[2] == '3') {
- c = UINT32_C(0x2153);
- } else if (s[0] == '1' && s[2] == '4') {
- c = UINT32_C(0x00BC);
- } else if (s[0] == '1' && s[2] == '5') {
- c = UINT32_C(0x2155);
- } else if (s[0] == '1' && s[2] == '6') {
- c = UINT32_C(0x2159);
- } else if (s[0] == '1' && s[2] == '7') {
- c = UINT32_C(0x2150);
- } else if (s[0] == '1' && s[2] == '8') {
- c = UINT32_C(0x215B);
- } else if (s[0] == '1' && s[2] == '9') {
- c = UINT32_C(0x2151);
+ if (s[0] == '0' && s[2] == '3') { c = UINT32_C(0x2189);
+ } else if (s[0] == '2' && s[2] == '3') { c = UINT32_C(0x2154);
+ } else if (s[0] == '2' && s[2] == '5') { c = UINT32_C(0x2156);
+ } else if (s[0] == '3' && s[2] == '4') { c = UINT32_C(0x00BE);
+ } else if (s[0] == '3' && s[2] == '5') { c = UINT32_C(0x2157);
+ } else if (s[0] == '3' && s[2] == '8') { c = UINT32_C(0x215C);
+ } else if (s[0] == '4' && s[2] == '5') { c = UINT32_C(0x2158);
+ } else if (s[0] == '5' && s[2] == '6') { c = UINT32_C(0x215A);
+ } else if (s[0] == '5' && s[2] == '8') { c = UINT32_C(0x215D);
+ } else if (s[0] == '7' && s[2] == '8') { c = UINT32_C(0x215E);
+ } else if (s[0] == '1' && s[2] == '2') { c = UINT32_C(0x00BD);
+ } else if (s[0] == '1' && s[2] == '3') { c = UINT32_C(0x2153);
+ } else if (s[0] == '1' && s[2] == '4') { c = UINT32_C(0x00BC);
+ } else if (s[0] == '1' && s[2] == '5') { c = UINT32_C(0x2155);
+ } else if (s[0] == '1' && s[2] == '6') { c = UINT32_C(0x2159);
+ } else if (s[0] == '1' && s[2] == '7') { c = UINT32_C(0x2150);
+ } else if (s[0] == '1' && s[2] == '8') { c = UINT32_C(0x215B);
+ } else if (s[0] == '1' && s[2] == '9') { c = UINT32_C(0x2151);
} else if (s[0] == '1' && s[2] == '1') {
if (slen == 2u)
return LIBCHARCONV_INDETERMINATE;