]> granicus.if.org Git - graphviz/commitdiff
mm2gv: remove unused 'mm_is_valid'
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 8 Apr 2022 15:06:30 +0000 (08:06 -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 21f2574df05a0338436226f7c02dac2517232c51..6cd5e7b89c6e9448ddfbbf1c8d8156e8e99a4d3a 100644 (file)
 
 #include "mmio.h"
 
-int mm_is_valid(MM_typecode matcode)
-{
-    if (!mm_is_matrix(matcode))
-       return 0;
-    if (mm_is_dense(matcode) && mm_is_pattern(matcode))
-       return 0;
-    if (mm_is_real(matcode) && mm_is_hermitian(matcode))
-       return 0;
-    if (mm_is_pattern(matcode) && (mm_is_hermitian(matcode) ||
-                                  mm_is_skew(matcode)))
-       return 0;
-    return 1;
-}
-
 int mm_read_banner(FILE * f, MM_typecode * matcode)
 {
     char line[MM_MAX_LINE_LENGTH];
index ab65ec868cded587f24bc3722c5fe4f7cd5cfed3..4b38ad6a0b23ad320faa0c6eec83be11040e3c34 100644 (file)
@@ -53,9 +53,6 @@ int mm_write_mtx_array_size(FILE * f, int M, int N);
 #define mm_is_skew(typecode)   ((typecode)[3]=='K')
 #define mm_is_hermitian(typecode)((typecode)[3]=='H')
 
-int mm_is_valid(MM_typecode matcode);  /* too complex for a macro */
-
-
 /********************* MM_typecode modify fucntions ***************************/
 
 #define mm_set_matrix(typecode)        ((*typecode)[0]='M')