--- parser3/src/classes/table.C 2009/08/31 08:28:53 1.265 +++ parser3/src/classes/table.C 2009/09/08 09:11:51 1.267 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char * const IDENT_TABLE_C="$Date: 2009/08/31 08:28:53 $"; +static const char * const IDENT_TABLE_C="$Date: 2009/09/08 09:11:51 $"; #if (!defined(NO_STRINGSTREAM) && !defined(FREEBSD4)) #include @@ -462,7 +462,7 @@ static void _save(Request& r, MethodPara if(valid_options!=options->count()) throw Exception(PARSER_RUNTIME, 0, - "invalid option passed"); + INVALID_OPTION_PASSED); } else { throw Exception(PARSER_RUNTIME, 0, @@ -524,7 +524,7 @@ static void _save(Request& r, MethodPara string data=ost.str(); const char* data_cstr=data.c_str(); - file_write(file_spec, data_cstr, data.length(), true /* as text */, do_append); + file_write(r.charsets, file_spec, data_cstr, data.length(), true /* as text */, do_append); } #else @@ -566,8 +566,7 @@ static void _save(Request& r, MethodPara // write { const char* data_cstr=sdata.cstr(); - file_write(file_spec, - data_cstr, sdata.length(), true, do_append); + file_write(r.charsets, file_spec, data_cstr, sdata.length(), true, do_append); if(*data_cstr) // not empty (when empty it's not heap memory) pa_free((void*)data_cstr); // not needed anymore } @@ -920,7 +919,7 @@ static void _sort(Request& r, MethodPara seq[i].value.c_str=Charset::transcode(seq[i].value.c_str, r.charsets.source(), UTF8_charset).cstr(); } -// sort keys + // sort keys _qsort(seq, old_count, sizeof(Table_seq_item), key_values_are_strings?sort_cmp_string:sort_cmp_double); @@ -990,9 +989,8 @@ static void _flip(Request& r, MethodPara } static void _append(Request& r, MethodParams& params) { - // data Temp_lang temp_lang(r, String::L_PASS_APPENDED); - const String& string=r.process_to_string(params.as_junction(0, "body must be code")); + const String& string=r.process_to_string(params[0]); // parse cells Table::element_type row=new ArrayString;