From e6b08f71f9ebf06541551f49a3ecda324918e440 Mon Sep 17 00:00:00 2001 From: Martin Szulecki Date: Fri, 22 Jan 2010 12:47:35 +0100 Subject: Indent output of iphoneinfo in key/value mode --- tools/iphoneinfo.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/iphoneinfo.c') diff --git a/tools/iphoneinfo.c b/tools/iphoneinfo.c index 7c41033..acb62f7 100644 --- a/tools/iphoneinfo.c +++ b/tools/iphoneinfo.c @@ -55,6 +55,8 @@ static const char *domains[] = { NULL }; +static int indent_level = 0; + int is_domain_known(char *domain); void print_usage(int argc, char **argv); void plist_node_to_string(plist_t node); @@ -265,7 +267,9 @@ void plist_node_to_string(plist_t node) case PLIST_ARRAY: case PLIST_DICT: printf("\n"); + indent_level++; plist_children_to_string(node); + indent_level--; break; default: break; @@ -283,6 +287,7 @@ void plist_children_to_string(plist_t node) plist_dict_next_item(node, it, &key, &subnode); while (subnode) { + printf("%*s", indent_level, ""); printf("%s: ", key); free(key); key = NULL; -- cgit v1.1-32-gdbae