X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fctables.c;h=e38c64d30e9c3fa88bbac7908e64279931bf7bf9;hb=86e6b87d7ad411378c3204fe87504c7e6749be78;hp=7e899d1b668a640355ead9e7ccf83fd8c340490f;hpb=a10db790c0fb0453e9af0a9ad1f0a67ca73a6482;p=pspp diff --git a/src/language/stats/ctables.c b/src/language/stats/ctables.c index 7e899d1b66..e38c64d30e 100644 --- a/src/language/stats/ctables.c +++ b/src/language/stats/ctables.c @@ -2535,8 +2535,6 @@ union ctables_summary double ovalid; double ovalue; }; - - /* XXX multiple response */ }; static void @@ -3226,8 +3224,6 @@ ctables_cell_insert__ (struct ctables_section *s, const struct ccase *c, || cat->type == CCT_SUBTOTAL || cat->type == CCT_POSTCOMPUTE) { - /* XXX these should be more encompassing I think.*/ - switch (a) { case PIVOT_AXIS_COLUMN: @@ -3341,18 +3337,15 @@ ctables_cell_add__ (struct ctables_section *s, const struct ccase *c, { add_weight (a->valid, weight); - for (size_t i = 0; i < s->table->n_sum_vars; i++) - { - /* XXX listwise_missing??? */ - const struct variable *var = s->table->sum_vars[i]; - double addend = case_num (c, var); - if (!var_is_num_missing (var, addend)) - { - struct ctables_sum *sum = &a->sums[i]; + if (!scale_missing) + for (size_t i = 0; i < s->table->n_sum_vars; i++) + { + const struct variable *var = s->table->sum_vars[i]; + double addend = case_num (c, var); + if (!var_is_num_missing (var, addend)) for (enum ctables_weighting wt = 0; wt < N_CTWS; wt++) - sum->sum[wt] += addend * weight[wt]; - } - } + a->sums[i].sum[wt] += addend * weight[wt]; + } } } }