]> git.evergreen-ils.org Git - working/Evergreen.git/blob - OpenSRF/src/libjson/printbuf.h
sort groups by name for consistancy
[working/Evergreen.git] / OpenSRF / src / libjson / printbuf.h
1 /*
2  * $Id$
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
22 struct printbuf {
23   char *buf;
24   int bpos;
25   int size;
26 };
27
28 extern struct printbuf*
29 printbuf_new();
30
31 extern int
32 printbuf_memappend(struct printbuf *p, char *buf, int size);
33
34 extern int
35 sprintbuf(struct printbuf *p, const char *msg, ...);
36
37 extern void
38 printbuf_reset(struct printbuf *p);
39
40 extern void
41 printbuf_free(struct printbuf *p);
42
43 #endif