mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Merge branch 'obsd-master'
This commit is contained in:
		@@ -74,8 +74,8 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
	struct environ		*env;
 | 
			
		||||
	struct termios		 tio, *tiop;
 | 
			
		||||
	const char		*newname, *target, *update, *errstr, *template;
 | 
			
		||||
	const char		*path, *cwd, *to_free = NULL;
 | 
			
		||||
	char		       **argv, *cmd, *cause, *cp;
 | 
			
		||||
	const char		*path, *cmd, *cwd, *to_free = NULL;
 | 
			
		||||
	char		       **argv, *cause, *cp;
 | 
			
		||||
	int			 detached, already_attached, idx, argc;
 | 
			
		||||
	u_int			 sx, sy;
 | 
			
		||||
	struct format_tree	*ft;
 | 
			
		||||
@@ -217,7 +217,7 @@ cmd_new_session_exec(struct cmd *self, struct cmdq_item *item)
 | 
			
		||||
		cmd = options_get_string(global_s_options, "default-command");
 | 
			
		||||
		if (cmd != NULL && *cmd != '\0') {
 | 
			
		||||
			argc = 1;
 | 
			
		||||
			argv = &cmd;
 | 
			
		||||
			argv = (char **)&cmd;
 | 
			
		||||
		} else {
 | 
			
		||||
			argc = 0;
 | 
			
		||||
			argv = NULL;
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										3
									
								
								names.c
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								names.c
									
									
									
									
									
								
							@@ -121,7 +121,8 @@ static char *
 | 
			
		||||
format_window_name(struct window *w)
 | 
			
		||||
{
 | 
			
		||||
	struct format_tree	*ft;
 | 
			
		||||
	char			*fmt, *name;
 | 
			
		||||
	const char		*fmt;
 | 
			
		||||
	char			*name;
 | 
			
		||||
 | 
			
		||||
	ft = format_create(NULL, 0);
 | 
			
		||||
	format_defaults_window(ft, w);
 | 
			
		||||
 
 | 
			
		||||
@@ -162,7 +162,7 @@ options_set_string(struct options *oo, const char *name, int append,
 | 
			
		||||
	return (o);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
char *
 | 
			
		||||
const char *
 | 
			
		||||
options_get_string(struct options *oo, const char *name)
 | 
			
		||||
{
 | 
			
		||||
	struct options_entry	*o;
 | 
			
		||||
@@ -221,7 +221,7 @@ options_set_style(struct options *oo, const char *name, int append,
 | 
			
		||||
	return (o);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
struct grid_cell *
 | 
			
		||||
const struct grid_cell *
 | 
			
		||||
options_get_style(struct options *oo, const char *name)
 | 
			
		||||
{
 | 
			
		||||
	struct options_entry	*o;
 | 
			
		||||
 
 | 
			
		||||
@@ -294,12 +294,13 @@ server_client_detach(struct client *c, enum msgtype msgtype)
 | 
			
		||||
	proc_send_s(c->peer, msgtype, s->name);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Execute command to replace a client, */
 | 
			
		||||
/* Execute command to replace a client. */
 | 
			
		||||
void
 | 
			
		||||
server_client_exec(struct client *c, const char *cmd)
 | 
			
		||||
{
 | 
			
		||||
	struct session	*s = c->session;
 | 
			
		||||
	char		*msg, *shell;
 | 
			
		||||
	char		*msg;
 | 
			
		||||
	const char	*shell;
 | 
			
		||||
	size_t		 cmdsize, shellsize;
 | 
			
		||||
 | 
			
		||||
	if (*cmd == '\0')
 | 
			
		||||
 
 | 
			
		||||
@@ -33,9 +33,9 @@ static void		 server_destroy_session_group(struct session *);
 | 
			
		||||
void
 | 
			
		||||
server_fill_environ(struct session *s, struct environ *env)
 | 
			
		||||
{
 | 
			
		||||
	char	*term;
 | 
			
		||||
	u_int	 idx;
 | 
			
		||||
	long	 pid;
 | 
			
		||||
	const char	*term;
 | 
			
		||||
	u_int		 idx;
 | 
			
		||||
	long		 pid;
 | 
			
		||||
 | 
			
		||||
	if (s != NULL) {
 | 
			
		||||
		term = options_get_string(global_options, "default-terminal");
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										25
									
								
								status.c
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								status.c
									
									
									
									
									
								
							@@ -278,18 +278,19 @@ status_get_window_at(struct client *c, u_int x)
 | 
			
		||||
int
 | 
			
		||||
status_redraw(struct client *c)
 | 
			
		||||
{
 | 
			
		||||
	struct screen_write_ctx	ctx;
 | 
			
		||||
	struct session	       *s = c->session;
 | 
			
		||||
	struct winlink	       *wl;
 | 
			
		||||
	struct screen		old_status, window_list;
 | 
			
		||||
	struct grid_cell	stdgc, lgc, rgc, gc;
 | 
			
		||||
	struct options	       *oo;
 | 
			
		||||
	time_t			t;
 | 
			
		||||
	char		       *left, *right, *sep;
 | 
			
		||||
	u_int			offset, needed;
 | 
			
		||||
	u_int			wlstart, wlwidth, wlavailable, wloffset, wlsize;
 | 
			
		||||
	size_t			llen, rlen, seplen;
 | 
			
		||||
	int			larrow, rarrow;
 | 
			
		||||
	struct screen_write_ctx	 ctx;
 | 
			
		||||
	struct session		*s = c->session;
 | 
			
		||||
	struct winlink		*wl;
 | 
			
		||||
	struct screen		 old_status, window_list;
 | 
			
		||||
	struct grid_cell	 stdgc, lgc, rgc, gc;
 | 
			
		||||
	struct options		*oo;
 | 
			
		||||
	time_t			 t;
 | 
			
		||||
	char			*left, *right;
 | 
			
		||||
	const char		*sep;
 | 
			
		||||
	u_int			 offset, needed;
 | 
			
		||||
	u_int			 wlstart, wlwidth, wlavailable, wloffset, wlsize;
 | 
			
		||||
	size_t			 llen, rlen, seplen;
 | 
			
		||||
	int			 larrow, rarrow;
 | 
			
		||||
 | 
			
		||||
	/* No status line? */
 | 
			
		||||
	if (c->tty.sy == 0 || !options_get_number(s->options, "status"))
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								style.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								style.c
									
									
									
									
									
								
							@@ -182,7 +182,7 @@ style_update_old(struct options *oo, const char *name, struct grid_cell *gc)
 | 
			
		||||
void
 | 
			
		||||
style_apply(struct grid_cell *gc, struct options *oo, const char *name)
 | 
			
		||||
{
 | 
			
		||||
	struct grid_cell	*gcp;
 | 
			
		||||
	const struct grid_cell	*gcp;
 | 
			
		||||
 | 
			
		||||
	memcpy(gc, &grid_default_cell, sizeof *gc);
 | 
			
		||||
	gcp = options_get_style(oo, name);
 | 
			
		||||
@@ -195,7 +195,7 @@ style_apply(struct grid_cell *gc, struct options *oo, const char *name)
 | 
			
		||||
void
 | 
			
		||||
style_apply_update(struct grid_cell *gc, struct options *oo, const char *name)
 | 
			
		||||
{
 | 
			
		||||
	struct grid_cell	*gcp;
 | 
			
		||||
	const struct grid_cell	*gcp;
 | 
			
		||||
 | 
			
		||||
	gcp = options_get_style(oo, name);
 | 
			
		||||
	if (gcp->fg != 8)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								tmux.h
									
									
									
									
									
								
							@@ -1632,13 +1632,13 @@ struct options_entry *options_find(struct options *, const char *);
 | 
			
		||||
void	options_remove(struct options *, const char *);
 | 
			
		||||
struct options_entry * printflike(4, 5) options_set_string(struct options *,
 | 
			
		||||
	    const char *, int, const char *, ...);
 | 
			
		||||
char   *options_get_string(struct options *, const char *);
 | 
			
		||||
const char *options_get_string(struct options *, const char *);
 | 
			
		||||
struct options_entry *options_set_number(struct options *, const char *,
 | 
			
		||||
	    long long);
 | 
			
		||||
long long options_get_number(struct options *, const char *);
 | 
			
		||||
struct options_entry *options_set_style(struct options *, const char *, int,
 | 
			
		||||
	    const char *);
 | 
			
		||||
struct grid_cell *options_get_style(struct options *, const char *);
 | 
			
		||||
const struct grid_cell *options_get_style(struct options *, const char *);
 | 
			
		||||
 | 
			
		||||
/* options-table.c */
 | 
			
		||||
extern const struct options_table_entry options_table[];
 | 
			
		||||
 
 | 
			
		||||
@@ -388,8 +388,7 @@ tty_term_find(char *name, int fd, char **cause)
 | 
			
		||||
	struct tty_code				*code;
 | 
			
		||||
	u_int					 i;
 | 
			
		||||
	int		 			 n, error;
 | 
			
		||||
	char					*s;
 | 
			
		||||
	const char				*acs;
 | 
			
		||||
	const char				*s, *acs;
 | 
			
		||||
 | 
			
		||||
	LIST_FOREACH(term, &tty_terms, entry) {
 | 
			
		||||
		if (strcmp(term->name, name) == 0) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user