From d8192f73672488234bd12319229402153e7b6c21 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 14 Sep 2025 00:33:18 -0400 Subject: pom_conf_print implementation --- examples/read_conf.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'examples/read_conf.c') diff --git a/examples/read_conf.c b/examples/read_conf.c index 45a6520..6b7c18f 100644 --- a/examples/read_conf.c +++ b/examples/read_conf.c @@ -21,15 +21,8 @@ int main(int argc, char **argv) { free(error); return EXIT_FAILURE; } - pom_item_iter *iter = NULL; - const pom_item *item; pom_conf_merge(conf,pom_conf_section(conf2,"j")); - while ((item = pom_conf_next_item(conf, &iter))) { - printf("Key: %s, Value: %s\n", item->key, item->value); - const char *file; uint64_t line; - pom_conf_location(conf,item->key,&file,&line); - printf(" Defined at %s:%" PRIu64 "\n",file,line); - } + pom_conf_print(conf); pom_conf_free(conf); pom_conf_free(conf2); } -- cgit v1.2.3