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
+2 -2
View File
@@ -80,8 +80,6 @@ typedef enum { TILING, SCALED, MIRRORED } BackgroundImageLayout;
#define ATTRS_MASK_FOR_SGR (ATTRS_MASK_WITHOUT_MARK | ATTRS_MASK_WITHOUT_WIDTH)
#define MARK_MASK 3
#define COL_MASK 0xFFFFFFFF
#define UTF8_ACCEPT 0
#define UTF8_REJECT 1
#define DECORATION_FG_CODE 58
#define CHAR_IS_BLANK(ch) ((ch) == 32 || (ch) == 0)
#define CONTINUED_MASK 1
@@ -153,6 +151,8 @@ typedef enum { TILING, SCALED, MIRRORED } BackgroundImageLayout;
#endif
typedef enum UTF8State { UTF8_ACCEPT = 0, UTF8_REJECT = 1} UTF8State;
typedef struct {
uint32_t left, top, right, bottom;
} Region;