+ {
+ if (convert_to_ccl)
+ {
+ cql_to_ccl_stdio(cql_parser_result(cp), stdout);
+ putchar('\n');
+ }
+ else
+ cql_to_xml_stdio(cql_parser_result(cp), stdout);
+ if (do_sortkeys)
+ {
+ WRBUF w = wrbuf_alloc();
+ r = cql_sortby_to_sortkeys(cql_parser_result(cp),
+ wrbuf_vp_puts, w);
+ if (r == 0)
+ printf("sortkeys: %s\n", wrbuf_cstr(w));
+ else
+ fprintf(stderr, "failed to generate sortkeys\n");
+ wrbuf_destroy(w);
+ }
+ }