summaryrefslogtreecommitdiff
path: root/examples/read_conf.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/read_conf.c')
-rw-r--r--examples/read_conf.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/examples/read_conf.c b/examples/read_conf.c
index 966f0a2..78e4847 100644
--- a/examples/read_conf.c
+++ b/examples/read_conf.c
@@ -22,7 +22,16 @@ int main(int argc, char **argv) {
const pom_item *item;
pom_item_iter *iter = NULL;
while ((item = pom_conf_next_item(conf, &iter))) {
- printf("Key: %s, Value: %s\n", item->key, item->value);
+ printf("Key: %s, Value: %s\n", item->key, item->value);
+ }
+ pom_unread_key_iter *unread = NULL;
+ const char *key;
+ while ((key = pom_conf_next_unread_key(conf, &unread))) {
+ printf("Unrecognized key: %s\n", key);
+ }
+ pom_key_iter *keys = NULL;
+ while ((key = pom_conf_next_key(conf, &keys))) {
+ printf("Top-level key: %s\n", key);
}
pom_conf_free(conf);
}