PageRenderTime 19ms CodeModel.GetById 16ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

/utility/stringbuffer.h

http://github.com/interactive-matter/aJson
C Header | 55 lines | 24 code | 8 blank | 23 comment | 0 complexity | 37e21b50d45f7a663ed61ed60e4cdfbd MD5 | raw file
 1/*
 2 * aJson
 3 * stringbuffer.h
 4 *
 5 *  http://interactive-matter.org/
 6 *
 7 *  This file is part of aJson.
 8 *
 9 *  aJson is free software: you can redistribute it and/or modify
10 *  it under the terms of the GNU General Public License as published by
11 *  the Free Software Foundation, either version 3 of the License, or
12 *  (at your option) any later version.
13 *
14 *  aJson is distributed in the hope that it will be useful,
15 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *  GNU General Public License for more details.
18 *  You should have received a copy of the GNU General Public License
19 *  along with aJson.  If not, see <http://www.gnu.org/licenses/>.
20 *
21 *  Created on: 14.10.2010
22 *      Author: marcus
23 */
24
25#ifndef STRINGBUFFER_H_
26#define STRINGBUFFER_H_
27
28typedef struct
29{
30  char* string;
31  unsigned int memory;
32  unsigned int string_length;
33} string_buffer;
34
35#ifdef __cplusplus
36extern "C"
37{
38#endif
39
40  string_buffer*
41  stringBufferCreate(void);
42
43  char
44  stringBufferAdd(char value, string_buffer* buffer);
45
46  char*
47  stringBufferToString(string_buffer* buffer);
48
49  void
50  stringBufferFree(string_buffer* buffer);
51
52#ifdef __cplusplus
53}
54#endif
55#endif /* STRINGBUFFER_H_ */