Some other stuff that can be local to one file.

This commit is contained in:
nicm 2016-10-11 13:45:47 +00:00
parent e45401846f
commit 5c49e1d0c1
6 changed files with 19 additions and 21 deletions

14
cfg.c
View File

@ -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 *);

View File

@ -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. */

View File

@ -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[] = {

View File

@ -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,

View File

@ -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 *);

10
tmux.h
View File

@ -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 *,