mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Style nits and line wrapping of function declarations.
This commit is contained in:
		| @@ -81,8 +81,8 @@ cmd_list_windows_server(struct cmd *self, struct cmd_q *cmdq) | |||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| cmd_list_windows_session( | cmd_list_windows_session(struct cmd *self, struct session *s, | ||||||
|     struct cmd *self, struct session *s, struct cmd_q *cmdq, int type) |     struct cmd_q *cmdq, int type) | ||||||
| { | { | ||||||
| 	struct args		*args = self->args; | 	struct args		*args = self->args; | ||||||
| 	struct winlink		*wl; | 	struct winlink		*wl; | ||||||
|   | |||||||
							
								
								
									
										22
									
								
								layout.c
									
									
									
									
									
								
							
							
						
						
									
										22
									
								
								layout.c
									
									
									
									
									
								
							| @@ -85,9 +85,9 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n) | |||||||
| { | { | ||||||
| 	struct layout_cell	*lcchild; | 	struct layout_cell	*lcchild; | ||||||
|  |  | ||||||
| 	log_debug( | 	log_debug("%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, | ||||||
| 	    "%s:%*s%p type %u [parent %p] wp=%p [%u,%u %ux%u]", hdr, n, " ", lc, | 	    " ", lc, lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, | ||||||
| 	    lc->type, lc->parent, lc->wp, lc->xoff, lc->yoff, lc->sx, lc->sy); | 	    lc->sy); | ||||||
| 	switch (lc->type) { | 	switch (lc->type) { | ||||||
| 	case LAYOUT_LEFTRIGHT: | 	case LAYOUT_LEFTRIGHT: | ||||||
| 	case LAYOUT_TOPBOTTOM: | 	case LAYOUT_TOPBOTTOM: | ||||||
| @@ -100,8 +100,8 @@ layout_print_cell(struct layout_cell *lc, const char *hdr, u_int n) | |||||||
| } | } | ||||||
|  |  | ||||||
| void | void | ||||||
| layout_set_size( | layout_set_size(struct layout_cell *lc, u_int sx, u_int sy, u_int xoff, | ||||||
|     struct layout_cell *lc, u_int sx, u_int sy, u_int xoff, u_int yoff) |     u_int yoff) | ||||||
| { | { | ||||||
| 	lc->sx = sx; | 	lc->sx = sx; | ||||||
| 	lc->sy = sy; | 	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. */ | /* Helper function to grow pane. */ | ||||||
| int | int | ||||||
| layout_resize_pane_grow( | layout_resize_pane_grow(struct layout_cell *lc, enum layout_type type, | ||||||
|     struct layout_cell *lc, enum layout_type type, int needed) |     int needed) | ||||||
| { | { | ||||||
| 	struct layout_cell	*lcadd, *lcremove; | 	struct layout_cell	*lcadd, *lcremove; | ||||||
| 	u_int			 size; | 	u_int			 size; | ||||||
| @@ -562,8 +562,8 @@ layout_resize_pane_grow( | |||||||
|  |  | ||||||
| /* Helper function to shrink pane. */ | /* Helper function to shrink pane. */ | ||||||
| int | int | ||||||
| layout_resize_pane_shrink( | layout_resize_pane_shrink(struct layout_cell *lc, enum layout_type type, | ||||||
|     struct layout_cell *lc, enum layout_type type, int needed) |     int needed) | ||||||
| { | { | ||||||
| 	struct layout_cell	*lcadd, *lcremove; | 	struct layout_cell	*lcadd, *lcremove; | ||||||
| 	u_int			 size; | 	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! |  * split. This must be followed by layout_assign_pane before much else happens! | ||||||
|  **/ |  **/ | ||||||
| struct layout_cell * | struct layout_cell * | ||||||
| layout_split_pane( | layout_split_pane(struct window_pane *wp, enum layout_type type, int size, | ||||||
|     struct window_pane *wp, enum layout_type type, int size, int insert_before) |     int insert_before) | ||||||
| { | { | ||||||
| 	struct layout_cell     *lc, *lcparent, *lcnew, *lc1, *lc2; | 	struct layout_cell     *lc, *lcparent, *lcnew, *lc1, *lc2; | ||||||
| 	u_int			sx, sy, xoff, yoff, size1, size2; | 	u_int			sx, sy, xoff, yoff, size1, size2; | ||||||
|   | |||||||
| @@ -767,8 +767,8 @@ screen_write_reverseindex(struct screen_write_ctx *ctx) | |||||||
|  |  | ||||||
| /* Set scroll region. */ | /* Set scroll region. */ | ||||||
| void | void | ||||||
| screen_write_scrollregion( | screen_write_scrollregion(struct screen_write_ctx *ctx, u_int rupper, | ||||||
|     struct screen_write_ctx *ctx, u_int rupper, u_int rlower) |     u_int rlower) | ||||||
| { | { | ||||||
| 	struct screen	*s = ctx->s; | 	struct screen	*s = ctx->s; | ||||||
|  |  | ||||||
| @@ -874,16 +874,16 @@ screen_write_clearscreen(struct screen_write_ctx *ctx) | |||||||
| { | { | ||||||
| 	struct screen	*s = ctx->s; | 	struct screen	*s = ctx->s; | ||||||
| 	struct tty_ctx	 ttyctx; | 	struct tty_ctx	 ttyctx; | ||||||
|  | 	u_int		 sx = screen_size_x(s); | ||||||
|  | 	u_int		 sy = screen_size_y(s); | ||||||
|  |  | ||||||
| 	screen_write_initctx(ctx, &ttyctx, 0); | 	screen_write_initctx(ctx, &ttyctx, 0); | ||||||
|  |  | ||||||
| 	/* Scroll into history if it is enabled. */ | 	/* Scroll into history if it is enabled. */ | ||||||
| 	if (s->grid->flags & GRID_HISTORY) | 	if (s->grid->flags & GRID_HISTORY) | ||||||
| 		grid_view_clear_history(s->grid); | 		grid_view_clear_history(s->grid); | ||||||
| 	else { | 	else | ||||||
| 		grid_view_clear( | 		grid_view_clear(s->grid, 0, 0, sx, sy); | ||||||
| 		    s->grid, 0, 0, screen_size_x(s), screen_size_y(s)); |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	tty_write(tty_cmd_clearscreen, &ttyctx); | 	tty_write(tty_cmd_clearscreen, &ttyctx); | ||||||
| } | } | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								status.c
									
									
									
									
									
								
							| @@ -1124,8 +1124,8 @@ status_prompt_key(struct client *c, key_code key) | |||||||
| 		} | 		} | ||||||
|  |  | ||||||
| 		if (c->prompt_flags & PROMPT_SINGLE) { | 		if (c->prompt_flags & PROMPT_SINGLE) { | ||||||
| 			if (c->prompt_callbackfn( | 			if (c->prompt_callbackfn(c->prompt_data, | ||||||
| 			    c->prompt_data, c->prompt_buffer) == 0) | 			    c->prompt_buffer) == 0) | ||||||
| 				status_prompt_clear(c); | 				status_prompt_clear(c); | ||||||
| 		} | 		} | ||||||
|  |  | ||||||
|   | |||||||
							
								
								
									
										38
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										38
									
								
								tmux.h
									
									
									
									
									
								
							| @@ -1664,10 +1664,10 @@ void		 tty_term_free(struct tty_term *); | |||||||
| int		 tty_term_has(struct tty_term *, enum tty_code_code); | 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_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_string1(struct tty_term *, enum tty_code_code, int); | ||||||
| const char	*tty_term_string2( | const char	*tty_term_string2(struct tty_term *, enum tty_code_code, int, | ||||||
| 		     struct tty_term *, enum tty_code_code, int, int); | 		     int); | ||||||
| const char	*tty_term_ptr1( | const char	*tty_term_ptr1(struct tty_term *, enum tty_code_code, | ||||||
| 		     struct tty_term *, enum tty_code_code, const void *); | 		     const void *); | ||||||
| const char	*tty_term_ptr2(struct tty_term *, enum tty_code_code, | const char	*tty_term_ptr2(struct tty_term *, enum tty_code_code, | ||||||
| 		     const void *, const void *); | 		     const void *, const void *); | ||||||
| int		 tty_term_number(struct tty_term *, enum tty_code_code); | 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); | 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, | char	*grid_string_cells(struct grid *, u_int, u_int, u_int, | ||||||
| 	     struct grid_cell **, int, int, int); | 	     struct grid_cell **, int, int, int); | ||||||
| void	 grid_duplicate_lines( | void	 grid_duplicate_lines(struct grid *, u_int, struct grid *, u_int, | ||||||
| 	     struct grid *, u_int, struct grid *, u_int, u_int); | 	     u_int); | ||||||
| u_int	 grid_reflow(struct grid *, struct grid *, u_int); | u_int	 grid_reflow(struct grid *, struct grid *, u_int); | ||||||
|  |  | ||||||
| /* grid-view.c */ | /* grid-view.c */ | ||||||
| @@ -2056,14 +2056,14 @@ void		 window_pane_alternate_on(struct window_pane *, | |||||||
| 		     struct grid_cell *, int); | 		     struct grid_cell *, int); | ||||||
| void		 window_pane_alternate_off(struct window_pane *, | void		 window_pane_alternate_off(struct window_pane *, | ||||||
| 		     struct grid_cell *, int); | 		     struct grid_cell *, int); | ||||||
| int		 window_pane_set_mode( | int		 window_pane_set_mode(struct window_pane *, | ||||||
| 		     struct window_pane *, const struct window_mode *); | 		     const struct window_mode *); | ||||||
| void		 window_pane_reset_mode(struct window_pane *); | void		 window_pane_reset_mode(struct window_pane *); | ||||||
| void		 window_pane_key(struct window_pane *, struct client *, | void		 window_pane_key(struct window_pane *, struct client *, | ||||||
| 		     struct session *, key_code, struct mouse_event *); | 		     struct session *, key_code, struct mouse_event *); | ||||||
| int		 window_pane_visible(struct window_pane *); | int		 window_pane_visible(struct window_pane *); | ||||||
| char		*window_pane_search( | char		*window_pane_search(struct window_pane *, const char *, | ||||||
| 		     struct window_pane *, const char *, u_int *); | 		     u_int *); | ||||||
| char		*window_printable_flags(struct session *, struct winlink *); | char		*window_printable_flags(struct session *, struct winlink *); | ||||||
| struct window_pane *window_pane_find_up(struct window_pane *); | struct window_pane *window_pane_find_up(struct window_pane *); | ||||||
| struct window_pane *window_pane_find_down(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 *); | struct layout_cell *layout_create_cell(struct layout_cell *); | ||||||
| void		 layout_free_cell(struct layout_cell *); | void		 layout_free_cell(struct layout_cell *); | ||||||
| void		 layout_print_cell(struct layout_cell *, const char *, u_int); | void		 layout_print_cell(struct layout_cell *, const char *, u_int); | ||||||
| void		 layout_destroy_cell(struct layout_cell *, struct layout_cell **); | void		 layout_destroy_cell(struct layout_cell *, | ||||||
| void		 layout_set_size( | 		     struct layout_cell **); | ||||||
| 		     struct layout_cell *, u_int, u_int, u_int, u_int); | void		 layout_set_size(struct layout_cell *, u_int, u_int, u_int, | ||||||
| void		 layout_make_leaf( | 		     u_int); | ||||||
| 		     struct layout_cell *, struct window_pane *); | void		 layout_make_leaf(struct layout_cell *, struct window_pane *); | ||||||
| void		 layout_make_node(struct layout_cell *, enum layout_type); | void		 layout_make_node(struct layout_cell *, enum layout_type); | ||||||
| void		 layout_fix_offsets(struct layout_cell *); | void		 layout_fix_offsets(struct layout_cell *); | ||||||
| void		 layout_fix_panes(struct window *, u_int, u_int); | void		 layout_fix_panes(struct window *, u_int, u_int); | ||||||
| u_int		 layout_resize_check(struct layout_cell *, enum layout_type); | u_int		 layout_resize_check(struct layout_cell *, enum layout_type); | ||||||
| void		 layout_resize_adjust( | void		 layout_resize_adjust(struct layout_cell *, enum layout_type, | ||||||
| 		     struct layout_cell *, enum layout_type, int); | 		     int); | ||||||
| void		 layout_init(struct window *, struct window_pane *); | void		 layout_init(struct window *, struct window_pane *); | ||||||
| void		 layout_free(struct window *); | void		 layout_free(struct window *); | ||||||
| void		 layout_resize(struct window *, u_int, u_int); | 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, | void		 layout_resize_pane_to(struct window_pane *, enum layout_type, | ||||||
| 		     u_int); | 		     u_int); | ||||||
| void		 layout_assign_pane(struct layout_cell *, struct window_pane *); | void		 layout_assign_pane(struct layout_cell *, struct window_pane *); | ||||||
| struct layout_cell *layout_split_pane( | struct layout_cell *layout_split_pane(struct window_pane *, enum layout_type, | ||||||
| 		     struct window_pane *, enum layout_type, int, int); | 		     int, int); | ||||||
| void		 layout_close_pane(struct window_pane *); | void		 layout_close_pane(struct window_pane *); | ||||||
|  |  | ||||||
| /* layout-custom.c */ | /* layout-custom.c */ | ||||||
|   | |||||||
| @@ -406,12 +406,12 @@ tty_term_find(char *name, int fd, char **cause) | |||||||
| 	if (setupterm(name, fd, &error) != OK) { | 	if (setupterm(name, fd, &error) != OK) { | ||||||
| 		switch (error) { | 		switch (error) { | ||||||
| 		case 1: | 		case 1: | ||||||
| 			xasprintf( | 			xasprintf(cause, "can't use hardcopy terminal: %s", | ||||||
| 			    cause, "can't use hardcopy terminal: %s", name); | 			    name); | ||||||
| 			break; | 			break; | ||||||
| 		case 0: | 		case 0: | ||||||
| 			xasprintf( | 			xasprintf(cause, "missing or unsuitable terminal: %s", | ||||||
| 			    cause, "missing or unsuitable terminal: %s", name); | 			    name); | ||||||
| 			break; | 			break; | ||||||
| 		case -1: | 		case -1: | ||||||
| 			xasprintf(cause, "can't find terminfo database"); | 			xasprintf(cause, "can't find terminfo database"); | ||||||
|   | |||||||
							
								
								
									
										12
									
								
								tty.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								tty.c
									
									
									
									
									
								
							| @@ -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_large_region(struct tty *, const struct tty_ctx *); | ||||||
| int	tty_fake_bce(const struct tty *, const struct window_pane *); | int	tty_fake_bce(const struct tty *, const struct window_pane *); | ||||||
| void	tty_redraw_region(struct tty *, const struct tty_ctx *); | void	tty_redraw_region(struct tty *, const struct tty_ctx *); | ||||||
| void	tty_emulate_repeat( | void	tty_emulate_repeat(struct tty *, enum tty_code_code, enum tty_code_code, | ||||||
| 	    struct tty *, enum tty_code_code, enum tty_code_code, u_int); | 	    u_int); | ||||||
| void	tty_repeat_space(struct tty *, u_int); | void	tty_repeat_space(struct tty *, u_int); | ||||||
| void	tty_cell(struct tty *, const struct grid_cell *, | void	tty_cell(struct tty *, const struct grid_cell *, | ||||||
| 	    const struct window_pane *); | 	    const struct window_pane *); | ||||||
| @@ -161,8 +161,8 @@ tty_open(struct tty *tty, char **cause) | |||||||
|  |  | ||||||
| 	tty->flags &= ~(TTY_NOCURSOR|TTY_FREEZE|TTY_TIMER); | 	tty->flags &= ~(TTY_NOCURSOR|TTY_FREEZE|TTY_TIMER); | ||||||
|  |  | ||||||
| 	tty->event = bufferevent_new( | 	tty->event = bufferevent_new(tty->fd, tty_read_callback, NULL, | ||||||
| 	    tty->fd, tty_read_callback, NULL, tty_error_callback, tty); | 	    tty_error_callback, tty); | ||||||
|  |  | ||||||
| 	tty_start_tty(tty); | 	tty_start_tty(tty); | ||||||
|  |  | ||||||
| @@ -1188,8 +1188,8 @@ tty_reset(struct tty *tty) | |||||||
|  |  | ||||||
| /* Set region inside pane. */ | /* Set region inside pane. */ | ||||||
| void | void | ||||||
| tty_region_pane( | tty_region_pane(struct tty *tty, const struct tty_ctx *ctx, u_int rupper, | ||||||
|     struct tty *tty, const struct tty_ctx *ctx, u_int rupper, u_int rlower) |     u_int rlower) | ||||||
| { | { | ||||||
| 	tty_region(tty, ctx->yoff + rupper, ctx->yoff + rlower); | 	tty_region(tty, ctx->yoff + rupper, ctx->yoff + rlower); | ||||||
| } | } | ||||||
|   | |||||||
| @@ -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 *, | struct window_choose_mode_item *window_choose_get_item(struct window_pane *, | ||||||
| 	    key_code, struct mouse_event *); | 	    key_code, struct mouse_event *); | ||||||
|  |  | ||||||
| void	window_choose_fire_callback( | void	window_choose_fire_callback(struct window_pane *, | ||||||
| 	    struct window_pane *, struct window_choose_data *); | 	    struct window_choose_data *); | ||||||
| void	window_choose_redraw_screen(struct window_pane *); | void	window_choose_redraw_screen(struct window_pane *); | ||||||
| void	window_choose_write_line( | void	window_choose_write_line(struct window_pane *, | ||||||
| 	    struct window_pane *, struct screen_write_ctx *, u_int); | 	    struct screen_write_ctx *, u_int); | ||||||
|  |  | ||||||
| void	window_choose_scroll_up(struct window_pane *); | void	window_choose_scroll_up(struct window_pane *); | ||||||
| void	window_choose_scroll_down(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 | void | ||||||
| window_choose_fire_callback( | window_choose_fire_callback(struct window_pane *wp, | ||||||
|     struct window_pane *wp, struct window_choose_data *wcd) |     struct window_choose_data *wcd) | ||||||
| { | { | ||||||
| 	struct window_choose_mode_data	*data = wp->modedata; | 	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); | 			window_choose_scroll_up(wp); | ||||||
| 		else { | 		else { | ||||||
| 			screen_write_start(&ctx, wp, NULL); | 			screen_write_start(&ctx, wp, NULL); | ||||||
| 			window_choose_write_line( | 			window_choose_write_line(wp, &ctx, | ||||||
| 			    wp, &ctx, data->selected - data->top); | 			    data->selected - data->top); | ||||||
| 			window_choose_write_line( | 			window_choose_write_line(wp, &ctx, | ||||||
| 			    wp, &ctx, data->selected + 1 - data->top); | 			    data->selected + 1 - data->top); | ||||||
| 			screen_write_stop(&ctx); | 			screen_write_stop(&ctx); | ||||||
| 		} | 		} | ||||||
| 		break; | 		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)) { | 		if (data->selected < data->top + screen_size_y(s)) { | ||||||
| 			screen_write_start(&ctx, wp, NULL); | 			screen_write_start(&ctx, wp, NULL); | ||||||
| 			window_choose_write_line( | 			window_choose_write_line(wp, &ctx, | ||||||
| 			    wp, &ctx, data->selected - data->top); | 			    data->selected - data->top); | ||||||
| 			window_choose_write_line( | 			window_choose_write_line(wp, &ctx, | ||||||
| 			    wp, &ctx, data->selected - 1 - data->top); | 			    data->selected - 1 - data->top); | ||||||
| 			screen_write_stop(&ctx); | 			screen_write_stop(&ctx); | ||||||
| 		} else | 		} else | ||||||
| 			window_choose_scroll_down(wp); | 			window_choose_scroll_down(wp); | ||||||
| @@ -649,8 +649,8 @@ window_choose_key(struct window_pane *wp, __unused struct client *c, | |||||||
| 			data->selected--; | 			data->selected--; | ||||||
| 			window_choose_scroll_up(wp); | 			window_choose_scroll_up(wp); | ||||||
| 			screen_write_start(&ctx, wp, NULL); | 			screen_write_start(&ctx, wp, NULL); | ||||||
| 			window_choose_write_line( | 			window_choose_write_line(wp, &ctx, | ||||||
| 			    wp, &ctx, screen_size_y(s) - 1); | 			    screen_size_y(s) - 1); | ||||||
| 			screen_write_stop(&ctx); | 			screen_write_stop(&ctx); | ||||||
| 		} else | 		} else | ||||||
| 			window_choose_scroll_up(wp); | 			window_choose_scroll_up(wp); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 nicm
					nicm