44 if (sscanf(line,
"%63s %63s %63s %63s %63s", banner, mtx, crd, data_type,
70 else if (strcasecmp(data_type,
MM_INT_STR) == 0)
80 else if (strcasecmp(storage_scheme,
MM_SYMM_STR) == 0)
82 else if (strcasecmp(storage_scheme,
MM_HERM_STR) == 0)
84 else if (strcasecmp(storage_scheme,
MM_SKEW_STR) == 0)
105 }
while (line[0] ==
'%');
108 if (sscanf(line,
"%d %d %" PRISIZE_T,
M,
N, nz) == 3)
113 num_items_read = fscanf(f,
"%d %d %" PRISIZE_T,
M,
N, nz);
114 if (num_items_read == EOF)
117 while (num_items_read != 3);
int mm_read_mtx_crd_size(FILE *f, int *M, int *N, size_t *nz)
int mm_read_banner(FILE *f, MM_typecode *matcode)
#define MM_MAX_LINE_LENGTH
#define MM_MAX_TOKEN_LENGTH
#define MM_UNSUPPORTED_TYPE
#define MatrixMarketBanner
static bool startswith(const char *s, const char *prefix)
does the string s begin with the string prefix?
platform abstraction for case-insensitive string functions
int type
one of the MATRIX_TYPE_* values from lib/sparse