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)
size_t vb_8bit2utf8 (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_convert_utf8(), pst_parse_block(), sbcs_conversion(), vb_8bit2utf8(), 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 64 of file vbuf.c.

References i16to8, i8totarget, target2i8, target_charset, target_open_from, target_open_to, and unicode_up.

Referenced by unicode_init().

void unicode_init  ) 
 

Definition at line 52 of file vbuf.c.

References i16to8, unicode_close(), unicode_up, and WARN.

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

Here is the call graph for this function:

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

Definition at line 191 of file vbuf.c.

References open_targets(), sbcs_conversion(), target2i8, and vbuf.

Referenced by pst_convert_utf8().

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 97 of file vbuf.c.

References ASSERT, varbuf::b, varbuf::blen, DEBUG_WARN, varbuf::dlen, i16to8, ICONV_CONST, 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 183 of file vbuf.c.

References i8totarget, open_targets(), sbcs_conversion(), and vbuf.

Referenced by write_body_part().

Here is the call graph for this function:

struct varbuf* vballoc size_t  len  ) 
 

Definition at line 199 of file vbuf.c.

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

Referenced by pst_convert_utf8(), 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 250 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 222 of file vbuf.c.

References varbuf::buf, and vbuf.

Referenced by vsfree().

void vbgrow vbuf vb,
size_t  len
 

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

void vboverwrite vbuf vbdest,
vbuf vbsrc
 

void vbresize vbuf vb,
size_t  len
 

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

void vbset vbuf vb,
void *  data,
size_t  len
 

Definition at line 288 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 465 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 494 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 338 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 574 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 591 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 420 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 364 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 597 of file vbuf.c.

References varstr::b, and vstr.

void vsfree vstr vs  ) 
 

Definition at line 358 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 568 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 522 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 452 of file vbuf.c.

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

size_t vslen vstr vs  ) 
 

Definition at line 352 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 603 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 374 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 559 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 553 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 388 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 296 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 616 of file vbuf.c.

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

void vsvprintf vstr vs,
char *  fmt,
va_list  ap
 


Generated on Thu Mar 19 16:39:58 2009 for 'LibPst' by  doxygen 1.3.9.1