From: erickson Date: Fri, 11 Mar 2005 16:38:22 +0000 (+0000) Subject: added newlines after commas in pretty_print X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=ad00dee9eb5d8a1571a9faa37a7edf6cfd60c23d;p=opensrf%2Fbjwebb.git added newlines after commas in pretty_print git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@212 9efc2488-bf62-4759-914b-345cdb29e865 --- 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';