diff options
Diffstat (limited to 'include/argot/preproc.h')
-rw-r--r-- | include/argot/preproc.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/include/argot/preproc.h b/include/argot/preproc.h new file mode 100644 index 0000000..dc567c8 --- /dev/null +++ b/include/argot/preproc.h @@ -0,0 +1,46 @@ +/* argot - Gray's Extensible Configuration System -*- c -*- + Copyright (C) 2007-2016 Sergey Poznyakoff + + Grecs is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by the + Free Software Foundation; either version 3 of the License, or (at your + option) any later version. + + Grecs is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with Grecs. If not, see <http://www.gnu.org/licenses/>. */ + +#ifndef _ARGOT_PREPROC_H +#define _ARGOT_PREPROC_H + +#include <sys/types.h> + +extern const char *argot_preprocessor; + +size_t argot_preproc_fill_buffer(char *buf, size_t size); +void argot_preproc_add_include_dir(char *dir); +int argot_preproc_init(const char *name); +void argot_preproc_done(void); +int argot_preproc_run(const char *config_file, const char *extpp); + +#define ARGOT_STD_INCLUDE 0x01 +#define ARGOT_USR_INCLUDE 0x02 + +size_t argot_include_path_count(int flag); +int argot_foreach_include_dir(int flag, int (*fun)(int, const char *, void *), + void *data); + +char *argot_find_include_file(const char *name, int allow_cwd); + +FILE *argot_preproc_extrn_start(const char *file, pid_t *ppid); +void argot_preproc_extrn_shutdown(pid_t pid); + +void argot_include_path_clear(void); +void argot_include_path_setup(const char *dir, ...); +void argot_include_path_setup_v(char **dirs); + +#endif |