diff options
Diffstat (limited to 'include/argot/txtacc.h')
-rw-r--r-- | include/argot/txtacc.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/include/argot/txtacc.h b/include/argot/txtacc.h new file mode 100644 index 0000000..bdcccbc --- /dev/null +++ b/include/argot/txtacc.h | |||
@@ -0,0 +1,36 @@ | |||
1 | /* argot - Gray's Extensible Configuration System -*- c -*- | ||
2 | Copyright (C) 2007-2016 Sergey Poznyakoff | ||
3 | |||
4 | Grecs is free software; you can redistribute it and/or modify it | ||
5 | under the terms of the GNU General Public License as published by the | ||
6 | Free Software Foundation; either version 3 of the License, or (at your | ||
7 | option) any later version. | ||
8 | |||
9 | Grecs is distributed in the hope that it will be useful, | ||
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
12 | GNU General Public License for more details. | ||
13 | |||
14 | You should have received a copy of the GNU General Public License along | ||
15 | with Grecs. If not, see <http://www.gnu.org/licenses/>. */ | ||
16 | |||
17 | #ifndef _ARGOT_TXTACC_H | ||
18 | #define _ARGOT_TXTACC_H | ||
19 | |||
20 | #define ARGOT_TXTACC_BUFSIZE 1024 | ||
21 | typedef struct argot_txtacc *argot_txtacc_t; | ||
22 | |||
23 | argot_txtacc_t argot_txtacc_create(void); | ||
24 | void argot_txtacc_free(argot_txtacc_t); | ||
25 | void argot_txtacc_grow(argot_txtacc_t, const char *, size_t); | ||
26 | void argot_txtacc_grow_string(argot_txtacc_t, const char *); | ||
27 | void argot_txtacc_grow_string_escape(argot_txtacc_t, const char *); | ||
28 | #define argot_txtacc_grow_char(acc,c) \ | ||
29 | do { \ | ||
30 | char __ch = c; \ | ||
31 | argot_txtacc_grow(acc,&__ch,1); \ | ||
32 | } while (0) | ||
33 | char *argot_txtacc_finish(argot_txtacc_t, int); | ||
34 | void argot_txtacc_free_string(argot_txtacc_t, char *); | ||
35 | |||
36 | #endif | ||