tmux  3.2a
About: tmux is a terminal multiplexer that lets you switch easily between several programs in one terminal.
  Fossies Dox: tmux-3.2a.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

format.c File Reference
#include <sys/types.h>
#include <sys/wait.h>
#include <ctype.h>
#include <errno.h>
#include <fnmatch.h>
#include <libgen.h>
#include <math.h>
#include <regex.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "tmux.h"
Include dependency graph for format.c:

Go to the source code of this file.

Data Structures

struct  format_job
 
struct  format_entry
 
struct  format_tree
 
struct  format_expand_state
 
struct  format_modifier
 
struct  format_table_entry
 

Macros

#define FORMAT_TIMESTRING   0x1
 
#define FORMAT_BASENAME   0x2
 
#define FORMAT_DIRNAME   0x4
 
#define FORMAT_QUOTE_SHELL   0x8
 
#define FORMAT_LITERAL   0x10
 
#define FORMAT_EXPAND   0x20
 
#define FORMAT_EXPANDTIME   0x40
 
#define FORMAT_SESSIONS   0x80
 
#define FORMAT_WINDOWS   0x100
 
#define FORMAT_PANES   0x200
 
#define FORMAT_PRETTY   0x400
 
#define FORMAT_LENGTH   0x800
 
#define FORMAT_WIDTH   0x1000
 
#define FORMAT_QUOTE_STYLE   0x2000
 
#define FORMAT_WINDOW_NAME   0x4000
 
#define FORMAT_SESSION_NAME   0x8000
 
#define FORMAT_CHARACTER   0x10000
 
#define FORMAT_LOOP_LIMIT   100
 
#define FORMAT_EXPAND_TIME   0x1
 
#define FORMAT_EXPAND_NOJOBS   0x2
 
#define format_log(es, fmt, ...)   format_log1(es, __func__, fmt, ##__VA_ARGS__)
 

Enumerations

enum  format_type { FORMAT_TYPE_UNKNOWN , FORMAT_TYPE_SESSION , FORMAT_TYPE_WINDOW , FORMAT_TYPE_PANE }
 
enum  format_table_type { FORMAT_TABLE_STRING , FORMAT_TABLE_TIME }
 

Functions

static char * format_job_get (struct format_expand_state *, const char *)
 
static char * format_expand1 (struct format_expand_state *, const char *)
 
static int format_replace (struct format_expand_state *, const char *, size_t, char **, size_t *, size_t *)
 
static void format_defaults_session (struct format_tree *, struct session *)
 
static void format_defaults_client (struct format_tree *, struct client *)
 
static void format_defaults_winlink (struct format_tree *, struct winlink *)
 
static int format_job_cmp (struct format_job *, struct format_job *)
 
