Major update: obiarrays with columns containing indices referring to
character strings.
This commit is contained in:
@ -28,7 +28,7 @@
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
int obi_column_set_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx, obichar_t value)
|
||||
int obi_column_set_obichar_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx, obichar_t value)
|
||||
{
|
||||
// Check that the line number is not greater than the maximum allowed
|
||||
if (line_nb >= MAXIMUM_LINE_COUNT)
|
||||
@ -57,7 +57,7 @@ int obi_column_set_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb,
|
||||
}
|
||||
|
||||
|
||||
obichar_t obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, size_t line_nb, size_t element_idx)
|
||||
obichar_t obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, index_t line_nb, index_t element_idx)
|
||||
{
|
||||
if ((line_nb+1) > (column->header)->lines_used)
|
||||
{
|
||||
@ -69,23 +69,23 @@ obichar_t obi_column_get_obichar_with_elt_idx(OBIDMS_column_p column, size_t lin
|
||||
}
|
||||
|
||||
|
||||
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name, obichar_t value)
|
||||
int obi_column_set_obichar_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name, obichar_t value)
|
||||
{
|
||||
size_t element_idx;
|
||||
index_t element_idx;
|
||||
element_idx = obi_column_get_element_index_from_name(column, element_name);
|
||||
if (element_idx == SIZE_MAX) //TODO
|
||||
if (element_idx == OBIIdx_NA)
|
||||
return -1;
|
||||
obi_column_set_obichar_with_elt_idx(column, line_nb, element_idx, value);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, size_t line_nb, const char* element_name)
|
||||
obichar_t obi_column_get_obichar_with_elt_name(OBIDMS_column_p column, index_t line_nb, const char* element_name)
|
||||
{
|
||||
size_t element_idx;
|
||||
index_t element_idx;
|
||||
|
||||
element_idx = obi_column_get_element_index_from_name(column, element_name);
|
||||
if (element_idx == SIZE_MAX) //TODO
|
||||
if (element_idx == OBIIdx_NA)
|
||||
return OBIChar_NA;
|
||||
return obi_column_get_obichar_with_elt_idx(column, line_nb, element_idx);
|
||||
}
|
||||
|
Reference in New Issue
Block a user