Branch to refactor and debug (AVLs bugged)
This commit is contained in:
@ -33,7 +33,7 @@
|
||||
|
||||
int obi_column_set_obiseq_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, char* value)
|
||||
{
|
||||
byte_t* value_b;
|
||||
Obi_byte_array_p value_b;
|
||||
index_t idx;
|
||||
|
||||
// Check that the line number is not greater than the maximum allowed
|
||||
@ -56,18 +56,13 @@ int obi_column_set_obiseq_with_elt_idx(OBIDMS_column_p column, index_t line_nb,
|
||||
if ((line_nb+1) > (column->header)->lines_used)
|
||||
(column->header)->lines_used = line_nb+1;
|
||||
|
||||
// Encode the value on a byte array with a header
|
||||
// Encode the value on a byte array with a header // TODO make function
|
||||
value_b = obi_seq_to_obibytes(value);
|
||||
if (value_b == NULL)
|
||||
return -1;
|
||||
|
||||
//if (strlen(value_b) == 0)
|
||||
// fprintf(stderr, "\nPOUIC");
|
||||
|
||||
//fprintf(stderr, "\n>%s||%s", value, obi_obibytes_to_seq(value_b));
|
||||
|
||||
// Add in the AVL tree
|
||||
idx = insert_in_avl_group(column->avl, value_b);
|
||||
idx = obi_avl_group_add(column->avl, value_b);
|
||||
if (idx == -1)
|
||||
return -1;
|
||||
|
||||
@ -119,8 +114,8 @@ int obi_column_set_obiseq_with_elt_idx_in_view(Obiview_p view, OBIDMS_column_p c
|
||||
|
||||
const char* obi_column_get_obiseq_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx)
|
||||
{
|
||||
index_t idx;
|
||||
byte_t* value_b;
|
||||
index_t idx;
|
||||
Obi_byte_array_p value_b;
|
||||
|
||||
if ((line_nb+1) > ((column->header)->line_count))
|
||||
{
|
||||
|
Reference in New Issue
Block a user