blob: 6a9568f748c55a776374381e1b2bd6577f335ec9 [file] [log] [blame]
Michael Clarkf0d08882007-03-13 08:26:18 +00001/*
2 * $Id: printbuf.h,v 1.2 2004/07/21 01:24:33 mclark Exp $
3 *
4 * Copyright Metaparadigm Pte. Ltd. 2004.
5 * Michael Clark <michael@metaparadigm.com>
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public (LGPL)
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details: http://www.gnu.org/
16 *
17 */
18
19#ifndef _printbuf_h_
20#define _printbuf_h_
21
22struct printbuf {
23 char *buf;
24 int bpos;
25 int size;
26};
27
28extern struct printbuf*
29printbuf_new();
30
31extern int
32printbuf_memappend(struct printbuf *p, char *buf, int size);
33
34extern int
35sprintbuf(struct printbuf *p, const char *msg, ...);
36
37extern void
38printbuf_reset(struct printbuf *p);
39
40extern void
41printbuf_free(struct printbuf *p);
42
43#endif