=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/client.c,v retrieving revision 1.113 retrieving revision 1.114 diff -c -r1.113 -r1.114 *** src/usr.bin/tmux/client.c 2016/01/19 15:59:12 1.113 --- src/usr.bin/tmux/client.c 2016/10/03 22:52:11 1.114 *************** *** 1,4 **** ! /* $OpenBSD: client.c,v 1.113 2016/01/19 15:59:12 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott --- 1,4 ---- ! /* $OpenBSD: client.c,v 1.114 2016/10/03 22:52:11 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott *************** *** 34,44 **** #include "tmux.h" ! struct tmuxproc *client_proc; ! struct tmuxpeer *client_peer; ! int client_flags; ! struct event client_stdin; ! enum { CLIENT_EXIT_NONE, CLIENT_EXIT_DETACHED, CLIENT_EXIT_DETACHED_HUP, --- 34,44 ---- #include "tmux.h" ! static struct tmuxproc *client_proc; ! static struct tmuxpeer *client_peer; ! static int client_flags; ! static struct event client_stdin; ! static enum { CLIENT_EXIT_NONE, CLIENT_EXIT_DETACHED, CLIENT_EXIT_DETACHED_HUP, *************** *** 48,76 **** CLIENT_EXIT_EXITED, CLIENT_EXIT_SERVER_EXITED, } client_exitreason = CLIENT_EXIT_NONE; ! int client_exitval; ! enum msgtype client_exittype; ! const char *client_exitsession; ! int client_attached; ! __dead void client_exec(const char *,const char *); ! int client_get_lock(char *); ! int client_connect(struct event_base *, const char *, int); ! void client_send_identify(const char *, const char *); ! void client_stdin_callback(int, short, void *); ! void client_write(int, const char *, size_t); ! void client_signal(int); ! void client_dispatch(struct imsg *, void *); ! void client_dispatch_attached(struct imsg *); ! void client_dispatch_wait(struct imsg *, const char *); ! const char *client_exit_message(void); /* * Get server create lock. If already held then server start is happening in * another client, so block until the lock is released and return -2 to * retry. Return -1 on failure to continue and start the server anyway. */ ! int client_get_lock(char *lockfile) { int lockfd; --- 48,76 ---- CLIENT_EXIT_EXITED, CLIENT_EXIT_SERVER_EXITED, } client_exitreason = CLIENT_EXIT_NONE; ! static int client_exitval; ! static enum msgtype client_exittype; ! static const char *client_exitsession; ! static int client_attached; ! static __dead void client_exec(const char *,const char *); ! static int client_get_lock(char *); ! static int client_connect(struct event_base *, const char *, int); ! static void client_send_identify(const char *, const char *); ! static void client_stdin_callback(int, short, void *); ! static void client_write(int, const char *, size_t); ! static void client_signal(int); ! static void client_dispatch(struct imsg *, void *); ! static void client_dispatch_attached(struct imsg *); ! static void client_dispatch_wait(struct imsg *, const char *); ! static const char *client_exit_message(void); /* * Get server create lock. If already held then server start is happening in * another client, so block until the lock is released and return -2 to * retry. Return -1 on failure to continue and start the server anyway. */ ! static int client_get_lock(char *lockfile) { int lockfd; *************** *** 97,103 **** } /* Connect client to server. */ ! int client_connect(struct event_base *base, const char *path, int start_server) { struct sockaddr_un sa; --- 97,103 ---- } /* Connect client to server. */ ! static int client_connect(struct event_base *base, const char *path, int start_server) { struct sockaddr_un sa; *************** *** 380,386 **** } /* Send identify messages to server. */ ! void client_send_identify(const char *ttynam, const char *cwd) { const char *s; --- 380,386 ---- } /* Send identify messages to server. */ ! static void client_send_identify(const char *ttynam, const char *cwd) { const char *s; *************** *** 417,423 **** } /* Callback for client stdin read events. */ ! void client_stdin_callback(__unused int fd, __unused short events, __unused void *arg) { --- 417,423 ---- } /* Callback for client stdin read events. */ ! static void client_stdin_callback(__unused int fd, __unused short events, __unused void *arg) { *************** *** 433,439 **** } /* Force write to file descriptor. */ ! void client_write(int fd, const char *data, size_t size) { ssize_t used; --- 433,439 ---- } /* Force write to file descriptor. */ ! static void client_write(int fd, const char *data, size_t size) { ssize_t used; *************** *** 451,457 **** } /* Run command in shell; used for -c. */ ! __dead void client_exec(const char *shell, const char *shellcmd) { const char *name, *ptr; --- 451,457 ---- } /* Run command in shell; used for -c. */ ! static __dead void client_exec(const char *shell, const char *shellcmd) { const char *name, *ptr; *************** *** 480,486 **** } /* Callback to handle signals in the client. */ ! void client_signal(int sig) { struct sigaction sigact; --- 480,486 ---- } /* Callback to handle signals in the client. */ ! static void client_signal(int sig) { struct sigaction sigact; *************** *** 520,526 **** } /* Callback for client read events. */ ! void client_dispatch(struct imsg *imsg, void *arg) { if (imsg == NULL) { --- 520,526 ---- } /* Callback for client read events. */ ! static void client_dispatch(struct imsg *imsg, void *arg) { if (imsg == NULL) { *************** *** 537,543 **** } /* Dispatch imsgs when in wait state (before MSG_READY). */ ! void client_dispatch_wait(struct imsg *imsg, const char *shellcmd) { char *data; --- 537,543 ---- } /* Dispatch imsgs when in wait state (before MSG_READY). */ ! static void client_dispatch_wait(struct imsg *imsg, const char *shellcmd) { char *data; *************** *** 631,637 **** } /* Dispatch imsgs in attached state (after MSG_READY). */ ! void client_dispatch_attached(struct imsg *imsg) { struct sigaction sigact; --- 631,637 ---- } /* Dispatch imsgs in attached state (after MSG_READY). */ ! static void client_dispatch_attached(struct imsg *imsg) { struct sigaction sigact;