mirror of
https://github.com/tmux/tmux.git
synced 2024-12-12 17:38:48 +00:00
Add static in cmd-* and fix a few other nits.
This commit is contained in:
parent
c426e485e5
commit
a81685bfac
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
90
cmd-find.c
90
cmd-find.c
@ -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 *);
|
||||
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 *);
|
||||
|
||||
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 *);
|
||||
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 *);
|
||||
|
||||
const char *cmd_find_map_table(const char *[][2], const char *);
|
||||
static 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 *);
|
||||
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 *);
|
||||
|
||||
const char *cmd_find_session_table[][2] = {
|
||||
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;
|
||||
|
@ -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;
|
||||
|
@ -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,14 +59,8 @@ 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;
|
||||
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 *,
|
||||
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_number(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_key(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_colour(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_attributes(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_flag(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_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)
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
29
cmd-string.c
29
cmd-string.c
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user