summaryrefslogtreecommitdiffstats
path: root/cmd.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-12-03 22:50:09 +0000
commit15a64b805e46584d37cc6745383709632e287999 (patch)
tree5a55f5006585c9cdde05163251fd99da243575b5 /cmd.c
parent6c9862662fd2cccdc55be9d447a27b10f33ed8ea (diff)
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
time now I've configured emacs to make them displayed in really annoying colours...
Diffstat (limited to 'cmd.c')
-rw-r--r--cmd.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/cmd.c b/cmd.c
index 733f4013..d094427b 100644
--- a/cmd.c
+++ b/cmd.c
@@ -169,7 +169,7 @@ cmd_free_argv(int argc, char **argv)
int i;
if (argc == 0)
- return;
+ return;
for (i = 0; i < argc; i++) {
if (argv[i] != NULL)
xfree(argv[i]);
@@ -510,7 +510,7 @@ cmd_lookup_session(const char *name, int *ambiguous)
* be unique so an exact match can't be ambigious and can just be
* returned.
*/
- for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
+ for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
if ((s = ARRAY_ITEM(&sessions, i)) == NULL)
continue;
if (strcmp(name, s->name) == 0)
@@ -522,7 +522,7 @@ cmd_lookup_session(const char *name, int *ambiguous)
* be ambiguous.
*/
sfound = NULL;
- for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
+ for (i = 0; i < ARRAY_LENGTH(&sessions); i++) {
if ((s = ARRAY_ITEM(&sessions, i)) == NULL)
continue;
if (strncmp(name, s->name, strlen(name)) == 0 ||
@@ -534,7 +534,7 @@ cmd_lookup_session(const char *name, int *ambiguous)
sfound = s;
}
}
- return (sfound);
+ return (sfound);
}
/*
@@ -558,7 +558,7 @@ cmd_lookup_window(struct session *s, const char *name, int *ambiguous)
if ((wl = winlink_find_by_index(&s->windows, idx)) != NULL)
return (wl);
}
-
+
/* Look for exact matches, error if more than one. */
wlfound = NULL;
RB_FOREACH(wl, winlinks, &s->windows) {
@@ -584,7 +584,7 @@ cmd_lookup_window(struct session *s, const char *name, int *ambiguous)
}
wlfound = wl;
}
- }
+ }
if (wlfound != NULL)
return (wlfound);
@@ -707,7 +707,7 @@ cmd_find_window(struct cmd_ctx *ctx, const char *arg, struct session **sp)
wl = s->curw;
else if ((wl = cmd_lookup_window(s, winptr, &ambiguous)) == NULL)
goto not_found;
-
+
if (sessptr != NULL)
xfree(sessptr);
return (wl);
@@ -808,7 +808,7 @@ cmd_find_index(struct cmd_ctx *ctx, const char *arg, struct session **sp)
ctx->error(ctx, "invalid index: %s", arg);
idx = -2;
}
-
+
if (sessptr != NULL)
xfree(sessptr);
return (idx);
@@ -830,7 +830,7 @@ no_colon:
no_session:
if (ambiguous)
- ctx->error(ctx, "multiple sessions: %s", arg);
+ ctx->error(ctx, "multiple sessions: %s", arg);
else
ctx->error(ctx, "session not found: %s", arg);
if (sessptr != NULL)
@@ -918,7 +918,7 @@ no_period:
/* Try index in the current session and window. */
if ((*wpp = window_pane_at_index(s->curw->window, idx)) == NULL)
goto lookup_window;
-
+
return (s->curw);
lookup_window:
@@ -926,7 +926,7 @@ lookup_window:
if ((wl = cmd_find_window(ctx, arg, sp)) != NULL)
*wpp = wl->window->active;
return (wl);
-
+
error:
xfree(winptr);
return (NULL);