43 if (sscanf(line,
"%63s %63s %63s %63s %63s", banner, mtx, crd, data_type,
71 else if (strcasecmp(storage_scheme,
MM_SYMM_STR) == 0)
73 else if (strcasecmp(storage_scheme,
MM_HERM_STR) == 0)
75 else if (strcasecmp(storage_scheme,
MM_SKEW_STR) == 0)
96 }
while (line[0] ==
'%');
99 if (sscanf(line,
"%d %d %" PRISIZE_T,
M,
N, nz) == 3)
104 num_items_read = fscanf(f,
"%d %d %" PRISIZE_T,
M,
N, nz);
105 if (num_items_read == EOF)
108 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, matrix_shape_t *shape)
#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