From: Eric S. Raymond Date: Fri, 22 Oct 2010 10:45:40 +0000 (-0400) Subject: Port to modern C. X-Git-Tag: 1.4~5 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=257f9b5442a98fcbea7ec0b7e1da0e9106d4eed1;p=xve.git Port to modern C. --- diff --git a/xve.c b/xve.c index 307152a..a60c3d4 100644 --- a/xve.c +++ b/xve.c @@ -5,6 +5,7 @@ #include #include #include +#include #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) {