8 #include "mf_encoding.h"
12 #if MF_ENCODING == MF_ENCODING_UTF8
14 mf_char mf_getchar(mf_str *str)
31 else if ((c & 0xC0) == 0x80)
38 else if ((**str & 0xC0) == 0xC0)
53 while ((c & tmp) && (seqlen < 5))
58 result = (result << 6) | (**str & 0x3F);
62 result = (result << 6) | (**str & 0x3F);
65 result |= (c & (tmp - 1)) << ((seqlen - 1) * 6);
70 void mf_rewind(mf_str *str)
74 while ((**str & 0x80) != 0x00 && (**str & 0xC0) != 0xC0)
80 mf_char mf_getchar(mf_str *str)
88 void mf_rewind(mf_str *str)