/* * Copyright 2023 Oleg Borodin */ #include #include #include #include #include #include #include #include #include #include int main(void) { int fd = open("test.conf", O_RDONLY); MASSERT(fd > 0); rcache_t cache; rcache_init(&cache, fd); cflexer_t lexer; cflexer_init(&lexer, &cache); char token[1024]; int type = 0; while ((type = cflexer_gettoken(&lexer, token)) != CFLEXTOK_END) { printf("[%d]: [%s]\n", type, token); } printf("[%d]: [%s]\n", type, token); rcache_destroy(&cache); return 0; }