X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Ft-test.q;h=1f182ec8a1dedbc9d91e6a2638e63130485f46f0;hb=5beffdda43634370653661d5a0f5e3c75aa28747;hp=5584df7d6031cf0eb3367f65f752001402ecb2cb;hpb=18f6e8958244f938e9e9a03a4230cacf0d22a470;p=pspp-builds.git diff --git a/src/language/stats/t-test.q b/src/language/stats/t-test.q index 5584df7d..1f182ec8 100644 --- a/src/language/stats/t-test.q +++ b/src/language/stats/t-test.q @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include @@ -59,11 +60,11 @@ "T-TEST" (tts_): +groups=custom; testval=double; - variables=varlist("PV_NO_SCRATCH | PV_NUMERIC"); - pairs=custom; - +missing=miss:!analysis/listwise, - incl:include/!exclude; - format=fmt:!labels/nolabels; + +variables=varlist("PV_NO_SCRATCH | PV_NUMERIC"); + +pairs=custom; + missing=miss:!analysis/listwise, + incl:include/!exclude; + +format=fmt:!labels/nolabels; criteria=:cin(d:criteria,"%s > 0. && %s < 1."). */ /* (declarations) */ @@ -241,7 +242,7 @@ static int mode; static struct cmd_t_test cmd; -static int bad_weight_warn; +static bool bad_weight_warn = false; static int compare_group_binary(const struct group_statistics *a, @@ -342,7 +343,7 @@ cmd_t_test(void) else value_is_missing = mv_is_value_missing; - bad_weight_warn = 1; + bad_weight_warn = true; ok = multipass_procedure_with_splits (calculate, &cmd); @@ -623,7 +624,7 @@ ssbox_create(struct ssbox *ssb, struct cmd_t_test *cmd, int mode) ssbox_paired_init(ssb,cmd); break; default: - assert(0); + NOT_REACHED (); } } @@ -937,7 +938,7 @@ trbox_create(struct trbox *trb, trbox_paired_init(trb,cmd); break; default: - assert(0); + NOT_REACHED (); } } @@ -1415,7 +1416,7 @@ common_calc (const struct ccase *c, void *_cmd) int i; struct cmd_t_test *cmd = (struct cmd_t_test *)_cmd; - double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn); + double weight = dict_get_case_weight (default_dict, c, &bad_weight_warn); /* Skip the entire case if /MISSING=LISTWISE is set */ @@ -1515,7 +1516,7 @@ one_sample_calc (const struct ccase *c, void *cmd_) struct cmd_t_test *cmd = (struct cmd_t_test *)cmd_; - double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn); + double weight = dict_get_case_weight (default_dict, c, &bad_weight_warn); /* Skip the entire case if /MISSING=LISTWISE is set */ if ( cmd->miss == TTS_LISTWISE ) @@ -1605,7 +1606,7 @@ paired_calc (const struct ccase *c, void *cmd_) struct cmd_t_test *cmd = (struct cmd_t_test *) cmd_; - double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn); + double weight = dict_get_case_weight (default_dict, c, &bad_weight_warn); /* Skip the entire case if /MISSING=LISTWISE is set , AND one member of a pair is missing */ @@ -1750,7 +1751,8 @@ group_calc (const struct ccase *c, struct cmd_t_test *cmd) const union value *gv = case_data (c, indep_var->fv); - const double weight = dict_get_case_weight(default_dict,c,&bad_weight_warn); + const double weight = + dict_get_case_weight (default_dict, c, &bad_weight_warn); if ( value_is_missing(&indep_var->miss, gv) ) { @@ -1970,7 +1972,7 @@ hash_group_binary(const struct group_statistics *g, flag = which_group(g,p); } else - assert(0); + NOT_REACHED (); return flag; }