Sync OpenBSD patchset 202:

There aren't many client message types or code to handle them so get rid of
the lookup table and use a switch, merge the tiny handler functions into it,
and move the whole lot to client.c.

Also change client_msg_dispatch to consume as many messages as possible and
move the call to it to the right place so it checks for signals afterwards.

Prompted by suggestions from eric@.
This commit is contained in:
Tiago Cunha
2009-07-30 20:57:39 +00:00
parent 817e93ac94
commit 67266dc25c
4 changed files with 90 additions and 175 deletions

5
tmux.h
View File

@@ -1,4 +1,4 @@
/* $Id: tmux.h,v 1.400 2009-07-30 20:45:20 tcunha Exp $ */
/* $Id: tmux.h,v 1.401 2009-07-30 20:57:39 tcunha Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -1337,13 +1337,12 @@ size_t cmd_option_print(struct cmd *, char *, size_t);
/* client.c */
int client_init(char *, struct client_ctx *, int, int);
int client_main(struct client_ctx *);
/* client-msg.c */
int client_msg_dispatch(struct client_ctx *);
/* client-fn.c */
void client_write_server(struct client_ctx *, enum msgtype, void *, size_t);
void client_fill_session(struct msg_command_data *);
void client_suspend(void);
/* key-bindings.c */
extern struct key_bindings key_bindings;