version 1.5, 2009/07/14 20:20:04 |
version 1.6, 2009/07/15 07:50:34 |
|
|
const char *set_option_clock_mode_style_list[] = { |
const char *set_option_clock_mode_style_list[] = { |
"12", "24", NULL |
"12", "24", NULL |
}; |
}; |
const struct set_option_entry set_window_option_table[NSETWINDOWOPTION] = { |
const struct set_option_entry set_window_option_table[] = { |
{ "aggressive-resize", SET_OPTION_FLAG, 0, 0, NULL }, |
{ "aggressive-resize", SET_OPTION_FLAG, 0, 0, NULL }, |
{ "automatic-rename", SET_OPTION_FLAG, 0, 0, NULL }, |
{ "automatic-rename", SET_OPTION_FLAG, 0, 0, NULL }, |
{ "clock-mode-colour", SET_OPTION_COLOUR, 0, 0, NULL }, |
{ "clock-mode-colour", SET_OPTION_COLOUR, 0, 0, NULL }, |
|
|
{ "window-status-bg", SET_OPTION_COLOUR, 0, 0, NULL }, |
{ "window-status-bg", SET_OPTION_COLOUR, 0, 0, NULL }, |
{ "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL }, |
{ "window-status-fg", SET_OPTION_COLOUR, 0, 0, NULL }, |
{ "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL }, |
{ "xterm-keys", SET_OPTION_FLAG, 0, 0, NULL }, |
|
{ NULL, 0, 0, 0, NULL } |
}; |
}; |
|
|
int |
int |
|
|
struct winlink *wl; |
struct winlink *wl; |
struct client *c; |
struct client *c; |
struct options *oo; |
struct options *oo; |
const struct set_option_entry *entry; |
const struct set_option_entry *entry, *opt; |
u_int i; |
u_int i; |
|
|
if (data->chflags & CMD_CHFLAG('g')) |
if (data->chflags & CMD_CHFLAG('g')) |
|
|
} |
} |
|
|
entry = NULL; |
entry = NULL; |
for (i = 0; i < NSETWINDOWOPTION; i++) { |
for (opt = set_window_option_table; opt->name != NULL; opt++) { |
if (strncmp(set_window_option_table[i].name, |
if (strncmp(opt->name, data->option, strlen(data->option)) != 0) |
data->option, strlen(data->option)) != 0) |
|
continue; |
continue; |
if (entry != NULL) { |
if (entry != NULL) { |
ctx->error(ctx, "ambiguous option: %s", data->option); |
ctx->error(ctx, "ambiguous option: %s", data->option); |
return (-1); |
return (-1); |
} |
} |
entry = &set_window_option_table[i]; |
entry = opt; |
|
|
/* Bail now if an exact match. */ |
/* Bail now if an exact match. */ |
if (strcmp(entry->name, data->option) == 0) |
if (strcmp(entry->name, data->option) == 0) |