The number of lines used is updated in the header when a value is set,

and the iteration on the values of a column is done on the number of
lines used (instead of on the total line count).
This commit is contained in:
Celine Mercier
2015-08-26 17:25:15 +02:00
parent 34ade161de
commit 3b7536c0df
9 changed files with 37 additions and 8 deletions

View File

@ -30,7 +30,9 @@
int obi_column_set_int_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx, obiint_t value)
{
// when/where check if can write?
// Update lines used
if ((line_nb+1) > (column->header)->lines_used)
(column->header)->lines_used = line_nb+1;
*(((obiint_t*) (column->data)) + (line_nb * ((column->header)->nb_elements_per_line)) + element_idx) = value;
return 0;
}