-
-static void dump_ci (oconfig_item_t *ci, int shift)
-{
- int i;
-
- if (shift > 0)
- printf ("%*s", shift, "");
-
- printf ("%s", ci->key);
- for (i = 0; i < ci->values_num; i++)
- {
- oconfig_value_t cv = ci->values[i];
-
- if (cv.type == OCONFIG_TYPE_STRING)
- printf (" `%s'", cv.value.string);
- else if (cv.type == OCONFIG_TYPE_NUMBER)
- printf (" %lf", cv.value.number);
- else if (cv.type == OCONFIG_TYPE_BOOLEAN)
- printf (" %s", cv.value.boolean ? "true" : "false");
- else
- printf ("<unknown type %i>", cv.type);
- }
- printf ("\n");
-
- for (i = 0; i < ci->children_num; i++)
- dump_ci (ci->children + i, shift + 1);
-}