File: textbuf.h

package info (click to toggle)
skytools 2.1.8-2.2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 1,980 kB
  • ctags: 1,543
  • sloc: sql: 6,635; python: 6,237; ansic: 2,799; makefile: 308; sh: 268
file content (26 lines) | stat: -rw-r--r-- 609 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
struct TBuf;

typedef struct TBuf TBuf;

TBuf *tbuf_alloc(int start_size);
void tbuf_free(TBuf *tbuf);
int tbuf_get_size(TBuf *tbuf);
void tbuf_reset(TBuf *tbuf);

const text *tbuf_look_text(TBuf *tbuf);
const char *tbuf_look_cstring(TBuf *tbuf);

void tbuf_append_cstring(TBuf *tbuf, const char *str);
void tbuf_append_text(TBuf *tbuf, const text *str);
void tbuf_append_char(TBuf *tbuf, char chr);

text *tbuf_steal_text(TBuf *tbuf);

void tbuf_encode_cstring(TBuf *tbuf,
		const char *str,
		const char *encoding);

void tbuf_encode_data(TBuf *tbuf,
		const uint8 *data, int len,
		const char *encoding);