/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2010 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include <stdio.h>
#include <stdlib.h>
switch (ret)
{
case 'p':
- print = 1;
+ print++;
break;
default:
usage(argv[0]);
if (print)
{
WRBUF result = wrbuf_alloc();
- json_write_wrbuf(n, result);
+ if (print > 1)
+ json_write_wrbuf_pretty(n, result);
+ else
+ json_write_wrbuf(n, result);
puts(wrbuf_cstr(result));
wrbuf_destroy(result);
}