--- parser3/src/main/Attic/pa_array.C 2001/02/22 15:17:40 1.18 +++ parser3/src/main/Attic/pa_array.C 2001/03/11 08:16:34 1.22 @@ -1,5 +1,9 @@ /* - $Id: pa_array.C,v 1.18 2001/02/22 15:17:40 paf Exp $ + Parser + Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) + Author: Alexander Petrosyan (http://design.ru/paf) + + $Id: pa_array.C,v 1.22 2001/03/11 08:16:34 paf Exp $ */ #include @@ -23,6 +27,9 @@ Array::Array(Pool& apool, int initial_ro } void Array::expand(int chunk_rows) { + if(chunk_rows( malloc(sizeof(int)+sizeof(Chunk::Row)*chunk_rows+sizeof(Chunk *))); chunk->count=chunk_rows; @@ -117,10 +124,11 @@ Array& Array::append_array(const Array& if(rows_to_copy_now>0) memcpy(dest_rows, src_chunk->rows+rows_left_to_skip, sizeof(Chunk::Row)*rows_to_copy_now); + else + rows_left_to_skip-=src_count; + dest_rows+=rows_to_copy_now; rows_left_to_copy-=src_count; - rows_left_to_skip-=src_count; - src_chunk=next_chunk; } else { // the last source chunk