version 1.91, 2015/11/14 10:56:31 |
version 1.92, 2015/11/14 11:45:43 |
|
|
{ |
{ |
struct utf8_data *ud = &ictx->utf8data; |
struct utf8_data *ud = &ictx->utf8data; |
|
|
if (!utf8_open(ud, ictx->ch)) |
if (utf8_open(ud, ictx->ch) != UTF8_MORE) |
log_fatalx("UTF-8 open invalid %#hhx", ictx->ch); |
log_fatalx("UTF-8 open invalid %#hhx", ictx->ch); |
|
|
log_debug("%s %hhu", __func__, ud->size); |
log_debug("%s %hhu", __func__, ud->size); |
|
|
{ |
{ |
struct utf8_data *ud = &ictx->utf8data; |
struct utf8_data *ud = &ictx->utf8data; |
|
|
if (utf8_append(ud, ictx->ch) != 1) |
if (utf8_append(ud, ictx->ch) != UTF8_MORE) |
log_fatalx("UTF-8 add invalid %#hhx", ictx->ch); |
log_fatalx("UTF-8 add invalid %#hhx", ictx->ch); |
|
|
log_debug("%s", __func__); |
log_debug("%s", __func__); |
|
|
{ |
{ |
struct utf8_data *ud = &ictx->utf8data; |
struct utf8_data *ud = &ictx->utf8data; |
|
|
if (utf8_append(ud, ictx->ch) != 0) |
if (utf8_append(ud, ictx->ch) != UTF8_DONE) |
log_fatalx("UTF-8 close invalid %#hhx", ictx->ch); |
log_fatalx("UTF-8 close invalid %#hhx", ictx->ch); |
|
|
log_debug("%s %hhu '%*s' (width %hhu)", __func__, ud->size, |
log_debug("%s %hhu '%*s' (width %hhu)", __func__, ud->size, |