X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fdescript.q;h=3e5c6a4e427a16be5e2886a2d1956468a0cc3db6;hb=2ca4a5735ccbbe66ae2277faf6aa47e2bb83bfab;hp=84bc16c5fabc956d978135b4c3b3cbc8a2477586;hpb=5906e30c29662d12594199e1652ba3a7e5670944;p=pspp diff --git a/src/descript.q b/src/descript.q index 84bc16c5fa..3e5c6a4e42 100644 --- a/src/descript.q +++ b/src/descript.q @@ -30,7 +30,6 @@ #include "command.h" #include "lexer.h" #include "error.h" -#include "approx.h" #include "magic.h" #include "stats.h" #include "som.h" @@ -289,7 +288,7 @@ cmd_descriptives (void) /* Data pass! */ bad_weight = 0; - procedure (precalc, calc, postcalc, NULL); + procedure_with_splits (precalc, calc, postcalc, NULL); if (bad_weight) msg (SW, _("At least one case in the data file had a weight value " @@ -477,7 +476,8 @@ dump_z_table (void) /* Transformation function to calculate Z-scores. */ static int -descriptives_trns_proc (struct trns_header * trns, struct ccase * c) +descriptives_trns_proc (struct trns_header * trns, struct ccase * c, + int case_num UNUSED) { struct descriptives_trns *t = (struct descriptives_trns *) trns; struct dsc_z_score *z; @@ -539,9 +539,9 @@ run_z_pass (void) struct variable *d; t->z[count].s = v; - t->z[count].d = d = dict_create_var (default_dict, - v->p.dsc.zname, 0); - assert (d != NULL); + t->z[count].d = d = dict_create_var_assert (default_dict, + v->p.dsc.zname, 0); + d->init = 0; if (v->label) { d->label = xmalloc (strlen (v->label) + 12); @@ -556,8 +556,7 @@ run_z_pass (void) } t->z[count].mean = v->p.dsc.stats[dsc_mean]; t->z[count].std_dev = v->p.dsc.stats[dsc_stddev]; - if (t->z[count].std_dev == SYSMIS - || approx_eq (t->z[count].std_dev, 0.0)) + if (t->z[count].std_dev == SYSMIS || t->z[count].std_dev == 0.0) t->z[count].mean = SYSMIS; count++; }