mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:44:18 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		
							
								
								
									
										5
									
								
								format.c
									
									
									
									
									
								
							
							
						
						
									
										5
									
								
								format.c
									
									
									
									
									
								
							@@ -1373,7 +1373,6 @@ format_pretty_time(time_t t)
 | 
				
			|||||||
	struct tm       now_tm, tm;
 | 
						struct tm       now_tm, tm;
 | 
				
			||||||
	time_t		now, age;
 | 
						time_t		now, age;
 | 
				
			||||||
	char		s[6];
 | 
						char		s[6];
 | 
				
			||||||
	int		m;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	time(&now);
 | 
						time(&now);
 | 
				
			||||||
	if (now < t)
 | 
						if (now < t)
 | 
				
			||||||
@@ -1397,10 +1396,6 @@ format_pretty_time(time_t t)
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Last 12 months. */
 | 
						/* Last 12 months. */
 | 
				
			||||||
	if (now_tm.tm_mon == 0)
 | 
					 | 
				
			||||||
		m = 11;
 | 
					 | 
				
			||||||
	else
 | 
					 | 
				
			||||||
		m = now_tm.tm_mon - 1;
 | 
					 | 
				
			||||||
	if ((tm.tm_year == now_tm.tm_year && tm.tm_mon < now_tm.tm_mon) ||
 | 
						if ((tm.tm_year == now_tm.tm_year && tm.tm_mon < now_tm.tm_mon) ||
 | 
				
			||||||
	    (tm.tm_year == now_tm.tm_year - 1 && tm.tm_mon > now_tm.tm_mon)) {
 | 
						    (tm.tm_year == now_tm.tm_year - 1 && tm.tm_mon > now_tm.tm_mon)) {
 | 
				
			||||||
		strftime(s, sizeof s, "%d%b", &tm);
 | 
							strftime(s, sizeof s, "%d%b", &tm);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										2
									
								
								menu.c
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								menu.c
									
									
									
									
									
								
							@@ -187,7 +187,7 @@ menu_key_cb(struct client *c, struct key_event *event)
 | 
				
			|||||||
	struct mouse_event		*m = &event->m;
 | 
						struct mouse_event		*m = &event->m;
 | 
				
			||||||
	u_int				 i;
 | 
						u_int				 i;
 | 
				
			||||||
	int				 count = menu->count, old = md->choice;
 | 
						int				 count = menu->count, old = md->choice;
 | 
				
			||||||
	const char			*name;
 | 
						const char			*name = NULL;
 | 
				
			||||||
	const struct menu_item		*item;
 | 
						const struct menu_item		*item;
 | 
				
			||||||
	struct cmdq_state		*state;
 | 
						struct cmdq_state		*state;
 | 
				
			||||||
	enum cmd_parse_status		 status;
 | 
						enum cmd_parse_status		 status;
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								server.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								server.c
									
									
									
									
									
								
							@@ -157,7 +157,7 @@ server_start(struct tmuxproc *client, int flags, struct event_base *base,
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	int		 pair[2];
 | 
						int		 pair[2];
 | 
				
			||||||
	sigset_t	 set, oldset;
 | 
						sigset_t	 set, oldset;
 | 
				
			||||||
	struct client	*c;
 | 
						struct client	*c = NULL;
 | 
				
			||||||
	char		*cause = NULL;
 | 
						char		*cause = NULL;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	sigfillset(&set);
 | 
						sigfillset(&set);
 | 
				
			||||||
@@ -223,10 +223,12 @@ server_start(struct tmuxproc *client, int flags, struct event_base *base,
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (cause != NULL) {
 | 
						if (cause != NULL) {
 | 
				
			||||||
 | 
							if (c != NULL) {
 | 
				
			||||||
			cmdq_append(c, cmdq_get_error(cause));
 | 
								cmdq_append(c, cmdq_get_error(cause));
 | 
				
			||||||
		free(cause);
 | 
					 | 
				
			||||||
			c->flags |= CLIENT_EXIT;
 | 
								c->flags |= CLIENT_EXIT;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							free(cause);
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	server_add_accept(0);
 | 
						server_add_accept(0);
 | 
				
			||||||
	proc_loop(server_proc, server_loop);
 | 
						proc_loop(server_proc, server_loop);
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										4
									
								
								utf8.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								utf8.c
									
									
									
									
									
								
							@@ -100,9 +100,9 @@ utf8_put_item(const char *data, size_t size, u_int *index)
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	ui = utf8_item_by_data(data, size);
 | 
						ui = utf8_item_by_data(data, size);
 | 
				
			||||||
	if (ui != NULL) {
 | 
						if (ui != NULL) {
 | 
				
			||||||
 | 
							*index = ui->index;
 | 
				
			||||||
		log_debug("%s: found %.*s = %u", __func__, (int)size, data,
 | 
							log_debug("%s: found %.*s = %u", __func__, (int)size, data,
 | 
				
			||||||
		    *index);
 | 
							    *index);
 | 
				
			||||||
		*index = ui->index;
 | 
					 | 
				
			||||||
		return (0);
 | 
							return (0);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -117,8 +117,8 @@ utf8_put_item(const char *data, size_t size, u_int *index)
 | 
				
			|||||||
	ui->size = size;
 | 
						ui->size = size;
 | 
				
			||||||
	RB_INSERT(utf8_data_tree, &utf8_data_tree, ui);
 | 
						RB_INSERT(utf8_data_tree, &utf8_data_tree, ui);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
 | 
					 | 
				
			||||||
	*index = ui->index;
 | 
						*index = ui->index;
 | 
				
			||||||
 | 
						log_debug("%s: added %.*s = %u", __func__, (int)size, data, *index);
 | 
				
			||||||
	return (0);
 | 
						return (0);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -72,7 +72,6 @@ static int	window_copy_search_marks(struct window_mode_entry *,
 | 
				
			|||||||
		    struct screen *, int, int);
 | 
							    struct screen *, int, int);
 | 
				
			||||||
static void	window_copy_clear_marks(struct window_mode_entry *);
 | 
					static void	window_copy_clear_marks(struct window_mode_entry *);
 | 
				
			||||||
static void	window_copy_move_left(struct screen *, u_int *, u_int *, int);
 | 
					static void	window_copy_move_left(struct screen *, u_int *, u_int *, int);
 | 
				
			||||||
static void	window_copy_move_right(struct screen *, u_int *, u_int *, int);
 | 
					 | 
				
			||||||
static int	window_copy_is_lowercase(const char *);
 | 
					static int	window_copy_is_lowercase(const char *);
 | 
				
			||||||
static int	window_copy_search_jump(struct window_mode_entry *,
 | 
					static int	window_copy_search_jump(struct window_mode_entry *,
 | 
				
			||||||
		    struct grid *, struct grid *, u_int, u_int, u_int, int, int,
 | 
							    struct grid *, struct grid *, u_int, u_int, u_int, int, int,
 | 
				
			||||||
@@ -2817,23 +2816,6 @@ window_copy_move_left(struct screen *s, u_int *fx, u_int *fy, int wrapflag)
 | 
				
			|||||||
		*fx = *fx - 1;
 | 
							*fx = *fx - 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
static void
 | 
					 | 
				
			||||||
window_copy_move_right(struct screen *s, u_int *fx, u_int *fy, int wrapflag)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
	if (*fx == screen_size_x(s) - 1) { /* right */
 | 
					 | 
				
			||||||
		if (*fy == screen_hsize(s) + screen_size_y(s) - 1) { /* bottom */
 | 
					 | 
				
			||||||
			if (wrapflag) {
 | 
					 | 
				
			||||||
				*fx = 0;
 | 
					 | 
				
			||||||
				*fy = 0;
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			return;
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		*fx = 0;
 | 
					 | 
				
			||||||
		*fy = *fy + 1;
 | 
					 | 
				
			||||||
	} else
 | 
					 | 
				
			||||||
		*fx = *fx + 1;
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
window_copy_is_lowercase(const char *ptr)
 | 
					window_copy_is_lowercase(const char *ptr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
@@ -2930,7 +2912,8 @@ window_copy_search_jump(struct window_mode_entry *wme, struct grid *gd,
 | 
				
			|||||||
 * down.
 | 
					 * down.
 | 
				
			||||||
 */
 | 
					 */
 | 
				
			||||||
static int
 | 
					static int
 | 
				
			||||||
window_copy_search(struct window_mode_entry *wme, int direction, int regex, int again)
 | 
					window_copy_search(struct window_mode_entry *wme, int direction, int regex,
 | 
				
			||||||
 | 
					    int again)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	struct window_pane		*wp = wme->wp;
 | 
						struct window_pane		*wp = wme->wp;
 | 
				
			||||||
	struct window_copy_mode_data	*data = wme->data;
 | 
						struct window_copy_mode_data	*data = wme->data;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user