Comments in column headers are now working.
This commit is contained in:
@ -495,7 +495,8 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
index_t nb_lines,
|
||||
index_t nb_elements_per_line,
|
||||
const char* elements_names,
|
||||
const char* array_name)
|
||||
const char* array_name,
|
||||
const char* comments)
|
||||
{
|
||||
OBIDMS_column_p new_column;
|
||||
OBIDMS_column_directory_p column_directory;
|
||||
@ -682,12 +683,14 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||
header->creation_date = time(NULL);
|
||||
header->version = version_number;
|
||||
header->cloned_from = -1;
|
||||
header->comments[0] = 0x0; // TODO
|
||||
|
||||
obi_column_set_elements_names(new_column, elements_names);
|
||||
|
||||
strncpy(header->name, column_name, OBIDMS_COLUMN_MAX_NAME);
|
||||
|
||||
if (comments != NULL)
|
||||
strncpy(header->comments, comments, COMMENTS_MAX_LENGTH);
|
||||
|
||||
// If the data type is OBI_IDX, the associated obi_array is opened or created
|
||||
if (data_type == 5)
|
||||
{
|
||||
@ -880,7 +883,8 @@ OBIDMS_column_p obi_clone_column(OBIDMS_p dms,
|
||||
nb_lines,
|
||||
nb_elements_per_line,
|
||||
(column_to_clone->header)->elements_names,
|
||||
(column_to_clone->header)->array_name);
|
||||
(column_to_clone->header)->array_name,
|
||||
(column_to_clone->header)->comments);
|
||||
|
||||
if (new_column == NULL)
|
||||
{
|
||||
@ -893,7 +897,6 @@ OBIDMS_column_p obi_clone_column(OBIDMS_p dms,
|
||||
}
|
||||
|
||||
(new_column->header)->cloned_from = version_number;
|
||||
//memcpy((new_column->header)->comments, (column_to_clone->header)->comments, obi_get_platform_header_size() - //??(column_to_clone->header)->comments); // TODO
|
||||
|
||||
if (clone_data)
|
||||
{
|
||||
@ -1284,7 +1287,7 @@ int obi_unmap_header(OBIDMS_column_header_p header)
|
||||
}
|
||||
|
||||
|
||||
// TODO to be rewritten in an optimized and safe way
|
||||
// TODO to be rewritten in an optimized and safe way if possible
|
||||
index_t obi_column_get_element_index_from_name(OBIDMS_column_p column, const char* element_name)
|
||||
{
|
||||
char* elements_names;
|
||||
|
Reference in New Issue
Block a user