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)  

tmux.c File Reference
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/utsname.h>
#include <errno.h>
#include <fcntl.h>
#include <langinfo.h>
#include <locale.h>
#include <pwd.h>
#include <signal.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#include "tmux.h"
Include dependency graph for tmux.c:

Go to the source code of this file.

Functions

static void usage (void)
 
static char * make_label (const char *, char **)
 
static int areshell (const char *)
 
static const char * getshell (void)
 
int checkshell (const char *shell)
 
static char * expand_path (const char *path, const char *home)
 
static void expand_paths (const char *s, char ***paths, u_int *n, int ignore_errors)
 
void setblocking (int fd, int state)
 
uint64_t get_timer (void)
 
const char * sig2name (int signo)
 
const char * find_cwd (void)
 
const char * find_home (void)
 
const char * getversion (void)
 
int main (int argc, char **argv)
 

Variables

struct optionsglobal_options
 
struct optionsglobal_s_options
 
struct optionsglobal_w_options
 
struct environglobal_environ
 
struct timeval start_time
 
const char * socket_path
 
int ptm_fd = -1
 
const char * shell_command
 

Function Documentation

◆ areshell()

static int areshell ( const char *  shell)
static

Definition at line 92 of file tmux.c.

References getprogname().

Referenced by checkshell().

◆ checkshell()

int checkshell ( const char *  shell)

◆ expand_path()

static char* expand_path ( const char *  path,
const char *  home 
)
static

Definition at line 109 of file tmux.c.

References environ_find(), global_environ, name, environ_entry::value, xasprintf(), xstrdup(), and xstrndup().

Referenced by expand_paths().

◆ expand_paths()

static void expand_paths ( const char *  s,
char ***  paths,
u_int *  n,
int  ignore_errors 
)
static

Definition at line 142 of file tmux.c.

References expand_path(), find_home(), log_debug(), strsep(), xreallocarray(), and xstrdup().

Referenced by main(), and make_label().

◆ find_cwd()

const char* find_cwd ( void  )

Definition at line 274 of file tmux.c.

Referenced by client_main(), and main().

◆ find_home()

const char* find_home ( void  )

◆ get_timer()

◆ getshell()

static const char * getshell ( void  )
static

Definition at line 63 of file tmux.c.

References _PATH_BSHELL, and checkshell().

Referenced by main().

◆ getversion()

const char* getversion ( void  )

Definition at line 320 of file tmux.c.

Referenced by environ_for_session(), format_cb_version(), input_csi_dispatch(), main(), and proc_start().

◆ main()

◆ make_label()

static char * make_label ( const char *  label,
char **  cause 
)
static

Definition at line 187 of file tmux.c.

References expand_paths(), TMUX_SOCK, and xasprintf().

Referenced by main().

◆ setblocking()

void setblocking ( int  fd,
int  state 
)

◆ sig2name()

const char* sig2name ( int  signo)

Definition at line 261 of file tmux.c.

References xsnprintf().

Referenced by server_destroy_pane().

◆ usage()

static void usage ( void  )
static

Definition at line 53 of file tmux.c.

References getprogname().

Referenced by cmd_parse(), and main().

Variable Documentation

◆ global_environ

◆ global_options

◆ global_s_options

◆ global_w_options

◆ ptm_fd

int ptm_fd = -1

Definition at line 43 of file tmux.c.

Referenced by client_main(), main(), and spawn_pane().

◆ shell_command

const char * shell_command

Definition at line 44 of file tmux.c.

Referenced by client_dispatch_wait(), client_main(), and main().

◆ socket_path

const char* socket_path

◆ start_time

struct timeval start_time

Definition at line 39 of file tmux.c.

Referenced by format_cb_start_time(), and server_start().