43 if (sscanf(line,
"%63s %63s %63s %63s %63s", banner, mtx, crd, data_type,
69 else if (strcasecmp(data_type,
MM_INT_STR) == 0)
79 else if (strcasecmp(storage_scheme,
MM_SYMM_STR) == 0)
81 else if (strcasecmp(storage_scheme,
MM_HERM_STR) == 0)
83 else if (strcasecmp(storage_scheme,
MM_SKEW_STR) == 0)
104 }
while (line[0] ==
'%');
107 if (sscanf(line,
"%d %d %d",
M,
N, nz) == 3)
112 num_items_read = fscanf(f,
"%d %d %d",
M,
N, nz);
113 if (num_items_read == EOF)
116 while (num_items_read != 3);
int mm_read_mtx_crd_size(FILE *f, int *M, int *N, int *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