Main Page | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals

vbuf.h File Reference

#include "common.h"

Include dependency graph for vbuf.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Data Structures

struct  varbuf
struct  varstr

Defines

#define SZ_MAX   4096
#define VBUF_STATIC(x, y)   static vbuf *x = NULL; if(!x) x = vballoc(y);
#define VSTR_STATIC(x, y)   static vstr *x = NULL; if(!x) x = vsalloc(y);

Typedefs

typedef varbuf vbuf
typedef varstr vstr

Functions

int skip_nl (char *s)
int find_nl (vstr *vs)
varbufvballoc (size_t len)
void vbfree (vbuf *vb)
void vbclear (vbuf *vb)
void vbresize (vbuf *vb, size_t len)
size_t vbavail (vbuf *vb)
void vbdump (vbuf *vb)
void vbgrow (vbuf *vb, size_t len)
void vbset (vbuf *vb, void *data, size_t len)
void vbskipws (vbuf *vb)
void vbappend (vbuf *vb, void *data, size_t length)
void vbskip (vbuf *vb, size_t skip)
void vboverwrite (vbuf *vbdest, vbuf *vbsrc)
vstrvsalloc (size_t len)
char * vsb (vstr *vs)
size_t vslen (vstr *vs)
void vsfree (vstr *vs)
void vsset (vstr *vs, char *s)
void vsnset (vstr *vs, char *s, size_t n)
void vsgrow (vstr *vs, size_t len)
size_t vsavail (vstr *vs)
void vscat (vstr *vs, char *str)
void vsncat (vstr *vs, char *str, size_t len)
void vsnprepend (vstr *vs, char *str, size_t len)
void vsskip (vstr *vs, size_t len)
int vscmp (vstr *vs, char *str)
void vsskipws (vstr *vs)
void vs_printf (vstr *vs, char *fmt,...)
void vs_printfa (vstr *vs, char *fmt,...)
void vshexdump (vstr *vs, const char *b, size_t start, size_t stop, int ascii)
int vscatprintf (vstr *vs, char *fmt,...)
void vsvprintf (vstr *vs, char *fmt, va_list ap)
void vstrunc (vstr *vs, size_t off)
int vslast (vstr *vs)
void vscharcat (vstr *vs, int ch)
void unicode_init ()
void unicode_close ()
size_t vb_utf16to8 (vbuf *dest, const char *inbuf, int iblen)
size_t vb_utf8to8bit (vbuf *dest, const char *inbuf, int iblen, const char *charset)
int vb_skipline (struct varbuf *vb)


Define Documentation

#define SZ_MAX   4096
 

Definition at line 17 of file vbuf.h.

#define VBUF_STATIC x,
 )     static vbuf *x = NULL; if(!x) x = vballoc(y);
 

Definition at line 42 of file vbuf.h.

#define VSTR_STATIC x,
 )     static vstr *x = NULL; if(!x) x = vsalloc(y);
 

Definition at line 43 of file vbuf.h.

Referenced by utf16_is_terminated().


Typedef Documentation

typedef struct varbuf vbuf
 

Definition at line 39 of file vbuf.h.

Referenced by pst_parse_block(), vb_utf16to8(), vb_utf8to8bit(), vballoc(), vbavail(), vbcheck(), vbfree(), vbset(), vs_printf(), vs_printfa(), vsavail(), vscatprintf(), vscharcat(), vsfree(), vsgrow(), vsncat(), vsnprepend(), vsnset(), vsnset16(), vsskip(), vsskipws(), and write_body_part().

typedef struct varstr vstr
 

Definition at line 40 of file vbuf.h.

Referenced by find_nl(), vs_printf(), vs_printfa(), vsalloc(), vsavail(), vscat(), vscatprintf(), vscharcat(), vscmp(), vsfree(), vsgrow(), vshexdump(), vslast(), vslen(), vsncat(), vsnprepend(), vsnset(), vsnset16(), vsset(), vsskip(), vsskipline(), vsskipws(), vsstr(), and vstrunc().


