]> granicus.if.org Git - graphviz/commitdiff
remove unused validQ_int_string
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 23 Jun 2021 03:47:10 +0000 (20:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Fri, 25 Jun 2021 13:52:00 +0000 (06:52 -0700)
lib/sparse/general.c
lib/sparse/general.h

index ff7355ba1c9e1615cb0473e2593e795979cbdb68..cb39e46440286b9ba05270960675c6866e6a429c 100644 (file)
@@ -245,18 +245,3 @@ void scale_to_box(real xmin, real ymin, real xmax, real ymax, int n, int dim, re
   
   
 }
-
-int validQ_int_string(char *to_convert, int *v){
-  /* check to see if this is a string is integer */
-  char *p = to_convert;
-  uint64_t val;
-  errno = 0;
-  val = strtoul(to_convert, &p, 10);
-  if (errno != 0 ||// conversion failed (EINVAL, ERANGE)
-      to_convert == p || // conversion failed (no characters consumed)
-      *p != 0
-      ) return 0;
-  if (val > (uint64_t)INT_MAX) return 0;
-  *v = (int) val;
-  return 1;
-}
index 76acea20a01e6bb85861caf61811d1e83710b173..963b56df112e3c2f6940a7da747b9bcaa930e90c 100644 (file)
@@ -124,9 +124,6 @@ char *strip_dir(char *s);
 
 void scale_to_box(real xmin, real ymin, real xmax, real ymax, int n, int dim, real *x);
 
-/* check to see if this is a string is integer (that can be casted into an integer variable hence very long list of digits are not valid, like 123456789012345. Return 1 if true, 0 if false. */
-int validQ_int_string(char *to_convert, int *v);
-
 #endif