summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.bin/tmux/cfg.c16
-rw-r--r--usr.bin/tmux/format.c4
-rw-r--r--usr.bin/tmux/layout-set.c4
-rw-r--r--usr.bin/tmux/mode-key.c10
-rw-r--r--usr.bin/tmux/paste.c6
-rw-r--r--usr.bin/tmux/tmux.h12
6 files changed, 25 insertions, 27 deletions
diff --git a/usr.bin/tmux/cfg.c b/usr.bin/tmux/cfg.c
index 5c37f095512..4ccbf6d4d5e 100644
--- a/usr.bin/tmux/cfg.c
+++ b/usr.bin/tmux/cfg.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cfg.c,v 1.46 2016/10/10 21:29:23 nicm Exp $ */
+/* $OpenBSD: cfg.c,v 1.47 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -28,13 +28,13 @@
#include "tmux.h"
-char *cfg_file;
-struct cmd_q *cfg_cmd_q;
-int cfg_finished;
-int cfg_references;
-char **cfg_causes;
-u_int cfg_ncauses;
-struct client *cfg_client;
+char *cfg_file;
+static struct cmd_q *cfg_cmd_q;
+int cfg_finished;
+int cfg_references;
+static char **cfg_causes;
+static u_int cfg_ncauses;
+struct client *cfg_client;
static void cfg_default_done(struct cmd_q *);
diff --git a/usr.bin/tmux/format.c b/usr.bin/tmux/format.c
index bb988ac9a3e..05d61c0e5f6 100644
--- a/usr.bin/tmux/format.c
+++ b/usr.bin/tmux/format.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: format.c,v 1.108 2016/10/10 21:29:23 nicm Exp $ */
+/* $OpenBSD: format.c,v 1.109 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2011 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -91,7 +91,7 @@ struct format_job {
/* Format job tree. */
static struct event format_job_event;
static int format_job_cmp(struct format_job *, struct format_job *);
-RB_HEAD(format_job_tree, format_job) format_jobs = RB_INITIALIZER();
+static RB_HEAD(format_job_tree, format_job) format_jobs = RB_INITIALIZER();
RB_GENERATE_STATIC(format_job_tree, format_job, entry, format_job_cmp);
/* Format job tree comparison function. */
diff --git a/usr.bin/tmux/layout-set.c b/usr.bin/tmux/layout-set.c
index 228e2061966..148c41efab1 100644
--- a/usr.bin/tmux/layout-set.c
+++ b/usr.bin/tmux/layout-set.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: layout-set.c,v 1.16 2016/10/10 21:29:23 nicm Exp $ */
+/* $OpenBSD: layout-set.c,v 1.17 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2009 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -33,7 +33,7 @@ static void layout_set_main_h(struct window *);
static void layout_set_main_v(struct window *);
static void layout_set_tiled(struct window *);
-const struct {
+static const struct {
const char *name;
void (*arrange)(struct window *);
} layout_sets[] = {
diff --git a/usr.bin/tmux/mode-key.c b/usr.bin/tmux/mode-key.c
index d75c0de5f73..257d93f0243 100644
--- a/usr.bin/tmux/mode-key.c
+++ b/usr.bin/tmux/mode-key.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: mode-key.c,v 1.71 2016/10/11 07:23:34 nicm Exp $ */
+/* $OpenBSD: mode-key.c,v 1.72 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2008 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -38,6 +38,12 @@
* (any matching MODEKEYEDIT_SWITCHMODE*) are special-cased to do this.
*/
+/* Command to string mapping. */
+struct mode_key_cmdstr {
+ enum mode_key_cmd cmd;
+ const char *name;
+};
+
/* Entry in the default mode key tables. */
struct mode_key_entry {
key_code key;
@@ -304,7 +310,7 @@ static const struct mode_key_entry mode_key_emacs_choice[] = {
struct mode_key_tree mode_key_tree_emacs_choice;
/* Table mapping key table names to default settings and trees. */
-const struct mode_key_table mode_key_tables[] = {
+static const struct mode_key_table mode_key_tables[] = {
{ "vi-edit", mode_key_cmdstr_edit,
&mode_key_tree_vi_edit, mode_key_vi_edit },
{ "vi-choice", mode_key_cmdstr_choice,
diff --git a/usr.bin/tmux/paste.c b/usr.bin/tmux/paste.c
index 7def7bb846c..f164b715d97 100644
--- a/usr.bin/tmux/paste.c
+++ b/usr.bin/tmux/paste.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: paste.c,v 1.36 2016/10/10 13:54:47 nicm Exp $ */
+/* $OpenBSD: paste.c,v 1.37 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -46,8 +46,8 @@ struct paste_buffer {
static u_int paste_next_index;
static u_int paste_next_order;
static u_int paste_num_automatic;
-RB_HEAD(paste_name_tree, paste_buffer) paste_by_name;
-RB_HEAD(paste_time_tree, paste_buffer) paste_by_time;
+static RB_HEAD(paste_name_tree, paste_buffer) paste_by_name;
+static RB_HEAD(paste_time_tree, paste_buffer) paste_by_time;
static int paste_cmp_names(const struct paste_buffer *,
const struct paste_buffer *);
diff --git a/usr.bin/tmux/tmux.h b/usr.bin/tmux/tmux.h
index 14018fa0773..f6896aba3d5 100644
--- a/usr.bin/tmux/tmux.h
+++ b/usr.bin/tmux/tmux.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmux.h,v 1.654 2016/10/11 13:21:59 nicm Exp $ */
+/* $OpenBSD: tmux.h,v 1.655 2016/10/11 13:45:47 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
@@ -42,6 +42,7 @@ struct args;
struct client;
struct environ;
struct input_ctx;
+struct mode_key_cmdstr;
struct mouse_event;
struct options;
struct session;
@@ -542,12 +543,6 @@ struct mode_key_binding {
};
RB_HEAD(mode_key_tree, mode_key_binding);
-/* Command to string mapping. */
-struct mode_key_cmdstr {
- enum mode_key_cmd cmd;
- const char *name;
-};
-
/* Named mode key table description. */
struct mode_key_entry;
struct mode_key_table {
@@ -1598,13 +1593,10 @@ int printflike(4, 5) hooks_wait(struct hooks *, struct cmd_q *,
struct cmd_find_state *, const char *, ...);
/* mode-key.c */
-extern const struct mode_key_table mode_key_tables[];
extern struct mode_key_tree mode_key_tree_vi_edit;
extern struct mode_key_tree mode_key_tree_vi_choice;
-extern struct mode_key_tree mode_key_tree_vi_copy;
extern struct mode_key_tree mode_key_tree_emacs_edit;
extern struct mode_key_tree mode_key_tree_emacs_choice;
-extern struct mode_key_tree mode_key_tree_emacs_copy;
int mode_key_cmp(struct mode_key_binding *, struct mode_key_binding *);
RB_PROTOTYPE(mode_key_tree, mode_key_binding, entry, mode_key_cmp);
const char *mode_key_tostring(const struct mode_key_cmdstr *,