mirror of
				https://github.com/tmux/tmux.git
				synced 2025-11-04 00:56:10 +00:00 
			
		
		
		
	Add control_write_buffer, from George Nachman.
This commit is contained in:
		@@ -79,6 +79,15 @@ control_write(struct client *c, const char *fmt, ...)
 | 
			
		||||
	server_push_stdout(c);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Write a buffer, adding a terminal newline. Empties buffer. */
 | 
			
		||||
void
 | 
			
		||||
control_write_buffer(struct client *c, struct evbuffer *buffer)
 | 
			
		||||
{
 | 
			
		||||
	evbuffer_add_buffer(c->stdout_data, buffer);
 | 
			
		||||
	evbuffer_add(c->stdout_data, "\n", 1);
 | 
			
		||||
	server_push_stdout(c);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/* Control input callback. Read lines and fire commands. */
 | 
			
		||||
void
 | 
			
		||||
control_callback(struct client *c, int closed, unused void *data)
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								tmux.h
									
									
									
									
									
								
							@@ -2221,6 +2221,7 @@ void	clear_signals(int);
 | 
			
		||||
/* control.c */
 | 
			
		||||
void	control_callback(struct client *, int, void*);
 | 
			
		||||
void printflike2 control_write(struct client *, const char *, ...);
 | 
			
		||||
void	control_write_buffer(struct client *, struct evbuffer *);
 | 
			
		||||
 | 
			
		||||
/* control-notify.c */
 | 
			
		||||
void	control_notify_window_layout_changed(struct window *);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user