X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Foneway.q;h=7da992274ea999c8ad488a877264e6dba0aa5327;hb=a2f24e20cafce5616db69902a1594911ab026978;hp=2ca7809b526c9eae9e5b87556e54c5c86ce3dadb;hpb=43b1296aafe7582e7dbe6c2b6a8b478d7d9b0fcf;p=pspp diff --git a/src/language/stats/oneway.q b/src/language/stats/oneway.q index 2ca7809b52..7da992274e 100644 --- a/src/language/stats/oneway.q +++ b/src/language/stats/oneway.q @@ -31,10 +31,8 @@ #include #include #include -#include #include #include -#include #include #include #include @@ -46,6 +44,8 @@ #include #include "sort-criteria.h" +#include "xalloc.h" + #include "gettext.h" #define _(msgid) gettext (msgid) @@ -175,8 +175,7 @@ output_oneway(void) sum += subc_list_double_at(&cmd.dl_contrast[i],j); if ( sum != 0.0 ) - msg(SW,_("Coefficients for contrast %d do not total zero"), - (int) i + 1); + msg(SW,_("Coefficients for contrast %zu do not total zero"), i + 1); } if ( stat_tables & STAT_DESC ) @@ -432,11 +431,17 @@ show_descriptives(void) for (count = 0 ; count < hsh_count(gp->group_hash) ; ++count) { + struct string vstr; + ds_init_empty (&vstr); gs = gs_array[count]; + var_append_value_name (indep_var, &gs->id, &vstr); + tab_text (t, 1, row + count, - TAB_LEFT | TAT_TITLE, var_get_value_name(indep_var, - &gs->id)); + TAB_LEFT | TAT_TITLE, + ds_cstr (&vstr)); + + ds_destroy (&vstr); /* Now fill in the numbers ... */ @@ -619,10 +624,18 @@ show_contrast_coeffs (short *bad_contrast) ++count) { int i; + struct string vstr; group_value = group_values[count]; + ds_init_empty (&vstr); + + var_append_value_name (indep_var, group_value, &vstr); + tab_text (t, count + 2, 1, TAB_CENTER | TAT_TITLE, - var_get_value_name (indep_var, group_value)); + ds_cstr (&vstr)); + + ds_destroy (&vstr); + for (i = 0 ; i < cmd.sbc_contrast ; ++i ) { @@ -899,7 +912,10 @@ run_oneway (struct cmd_oneway *cmd, struct ccase c; if (!casereader_peek (input, 0, &c)) - return; + { + casereader_destroy (input); + return; + } output_split_file_values (ds, &c); case_destroy (&c);