diff options
author | Thomas Adam <thomas@xteddy.org> | 2015-11-12 12:01:17 +0000 |
---|---|---|
committer | Thomas Adam <thomas@xteddy.org> | 2015-11-12 12:01:17 +0000 |
commit | 5f483499f3a7b98da9ac67cd62ed91034a5949ed (patch) | |
tree | de84187f104010233d96acc68bb9cc91d173c243 /key-bindings.c | |
parent | 333da3b64b4ce8c0343f082c3923473205ab2b27 (diff) | |
parent | 0cc812ae342d1a71c0337db8ffb4d7701668cb38 (diff) | |
download | rtmux-5f483499f3a7b98da9ac67cd62ed91034a5949ed.tar.gz rtmux-5f483499f3a7b98da9ac67cd62ed91034a5949ed.tar.bz2 rtmux-5f483499f3a7b98da9ac67cd62ed91034a5949ed.zip |
Merge branch 'obsd-master'
Diffstat (limited to 'key-bindings.c')
-rw-r--r-- | key-bindings.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/key-bindings.c b/key-bindings.c index 83b94ac1..47a7d867 100644 --- a/key-bindings.c +++ b/key-bindings.c @@ -37,7 +37,11 @@ key_table_cmp(struct key_table *e1, struct key_table *e2) int key_bindings_cmp(struct key_binding *bd1, struct key_binding *bd2) { - return (bd1->key - bd2->key); + if (bd1->key < bd2->key) + return (-1); + if (bd1->key > bd2->key) + return (1); + return (0); } struct key_table * @@ -80,7 +84,7 @@ key_bindings_unref_table(struct key_table *table) } void -key_bindings_add(const char *name, int key, int can_repeat, +key_bindings_add(const char *name, key_code key, int can_repeat, struct cmd_list *cmdlist) { struct key_table *table; @@ -105,7 +109,7 @@ key_bindings_add(const char *name, int key, int can_repeat, } void -key_bindings_remove(const char *name, int key) +key_bindings_remove(const char *name, key_code key) { struct key_table *table; struct key_binding bd_find, *bd; |