From 257f9b5442a98fcbea7ec0b7e1da0e9106d4eed1 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 22 Oct 2010 06:45:40 -0400 Subject: [PATCH] Port to modern C. --- xve.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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) { -- 2.43.0