diff options
author | 2012-09-03 10:02:39 +0000 | |
---|---|---|
committer | 2012-09-03 10:02:39 +0000 | |
commit | 010f3c3e20722189a897a3033c8f1e2d125b4fea (patch) | |
tree | 4603a5507f3164e5103e0742c65a6bc95794d79e | |
parent | add cmd-choose-list to allow arbitrary options to be selected. From (diff) | |
download | wireguard-openbsd-010f3c3e20722189a897a3033c8f1e2d125b4fea.tar.xz wireguard-openbsd-010f3c3e20722189a897a3033c8f1e2d125b4fea.zip |
Rename variables to something a but more understandable.
-rw-r--r-- | usr.bin/tmux/cmd-choose-list.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/tmux/cmd-choose-list.c b/usr.bin/tmux/cmd-choose-list.c index fc94a2ada03..4b71e532143 100644 --- a/usr.bin/tmux/cmd-choose-list.c +++ b/usr.bin/tmux/cmd-choose-list.c @@ -1,4 +1,4 @@ -/* $Id: cmd-choose-list.c,v 1.1 2012/09/03 09:57:57 nicm Exp $ */ +/* $Id: cmd-choose-list.c,v 1.2 2012/09/03 10:02:39 nicm Exp $ */ /* * Copyright (c) 2012 Thomas Adam <thomas@xteddy.org> @@ -51,8 +51,8 @@ cmd_choose_list_exec(struct cmd *self, struct cmd_ctx *ctx) { struct args *args = self->args; struct winlink *wl; - const char *lists; - char *template, *list, *copy, *lists1; + const char *list1; + char *template, *item, *copy, *list; u_int idx; if (ctx->curclient == NULL) { @@ -60,7 +60,7 @@ cmd_choose_list_exec(struct cmd *self, struct cmd_ctx *ctx) return (CMD_RETURN_ERROR); } - if ((lists = args_get(args, 'l')) == NULL) + if ((list1 = args_get(args, 'l')) == NULL) return (CMD_RETURN_ERROR); if ((wl = cmd_find_window(ctx, args_get(args, 't'), NULL)) == NULL) @@ -74,13 +74,13 @@ cmd_choose_list_exec(struct cmd *self, struct cmd_ctx *ctx) else template = xstrdup(CMD_CHOOSE_LIST_DEFAULT_TEMPLATE); - copy = lists1 = xstrdup(lists); + copy = list = xstrdup(list1); idx = 0; - while ((list = strsep(&lists1, ",")) != NULL) + while ((item = strsep(&list, ",")) != NULL) { - if (*list == '\0') /* no empty entries */ + if (*item == '\0') /* no empty entries */ continue; - window_choose_add_item(wl->window->active, ctx, wl, list, + window_choose_add_item(wl->window->active, ctx, wl, item, template, idx); idx++; } |