mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
MainEXFile: Fix Col() to accept EX_LIST
MainEXFile.Col() returns the number of items for EX_LIST handles. Also removed the FIXME comments from Row and Col since the semantics appear correct.
This commit is contained in:
@@ -225,13 +225,16 @@ static int MainEXFile_RA2Handle(int handle, int row, struct string *format_name)
|
||||
static int MainEXFile_Row(int handle)
|
||||
{
|
||||
struct ex_table *t = handle_to_table(handle);
|
||||
return t ? t->nr_rows : 0; // FIXME: should this be nr_columns?
|
||||
return t ? t->nr_rows : 0;
|
||||
}
|
||||
|
||||
static int MainEXFile_Col(int handle)
|
||||
{
|
||||
if (handle > 0 && (unsigned)handle < nr_handles &&
|
||||
handles[handle]->type == EX_LIST)
|
||||
return handles[handle]->list->nr_items;
|
||||
struct ex_table *t = handle_to_table(handle);
|
||||
return t ? t->nr_columns : 0; // FIXME: should this be nr_rows?
|
||||
return t ? t->nr_columns : 0;
|
||||
}
|
||||
|
||||
static int MainEXFile_Type(int handle)
|
||||
|
||||
Reference in New Issue
Block a user