From 52f3b8a860edd07949734f347f7dcec18274ebe7 Mon Sep 17 00:00:00 2001 From: pommicket Date: Sun, 14 Sep 2025 15:50:03 -0400 Subject: get_list --- examples/read_conf.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'examples/read_conf.c') diff --git a/examples/read_conf.c b/examples/read_conf.c index 24fade0..be1f97a 100644 --- a/examples/read_conf.c +++ b/examples/read_conf.c @@ -13,10 +13,11 @@ int main(int argc, char **argv) { free(error); return EXIT_FAILURE; } - double value; - const char *s = pom_conf_get_float_or_default(conf, "number.best", &value, 3.6); - printf("%f\n", value); - if (s) printf(" -> %s\n",s); + char **list = pom_conf_get_list(conf, "things"); + for (size_t i = 0; list[i]; i++) { + printf("%s\n",list[i]); + } + free(list); pom_conf_print(conf); pom_conf_free(conf); } -- cgit v1.2.3