printbuf.h File Reference


Data Structures

struct  printbuf

Defines

#define printbuf_memappend_fast(p, bufptr, bufsize)

Functions

struct printbufprintbuf_new (void)
int printbuf_memappend (struct printbuf *p, const char *buf, int size)
int sprintbuf (struct printbuf *p, const char *msg,...)
void printbuf_reset (struct printbuf *p)
void printbuf_free (struct printbuf *p)

Define Documentation

#define printbuf_memappend_fast ( p,
bufptr,
bufsize   ) 

Value:

do {                                                         \
  if ((p->size - p->bpos) > bufsize) {                       \
    memcpy(p->buf + p->bpos, (bufptr), bufsize);             \
    p->bpos += bufsize;                                      \
    p->buf[p->bpos]= '\0';                                   \
  } else {  printbuf_memappend(p, (bufptr), bufsize); }      \
} while (0)


Function Documentation

void printbuf_free ( struct printbuf p  ) 

int printbuf_memappend ( struct printbuf p,
const char *  buf,
int  size 
)

struct printbuf* printbuf_new ( void   )  [read]

void printbuf_reset ( struct printbuf p  ) 

int sprintbuf ( struct printbuf p,
const char *  msg,
  ... 
)


Generated on Fri Jul 31 10:58:15 2009 for json-c by  doxygen 1.5.8