]> thyrsus.com Git - xve.git/commitdiff
Port to modern C.
authorEric S. Raymond <esr@thyrsus.com>
Fri, 22 Oct 2010 10:45:40 +0000 (06:45 -0400)
committerEric S. Raymond <esr@thyrsus.com>
Fri, 22 Oct 2010 10:45:40 +0000 (06:45 -0400)
xve.c

diff --git a/xve.c b/xve.c
index 307152ac22e577bda4401bc1821c79e3d930bf4c..a60c3d46c38d71c5ab56eca6ce2a8322351e9c10 100644 (file)
--- a/xve.c
+++ b/xve.c
@@ -5,6 +5,7 @@
 #include <math.h>
 #include <string.h>
 #include <ctype.h>
+#include <stdlib.h>
 
 #ifndef TRUE
 typedef int bool;
@@ -199,9 +200,10 @@ static bool yornp(const char *prompt, const bool deflt)
    return(deflt);
 }
 
-static int floatcmp(const float *f1, const float *f2)
+static int floatcmp(const void *vf1, const void *vf2)
 /* reverse-compare floats, so we get decreasing order */
 {
+    float *f1 = (float *)vf1, *f2 = (float *)vf2;
     return((int) (*f2 - *f1));
 }
 
@@ -533,7 +535,7 @@ static int sanecheck(const int level)
     if (level >= CLOCK)
     {
        bool sync_ok = TRUE;
-       int minhfl;
+       float minhfl;
 
        if (hs1.value <= hr.value)
        {