Style nits and line wrapping of function declarations.

This commit is contained in:
nicm 2015-12-11 16:37:21 +00:00
parent f2be3ad46f
commit 88bc8f3528
8 changed files with 66 additions and 66 deletions

View File

@ -81,8 +81,8 @@ cmd_list_windows_server(struct cmd *self, struct cmd_q *cmdq)
}
void
cmd_list_windows_session(
struct cmd *self, struct session *s, struct cmd_q *cmdq, int type)
cmd_list_windows_session(struct cmd *self, struct session *s,
struct cmd_q *cmdq, int type)
{
struct args *args = self->args;
struct winlink *wl;

View File

@ -85,9 +85,9 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
{
struct layout_cell *lcchild;
log_debug(
"%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, " ", lc,
lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, lc->sy);
log_debug("%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n,
" ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx,
lc->sy);
switch (lc->type) {
case LAYOUT_LEFTRIGHT:
case LAYOUT_TOPBOTTOM:
@ -100,8 +100,8 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n)
}
void
layout_set_size(
struct layout_cell *lc, u_int sx, u_int sy, u_int xoff, u_int yoff)
layout_set_size(struct layout_cell *lc, u_int sx, u_int sy, u_int xoff,
u_int yoff)
{
lc->sx = sx;
lc->sy = sy;
@ -521,8 +521,8 @@ layout_resize_pane(struct window_pane *wp, enum layout_type type, int change)
/* Helper function to grow pane. */
int
layout_resize_pane_grow(
struct layout_cell *lc, enum layout_type type, int needed)
layout_resize_pane_grow(struct layout_cell *lc, enum layout_type type,
int needed)
{
struct layout_cell *lcadd, *lcremove;
u_int size;
@ -562,8 +562,8 @@ layout_resize_pane_grow(
/* Helper function to shrink pane. */
int
layout_resize_pane_shrink(
struct layout_cell *lc, enum layout_type type, int needed)
layout_resize_pane_shrink(struct layout_cell *lc, enum layout_type type,
int needed)
{
struct layout_cell *lcadd, *lcremove;
u_int size;
@ -605,8 +605,8 @@ layout_assign_pane(struct layout_cell *lc, struct window_pane *wp)
* split. This must be followed by layout_assign_pane before much else happens!
**/
struct layout_cell *
layout_split_pane(
struct window_pane *wp, enum layout_type type, int size, int insert_before)
layout_split_pane(struct window_pane *wp, enum layout_type type, int size,
int insert_before)
{
struct layout_cell *lc, *lcparent, *lcnew, *lc1, *lc2;
u_int sx, sy, xoff, yoff, size1, size2;

View File

@ -767,8 +767,8 @@ screen_write_reverseindex(struct screen_write_ctx *ctx)
/* Set scroll region. */
void
screen_write_scrollregion(
struct screen_write_ctx *ctx, u_int rupper, u_int rlower)
screen_write_scrollregion(struct screen_write_ctx *ctx, u_int rupper,
u_int rlower)
{
struct screen *s = ctx->s;
@ -874,16 +874,16 @@ screen_write_clearscreen(struct screen_write_ctx *ctx)
{
struct screen *s = ctx->s;
struct tty_ctx ttyctx;
u_int sx = screen_size_x(s);
u_int sy = screen_size_y(s);
screen_write_initctx(ctx, &ttyctx, 0);
/* Scroll into history if it is enabled. */
if (s->grid->flags & GRID_HISTORY)
grid_view_clear_history(s->grid);
else {
grid_view_clear(
s->grid, 0, 0, screen_size_x(s), screen_size_y(s));
}
else
grid_view_clear(s->grid, 0, 0, sx, sy);
tty_write(tty_cmd_clearscreen, &ttyctx);
}

View File

@ -1124,8 +1124,8 @@ status_prompt_key(struct client *c, key_code key)
}
if (c->prompt_flags & PROMPT_SINGLE) {
if (c->prompt_callbackfn(
c->prompt_data, c->prompt_buffer) == 0)
if (c->prompt_callbackfn(c->prompt_data,
c->prompt_buffer) == 0)
status_prompt_clear(c);
}

38
tmux.h
View File

@ -1664,10 +1664,10 @@ void tty_term_free(struct tty_term *);
int tty_term_has(struct tty_term *, enum tty_code_code);
const char *tty_term_string(struct tty_term *, enum tty_code_code);
const char *tty_term_string1(struct tty_term *, enum tty_code_code, int);
const char *tty_term_string2(
struct tty_term *, enum tty_code_code, int, int);
const char *tty_term_ptr1(
struct tty_term *, enum tty_code_code, const void *);
const char *tty_term_string2(struct tty_term *, enum tty_code_code, int,
int);
const char *tty_term_ptr1(struct tty_term *, enum tty_code_code,
const void *);
const char *tty_term_ptr2(struct tty_term *, enum tty_code_code,
const void *, const void *);
int tty_term_number(struct tty_term *, enum tty_code_code);
@ -1904,8 +1904,8 @@ void grid_move_lines(struct grid *, u_int, u_int, u_int);
void grid_move_cells(struct grid *, u_int, u_int, u_int, u_int);
char *grid_string_cells(struct grid *, u_int, u_int, u_int,
struct grid_cell **, int, int, int);
void grid_duplicate_lines(
struct grid *, u_int, struct grid *, u_int, u_int);
void grid_duplicate_lines(struct grid *, u_int, struct grid *, u_int,
u_int);
u_int grid_reflow(struct grid *, struct grid *, u_int);
/* grid-view.c */
@ -2056,14 +2056,14 @@ void window_pane_alternate_on(struct window_pane *,
struct grid_cell *, int);
void window_pane_alternate_off(struct window_pane *,
struct grid_cell *, int);
int window_pane_set_mode(
struct window_pane *, const struct window_mode *);
int window_pane_set_mode(struct window_pane *,
const struct window_mode *);
void window_pane_reset_mode(struct window_pane *);
void window_pane_key(struct window_pane *, struct client *,
struct session *, key_code, struct mouse_event *);
int window_pane_visible(struct window_pane *);
char *window_pane_search(
struct window_pane *, const char *, u_int *);
char *window_pane_search(struct window_pane *, const char *,
u_int *);
char *window_printable_flags(struct session *, struct winlink *);
struct window_pane *window_pane_find_up(struct window_pane *);
struct window_pane *window_pane_find_down(struct window_pane *);
@ -2079,17 +2079,17 @@ u_int layout_count_cells(struct layout_cell *);
struct layout_cell *layout_create_cell(struct layout_cell *);
void layout_free_cell(struct layout_cell *);
void layout_print_cell(struct layout_cell *, const char *, u_int);
void layout_destroy_cell(struct layout_cell *, struct layout_cell **);
void layout_set_size(
struct layout_cell *, u_int, u_int, u_int, u_int);
void layout_make_leaf(
struct layout_cell *, struct window_pane *);
void layout_destroy_cell(struct layout_cell *,
struct layout_cell **);
void layout_set_size(struct layout_cell *, u_int, u_int, u_int,
u_int);
void layout_make_leaf(struct layout_cell *, struct window_pane *);
void layout_make_node(struct layout_cell *, enum layout_type);
void layout_fix_offsets(struct layout_cell *);
void layout_fix_panes(struct window *, u_int, u_int);
u_int layout_resize_check(struct layout_cell *, enum layout_type);
void layout_resize_adjust(
struct layout_cell *, enum layout_type, int);
void layout_resize_adjust(struct layout_cell *, enum layout_type,
int);
void layout_init(struct window *, struct window_pane *);
void layout_free(struct window *);
void layout_resize(struct window *, u_int, u_int);
@ -2098,8 +2098,8 @@ void layout_resize_pane(struct window_pane *, enum layout_type,
void layout_resize_pane_to(struct window_pane *, enum layout_type,
u_int);
void layout_assign_pane(struct layout_cell *, struct window_pane *);
struct layout_cell *layout_split_pane(
struct window_pane *, enum layout_type, int, int);
struct layout_cell *layout_split_pane(struct window_pane *, enum layout_type,
int, int);
void layout_close_pane(struct window_pane *);
/* layout-custom.c */

View File

@ -406,12 +406,12 @@ tty_term_find(char *name, int fd, char **cause)
if (setupterm(name, fd, &error) != OK) {
switch (error) {
case 1:
xasprintf(
cause, "can't use hardcopy terminal: %s", name);
xasprintf(cause, "can't use hardcopy terminal: %s",
name);
break;
case 0:
xasprintf(
cause, "missing or unsuitable terminal: %s", name);
xasprintf(cause, "missing or unsuitable terminal: %s",
name);
break;
case -1:
xasprintf(cause, "can't find terminfo database");

12
tty.c
View File

@ -48,8 +48,8 @@ void tty_colours_bg(struct tty *, const struct grid_cell *);
int tty_large_region(struct tty *, const struct tty_ctx *);
int tty_fake_bce(const struct tty *, const struct window_pane *);
void tty_redraw_region(struct tty *, const struct tty_ctx *);
void tty_emulate_repeat(
struct tty *, enum tty_code_code, enum tty_code_code, u_int);
void tty_emulate_repeat(struct tty *, enum tty_code_code, enum tty_code_code,
u_int);
void tty_repeat_space(struct tty *, u_int);
void tty_cell(struct tty *, const struct grid_cell *,
const struct window_pane *);
@ -161,8 +161,8 @@ tty_open(struct tty *tty, char **cause)
tty->flags &= ~(TTY_NOCURSOR|TTY_FREEZE|TTY_TIMER);
tty->event = bufferevent_new(
tty->fd, tty_read_callback, NULL, tty_error_callback, tty);
tty->event = bufferevent_new(tty->fd, tty_read_callback, NULL,
tty_error_callback, tty);
tty_start_tty(tty);
@ -1188,8 +1188,8 @@ tty_reset(struct tty *tty)
/* Set region inside pane. */
void
tty_region_pane(
struct tty *tty, const struct tty_ctx *ctx, u_int rupper, u_int rlower)
tty_region_pane(struct tty *tty, const struct tty_ctx *ctx, u_int rupper,
u_int rlower)
{
tty_region(tty, ctx->yoff + rupper, ctx->yoff + rlower);
}

View File

@ -35,11 +35,11 @@ void window_choose_default_callback(struct window_choose_data *);
struct window_choose_mode_item *window_choose_get_item(struct window_pane *,
key_code, struct mouse_event *);
void window_choose_fire_callback(
struct window_pane *, struct window_choose_data *);
void window_choose_fire_callback(struct window_pane *,
struct window_choose_data *);
void window_choose_redraw_screen(struct window_pane *);
void window_choose_write_line(
struct window_pane *, struct screen_write_ctx *, u_int);
void window_choose_write_line(struct window_pane *,
struct screen_write_ctx *, u_int);
void window_choose_scroll_up(struct window_pane *);
void window_choose_scroll_down(struct window_pane *);
@ -299,8 +299,8 @@ window_choose_resize(struct window_pane *wp, u_int sx, u_int sy)
}
void
window_choose_fire_callback(
struct window_pane *wp, struct window_choose_data *wcd)
window_choose_fire_callback(struct window_pane *wp,
struct window_choose_data *wcd)
{
struct window_choose_mode_data *data = wp->modedata;
@ -614,10 +614,10 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
window_choose_scroll_up(wp);
else {
screen_write_start(&ctx, wp, NULL);
window_choose_write_line(
wp, &ctx, data->selected - data->top);
window_choose_write_line(
wp, &ctx, data->selected + 1 - data->top);
window_choose_write_line(wp, &ctx,
data->selected - data->top);
window_choose_write_line(wp, &ctx,
data->selected + 1 - data->top);
screen_write_stop(&ctx);
}
break;
@ -634,10 +634,10 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
if (data->selected < data->top + screen_size_y(s)) {
screen_write_start(&ctx, wp, NULL);
window_choose_write_line(
wp, &ctx, data->selected - data->top);
window_choose_write_line(
wp, &ctx, data->selected - 1 - data->top);
window_choose_write_line(wp, &ctx,
data->selected - data->top);
window_choose_write_line(wp, &ctx,
data->selected - 1 - data->top);
screen_write_stop(&ctx);
} else
window_choose_scroll_down(wp);
@ -649,8 +649,8 @@ window_choose_key(struct window_pane *wp, __unused struct client *c,
data->selected--;
window_choose_scroll_up(wp);
screen_write_start(&ctx, wp, NULL);
window_choose_write_line(
wp, &ctx, screen_size_y(s) - 1);
window_choose_write_line(wp, &ctx,
screen_size_y(s) - 1);
screen_write_stop(&ctx);
} else
window_choose_scroll_up(wp);