diff options
Diffstat (limited to 'src/utf8.h')
-rw-r--r-- | src/utf8.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/utf8.h b/src/utf8.h new file mode 100644 index 0000000..5b3c9f2 --- /dev/null +++ b/src/utf8.h @@ -0,0 +1,25 @@ +#ifndef UTF8_H +#define UTF8_H +#include "str.h" + +typedef struct utf8_s utf8; + +enum UTF8_State_e { + UTF8_STATE_ACCEPT = 0, + UTF8_STATE_REJECT = 12, + UTF8_STATE_1 = 24, + UTF8_STATE_2 = 36, + UTF8_STATE_3 = 48, + UTF8_STATE_4 = 60, + UTF8_STATE_5 = 72, + UTF8_STATE_6 = 84, + UTF8_STATE_7 = 96 +}; + +typedef enum UTF8_State_e UTF8_State; + +utf8 *new_utf8(char *string, UNUM size); + +unsigned char encode(NUM code_point, str *result); + +#endif |