From ad00dee9eb5d8a1571a9faa37a7edf6cfd60c23d Mon Sep 17 00:00:00 2001 From: erickson Date: Fri, 11 Mar 2005 16:38:22 +0000 Subject: [PATCH] added newlines after commas in pretty_print git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@212 9efc2488-bf62-4759-914b-345cdb29e865 --- src/srfsh/srfsh.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index 1707992..372fffc 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -550,7 +550,21 @@ char* json_printer( json* object ) { buffer_add( buf, tab ); free(tab); + } else if( string[i] == ',' ) { + +// tab_var--; +// buffer_add(buf, "\n"); + buffer_add( buf, ","); + buffer_add( buf, "\n" ); + char* tab = tabs(tab_var); + buffer_add(buf, tab); + free(tab); +// tab = tabs(tab_var); +// buffer_add( buf, tab ); +// free(tab); + } else { + char b[2]; b[0] = string[i]; b[1] = '\0'; -- 2.11.0