FREQUENCIES: Remove unused pool.
[pspp] / src / language / stats / frequencies.c
index 484ce1af1e7095bf2f18e8eef0d6c0ebee16607b..d741edbdea4b011954d773989bc54b3396d3befe 100644 (file)
@@ -45,7 +45,6 @@
 #include "libpspp/hmap.h"
 #include "libpspp/message.h"
 #include "libpspp/misc.h"
-#include "libpspp/pool.h"
 
 #include "math/histogram.h"
 #include "math/moments.h"
@@ -190,10 +189,6 @@ struct var_freqs
     /* Freqency table. */
     struct freq_tab tab;       /* Frequencies table to use. */
 
-    /* Percentiles. */
-    int n_groups;              /* Number of groups. */
-    double *groups;            /* Groups. */
-
     /* Statistics. */
     double stat[FRQ_ST_count];
 
@@ -408,7 +403,7 @@ not_missing (const void *f_, const void *v_)
   const struct freq *f = f_;
   const struct variable *v = v_;
 
-  return !var_is_value_missing (v, f->values, MV_ANY);
+  return !var_is_value_missing (v, f->values);
 }
 
 
@@ -593,7 +588,6 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds)
   int hi_pcnt = INT_MIN;
   int hi_norm = FRQ_NONORMAL;
 
-  frq.pool = pool_create ();
   frq.sort = FRQ_AVALUE;
 
   frq.vars = NULL;
@@ -631,7 +625,7 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds)
                              PV_NO_DUPLICATE))
     goto error;
 
-  frq.vars = xzalloc (frq.n_vars * sizeof (*frq.vars));
+  frq.vars = xcalloc (frq.n_vars, sizeof (*frq.vars));
   for (i = 0; i < frq.n_vars; ++i)
     {
       frq.vars[i].var = vars[i];
@@ -1244,7 +1238,6 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds)
   free (frq.pie);
   free (frq.hist);
   free (frq.percentiles);
-  pool_destroy (frq.pool);
 
   return CMD_SUCCESS;
 
@@ -1256,7 +1249,6 @@ cmd_frequencies (struct lexer *lexer, struct dataset *ds)
   free (frq.pie);
   free (frq.hist);
   free (frq.percentiles);
-  pool_destroy (frq.pool);
 
   return CMD_FAILURE;
 }
@@ -1288,7 +1280,7 @@ chart_includes_value (const struct frq_chart *chart,
                       const struct variable *var,
                       const union value *value)
 {
-  if (!chart->include_missing && var_is_value_missing (var, value, MV_ANY))
+  if (!chart->include_missing && var_is_value_missing (var, value))
     return false;
 
   if (var_is_numeric (var)