version 1.150, 2016/09/12 15:40:58 |
version 1.151, 2016/10/10 21:29:23 |
|
|
|
|
#include "tmux.h" |
#include "tmux.h" |
|
|
char *status_redraw_get_left(struct client *, time_t, struct grid_cell *, |
static char *status_redraw_get_left(struct client *, time_t, |
size_t *); |
struct grid_cell *, size_t *); |
char *status_redraw_get_right(struct client *, time_t, struct grid_cell *, |
static char *status_redraw_get_right(struct client *, time_t, |
size_t *); |
struct grid_cell *, size_t *); |
char *status_print(struct client *, struct winlink *, time_t, |
static char *status_print(struct client *, struct winlink *, time_t, |
struct grid_cell *); |
struct grid_cell *); |
char *status_replace(struct client *, struct winlink *, const char *, time_t); |
static char *status_replace(struct client *, struct winlink *, const char *, |
void status_message_callback(int, short, void *); |
time_t); |
void status_timer_callback(int, short, void *); |
static void status_message_callback(int, short, void *); |
|
static void status_timer_callback(int, short, void *); |
|
|
const char *status_prompt_up_history(u_int *); |
static char *status_prompt_find_history_file(void); |
const char *status_prompt_down_history(u_int *); |
static const char *status_prompt_up_history(u_int *); |
void status_prompt_add_history(const char *); |
static const char *status_prompt_down_history(u_int *); |
|
static void status_prompt_add_history(const char *); |
|
|
const char **status_prompt_complete_list(u_int *, const char *); |
static const char **status_prompt_complete_list(u_int *, const char *); |
char *status_prompt_complete_prefix(const char **, u_int); |
static char *status_prompt_complete_prefix(const char **, u_int); |
char *status_prompt_complete(struct session *, const char *); |
static char *status_prompt_complete(struct session *, const char *); |
|
|
char *status_prompt_find_history_file(void); |
|
|
|
/* Status prompt history. */ |
/* Status prompt history. */ |
#define PROMPT_HISTORY 100 |
#define PROMPT_HISTORY 100 |
char **status_prompt_hlist; |
static char **status_prompt_hlist; |
u_int status_prompt_hsize; |
static u_int status_prompt_hsize; |
|
|
/* Find the history file to load/save from/to. */ |
/* Find the history file to load/save from/to. */ |
char * |
static char * |
status_prompt_find_history_file(void) |
status_prompt_find_history_file(void) |
{ |
{ |
const char *home, *history_file; |
const char *home, *history_file; |
|
|
} |
} |
|
|
/* Status timer callback. */ |
/* Status timer callback. */ |
void |
static void |
status_timer_callback(__unused int fd, __unused short events, void *arg) |
status_timer_callback(__unused int fd, __unused short events, void *arg) |
{ |
{ |
struct client *c = arg; |
struct client *c = arg; |
|
|
} |
} |
|
|
/* Retrieve options for left string. */ |
/* Retrieve options for left string. */ |
char * |
static char * |
status_redraw_get_left(struct client *c, time_t t, struct grid_cell *gc, |
status_redraw_get_left(struct client *c, time_t t, struct grid_cell *gc, |
size_t *size) |
size_t *size) |
{ |
{ |
|
|
} |
} |
|
|
/* Retrieve options for right string. */ |
/* Retrieve options for right string. */ |
char * |
static char * |
status_redraw_get_right(struct client *c, time_t t, struct grid_cell *gc, |
status_redraw_get_right(struct client *c, time_t t, struct grid_cell *gc, |
size_t *size) |
size_t *size) |
{ |
{ |
|
|
} |
} |
|
|
/* Replace special sequences in fmt. */ |
/* Replace special sequences in fmt. */ |
char * |
static char * |
status_replace(struct client *c, struct winlink *wl, const char *fmt, time_t t) |
status_replace(struct client *c, struct winlink *wl, const char *fmt, time_t t) |
{ |
{ |
struct format_tree *ft; |
struct format_tree *ft; |
|
|
} |
} |
|
|
/* Return winlink status line entry and adjust gc as necessary. */ |
/* Return winlink status line entry and adjust gc as necessary. */ |
char * |
static char * |
status_print(struct client *c, struct winlink *wl, time_t t, |
status_print(struct client *c, struct winlink *wl, time_t t, |
struct grid_cell *gc) |
struct grid_cell *gc) |
{ |
{ |
|
|
} |
} |
|
|
/* Clear status line message after timer expires. */ |
/* Clear status line message after timer expires. */ |
void |
static void |
status_message_callback(__unused int fd, __unused short event, void *data) |
status_message_callback(__unused int fd, __unused short event, void *data) |
{ |
{ |
struct client *c = data; |
struct client *c = data; |
|
|
} |
} |
|
|
/* Get previous line from the history. */ |
/* Get previous line from the history. */ |
const char * |
static const char * |
status_prompt_up_history(u_int *idx) |
status_prompt_up_history(u_int *idx) |
{ |
{ |
/* |
/* |
|
|
} |
} |
|
|
/* Get next line from the history. */ |
/* Get next line from the history. */ |
const char * |
static const char * |
status_prompt_down_history(u_int *idx) |
status_prompt_down_history(u_int *idx) |
{ |
{ |
if (status_prompt_hsize == 0 || *idx == 0) |
if (status_prompt_hsize == 0 || *idx == 0) |
|
|
} |
} |
|
|
/* Add line to the history. */ |
/* Add line to the history. */ |
void |
static void |
status_prompt_add_history(const char *line) |
status_prompt_add_history(const char *line) |
{ |
{ |
size_t size; |
size_t size; |
|
|
} |
} |
|
|
/* Build completion list. */ |
/* Build completion list. */ |
const char ** |
static const char ** |
status_prompt_complete_list(u_int *size, const char *s) |
status_prompt_complete_list(u_int *size, const char *s) |
{ |
{ |
const char **list = NULL, **layout; |
const char **list = NULL, **layout; |
|
|
} |
} |
|
|
/* Find longest prefix. */ |
/* Find longest prefix. */ |
char * |
static char * |
status_prompt_complete_prefix(const char **list, u_int size) |
status_prompt_complete_prefix(const char **list, u_int size) |
{ |
{ |
char *out; |
char *out; |
|
|
} |
} |
|
|
/* Complete word. */ |
/* Complete word. */ |
char * |
static char * |
status_prompt_complete(struct session *sess, const char *s) |
status_prompt_complete(struct session *sess, const char *s) |
{ |
{ |
const char **list = NULL, *colon; |
const char **list = NULL, *colon; |