#include "common.h"
Go to the source code of this file.
Data Structures | |
struct | pst_varbuf |
Typedefs | |
typedef struct pst_varbuf | pst_vbuf |
Functions | |
pst_vbuf * | pst_vballoc (size_t len) |
void | pst_vbgrow (pst_vbuf *vb, size_t len) |
out: vbavail(vb) >= len, data are preserved | |
void | pst_vbset (pst_vbuf *vb, void *data, size_t len) |
set vbuf b size=len, resize if necessary, relen = how much to over-allocate | |
void | pst_vbappend (pst_vbuf *vb, void *data, size_t length) |
append len bytes of b to vb, resize if necessary | |
void | pst_unicode_init () |
size_t | pst_vb_utf16to8 (pst_vbuf *dest, const char *inbuf, int iblen) |
size_t | pst_vb_utf8to8bit (pst_vbuf *dest, const char *inbuf, int iblen, const char *charset) |
size_t | pst_vb_8bit2utf8 (pst_vbuf *dest, const char *inbuf, int iblen, const char *charset) |
typedef struct pst_varbuf pst_vbuf |
void pst_unicode_init | ( | ) |
Definition at line 202 of file vbuf.c.
References DEBUG_WARN, i16to8, pst_unicode_close(), and unicode_up.
Referenced by pst_open(), pst_vb_utf16to8(), and sbcs_conversion().
size_t pst_vb_8bit2utf8 | ( | pst_vbuf * | dest, | |
const char * | inbuf, | |||
int | iblen, | |||
const char * | charset | |||
) |
Definition at line 254 of file vbuf.c.
References open_targets(), sbcs_conversion(), target2i8, and target_open_to.
Referenced by pst_convert_utf8().
size_t pst_vb_utf16to8 | ( | pst_vbuf * | dest, | |
const char * | inbuf, | |||
int | iblen | |||
) |
Definition at line 213 of file vbuf.c.
References pst_varbuf::b, pst_varbuf::blen, DEBUG_WARN, pst_varbuf::dlen, i16to8, ICONV_CONST, pst_unicode_init(), pst_vbgrow(), pst_vbresize(), unicode_up, and utf16_is_terminated().
Referenced by pst_parse_block().
size_t pst_vb_utf8to8bit | ( | pst_vbuf * | dest, | |
const char * | inbuf, | |||
int | iblen, | |||
const char * | charset | |||
) |
Definition at line 246 of file vbuf.c.
References i8totarget, open_targets(), sbcs_conversion(), and target_open_from.
Referenced by convert_8bit(), and write_body_part().
pst_vbuf* pst_vballoc | ( | size_t | len | ) |
Definition at line 130 of file vbuf.c.
References pst_varbuf::blen, pst_varbuf::buf, DIE, pst_varbuf::dlen, pst_malloc(), and pst_vbresize().
Referenced by convert_8bit(), pst_convert_utf8(), pst_parse_block(), and write_body_part().
void pst_vbappend | ( | pst_vbuf * | vb, | |
void * | data, | |||
size_t | length | |||
) |
append len bytes of b to vb, resize if necessary
Definition at line 190 of file vbuf.c.
References pst_varbuf::b, pst_varbuf::dlen, pst_vbgrow(), and pst_vbset().
Referenced by pst_parse_block().
void pst_vbgrow | ( | pst_vbuf * | vb, | |
size_t | len | |||
) |
out: vbavail(vb) >= len, data are preserved
Definition at line 146 of file vbuf.c.
References ASSERT, pst_varbuf::b, pst_varbuf::blen, pst_varbuf::buf, DIE, pst_varbuf::dlen, pst_malloc(), pst_vbavail(), and pst_vbresize().
Referenced by convert_8bit(), pst_vb_utf16to8(), pst_vbappend(), sbcs_conversion(), and write_body_part().
void pst_vbset | ( | pst_vbuf * | vb, | |
void * | data, | |||
size_t | len | |||
) |
set vbuf b size=len, resize if necessary, relen = how much to over-allocate
Definition at line 180 of file vbuf.c.
References pst_varbuf::b, pst_varbuf::dlen, and pst_vbresize().
Referenced by pst_parse_block(), and pst_vbappend().