diff options
author | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:32:39 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2009-11-08 23:32:39 +0000 |
commit | 181e1cc711ca0ad12300122223165d0853804009 (patch) | |
tree | 471809f9ba9f119b8f09c276b91fa959403ac56c /tmux.h | |
parent | f18b224983af08b160af173730698136ea9b7ce4 (diff) | |
download | rtmux-181e1cc711ca0ad12300122223165d0853804009.tar.gz rtmux-181e1cc711ca0ad12300122223165d0853804009.tar.bz2 rtmux-181e1cc711ca0ad12300122223165d0853804009.zip |
Sync OpenBSD patchset 513:
Switch the tty key tree over to an (unbalanced) ternary tree which allows
partial matches to be done (they wait for further data or a timer to expire,
like a naked escape).
Mouse and xterm-style keys still expect to be atomic.
Diffstat (limited to 'tmux.h')
-rw-r--r-- | tmux.h | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1,4 +1,4 @@ -/* $Id: tmux.h,v 1.510 2009-11-08 23:29:34 tcunha Exp $ */ +/* $Id: tmux.h,v 1.511 2009-11-08 23:32:39 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -935,10 +935,13 @@ ARRAY_DECL(sessions, struct session *); /* TTY information. */ struct tty_key { + char ch; int key; - char *string; - RB_ENTRY(tty_key) entry; + struct tty_key *left; + struct tty_key *right; + + struct tty_key *next; }; struct tty_term { @@ -997,9 +1000,7 @@ struct tty { void (*key_callback)(int, struct mouse_event *, void *); void *key_data; struct event key_timer; - - size_t ksize; /* maximum key size */ - RB_HEAD(tty_keys, tty_key) ktree; + struct tty_key *key_tree; }; /* TTY command context and function pointer. */ @@ -1350,8 +1351,6 @@ int tty_term_number(struct tty_term *, enum tty_code_code); int tty_term_flag(struct tty_term *, enum tty_code_code); /* tty-keys.c */ -int tty_keys_cmp(struct tty_key *, struct tty_key *); -RB_PROTOTYPE(tty_keys, tty_key, entry, tty_keys_cmp); void tty_keys_init(struct tty *); void tty_keys_free(struct tty *); int tty_keys_next(struct tty *); |