projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Call exsltRegisterAll in yaz_init_globals
[yaz-moved-to-github.git]
/
util
/
json-parse.c
diff --git
a/util/json-parse.c
b/util/json-parse.c
index
a9afe6b
..
ea32ccd
100644
(file)
--- a/
util/json-parse.c
+++ b/
util/json-parse.c
@@
-1,5
+1,5
@@
/* This file is part of the YAZ toolkit.
/* This file is part of the YAZ toolkit.
- * Copyright (C) 1995-2012 Index Data
+ * Copyright (C) Index Data
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
* See the file LICENSE for details.
*/
#if HAVE_CONFIG_H
@@
-55,7
+55,7
@@
int main(int argc, char **argv)
switch (ret)
{
case 'p':
switch (ret)
{
case 'p':
- print = 1;
+ print++;
break;
default:
usage(argv[0]);
break;
default:
usage(argv[0]);
@@
-67,7
+67,10
@@
int main(int argc, char **argv)
if (print)
{
WRBUF result = wrbuf_alloc();
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);
}
puts(wrbuf_cstr(result));
wrbuf_destroy(result);
}