diff options
author | nicm <nicm> | 2020-05-25 18:57:24 +0000 |
---|---|---|
committer | nicm <nicm> | 2020-05-25 18:57:24 +0000 |
commit | 6f03e49e68dfe0d9c0c7d49079c4383b26aca916 (patch) | |
tree | 86a94f09a878fe2d32cd3ef29a69db242208897f /tty-keys.c | |
parent | 35779d655d7eec4b904eeb3a670bbef02aba016d (diff) | |
download | rtmux-6f03e49e68dfe0d9c0c7d49079c4383b26aca916.tar.gz rtmux-6f03e49e68dfe0d9c0c7d49079c4383b26aca916.tar.bz2 rtmux-6f03e49e68dfe0d9c0c7d49079c4383b26aca916.zip |
Use the internal representation for UTF-8 keys instead of wchar_t and
drop some code only needed for that.
Diffstat (limited to 'tty-keys.c')
-rw-r--r-- | tty-keys.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -578,8 +578,8 @@ tty_keys_next1(struct tty *tty, const char *buf, size_t len, key_code *key, struct tty_key *tk, *tk1; struct utf8_data ud; enum utf8_state more; + utf8_char uc; u_int i; - wchar_t wc; log_debug("%s: next key is %zu (%.*s) (expired=%d)", c->name, len, (int)len, buf, expired); @@ -611,12 +611,12 @@ tty_keys_next1(struct tty *tty, const char *buf, size_t len, key_code *key, if (more != UTF8_DONE) return (-1); - if (utf8_combine(&ud, &wc) != UTF8_DONE) + if (utf8_from_data(&ud, &uc) != UTF8_DONE) return (-1); - *key = wc; + *key = uc; log_debug("%s: UTF-8 key %.*s %#llx", c->name, (int)ud.size, - buf, *key); + ud.data, *key); return (0); } |