dictionary: New function dict_get_weight_format().
[pspp] / src / language / stats / mcnemar.c
index 648dc9c3f7d62365d6a8f748d60fd47dec01c4ff..d3f48192fa9f9a91c20c026cdda398f277a99115 100644 (file)
@@ -166,8 +166,7 @@ output_freq_table (variable_pair *vp,
 
   struct tab_table *table = tab_create (header_cols + 2, header_rows + 2);
 
-  const struct variable *wv = dict_get_weight (dict);
-  const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0;
+  const struct fmt_spec *wfmt = dict_get_weight_format (dict);
 
 
   struct string pair_name;
@@ -236,8 +235,7 @@ output_statistics_table (const struct two_sample_test *t2s,
 
   struct tab_table *table = tab_create (5, t2s->n_pairs + 1);
 
-  const struct variable *wv = dict_get_weight (dict);
-  const struct fmt_spec *wfmt = wv ? var_get_print_format (wv) : & F_8_0;
+  const struct fmt_spec *wfmt = dict_get_weight_format (dict);
 
   tab_title (table, _("Test Statistics"));
   tab_set_format (table, RC_WEIGHT, wfmt);