diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-10-20 23:27:15 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2014-10-20 23:27:15 +0000 |
commit | b6045de1676bf019916f0fbccbc4b03f03f8b2cb (patch) | |
tree | 4dac4a91f33de75ad6397a0594f6d1fb81623657 /usr.bin | |
parent | f5c0938c803f8b3debd27d6d33b8adc8a65525c3 (diff) |
Tidy up some includes.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/tmux/arguments.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/client.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-confirm-before.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/cmd-list-keys.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/job.c | 3 | ||||
-rw-r--r-- | usr.bin/tmux/screen.c | 8 | ||||
-rw-r--r-- | usr.bin/tmux/server-fn.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/signal.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/style.c | 4 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.c | 9 | ||||
-rw-r--r-- | usr.bin/tmux/tmux.h | 7 | ||||
-rw-r--r-- | usr.bin/tmux/xmalloc.c | 6 |
12 files changed, 32 insertions, 27 deletions
diff --git a/usr.bin/tmux/arguments.c b/usr.bin/tmux/arguments.c index 0dfb3ddb785..0628adaa27f 100644 --- a/usr.bin/tmux/arguments.c +++ b/usr.bin/tmux/arguments.c @@ -1,4 +1,4 @@ -/* $OpenBSD: arguments.c,v 1.9 2014/04/11 19:35:54 nicm Exp $ */ +/* $OpenBSD: arguments.c,v 1.10 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott <nicm@users.sourceforge.net> @@ -18,6 +18,7 @@ #include <sys/types.h> +#include <getopt.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/usr.bin/tmux/client.c b/usr.bin/tmux/client.c index 5344f78051e..28a852ebfcc 100644 --- a/usr.bin/tmux/client.c +++ b/usr.bin/tmux/client.c @@ -1,4 +1,4 @@ -/* $OpenBSD: client.c,v 1.84 2014/10/01 23:23:19 nicm Exp $ */ +/* $OpenBSD: client.c,v 1.85 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -26,6 +26,7 @@ #include <errno.h> #include <event.h> #include <fcntl.h> +#include <signal.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c index 8116b3dd712..26dab68bb1d 100644 --- a/usr.bin/tmux/cmd-confirm-before.c +++ b/usr.bin/tmux/cmd-confirm-before.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-confirm-before.c,v 1.21 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: cmd-confirm-before.c,v 1.22 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org> @@ -16,6 +16,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/types.h> + #include <ctype.h> #include <stdlib.h> #include <string.h> diff --git a/usr.bin/tmux/cmd-list-keys.c b/usr.bin/tmux/cmd-list-keys.c index 282549f430d..e11cec4e46a 100644 --- a/usr.bin/tmux/cmd-list-keys.c +++ b/usr.bin/tmux/cmd-list-keys.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-list-keys.c,v 1.24 2014/10/20 22:44:30 nicm Exp $ */ +/* $OpenBSD: cmd-list-keys.c,v 1.25 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -165,7 +165,7 @@ enum cmd_retval cmd_list_keys_commands(unused struct cmd *self, struct cmd_q *cmdq) { const struct cmd_entry **entryp; - struct cmd_entry *entry; + const struct cmd_entry *entry; for (entryp = cmd_table; *entryp != NULL; entryp++) { entry = *entryp; diff --git a/usr.bin/tmux/job.c b/usr.bin/tmux/job.c index 05b0eb9ef81..088d7e4ea3f 100644 --- a/usr.bin/tmux/job.c +++ b/usr.bin/tmux/job.c @@ -1,4 +1,4 @@ -/* $OpenBSD: job.c,v 1.33 2014/04/14 22:27:30 nicm Exp $ */ +/* $OpenBSD: job.c,v 1.34 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2009 Nicholas Marriott <nicm@users.sourceforge.net> @@ -21,6 +21,7 @@ #include <fcntl.h> #include <paths.h> +#include <signal.h> #include <stdlib.h> #include <string.h> #include <unistd.h> diff --git a/usr.bin/tmux/screen.c b/usr.bin/tmux/screen.c index def6469529d..f00d6f07232 100644 --- a/usr.bin/tmux/screen.c +++ b/usr.bin/tmux/screen.c @@ -1,4 +1,4 @@ -/* $OpenBSD: screen.c,v 1.30 2014/10/08 17:35:58 nicm Exp $ */ +/* $OpenBSD: screen.c,v 1.31 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -31,12 +31,12 @@ void screen_resize_y(struct screen *, u_int); void screen_init(struct screen *s, u_int sx, u_int sy, u_int hlimit) { - char hn[MAXHOSTNAMELEN]; + char host[HOST_NAME_MAX]; s->grid = grid_create(sx, sy, hlimit); - if (gethostname(hn, MAXHOSTNAMELEN) == 0) - s->title = xstrdup(hn); + if (gethostname(host, HOST_NAME_MAX) == 0) + s->title = xstrdup(host); else s->title = xstrdup(""); diff --git a/usr.bin/tmux/server-fn.c b/usr.bin/tmux/server-fn.c index 0580095c041..e9d0012f47a 100644 --- a/usr.bin/tmux/server-fn.c +++ b/usr.bin/tmux/server-fn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: server-fn.c,v 1.76 2014/04/17 14:45:49 nicm Exp $ */ +/* $OpenBSD: server-fn.c,v 1.77 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -31,7 +31,7 @@ void server_callback_identify(int, short, void *); void server_fill_environ(struct session *s, struct environ *env) { - char var[MAXPATHLEN], *term; + char var[PATH_MAX], *term; u_int idx; long pid; diff --git a/usr.bin/tmux/signal.c b/usr.bin/tmux/signal.c index 892bf7afd34..3613557d02b 100644 --- a/usr.bin/tmux/signal.c +++ b/usr.bin/tmux/signal.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signal.c,v 1.6 2010/08/19 18:29:01 nicm Exp $ */ +/* $OpenBSD: signal.c,v 1.7 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -17,6 +17,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/types.h> + #include <string.h> #include <signal.h> diff --git a/usr.bin/tmux/style.c b/usr.bin/tmux/style.c index 3f42c4b4962..ed0f71f298b 100644 --- a/usr.bin/tmux/style.c +++ b/usr.bin/tmux/style.c @@ -1,4 +1,4 @@ -/* $OpenBSD: style.c,v 1.3 2014/05/08 05:53:29 nicm Exp $ */ +/* $OpenBSD: style.c,v 1.4 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -17,6 +17,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#include <sys/types.h> + #include <string.h> #include "tmux.h" diff --git a/usr.bin/tmux/tmux.c b/usr.bin/tmux/tmux.c index 689463195c1..5aad6f1f9ae 100644 --- a/usr.bin/tmux/tmux.c +++ b/usr.bin/tmux/tmux.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.c,v 1.131 2014/04/17 07:55:43 nicm Exp $ */ +/* $OpenBSD: tmux.c,v 1.132 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -22,6 +22,7 @@ #include <errno.h> #include <event.h> #include <fcntl.h> +#include <getopt.h> #include <locale.h> #include <paths.h> #include <pwd.h> @@ -46,7 +47,7 @@ char *cfg_file; char *shell_cmd; int debug_level; time_t start_time; -char socket_path[MAXPATHLEN]; +char socket_path[PATH_MAX]; int login_shell; char *environ_path; @@ -124,7 +125,7 @@ areshell(const char *shell) char * makesocketpath(const char *label) { - char base[MAXPATHLEN], realbase[MAXPATHLEN], *path, *s; + char base[PATH_MAX], realbase[PATH_MAX], *path, *s; struct stat sb; u_int uid; @@ -202,7 +203,7 @@ int main(int argc, char **argv) { struct passwd *pw; - char *s, *path, *label, **var, tmp[MAXPATHLEN]; + char *s, *path, *label, **var, tmp[PATH_MAX]; char in[256]; const char *home; long long pid; diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h index c5ed4adc14e..a2b353cd44d 100644 --- a/usr.bin/tmux/tmux.h +++ b/usr.bin/tmux/tmux.h @@ -1,4 +1,4 @@ -/* $OpenBSD: tmux.h,v 1.473 2014/10/20 22:29:25 nicm Exp $ */ +/* $OpenBSD: tmux.h,v 1.474 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net> @@ -21,7 +21,6 @@ #define PROTOCOL_VERSION 8 -#include <sys/param.h> #include <sys/time.h> #include <sys/queue.h> #include <sys/tree.h> @@ -29,10 +28,8 @@ #include <bitstring.h> #include <event.h> -#include <getopt.h> #include <imsg.h> #include <limits.h> -#include <signal.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h> @@ -1565,7 +1562,7 @@ extern char *cfg_file; extern char *shell_cmd; extern int debug_level; extern time_t start_time; -extern char socket_path[MAXPATHLEN]; +extern char socket_path[PATH_MAX]; extern int login_shell; extern char *environ_path; void logfile(const char *); diff --git a/usr.bin/tmux/xmalloc.c b/usr.bin/tmux/xmalloc.c index c0e4167fbb9..d64263cce78 100644 --- a/usr.bin/tmux/xmalloc.c +++ b/usr.bin/tmux/xmalloc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: xmalloc.c,v 1.5 2014/10/08 17:35:58 nicm Exp $ */ +/* $OpenBSD: xmalloc.c,v 1.6 2014/10/20 23:27:14 nicm Exp $ */ /* * Copyright (c) 2004 Nicholas Marriott <nicm@users.sourceforge.net> @@ -16,10 +16,8 @@ * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/param.h> +#include <sys/types.h> -#include <errno.h> -#include <libgen.h> #include <stdint.h> #include <stdlib.h> #include <string.h> |