--- parser3/src/classes/table.C 2013/10/10 23:06:28 1.297 +++ parser3/src/classes/table.C 2013/10/10 23:08:12 1.298 @@ -21,7 +21,7 @@ #include "pa_vbool.h" #include "pa_array.h" -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.297 2013/10/10 23:06:28 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.298 2013/10/10 23:08:12 moko Exp $"; // class @@ -406,7 +406,7 @@ static void _load(Request& r, MethodPara typedef std::basic_stringstream, gc_allocator > pa_stringstream; typedef std::basic_string, gc_allocator > pa_string; -void maybe_enclose( pa_stringstream& to, const String* from, char encloser ) { +static void enclose( pa_stringstream& to, const String* from, char encloser ) { if(from){ to< i(*table.columns()); i.has_next(); ) { - maybe_enclose( result, i.next(), separators.encloser ); + enclose( result, i.next(), separators.encloser ); if(i.has_next()) result< c(*i.next()); c.has_next(); ) { - maybe_enclose( result, c.next(), separators.encloser ); + enclose( result, c.next(), separators.encloser ); if(c.has_next()) result< i(*table.columns()); i.has_next(); ) { - maybe_enclose( result, i.next(), separators.encloser, separators.sencloser ); + enclose( result, i.next(), separators.encloser, separators.sencloser ); if(i.has_next()) result<<*separators.scolumn; } @@ -524,11 +524,14 @@ static void table_to_csv(String& result, } else { // nameless table [we were asked to output column names] if(int lsize=table.count()?table[0]->count():0) for(int column=0; column c(*i.next()); c.has_next(); ) { - maybe_enclose( result, c.next(), separators.encloser, separators.sencloser ); + enclose( result, c.next(), separators.encloser, separators.sencloser ); if(c.has_next()) result<<*separators.scolumn; }