static RB_HEAD (RB_GENERATE_STATIC(format_job_tree, RB_GENERATE_STATIC(format_job)
 
static int format_entry_cmp (struct format_entry *, struct format_entry *)
 
 RB_GENERATE_STATIC (format_entry_tree, format_entry, entry, format_entry_cmp)
 
static int format_logging (struct format_tree *ft)
 
static void format_log1 (struct format_expand_state *es, const char *from, const char *fmt,...)
 
static void format_copy_state (struct format_expand_state *to, struct format_expand_state *from, int flags)
 
static void format_job_update (struct job *job)
 
static void format_job_complete (struct job *job)
 
static void format_job_tidy (struct format_job_tree *jobs, int force)
 
void format_tidy_jobs (void)
 
void format_lost_client (struct client *c)
 
static char * format_printf (const char *fmt,...)
 
static void * format_cb_host (struct format_tree *ft)
 
static void * format_cb_host_short (struct format_tree *ft)
 
static void * format_cb_pid (struct format_tree *ft)
 
static void * format_cb_session_attached_list (struct format_tree *ft)
 
static void * format_cb_session_alerts (struct format_tree *ft)
 
static void * format_cb_session_stack (struct format_tree *ft)
 
static void * format_cb_window_stack_index (struct format_tree *ft)
 
static void * format_cb_window_linked_sessions_list (struct format_tree *ft)
 
static void * format_cb_window_active_sessions (struct format_tree *ft)
 
static void * format_cb_window_active_sessions_list (struct format_tree *ft)
 
static void * format_cb_window_active_clients (struct format_tree *ft)
 
static void * format_cb_window_active_clients_list (struct format_tree *ft)
 
static void * format_cb_window_layout (struct format_tree *ft)
 
static void * format_cb_window_visible_layout (struct format_tree *ft)
 
static void * format_cb_start_command (struct format_tree *ft)
 
static void * format_cb_current_command (struct format_tree *ft)
 
static void * format_cb_current_path (struct format_tree *ft)
 
static void * format_cb_history_bytes (struct format_tree *ft)
 
static void * format_cb_history_all_bytes (struct format_tree *ft)
 
static void * format_cb_pane_tabs (struct format_tree *ft)
 
static void * format_cb_pane_fg (struct format_tree *ft)
 
static void * format_cb_pane_bg (struct format_tree *ft)
 
static void * format_cb_session_group_list (struct format_tree *ft)
 
static void * format_cb_session_group_attached_list (struct format_tree *ft)
 
static void * format_cb_pane_in_mode (struct format_tree *ft)
 
static void * format_cb_pane_at_top (struct format_tree *ft)
 
static void * format_cb_pane_at_bottom (struct format_tree *ft)
 
static void * format_cb_cursor_character (struct format_tree *ft)
 
static void * format_cb_mouse_word (struct format_tree *ft)
 
static void * format_cb_mouse_line (struct format_tree *ft)
 
static void * format_cb_alternate_on (struct format_tree *ft)
 
static void * format_cb_alternate_saved_x (struct format_tree *ft)
 
static void * format_cb_alternate_saved_y (struct format_tree *ft)
 
static void * format_cb_buffer_name (struct format_tree *ft)
 
static void * format_cb_buffer_sample (struct format_tree *ft)
 
static void * format_cb_buffer_size (struct format_tree *ft)
 
static void * format_cb_client_cell_height (struct format_tree *ft)
 
static void * format_cb_client_cell_width (struct format_tree *ft)
 
static void * format_cb_client_control_mode (struct format_tree *ft)
 
static void * format_cb_client_discarded (struct format_tree *ft)
 
static void * format_cb_client_flags (struct format_tree *ft)
 
static void * format_cb_client_height (struct format_tree *ft)
 
static void * format_cb_client_key_table (struct format_tree *ft)
 
static void * format_cb_client_last_session (struct format_tree *ft)
 
static void * format_cb_client_name (struct format_tree *ft)
 
static void * format_cb_client_pid (struct format_tree *ft)
 
static void * format_cb_client_prefix (struct format_tree *ft)
 
static void * format_cb_client_readonly (struct format_tree *ft)
 
static void * format_cb_client_session (struct format_tree *ft)
 
static void * format_cb_client_termfeatures (struct format_tree *ft)
 
static void * format_cb_client_termname (struct format_tree *ft)
 
static void * format_cb_client_termtype (struct format_tree *ft)
 
static void * format_cb_client_tty (struct format_tree *ft)
 
static void * format_cb_client_utf8 (struct format_tree *ft)
 
static void * format_cb_client_width (struct format_tree *ft)
 
static void * format_cb_client_written (struct format_tree *ft)
 
static void * format_cb_config_files (struct format_tree *ft)
 
static void * format_cb_cursor_flag (struct format_tree *ft)
 
static void * format_cb_cursor_x (struct format_tree *ft)
 
static void * format_cb_cursor_y (struct format_tree *ft)
 
static void * format_cb_history_limit (struct format_tree *ft)
 
static void * format_cb_history_size (struct format_tree *ft)
 
static void * format_cb_insert_flag (struct format_tree *ft)
 
static void * format_cb_keypad_cursor_flag (struct format_tree *ft)
 
static void * format_cb_keypad_flag (struct format_tree *ft)
 
static void * format_cb_mouse_all_flag (struct format_tree *ft)
 
static void * format_cb_mouse_any_flag (struct format_tree *ft)
 
static void * format_cb_mouse_button_flag (struct format_tree *ft)
 
static void * format_cb_mouse_pane (struct format_tree *ft)
 
static void * format_cb_mouse_sgr_flag (struct format_tree *ft)
 
static void * format_cb_mouse_standard_flag (struct format_tree *ft)
 
static void * format_cb_mouse_utf8_flag (struct format_tree *ft)
 
static void * format_cb_mouse_x (struct format_tree *ft)
 
static void * format_cb_mouse_y (struct format_tree *ft)
 
static void * format_cb_origin_flag (struct format_tree *ft)
 
static void * format_cb_pane_active (struct format_tree *ft)
 
static void * format_cb_pane_at_left (struct format_tree *ft)
 
static void * format_cb_pane_at_right (struct format_tree *ft)
 
static void * format_cb_pane_bottom (struct format_tree *ft)
 
static void * format_cb_pane_dead (struct format_tree *ft)
 
static void * format_cb_pane_dead_status (struct format_tree *ft)
 
static void * format_cb_pane_format (struct format_tree *ft)
 
static void * format_cb_pane_height (struct format_tree *ft)
 
static void * format_cb_pane_id (struct format_tree *ft)
 
static void * format_cb_pane_index (struct format_tree *ft)
 
static void * format_cb_pane_input_off (struct format_tree *ft)
 
static void * format_cb_pane_last (struct format_tree *ft)
 
static void * format_cb_pane_left (struct format_tree *ft)
 
static void * format_cb_pane_marked (struct format_tree *ft)
 
static void * format_cb_pane_marked_set (struct format_tree *ft)
 
static void * format_cb_pane_mode (struct format_tree *ft)
 
static void * format_cb_pane_path (struct format_tree *ft)
 
static void * format_cb_pane_pid (struct format_tree *ft)
 
static void * format_cb_pane_pipe (struct format_tree *ft)
 
static void * format_cb_pane_right (struct format_tree *ft)
 
static void * format_cb_pane_search_string (struct format_tree *ft)
 
static void * format_cb_pane_synchronized (struct format_tree *ft)
 
static void * format_cb_pane_title (struct format_tree *ft)
 
static void * format_cb_pane_top (struct format_tree *ft)
 
static void * format_cb_pane_tty (struct format_tree *ft)
 
static void * format_cb_pane_width (struct format_tree *ft)
 
static void * format_cb_scroll_region_lower (struct format_tree *ft)
 
static void * format_cb_scroll_region_upper (struct format_tree *ft)
 
static void * format_cb_session_attached (struct format_tree *ft)
 
static void * format_cb_session_format (struct format_tree *ft)
 
static void * format_cb_session_group (struct format_tree *ft)
 
static void * format_cb_session_group_attached (struct format_tree *ft)
 
static void * format_cb_session_group_many_attached (struct format_tree *ft)
 
static void * format_cb_session_group_size (struct format_tree *ft)
 
static void * format_cb_session_grouped (struct format_tree *ft)
 
static void * format_cb_session_id (struct format_tree *ft)
 
static void * format_cb_session_many_attached (struct format_tree *ft)
 
static void * format_cb_session_marked (struct format_tree *ft)
 
static void * format_cb_session_name (struct format_tree *ft)
 
static void * format_cb_session_path (struct format_tree *ft)
 
static void * format_cb_session_windows (struct format_tree *ft)
 
static void * format_cb_socket_path (struct format_tree *ft)
 
static void * format_cb_version (struct format_tree *ft)
 
static void * format_cb_active_window_index (struct format_tree *ft)
 
static void * format_cb_last_window_index (struct format_tree *ft)
 
static void * format_cb_window_active (struct format_tree *ft)
 
static void * format_cb_window_activity_flag (struct format_tree *ft)
 
static void * format_cb_window_bell_flag (struct format_tree *ft)
 
static void * format_cb_window_bigger (struct format_tree *ft)
 
static void * format_cb_window_cell_height (struct format_tree *ft)
 
static void * format_cb_window_cell_width (struct format_tree *ft)
 
static void * format_cb_window_end_flag (struct format_tree *ft)
 
static void * format_cb_window_flags (struct format_tree *ft)
 
static void * format_cb_window_format (struct format_tree *ft)
 
static void * format_cb_window_height (struct format_tree *ft)
 
static void * format_cb_window_id (struct format_tree *ft)
 
static void * format_cb_window_index (struct format_tree *ft)
 
static void * format_cb_window_last_flag (struct format_tree *ft)
 
static void * format_cb_window_linked (struct format_tree *ft)
 
static void * format_cb_window_linked_sessions (struct format_tree *ft)
 
static void * format_cb_window_marked_flag (struct format_tree *ft)
 
static void * format_cb_window_name (struct format_tree *ft)
 
static void * format_cb_window_offset_x (struct format_tree *ft)
 
static void * format_cb_window_offset_y (struct format_tree *ft)
 
static void * format_cb_window_panes (struct format_tree *ft)
 
static void * format_cb_window_raw_flags (struct format_tree *ft)
 
static void * format_cb_window_silence_flag (struct format_tree *ft)
 
static void * format_cb_window_start_flag (struct format_tree *ft)
 
static void * format_cb_window_width (struct format_tree *ft)
 
static void * format_cb_window_zoomed_flag (struct format_tree *ft)
 
static void * format_cb_wrap_flag (struct format_tree *ft)
 
static void * format_cb_buffer_created (struct format_tree *ft)
 
static void * format_cb_client_activity (struct format_tree *ft)
 
static void * format_cb_client_created (struct format_tree *ft)
 
static void * format_cb_session_activity (struct format_tree *ft)
 
static void * format_cb_session_created (struct format_tree *ft)
 
static void * format_cb_session_last_attached (struct format_tree *ft)
 
static void * format_cb_start_time (struct format_tree *ft)
 
static void * format_cb_window_activity (struct format_tree *ft)
 
static void * format_cb_buffer_mode_format (struct format_tree *ft)
 
static void * format_cb_client_mode_format (struct format_tree *ft)
 
static void * format_cb_tree_mode_format (struct format_tree *ft)
 
static int format_table_compare (const void *key0, const void *entry0)
 
static struct format_table_entryformat_table_get (const char *key)
 
void format_merge (struct format_tree *ft, struct format_tree *from)
 
struct window_paneformat_get_pane (struct format_tree *ft)
 
static void format_create_add_item (struct format_tree *ft, struct cmdq_item *item)
 
struct format_treeformat_create (struct client *c, struct cmdq_item *item, int tag, int flags)
 
void format_free (struct format_tree *ft)
 
void format_each (struct format_tree *ft, void(*cb)(const char *, const char *, void *), void *arg)
 
void format_add (struct format_tree *ft, const char *key, const char *fmt,...)
 
void format_add_tv (struct format_tree *ft, const char *key, struct timeval *tv)
 
void format_add_cb (struct format_tree *ft, const char *key, format_cb cb)
 
static char * format_quote_shell (const char *s)
 
static char * format_quote_style (const char *s)
 
static char * format_pretty_time (time_t t)
 
static char * format_find (struct format_tree *ft, const char *key, int modifiers, const char *time_format)
 
static char * format_strip (const char *s)
 
const char * format_skip (const char *s, const char *end)
 
static int format_choose (struct format_expand_state *es, const char *s, char **left, char **right, int expand)
 
int format_true (const char *s)
 
static int format_is_end (char c)
 
static void format_add_modifier (struct format_modifier **list, u_int *count, const char *c, size_t n, char **argv, int argc)
 
static void format_free_modifiers (struct format_modifier *list, u_int count)
 
static struct format_modifierformat_build_modifiers (struct format_expand_state *es, const char **s, u_int *count)
 
static char * format_match (struct format_modifier *fm, const char *pattern, const char *text)
 
static char * format_sub (struct format_modifier *fm, const char *text, const char *pattern, const char *with)
 
static char * format_search (struct format_modifier *fm, struct window_pane *wp, const char *s)
 
static char * format_session_name (struct format_expand_state *es, const char *fmt)
 
static char * format_loop_sessions (struct format_expand_state *es, const char *fmt)
 
static char * format_window_name (struct format_expand_state *es, const char *fmt)
 
static char * format_loop_windows (struct format_expand_state *es, const char *fmt)
 
static char * format_loop_panes (struct format_expand_state *es, const char *fmt)
 
static char * format_replace_expression (struct format_modifier *mexp, struct format_expand_state *es, const char *copy)
 
char * format_expand_time (struct format_tree *ft, const char *fmt)
 
char * format_expand (struct format_tree *ft, const char *fmt)
 
char * format_single (struct cmdq_item *item, const char *fmt, struct client *c, struct session *s, struct winlink *wl, struct window_pane *wp)
 
char * format_single_from_state (struct cmdq_item *item, const char *fmt, struct client *c, struct cmd_find_state *fs)
 
char * format_single_from_target (struct cmdq_item *item, const char *fmt)
 
struct format_treeformat_create_defaults (struct cmdq_item *item, struct client *c, struct session *s, struct winlink *wl, struct window_pane *wp)
 
struct format_treeformat_create_from_state (struct cmdq_item *item, struct client *c, struct cmd_find_state *fs)
 
struct format_treeformat_create_from_target (struct cmdq_item *item)
 
void format_defaults (struct format_tree *ft, struct client *c, struct session *s, struct winlink *wl, struct window_pane *wp)
 
void format_defaults_window (struct format_tree *ft, struct window *w)
 
void format_defaults_pane (struct format_tree *ft, struct window_pane *wp)
 
void format_defaults_paste_buffer (struct format_tree *ft, struct paste_buffer *pb)
 
char * format_grid_word (struct grid *gd, u_int x, u_int y)
 
char * format_grid_line (struct grid *gd, u_int y)
 

Variables

static const char * format_upper []
 
static const char * format_lower []
 
static const struct format_table_entry format_table []
 

Macro Definition Documentation

◆ FORMAT_BASENAME

#define FORMAT_BASENAME   0x2

Definition at line 88 of file format.c.

◆ FORMAT_CHARACTER

#define FORMAT_CHARACTER   0x10000

Definition at line 103 of file format.c.

◆ FORMAT_DIRNAME

#define FORMAT_DIRNAME   0x4

Definition at line 89 of file format.c.

◆ FORMAT_EXPAND

#define FORMAT_EXPAND   0x20

Definition at line 92 of file format.c.

◆ FORMAT_EXPAND_NOJOBS

#define FORMAT_EXPAND_NOJOBS   0x2

Definition at line 110 of file format.c.

◆ FORMAT_EXPAND_TIME

#define FORMAT_EXPAND_TIME   0x1

Definition at line 109 of file format.c.

◆ FORMAT_EXPANDTIME

#define FORMAT_EXPANDTIME   0x40

Definition at line 93 of file format.c.

◆ FORMAT_LENGTH

#define FORMAT_LENGTH   0x800

Definition at line 98 of file format.c.

◆ FORMAT_LITERAL

#define FORMAT_LITERAL   0x10

Definition at line 91 of file format.c.

◆ format_log

#define format_log (   es,
  fmt,
  ... 
)    format_log1(es, __func__, fmt, ##__VA_ARGS__)

Definition at line 266 of file format.c.

◆ FORMAT_LOOP_LIMIT

#define FORMAT_LOOP_LIMIT   100

Definition at line 106 of file format.c.

◆ FORMAT_PANES

#define FORMAT_PANES   0x200

Definition at line 96 of file format.c.

◆ FORMAT_PRETTY

#define FORMAT_PRETTY   0x400

Definition at line 97 of file format.c.

◆ FORMAT_QUOTE_SHELL

#define FORMAT_QUOTE_SHELL   0x8

Definition at line 90 of file format.c.

◆ FORMAT_QUOTE_STYLE

#define FORMAT_QUOTE_STYLE   0x2000

Definition at line 100 of file format.c.

◆ FORMAT_SESSION_NAME

#define FORMAT_SESSION_NAME   0x8000

Definition at line 102 of file format.c.

◆ FORMAT_SESSIONS

#define FORMAT_SESSIONS   0x80

Definition at line 94 of file format.c.

◆ FORMAT_TIMESTRING

#define FORMAT_TIMESTRING   0x1

Definition at line 87 of file format.c.

◆ FORMAT_WIDTH

#define FORMAT_WIDTH   0x1000

Definition at line 99 of file format.c.

◆ FORMAT_WINDOW_NAME

#define FORMAT_WINDOW_NAME   0x4000

Definition at line 101 of file format.c.

◆ FORMAT_WINDOWS

#define FORMAT_WINDOWS   0x100

Definition at line 95 of file format.c.

Enumeration Type Documentation

◆ format_table_type

Enumerator
FORMAT_TABLE_STRING 
FORMAT_TABLE_TIME 

Definition at line 2501 of file format.c.

◆ format_type

Enumerator
FORMAT_TYPE_UNKNOWN 
FORMAT_TYPE_SESSION 
FORMAT_TYPE_WINDOW 
FORMAT_TYPE_PANE 

Definition at line 122 of file format.c.

Function Documentation

◆ format_add()

◆ format_add_cb()

void format_add_cb ( struct format_tree ft,
const char *  key,
format_cb  cb 
)

◆ format_add_modifier()

static void format_add_modifier ( struct format_modifier **  list,
u_int *  count,
const char *  c,
size_t  n,
char **  argv,
int  argc 
)
static

◆ format_add_tv()

void format_add_tv ( struct format_tree ft,
const char *  key,
struct timeval *  tv 
)

◆ format_build_modifiers()

static struct format_modifier* format_build_modifiers ( struct format_expand_state es,
const char **  s,
u_int *  count 
)
static

◆ format_cb_active_window_index()

static void* format_cb_active_window_index ( struct format_tree ft)
static

Definition at line 2102 of file format.c.

References session::curw, format_printf(), winlink::idx, and format_tree::s.

◆ format_cb_alternate_on()

static void* format_cb_alternate_on ( struct format_tree ft)
static

Definition at line 1154 of file format.c.

References window_pane::base, screen::saved_grid, format_tree::wp, and xstrdup().

◆ format_cb_alternate_saved_x()

static void* format_cb_alternate_saved_x ( struct format_tree ft)
static

Definition at line 1166 of file format.c.

References window_pane::base, format_printf(), screen::saved_cx, and format_tree::wp.

◆ format_cb_alternate_saved_y()

static void* format_cb_alternate_saved_y ( struct format_tree ft)
static

Definition at line 1175 of file format.c.

References window_pane::base, format_printf(), screen::saved_cy, and format_tree::wp.

◆ format_cb_buffer_created()

static void* format_cb_buffer_created ( struct format_tree ft)
static

Definition at line 2406 of file format.c.

References paste_buffer_created(), and format_tree::pb.

◆ format_cb_buffer_mode_format()

static void* format_cb_buffer_mode_format ( struct format_tree ft)
static

Definition at line 2481 of file format.c.

References window_mode::default_format, window_buffer_mode, and xstrdup().

◆ format_cb_buffer_name()

static void* format_cb_buffer_name ( struct format_tree ft)
static

Definition at line 1184 of file format.c.

References paste_buffer_name(), format_tree::pb, and xstrdup().

◆ format_cb_buffer_sample()

static void* format_cb_buffer_sample ( struct format_tree ft)
static

Definition at line 1193 of file format.c.

References paste_make_sample(), and format_tree::pb.

◆ format_cb_buffer_size()

static void* format_cb_buffer_size ( struct format_tree ft)
static

Definition at line 1202 of file format.c.

References format_printf(), paste_buffer_data(), and format_tree::pb.

◆ format_cb_client_activity()

static void* format_cb_client_activity ( struct format_tree ft)
static

Definition at line 2420 of file format.c.

References client::activity_time, and format_tree::c.

◆ format_cb_client_cell_height()

static void* format_cb_client_cell_height ( struct format_tree ft)
static

Definition at line 1215 of file format.c.

References format_tree::c, tty::flags, format_printf(), client::tty, TTY_STARTED, and tty::ypixel.

◆ format_cb_client_cell_width()

static void* format_cb_client_cell_width ( struct format_tree ft)
static

Definition at line 1224 of file format.c.

References format_tree::c, tty::flags, format_printf(), client::tty, TTY_STARTED, and tty::xpixel.

◆ format_cb_client_control_mode()

static void* format_cb_client_control_mode ( struct format_tree ft)
static

Definition at line 1233 of file format.c.

References format_tree::c, CLIENT_CONTROL, client::flags, and xstrdup().

◆ format_cb_client_created()

static void* format_cb_client_created ( struct format_tree ft)
static

Definition at line 2429 of file format.c.

References format_tree::c, and client::creation_time.

◆ format_cb_client_discarded()

static void* format_cb_client_discarded ( struct format_tree ft)
static

Definition at line 1245 of file format.c.

References format_tree::c, client::discarded, and format_printf().

◆ format_cb_client_flags()

static void* format_cb_client_flags ( struct format_tree ft)
static

Definition at line 1254 of file format.c.

References format_tree::c, server_client_get_flags(), and xstrdup().

◆ format_cb_client_height()

static void* format_cb_client_height ( struct format_tree ft)
static

Definition at line 1263 of file format.c.

References format_tree::c, tty::flags, format_printf(), tty::sy, client::tty, and TTY_STARTED.

◆ format_cb_client_key_table()

static void* format_cb_client_key_table ( struct format_tree ft)
static

Definition at line 1272 of file format.c.

References format_tree::c, client::keytable, key_table::name, and xstrdup().

◆ format_cb_client_last_session()

static void* format_cb_client_last_session ( struct format_tree ft)
static

Definition at line 1281 of file format.c.

References format_tree::c, client::last_session, session::name, session_alive(), and xstrdup().

◆ format_cb_client_mode_format()

static void* format_cb_client_mode_format ( struct format_tree ft)
static

Definition at line 2488 of file format.c.

References window_mode::default_format, window_client_mode, and xstrdup().

◆ format_cb_client_name()

static void* format_cb_client_name ( struct format_tree ft)
static

Definition at line 1292 of file format.c.

References format_tree::c, client::name, and xstrdup().

◆ format_cb_client_pid()

static void* format_cb_client_pid ( struct format_tree ft)
static

Definition at line 1301 of file format.c.

References format_tree::c, format_printf(), and client::pid.

◆ format_cb_client_prefix()

static void* format_cb_client_prefix ( struct format_tree ft)
static

◆ format_cb_client_readonly()

static void* format_cb_client_readonly ( struct format_tree ft)
static

Definition at line 1325 of file format.c.

References format_tree::c, CLIENT_READONLY, client::flags, and xstrdup().

◆ format_cb_client_session()

static void* format_cb_client_session ( struct format_tree ft)
static

Definition at line 1337 of file format.c.

References format_tree::c, session::name, client::session, and xstrdup().

◆ format_cb_client_termfeatures()

static void* format_cb_client_termfeatures ( struct format_tree ft)
static

Definition at line 1346 of file format.c.

References format_tree::c, client::term_features, tty_get_features(), and xstrdup().

◆ format_cb_client_termname()

static void* format_cb_client_termname ( struct format_tree ft)
static

Definition at line 1355 of file format.c.

References format_tree::c, client::term_name, and xstrdup().

◆ format_cb_client_termtype()

static void* format_cb_client_termtype ( struct format_tree ft)
static

Definition at line 1364 of file format.c.

References format_tree::c, client::term_type, and xstrdup().

◆ format_cb_client_tty()

static void* format_cb_client_tty ( struct format_tree ft)
static

Definition at line 1376 of file format.c.

References format_tree::c, client::ttyname, and xstrdup().

◆ format_cb_client_utf8()

static void* format_cb_client_utf8 ( struct format_tree ft)
static

Definition at line 1385 of file format.c.

References format_tree::c, CLIENT_UTF8, client::flags, and xstrdup().

◆ format_cb_client_width()

static void* format_cb_client_width ( struct format_tree ft)
static

Definition at line 1397 of file format.c.

References format_tree::c, format_printf(), tty::sx, and client::tty.

◆ format_cb_client_written()

static void* format_cb_client_written ( struct format_tree ft)
static

Definition at line 1406 of file format.c.

References format_tree::c, format_printf(), and client::written.

◆ format_cb_config_files()

static void* format_cb_config_files ( struct format_tree ft)
static

Definition at line 1415 of file format.c.

References cfg_files, cfg_nfiles, xrealloc(), xsnprintf(), and xstrdup().

◆ format_cb_current_command()

static void* format_cb_current_command ( struct format_tree ft)
static

◆ format_cb_current_path()

static void* format_cb_current_path ( struct format_tree ft)
static

Definition at line 828 of file format.c.

References window_pane::cwd, window_pane::fd, osdep_get_cwd(), format_tree::wp, and xstrdup().

◆ format_cb_cursor_character()

static void* format_cb_cursor_character ( struct format_tree ft)
static

◆ format_cb_cursor_flag()

static void* format_cb_cursor_flag ( struct format_tree ft)
static

Definition at line 1435 of file format.c.

References window_pane::base, screen::mode, MODE_CURSOR, format_tree::wp, and xstrdup().

◆ format_cb_cursor_x()

static void* format_cb_cursor_x ( struct format_tree ft)
static

Definition at line 1447 of file format.c.

References window_pane::base, screen::cx, format_printf(), and format_tree::wp.

◆ format_cb_cursor_y()

static void* format_cb_cursor_y ( struct format_tree ft)
static

Definition at line 1456 of file format.c.

References window_pane::base, screen::cy, format_printf(), and format_tree::wp.

◆ format_cb_history_all_bytes()

static void* format_cb_history_all_bytes ( struct format_tree ft)
static

◆ format_cb_history_bytes()

static void* format_cb_history_bytes ( struct format_tree ft)
static

◆ format_cb_history_limit()

static void* format_cb_history_limit ( struct format_tree ft)
static

Definition at line 1465 of file format.c.

References window_pane::base, format_printf(), screen::grid, grid::hlimit, and format_tree::wp.

◆ format_cb_history_size()

static void* format_cb_history_size ( struct format_tree ft)
static

Definition at line 1474 of file format.c.

References window_pane::base, format_printf(), screen::grid, grid::hsize, and format_tree::wp.

◆ format_cb_host()

static void* format_cb_host ( struct format_tree ft)
static

Definition at line 476 of file format.c.

References HOST_NAME_MAX, and xstrdup().

◆ format_cb_host_short()

static void* format_cb_host_short ( struct format_tree ft)
static

Definition at line 487 of file format.c.

References HOST_NAME_MAX, and xstrdup().

◆ format_cb_insert_flag()

static void* format_cb_insert_flag ( struct format_tree ft)
static

Definition at line 1483 of file format.c.

References window_pane::base, screen::mode, MODE_INSERT, format_tree::wp, and xstrdup().

◆ format_cb_keypad_cursor_flag()

static void* format_cb_keypad_cursor_flag ( struct format_tree ft)
static

Definition at line 1495 of file format.c.

References window_pane::base, screen::mode, MODE_KCURSOR, format_tree::wp, and xstrdup().

◆ format_cb_keypad_flag()

static void* format_cb_keypad_flag ( struct format_tree ft)
static

Definition at line 1507 of file format.c.

References window_pane::base, screen::mode, MODE_KKEYPAD, format_tree::wp, and xstrdup().

◆ format_cb_last_window_index()

static void* format_cb_last_window_index ( struct format_tree ft)
static

Definition at line 2111 of file format.c.

References format_printf(), winlink::idx, format_tree::s, and session::windows.

◆ format_cb_mouse_all_flag()

static void* format_cb_mouse_all_flag ( struct format_tree ft)
static

Definition at line 1519 of file format.c.

References window_pane::base, screen::mode, MODE_MOUSE_ALL, format_tree::wp, and xstrdup().

◆ format_cb_mouse_any_flag()

static void* format_cb_mouse_any_flag ( struct format_tree ft)
static

Definition at line 1531 of file format.c.

References ALL_MOUSE_MODES, window_pane::base, screen::mode, format_tree::wp, and xstrdup().

◆ format_cb_mouse_button_flag()

static void* format_cb_mouse_button_flag ( struct format_tree ft)
static

Definition at line 1543 of file format.c.

References window_pane::base, screen::mode, MODE_MOUSE_BUTTON, format_tree::wp, and xstrdup().

◆ format_cb_mouse_line()

◆ format_cb_mouse_pane()

static void* format_cb_mouse_pane ( struct format_tree ft)
static

◆ format_cb_mouse_sgr_flag()

static void* format_cb_mouse_sgr_flag ( struct format_tree ft)
static

Definition at line 1570 of file format.c.

References window_pane::base, screen::mode, MODE_MOUSE_SGR, format_tree::wp, and xstrdup().

◆ format_cb_mouse_standard_flag()

static void* format_cb_mouse_standard_flag ( struct format_tree ft)
static

Definition at line 1582 of file format.c.

References window_pane::base, screen::mode, MODE_MOUSE_STANDARD, format_tree::wp, and xstrdup().

◆ format_cb_mouse_utf8_flag()

static void* format_cb_mouse_utf8_flag ( struct format_tree ft)
static

Definition at line 1594 of file format.c.

References window_pane::base, screen::mode, MODE_MOUSE_UTF8, format_tree::wp, and xstrdup().

◆ format_cb_mouse_word()

◆ format_cb_mouse_x()

static void* format_cb_mouse_x ( struct format_tree ft)
static

◆ format_cb_mouse_y()

static void* format_cb_mouse_y ( struct format_tree ft)
static

◆ format_cb_origin_flag()

static void* format_cb_origin_flag ( struct format_tree ft)
static

Definition at line 1638 of file format.c.

References window_pane::base, screen::mode, MODE_ORIGIN, format_tree::wp, and xstrdup().

◆ format_cb_pane_active()

static void* format_cb_pane_active ( struct format_tree ft)
static

Definition at line 1650 of file format.c.

References window::active, window_pane::window, format_tree::wp, and xstrdup().

◆ format_cb_pane_at_bottom()

static void* format_cb_pane_at_bottom ( struct format_tree ft)
static

◆ format_cb_pane_at_left()

static void* format_cb_pane_at_left ( struct format_tree ft)
static

Definition at line 1662 of file format.c.

References format_tree::wp, window_pane::xoff, and xstrdup().

◆ format_cb_pane_at_right()

static void* format_cb_pane_at_right ( struct format_tree ft)
static

◆ format_cb_pane_at_top()

static void* format_cb_pane_at_top ( struct format_tree ft)
static

◆ format_cb_pane_bg()

static void* format_cb_pane_bg ( struct format_tree ft)
static

◆ format_cb_pane_bottom()

static void* format_cb_pane_bottom ( struct format_tree ft)
static

Definition at line 1686 of file format.c.

References format_printf(), window_pane::sy, format_tree::wp, and window_pane::yoff.

◆ format_cb_pane_dead()

static void* format_cb_pane_dead ( struct format_tree ft)
static

Definition at line 1695 of file format.c.

References window_pane::fd, format_tree::wp, and xstrdup().

◆ format_cb_pane_dead_status()

static void* format_cb_pane_dead_status ( struct format_tree ft)
static

◆ format_cb_pane_fg()

static void* format_cb_pane_fg ( struct format_tree ft)
static

◆ format_cb_pane_format()

static void* format_cb_pane_format ( struct format_tree ft)
static

Definition at line 1721 of file format.c.

References FORMAT_TYPE_PANE, format_tree::type, and xstrdup().

◆ format_cb_pane_height()

static void* format_cb_pane_height ( struct format_tree ft)
static

Definition at line 1730 of file format.c.

References format_printf(), window_pane::sy, and format_tree::wp.

◆ format_cb_pane_id()

static void* format_cb_pane_id ( struct format_tree ft)
static

Definition at line 1739 of file format.c.

References format_printf(), window_pane::id, and format_tree::wp.

◆ format_cb_pane_in_mode()

static void* format_cb_pane_in_mode ( struct format_tree ft)
static

Definition at line 1022 of file format.c.

References format_tree::wp, window_mode_entry::wp, and xasprintf().

◆ format_cb_pane_index()

static void* format_cb_pane_index ( struct format_tree ft)
static

Definition at line 1748 of file format.c.

References format_printf(), window_pane_index(), and format_tree::wp.

◆ format_cb_pane_input_off()

static void* format_cb_pane_input_off ( struct format_tree ft)
static

Definition at line 1759 of file format.c.

References window_pane::flags, PANE_INPUTOFF, format_tree::wp, and xstrdup().

◆ format_cb_pane_last()

static void* format_cb_pane_last ( struct format_tree ft)
static

Definition at line 1771 of file format.c.

References window::last, window_pane::window, format_tree::wp, and xstrdup().

◆ format_cb_pane_left()

static void* format_cb_pane_left ( struct format_tree ft)
static

Definition at line 1783 of file format.c.

References format_printf(), format_tree::wp, and window_pane::xoff.

◆ format_cb_pane_marked()

static void* format_cb_pane_marked ( struct format_tree ft)
static

◆ format_cb_pane_marked_set()

static void* format_cb_pane_marked_set ( struct format_tree ft)
static

Definition at line 1804 of file format.c.

References server_check_marked(), format_tree::wp, and xstrdup().

◆ format_cb_pane_mode()

static void* format_cb_pane_mode ( struct format_tree ft)
static

Definition at line 1816 of file format.c.

References window_mode_entry::mode, window_mode::name, format_tree::wp, and xstrdup().

◆ format_cb_pane_path()

static void* format_cb_pane_path ( struct format_tree ft)
static

Definition at line 1831 of file format.c.

References window_pane::base, screen::path, format_tree::wp, and xstrdup().

◆ format_cb_pane_pid()

static void* format_cb_pane_pid ( struct format_tree ft)
static

Definition at line 1843 of file format.c.

References format_printf(), window_pane::pid, and format_tree::wp.

◆ format_cb_pane_pipe()

static void* format_cb_pane_pipe ( struct format_tree ft)
static

Definition at line 1852 of file format.c.

References window_pane::pipe_fd, format_tree::wp, and xstrdup().

◆ format_cb_pane_right()

static void* format_cb_pane_right ( struct format_tree ft)
static

Definition at line 1864 of file format.c.

References format_printf(), window_pane::sx, format_tree::wp, and window_pane::xoff.

◆ format_cb_pane_search_string()

static void* format_cb_pane_search_string ( struct format_tree ft)
static

Definition at line 1873 of file format.c.

References window_pane::searchstr, format_tree::wp, and xstrdup().

◆ format_cb_pane_synchronized()

static void* format_cb_pane_synchronized ( struct format_tree ft)
static

Definition at line 1885 of file format.c.

References window_pane::options, options_get_number(), format_tree::wp, and xstrdup().

◆ format_cb_pane_tabs()

static void* format_cb_pane_tabs ( struct format_tree ft)
static

◆ format_cb_pane_title()

static void* format_cb_pane_title ( struct format_tree ft)
static

Definition at line 1897 of file format.c.

References window_pane::base, screen::title, format_tree::wp, and xstrdup().

◆ format_cb_pane_top()

static void* format_cb_pane_top ( struct format_tree ft)
static

Definition at line 1906 of file format.c.

References format_printf(), format_tree::wp, and window_pane::yoff.

◆ format_cb_pane_tty()

static void* format_cb_pane_tty ( struct format_tree ft)
static

Definition at line 1915 of file format.c.

References window_pane::tty, format_tree::wp, and xstrdup().

◆ format_cb_pane_width()

static void* format_cb_pane_width ( struct format_tree ft)
static

Definition at line 1924 of file format.c.

References format_printf(), window_pane::sx, and format_tree::wp.

◆ format_cb_pid()

static void* format_cb_pid ( struct format_tree ft)
static

Definition at line 500 of file format.c.

References xasprintf().

◆ format_cb_scroll_region_lower()

static void* format_cb_scroll_region_lower ( struct format_tree ft)
static

Definition at line 1933 of file format.c.

References window_pane::base, format_printf(), screen::rlower, and format_tree::wp.

◆ format_cb_scroll_region_upper()

static void* format_cb_scroll_region_upper ( struct format_tree ft)
static

Definition at line 1942 of file format.c.

References window_pane::base, format_printf(), screen::rupper, and format_tree::wp.

◆ format_cb_session_activity()

static void* format_cb_session_activity ( struct format_tree ft)
static

Definition at line 2438 of file format.c.

References session::activity_time, and format_tree::s.

◆ format_cb_session_alerts()

static void* format_cb_session_alerts ( struct format_tree ft)
static

◆ format_cb_session_attached()

static void* format_cb_session_attached ( struct format_tree ft)
static

Definition at line 1951 of file format.c.

References session::attached, format_printf(), and format_tree::s.

◆ format_cb_session_attached_list()

static void* format_cb_session_attached_list ( struct format_tree ft)
static

Definition at line 510 of file format.c.

References clients, fatalx(), client::name, format_tree::s, client::session, and xasprintf().

◆ format_cb_session_created()

static void* format_cb_session_created ( struct format_tree ft)
static

Definition at line 2447 of file format.c.

References session::creation_time, and format_tree::s.

◆ format_cb_session_format()

static void* format_cb_session_format ( struct format_tree ft)
static

Definition at line 1960 of file format.c.

References FORMAT_TYPE_SESSION, format_tree::type, and xstrdup().

◆ format_cb_session_group()

static void* format_cb_session_group ( struct format_tree ft)
static

Definition at line 1969 of file format.c.

References session_group::name, format_tree::s, session_group_contains(), and xstrdup().

◆ format_cb_session_group_attached()

static void* format_cb_session_group_attached ( struct format_tree ft)
static

◆ format_cb_session_group_attached_list()

static void* format_cb_session_group_attached_list ( struct format_tree ft)
static

◆ format_cb_session_group_list()

static void* format_cb_session_group_list ( struct format_tree ft)
static

Definition at line 949 of file format.c.

References fatalx(), session::name, format_tree::s, session_group_contains(), and xasprintf().

◆ format_cb_session_group_many_attached()

static void* format_cb_session_group_many_attached ( struct format_tree ft)
static

◆ format_cb_session_group_size()

static void* format_cb_session_group_size ( struct format_tree ft)
static

◆ format_cb_session_grouped()

static void* format_cb_session_grouped ( struct format_tree ft)
static

Definition at line 2016 of file format.c.

References format_tree::s, session_group_contains(), and xstrdup().

◆ format_cb_session_id()

static void* format_cb_session_id ( struct format_tree ft)
static

Definition at line 2028 of file format.c.

References format_printf(), session::id, and format_tree::s.

◆ format_cb_session_last_attached()

static void* format_cb_session_last_attached ( struct format_tree ft)
static

Definition at line 2456 of file format.c.

References session::last_attached_time, and format_tree::s.

◆ format_cb_session_many_attached()

static void* format_cb_session_many_attached ( struct format_tree ft)
static

Definition at line 2037 of file format.c.

References session::attached, format_tree::s, and xstrdup().

◆ format_cb_session_marked()

static void* format_cb_session_marked ( struct format_tree ft)
static

Definition at line 2049 of file format.c.

References marked_pane, format_tree::s, cmd_find_state::s, server_check_marked(), and xstrdup().

◆ format_cb_session_name()

static void* format_cb_session_name ( struct format_tree ft)
static

Definition at line 2061 of file format.c.

References session::name, format_tree::s, and xstrdup().

◆ format_cb_session_path()

static void* format_cb_session_path ( struct format_tree ft)
static

Definition at line 2070 of file format.c.

References session::cwd, format_tree::s, and xstrdup().

◆ format_cb_session_stack()

static void* format_cb_session_stack ( struct format_tree ft)
static

◆ format_cb_session_windows()

static void* format_cb_session_windows ( struct format_tree ft)
static

Definition at line 2079 of file format.c.

References format_printf(), format_tree::s, session::windows, and winlink_count().

◆ format_cb_socket_path()

static void* format_cb_socket_path ( struct format_tree ft)
static

Definition at line 2088 of file format.c.

References socket_path, and xstrdup().

◆ format_cb_start_command()

static void* format_cb_start_command ( struct format_tree ft)
static

Definition at line 792 of file format.c.

References window_pane::argc, window_pane::argv, cmd_stringify_argv(), and format_tree::wp.

◆ format_cb_start_time()

static void* format_cb_start_time ( struct format_tree ft)
static

Definition at line 2465 of file format.c.

References start_time.

◆ format_cb_tree_mode_format()

static void* format_cb_tree_mode_format ( struct format_tree ft)
static

Definition at line 2495 of file format.c.

References window_mode::default_format, window_tree_mode, and xstrdup().

◆ format_cb_version()

static void* format_cb_version ( struct format_tree ft)
static

Definition at line 2095 of file format.c.

References getversion(), and xstrdup().

◆ format_cb_window_active()

static void* format_cb_window_active ( struct format_tree ft)
static

Definition at line 2124 of file format.c.

References session::curw, winlink::session, format_tree::wl, and xstrdup().

◆ format_cb_window_active_clients()

static void* format_cb_window_active_clients ( struct format_tree ft)
static

Definition at line 702 of file format.c.

References clients, session::curw, client::session, winlink::window, format_tree::wl, and xasprintf().

◆ format_cb_window_active_clients_list()

static void* format_cb_window_active_clients_list ( struct format_tree ft)
static

◆ format_cb_window_active_sessions()

static void* format_cb_window_active_sessions ( struct format_tree ft)
static

Definition at line 648 of file format.c.

References session::curw, winlink::session, winlink::window, format_tree::wl, and xasprintf().

◆ format_cb_window_active_sessions_list()

static void* format_cb_window_active_sessions_list ( struct format_tree ft)
static

◆ format_cb_window_activity()

static void* format_cb_window_activity ( struct format_tree ft)
static

Definition at line 2472 of file format.c.

References window::activity_time, and format_tree::w.

◆ format_cb_window_activity_flag()

static void* format_cb_window_activity_flag ( struct format_tree ft)
static

Definition at line 2136 of file format.c.

References winlink::flags, WINLINK_ACTIVITY, format_tree::wl, and xstrdup().

◆ format_cb_window_bell_flag()

static void* format_cb_window_bell_flag ( struct format_tree ft)
static

Definition at line 2148 of file format.c.

References winlink::flags, WINLINK_BELL, format_tree::wl, and xstrdup().

◆ format_cb_window_bigger()

static void* format_cb_window_bigger ( struct format_tree ft)
static

Definition at line 2160 of file format.c.

References format_tree::c, client::tty, tty_window_offset(), and xstrdup().

◆ format_cb_window_cell_height()

static void* format_cb_window_cell_height ( struct format_tree ft)
static

Definition at line 2174 of file format.c.

References format_printf(), format_tree::w, and window::ypixel.

◆ format_cb_window_cell_width()

static void* format_cb_window_cell_width ( struct format_tree ft)
static

Definition at line 2183 of file format.c.

References format_printf(), format_tree::w, and window::xpixel.

◆ format_cb_window_end_flag()

static void* format_cb_window_end_flag ( struct format_tree ft)
static

Definition at line 2192 of file format.c.

References winlink::session, session::windows, format_tree::wl, and xstrdup().

◆ format_cb_window_flags()

static void* format_cb_window_flags ( struct format_tree ft)
static

Definition at line 2204 of file format.c.

References window_printable_flags(), format_tree::wl, and xstrdup().

◆ format_cb_window_format()

static void* format_cb_window_format ( struct format_tree ft)
static

Definition at line 2213 of file format.c.

References FORMAT_TYPE_WINDOW, format_tree::type, and xstrdup().

◆ format_cb_window_height()

static void* format_cb_window_height ( struct format_tree ft)
static

Definition at line 2222 of file format.c.

References format_printf(), window::sy, and format_tree::w.

◆ format_cb_window_id()

static void* format_cb_window_id ( struct format_tree ft)
static

Definition at line 2231 of file format.c.

References format_printf(), window::id, and format_tree::w.

◆ format_cb_window_index()

static void* format_cb_window_index ( struct format_tree ft)
static

Definition at line 2240 of file format.c.

References format_printf(), winlink::idx, and format_tree::wl.

◆ format_cb_window_last_flag()

static void* format_cb_window_last_flag ( struct format_tree ft)
static

Definition at line 2249 of file format.c.

References session::lastw, winlink::session, format_tree::wl, and xstrdup().

◆ format_cb_window_layout()

static void* format_cb_window_layout ( struct format_tree ft)
static

◆ format_cb_window_linked()

static void* format_cb_window_linked ( struct format_tree ft)
static

◆ format_cb_window_linked_sessions()

static void* format_cb_window_linked_sessions ( struct format_tree ft)
static

Definition at line 2273 of file format.c.

References format_printf(), window::references, winlink::window, and format_tree::wl.

◆ format_cb_window_linked_sessions_list()

static void* format_cb_window_linked_sessions_list ( struct format_tree ft)
static

◆ format_cb_window_marked_flag()

static void* format_cb_window_marked_flag ( struct format_tree ft)
static

◆ format_cb_window_name()

static void* format_cb_window_name ( struct format_tree ft)
static

Definition at line 2294 of file format.c.

References format_printf(), window::name, and format_tree::w.

◆ format_cb_window_offset_x()

static void* format_cb_window_offset_x ( struct format_tree ft)
static

Definition at line 2303 of file format.c.

References format_tree::c, format_printf(), client::tty, and tty_window_offset().

◆ format_cb_window_offset_y()

static void* format_cb_window_offset_y ( struct format_tree ft)
static

Definition at line 2317 of file format.c.

References format_tree::c, format_printf(), client::tty, and tty_window_offset().

◆ format_cb_window_panes()

static void* format_cb_window_panes ( struct format_tree ft)
static

Definition at line 2331 of file format.c.

References format_printf(), format_tree::w, and window_count_panes().

◆ format_cb_window_raw_flags()

static void* format_cb_window_raw_flags ( struct format_tree ft)
static

Definition at line 2340 of file format.c.

References window_printable_flags(), format_tree::wl, and xstrdup().

◆ format_cb_window_silence_flag()

static void* format_cb_window_silence_flag ( struct format_tree ft)
static

Definition at line 2349 of file format.c.

References winlink::flags, WINLINK_SILENCE, format_tree::wl, and xstrdup().

◆ format_cb_window_stack_index()

static void* format_cb_window_stack_index ( struct format_tree ft)
static

◆ format_cb_window_start_flag()

static void* format_cb_window_start_flag ( struct format_tree ft)
static

Definition at line 2361 of file format.c.

References winlink::session, session::windows, format_tree::wl, and xstrdup().

◆ format_cb_window_visible_layout()

static void* format_cb_window_visible_layout ( struct format_tree ft)
static

Definition at line 780 of file format.c.

References layout_dump(), window::layout_root, and format_tree::w.

◆ format_cb_window_width()

static void* format_cb_window_width ( struct format_tree ft)
static

Definition at line 2373 of file format.c.

References format_printf(), window::sx, and format_tree::w.

◆ format_cb_window_zoomed_flag()

static void* format_cb_window_zoomed_flag ( struct format_tree ft)
static

Definition at line 2382 of file format.c.

References window::flags, format_tree::w, WINDOW_ZOOMED, and xstrdup().

◆ format_cb_wrap_flag()

static void* format_cb_wrap_flag ( struct format_tree ft)
static

Definition at line 2394 of file format.c.

References window_pane::base, screen::mode, MODE_WRAP, format_tree::wp, and xstrdup().

◆ format_choose()

static int format_choose ( struct format_expand_state es,
const char *  s,
char **  left,
char **  right,
int  expand 
)
static

◆ format_copy_state()

◆ format_create()

◆ format_create_add_item()

static void format_create_add_item ( struct format_tree ft,
struct cmdq_item item 
)
static

Definition at line 3031 of file format.c.

References cmdq_get_event(), cmdq_merge_formats(), and format_tree::m.

Referenced by format_create().

◆ format_create_defaults()

◆ format_create_from_state()

◆ format_create_from_target()

struct format_tree* format_create_from_target ( struct cmdq_item item)

Definition at line 4675 of file format.c.

References cmdq_get_target(), cmdq_get_target_client(), and format_create_from_state().

Referenced by cmd_display_menu_exec().

◆ format_defaults()

◆ format_defaults_client()

static void format_defaults_client ( struct format_tree ft,
struct client c 
)
static

Definition at line 4748 of file format.c.

References format_tree::c, format_tree::s, and client::session.

Referenced by format_defaults().

◆ format_defaults_pane()

void format_defaults_pane ( struct format_tree ft,
struct window_pane wp 
)

◆ format_defaults_paste_buffer()

void format_defaults_paste_buffer ( struct format_tree ft,
struct paste_buffer pb 
)

Definition at line 4788 of file format.c.

References format_tree::pb.

Referenced by format_defaults(), window_buffer_build(), and window_buffer_get_key().

◆ format_defaults_session()

static void format_defaults_session ( struct format_tree ft,
struct session s 
)
static

Definition at line 4741 of file format.c.

References format_tree::s.

Referenced by format_defaults().

◆ format_defaults_window()

void format_defaults_window ( struct format_tree ft,
struct window w 
)

Definition at line 4757 of file format.c.

References format_tree::w.

Referenced by format_defaults_pane(), format_defaults_winlink(), and format_window_name().

◆ format_defaults_winlink()

static void format_defaults_winlink ( struct format_tree ft,
struct winlink wl 
)
static

Definition at line 4764 of file format.c.

References format_defaults_window(), format_tree::w, winlink::window, and format_tree::wl.

Referenced by format_defaults().

◆ format_each()

void format_each ( struct format_tree ft,
void(*)(const char *, const char *, void *)  cb,
void *  arg 
)

◆ format_entry_cmp()

static int format_entry_cmp ( struct format_entry fe1,
struct format_entry fe2 
)
static

Definition at line 171 of file format.c.

References format_entry::key.

◆ format_expand()

◆ format_expand1()

◆ format_expand_time()

char* format_expand_time ( struct format_tree ft,
const char *  fmt 
)

◆ format_find()

◆ format_free()

◆ format_free_modifiers()

static void format_free_modifiers ( struct format_modifier list,
u_int  count 
)
static

Definition at line 3505 of file format.c.

References format_modifier::argc, format_modifier::argv, and cmd_free_argv().

Referenced by format_build_modifiers(), and format_replace().

◆ format_get_pane()

struct window_pane* format_get_pane ( struct format_tree ft)

◆ format_grid_line()

char* format_grid_line ( struct grid gd,
u_int  y 
)

◆ format_grid_word()

◆ format_is_end()

static int format_is_end ( char  c)
static

Definition at line 3480 of file format.c.

Referenced by format_build_modifiers().

◆ format_job_cmp()

static int format_job_cmp ( struct format_job ,
struct format_job  
)
static

◆ format_job_complete()

static void format_job_complete ( struct job job)
static

◆ format_job_get()

◆ format_job_tidy()

static void format_job_tidy ( struct format_job_tree *  jobs,
int  force 
)
static

◆ format_job_update()

static void format_job_update ( struct job job)
static

◆ format_log1()

static void format_log1 ( struct format_expand_state es,
const char *  from,
const char *  fmt,
  ... 
)
static

◆ format_logging()

static int format_logging ( struct format_tree ft)
inlinestatic

Definition at line 238 of file format.c.

References format_tree::flags, FORMAT_VERBOSE, and log_get_level().

Referenced by format_expand1(), format_log1(), and format_replace().

◆ format_loop_panes()

◆ format_loop_sessions()

◆ format_loop_windows()

◆ format_lost_client()

void format_lost_client ( struct client c)

Definition at line 454 of file format.c.

References format_job_tidy(), and client::jobs.

Referenced by server_client_lost().

◆ format_match()

static char* format_match ( struct format_modifier fm,
const char *  pattern,
const char *  text 
)
static

Definition at line 3627 of file format.c.

References format_modifier::argc, format_modifier::argv, FNM_CASEFOLD, and xstrdup().

Referenced by format_replace().

◆ format_merge()

void format_merge ( struct format_tree ft,
struct format_tree from 
)

Definition at line 3012 of file format.c.

References format_add(), format_entry::key, and format_entry::value.

Referenced by cmdq_merge_formats().

◆ format_pretty_time()

static char* format_pretty_time ( time_t  t)
static

Definition at line 3234 of file format.c.

References xstrdup().

Referenced by format_find().

◆ format_printf()

◆ format_quote_shell()

static char* format_quote_shell ( const char *  s)
static

Definition at line 3200 of file format.c.

References xmalloc().

Referenced by format_find().

◆ format_quote_style()

static char* format_quote_style ( const char *  s)
static

Definition at line 3217 of file format.c.

References xmalloc().

Referenced by format_find().

◆ format_replace()

◆ format_replace_expression()

static char* format_replace_expression ( struct format_modifier mexp,
struct format_expand_state es,
const char *  copy 
)
static

◆ format_search()

static char* format_search ( struct format_modifier fm,
struct window_pane wp,
const char *  s 
)
static

Definition at line 3673 of file format.c.

References format_modifier::argc, format_modifier::argv, window_pane_search(), and xasprintf().

Referenced by format_replace().

◆ format_session_name()

static char* format_session_name ( struct format_expand_state es,
const char *  fmt 
)
static

Definition at line 3690 of file format.c.

References format_expand1(), name, session::name, sessions, and xstrdup().

Referenced by format_replace().

◆ format_single()

◆ format_single_from_state()

char* format_single_from_state ( struct cmdq_item item,
const char *  fmt,
struct client c,
struct cmd_find_state fs 
)

◆ format_single_from_target()

char* format_single_from_target ( struct cmdq_item item,
const char *  fmt 
)

◆ format_skip()

const char* format_skip ( const char *  s,
const char *  end 
)

◆ format_strip()

static char* format_strip ( const char *  s)
static

Definition at line 3398 of file format.c.

References xmalloc().

Referenced by format_replace().

◆ format_sub()

static char* format_sub ( struct format_modifier fm,
const char *  text,
const char *  pattern,
const char *  with 
)
static

Definition at line 3657 of file format.c.

References format_modifier::argc, format_modifier::argv, regsub(), and xstrdup().

Referenced by format_replace().

◆ format_table_compare()

static int format_table_compare ( const void *  key0,
const void *  entry0 
)
static

Definition at line 2994 of file format.c.

References format_table_entry::key, and key.

Referenced by format_table_get().

◆ format_table_get()

static struct format_table_entry* format_table_get ( const char *  key)
static

Definition at line 3004 of file format.c.

References format_table, format_table_compare(), key, and nitems.

Referenced by format_find().

◆ format_tidy_jobs()

void format_tidy_jobs ( void  )

Definition at line 441 of file format.c.

References clients, format_job_tidy(), and client::jobs.

Referenced by server_tidy_event().

◆ format_true()

◆ format_window_name()

static char* format_window_name ( struct format_expand_state es,
const char *  fmt 
)
static

◆ RB_GENERATE_STATIC()

RB_GENERATE_STATIC ( format_entry_tree  ,
format_entry  ,
entry  ,
format_entry_cmp   
)

◆ RB_HEAD()

static RB_HEAD ( RB_GENERATE_STATIC format_job_tree,
RB_GENERATE_STATIC format_job 
)
static

Definition at line 72 of file format.c.

Variable Documentation

◆ format_lower

const char* format_lower[]
static
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"host_short",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
}

Definition at line 207 of file format.c.

Referenced by format_expand1().

◆ format_table

const struct format_table_entry format_table[]
static

Definition at line 2495 of file format.c.

Referenced by format_each(), and format_table_get().

◆ format_upper

const char* format_upper[]
static
Initial value:
= {
NULL,
NULL,
NULL,
"pane_id",
NULL,
"window_flags",
NULL,
"host",
"window_index",
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
"pane_index",
NULL,
NULL,
"session_name",
"pane_title",
NULL,
NULL,
"window_name",
NULL,
NULL,
NULL
}

Definition at line 177 of file format.c.

Referenced by format_expand1().