* use dynamic memory buffers instead temporary files
[fw/sdcc] / support / Util / dbuf_string.h
1 /*
2   dbuf_string.h - Append formatted string to the dynamic buffer
3   version 1.0.0, January 6th, 2007
4
5   Copyright (c) 2002-2007 Borut Razem
6
7   This program is free software; you can redistribute it and/or modify
8   it under the terms of the GNU General Public License as published by
9   the Free Software Foundation; either version 2, or (at your option)
10   any later version.
11
12   This program 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
15   GNU General Public License for more details.
16
17   You should have received a copy of the GNU General Public License
18   along with this program; if not, write to the Free Software
19   Foundation, Inc., 51 Franklin Street - Fifth Floor,
20   Boston, MA 02110-1301, USA.
21 */
22
23
24 #ifndef __DBUF_STRING_H
25 #define __DBUF_STRING_H
26
27 #include <stdarg.h>
28 #include "dbuf.h"
29
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33
34 int dbuf_append_str(struct dbuf_s *dbuf, const char *str);
35 int dbuf_append_char(struct dbuf_s *dbuf, char chr);
36 int dbuf_vprintf(struct dbuf_s *dbuf, const char *format, va_list args);
37 int dbuf_printf (struct dbuf_s *dbuf, const char *format, ...);
38 void dbuf_write (struct dbuf_s *dbuf, FILE *dest);
39 void dbuf_write_and_destroy (struct dbuf_s *dbuf, FILE *dest);
40
41 #ifdef __cplusplus
42 }
43 #endif
44
45 #endif  /* __DBUF_STRING_H */