Changed file name limits to adapt to system limits + minor changes

This commit is contained in:
Celine Mercier
2016-09-22 18:05:07 +02:00
parent b083745f56
commit b408a4f6eb
6 changed files with 43 additions and 23 deletions

View File

@ -1645,7 +1645,6 @@ int obi_view_add_column(Obiview_p view,
int i;
OBIDMS_column_p column;
OBIDMS_column_p column_buffer;
OBIDMS_column_p current_line_selection;
// Check that the view is not read-only
if (view->read_only)
@ -1702,19 +1701,24 @@ int obi_view_add_column(Obiview_p view,
if (create)
{ // Create column
column = obi_create_column(view->dms, column_name, data_type, nb_lines, nb_elements_per_line, elements_names, indexer_name, associated_column_name, associated_column_version, comments);
if (column == NULL)
{
obidebug(1, "\nError creating a column to add to a view");
return -1;
}
(column->header)->lines_used = nb_lines;
}
else
{ // Open column
// TODO do we require that the column's line count is equal to the view's line count?
// or do we enlarge the column or the view as needed?
column = obi_open_column(view->dms, column_name, version_number);
}
if (column == NULL)
{
obidebug(1, "\nError creating or opening a column to add to a view");
return -1;
if (column == NULL)
{
obidebug(1, "\nError opening a column to add to a view");
return -1;
}
// Check that the column's line count is equal to the view's line count if there is no line selection.
// TODO But what if there is a line selection ??? imo should just check that col_line_count > line_selection_count
//if ()
}
// Store column pointer in the view structure