minor change in variable name for better coherence
This commit is contained in:
@ -604,11 +604,11 @@ size_t obi_get_platform_header_size()
|
|||||||
|
|
||||||
|
|
||||||
OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
||||||
const char *column_name,
|
const char* column_name,
|
||||||
OBIType_t type,
|
OBIType_t data_type,
|
||||||
size_t nb_lines,
|
size_t nb_lines,
|
||||||
size_t nb_elements_per_line,
|
size_t nb_elements_per_line,
|
||||||
const char* elements_names)
|
const char* elements_names)
|
||||||
{
|
{
|
||||||
OBIDMS_column_p new_column;
|
OBIDMS_column_p new_column;
|
||||||
OBIDMS_column_directory_p column_directory;
|
OBIDMS_column_directory_p column_directory;
|
||||||
@ -635,14 +635,14 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
|||||||
obidebug(1, "\nCan't create column because of empty column name");
|
obidebug(1, "\nCan't create column because of empty column name");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
if ((type < 1) || (type > 4))
|
if ((data_type < 1) || (data_type > 4))
|
||||||
{
|
{
|
||||||
obidebug(1, "\nCan't create column because of invalid data type");
|
obidebug(1, "\nCan't create column because of invalid data type");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// The initial line count should be between the minimum (corresponding to the page size) and the maximum allowed
|
// The initial line count should be between the minimum (corresponding to the page size) and the maximum allowed
|
||||||
minimum_line_count = get_line_count_per_page(type, nb_elements_per_line);
|
minimum_line_count = get_line_count_per_page(data_type, nb_elements_per_line);
|
||||||
if (nb_lines > MAXIMUM_LINE_COUNT)
|
if (nb_lines > MAXIMUM_LINE_COUNT)
|
||||||
{
|
{
|
||||||
obidebug(1, "\nCan't create column because of line count greater than the maximum allowed (%lld)", MAXIMUM_LINE_COUNT);
|
obidebug(1, "\nCan't create column because of line count greater than the maximum allowed (%lld)", MAXIMUM_LINE_COUNT);
|
||||||
@ -701,7 +701,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
|||||||
|
|
||||||
// Calculate the size needed
|
// Calculate the size needed
|
||||||
header_size = obi_get_platform_header_size();
|
header_size = obi_get_platform_header_size();
|
||||||
data_size = obi_array_sizeof(type, nb_lines, nb_elements_per_line);
|
data_size = obi_array_sizeof(data_type, nb_lines, nb_elements_per_line);
|
||||||
file_size = header_size + data_size;
|
file_size = header_size + data_size;
|
||||||
|
|
||||||
// Get the latest version number
|
// Get the latest version number
|
||||||
@ -796,7 +796,7 @@ OBIDMS_column_p obi_create_column(OBIDMS_p dms,
|
|||||||
header->line_count = nb_lines;
|
header->line_count = nb_lines;
|
||||||
header->lines_used = 0;
|
header->lines_used = 0;
|
||||||
header->nb_elements_per_line = nb_elements_per_line;
|
header->nb_elements_per_line = nb_elements_per_line;
|
||||||
header->data_type = type;
|
header->data_type = data_type;
|
||||||
header->creation_date = time(NULL);
|
header->creation_date = time(NULL);
|
||||||
header->version = version_number;
|
header->version = version_number;
|
||||||
header->cloned_from = -1;
|
header->cloned_from = -1;
|
||||||
|
Reference in New Issue
Block a user