diff options
author | bellard <6490144+bellard@users.noreply.github.com> | 2020-09-06 19:10:15 +0200 |
---|---|---|
committer | bellard <6490144+bellard@users.noreply.github.com> | 2020-09-06 19:10:15 +0200 |
commit | 7c312df422572cf867f29a1d80693e8a77f7fb2a (patch) | |
tree | e6b8443835b36b6cea904e4330ef93e4ab5ed040 /libunicode.c | |
parent | 89007660998db0ee55f0ab3b34bb1a84f86fd3c4 (diff) | |
download | quickjs-7c312df422572cf867f29a1d80693e8a77f7fb2a.tar.gz quickjs-7c312df422572cf867f29a1d80693e8a77f7fb2a.zip |
2020-09-06 release
Diffstat (limited to 'libunicode.c')
-rw-r--r-- | libunicode.c | 26 |
1 files changed, 22 insertions, 4 deletions
diff --git a/libunicode.c b/libunicode.c index 96ff002..63c12a0 100644 --- a/libunicode.c +++ b/libunicode.c @@ -527,7 +527,13 @@ static int unicode_decomp_entry(uint32_t *res, uint32_t c, } else { d = unicode_decomp_data + unicode_decomp_table2[idx]; switch(type) { - case DECOMP_TYPE_L1 ... DECOMP_TYPE_L7: + case DECOMP_TYPE_L1: + case DECOMP_TYPE_L2: + case DECOMP_TYPE_L3: + case DECOMP_TYPE_L4: + case DECOMP_TYPE_L5: + case DECOMP_TYPE_L6: + case DECOMP_TYPE_L7: l = type - DECOMP_TYPE_L1 + 1; d += (c - code) * l * 2; for(i = 0; i < l; i++) { @@ -535,7 +541,8 @@ static int unicode_decomp_entry(uint32_t *res, uint32_t c, return 0; } return l; - case DECOMP_TYPE_LL1 ... DECOMP_TYPE_LL2: + case DECOMP_TYPE_LL1: + case DECOMP_TYPE_LL2: { uint32_t k, p; l = type - DECOMP_TYPE_LL1 + 1; @@ -551,7 +558,11 @@ static int unicode_decomp_entry(uint32_t *res, uint32_t c, } } return l; - case DECOMP_TYPE_S1 ... DECOMP_TYPE_S5: + case DECOMP_TYPE_S1: + case DECOMP_TYPE_S2: + case DECOMP_TYPE_S3: + case DECOMP_TYPE_S4: + case DECOMP_TYPE_S5: l = type - DECOMP_TYPE_S1 + 1; d += (c - code) * l; for(i = 0; i < l; i++) { @@ -582,7 +593,14 @@ static int unicode_decomp_entry(uint32_t *res, uint32_t c, case DECOMP_TYPE_B18: l = 18; goto decomp_type_b; - case DECOMP_TYPE_B1 ... DECOMP_TYPE_B8: + case DECOMP_TYPE_B1: + case DECOMP_TYPE_B2: + case DECOMP_TYPE_B3: + case DECOMP_TYPE_B4: + case DECOMP_TYPE_B5: + case DECOMP_TYPE_B6: + case DECOMP_TYPE_B7: + case DECOMP_TYPE_B8: l = type - DECOMP_TYPE_B1 + 1; decomp_type_b: { |