mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Sync OpenBSD patchset 1002:
Add some const and fix a warning.
This commit is contained in:
		| @@ -44,7 +44,8 @@ cmd_new_window_exec(struct cmd *self, struct cmd_ctx *ctx) | |||||||
| 	struct args	*args = self->args; | 	struct args	*args = self->args; | ||||||
| 	struct session	*s; | 	struct session	*s; | ||||||
| 	struct winlink	*wl; | 	struct winlink	*wl; | ||||||
| 	char		*cmd, *cwd, *cause; | 	const char     	*cmd, *cwd; | ||||||
|  | 	char		*cause; | ||||||
| 	int		 idx, last, detached; | 	int		 idx, last, detached; | ||||||
|  |  | ||||||
| 	if (args_has(args, 'a')) { | 	if (args_has(args, 'a')) { | ||||||
|   | |||||||
| @@ -57,8 +57,8 @@ cmd_split_window_exec(struct cmd *self, struct cmd_ctx *ctx) | |||||||
| 	struct window		*w; | 	struct window		*w; | ||||||
| 	struct window_pane	*wp, *new_wp = NULL; | 	struct window_pane	*wp, *new_wp = NULL; | ||||||
| 	struct environ		 env; | 	struct environ		 env; | ||||||
| 	char		 	*cmd, *cwd, *cause, *new_cause; | 	const char	       	*cmd, *cwd, *shell; | ||||||
| 	const char		*shell; | 	char			*cause, *new_cause; | ||||||
| 	u_int			 hlimit, paneidx; | 	u_int			 hlimit, paneidx; | ||||||
| 	int			 size, percentage; | 	int			 size, percentage; | ||||||
| 	enum layout_type	 type; | 	enum layout_type	 type; | ||||||
|   | |||||||
							
								
								
									
										4
									
								
								cmd.c
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								cmd.c
									
									
									
									
									
								
							| @@ -1214,10 +1214,10 @@ cmd_template_replace(char *template, const char *s, int idx) | |||||||
| } | } | ||||||
|  |  | ||||||
| /* Return the default path for a new pane. */ | /* Return the default path for a new pane. */ | ||||||
| char * | const char * | ||||||
| cmd_get_default_path(struct cmd_ctx *ctx) | cmd_get_default_path(struct cmd_ctx *ctx) | ||||||
| { | { | ||||||
| 	char			*cwd; | 	const char		*cwd; | ||||||
| 	struct session		*s; | 	struct session		*s; | ||||||
| 	struct window_pane	*wp; | 	struct window_pane	*wp; | ||||||
| 	struct environ_entry	*envent; | 	struct environ_entry	*envent; | ||||||
|   | |||||||
							
								
								
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								tmux.h
									
									
									
									
									
								
							| @@ -1561,7 +1561,7 @@ int		 cmd_find_index( | |||||||
| struct winlink	*cmd_find_pane(struct cmd_ctx *, | struct winlink	*cmd_find_pane(struct cmd_ctx *, | ||||||
| 		     const char *, struct session **, struct window_pane **); | 		     const char *, struct session **, struct window_pane **); | ||||||
| char		*cmd_template_replace(char *, const char *, int); | char		*cmd_template_replace(char *, const char *, int); | ||||||
| char		*cmd_get_default_path(struct cmd_ctx *ctx); | const char     	*cmd_get_default_path(struct cmd_ctx *ctx); | ||||||
| extern const struct cmd_entry *cmd_table[]; | extern const struct cmd_entry *cmd_table[]; | ||||||
| extern const struct cmd_entry cmd_attach_session_entry; | extern const struct cmd_entry cmd_attach_session_entry; | ||||||
| extern const struct cmd_entry cmd_bind_key_entry; | extern const struct cmd_entry cmd_bind_key_entry; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tiago Cunha
					Tiago Cunha