Make the expression code a little nicer and fix bugs found
[pspp] / src / descript.q
index 3a3f7da79ad8c77ce5fedd6b1b624ad9231c1b63..9ba2b569c79dbf69e80e90e493c71579d30ff0de 100644 (file)
@@ -20,7 +20,7 @@
 /* FIXME: Many possible optimizations. */
 
 #include <config.h>
-#include <assert.h>
+#include "error.h"
 #include <limits.h>
 #include <math.h>
 #include <stdlib.h>
@@ -193,8 +193,6 @@ cmd_descriptives (void)
   v_variables = NULL;
   n_variables = 0;
 
-  lex_match_id ("DESCRIPTIVES");
-  lex_match_id ("CONDESCRIPTIVES");
   if (!parse_descriptives (&cmd))
     goto lossage;
 
@@ -288,7 +286,7 @@ cmd_descriptives (void)
 
   /* Data pass! */
   bad_weight = 0;
-  procedure (precalc, calc, postcalc, NULL);
+  procedure_with_splits (precalc, calc, postcalc, NULL);
 
   if (bad_weight)
     msg (SW, _("At least one case in the data file had a weight value "
@@ -476,7 +474,8 @@ dump_z_table (void)
 
 /* Transformation function to calculate Z-scores. */
 static int
-descriptives_trns_proc (struct trns_header * trns, struct ccase * c)
+descriptives_trns_proc (struct trns_header * trns, struct ccase * c,
+                        int case_num UNUSED)
 {
   struct descriptives_trns *t = (struct descriptives_trns *) trns;
   struct dsc_z_score *z;