Make array options a sparse tree instead of an array of char * and

remove the size limit.
This commit is contained in:
nicm
2019-03-18 11:58:40 +00:00
parent d2d43987d0
commit ce6be7afd4
9 changed files with 197 additions and 117 deletions

7
tmux.h
View File

@ -50,6 +50,7 @@ struct mode_tree_data;
struct mouse_event;
struct options;
struct options_entry;
struct options_array_item;
struct session;
struct tmuxpeer;
struct tmuxproc;
@ -1642,8 +1643,12 @@ void options_array_clear(struct options_entry *);
const char *options_array_get(struct options_entry *, u_int);
int options_array_set(struct options_entry *, u_int, const char *,
int);
int options_array_size(struct options_entry *, u_int *);
void options_array_assign(struct options_entry *, const char *);
struct options_array_item *options_array_first(struct options_entry *);
struct options_array_item *options_array_next(struct options_array_item *);
u_int options_array_item_index(struct options_array_item *);
const char *options_array_item_value(struct options_array_item *);
int options_isarray(struct options_entry *);
int options_isstring(struct options_entry *);
const char *options_tostring(struct options_entry *, int, int);
char *options_parse(const char *, int *);