X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fcount.c;h=4cdf90ecbd083e85e88d8477240e70c68f409936;hb=37597beca4a11edba50b847932fdfeca3a648fa2;hp=cf8d0676737710ce1eeb3bed34f876c0404b50e5;hpb=18febf84744dc7ab4248542c2f88d91c01ef3fa1;p=pspp diff --git a/src/count.c b/src/count.c index cf8d067673..4cdf90ecbd 100644 --- a/src/count.c +++ b/src/count.c @@ -21,7 +21,6 @@ #include #include #include "alloc.h" -#include "approx.h" #include "command.h" #include "error.h" #include "lexer.h" @@ -129,8 +128,8 @@ static struct cnt_var_info *head; /* Parser. */ -static int count_trns_proc (struct trns_header *, struct ccase *); -static void count_trns_free (struct trns_header *); +static trns_proc_func count_trns_proc; +static trns_free_func count_trns_free; static int parse_numeric_criteria (struct counting *); static int parse_string_criteria (struct counting *); @@ -418,22 +417,22 @@ count_numeric (struct counting * cnt, struct ccase * c) assert (0); break; case CNT_SINGLE: - if (approx_ne (cmp, num->a)) + if (cmp != num->a) break; counter++; goto done; case CNT_HIGH: - if (approx_lt (cmp, num->a)) + if (cmp < num->a) break; counter++; goto done; case CNT_LOW: - if (approx_gt (cmp, num->a)) + if (cmp > num->a) break; counter++; goto done; case CNT_RANGE: - if (approx_lt (cmp, num->a) || approx_gt (cmp, num->b)) + if (cmp < num->a || cmp > num->b) break; counter++; goto done; @@ -491,7 +490,8 @@ count_string (struct counting * cnt, struct ccase * c) /* Performs the COUNT transformation T on case C. */ static int -count_trns_proc (struct trns_header * trns, struct ccase * c) +count_trns_proc (struct trns_header * trns, struct ccase * c, + int case_num UNUSED) { struct cnt_var_info *info; struct counting *cnt;