Function Documentation

int find_nl vstr vs  ) 
 

Definition at line 20 of file vbuf.c.

References varstr::b, varstr::dlen, and vstr.

Referenced by vsskipline().

int skip_nl char *  s  ) 
 

Definition at line 8 of file vbuf.c.

Referenced by vsskipline().

void unicode_close  ) 
 

Definition at line 61 of file vbuf.c.

References i16to8, i8totarget, target_charset, and unicode_up.

Referenced by unicode_init().

void unicode_init  ) 
 

Definition at line 49 of file vbuf.c.

References i16to8, unicode_close(), and unicode_up.

Referenced by pst_open(), vb_utf16to8(), and vb_utf8to8bit().

Here is the call graph for this function:

int vb_skipline struct varbuf vb  ) 
 

size_t vb_utf16to8 vbuf dest,
const char *  inbuf,
int  iblen
 

Definition at line 93 of file vbuf.c.

References ASSERT, varbuf::b, varbuf::blen, DEBUG_WARN, varbuf::dlen, i16to8, unicode_init(), unicode_up, utf16_is_terminated(), vbgrow(), vbresize(), and vbuf.

Referenced by pst_parse_block().

Here is the call graph for this function:

size_t vb_utf8to8bit vbuf dest,
const char *  inbuf,
int  iblen,
const char *  charset
 

Definition at line 126 of file vbuf.c.

References varbuf::b, varbuf::blen, varbuf::dlen, i8totarget, target_charset, unicode_init(), vbgrow(), vbresize(), vbuf, and WARN.

Referenced by write_body_part().

Here is the call graph for this function:

struct varbuf* vballoc size_t  len  ) 
 

Definition at line 166 of file vbuf.c.

References varbuf::blen, varbuf::buf, DIE, varbuf::dlen, vbresize(), and vbuf.

Referenced by pst_parse_block(), vsalloc(), and write_body_part().

Here is the call graph for this function:

void vbappend vbuf vb,
void *  data,
size_t  length
 

Referenced by pst_parse_block().

size_t vbavail vbuf vb  ) 
 

Definition at line 217 of file vbuf.c.

References varbuf::b, varbuf::blen, varbuf::buf, varbuf::dlen, and vbuf.

Referenced by vbgrow(), and vsavail().

void vbclear vbuf vb  ) 
 

void vbdump vbuf vb  ) 
 

void vbfree vbuf vb  ) 
 

Definition at line 189 of file vbuf.c.

References varbuf::buf, and vbuf.

Referenced by vsfree().

void vbgrow vbuf vb,
size_t  len
 

Referenced by vb_utf16to8(), vb_utf8to8bit(), vbappend(), vs_printfa(), vscatprintf(), vscharcat(), vsgrow(), vsncat(), and vsnprepend().

void vboverwrite vbuf vbdest,
vbuf vbsrc
 

void vbresize vbuf vb,
size_t  len
 

Referenced by vb_utf16to8(), vb_utf8to8bit(), vballoc(), vbclear(), vbgrow(), vboverwrite(), vbset(), vs_printf(), vsnset(), and vsnset16().

void vbset vbuf vb,
void *  data,
size_t  len
 

Definition at line 269 of file vbuf.c.

References varbuf::b, varbuf::dlen, vbresize(), and vbuf.

Referenced by pst_parse_block(), and vbappend().

Here is the call graph for this function:

void vbskip vbuf vb,
size_t  skip
 

Referenced by vsskip(), and vsskipws().

void vbskipws vbuf vb  ) 
 

void vs_printf vstr vs,
char *  fmt,
  ...
 

Definition at line 447 of file vbuf.c.

References varbuf::b, varbuf::blen, varbuf::dlen, vbresize(), vbuf, and vstr.

Here is the call graph for this function:

