X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fdescriptives.c;h=eaf9bb7fcc0034b77c9d2f6b8f3ee177af60262e;hb=e16d30a43af6ada7b8846f48a55eb3cb8f4e5f22;hp=b72371488d226fa14ed31ea17c3bda8e08e4ac9e;hpb=b0bf9b1b0f727fafac4296a048e3f45db5936f81;p=pspp-builds.git diff --git a/src/language/stats/descriptives.c b/src/language/stats/descriptives.c index b7237148..eaf9bb7f 100644 --- a/src/language/stats/descriptives.c +++ b/src/language/stats/descriptives.c @@ -28,10 +28,13 @@ #include #include #include +#include #include #include #include +#include #include +#include #include #include #include @@ -40,7 +43,6 @@ #include #include #include -#include #include "gettext.h" #define _(msgid) gettext (msgid) @@ -157,7 +159,7 @@ struct dsc_proc /* Accumulated results. */ double missing_listwise; /* Sum of weights of cases missing listwise. */ double valid; /* Sum of weights of valid cases. */ - int bad_warn; /* Warn if bad weight found. */ + bool bad_warn; /* Warn if bad weight found. */ enum dsc_statistic sort_by_stat; /* Statistic to sort by; -1: name. */ int sort_ascending; /* !0: ascending order; 0: descending. */ unsigned long show_stats; /* Statistics to display. */ @@ -177,7 +179,8 @@ static void dump_z_table (struct dsc_proc *); static void setup_z_trns (struct dsc_proc *); /* Procedure execution functions. */ -static bool calc_descriptives (const struct casefile *, void *dsc_); +static bool calc_descriptives (const struct ccase *first, + const struct casefile *, void *dsc_); static void display (struct dsc_proc *dsc); /* Parser and outline. */ @@ -695,13 +698,16 @@ static int listwise_missing (struct dsc_proc *dsc, const struct ccase *c); /* Calculates and displays descriptive statistics for the cases in CF. */ static bool -calc_descriptives (const struct casefile *cf, void *dsc_) +calc_descriptives (const struct ccase *first, + const struct casefile *cf, void *dsc_) { struct dsc_proc *dsc = dsc_; struct casereader *reader; struct ccase c; size_t i; + output_split_file_values (first); + for (i = 0; i < dsc->var_cnt; i++) { struct dsc_var *dv = &dsc->vars[i];