summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2016-10-10 21:51:40 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2016-10-10 21:51:40 +0000
commitb7ba543eb812f67a3e7826a76c4a5c2d6fad8c7e (patch)
treee88e2af119a53091e212f30170ecbc07731626e3
parentcdc48fa9a174dd3320820c9e10f6c4985a30aedf (diff)
Add static in cmd-* and fix a few other nits.
-rw-r--r--usr.bin/tmux/cmd-attach-session.c6
-rw-r--r--usr.bin/tmux/cmd-bind-key.c12
-rw-r--r--usr.bin/tmux/cmd-break-pane.c6
-rw-r--r--usr.bin/tmux/cmd-capture-pane.c23
-rw-r--r--usr.bin/tmux/cmd-choose-buffer.c6
-rw-r--r--usr.bin/tmux/cmd-choose-client.c10
-rw-r--r--usr.bin/tmux/cmd-choose-tree.c6
-rw-r--r--usr.bin/tmux/cmd-clear-history.c6
-rw-r--r--usr.bin/tmux/cmd-command-prompt.c14
-rw-r--r--usr.bin/tmux/cmd-confirm-before.c14
-rw-r--r--usr.bin/tmux/cmd-copy-mode.c6
-rw-r--r--usr.bin/tmux/cmd-detach-client.c6
-rw-r--r--usr.bin/tmux/cmd-display-message.c6
-rw-r--r--usr.bin/tmux/cmd-find-window.c20
-rw-r--r--usr.bin/tmux/cmd-find.c100
-rw-r--r--usr.bin/tmux/cmd-if-shell.c18
-rw-r--r--usr.bin/tmux/cmd-join-pane.c20
-rw-r--r--usr.bin/tmux/cmd-kill-pane.c6
-rw-r--r--usr.bin/tmux/cmd-kill-server.c6
-rw-r--r--usr.bin/tmux/cmd-kill-session.c6
-rw-r--r--usr.bin/tmux/cmd-kill-window.c6
-rw-r--r--usr.bin/tmux/cmd-list-buffers.c6
-rw-r--r--usr.bin/tmux/cmd-list-clients.c6
-rw-r--r--usr.bin/tmux/cmd-list-panes.c22
-rw-r--r--usr.bin/tmux/cmd-list-sessions.c6
-rw-r--r--usr.bin/tmux/cmd-list-windows.c16
-rw-r--r--usr.bin/tmux/cmd-load-buffer.c11
-rw-r--r--usr.bin/tmux/cmd-lock-server.c6
-rw-r--r--usr.bin/tmux/cmd-move-window.c6
-rw-r--r--usr.bin/tmux/cmd-new-session.c6
-rw-r--r--usr.bin/tmux/cmd-new-window.c6
-rw-r--r--usr.bin/tmux/cmd-paste-buffer.c9
-rw-r--r--usr.bin/tmux/cmd-pipe-pane.c10
-rw-r--r--usr.bin/tmux/cmd-refresh-client.c6
-rw-r--r--usr.bin/tmux/cmd-rename-session.c6
-rw-r--r--usr.bin/tmux/cmd-rename-window.c6
-rw-r--r--usr.bin/tmux/cmd-resize-pane.c17
-rw-r--r--usr.bin/tmux/cmd-respawn-pane.c6
-rw-r--r--usr.bin/tmux/cmd-respawn-window.c6
-rw-r--r--usr.bin/tmux/cmd-rotate-window.c6
-rw-r--r--usr.bin/tmux/cmd-run-shell.c18
-rw-r--r--usr.bin/tmux/cmd-save-buffer.c6
-rw-r--r--usr.bin/tmux/cmd-select-layout.c6
-rw-r--r--usr.bin/tmux/cmd-select-pane.c6
-rw-r--r--usr.bin/tmux/cmd-select-window.c6
-rw-r--r--usr.bin/tmux/cmd-send-keys.c6
-rw-r--r--usr.bin/tmux/cmd-set-buffer.c6
-rw-r--r--usr.bin/tmux/cmd-set-environment.c6
-rw-r--r--usr.bin/tmux/cmd-set-hook.c6
-rw-r--r--usr.bin/tmux/cmd-set-option.c62
-rw-r--r--usr.bin/tmux/cmd-show-environment.c16
-rw-r--r--usr.bin/tmux/cmd-show-messages.c14
-rw-r--r--usr.bin/tmux/cmd-show-options.c18
-rw-r--r--usr.bin/tmux/cmd-source-file.c10
-rw-r--r--usr.bin/tmux/cmd-split-window.c6
-rw-r--r--usr.bin/tmux/cmd-string.c31
-rw-r--r--usr.bin/tmux/cmd-swap-pane.c6
-rw-r--r--usr.bin/tmux/cmd-swap-window.c6
-rw-r--r--usr.bin/tmux/cmd-switch-client.c6
-rw-r--r--usr.bin/tmux/cmd-unbind-key.c12
-rw-r--r--usr.bin/tmux/cmd-wait-for.c47
-rw-r--r--usr.bin/tmux/window-clock.c28
62 files changed, 394 insertions, 400 deletions
diff --git a/usr.bin/tmux/cmd-attach-session.c b/usr.bin/tmux/cmd-attach-session.c
index f2566d2fe63..6d05b26e80b 100644
--- a/usr.bin/tmux/cmd-attach-session.c
+++ b/usr.bin/tmux/cmd-attach-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-attach-session.c,v 1.61 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-attach-session.c,v 1.62 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -30,7 +30,7 @@
* Attach existing session to the current terminal.
*/
-enum cmd_retval cmd_attach_session_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_attach_session_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_attach_session_entry = {
.name = "attach-session",
@@ -154,7 +154,7 @@ cmd_attach_session(struct cmd_q *cmdq, int dflag, int rflag, const char *cflag,
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_attach_session_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-bind-key.c b/usr.bin/tmux/cmd-bind-key.c
index 0170abbe5fe..12f28e9ced6 100644
--- a/usr.bin/tmux/cmd-bind-key.c
+++ b/usr.bin/tmux/cmd-bind-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-bind-key.c,v 1.26 2016/09/12 15:40:58 nicm Exp $ */
+/* $OpenBSD: cmd-bind-key.c,v 1.27 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,10 +27,10 @@
* Bind a key to a command, this recurses through cmd_*.
*/
-enum cmd_retval cmd_bind_key_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_bind_key_exec(struct cmd *, struct cmd_q *);
-enum cmd_retval cmd_bind_key_mode_table(struct cmd *, struct cmd_q *,
- key_code);
+static enum cmd_retval cmd_bind_key_mode_table(struct cmd *, struct cmd_q *,
+ key_code);
const struct cmd_entry cmd_bind_key_entry = {
.name = "bind-key",
@@ -44,7 +44,7 @@ const struct cmd_entry cmd_bind_key_entry = {
.exec = cmd_bind_key_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -93,7 +93,7 @@ cmd_bind_key_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_bind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, key_code key)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-break-pane.c b/usr.bin/tmux/cmd-break-pane.c
index bfd60928679..4dc06a285db 100644
--- a/usr.bin/tmux/cmd-break-pane.c
+++ b/usr.bin/tmux/cmd-break-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-break-pane.c,v 1.37 2016/03/01 11:58:45 nicm Exp $ */
+/* $OpenBSD: cmd-break-pane.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,7 +28,7 @@
#define BREAK_PANE_TEMPLATE "#{session_name}:#{window_index}.#{pane_index}"
-enum cmd_retval cmd_break_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_break_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_break_pane_entry = {
.name = "break-pane",
@@ -44,7 +44,7 @@ const struct cmd_entry cmd_break_pane_entry = {
.exec = cmd_break_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_break_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-capture-pane.c b/usr.bin/tmux/cmd-capture-pane.c
index 7af5e56462f..57573b1fc80 100644
--- a/usr.bin/tmux/cmd-capture-pane.c
+++ b/usr.bin/tmux/cmd-capture-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-capture-pane.c,v 1.38 2015/12/14 00:31:54 nicm Exp $ */
+/* $OpenBSD: cmd-capture-pane.c,v 1.39 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Jonathan Alvarado <radobobo@users.sourceforge.net>
@@ -27,13 +27,14 @@
* Write the entire contents of a pane to a buffer or stdout.
*/
-enum cmd_retval cmd_capture_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_capture_pane_exec(struct cmd *, struct cmd_q *);
-char *cmd_capture_pane_append(char *, size_t *, char *, size_t);
-char *cmd_capture_pane_pending(struct args *, struct window_pane *,
- size_t *);
-char *cmd_capture_pane_history(struct args *, struct cmd_q *,
- struct window_pane *, size_t *);
+static char *cmd_capture_pane_append(char *, size_t *, char *,
+ size_t);
+static char *cmd_capture_pane_pending(struct args *,
+ struct window_pane *, size_t *);
+static char *cmd_capture_pane_history(struct args *, struct cmd_q *,
+ struct window_pane *, size_t *);
const struct cmd_entry cmd_capture_pane_entry = {
.name = "capture-pane",
@@ -49,7 +50,7 @@ const struct cmd_entry cmd_capture_pane_entry = {
.exec = cmd_capture_pane_exec
};
-char *
+static char *
cmd_capture_pane_append(char *buf, size_t *len, char *line, size_t linelen)
{
buf = xrealloc(buf, *len + linelen + 1);
@@ -58,7 +59,7 @@ cmd_capture_pane_append(char *buf, size_t *len, char *line, size_t linelen)
return (buf);
}
-char *
+static char *
cmd_capture_pane_pending(struct args *args, struct window_pane *wp,
size_t *len)
{
@@ -90,7 +91,7 @@ cmd_capture_pane_pending(struct args *args, struct window_pane *wp,
return (buf);
}
-char *
+static char *
cmd_capture_pane_history(struct args *args, struct cmd_q *cmdq,
struct window_pane *wp, size_t *len)
{
@@ -175,7 +176,7 @@ cmd_capture_pane_history(struct args *args, struct cmd_q *cmdq,
return (buf);
}
-enum cmd_retval
+static enum cmd_retval
cmd_capture_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-choose-buffer.c b/usr.bin/tmux/cmd-choose-buffer.c
index fdbb919bca0..1c663099848 100644
--- a/usr.bin/tmux/cmd-choose-buffer.c
+++ b/usr.bin/tmux/cmd-choose-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-buffer.c,v 1.29 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-choose-buffer.c,v 1.30 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -30,7 +30,7 @@
#define CHOOSE_BUFFER_TEMPLATE \
"#{buffer_name}: #{buffer_size} bytes: #{buffer_sample}"
-enum cmd_retval cmd_choose_buffer_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_choose_buffer_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_choose_buffer_entry = {
.name = "choose-buffer",
@@ -45,7 +45,7 @@ const struct cmd_entry cmd_choose_buffer_entry = {
.exec = cmd_choose_buffer_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_choose_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-choose-client.c b/usr.bin/tmux/cmd-choose-client.c
index 1af7c29bf78..dc58e0cfb4b 100644
--- a/usr.bin/tmux/cmd-choose-client.c
+++ b/usr.bin/tmux/cmd-choose-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-client.c,v 1.29 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-choose-client.c,v 1.30 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,9 +33,9 @@
"#{?client_utf8, (utf8),}#{?client_readonly, (ro),} " \
"(last used #{t:client_activity})"
-enum cmd_retval cmd_choose_client_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_choose_client_exec(struct cmd *, struct cmd_q *);
-void cmd_choose_client_callback(struct window_choose_data *);
+static void cmd_choose_client_callback(struct window_choose_data *);
const struct cmd_entry cmd_choose_client_entry = {
.name = "choose-client",
@@ -54,7 +54,7 @@ struct cmd_choose_client_data {
struct client *client;
};
-enum cmd_retval
+static enum cmd_retval
cmd_choose_client_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -110,7 +110,7 @@ cmd_choose_client_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-void
+static void
cmd_choose_client_callback(struct window_choose_data *cdata)
{
struct client *c;
diff --git a/usr.bin/tmux/cmd-choose-tree.c b/usr.bin/tmux/cmd-choose-tree.c
index e29e28cf6d4..7b9bd81841c 100644
--- a/usr.bin/tmux/cmd-choose-tree.c
+++ b/usr.bin/tmux/cmd-choose-tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-choose-tree.c,v 1.31 2015/12/14 00:31:54 nicm Exp $ */
+/* $OpenBSD: cmd-choose-tree.c,v 1.32 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -41,7 +41,7 @@
"#{window_index}: #{window_name}#{window_flags} " \
"\"#{pane_title}\""
-enum cmd_retval cmd_choose_tree_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_choose_tree_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_choose_tree_entry = {
.name = "choose-tree",
@@ -83,7 +83,7 @@ const struct cmd_entry cmd_choose_window_entry = {
.exec = cmd_choose_tree_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_choose_tree_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-clear-history.c b/usr.bin/tmux/cmd-clear-history.c
index e1a6a48970c..53b93f3239f 100644
--- a/usr.bin/tmux/cmd-clear-history.c
+++ b/usr.bin/tmux/cmd-clear-history.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-clear-history.c,v 1.18 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-clear-history.c,v 1.19 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Clear pane history.
*/
-enum cmd_retval cmd_clear_history_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_clear_history_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_clear_history_entry = {
.name = "clear-history",
@@ -39,7 +39,7 @@ const struct cmd_entry cmd_clear_history_entry = {
.exec = cmd_clear_history_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_clear_history_exec(__unused struct cmd *self, struct cmd_q *cmdq)
{
struct window_pane *wp = cmdq->state.tflag.wp;
diff --git a/usr.bin/tmux/cmd-command-prompt.c b/usr.bin/tmux/cmd-command-prompt.c
index 1715b50c84e..38a024592a0 100644
--- a/usr.bin/tmux/cmd-command-prompt.c
+++ b/usr.bin/tmux/cmd-command-prompt.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-command-prompt.c,v 1.33 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-command-prompt.c,v 1.34 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -29,10 +29,10 @@
* Prompt for command in client.
*/
-enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_command_prompt_exec(struct cmd *, struct cmd_q *);
-int cmd_command_prompt_callback(void *, const char *);
-void cmd_command_prompt_free(void *);
+static int cmd_command_prompt_callback(void *, const char *);
+static void cmd_command_prompt_free(void *);
const struct cmd_entry cmd_command_prompt_entry = {
.name = "command-prompt",
@@ -58,7 +58,7 @@ struct cmd_command_prompt_cdata {
int idx;
};
-enum cmd_retval
+static enum cmd_retval
cmd_command_prompt_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -115,7 +115,7 @@ cmd_command_prompt_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-int
+static int
cmd_command_prompt_callback(void *data, const char *s)
{
struct cmd_command_prompt_cdata *cdata = data;
@@ -162,7 +162,7 @@ cmd_command_prompt_callback(void *data, const char *s)
return (0);
}
-void
+static void
cmd_command_prompt_free(void *data)
{
struct cmd_command_prompt_cdata *cdata = data;
diff --git a/usr.bin/tmux/cmd-confirm-before.c b/usr.bin/tmux/cmd-confirm-before.c
index 07852c423d6..e215b574e96 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.28 2015/12/14 00:31:54 nicm Exp $ */
+/* $OpenBSD: cmd-confirm-before.c,v 1.29 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -28,10 +28,10 @@
* Asks for confirmation before executing a command.
*/
-enum cmd_retval cmd_confirm_before_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_confirm_before_exec(struct cmd *, struct cmd_q *);
-int cmd_confirm_before_callback(void *, const char *);
-void cmd_confirm_before_free(void *);
+static int cmd_confirm_before_callback(void *, const char *);
+static void cmd_confirm_before_free(void *);
const struct cmd_entry cmd_confirm_before_entry = {
.name = "confirm-before",
@@ -51,7 +51,7 @@ struct cmd_confirm_before_data {
struct client *client;
};
-enum cmd_retval
+static enum cmd_retval
cmd_confirm_before_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -83,7 +83,7 @@ cmd_confirm_before_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-int
+static int
cmd_confirm_before_callback(void *data, const char *s)
{
struct cmd_confirm_before_data *cdata = data;
@@ -113,7 +113,7 @@ cmd_confirm_before_callback(void *data, const char *s)
return (0);
}
-void
+static void
cmd_confirm_before_free(void *data)
{
struct cmd_confirm_before_data *cdata = data;
diff --git a/usr.bin/tmux/cmd-copy-mode.c b/usr.bin/tmux/cmd-copy-mode.c
index 5e69b1ddaab..71a79d7dc8d 100644
--- a/usr.bin/tmux/cmd-copy-mode.c
+++ b/usr.bin/tmux/cmd-copy-mode.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-copy-mode.c,v 1.27 2016/05/01 13:39:05 nicm Exp $ */
+/* $OpenBSD: cmd-copy-mode.c,v 1.28 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Enter copy or clock mode.
*/
-enum cmd_retval cmd_copy_mode_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_copy_mode_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_copy_mode_entry = {
.name = "copy-mode",
@@ -52,7 +52,7 @@ const struct cmd_entry cmd_clock_mode_entry = {
.exec = cmd_copy_mode_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_copy_mode_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-detach-client.c b/usr.bin/tmux/cmd-detach-client.c
index 0a9b4cefb08..bbbc8cb7023 100644
--- a/usr.bin/tmux/cmd-detach-client.c
+++ b/usr.bin/tmux/cmd-detach-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-detach-client.c,v 1.27 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-detach-client.c,v 1.28 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Detach a client.
*/
-enum cmd_retval cmd_detach_client_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_detach_client_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_detach_client_entry = {
.name = "detach-client",
@@ -55,7 +55,7 @@ const struct cmd_entry cmd_suspend_client_entry = {
.exec = cmd_detach_client_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_detach_client_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-display-message.c b/usr.bin/tmux/cmd-display-message.c
index 4507b15a5e6..f19bf5548d7 100644
--- a/usr.bin/tmux/cmd-display-message.c
+++ b/usr.bin/tmux/cmd-display-message.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-display-message.c,v 1.36 2016/08/25 09:33:14 nicm Exp $ */
+/* $OpenBSD: cmd-display-message.c,v 1.37 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -32,7 +32,7 @@
"#{window_name}, current pane #{pane_index} " \
"- (%H:%M %d-%b-%y)"
-enum cmd_retval cmd_display_message_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_display_message_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_display_message_entry = {
.name = "display-message",
@@ -49,7 +49,7 @@ const struct cmd_entry cmd_display_message_entry = {
.exec = cmd_display_message_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_display_message_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-find-window.c b/usr.bin/tmux/cmd-find-window.c
index dc06db4a708..05cc3015d95 100644
--- a/usr.bin/tmux/cmd-find-window.c
+++ b/usr.bin/tmux/cmd-find-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find-window.c,v 1.37 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-find-window.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,9 +33,9 @@
"[#{window_width}x#{window_height}] " \
"(#{window_panes} panes) #{window_find_matches}"
-enum cmd_retval cmd_find_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_find_window_exec(struct cmd *, struct cmd_q *);
-void cmd_find_window_callback(struct window_choose_data *);
+static void cmd_find_window_callback(struct window_choose_data *);
/* Flags for determining matching behavior. */
#define CMD_FIND_WINDOW_BY_TITLE 0x1
@@ -68,11 +68,11 @@ struct cmd_find_window_data {
};
TAILQ_HEAD(cmd_find_window_list, cmd_find_window_data);
-u_int cmd_find_window_match_flags(struct args *);
-void cmd_find_window_match(struct cmd_find_window_list *, int,
- struct winlink *, const char *, const char *);
+static u_int cmd_find_window_match_flags(struct args *);
+static void cmd_find_window_match(struct cmd_find_window_list *, int,
+ struct winlink *, const char *, const char *);
-u_int
+static u_int
cmd_find_window_match_flags(struct args *args)
{
u_int match_flags = 0;
@@ -92,7 +92,7 @@ cmd_find_window_match_flags(struct args *args)
return (match_flags);
}
-void
+static void
cmd_find_window_match(struct cmd_find_window_list *find_list,
int match_flags, struct winlink *wl, const char *str,
const char *searchstr)
@@ -138,7 +138,7 @@ cmd_find_window_match(struct cmd_find_window_list *find_list,
free(find_data);
}
-enum cmd_retval
+static enum cmd_retval
cmd_find_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -216,7 +216,7 @@ out:
return (CMD_RETURN_NORMAL);
}
-void
+static void
cmd_find_window_callback(struct window_choose_data *cdata)
{
struct session *s;
diff --git a/usr.bin/tmux/cmd-find.c b/usr.bin/tmux/cmd-find.c
index cd889439a12..7db3e083bfb 100644
--- a/usr.bin/tmux/cmd-find.c
+++ b/usr.bin/tmux/cmd-find.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-find.c,v 1.32 2016/03/03 14:14:46 nicm Exp $ */
+/* $OpenBSD: cmd-find.c,v 1.33 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,33 +27,35 @@
#include "tmux.h"
-struct session *cmd_find_try_TMUX(struct client *, struct window *);
-int cmd_find_client_better(struct client *, struct client *);
-struct client *cmd_find_best_client(struct client **, u_int);
-int cmd_find_session_better(struct session *, struct session *,
- int);
-struct session *cmd_find_best_session(struct session **, u_int, int);
-int cmd_find_best_session_with_window(struct cmd_find_state *);
-int cmd_find_best_winlink_with_window(struct cmd_find_state *);
-
-int cmd_find_current_session_with_client(struct cmd_find_state *);
-int cmd_find_current_session(struct cmd_find_state *);
-struct client *cmd_find_current_client(struct cmd_q *);
-
-const char *cmd_find_map_table(const char *[][2], const char *);
-
-int cmd_find_get_session(struct cmd_find_state *, const char *);
-int cmd_find_get_window(struct cmd_find_state *, const char *);
-int cmd_find_get_window_with_session(struct cmd_find_state *, const char *);
-int cmd_find_get_window_with_pane(struct cmd_find_state *);
-int cmd_find_get_pane(struct cmd_find_state *, const char *);
-int cmd_find_get_pane_with_session(struct cmd_find_state *, const char *);
-int cmd_find_get_pane_with_window(struct cmd_find_state *, const char *);
-
-const char *cmd_find_session_table[][2] = {
+static struct session *cmd_find_try_TMUX(struct client *, struct window *);
+static int cmd_find_client_better(struct client *, struct client *);
+static struct client *cmd_find_best_client(struct client **, u_int);
+static int cmd_find_session_better(struct session *, struct session *,
+ int);
+static struct session *cmd_find_best_session(struct session **, u_int, int);
+static int cmd_find_best_session_with_window(struct cmd_find_state *);
+static int cmd_find_best_winlink_with_window(struct cmd_find_state *);
+
+static int cmd_find_current_session_with_client(struct cmd_find_state *);
+static int cmd_find_current_session(struct cmd_find_state *);
+static struct client *cmd_find_current_client(struct cmd_q *);
+
+static const char *cmd_find_map_table(const char *[][2], const char *);
+
+static int cmd_find_get_session(struct cmd_find_state *, const char *);
+static int cmd_find_get_window(struct cmd_find_state *, const char *);
+static int cmd_find_get_window_with_session(struct cmd_find_state *,
+ const char *);
+static int cmd_find_get_pane(struct cmd_find_state *, const char *);
+static int cmd_find_get_pane_with_session(struct cmd_find_state *,
+ const char *);
+static int cmd_find_get_pane_with_window(struct cmd_find_state *,
+ const char *);
+
+static const char *cmd_find_session_table[][2] = {
{ NULL, NULL }
};
-const char *cmd_find_window_table[][2] = {
+static const char *cmd_find_window_table[][2] = {
{ "{start}", "^" },
{ "{last}", "!" },
{ "{end}", "$" },
@@ -61,7 +63,7 @@ const char *cmd_find_window_table[][2] = {
{ "{previous}", "-" },
{ NULL, NULL }
};
-const char *cmd_find_pane_table[][2] = {
+static const char *cmd_find_pane_table[][2] = {
{ "{last}", "!" },
{ "{next}", "+" },
{ "{previous}", "-" },
@@ -81,7 +83,7 @@ const char *cmd_find_pane_table[][2] = {
};
/* Get session from TMUX if present. */
-struct session *
+static struct session *
cmd_find_try_TMUX(struct client *c, struct window *w)
{
struct environ_entry *envent;
@@ -108,7 +110,7 @@ cmd_find_try_TMUX(struct client *c, struct window *w)
}
/* Is this client better? */
-int
+static int
cmd_find_client_better(struct client *c, struct client *than)
{
if (than == NULL)
@@ -117,7 +119,7 @@ cmd_find_client_better(struct client *c, struct client *than)
}
/* Find best client from a list, or all if list is NULL. */
-struct client *
+static struct client *
cmd_find_best_client(struct client **clist, u_int csize)
{
struct client *c_loop, *c;
@@ -143,7 +145,7 @@ cmd_find_best_client(struct client **clist, u_int csize)
}
/* Is this session better? */
-int
+static int
cmd_find_session_better(struct session *s, struct session *than, int flags)
{
int attached;
@@ -161,7 +163,7 @@ cmd_find_session_better(struct session *s, struct session *than, int flags)
}
/* Find best session from a list, or all if list is NULL. */
-struct session *
+static struct session *
cmd_find_best_session(struct session **slist, u_int ssize, int flags)
{
struct session *s_loop, *s;
@@ -183,7 +185,7 @@ cmd_find_best_session(struct session **slist, u_int ssize, int flags)
}
/* Find best session and winlink for window. */
-int
+static int
cmd_find_best_session_with_window(struct cmd_find_state *fs)
{
struct session **slist = NULL;
@@ -220,7 +222,7 @@ fail:
* Find the best winlink for a window (the current if it contains the pane,
* otherwise the first).
*/
-int
+static int
cmd_find_best_winlink_with_window(struct cmd_find_state *fs)
{
struct winlink *wl, *wl_loop;
@@ -244,7 +246,7 @@ cmd_find_best_winlink_with_window(struct cmd_find_state *fs)
}
/* Find current session when we have an unattached client. */
-int
+static int
cmd_find_current_session_with_client(struct cmd_find_state *fs)
{
struct window_pane *wp;
@@ -308,7 +310,7 @@ unknown_pane:
* Work out the best current state. If this function succeeds, the state is
* guaranteed to be completely filled in.
*/
-int
+static int
cmd_find_current_session(struct cmd_find_state *fs)
{
/* If we know the current client, use it. */
@@ -338,7 +340,7 @@ cmd_find_current_session(struct cmd_find_state *fs)
}
/* Work out the best current client. */
-struct client *
+static struct client *
cmd_find_current_client(struct cmd_q *cmdq)
{
struct cmd_find_state current;
@@ -384,7 +386,7 @@ cmd_find_current_client(struct cmd_q *cmdq)
}
/* Maps string in table. */
-const char *
+static const char *
cmd_find_map_table(const char *table[][2], const char *s)
{
u_int i;
@@ -397,7 +399,7 @@ cmd_find_map_table(const char *table[][2], const char *s)
}
/* Find session from string. Fills in s. */
-int
+static int
cmd_find_get_session(struct cmd_find_state *fs, const char *session)
{
struct session *s, *s_loop;
@@ -461,7 +463,7 @@ cmd_find_get_session(struct cmd_find_state *fs, const char *session)
}
/* Find window from string. Fills in s, wl, w. */
-int
+static int
cmd_find_get_window(struct cmd_find_state *fs, const char *window)
{
log_debug("%s: %s", __func__, window);
@@ -497,7 +499,7 @@ cmd_find_get_window(struct cmd_find_state *fs, const char *window)
* Find window from string, assuming it is in given session. Needs s, fills in
* wl and w.
*/
-int
+static int
cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
{
struct winlink *wl;
@@ -647,18 +649,8 @@ cmd_find_get_window_with_session(struct cmd_find_state *fs, const char *window)
return (-1);
}
-/* Find window from given pane. Needs wp, fills in s and wl and w. */
-int
-cmd_find_get_window_with_pane(struct cmd_find_state *fs)
-{
- log_debug("%s", __func__);
-
- fs->w = fs->wp->window;
- return (cmd_find_best_session_with_window(fs));
-}
-
/* Find pane from string. Fills in s, wl, w, wp. */
-int
+static int
cmd_find_get_pane(struct cmd_find_state *fs, const char *pane)
{
log_debug("%s: %s", __func__, pane);
@@ -695,7 +687,7 @@ cmd_find_get_pane(struct cmd_find_state *fs, const char *pane)
* Find pane from string, assuming it is in given session. Needs s, fills in wl
* and w and wp.
*/
-int
+static int
cmd_find_get_pane_with_session(struct cmd_find_state *fs, const char *pane)
{
log_debug("%s: %s", __func__, pane);
@@ -722,7 +714,7 @@ cmd_find_get_pane_with_session(struct cmd_find_state *fs, const char *pane)
* Find pane from string, assuming it is in the given window. Needs w, fills in
* wp.
*/
-int
+static int
cmd_find_get_pane_with_window(struct cmd_find_state *fs, const char *pane)
{
const char *errstr;
diff --git a/usr.bin/tmux/cmd-if-shell.c b/usr.bin/tmux/cmd-if-shell.c
index 8a75bc57677..e3ac8d0b825 100644
--- a/usr.bin/tmux/cmd-if-shell.c
+++ b/usr.bin/tmux/cmd-if-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-if-shell.c,v 1.44 2016/10/09 08:06:51 nicm Exp $ */
+/* $OpenBSD: cmd-if-shell.c,v 1.45 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -29,11 +29,11 @@
* Executes a tmux command if a shell command returns true or false.
*/
-enum cmd_retval cmd_if_shell_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_if_shell_exec(struct cmd *, struct cmd_q *);
-void cmd_if_shell_callback(struct job *);
-void cmd_if_shell_done(struct cmd_q *);
-void cmd_if_shell_free(void *);
+static void cmd_if_shell_callback(struct job *);
+static void cmd_if_shell_done(struct cmd_q *);
+static void cmd_if_shell_free(void *);
const struct cmd_entry cmd_if_shell_entry = {
.name = "if-shell",
@@ -63,7 +63,7 @@ struct cmd_if_shell_data {
int references;
};
-enum cmd_retval
+static enum cmd_retval
cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -137,7 +137,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_WAIT);
}
-void
+static void
cmd_if_shell_callback(struct job *job)
{
struct cmd_if_shell_data *cdata = job->data;
@@ -174,7 +174,7 @@ cmd_if_shell_callback(struct job *job)
cmd_list_free(cmdlist);
}
-void
+static void
cmd_if_shell_done(struct cmd_q *cmdq1)
{
struct cmd_if_shell_data *cdata = cmdq1->data;
@@ -197,7 +197,7 @@ cmd_if_shell_done(struct cmd_q *cmdq1)
free(cdata);
}
-void
+static void
cmd_if_shell_free(void *data)
{
struct cmd_if_shell_data *cdata = data;
diff --git a/usr.bin/tmux/cmd-join-pane.c b/usr.bin/tmux/cmd-join-pane.c
index bc15c65db30..b32d75e1a3d 100644
--- a/usr.bin/tmux/cmd-join-pane.c
+++ b/usr.bin/tmux/cmd-join-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-join-pane.c,v 1.25 2016/09/04 17:37:06 nicm Exp $ */
+/* $OpenBSD: cmd-join-pane.c,v 1.26 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2011 George Nachman <tmux@georgester.com>
@@ -29,9 +29,7 @@
* Join or move a pane into another (like split/swap/kill).
*/
-enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmd_q *);
-
-enum cmd_retval join_pane(struct cmd *, struct cmd_q *, int);
+static enum cmd_retval cmd_join_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_join_pane_entry = {
.name = "join-pane",
@@ -61,15 +59,9 @@ const struct cmd_entry cmd_move_pane_entry = {
.exec = cmd_join_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_join_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
- return (join_pane(self, cmdq, self->entry == &cmd_join_pane_entry));
-}
-
-enum cmd_retval
-join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
-{
struct args *args = self->args;
struct session *dst_s;
struct winlink *src_wl, *dst_wl;
@@ -79,6 +71,12 @@ join_pane(struct cmd *self, struct cmd_q *cmdq, int not_same_window)
int size, percentage, dst_idx;
enum layout_type type;
struct layout_cell *lc;
+ int not_same_window;
+
+ if (self->entry == &cmd_join_pane_entry)
+ not_same_window = 1;
+ else
+ not_same_window = 0;
dst_s = cmdq->state.tflag.s;
dst_wl = cmdq->state.tflag.wl;
diff --git a/usr.bin/tmux/cmd-kill-pane.c b/usr.bin/tmux/cmd-kill-pane.c
index 26f343e4c22..f1b74ef3a11 100644
--- a/usr.bin/tmux/cmd-kill-pane.c
+++ b/usr.bin/tmux/cmd-kill-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-pane.c,v 1.20 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-kill-pane.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Kill pane.
*/
-enum cmd_retval cmd_kill_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_kill_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_kill_pane_entry = {
.name = "kill-pane",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_kill_pane_entry = {
.exec = cmd_kill_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_kill_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct winlink *wl = cmdq->state.tflag.wl;
diff --git a/usr.bin/tmux/cmd-kill-server.c b/usr.bin/tmux/cmd-kill-server.c
index 64f9c50fc95..3648766d0a9 100644
--- a/usr.bin/tmux/cmd-kill-server.c
+++ b/usr.bin/tmux/cmd-kill-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-server.c,v 1.16 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-kill-server.c,v 1.17 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Kill the server and do nothing else.
*/
-enum cmd_retval cmd_kill_server_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_kill_server_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_kill_server_entry = {
.name = "kill-server",
@@ -51,7 +51,7 @@ const struct cmd_entry cmd_start_server_entry = {
.exec = cmd_kill_server_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_kill_server_exec(struct cmd *self, __unused struct cmd_q *cmdq)
{
if (self->entry == &cmd_kill_server_entry)
diff --git a/usr.bin/tmux/cmd-kill-session.c b/usr.bin/tmux/cmd-kill-session.c
index 9a671d339a1..e0c5415f19a 100644
--- a/usr.bin/tmux/cmd-kill-session.c
+++ b/usr.bin/tmux/cmd-kill-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-session.c,v 1.20 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-kill-session.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Note this deliberately has no alias to make it hard to hit by accident.
*/
-enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_kill_session_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_kill_session_entry = {
.name = "kill-session",
@@ -42,7 +42,7 @@ const struct cmd_entry cmd_kill_session_entry = {
.exec = cmd_kill_session_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_kill_session_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-kill-window.c b/usr.bin/tmux/cmd-kill-window.c
index 057a5d9ea0a..800257f3515 100644
--- a/usr.bin/tmux/cmd-kill-window.c
+++ b/usr.bin/tmux/cmd-kill-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-kill-window.c,v 1.21 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-kill-window.c,v 1.22 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Destroy window.
*/
-enum cmd_retval cmd_kill_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_kill_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_kill_window_entry = {
.name = "kill-window",
@@ -52,7 +52,7 @@ const struct cmd_entry cmd_unlink_window_entry = {
.exec = cmd_kill_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_kill_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-list-buffers.c b/usr.bin/tmux/cmd-list-buffers.c
index cf949eba745..739c3446a3f 100644
--- a/usr.bin/tmux/cmd-list-buffers.c
+++ b/usr.bin/tmux/cmd-list-buffers.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-buffers.c,v 1.30 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-list-buffers.c,v 1.31 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -30,7 +30,7 @@
#define LIST_BUFFERS_TEMPLATE \
"#{buffer_name}: #{buffer_size} bytes: \"#{buffer_sample}\""
-enum cmd_retval cmd_list_buffers_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_buffers_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_list_buffers_entry = {
.name = "list-buffers",
@@ -43,7 +43,7 @@ const struct cmd_entry cmd_list_buffers_entry = {
.exec = cmd_list_buffers_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_list_buffers_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-list-clients.c b/usr.bin/tmux/cmd-list-clients.c
index 229039b0308..a74370d6d6a 100644
--- a/usr.bin/tmux/cmd-list-clients.c
+++ b/usr.bin/tmux/cmd-list-clients.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-clients.c,v 1.27 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-list-clients.c,v 1.28 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,7 +33,7 @@
"[#{client_width}x#{client_height} #{client_termname}]" \
"#{?client_utf8, (utf8),} #{?client_readonly, (ro),}"
-enum cmd_retval cmd_list_clients_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_clients_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_list_clients_entry = {
.name = "list-clients",
@@ -48,7 +48,7 @@ const struct cmd_entry cmd_list_clients_entry = {
.exec = cmd_list_clients_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_list_clients_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-list-panes.c b/usr.bin/tmux/cmd-list-panes.c
index 4ac70268b1b..409cfb38dd2 100644
--- a/usr.bin/tmux/cmd-list-panes.c
+++ b/usr.bin/tmux/cmd-list-panes.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-panes.c,v 1.27 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-list-panes.c,v 1.28 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,13 +26,13 @@
* List panes on given window.
*/
-enum cmd_retval cmd_list_panes_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_panes_exec(struct cmd *, struct cmd_q *);
-void cmd_list_panes_server(struct cmd *, struct cmd_q *);
-void cmd_list_panes_session(struct cmd *, struct session *, struct cmd_q *,
- int);
-void cmd_list_panes_window(struct cmd *, struct session *, struct winlink *,
- struct cmd_q *, int);
+static void cmd_list_panes_server(struct cmd *, struct cmd_q *);
+static void cmd_list_panes_session(struct cmd *, struct session *,
+ struct cmd_q *, int);
+static void cmd_list_panes_window(struct cmd *, struct session *,
+ struct winlink *, struct cmd_q *, int);
const struct cmd_entry cmd_list_panes_entry = {
.name = "list-panes",
@@ -47,7 +47,7 @@ const struct cmd_entry cmd_list_panes_entry = {
.exec = cmd_list_panes_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_list_panes_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -64,7 +64,7 @@ cmd_list_panes_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-void
+static void
cmd_list_panes_server(struct cmd *self, struct cmd_q *cmdq)
{
struct session *s;
@@ -73,7 +73,7 @@ cmd_list_panes_server(struct cmd *self, struct cmd_q *cmdq)
cmd_list_panes_session(self, s, cmdq, 2);
}
-void
+static void
cmd_list_panes_session(struct cmd *self, struct session *s, struct cmd_q *cmdq,
int type)
{
@@ -83,7 +83,7 @@ cmd_list_panes_session(struct cmd *self, struct session *s, struct cmd_q *cmdq,
cmd_list_panes_window(self, s, wl, cmdq, type);
}
-void
+static void
cmd_list_panes_window(struct cmd *self, struct session *s, struct winlink *wl,
struct cmd_q *cmdq, int type)
{
diff --git a/usr.bin/tmux/cmd-list-sessions.c b/usr.bin/tmux/cmd-list-sessions.c
index 88de09eae08..fe4cd88f3b7 100644
--- a/usr.bin/tmux/cmd-list-sessions.c
+++ b/usr.bin/tmux/cmd-list-sessions.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-sessions.c,v 1.24 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-list-sessions.c,v 1.25 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -36,7 +36,7 @@
"#{session_group}#{?session_grouped,),}" \
"#{?session_attached, (attached),}"
-enum cmd_retval cmd_list_sessions_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_sessions_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_list_sessions_entry = {
.name = "list-sessions",
@@ -49,7 +49,7 @@ const struct cmd_entry cmd_list_sessions_entry = {
.exec = cmd_list_sessions_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_list_sessions_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-list-windows.c b/usr.bin/tmux/cmd-list-windows.c
index f07e0d654a4..7a46ce7c1ce 100644
--- a/usr.bin/tmux/cmd-list-windows.c
+++ b/usr.bin/tmux/cmd-list-windows.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-list-windows.c,v 1.37 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-list-windows.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -39,11 +39,11 @@
"(#{window_panes} panes) " \
"[#{window_width}x#{window_height}] "
-enum cmd_retval cmd_list_windows_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_list_windows_exec(struct cmd *, struct cmd_q *);
-void cmd_list_windows_server(struct cmd *, struct cmd_q *);
-void cmd_list_windows_session(struct cmd *, struct session *,
- struct cmd_q *, int);
+static void cmd_list_windows_server(struct cmd *, struct cmd_q *);
+static void cmd_list_windows_session(struct cmd *, struct session *,
+ struct cmd_q *, int);
const struct cmd_entry cmd_list_windows_entry = {
.name = "list-windows",
@@ -58,7 +58,7 @@ const struct cmd_entry cmd_list_windows_entry = {
.exec = cmd_list_windows_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_list_windows_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -71,7 +71,7 @@ cmd_list_windows_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-void
+static void
cmd_list_windows_server(struct cmd *self, struct cmd_q *cmdq)
{
struct session *s;
@@ -80,7 +80,7 @@ cmd_list_windows_server(struct cmd *self, struct cmd_q *cmdq)
cmd_list_windows_session(self, s, cmdq, 1);
}
-void
+static void
cmd_list_windows_session(struct cmd *self, struct session *s,
struct cmd_q *cmdq, int type)
{
diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c
index 3152b326a21..47558baaab8 100644
--- a/usr.bin/tmux/cmd-load-buffer.c
+++ b/usr.bin/tmux/cmd-load-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-load-buffer.c,v 1.42 2016/03/05 07:47:52 nicm Exp $ */
+/* $OpenBSD: cmd-load-buffer.c,v 1.43 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -31,8 +31,9 @@
* Loads a paste buffer from a file.
*/
-enum cmd_retval cmd_load_buffer_exec(struct cmd *, struct cmd_q *);
-void cmd_load_buffer_callback(struct client *, int, void *);
+static enum cmd_retval cmd_load_buffer_exec(struct cmd *, struct cmd_q *);
+
+static void cmd_load_buffer_callback(struct client *, int, void *);
const struct cmd_entry cmd_load_buffer_entry = {
.name = "load-buffer",
@@ -45,7 +46,7 @@ const struct cmd_entry cmd_load_buffer_entry = {
.exec = cmd_load_buffer_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_load_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -132,7 +133,7 @@ error:
return (CMD_RETURN_ERROR);
}
-void
+static void
cmd_load_buffer_callback(struct client *c, int closed, void *data)
{
const char *bufname = data;
diff --git a/usr.bin/tmux/cmd-lock-server.c b/usr.bin/tmux/cmd-lock-server.c
index 47aecbcee5a..43906c9d984 100644
--- a/usr.bin/tmux/cmd-lock-server.c
+++ b/usr.bin/tmux/cmd-lock-server.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-lock-server.c,v 1.22 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-lock-server.c,v 1.23 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Lock commands.
*/
-enum cmd_retval cmd_lock_server_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_lock_server_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_lock_server_entry = {
.name = "lock-server",
@@ -63,7 +63,7 @@ const struct cmd_entry cmd_lock_client_entry = {
.exec = cmd_lock_server_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_lock_server_exec(struct cmd *self, __unused struct cmd_q *cmdq)
{
if (self->entry == &cmd_lock_server_entry)
diff --git a/usr.bin/tmux/cmd-move-window.c b/usr.bin/tmux/cmd-move-window.c
index dc76046c5ce..1a50b4c81c8 100644
--- a/usr.bin/tmux/cmd-move-window.c
+++ b/usr.bin/tmux/cmd-move-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-move-window.c,v 1.26 2016/10/03 22:52:11 nicm Exp $ */
+/* $OpenBSD: cmd-move-window.c,v 1.27 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Move a window.
*/
-enum cmd_retval cmd_move_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_move_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_move_window_entry = {
.name = "move-window",
@@ -56,7 +56,7 @@ const struct cmd_entry cmd_link_window_entry = {
.exec = cmd_move_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_move_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-new-session.c b/usr.bin/tmux/cmd-new-session.c
index 2da0bd9b132..b4f406e7e6b 100644
--- a/usr.bin/tmux/cmd-new-session.c
+++ b/usr.bin/tmux/cmd-new-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-session.c,v 1.87 2016/03/05 07:47:52 nicm Exp $ */
+/* $OpenBSD: cmd-new-session.c,v 1.88 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,7 +33,7 @@
#define NEW_SESSION_TEMPLATE "#{session_name}:"
-enum cmd_retval cmd_new_session_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_new_session_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_new_session_entry = {
.name = "new-session",
@@ -63,7 +63,7 @@ const struct cmd_entry cmd_has_session_entry = {
.exec = cmd_new_session_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_new_session_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-new-window.c b/usr.bin/tmux/cmd-new-window.c
index a854dfcc27b..eafb47a4f9a 100644
--- a/usr.bin/tmux/cmd-new-window.c
+++ b/usr.bin/tmux/cmd-new-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-new-window.c,v 1.59 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-new-window.c,v 1.60 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -32,7 +32,7 @@
#define NEW_WINDOW_TEMPLATE "#{session_name}:#{window_index}.#{pane_index}"
-enum cmd_retval cmd_new_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_new_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_new_window_entry = {
.name = "new-window",
@@ -48,7 +48,7 @@ const struct cmd_entry cmd_new_window_entry = {
.exec = cmd_new_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_new_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-paste-buffer.c b/usr.bin/tmux/cmd-paste-buffer.c
index 3b13cbda586..33553a26858 100644
--- a/usr.bin/tmux/cmd-paste-buffer.c
+++ b/usr.bin/tmux/cmd-paste-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-paste-buffer.c,v 1.34 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-paste-buffer.c,v 1.35 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,10 +28,7 @@
* Paste paste buffer if present.
*/
-enum cmd_retval cmd_paste_buffer_exec(struct cmd *, struct cmd_q *);
-
-void cmd_paste_buffer_filter(struct window_pane *,
- const char *, size_t, const char *, int);
+static enum cmd_retval cmd_paste_buffer_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_paste_buffer_entry = {
.name = "paste-buffer",
@@ -47,7 +44,7 @@ const struct cmd_entry cmd_paste_buffer_entry = {
.exec = cmd_paste_buffer_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_paste_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-pipe-pane.c b/usr.bin/tmux/cmd-pipe-pane.c
index 0df26c6353c..affd3dc4d77 100644
--- a/usr.bin/tmux/cmd-pipe-pane.c
+++ b/usr.bin/tmux/cmd-pipe-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-pipe-pane.c,v 1.36 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-pipe-pane.c,v 1.37 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,9 +33,9 @@
* Open pipe to redirect pane output. If already open, close first.
*/
-enum cmd_retval cmd_pipe_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_pipe_pane_exec(struct cmd *, struct cmd_q *);
-void cmd_pipe_pane_error_callback(struct bufferevent *, short, void *);
+static void cmd_pipe_pane_error_callback(struct bufferevent *, short, void *);
const struct cmd_entry cmd_pipe_pane_entry = {
.name = "pipe-pane",
@@ -50,7 +50,7 @@ const struct cmd_entry cmd_pipe_pane_entry = {
.exec = cmd_pipe_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_pipe_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -142,7 +142,7 @@ cmd_pipe_pane_exec(struct cmd *self, struct cmd_q *cmdq)
}
}
-void
+static void
cmd_pipe_pane_error_callback(__unused struct bufferevent *bufev,
__unused short what, void *data)
{
diff --git a/usr.bin/tmux/cmd-refresh-client.c b/usr.bin/tmux/cmd-refresh-client.c
index b4ddcd7b735..27c30abda1a 100644
--- a/usr.bin/tmux/cmd-refresh-client.c
+++ b/usr.bin/tmux/cmd-refresh-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-refresh-client.c,v 1.19 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-refresh-client.c,v 1.20 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Refresh client.
*/
-enum cmd_retval cmd_refresh_client_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_refresh_client_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_refresh_client_entry = {
.name = "refresh-client",
@@ -39,7 +39,7 @@ const struct cmd_entry cmd_refresh_client_entry = {
.exec = cmd_refresh_client_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_refresh_client_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-rename-session.c b/usr.bin/tmux/cmd-rename-session.c
index 326f222c17c..6c196ece745 100644
--- a/usr.bin/tmux/cmd-rename-session.c
+++ b/usr.bin/tmux/cmd-rename-session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-rename-session.c,v 1.20 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-rename-session.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Change session name.
*/
-enum cmd_retval cmd_rename_session_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_rename_session_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_rename_session_entry = {
.name = "rename-session",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_rename_session_entry = {
.exec = cmd_rename_session_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_rename_session_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-rename-window.c b/usr.bin/tmux/cmd-rename-window.c
index abf9defd4c3..77ab474ddb7 100644
--- a/usr.bin/tmux/cmd-rename-window.c
+++ b/usr.bin/tmux/cmd-rename-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-rename-window.c,v 1.16 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-rename-window.c,v 1.17 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Rename a window.
*/
-enum cmd_retval cmd_rename_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_rename_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_rename_window_entry = {
.name = "rename-window",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_rename_window_entry = {
.exec = cmd_rename_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_rename_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-resize-pane.c b/usr.bin/tmux/cmd-resize-pane.c
index 98f5c302c10..fc414fa460e 100644
--- a/usr.bin/tmux/cmd-resize-pane.c
+++ b/usr.bin/tmux/cmd-resize-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-resize-pane.c,v 1.24 2016/10/10 17:28:30 nicm Exp $ */
+/* $OpenBSD: cmd-resize-pane.c,v 1.25 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,9 +26,10 @@
* Increase or decrease pane size.
*/
-enum cmd_retval cmd_resize_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_resize_pane_exec(struct cmd *, struct cmd_q *);
-void cmd_resize_pane_mouse_update(struct client *, struct mouse_event *);
+static void cmd_resize_pane_mouse_update(struct client *,
+ struct mouse_event *);
const struct cmd_entry cmd_resize_pane_entry = {
.name = "resize-pane",
@@ -44,7 +45,7 @@ const struct cmd_entry cmd_resize_pane_entry = {
.exec = cmd_resize_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_resize_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -123,7 +124,7 @@ cmd_resize_pane_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-void
+static void
cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
{
struct winlink *wl;
@@ -154,12 +155,14 @@ cmd_resize_pane_mouse_update(struct client *c, struct mouse_event *m)
continue;
if (wp->xoff + wp->sx == m->lx &&
- wp->yoff <= 1 + ly && wp->yoff + wp->sy >= ly) {
+ wp->yoff <= 1 + ly &&
+ wp->yoff + wp->sy >= ly) {
layout_resize_pane(wp, LAYOUT_LEFTRIGHT, m->x - m->lx, 0);
found = 1;
}
if (wp->yoff + wp->sy == ly &&
- wp->xoff <= 1 + m->lx && wp->xoff + wp->sx >= m->lx) {
+ wp->xoff <= 1 + m->lx &&
+ wp->xoff + wp->sx >= m->lx) {
layout_resize_pane(wp, LAYOUT_TOPBOTTOM, y - ly, 0);
found = 1;
}
diff --git a/usr.bin/tmux/cmd-respawn-pane.c b/usr.bin/tmux/cmd-respawn-pane.c
index b7877a60e77..58ad36611fe 100644
--- a/usr.bin/tmux/cmd-respawn-pane.c
+++ b/usr.bin/tmux/cmd-respawn-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-respawn-pane.c,v 1.20 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-pane.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,7 +28,7 @@
* Respawn a pane (restart the command). Kill existing if -k given.
*/
-enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_respawn_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_respawn_pane_entry = {
.name = "respawn-pane",
@@ -43,7 +43,7 @@ const struct cmd_entry cmd_respawn_pane_entry = {
.exec = cmd_respawn_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_respawn_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-respawn-window.c b/usr.bin/tmux/cmd-respawn-window.c
index ebadbfbeb91..85260a8a77f 100644
--- a/usr.bin/tmux/cmd-respawn-window.c
+++ b/usr.bin/tmux/cmd-respawn-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-respawn-window.c,v 1.30 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-respawn-window.c,v 1.31 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Respawn a window (restart the command). Kill existing if -k given.
*/
-enum cmd_retval cmd_respawn_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_respawn_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_respawn_window_entry = {
.name = "respawn-window",
@@ -42,7 +42,7 @@ const struct cmd_entry cmd_respawn_window_entry = {
.exec = cmd_respawn_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_respawn_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-rotate-window.c b/usr.bin/tmux/cmd-rotate-window.c
index 16b417e384d..810df7b59ec 100644
--- a/usr.bin/tmux/cmd-rotate-window.c
+++ b/usr.bin/tmux/cmd-rotate-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-rotate-window.c,v 1.19 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-rotate-window.c,v 1.20 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Rotate the panes in a window.
*/
-enum cmd_retval cmd_rotate_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_rotate_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_rotate_window_entry = {
.name = "rotate-window",
@@ -39,7 +39,7 @@ const struct cmd_entry cmd_rotate_window_entry = {
.exec = cmd_rotate_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_rotate_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct winlink *wl = cmdq->state.tflag.wl;
diff --git a/usr.bin/tmux/cmd-run-shell.c b/usr.bin/tmux/cmd-run-shell.c
index 13eabdbc33a..d4a589f9ad3 100644
--- a/usr.bin/tmux/cmd-run-shell.c
+++ b/usr.bin/tmux/cmd-run-shell.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-run-shell.c,v 1.37 2016/10/09 08:06:51 nicm Exp $ */
+/* $OpenBSD: cmd-run-shell.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -29,11 +29,11 @@
* Runs a command without a window.
*/
-enum cmd_retval cmd_run_shell_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_run_shell_exec(struct cmd *, struct cmd_q *);
-void cmd_run_shell_callback(struct job *);
-void cmd_run_shell_free(void *);
-void cmd_run_shell_print(struct job *, const char *);
+static void cmd_run_shell_callback(struct job *);
+static void cmd_run_shell_free(void *);
+static void cmd_run_shell_print(struct job *, const char *);
const struct cmd_entry cmd_run_shell_entry = {
.name = "run-shell",
@@ -55,7 +55,7 @@ struct cmd_run_shell_data {
int wp_id;
};
-void
+static void
cmd_run_shell_print(struct job *job, const char *msg)
{
struct cmd_run_shell_data *cdata = job->data;
@@ -74,7 +74,7 @@ cmd_run_shell_print(struct job *job, const char *msg)
window_copy_add(wp, "%s", msg);
}
-enum cmd_retval
+static enum cmd_retval
cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -113,7 +113,7 @@ cmd_run_shell_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_WAIT);
}
-void
+static void
cmd_run_shell_callback(struct job *job)
{
struct cmd_run_shell_data *cdata = job->data;
@@ -161,7 +161,7 @@ cmd_run_shell_callback(struct job *job)
free(msg);
}
-void
+static void
cmd_run_shell_free(void *data)
{
struct cmd_run_shell_data *cdata = data;
diff --git a/usr.bin/tmux/cmd-save-buffer.c b/usr.bin/tmux/cmd-save-buffer.c
index 98cf267bf99..e323914c502 100644
--- a/usr.bin/tmux/cmd-save-buffer.c
+++ b/usr.bin/tmux/cmd-save-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-save-buffer.c,v 1.37 2016/03/05 07:47:52 nicm Exp $ */
+/* $OpenBSD: cmd-save-buffer.c,v 1.38 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -32,7 +32,7 @@
* Saves a paste buffer to a file.
*/
-enum cmd_retval cmd_save_buffer_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_save_buffer_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_save_buffer_entry = {
.name = "save-buffer",
@@ -56,7 +56,7 @@ const struct cmd_entry cmd_show_buffer_entry = {
.exec = cmd_save_buffer_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-select-layout.c b/usr.bin/tmux/cmd-select-layout.c
index 53673b04d62..270d3222cb3 100644
--- a/usr.bin/tmux/cmd-select-layout.c
+++ b/usr.bin/tmux/cmd-select-layout.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-layout.c,v 1.29 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-select-layout.c,v 1.30 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Switch window to selected layout.
*/
-enum cmd_retval cmd_select_layout_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_select_layout_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_select_layout_entry = {
.name = "select-layout",
@@ -67,7 +67,7 @@ const struct cmd_entry cmd_previous_layout_entry = {
.exec = cmd_select_layout_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_select_layout_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-select-pane.c b/usr.bin/tmux/cmd-select-pane.c
index ecdf3d5d730..0d23e09f46c 100644
--- a/usr.bin/tmux/cmd-select-pane.c
+++ b/usr.bin/tmux/cmd-select-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-pane.c,v 1.32 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-select-pane.c,v 1.33 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,7 +24,7 @@
* Select pane.
*/
-enum cmd_retval cmd_select_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_select_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_select_pane_entry = {
.name = "select-pane",
@@ -52,7 +52,7 @@ const struct cmd_entry cmd_last_pane_entry = {
.exec = cmd_select_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_select_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-select-window.c b/usr.bin/tmux/cmd-select-window.c
index c69da0ebf35..be85201f12e 100644
--- a/usr.bin/tmux/cmd-select-window.c
+++ b/usr.bin/tmux/cmd-select-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-select-window.c,v 1.16 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-select-window.c,v 1.17 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Select window by index.
*/
-enum cmd_retval cmd_select_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_select_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_select_window_entry = {
.name = "select-window",
@@ -80,7 +80,7 @@ const struct cmd_entry cmd_last_window_entry = {
.exec = cmd_select_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_select_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct winlink *wl = cmdq->state.tflag.wl;
diff --git a/usr.bin/tmux/cmd-send-keys.c b/usr.bin/tmux/cmd-send-keys.c
index 36e803760cc..c10d6183975 100644
--- a/usr.bin/tmux/cmd-send-keys.c
+++ b/usr.bin/tmux/cmd-send-keys.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-send-keys.c,v 1.28 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-send-keys.c,v 1.29 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Send keys to client.
*/
-enum cmd_retval cmd_send_keys_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_send_keys_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_send_keys_entry = {
.name = "send-keys",
@@ -55,7 +55,7 @@ const struct cmd_entry cmd_send_prefix_entry = {
.exec = cmd_send_keys_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_send_keys_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-set-buffer.c b/usr.bin/tmux/cmd-set-buffer.c
index 74437af14dd..d25a02bcaa0 100644
--- a/usr.bin/tmux/cmd-set-buffer.c
+++ b/usr.bin/tmux/cmd-set-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-buffer.c,v 1.25 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-set-buffer.c,v 1.26 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Add, set, append to or delete a paste buffer.
*/
-enum cmd_retval cmd_set_buffer_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_set_buffer_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_set_buffer_entry = {
.name = "set-buffer",
@@ -51,7 +51,7 @@ const struct cmd_entry cmd_delete_buffer_entry = {
.exec = cmd_set_buffer_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_set_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-set-environment.c b/usr.bin/tmux/cmd-set-environment.c
index f8591b5246f..f934a8b3051 100644
--- a/usr.bin/tmux/cmd-set-environment.c
+++ b/usr.bin/tmux/cmd-set-environment.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-environment.c,v 1.18 2016/03/03 14:15:22 nicm Exp $ */
+/* $OpenBSD: cmd-set-environment.c,v 1.19 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Set an environment variable.
*/
-enum cmd_retval cmd_set_environment_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_set_environment_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_set_environment_entry = {
.name = "set-environment",
@@ -42,7 +42,7 @@ const struct cmd_entry cmd_set_environment_entry = {
.exec = cmd_set_environment_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_set_environment_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-set-hook.c b/usr.bin/tmux/cmd-set-hook.c
index eede49e0c88..a78f615306a 100644
--- a/usr.bin/tmux/cmd-set-hook.c
+++ b/usr.bin/tmux/cmd-set-hook.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-hook.c,v 1.6 2016/05/12 13:21:56 nicm Exp $ */
+/* $OpenBSD: cmd-set-hook.c,v 1.7 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2012 Thomas Adam <thomas@xteddy.org>
@@ -27,7 +27,7 @@
* Set or show global or session hooks.
*/
-enum cmd_retval cmd_set_hook_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_set_hook_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_set_hook_entry = {
.name = "set-hook",
@@ -55,7 +55,7 @@ const struct cmd_entry cmd_show_hooks_entry = {
.exec = cmd_set_hook_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_set_hook_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-set-option.c b/usr.bin/tmux/cmd-set-option.c
index d3a7de00709..6cafd730267 100644
--- a/usr.bin/tmux/cmd-set-option.c
+++ b/usr.bin/tmux/cmd-set-option.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-set-option.c,v 1.98 2016/10/09 07:58:35 nicm Exp $ */
+/* $OpenBSD: cmd-set-option.c,v 1.99 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,40 +27,40 @@
* Set an option.
*/
-enum cmd_retval cmd_set_option_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_set_option_exec(struct cmd *, struct cmd_q *);
-enum cmd_retval cmd_set_option_user(struct cmd *, struct cmd_q *,
+static enum cmd_retval cmd_set_option_user(struct cmd *, struct cmd_q *,
const char *, const char *);
-int cmd_set_option_unset(struct cmd *, struct cmd_q *,
- const struct options_table_entry *, struct options *,
- const char *);
-int cmd_set_option_set(struct cmd *, struct cmd_q *,
- const struct options_table_entry *, struct options *,
- const char *);
+static int cmd_set_option_unset(struct cmd *, struct cmd_q *,
+ const struct options_table_entry *, struct options *,
+ const char *);
+static int cmd_set_option_set(struct cmd *, struct cmd_q *,
+ const struct options_table_entry *, struct options *,
+ const char *);
-struct options_entry *cmd_set_option_string(struct cmd *, struct cmd_q *,
- const struct options_table_entry *, struct options *,
- const char *);
-struct options_entry *cmd_set_option_number(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_string(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_key(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_number(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_colour(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_key(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_attributes(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_colour(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_flag(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_attributes(struct cmd *,
+ struct cmd_q *, const struct options_table_entry *,
+ struct options *, const char *);
+static struct options_entry *cmd_set_option_flag(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_choice(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_choice(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
-struct options_entry *cmd_set_option_style(struct cmd *, struct cmd_q *,
+static struct options_entry *cmd_set_option_style(struct cmd *, struct cmd_q *,
const struct options_table_entry *, struct options *,
const char *);
@@ -90,7 +90,7 @@ const struct cmd_entry cmd_set_window_option_entry = {
.exec = cmd_set_option_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -223,7 +223,7 @@ cmd_set_option_exec(struct cmd *self, struct cmd_q *cmdq)
}
/* Set user option. */
-enum cmd_retval
+static enum cmd_retval
cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char *optstr,
const char *valstr)
{
@@ -301,7 +301,7 @@ cmd_set_option_user(struct cmd *self, struct cmd_q *cmdq, const char *optstr,
}
/* Unset an option. */
-int
+static int
cmd_set_option_unset(struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -331,7 +331,7 @@ cmd_set_option_unset(struct cmd *self, struct cmd_q *cmdq,
}
/* Set an option. */
-int
+static int
cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -386,7 +386,7 @@ cmd_set_option_set(struct cmd *self, struct cmd_q *cmdq,
}
/* Set a string option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_string(struct cmd *self, __unused struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -408,7 +408,7 @@ cmd_set_option_string(struct cmd *self, __unused struct cmd_q *cmdq,
}
/* Set a number option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_number(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -426,7 +426,7 @@ cmd_set_option_number(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set a key option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_key(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -443,7 +443,7 @@ cmd_set_option_key(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set a colour option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_colour(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -459,7 +459,7 @@ cmd_set_option_colour(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set an attributes option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_attributes(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -475,7 +475,7 @@ cmd_set_option_attributes(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set a flag option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_flag(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -503,7 +503,7 @@ cmd_set_option_flag(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set a choice option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_choice(__unused struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
@@ -538,7 +538,7 @@ cmd_set_option_choice(__unused struct cmd *self, struct cmd_q *cmdq,
}
/* Set a style option. */
-struct options_entry *
+static struct options_entry *
cmd_set_option_style(struct cmd *self, struct cmd_q *cmdq,
const struct options_table_entry *oe, struct options *oo,
const char *value)
diff --git a/usr.bin/tmux/cmd-show-environment.c b/usr.bin/tmux/cmd-show-environment.c
index 0986ead535e..ad0ea975ae4 100644
--- a/usr.bin/tmux/cmd-show-environment.c
+++ b/usr.bin/tmux/cmd-show-environment.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-environment.c,v 1.19 2016/03/03 14:15:22 nicm Exp $ */
+/* $OpenBSD: cmd-show-environment.c,v 1.20 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,11 +27,11 @@
* Show environment.
*/
-enum cmd_retval cmd_show_environment_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_show_environment_exec(struct cmd *, struct cmd_q *);
-char *cmd_show_environment_escape(struct environ_entry *);
-void cmd_show_environment_print(struct cmd *, struct cmd_q *,
- struct environ_entry *);
+static char *cmd_show_environment_escape(struct environ_entry *);
+static void cmd_show_environment_print(struct cmd *, struct cmd_q *,
+ struct environ_entry *);
const struct cmd_entry cmd_show_environment_entry = {
.name = "show-environment",
@@ -46,7 +46,7 @@ const struct cmd_entry cmd_show_environment_entry = {
.exec = cmd_show_environment_exec
};
-char *
+static char *
cmd_show_environment_escape(struct environ_entry *envent)
{
const char *value = envent->value;
@@ -64,7 +64,7 @@ cmd_show_environment_escape(struct environ_entry *envent)
return (ret);
}
-void
+static void
cmd_show_environment_print(struct cmd *self, struct cmd_q *cmdq,
struct environ_entry *envent)
{
@@ -87,7 +87,7 @@ cmd_show_environment_print(struct cmd *self, struct cmd_q *cmdq,
cmdq_print(cmdq, "unset %s;", envent->name);
}
-enum cmd_retval
+static enum cmd_retval
cmd_show_environment_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-show-messages.c b/usr.bin/tmux/cmd-show-messages.c
index f7e026cb5dc..47d35ff23b6 100644
--- a/usr.bin/tmux/cmd-show-messages.c
+++ b/usr.bin/tmux/cmd-show-messages.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-messages.c,v 1.20 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-show-messages.c,v 1.21 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -29,7 +29,7 @@
* Show client message log.
*/
-enum cmd_retval cmd_show_messages_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_show_messages_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_show_messages_entry = {
.name = "show-messages",
@@ -55,10 +55,10 @@ const struct cmd_entry cmd_server_info_entry = {
.exec = cmd_show_messages_exec
};
-int cmd_show_messages_terminals(struct cmd_q *, int);
-int cmd_show_messages_jobs(struct cmd_q *, int);
+static int cmd_show_messages_terminals(struct cmd_q *, int);
+static int cmd_show_messages_jobs(struct cmd_q *, int);
-int
+static int
cmd_show_messages_terminals(struct cmd_q *cmdq, int blank)
{
struct tty_term *term;
@@ -79,7 +79,7 @@ cmd_show_messages_terminals(struct cmd_q *cmdq, int blank)
return (n != 0);
}
-int
+static int
cmd_show_messages_jobs(struct cmd_q *cmdq, int blank)
{
struct job *job;
@@ -98,7 +98,7 @@ cmd_show_messages_jobs(struct cmd_q *cmdq, int blank)
return (n != 0);
}
-enum cmd_retval
+static enum cmd_retval
cmd_show_messages_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-show-options.c b/usr.bin/tmux/cmd-show-options.c
index 9e0f518f330..1d953e3155b 100644
--- a/usr.bin/tmux/cmd-show-options.c
+++ b/usr.bin/tmux/cmd-show-options.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-show-options.c,v 1.31 2016/03/03 14:15:22 nicm Exp $ */
+/* $OpenBSD: cmd-show-options.c,v 1.32 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,12 +27,12 @@
* Show options.
*/
-enum cmd_retval cmd_show_options_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_show_options_exec(struct cmd *, struct cmd_q *);
-enum cmd_retval cmd_show_options_one(struct cmd *, struct cmd_q *,
- struct options *, int);
-enum cmd_retval cmd_show_options_all(struct cmd *, struct cmd_q *,
- struct options *, enum options_table_scope);
+static enum cmd_retval cmd_show_options_one(struct cmd *, struct cmd_q *,
+ struct options *, int);
+static enum cmd_retval cmd_show_options_all(struct cmd *, struct cmd_q *,
+ struct options *, enum options_table_scope);
const struct cmd_entry cmd_show_options_entry = {
.name = "show-options",
@@ -60,7 +60,7 @@ const struct cmd_entry cmd_show_window_options_entry = {
.exec = cmd_show_options_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_show_options_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -110,7 +110,7 @@ cmd_show_options_exec(struct cmd *self, struct cmd_q *cmdq)
return (cmd_show_options_one(self, cmdq, oo, quiet));
}
-enum cmd_retval
+static enum cmd_retval
cmd_show_options_one(struct cmd *self, struct cmd_q *cmdq,
struct options *oo, int quiet)
{
@@ -160,7 +160,7 @@ retry:
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_show_options_all(struct cmd *self, struct cmd_q *cmdq, struct options *oo,
enum options_table_scope scope)
{
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c
index 1206af6d818..233bb30ec57 100644
--- a/usr.bin/tmux/cmd-source-file.c
+++ b/usr.bin/tmux/cmd-source-file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-source-file.c,v 1.25 2016/05/12 16:05:33 tim Exp $ */
+/* $OpenBSD: cmd-source-file.c,v 1.26 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org>
@@ -26,9 +26,9 @@
* Sources a configuration file.
*/
-enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_source_file_exec(struct cmd *, struct cmd_q *);
-void cmd_source_file_done(struct cmd_q *);
+static void cmd_source_file_done(struct cmd_q *);
const struct cmd_entry cmd_source_file_entry = {
.name = "source-file",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_source_file_entry = {
.exec = cmd_source_file_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_source_file_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -76,7 +76,7 @@ cmd_source_file_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_WAIT);
}
-void
+static void
cmd_source_file_done(struct cmd_q *cmdq1)
{
struct cmd_q *cmdq = cmdq1->data;
diff --git a/usr.bin/tmux/cmd-split-window.c b/usr.bin/tmux/cmd-split-window.c
index 26f48e8b6f7..6da2a3cc4d5 100644
--- a/usr.bin/tmux/cmd-split-window.c
+++ b/usr.bin/tmux/cmd-split-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-split-window.c,v 1.70 2016/09/04 17:37:06 nicm Exp $ */
+/* $OpenBSD: cmd-split-window.c,v 1.71 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,7 +33,7 @@
#define SPLIT_WINDOW_TEMPLATE "#{session_name}:#{window_index}.#{pane_index}"
-enum cmd_retval cmd_split_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_split_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_split_window_entry = {
.name = "split-window",
@@ -49,7 +49,7 @@ const struct cmd_entry cmd_split_window_entry = {
.exec = cmd_split_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_split_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-string.c b/usr.bin/tmux/cmd-string.c
index d1b70c4d532..7876d5d740b 100644
--- a/usr.bin/tmux/cmd-string.c
+++ b/usr.bin/tmux/cmd-string.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-string.c,v 1.22 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-string.c,v 1.23 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -31,14 +31,14 @@
* Parse a command from a string.
*/
-int cmd_string_getc(const char *, size_t *);
-void cmd_string_ungetc(size_t *);
-void cmd_string_copy(char **, char *, size_t *);
-char *cmd_string_string(const char *, size_t *, char, int);
-char *cmd_string_variable(const char *, size_t *);
-char *cmd_string_expand_tilde(const char *, size_t *);
+static int cmd_string_getc(const char *, size_t *);
+static void cmd_string_ungetc(size_t *);
+static void cmd_string_copy(char **, char *, size_t *);
+static char *cmd_string_string(const char *, size_t *, char, int);
+static char *cmd_string_variable(const char *, size_t *);
+static char *cmd_string_expand_tilde(const char *, size_t *);
-int
+static int
cmd_string_getc(const char *s, size_t *p)
{
const u_char *ucs = s;
@@ -48,7 +48,7 @@ cmd_string_getc(const char *s, size_t *p)
return (ucs[(*p)++]);
}
-void
+static void
cmd_string_ungetc(size_t *p)
{
(*p)--;
@@ -173,7 +173,7 @@ out:
return (rval);
}
-void
+static void
cmd_string_copy(char **dst, char *src, size_t *len)
{
size_t srclen;
@@ -187,7 +187,7 @@ cmd_string_copy(char **dst, char *src, size_t *len)
free(src);
}
-char *
+static char *
cmd_string_string(const char *s, size_t *p, char endch, int esc)
{
int ch;
@@ -245,7 +245,7 @@ error:
return (NULL);
}
-char *
+static char *
cmd_string_variable(const char *s, size_t *p)
{
int ch, fch;
@@ -314,7 +314,7 @@ error:
return (NULL);
}
-char *
+static char *
cmd_string_expand_tilde(const char *s, size_t *p)
{
struct passwd *pw;
@@ -337,7 +337,10 @@ cmd_string_expand_tilde(const char *s, size_t *p)
cp = user = xmalloc(strlen(s));
for (;;) {
last = cmd_string_getc(s, p);
- if (last == EOF || last == '/' || last == ' '|| last == '\t')
+ if (last == EOF ||
+ last == '/' ||
+ last == ' '||
+ last == '\t')
break;
*cp++ = last;
}
diff --git a/usr.bin/tmux/cmd-swap-pane.c b/usr.bin/tmux/cmd-swap-pane.c
index 5fa62881702..8b2d0f2ddd8 100644
--- a/usr.bin/tmux/cmd-swap-pane.c
+++ b/usr.bin/tmux/cmd-swap-pane.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-swap-pane.c,v 1.26 2016/03/01 12:02:54 nicm Exp $ */
+/* $OpenBSD: cmd-swap-pane.c,v 1.27 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Swap two panes.
*/
-enum cmd_retval cmd_swap_pane_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_swap_pane_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_swap_pane_entry = {
.name = "swap-pane",
@@ -42,7 +42,7 @@ const struct cmd_entry cmd_swap_pane_entry = {
.exec = cmd_swap_pane_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_swap_pane_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct window *src_w, *dst_w;
diff --git a/usr.bin/tmux/cmd-swap-window.c b/usr.bin/tmux/cmd-swap-window.c
index 2e526cf0346..7b41584af54 100644
--- a/usr.bin/tmux/cmd-swap-window.c
+++ b/usr.bin/tmux/cmd-swap-window.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-swap-window.c,v 1.16 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-swap-window.c,v 1.17 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,7 +26,7 @@
* Swap one window with another.
*/
-enum cmd_retval cmd_swap_window_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_swap_window_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_swap_window_entry = {
.name = "swap-window",
@@ -42,7 +42,7 @@ const struct cmd_entry cmd_swap_window_entry = {
.exec = cmd_swap_window_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_swap_window_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct session *src, *dst;
diff --git a/usr.bin/tmux/cmd-switch-client.c b/usr.bin/tmux/cmd-switch-client.c
index 287a0e7cec3..9aa0a313c42 100644
--- a/usr.bin/tmux/cmd-switch-client.c
+++ b/usr.bin/tmux/cmd-switch-client.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-switch-client.c,v 1.42 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-switch-client.c,v 1.43 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -27,7 +27,7 @@
* Switch client to a different session.
*/
-enum cmd_retval cmd_switch_client_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_switch_client_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_switch_client_entry = {
.name = "switch-client",
@@ -44,7 +44,7 @@ const struct cmd_entry cmd_switch_client_entry = {
.exec = cmd_switch_client_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_switch_client_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-unbind-key.c b/usr.bin/tmux/cmd-unbind-key.c
index 1a5ccd0adb9..9906ec0df94 100644
--- a/usr.bin/tmux/cmd-unbind-key.c
+++ b/usr.bin/tmux/cmd-unbind-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-unbind-key.c,v 1.25 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-unbind-key.c,v 1.26 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -26,9 +26,9 @@
* Unbind key from command.
*/
-enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
-enum cmd_retval cmd_unbind_key_mode_table(struct cmd *, struct cmd_q *,
- key_code);
+static enum cmd_retval cmd_unbind_key_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_unbind_key_mode_table(struct cmd *, struct cmd_q *,
+ key_code);
const struct cmd_entry cmd_unbind_key_entry = {
.name = "unbind-key",
@@ -41,7 +41,7 @@ const struct cmd_entry cmd_unbind_key_entry = {
.exec = cmd_unbind_key_exec
};
-enum cmd_retval
+static enum cmd_retval
cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -98,7 +98,7 @@ cmd_unbind_key_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_unbind_key_mode_table(struct cmd *self, struct cmd_q *cmdq, key_code key)
{
struct args *args = self->args;
diff --git a/usr.bin/tmux/cmd-wait-for.c b/usr.bin/tmux/cmd-wait-for.c
index b3c599edad6..5c7694267fe 100644
--- a/usr.bin/tmux/cmd-wait-for.c
+++ b/usr.bin/tmux/cmd-wait-for.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-wait-for.c,v 1.13 2016/01/19 15:59:12 nicm Exp $ */
+/* $OpenBSD: cmd-wait-for.c,v 1.14 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2013 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,7 +28,7 @@
* Block or wake a client on a named wait channel.
*/
-enum cmd_retval cmd_wait_for_exec(struct cmd *, struct cmd_q *);
+static enum cmd_retval cmd_wait_for_exec(struct cmd *, struct cmd_q *);
const struct cmd_entry cmd_wait_for_entry = {
.name = "wait-for",
@@ -52,31 +52,30 @@ struct wait_channel {
RB_ENTRY(wait_channel) entry;
};
RB_HEAD(wait_channels, wait_channel);
-struct wait_channels wait_channels = RB_INITIALIZER(wait_channels);
+static struct wait_channels wait_channels = RB_INITIALIZER(wait_channels);
-int wait_channel_cmp(struct wait_channel *, struct wait_channel *);
-RB_PROTOTYPE(wait_channels, wait_channel, entry, wait_channel_cmp);
-RB_GENERATE(wait_channels, wait_channel, entry, wait_channel_cmp);
+static int wait_channel_cmp(struct wait_channel *, struct wait_channel *);
+RB_GENERATE_STATIC(wait_channels, wait_channel, entry, wait_channel_cmp);
-int
+static int
wait_channel_cmp(struct wait_channel *wc1, struct wait_channel *wc2)
{
return (strcmp(wc1->name, wc2->name));
}
-enum cmd_retval cmd_wait_for_signal(struct cmd_q *, const char *,
- struct wait_channel *);
-enum cmd_retval cmd_wait_for_wait(struct cmd_q *, const char *,
- struct wait_channel *);
-enum cmd_retval cmd_wait_for_lock(struct cmd_q *, const char *,
- struct wait_channel *);
-enum cmd_retval cmd_wait_for_unlock(struct cmd_q *, const char *,
- struct wait_channel *);
+static enum cmd_retval cmd_wait_for_signal(struct cmd_q *, const char *,
+ struct wait_channel *);
+static enum cmd_retval cmd_wait_for_wait(struct cmd_q *, const char *,
+ struct wait_channel *);
+static enum cmd_retval cmd_wait_for_lock(struct cmd_q *, const char *,
+ struct wait_channel *);
+static enum cmd_retval cmd_wait_for_unlock(struct cmd_q *, const char *,
+ struct wait_channel *);
-struct wait_channel *cmd_wait_for_add(const char *);
-void cmd_wait_for_remove(struct wait_channel *wc);
+static struct wait_channel *cmd_wait_for_add(const char *);
+static void cmd_wait_for_remove(struct wait_channel *wc);
-struct wait_channel *
+static struct wait_channel *
cmd_wait_for_add(const char *name)
{
struct wait_channel *wc;
@@ -97,7 +96,7 @@ cmd_wait_for_add(const char *name)
return (wc);
}
-void
+static void
cmd_wait_for_remove(struct wait_channel *wc)
{
if (wc->locked)
@@ -113,7 +112,7 @@ cmd_wait_for_remove(struct wait_channel *wc)
free(wc);
}
-enum cmd_retval
+static enum cmd_retval
cmd_wait_for_exec(struct cmd *self, struct cmd_q *cmdq)
{
struct args *args = self->args;
@@ -132,7 +131,7 @@ cmd_wait_for_exec(struct cmd *self, struct cmd_q *cmdq)
return (cmd_wait_for_wait(cmdq, name, wc));
}
-enum cmd_retval
+static enum cmd_retval
cmd_wait_for_signal(__unused struct cmd_q *cmdq, const char *name,
struct wait_channel *wc)
{
@@ -158,7 +157,7 @@ cmd_wait_for_signal(__unused struct cmd_q *cmdq, const char *name,
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_wait_for_wait(struct cmd_q *cmdq, const char *name,
struct wait_channel *wc)
{
@@ -185,7 +184,7 @@ cmd_wait_for_wait(struct cmd_q *cmdq, const char *name,
return (CMD_RETURN_WAIT);
}
-enum cmd_retval
+static enum cmd_retval
cmd_wait_for_lock(struct cmd_q *cmdq, const char *name,
struct wait_channel *wc)
{
@@ -207,7 +206,7 @@ cmd_wait_for_lock(struct cmd_q *cmdq, const char *name,
return (CMD_RETURN_NORMAL);
}
-enum cmd_retval
+static enum cmd_retval
cmd_wait_for_unlock(struct cmd_q *cmdq, const char *name,
struct wait_channel *wc)
{
diff --git a/usr.bin/tmux/window-clock.c b/usr.bin/tmux/window-clock.c
index d569e680df0..06788abf6df 100644
--- a/usr.bin/tmux/window-clock.c
+++ b/usr.bin/tmux/window-clock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: window-clock.c,v 1.18 2016/07/15 00:42:56 nicm Exp $ */
+/* $OpenBSD: window-clock.c,v 1.19 2016/10/10 21:51:39 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -24,14 +24,14 @@
#include "tmux.h"
-struct screen *window_clock_init(struct window_pane *);
-void window_clock_free(struct window_pane *);
-void window_clock_resize(struct window_pane *, u_int, u_int);
-void window_clock_key(struct window_pane *, struct client *,
- struct session *, key_code, struct mouse_event *);
+static struct screen *window_clock_init(struct window_pane *);
+static void window_clock_free(struct window_pane *);
+static void window_clock_resize(struct window_pane *, u_int, u_int);
+static void window_clock_key(struct window_pane *, struct client *,
+ struct session *, key_code, struct mouse_event *);
-void window_clock_timer_callback(int, short, void *);
-void window_clock_draw_screen(struct window_pane *);
+static void window_clock_timer_callback(int, short, void *);
+static void window_clock_draw_screen(struct window_pane *);
const struct window_mode window_clock_mode = {
window_clock_init,
@@ -119,7 +119,7 @@ const char window_clock_table[14][5][5] = {
{ 1,0,0,0,1 } },
};
-void
+static void
window_clock_timer_callback(__unused int fd, __unused short events, void *arg)
{
struct window_pane *wp = arg;
@@ -142,7 +142,7 @@ window_clock_timer_callback(__unused int fd, __unused short events, void *arg)
server_redraw_window(wp->window);
}
-struct screen *
+static struct screen *
window_clock_init(struct window_pane *wp)
{
struct window_clock_mode_data *data;
@@ -164,7 +164,7 @@ window_clock_init(struct window_pane *wp)
return (s);
}
-void
+static void
window_clock_free(struct window_pane *wp)
{
struct window_clock_mode_data *data = wp->modedata;
@@ -174,7 +174,7 @@ window_clock_free(struct window_pane *wp)
free(data);
}
-void
+static void
window_clock_resize(struct window_pane *wp, u_int sx, u_int sy)
{
struct window_clock_mode_data *data = wp->modedata;
@@ -184,7 +184,7 @@ window_clock_resize(struct window_pane *wp, u_int sx, u_int sy)
window_clock_draw_screen(wp);
}
-void
+static void
window_clock_key(struct window_pane *wp, __unused struct client *c,
__unused struct session *sess, __unused key_code key,
__unused struct mouse_event *m)
@@ -192,7 +192,7 @@ window_clock_key(struct window_pane *wp, __unused struct client *c,
window_pane_reset_mode(wp);
}
-void
+static void
window_clock_draw_screen(struct window_pane *wp)
{
struct window_clock_mode_data *data = wp->modedata;