mirror of
https://github.com/tmate-io/tmate.git
synced 2025-08-16 08:38:12 +02:00
Sync OpenBSD patchset 1008:
Use RB trees not SPLAY.
This commit is contained in:
18
tmux.h
18
tmux.h
@ -541,9 +541,9 @@ struct mode_key_binding {
|
||||
int mode;
|
||||
enum mode_key_cmd cmd;
|
||||
|
||||
SPLAY_ENTRY(mode_key_binding) entry;
|
||||
RB_ENTRY(mode_key_binding) entry;
|
||||
};
|
||||
SPLAY_HEAD(mode_key_tree, mode_key_binding);
|
||||
RB_HEAD(mode_key_tree, mode_key_binding);
|
||||
|
||||
/* Command to string mapping. */
|
||||
struct mode_key_cmdstr {
|
||||
@ -670,11 +670,11 @@ struct options_entry {
|
||||
char *str;
|
||||
long long num;
|
||||
|
||||
SPLAY_ENTRY(options_entry) entry;
|
||||
RB_ENTRY(options_entry) entry;
|
||||
};
|
||||
|
||||
struct options {
|
||||
SPLAY_HEAD(options_tree, options_entry) tree;
|
||||
RB_HEAD(options_tree, options_entry) tree;
|
||||
struct options *parent;
|
||||
};
|
||||
|
||||
@ -1272,9 +1272,9 @@ struct key_binding {
|
||||
struct cmd_list *cmdlist;
|
||||
int can_repeat;
|
||||
|
||||
SPLAY_ENTRY(key_binding) entry;
|
||||
RB_ENTRY(key_binding) entry;
|
||||
};
|
||||
SPLAY_HEAD(key_bindings, key_binding);
|
||||
RB_HEAD(key_bindings, key_binding);
|
||||
|
||||
/*
|
||||
* Option table entries. The option table is the user-visible part of the
|
||||
@ -1379,7 +1379,7 @@ extern struct mode_key_tree mode_key_tree_emacs_edit;
|
||||
extern struct mode_key_tree mode_key_tree_emacs_choice;
|
||||
extern struct mode_key_tree mode_key_tree_emacs_copy;
|
||||
int mode_key_cmp(struct mode_key_binding *, struct mode_key_binding *);
|
||||
SPLAY_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);
|
||||
RB_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);
|
||||
const char *mode_key_tostring(const struct mode_key_cmdstr *,
|
||||
enum mode_key_cmd);
|
||||
enum mode_key_cmd mode_key_fromstring(const struct mode_key_cmdstr *,
|
||||
@ -1391,7 +1391,7 @@ enum mode_key_cmd mode_key_lookup(struct mode_key_data *, int);
|
||||
|
||||
/* options.c */
|
||||
int options_cmp(struct options_entry *, struct options_entry *);
|
||||
SPLAY_PROTOTYPE(options_tree, options_entry, entry, options_cmp);
|
||||
RB_PROTOTYPE(options_tree, options_entry, entry, options_cmp);
|
||||
void options_init(struct options *, struct options *);
|
||||
void options_free(struct options *);
|
||||
struct options_entry *options_find1(struct options *, const char *);
|
||||
@ -1653,7 +1653,7 @@ int client_main(int, char **, int);
|
||||
/* key-bindings.c */
|
||||
extern struct key_bindings key_bindings;
|
||||
int key_bindings_cmp(struct key_binding *, struct key_binding *);
|
||||
SPLAY_PROTOTYPE(key_bindings, key_binding, entry, key_bindings_cmp);
|
||||
RB_PROTOTYPE(key_bindings, key_binding, entry, key_bindings_cmp);
|
||||
struct key_binding *key_bindings_lookup(int);
|
||||
void key_bindings_add(int, int, struct cmd_list *);
|
||||
void key_bindings_remove(int);
|
||||
|
Reference in New Issue
Block a user