--- parser3/src/classes/table.C 2003/07/24 11:31:20 1.182 +++ 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/07/24 11:31:20 $"; +static const char* IDENT_TABLE_C="$Date: 2003/09/29 11:03:21 $"; #include "classes.h" #include "pa_vmethod_frame.h" @@ -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