diff options
author | Nicholas Marriott <nicm@openbsd.org> | 2011-01-01 16:51:21 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@openbsd.org> | 2011-01-01 16:51:21 +0000 |
commit | 3e8124009f6737c656e260b2f5b459b4ebe1a10c (patch) | |
tree | b726a5db7cbcc8ff5d4b139be15911e46f3217c8 /status.c | |
parent | a4515ce138a7c5f275a7134018cfa28c76612321 (diff) | |
download | rtmux-3e8124009f6737c656e260b2f5b459b4ebe1a10c.tar.gz rtmux-3e8124009f6737c656e260b2f5b459b4ebe1a10c.tar.bz2 rtmux-3e8124009f6737c656e260b2f5b459b4ebe1a10c.zip |
Move the user-visible parts of all options (names, types, limit, default
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.
Diffstat (limited to 'status.c')
-rw-r--r-- | status.c | 30 |
1 files changed, 15 insertions, 15 deletions
@@ -1112,12 +1112,12 @@ status_prompt_add_history(const char *line) char * status_prompt_complete(const char *s) { - const struct cmd_entry **cmdent; - const struct set_option_entry *entry; - ARRAY_DECL(, const char *) list; - char *prefix, *s2; - u_int i; - size_t j; + const struct cmd_entry **cmdent; + const struct options_table_entry *oe; + ARRAY_DECL(, const char *) list; + char *prefix, *s2; + u_int i; + size_t j; if (*s == '\0') return (NULL); @@ -1128,17 +1128,17 @@ status_prompt_complete(const char *s) if (strncmp((*cmdent)->name, s, strlen(s)) == 0) ARRAY_ADD(&list, (*cmdent)->name); } - for (entry = set_option_table; entry->name != NULL; entry++) { - if (strncmp(entry->name, s, strlen(s)) == 0) - ARRAY_ADD(&list, entry->name); + for (oe = server_options_table; oe->name != NULL; oe++) { + if (strncmp(oe->name, s, strlen(s)) == 0) + ARRAY_ADD(&list, oe->name); } - for (entry = set_session_option_table; entry->name != NULL; entry++) { - if (strncmp(entry->name, s, strlen(s)) == 0) - ARRAY_ADD(&list, entry->name); + for (oe = session_options_table; oe->name != NULL; oe++) { + if (strncmp(oe->name, s, strlen(s)) == 0) + ARRAY_ADD(&list, oe->name); } - for (entry = set_window_option_table; entry->name != NULL; entry++) { - if (strncmp(entry->name, s, strlen(s)) == 0) - ARRAY_ADD(&list, entry->name); + for (oe = window_options_table; oe->name != NULL; oe++) { + if (strncmp(oe->name, s, strlen(s)) == 0) + ARRAY_ADD(&list, oe->name); } /* If none, bail now. */ |