| 34 | // code-format on |
| 35 | |
| 36 | u32 decode(u32 *state, u32 *codep, u32 byte) |
| 37 | { |
| 38 | u32 type = utf8d[byte]; |
| 39 | |
| 40 | *codep = (*state != UTF8_ACCEPT) ? |
| 41 | (byte & 0x3fu) | (*codep << 6) : |
| 42 | (0xff >> type) & (byte); |
| 43 | |
| 44 | *state = utf8d[256 + *state*16 + type]; |
| 45 | return *state; |
| 46 | } |
| 47 | |
| 48 | } // namespace utf8 |
| 49 |
no outgoing calls
no test coverage detected