#include <stdlib.h>
#include <stdio.h>
#include <stdarg.h>
Go to the source code of this file.
Data Structures | |
struct | varbuf |
struct | varstr |
Defines | |
#define | SZ_MAX 4096 |
#define | DELIM '\\' |
#define | TOK_EMPTY 0 |
#define | TOK_DELIM 1 |
#define | TOK_PARENT 2 |
#define | TOK_CURRENT 3 |
#define | TOK_ELEMENT 4 |
#define | TOK_ERROR 10 |
#define | TOK_BUF_SMALL 11 |
#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 | |
varbuf * | vballoc (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) |
vstr * | vsalloc (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, 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) |
int | vsutf16 (vstr *vs, vbuf *in) |
int | vs_parse_escaped_string (vstr *vs, char *str, size_t len) |
void | unicode_init () |
void | unicode_close () |
int | utf16_write (FILE *stream, const void *buf, size_t count) |
int | utf16_fprintf (FILE *stream, const char *fmt,...) |
int | utf16to8 (char *inbuf_o, char *outbuf_o, int length) |
int | utf8to16 (char *inbuf_o, int iblen, char *outbuf_o, int oblen) |
int | vb_utf8to16T (vbuf *bout, char *cin, int inlen) |
int | vb_utf16to8 (vbuf *dest, char *buf, int len) |
int | iso8859_1to8 (char *inbuf_o, char *outbuf_o, int length) |
int | utf8toascii (const char *inbuf_o, char *outbuf_o, int length) |
void | winhex (FILE *stream, unsigned char *hbuf, int start, int stop, int loff) |
void | winhex8 (FILE *stream, unsigned char *hbuf, int start, int stop, int loff) |
void | vbwinhex8 (vbuf *vb, unsigned char *hbuf, int start, int stop, int loff) |
int | find_in_buf (char *buf, char *what, int sz, int len, int start) |
int | get_int (char *array) |
int | find_nl (vstr *vs) |
int | skip_nl (char *s) |
int | vb_skipline (struct varbuf *vb) |
int | gethexorstr (char **c, char *wb) |
char * | esc_index (char *s, int c) |
char * | esc_rindex (char *s, int c) |
char * | tok_esc_char (char *s, int *is_esc, int *c) |
int | vb_path_token (vbuf *tok, char **path) |
int | gettoken (char *tok, int len, char **path, char delim) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 55 of file vbuf.h. Referenced by vb_utf16to8(). |
|
Definition at line 56 of file vbuf.h. Referenced by utf16_is_terminated(). |
|
Definition at line 52 of file vbuf.h. Referenced by pst_parse_block(), vb_utf16to8(), vb_utf8to16T(), vballoc(), vbavail(), vbcheck(), vbfree(), vbset(), vs_printf(), vs_printfa(), vsavail(), vscatprintf(), vscharcat(), vsfree(), vsgrow(), vsncat(), vsnprepend(), vsnset(), vsnset16(), vsskip(), and vsskipws(). |
|
Definition at line 53 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(). |
|
|
|
|
|
|
|
Definition at line 36 of file vbuf.c. References varstr::b, varstr::dlen, and vstr. Referenced by vsskipline(). |
|
|
|
|
|
|
|
|
|
Definition at line 24 of file vbuf.c. Referenced by vsskipline(). |
|
|
|
Definition at line 101 of file vbuf.c. References i16to8, i8859_1to8, i8to16, i8toi8859_1, and unicode_up. Referenced by unicode_init(). |
|
Definition at line 66 of file vbuf.c. References ASSERT, i16to8, i8859_1to8, i8to16, i8toi8859_1, unicode_close(), unicode_up, and utf8to16(). Referenced by pst_open(), vb_utf16to8(), and vb_utf8to16T(). |
|
|
|
|
|
|
|
Definition at line 191 of file vbuf.c. References ASSERT, DIE, and i8to16. Referenced by unicode_init(). |
|
|
|
|
|
|
|
Definition at line 131 of file vbuf.c. References ASSERT, varbuf::b, varbuf::blen, DIE, varbuf::dlen, i16to8, unicode_init(), unicode_up, utf16_is_terminated(), vb_utf8to16T(), vbgrow(), vbresize(), vbuf, and VBUF_STATIC. Referenced by pst_parse_block(). |
|
Definition at line 217 of file vbuf.c. References varbuf::b, varbuf::blen, varbuf::dlen, i8to16, unicode_init(), vbgrow(), vbresize(), vbuf, and WARN. Referenced by vb_utf16to8(). |
|
Definition at line 275 of file vbuf.c. References varbuf::blen, varbuf::buf, DIE, varbuf::dlen, vbresize(), and vbuf. Referenced by pst_parse_block(), and vsalloc(). |
|
Referenced by pst_parse_block(). |
|
Definition at line 326 of file vbuf.c. References varbuf::b, varbuf::blen, varbuf::buf, varbuf::dlen, and vbuf. |
|
|
|
|
|
Definition at line 298 of file vbuf.c. References varbuf::buf, and vbuf. Referenced by vsfree(). |
|
Referenced by vb_utf16to8(), vb_utf8to16T(), vbappend(), vs_printfa(), vscatprintf(), vscharcat(), vsgrow(), vsncat(), and vsnprepend(). |
|
|
|
Referenced by vb_utf16to8(), vb_utf8to16T(), vballoc(), vbclear(), vbgrow(), vboverwrite(), vbset(), vs_printf(), vsnset(), and vsnset16(). |
|
Definition at line 378 of file vbuf.c. References varbuf::b, varbuf::dlen, vbresize(), and vbuf. Referenced by pst_parse_block(), and vbappend(). |
|
Referenced by vsskip(), and vsskipws(). |
|
|
|
|
|
|
|
Definition at line 556 of file vbuf.c. References varbuf::b, varbuf::blen, varbuf::dlen, vbresize(), vbuf, and vstr. |
|
Definition at line 585 of file vbuf.c. References varbuf::b, varbuf::blen, varstr::blen, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr. Referenced by vshexdump(). |
|
|
|
|
|
|
|
|
|
Definition at line 511 of file vbuf.c. References varstr::b, varbuf::blen, varstr::blen, varstr::dlen, vbgrow(), vbuf, vsset(), and vstr. |
|
Definition at line 455 of file vbuf.c. References varbuf::b, varbuf::dlen, vbgrow(), vbuf, and vstr. |
|
|
|
|
|
|
|
Definition at line 613 of file vbuf.c. References vs_printfa(), and vstr. Referenced by utf16_is_terminated(). |
|
Definition at line 543 of file vbuf.c. References varstr::b, varstr::dlen, and vstr. |
|
|
|
Definition at line 694 of file vbuf.c. References ASSERT, varbuf::b, varstr::b, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr. Referenced by vscat(). |
|
Definition at line 465 of file vbuf.c. References ASSERT, varbuf::b, varstr::b, varbuf::dlen, varstr::dlen, vbgrow(), vbuf, and vstr. |
|
Definition at line 650 of file vbuf.c. References varbuf::b, varbuf::dlen, vbresize(), vbuf, and vstr. Referenced by vsset(). |
|
Definition at line 644 of file vbuf.c. References vsnset(), and vstr. Referenced by vsalloc(), and vscatprintf(). |
|
|
|
Definition at line 387 of file vbuf.c. References varbuf::b, varstr::b, varstr::dlen, vbskip(), vbuf, and vstr. |
|
Definition at line 707 of file vbuf.c. References varstr::b, varstr::dlen, and vstr. |
|
|
|
|
|
|
|
|