Commit 15b8b407 authored by Baptiste Daroussin's avatar Baptiste Daroussin
Browse files

Really update to 8d3b186

parent 513f8791
...@@ -46,7 +46,7 @@ ucl_obj_dump (const ucl_object_t *obj, unsigned int shift) ...@@ -46,7 +46,7 @@ ucl_obj_dump (const ucl_object_t *obj, unsigned int shift)
if (obj->key != NULL) { if (obj->key != NULL) {
printf ("%skey: \"%s\"\n", pre, ucl_object_key (obj)); printf ("%skey: \"%s\"\n", pre, ucl_object_key (obj));
} }
printf ("%sref: %hd\n", pre, obj->ref); printf ("%sref: %u\n", pre, obj->ref);
printf ("%slen: %u\n", pre, obj->len); printf ("%slen: %u\n", pre, obj->len);
printf ("%sprev: %p\n", pre, obj->prev); printf ("%sprev: %p\n", pre, obj->prev);
printf ("%snext: %p\n", pre, obj->next); printf ("%snext: %p\n", pre, obj->next);
...@@ -61,7 +61,10 @@ ucl_obj_dump (const ucl_object_t *obj, unsigned int shift) ...@@ -61,7 +61,10 @@ ucl_obj_dump (const ucl_object_t *obj, unsigned int shift)
else if (obj->type == UCL_ARRAY) { else if (obj->type == UCL_ARRAY) {
printf ("%stype: UCL_ARRAY\n", pre); printf ("%stype: UCL_ARRAY\n", pre);
printf ("%svalue: %p\n", pre, obj->value.av); printf ("%svalue: %p\n", pre, obj->value.av);
ucl_obj_dump (obj->value.av, shift + 2); it_obj = NULL;
while ((cur = ucl_iterate_object (obj, &it_obj, true))) {
ucl_obj_dump (cur, shift + 2);
}
} }
else if (obj->type == UCL_INT) { else if (obj->type == UCL_INT) {
printf ("%stype: UCL_INT\n", pre); printf ("%stype: UCL_INT\n", pre);
...@@ -96,7 +99,7 @@ int ...@@ -96,7 +99,7 @@ int
main(int argc, char **argv) main(int argc, char **argv)
{ {
const char *fn = NULL; const char *fn = NULL;
char inbuf[8192]; unsigned char inbuf[8192];
struct ucl_parser *parser; struct ucl_parser *parser;
int k, ret = 0, r = 0; int k, ret = 0, r = 0;
ucl_object_t *obj = NULL; ucl_object_t *obj = NULL;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment