diff options
Diffstat (limited to 'include/grecs/preproc.h')
-rw-r--r-- | include/grecs/preproc.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/grecs/preproc.h b/include/grecs/preproc.h new file mode 100644 index 0000000..798e879 --- /dev/null +++ b/include/grecs/preproc.h | |||
@@ -0,0 +1,46 @@ | |||
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_PREPROC_H | ||
18 | #define _GRECS_PREPROC_H | ||
19 | |||
20 | #include <sys/types.h> | ||
21 | |||
22 | extern const char *grecs_preprocessor; | ||
23 | |||
24 | size_t grecs_preproc_fill_buffer(char *buf, size_t size); | ||
25 | void grecs_preproc_add_include_dir(char *dir); | ||
26 | int grecs_preproc_init(const char *name); | ||
27 | void grecs_preproc_done(void); | ||
28 | int grecs_preproc_run(const char *config_file, const char *extpp); | ||
29 | |||
30 | #define GRECS_STD_INCLUDE 0x01 | ||
31 | #define GRECS_USR_INCLUDE 0x02 | ||
32 | |||
33 | size_t grecs_include_path_count(int flag); | ||
34 | int grecs_foreach_include_dir(int flag, int (*fun)(int, const char *, void *), | ||
35 | void *data); | ||
36 | |||
37 | char *grecs_find_include_file(const char *name, int allow_cwd); | ||
38 | |||
39 | FILE *grecs_preproc_extrn_start(const char *file, pid_t *ppid); | ||
40 | void grecs_preproc_extrn_shutdown(pid_t pid); | ||
41 | |||
42 | void grecs_include_path_clear(void); | ||
43 | void grecs_include_path_setup(const char *dir, ...); | ||
44 | void grecs_include_path_setup_v(char **dirs); | ||
45 | |||
46 | #endif | ||