From: Matthew Fernandez Date: Fri, 8 Apr 2022 15:08:28 +0000 (-0700) Subject: mm2gv: remove unused 'mm_read_mtx_array_size' X-Git-Tag: 4.0.0~115^2~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e5a1af7674ef4bb54140ebc279881e6dad1bba07;p=graphviz mm2gv: remove unused 'mm_read_mtx_array_size' --- diff --git a/cmd/tools/mmio.c b/cmd/tools/mmio.c index 0e66cdc9f..8c25e7223 100644 --- a/cmd/tools/mmio.c +++ b/cmd/tools/mmio.c @@ -132,35 +132,6 @@ int mm_read_mtx_crd_size(FILE * f, int *M, int *N, int *nz) return 0; } - -int mm_read_mtx_array_size(FILE * f, int *M, int *N) -{ - char line[MM_MAX_LINE_LENGTH]; - int num_items_read; - /* set return null parameter values, in case we exit with errors */ - *M = *N = 0; - - /* now continue scanning until you reach the end-of-comments */ - do { - if (fgets(line, MM_MAX_LINE_LENGTH, f) == NULL) - return MM_PREMATURE_EOF; - } while (line[0] == '%'); - - /* line[] is either blank or has M,N, nz */ - if (sscanf(line, "%d %d", M, N) == 2) - return 0; - - else /* we have a blank line */ - do { - num_items_read = fscanf(f, "%d %d", M, N); - if (num_items_read == EOF) - return MM_PREMATURE_EOF; - } - while (num_items_read != 2); - - return 0; -} - /*-------------------------------------------------------------------------*/ int mm_write_banner(FILE * f, MM_typecode matcode) diff --git a/cmd/tools/mmio.h b/cmd/tools/mmio.h index 6b72d78f7..a093d988b 100644 --- a/cmd/tools/mmio.h +++ b/cmd/tools/mmio.h @@ -27,7 +27,6 @@ char *mm_typecode_to_str(MM_typecode matcode); int mm_read_banner(FILE * f, MM_typecode * matcode); int mm_read_mtx_crd_size(FILE * f, int *M, int *N, int *nz); -int mm_read_mtx_array_size(FILE * f, int *M, int *N); int mm_write_banner(FILE * f, MM_typecode matcode);