Linux Perf
strbuf.h File Reference
#include <assert.h>
#include <stdarg.h>
#include <stddef.h>
#include <string.h>
#include <linux/compiler.h>
#include <sys/types.h>
Include dependency graph for strbuf.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  strbuf
 

Macros

#define STRBUF_INIT   { 0, 0, strbuf_slopbuf }
 

Functions

int strbuf_init (struct strbuf *buf, ssize_t hint)
 
void strbuf_release (struct strbuf *buf)
 
char * strbuf_detach (struct strbuf *buf, size_t *)
 
static ssize_t strbuf_avail (const struct strbuf *sb)
 
int strbuf_grow (struct strbuf *buf, size_t)
 
static int strbuf_setlen (struct strbuf *sb, size_t len)
 
int strbuf_addch (struct strbuf *sb, int c)
 
int strbuf_add (struct strbuf *buf, const void *, size_t)
 
static int strbuf_addstr (struct strbuf *sb, const char *s)
 
int strbuf_addf (struct strbuf *sb, const char *fmt,...) __printf(2
 
int ssize_t strbuf_read (struct strbuf *, int fd, ssize_t hint)
 

Variables

char strbuf_slopbuf []
 

Macro Definition Documentation

◆ STRBUF_INIT

#define STRBUF_INIT   { 0, 0, strbuf_slopbuf }

Definition at line 56 of file strbuf.h.

Function Documentation

◆ strbuf_add()

int strbuf_add ( struct strbuf buf,
const void *  ,
size_t   
)

Definition at line 78 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_addch()

int strbuf_addch ( struct strbuf sb,
int  c 
)

Definition at line 67 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_addf()

int strbuf_addf ( struct strbuf sb,
const char *  fmt,
  ... 
)

◆ strbuf_addstr()

static int strbuf_addstr ( struct strbuf sb,
const char *  s 
)
inlinestatic

Definition at line 86 of file strbuf.h.

Here is the call graph for this function:

◆ strbuf_avail()

static ssize_t strbuf_avail ( const struct strbuf sb)
inlinestatic

Definition at line 64 of file strbuf.h.

Here is the call graph for this function:

◆ strbuf_detach()

char* strbuf_detach ( struct strbuf buf,
size_t *   
)

Definition at line 31 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_grow()

int strbuf_grow ( struct strbuf buf,
size_t   
)

Definition at line 40 of file strbuf.c.

◆ strbuf_init()

int strbuf_init ( struct strbuf buf,
ssize_t  hint 
)

Definition at line 14 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_read()

int ssize_t strbuf_read ( struct strbuf ,
int  fd,
ssize_t  hint 
)

Definition at line 128 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_release()

void strbuf_release ( struct strbuf buf)

Definition at line 23 of file strbuf.c.

Here is the call graph for this function:

◆ strbuf_setlen()

static int strbuf_setlen ( struct strbuf sb,
size_t  len 
)
inlinestatic

Definition at line 70 of file strbuf.h.

Here is the call graph for this function:

Variable Documentation

◆ strbuf_slopbuf

char strbuf_slopbuf[]

Definition at line 12 of file strbuf.c.