diff options
author | nicm <nicm> | 2015-10-27 15:58:42 +0000 |
---|---|---|
committer | nicm <nicm> | 2015-10-27 15:58:42 +0000 |
commit | 44657bf932b068aff5ce1019a4e8a2e7b00b5321 (patch) | |
tree | 9efb1fa8a96b0a362a51d894bd36c45aa9731a98 /cmd-set-option.c | |
parent | 67c3a014b960b8c1d7931d3c99f570610b1d4d3f (diff) | |
download | rtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.tar.gz rtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.tar.bz2 rtmux-44657bf932b068aff5ce1019a4e8a2e7b00b5321.zip |
Move struct options into options.c.
Diffstat (limited to 'cmd-set-option.c')
-rw-r--r-- | cmd-set-option.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/cmd-set-option.c b/cmd-set-option.c index e0b07edb..6762e6ad 100644 --- a/cmd-set-option.c +++ b/cmd-set-option.c @@ -126,10 +126,10 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) /* Work out the tree from the table. */ if (table == server_options_table) - oo = &global_options; + oo = global_options; else if (table == window_options_table) { if (args_has(self->args, 'g')) - oo = &global_w_options; + oo = global_w_options; else { wl = cmd_find_window(cmdq, args_get(args, 't'), NULL); if (wl == NULL) { @@ -139,11 +139,11 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) 'g')) ? " need target window or -g" : ""); return (CMD_RETURN_ERROR); } - oo = &wl->window->options; + oo = wl->window->options; } } else if (table == session_options_table) { if (args_has(self->args, 'g')) - oo = &global_s_options; + oo = global_s_options; else { s = cmd_find_session(cmdq, args_get(args, 't'), 0); if (s == NULL) { @@ -153,7 +153,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) 'g')) ? " need target session or -g" : ""); return (CMD_RETURN_ERROR); } - oo = &s->options; + oo = s->options; } } else { cmdq_error(cmdq, "unknown table"); @@ -179,7 +179,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq) /* Start or stop timers if necessary. */ if (strcmp(oe->name, "automatic-rename") == 0) { RB_FOREACH(w, windows, &windows) { - if (options_get_number(&w->options, "automatic-rename")) + if (options_get_number(w->options, "automatic-rename")) w->active->flags |= PANE_CHANGED; } } @@ -210,25 +210,25 @@ cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char *optstr, struct options *oo; if (args_has(args, 's')) - oo = &global_options; + oo = global_options; else if (args_has(self->args, 'w') || self->entry == &cmd_set_window_option_entry) { if (args_has(self->args, 'g')) - oo = &global_w_options; + oo = global_w_options; else { wl = cmd_find_window(cmdq, args_get(args, 't'), NULL); if (wl == NULL) return (CMD_RETURN_ERROR); - oo = &wl->window->options; + oo = wl->window->options; } } else { if (args_has(self->args, 'g')) - oo = &global_s_options; + oo = global_s_options; else { s = cmd_find_session(cmdq, args_get(args, 't'), 0); if (s == NULL) return (CMD_RETURN_ERROR); - oo = &s->options; + oo = s->options; } } @@ -276,7 +276,7 @@ cmd_set_option_unset(struct cmd *self, struct cmd_q *cmdq, return (-1); } - if (args_has(args, 'g') || oo == &global_options) { + if (args_has(args, 'g') || oo == global_options) { switch (oe->type) { case OPTIONS_TABLE_STRING: options_set_string(oo, oe->name, "%s", oe->default_str); |