]> granicus.if.org Git - graphviz/commitdiff
mm2gv: remove unused 'mm_read_mtx_array_size'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 8 Apr 2022 15:08:28 +0000 (08:08 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Mon, 11 Apr 2022 02:54:35 +0000 (19:54 -0700)
cmd/tools/mmio.c
cmd/tools/mmio.h

index 0e66cdc9fd4a962607337b1a75d670c738871707..8c25e722319a2e7d63ef875b2cf3911b492b8dc9 100644 (file)
@@ -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)
index 6b72d78f760619591f5662f7fc2a5fd0da5c0196..a093d988b134aba396a629c8b49d9861d4d8dec4 100644 (file)
@@ -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);