--- parser3/src/classes/table.C 2003/04/14 14:03:11 1.172.2.14.2.31 +++ parser3/src/classes/table.C 2003/09/29 11:03:21 1.185 @@ -5,7 +5,7 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -static const char* IDENT_TABLE_C="$Date: 2003/04/14 14:03:11 $"; +static const char* IDENT_TABLE_C="$Date: 2003/09/29 11:03:21 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -110,7 +110,7 @@ static Table::Action_options get_action_ return result; } -static check_option_param(bool options_defined, +static void check_option_param(bool options_defined, MethodParams& params, size_t next_param_index, const char *msg) { if(next_param_index+(options_defined?1:0) != params.count()) @@ -207,8 +207,9 @@ static void _load(Request& r, MethodPara } // parse cells - Table& table=*new Table(columns); + Table& table=*new Table(columns);//что-то очень плохое с realloc'ом: 1000 сильно помогает char *row_chars; + int cells=0; while(row_chars=getrow(&data)) { // remove empty&comment lines if(!*row_chars || *row_chars == '#') @@ -216,6 +217,7 @@ static void _load(Request& r, MethodPara Table::element_type row(new ArrayString); while(char *cell_chars=lsplit(&row_chars, '\t')) { *row+=new String(cell_chars, 0, true); + cells++; } table+=row; }; @@ -245,8 +247,9 @@ static void _save(Request& r, MethodPara for(int column=0; columncount()) for(size_t column=0; column