Cyclone Scheme  0.9
uint32_t Cyc_utf8_decode ( uint32_t *  state,
uint32_t *  codep,
uint32_t  byte 
)

Decode the next byte of a codepoint. Based on example code from Bjoern Hoehrmann.

Parameters
stateOut parameter, the state of the decoding
codepOut parameter, contains the codepoint
byteByte to examine
Returns
The current state: CYC_UTF8_ACCEPT if successful otherwise CYC_UTF8_REJECT.