mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 09:07:38 +00:00 
			
		
		
		
	Sync OpenBSD patchset 581:
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
This commit is contained in:
		
							
								
								
									
										16
									
								
								client.c
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								client.c
									
									
									
									
									
								
							@@ -1,4 +1,4 @@
 | 
			
		||||
/* $Id: client.c,v 1.89 2009-11-28 14:50:36 tcunha Exp $ */
 | 
			
		||||
/* $Id: client.c,v 1.90 2009-12-04 22:14:47 tcunha Exp $ */
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
 | 
			
		||||
@@ -129,7 +129,7 @@ client_send_identify(int flags)
 | 
			
		||||
 | 
			
		||||
	if (getcwd(data.cwd, sizeof data.cwd) == NULL)
 | 
			
		||||
		*data.cwd = '\0';
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	term = getenv("TERM");
 | 
			
		||||
	if (term == NULL ||
 | 
			
		||||
	    strlcpy(data.term, term, sizeof data.term) >= sizeof data.term)
 | 
			
		||||
@@ -147,7 +147,7 @@ client_send_environ(void)
 | 
			
		||||
	struct msg_environ_data	data;
 | 
			
		||||
	char		      **var;
 | 
			
		||||
 | 
			
		||||
 	for (var = environ; *var != NULL; var++) {
 | 
			
		||||
	for (var = environ; *var != NULL; var++) {
 | 
			
		||||
		if (strlcpy(data.var, *var, sizeof data.var) >= sizeof data.var)
 | 
			
		||||
			continue;
 | 
			
		||||
		client_write_server(MSG_ENVIRON, &data, sizeof data);
 | 
			
		||||
@@ -157,7 +157,7 @@ client_send_environ(void)
 | 
			
		||||
void
 | 
			
		||||
client_write_server(enum msgtype type, void *buf, size_t len)
 | 
			
		||||
{
 | 
			
		||||
 	imsg_compose(&client_ibuf, type, PROTOCOL_VERSION, -1, -1, buf, len);
 | 
			
		||||
	imsg_compose(&client_ibuf, type, PROTOCOL_VERSION, -1, -1, buf, len);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void
 | 
			
		||||
@@ -183,7 +183,7 @@ client_main(void)
 | 
			
		||||
 | 
			
		||||
	/* Note: event_init() has already been called. */
 | 
			
		||||
 | 
			
		||||
 	/* Set up signals. */
 | 
			
		||||
	/* Set up signals. */
 | 
			
		||||
	memset(&sigact, 0, sizeof sigact);
 | 
			
		||||
	sigemptyset(&sigact.sa_mask);
 | 
			
		||||
	sigact.sa_flags = SA_RESTART;
 | 
			
		||||
@@ -267,9 +267,9 @@ client_callback(unused int fd, short events, unused void *data)
 | 
			
		||||
		if (client_dispatch() != 0) {
 | 
			
		||||
			event_loopexit(NULL);
 | 
			
		||||
			return;
 | 
			
		||||
		}	
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	if (events & EV_WRITE) {
 | 
			
		||||
		if (msgbuf_write(&client_ibuf.w) < 0)
 | 
			
		||||
			goto lost_server;
 | 
			
		||||
@@ -345,7 +345,7 @@ client_dispatch(void)
 | 
			
		||||
			if (datalen != sizeof lockdata)
 | 
			
		||||
				fatalx("bad MSG_LOCK size");
 | 
			
		||||
			memcpy(&lockdata, imsg.data, sizeof lockdata);
 | 
			
		||||
			
 | 
			
		||||
 | 
			
		||||
			lockdata.cmd[(sizeof lockdata.cmd) - 1] = '\0';
 | 
			
		||||
			system(lockdata.cmd);
 | 
			
		||||
			client_write_server(MSG_UNLOCK, NULL, 0);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user