Fix some spacing nits.

This commit is contained in:
nicm 2014-10-22 23:18:53 +00:00
parent 68cb1c0e6b
commit abfb9656ef
7 changed files with 13 additions and 13 deletions

View File

@ -162,7 +162,7 @@ cmd_find_window_exec(struct cmd *self, struct cmd_q *cmdq)
xasprintf(&searchstr, "*%s*", str); xasprintf(&searchstr, "*%s*", str);
RB_FOREACH(wm, winlinks, &s->windows) RB_FOREACH(wm, winlinks, &s->windows)
cmd_find_window_match (&find_list, match_flags, wm, str, searchstr); cmd_find_window_match(&find_list, match_flags, wm, str, searchstr);
free(searchstr); free(searchstr);
if (ARRAY_LENGTH(&find_list) == 0) { if (ARRAY_LENGTH(&find_list) == 0) {

View File

@ -167,16 +167,16 @@ key_bindings_init(void)
RB_INIT(&key_bindings); RB_INIT(&key_bindings);
cmdq = cmdq_new (NULL); cmdq = cmdq_new(NULL);
for (i = 0; i < nitems(defaults); i++) { for (i = 0; i < nitems(defaults); i++) {
error = cmd_string_parse(defaults[i], &cmdlist, error = cmd_string_parse(defaults[i], &cmdlist,
"<default-keys>", i, &cause); "<default-keys>", i, &cause);
if (error != 0) if (error != 0)
fatalx("bad default key"); fatalx("bad default key");
cmdq_run (cmdq, cmdlist); cmdq_run(cmdq, cmdlist);
cmd_list_free (cmdlist); cmd_list_free(cmdlist);
} }
cmdq_free (cmdq); cmdq_free(cmdq);
} }
void void

View File

@ -160,7 +160,7 @@ server_client_lost(struct client *c)
evbuffer_free(c->stdin_data); evbuffer_free(c->stdin_data);
evbuffer_free(c->stdout_data); evbuffer_free(c->stdout_data);
if (c->stderr_data != c->stdout_data) if (c->stderr_data != c->stdout_data)
evbuffer_free (c->stderr_data); evbuffer_free(c->stderr_data);
status_free_jobs(&c->status_new); status_free_jobs(&c->status_new);
status_free_jobs(&c->status_old); status_free_jobs(&c->status_old);
@ -638,7 +638,7 @@ server_client_reset_state(struct client *c)
if (!window_pane_visible(wp) || wp->yoff + s->cy >= c->tty.sy - status) if (!window_pane_visible(wp) || wp->yoff + s->cy >= c->tty.sy - status)
tty_cursor(&c->tty, 0, 0); tty_cursor(&c->tty, 0, 0);
else { else {
o = status && options_get_number (oo, "status-position") == 0; o = status && options_get_number(oo, "status-position") == 0;
tty_cursor(&c->tty, wp->xoff + s->cx, o + wp->yoff + s->cy); tty_cursor(&c->tty, wp->xoff + s->cx, o + wp->yoff + s->cy);
} }

View File

@ -127,7 +127,7 @@ session_create(const char *name, int argc, char **argv, const char *path,
s->name = NULL; s->name = NULL;
do { do {
s->id = next_session_id++; s->id = next_session_id++;
free (s->name); free(s->name);
xasprintf(&s->name, "%u", s->id); xasprintf(&s->name, "%u", s->id);
} while (RB_FIND(sessions, &sessions, s) != NULL); } while (RB_FIND(sessions, &sessions, s) != NULL);
} }

View File

@ -382,7 +382,7 @@ tty_keys_build(struct tty *tty)
const char *s; const char *s;
if (tty->key_tree != NULL) if (tty->key_tree != NULL)
tty_keys_free (tty); tty_keys_free(tty);
tty->key_tree = NULL; tty->key_tree = NULL;
for (i = 0; i < nitems(tty_default_raw_keys); i++) { for (i = 0; i < nitems(tty_default_raw_keys); i++) {

View File

@ -98,7 +98,7 @@ window_choose_add(struct window_pane *wp, struct window_choose_data *wcd)
item->pos = ARRAY_LENGTH(&data->list) - 1; item->pos = ARRAY_LENGTH(&data->list) - 1;
item->state = 0; item->state = 0;
data->width = xsnprintf (tmp, sizeof tmp , "%u", item->pos); data->width = xsnprintf(tmp, sizeof tmp , "%u", item->pos);
} }
void void
@ -787,9 +787,9 @@ window_choose_write_line(
key = window_choose_key_index(data, data->top + py); key = window_choose_key_index(data, data->top + py);
if (key != -1) if (key != -1)
xsnprintf (label, sizeof label, "(%c)", key); xsnprintf(label, sizeof label, "(%c)", key);
else else
xsnprintf (label, sizeof label, "(%d)", item->pos); xsnprintf(label, sizeof label, "(%d)", item->pos);
screen_write_nputs(ctx, screen_size_x(s) - 1, &gc, utf8flag, screen_write_nputs(ctx, screen_size_x(s) - 1, &gc, utf8flag,
"%*s %s %s", data->width + 2, label, "%*s %s %s", data->width + 2, label,
/* /*

View File

@ -1585,7 +1585,7 @@ window_copy_copy_line(struct window_pane *wp,
s = tty_acs_get(NULL, ud.data[0]); s = tty_acs_get(NULL, ud.data[0]);
if (s != NULL && strlen(s) <= sizeof ud.data) { if (s != NULL && strlen(s) <= sizeof ud.data) {
ud.size = strlen(s); ud.size = strlen(s);
memcpy (ud.data, s, ud.size); memcpy(ud.data, s, ud.size);
} }
} }