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)  

paste.c File Reference
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "tmux.h"
Include dependency graph for paste.c:

Go to the source code of this file.

Data Structures

struct  paste_buffer
 

Functions

static RB_HEAD (RB_GENERATE_STATIC(paste_name_tree, RB_GENERATE_STATIC(paste_buffer)
 
static int paste_cmp_times (const struct paste_buffer *a, const struct paste_buffer *b)
 
const char * paste_buffer_name (struct paste_buffer *pb)
 
u_int paste_buffer_order (struct paste_buffer *pb)
 
time_t paste_buffer_created (struct paste_buffer *pb)
 
const char * paste_buffer_data (struct paste_buffer *pb, size_t *size)
 
struct paste_bufferpaste_walk (struct paste_buffer *pb)
 
struct paste_bufferpaste_get_top (const char **name)
 
struct paste_bufferpaste_get_name (const char *name)
 
void paste_free (struct paste_buffer *pb)
 
void paste_add (const char *prefix, char *data, size_t size)
 
int paste_rename (const char *oldname, const char *newname, char **cause)
 
int paste_set (char *data, size_t size, const char *name, char **cause)
 
void paste_replace (struct paste_buffer *pb, char *data, size_t size)
 
char * paste_make_sample (struct paste_buffer *pb)
 

Variables

static u_int paste_next_index
 
static u_int paste_next_order
 
static u_int paste_num_automatic
 

Function Documentation

◆ paste_add()

◆ paste_buffer_created()

time_t paste_buffer_created ( struct paste_buffer pb)

Definition at line 91 of file paste.c.

References paste_buffer::created.

Referenced by format_cb_buffer_created().

◆ paste_buffer_data()

◆ paste_buffer_name()

const char* paste_buffer_name ( struct paste_buffer pb)

Definition at line 77 of file paste.c.

References paste_buffer::name.

Referenced by format_cb_buffer_name(), window_buffer_build(), and window_buffer_start_edit().

◆ paste_buffer_order()

u_int paste_buffer_order ( struct paste_buffer pb)

Definition at line 84 of file paste.c.

References paste_buffer::order.

Referenced by window_buffer_build().

◆ paste_cmp_times()

static int paste_cmp_times ( const struct paste_buffer a,
const struct paste_buffer b 
)
static

Definition at line 66 of file paste.c.

References paste_buffer::order.

◆ paste_free()

void paste_free ( struct paste_buffer pb)

◆ paste_get_name()

◆ paste_get_top()

struct paste_buffer* paste_get_top ( const char **  name)

◆ paste_make_sample()

char* paste_make_sample ( struct paste_buffer pb)

Definition at line 310 of file paste.c.

References paste_buffer::data, paste_buffer::size, strlcpy(), utf8_strvis(), and xreallocarray().

Referenced by format_cb_buffer_sample().

◆ paste_rename()

int paste_rename ( const char *  oldname,
const char *  newname,
char **  cause 
)

◆ paste_replace()

void paste_replace ( struct paste_buffer pb,
char *  data,
size_t  size 
)

Definition at line 301 of file paste.c.

References paste_buffer::data, and paste_buffer::size.

Referenced by window_buffer_edit_close_cb().

◆ paste_set()

int paste_set ( char *  data,
size_t  size,
const char *  name,
char **  cause 
)

◆ paste_walk()

struct paste_buffer* paste_walk ( struct paste_buffer pb)

Definition at line 107 of file paste.c.

Referenced by window_buffer_build().

◆ RB_HEAD()

static RB_HEAD ( RB_GENERATE_STATIC paste_name_tree,
RB_GENERATE_STATIC paste_buffer 
)
static

Definition at line 48 of file paste.c.

Variable Documentation

◆ paste_next_index

u_int paste_next_index
static

Definition at line 45 of file paste.c.

Referenced by paste_add().

◆ paste_next_order

u_int paste_next_order
static

Definition at line 46 of file paste.c.

Referenced by paste_add(), and paste_set().

◆ paste_num_automatic

u_int paste_num_automatic
static

Definition at line 47 of file paste.c.

Referenced by paste_add(), paste_free(), and paste_rename().