--- parser3/src/classes/table.C 2016/09/21 01:48:54 1.330 +++ parser3/src/classes/table.C 2016/09/29 18:49:43 1.334 @@ -22,7 +22,7 @@ #define USE_STRINGSTREAM #endif -volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.330 2016/09/21 01:48:54 moko Exp $"; +volatile const char * IDENT_TABLE_C="$Id: table.C,v 1.334 2016/09/29 18:49:43 moko Exp $"; // class @@ -203,12 +203,13 @@ static lsplit_sresult lsplit(char** stri *(pos++)=0; result.append(helper.extract(*string_ref)); if(*pos==encloser && helper.check_lang(pos)){ // double-encloser stands for encloser - *string_ref=pos++; + *string_ref=pos; } else { *string_ref=pos; break; } } + pos++; } else { result.append(helper.extract(*string_ref)); *string_ref=0; @@ -780,7 +781,7 @@ static void _menu(Request& r, MethodPara for(size_t row=0; rowkey_code) { info->table->set_current(info->row++); // change context row - StringOrValue sv_processed=info->r->process(*info->key_code); + Value& sv_processed=info->r->process(*info->key_code); key=&sv_processed.as_string(); } else { key=info->key_fieldcount()?row->get(info->key_field):0; @@ -883,7 +884,7 @@ static void table_row_to_hash(Table::ele case C_CODE: { if(!info->key_code) info->table->set_current(info->row++); // change context row - exist=info->hash->put_dont_replace(*key, &info->r->process(*info->value_code).as_value()); + exist=info->hash->put_dont_replace(*key, &info->r->process(*info->value_code)); break; } } @@ -1075,7 +1076,7 @@ static void _sort(Request& r, MethodPara if(r.charsets.source().NAME()=="KOI8-R" && key_values_are_strings) { for(i=0; iis_empty()? 0 : rownum_var_name; + value_var_name=value_var_name->is_empty()? 0 : value_var_name; Value* var_context=r.get_method_frame()->caller(); @@ -1173,7 +1174,7 @@ static void _foreach(Request& r, MethodP if(value_var_name) r.put_element(*var_context, *value_var_name, new VTable(&table)); - StringOrValue sv_processed=r.process(body_code); + Value& sv_processed=r.process(body_code); Request::Skip lskip=r.get_skip(); r.set_skip(Request::SKIP_NOTHING); const String* s_processed=sv_processed.get_string();