|
|
@ -170,8 +170,13 @@ int CvMLData::read_csv(const char* filename) |
|
|
|
|
|
|
|
|
|
|
|
// skip header lines
|
|
|
|
// skip header lines
|
|
|
|
for( int i = 0; i < header_lines_number; i++ ) |
|
|
|
for( int i = 0; i < header_lines_number; i++ ) |
|
|
|
|
|
|
|
{ |
|
|
|
if( fgets( buf, M, file ) == 0 ) |
|
|
|
if( fgets( buf, M, file ) == 0 ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
fclose(file); |
|
|
|
return -1; |
|
|
|
return -1; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// read the first data line and determine the number of variables
|
|
|
|
// read the first data line and determine the number of variables
|
|
|
|
if( !fgets_chomp( buf, M, file )) |
|
|
|
if( !fgets_chomp( buf, M, file )) |
|
|
|