void vs_printfa vstr vs,
char *  fmt,
  ...
 

Definition at line 476 of file vbuf.c.

References varbuf::b, varbuf::blen, varstr::blen, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr.

Referenced by vshexdump().

Here is the call graph for this function:

vstr* vsalloc size_t  len  ) 
 

Definition at line 320 of file vbuf.c.

References vballoc(), vsset(), and vstr.

Here is the call graph for this function:

size_t vsavail vstr vs  ) 
 

Definition at line 556 of file vbuf.c.

References vbavail(), vbuf, and vstr.

Here is the call graph for this function:

char* vsb vstr vs  ) 
 

void vscat vstr vs,
char *  str
 

Definition at line 573 of file vbuf.c.

References vsncat(), and vstr.

Here is the call graph for this function:

int vscatprintf vstr vs,
char *  fmt,
  ...
 

Definition at line 402 of file vbuf.c.

References varstr::b, varbuf::blen, varstr::blen, varstr::dlen, vbgrow(), vbuf, vsset(), and vstr.

Here is the call graph for this function:

void vscharcat vstr vs,
int  ch
 

Definition at line 346 of file vbuf.c.

References varbuf::b, varbuf::dlen, vbgrow(), vbuf, and vstr.

Here is the call graph for this function:

int vscmp vstr vs,
char *  str
 

Definition at line 579 of file vbuf.c.

References varstr::b, and vstr.

void vsfree vstr vs  ) 
 

Definition at line 340 of file vbuf.c.

References vbfree(), vbuf, and vstr.

Here is the call graph for this function:

void vsgrow vstr vs,
size_t  len
 

Definition at line 550 of file vbuf.c.

References vbgrow(), vbuf, and vstr.

Here is the call graph for this function:

void vshexdump vstr vs,
const char *  b,
size_t  start,
size_t  stop,
int  ascii
 

Definition at line 504 of file vbuf.c.

References vs_printfa(), and vstr.

Referenced by utf16_is_terminated().

Here is the call graph for this function:

int vslast vstr vs  ) 
 

Definition at line 434 of file vbuf.c.

References varstr::b, varstr::dlen, and vstr.

size_t vslen vstr vs  ) 
 

Definition at line 334 of file vbuf.c.

References vsstr(), and vstr.

Here is the call graph for this function:

void vsncat vstr vs,
char *  str,
size_t  len
 

Definition at line 585 of file vbuf.c.

References ASSERT, varbuf::b, varstr::b, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr.

Referenced by vscat().

Here is the call graph for this function:

void vsnprepend vstr vs,
char *  str,
size_t  len
 

Definition at line 356 of file vbuf.c.

References ASSERT, varbuf::b, varstr::b, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr.

Here is the call graph for this function:

void vsnset vstr vs,
char *  s,
size_t  n
 

Definition at line 541 of file vbuf.c.

References varbuf::b, varbuf::dlen, vbresize(), vbuf, and vstr.

Referenced by vsset().

Here is the call graph for this function:

void vsset vstr vs,
char *  s
 

Definition at line 535 of file vbuf.c.

References vsnset(), and vstr.

Referenced by vsalloc(), and vscatprintf().

Here is the call graph for this function:

void vsskip vstr vs,
size_t  len
 

Definition at line 370 of file vbuf.c.

References ASSERT, vbskip(), vbuf, and vstr.

Here is the call graph for this function:

void vsskipws vstr vs  ) 
 

Definition at line 278 of file vbuf.c.

References varbuf::b, varstr::b, varstr::dlen, vbskip(), vbuf, and vstr.

Here is the call graph for this function:

void vstrunc vstr vs,
size_t  off
 

Definition at line 598 of file vbuf.c.

References varstr::b, varstr::dlen, and vstr.

void vsvprintf vstr vs,
char *  fmt,
va_list  ap
 


Generated on Sat Feb 7 10:22:32 2009 for 'LibPst' by  doxygen 1.3.9.1