diff options
Diffstat (limited to 'include/grecs/format.h')
-rw-r--r-- | include/grecs/format.h | 62 |
1 files changed, 0 insertions, 62 deletions
diff --git a/include/grecs/format.h b/include/grecs/format.h deleted file mode 100644 index 7ac8458..0000000 --- a/include/grecs/format.h +++ /dev/null | |||
@@ -1,62 +0,0 @@ | |||
1 | /* grecs - 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 _GRECS_FORMAT_H | ||
18 | #define _GRECS_FORMAT_H | ||
19 | |||
20 | #include <grecs/value.h> | ||
21 | #include <grecs/locus.h> | ||
22 | #include <grecs/node.h> | ||
23 | #include <grecs/txtacc.h> | ||
24 | |||
25 | struct grecs_format_closure { | ||
26 | int (*fmtfun)(const char *, void *); | ||
27 | void *data; | ||
28 | }; | ||
29 | |||
30 | void grecs_format_locus(grecs_locus_t *locus, struct grecs_format_closure *fp); | ||
31 | void grecs_format_node_path(struct grecs_node *node, int flag, | ||
32 | struct grecs_format_closure *fp); | ||
33 | void grecs_format_value(struct grecs_value *val, int flags, | ||
34 | struct grecs_format_closure *fp); | ||
35 | |||
36 | #define GRECS_NODE_FLAG_PATH 0x00100 | ||
37 | #define GRECS_NODE_FLAG_VALUE 0x00200 | ||
38 | #define GRECS_NODE_FLAG_DESCEND 0x01000 | ||
39 | #define GRECS_NODE_FLAG_LOCUS 0x02000 | ||
40 | #define GRECS_NODE_FLAG_QUOTE 0x04000 | ||
41 | #define GRECS_NODE_FLAG_NOQUOTE 0x08000 | ||
42 | #define GRECS_NODE_FLAG_QUOTE_HEX 0x10000 | ||
43 | |||
44 | #define _GRECS_NODE_MASK_DELIM 0x000ff | ||
45 | #define _GRECS_NODE_MASK_OUTPUT 0x00f00 | ||
46 | |||
47 | #define GRECS_NODE_FLAG_DEFAULT \ | ||
48 | (GRECS_NODE_FLAG_PATH|GRECS_NODE_FLAG_VALUE|\ | ||
49 | GRECS_NODE_FLAG_DESCEND|GRECS_NODE_FLAG_QUOTE) | ||
50 | int grecs_format_node(struct grecs_node *node, int flags, | ||
51 | struct grecs_format_closure *fp); | ||
52 | |||
53 | void grecs_print_locus(grecs_locus_t *locus, FILE *fp); | ||
54 | void grecs_print_node_path(struct grecs_node *node, int flag, FILE *fp); | ||
55 | void grecs_print_value(struct grecs_value *val, int flags, FILE *fp); | ||
56 | |||
57 | int grecs_print_node(struct grecs_node *node, int flags, FILE *fp); | ||
58 | |||
59 | void grecs_txtacc_format_value(struct grecs_value *val, int flags, | ||
60 | grecs_txtacc_t acc); | ||
61 | |||
62 | #endif | ||