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:
Nicholas Marriott
2009-07-30 16:32:12 +00:00
parent 479d614884
commit 5f13bb0c3a
5 changed files with 88 additions and 173 deletions

3
tmux.h
View File

@ -1338,13 +1338,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;