From: scottmk Date: Fri, 6 Nov 2009 12:34:34 +0000 (+0000) Subject: Corrected a glitch in the command-line parser. Now commas X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=d44d23af8fdd73522ca6892830c58d22ed47df2d;p=working%2FOpenSRF.git Corrected a glitch in the command-line parser. Now commas are treated as the equivalent of white space between parameters. For example { "a":5 },{ "b":true } is parsed as two separate JSON objects, even though there is no white space between them. M src/srfsh/srfsh.c git-svn-id: svn://svn.open-ils.org/OpenSRF/trunk@1845 9efc2488-bf62-4759-914b-345cdb29e865 --- diff --git a/src/srfsh/srfsh.c b/src/srfsh/srfsh.c index ffa15f8..e99d5cc 100644 --- a/src/srfsh/srfsh.c +++ b/src/srfsh/srfsh.c @@ -1306,8 +1306,9 @@ static void parse_args( const char* request, osrfStringArray* cmd_array ) while( !done ) { OSRF_BUFFER_RESET( parser.buf ); - // skip any white space - while( *parser.itr && isspace( (unsigned char) *parser.itr ) ) + // skip any white space or commas + while( *parser.itr + && ( isspace( (unsigned char) *parser.itr ) || ',' == *parser.itr ) ) ++parser.itr; if( '\0' == *parser.itr )