/* * Copyright 2023 Oleg Borodin */ #ifndef TCONFIG_H_QWERTY #define TCONFIG_H_QWERTY #include #include #include #include typedef struct { char* errstr; bstream_t stream; tclexer_t lexer; tccomp_t comp; vmapper_t mapper; } tconfig_t; #define TCONF_STR MAPPER_STR #define TCONF_INT MAPPER_INT #define TCONF_BOOL MAPPER_BOOL void tconfig_init(tconfig_t * tconfig); int tconfig_bind(tconfig_t * tconfig, int type, char* name, void* ptr); ssize_t tconfig_read(tconfig_t * tconfig, char* filename); int tconfig_parse(tconfig_t * tconfig); char* tconfig_geterr(tconfig_t * tconfig); void tconfig_destroy(tconfig_t * tconfig); #endif