Use an enum for UTF8 decoder state

This commit is contained in:
Kovid Goyal
2021-03-31 15:19:27 +05:30
parent 9838a336d5
commit 0372242d12
7 changed files with 15 additions and 16 deletions

View File

@@ -30,8 +30,6 @@ typedef uint8_t len_t;
typedef uint32_t text_t;
#define LEN_MAX UINT8_MAX
#define UTF8_ACCEPT 0
#define UTF8_REJECT 1
#define IS_LOWERCASE(x) (x) >= 'a' && (x) <= 'z'
#define IS_UPPERCASE(x) (x) >= 'A' && (x) <= 'Z'
#define LOWERCASE(x) ((IS_UPPERCASE(x)) ? (x) + 32 : (x))