summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornicm <nicm>2016-10-11 13:45:47 +0000
committernicm <nicm>2016-10-11 13:45:47 +0000
commit5c49e1d0c1afaf98512b2ffd1f31d91fecff9851 (patch)
tree7c700a3608d6de77abcdd13af8098aa47cf657ec
parente45401846f0a423bb90ebd3943041a28b2657631 (diff)
Some other stuff that can be local to one file.
-rw-r--r--cfg.c14
-rw-r--r--format.c2
-rw-r--r--layout-set.c2
-rw-r--r--mode-key.c8
-rw-r--r--paste.c4
-rw-r--r--tmux.h10
6 files changed, 19 insertions, 21 deletions
diff --git a/cfg.c b/cfg.c
index 0a931a81..d45573ea 100644
--- a/cfg.c
+++ b/cfg.c
@@ -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/format.c b/format.c
index acf37850..ed6f2cab 100644
--- a/format.c
+++ b/format.c
@@ -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/layout-set.c b/layout-set.c
index 1da7037a..db621f61 100644
--- a/layout-set.c
+++ b/layout-set.c
@@ -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/mode-key.c b/mode-key.c
index 5c3c7889..32333957 100644
--- a/mode-key.c
+++ b/mode-key.c
@@ -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/paste.c b/paste.c
index d4d5c59f..672927f4 100644
--- a/paste.c
+++ b/paste.c
@@ -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/tmux.h b/tmux.h
index e2c1514c..b5fd8714 100644
--- a/tmux.h
+++ b/tmux.h
@@ -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 *,