diff options
author | nicm <nicm> | 2015-11-14 11:45:43 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-11-14 11:45:43 +0000 |
commit | 205d15e82d9e4aa90c7980b509d3489ad8eb6c2a (patch) | |
tree | df0a0b3b1181ca5822722638eae32721d7711463 /input.c | |
parent | f401791a5689799ddf3cfa6ecee7da60318febf7 (diff) | |
download | rtmux-205d15e82d9e4aa90c7980b509d3489ad8eb6c2a.tar.gz rtmux-205d15e82d9e4aa90c7980b509d3489ad8eb6c2a.tar.bz2 rtmux-205d15e82d9e4aa90c7980b509d3489ad8eb6c2a.zip |
All these return values from utf8_* are confusing, use an enum.
Diffstat (limited to 'input.c')
-rw-r--r-- | input.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1923,7 +1923,7 @@ input_utf8_open(struct input_ctx *ictx) { 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_debug("%s %hhu", __func__, ud->size); @@ -1937,7 +1937,7 @@ input_utf8_add(struct input_ctx *ictx) { 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_debug("%s", __func__); @@ -1951,7 +1951,7 @@ input_utf8_close(struct input_ctx *ictx) { 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_debug("%s %hhu '%*s' (width %hhu)", __func__, ud->size, |