version 1.3, 2009/07/07 19:49:19 |
version 1.4, 2009/07/13 23:11:35 |
|
|
const struct cmd_entry cmd_set_window_option_entry = { |
const struct cmd_entry cmd_set_window_option_entry = { |
"set-window-option", "setw", |
"set-window-option", "setw", |
CMD_OPTION_WINDOW_USAGE, |
CMD_OPTION_WINDOW_USAGE, |
CMD_GFLAG|CMD_UFLAG, |
0, CMD_CHFLAG('g')|CMD_CHFLAG('u'), |
NULL, |
NULL, |
cmd_option_parse, |
cmd_option_parse, |
cmd_set_window_option_exec, |
cmd_set_window_option_exec, |
|
|
const struct set_option_entry *entry; |
const struct set_option_entry *entry; |
u_int i; |
u_int i; |
|
|
if (data->flags & CMD_GFLAG) |
if (data->chflags & CMD_CHFLAG('g')) |
oo = &global_w_options; |
oo = &global_w_options; |
else { |
else { |
if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL) |
if ((wl = cmd_find_window(ctx, data->target, NULL)) == NULL) |
|
|
return (-1); |
return (-1); |
} |
} |
|
|
if (data->flags & CMD_UFLAG) { |
if (data->chflags & CMD_CHFLAG('u')) { |
if (data->flags & CMD_GFLAG) { |
if (data->chflags & CMD_CHFLAG('g')) { |
ctx->error(ctx, |
ctx->error(ctx, |
"can't unset global option: %s", entry->name); |
"can't unset global option: %s", entry->name); |
return (-1); |
return (-1); |