diff options
author | Tiago Cunha <tcunha@gmx.com> | 2011-01-03 23:52:38 +0000 |
---|---|---|
committer | Tiago Cunha <tcunha@gmx.com> | 2011-01-03 23:52:38 +0000 |
commit | 36c7c7537a218ec83661b529d9f3340842f8497e (patch) | |
tree | 703d5f3033e3cb158f4e4d5dad627bcdbd181d73 /status.c | |
parent | 2bdae526ad07254a9eb0101b5811291329eb0fac (diff) | |
download | rtmux-36c7c7537a218ec83661b529d9f3340842f8497e.tar.gz rtmux-36c7c7537a218ec83661b529d9f3340842f8497e.tar.bz2 rtmux-36c7c7537a218ec83661b529d9f3340842f8497e.zip |
Sync OpenBSD patchset 826:
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 | 32 |
1 files changed, 16 insertions, 16 deletions
@@ -1,4 +1,4 @@ -/* $Id: status.c,v 1.152 2010-12-30 22:39:49 tcunha Exp $ */ +/* $Id: status.c,v 1.153 2011-01-03 23:52:38 tcunha Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -1125,12 +1125,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); @@ -1141,17 +1141,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. */ |