- struct ast_str *output;
-
- /* print the initial node. */
- output = ast_str_create(30);
- if (!output) {
- return;
- }
-
- ast_term_color_code(&output, data_result_get_color(root->type), 0);
- ast_str_append(&output, 0, "%s\n", root->name);
- ast_term_color_code(&output, COLOR_WHITE, 0);
- ast_cli(fd, "%s", ast_str_buffer(output));
- ast_free(output);
+ ast_cli(fd, COLORIZE_FMT "\n", COLORIZE(data_result_get_color(root->type), 0, root->name));