diff options
author | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-08 00:36:27 +0100 |
---|---|---|
committer | Paul LeoNerd Evans <leonerd@leonerd.org.uk> | 2008-10-08 00:36:27 +0100 |
commit | ac6cae29bb1384fa5afb7dbe16c556328b880b6a (patch) | |
tree | c4e528a91a0b8f717ec6649c49ccbdd7798eca2f /termkey-internal.h | |
parent | d46f72fc1af33a3f184bd1ffe4e3eb656ae5147d (diff) | |
download | termo-ac6cae29bb1384fa5afb7dbe16c556328b880b6a.tar.gz termo-ac6cae29bb1384fa5afb7dbe16c556328b880b6a.tar.xz termo-ac6cae29bb1384fa5afb7dbe16c556328b880b6a.zip |
Moved single byte and UTF-8 sequence recombiner out of driver-csi.c back into termkey.c
Diffstat (limited to 'termkey-internal.h')
-rw-r--r-- | termkey-internal.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/termkey-internal.h b/termkey-internal.h index 9abc43d..57c74b9 100644 --- a/termkey-internal.h +++ b/termkey-internal.h @@ -49,20 +49,10 @@ struct termkey { struct { void (*eat_bytes)(termkey_t *tk, size_t count); void (*emit_codepoint)(termkey_t *tk, int codepoint, termkey_key *key); + termkey_result (*getkey_simple)(termkey_t *tk, termkey_key *key); } method; }; extern struct termkey_driver termkey_driver_csi; -// Keep this here for now since it's tiny -static inline int utf8_seqlen(int codepoint) -{ - if(codepoint < 0x0000080) return 1; - if(codepoint < 0x0000800) return 2; - if(codepoint < 0x0010000) return 3; - if(codepoint < 0x0200000) return 4; - if(codepoint < 0x4000000) return 5; - return 6; -} - #endif |