ctl-client: Rename print_as_yaml -> print_for_human
The goal is to have this human friendly, not yaml.wayvncctl-polishing
parent
69029d317f
commit
7ac8154448
|
@ -506,7 +506,7 @@ static bool json_has_content(json_t* root)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void print_as_yaml(json_t* data, int level, bool needs_leading_newline)
|
static void print_for_human(json_t* data, int level, bool needs_leading_newline)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
const char* key;
|
const char* key;
|
||||||
|
@ -531,7 +531,7 @@ static void print_as_yaml(json_t* data, int level, bool needs_leading_newline)
|
||||||
needs_indent = true;
|
needs_indent = true;
|
||||||
|
|
||||||
printf("%s: ", key);
|
printf("%s: ", key);
|
||||||
print_as_yaml(value, level + 1, true);
|
print_for_human(value, level + 1, true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case JSON_ARRAY:
|
case JSON_ARRAY:
|
||||||
|
@ -544,7 +544,7 @@ static void print_as_yaml(json_t* data, int level, bool needs_leading_newline)
|
||||||
|
|
||||||
print_indent(level);
|
print_indent(level);
|
||||||
printf("- ");
|
printf("- ");
|
||||||
print_as_yaml(value, level + 1, json_is_array(value));
|
print_for_human(value, level + 1, json_is_array(value));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case JSON_STRING:
|
case JSON_STRING:
|
||||||
|
@ -572,7 +572,7 @@ static void print_event(struct jsonipc_request* event, unsigned flags)
|
||||||
} else {
|
} else {
|
||||||
printf("\n%s:", event->method);
|
printf("\n%s:", event->method);
|
||||||
if (event->params)
|
if (event->params)
|
||||||
print_as_yaml(event->params, 1, true);
|
print_for_human(event->params, 1, true);
|
||||||
else
|
else
|
||||||
printf("<<null>\n");
|
printf("<<null>\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue