spv: Run Python at build time via $PYTHON variable.
[pspp] / src / language / stats / frequencies.c
index 8bd6c600205d3fe75dc6a99dd230c2ab9591146b..ef1b7592dc94157765184a107f11f75b680d2497 100644 (file)
@@ -225,6 +225,8 @@ struct frq_proc
 
     /* Histogram and pie chart settings. */
     struct frq_chart *hist, *pie, *bar;
+
+    bool warn;
   };
 
 
@@ -294,7 +296,7 @@ dump_freq_table (const struct var_freqs *vf, const struct variable *wv)
   const struct freq_tab *ft = &vf->tab;
 
   struct pivot_table *table = pivot_table_create__ (pivot_value_new_variable (
-                                                      vf->var));
+                                                      vf->var), "Frequencies");
   pivot_table_set_weight_var (table, wv);
 
   pivot_dimension_create (table, PIVOT_AXIS_COLUMN, N_("Statistics"),
@@ -469,7 +471,7 @@ cleanup_freq_tab (struct var_freqs *vf)
 static void
 calc (struct frq_proc *frq, const struct ccase *c, const struct dataset *ds)
 {
-  double weight = dict_get_case_weight (dataset_dict (ds), c, NULL);
+  double weight = dict_get_case_weight (dataset_dict (ds), c, &frq->warn);
   size_t i;
 
   for (i = 0; i < frq->n_vars; i++)
@@ -613,6 +615,7 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds)
   frq.hist = NULL;
   frq.pie = NULL;
   frq.bar = NULL;
+  frq.warn = true;
 
 
   /* Accept an optional, completely pointless "/VARIABLES=" */