Improve CROSSTABS description
[pspp] / src / descript.q
index 69134aef521087642af516bfe0761b958baca0b1..cf33db6927059462816c24f8b60bb12735083f5f 100644 (file)
@@ -178,9 +178,9 @@ static void dump_z_table (void);
 static void run_z_pass (void);
 
 /* Procedure execution functions. */
-static int calc (struct ccase *);
-static void precalc (void);
-static void postcalc (void);
+static int calc (struct ccase *, void *);
+static void precalc (void *);
+static void postcalc (void *);
 static void display (void);
 \f
 /* Parser and outline. */
@@ -289,7 +289,7 @@ cmd_descriptives (void)
 
   /* Data pass! */
   bad_weight = 0;
-  procedure (precalc, calc, postcalc);
+  procedure (precalc, calc, postcalc, NULL);
 
   if (bad_weight)
     msg (SW, _("At least one case in the data file had a weight value "
@@ -312,7 +312,7 @@ cmd_descriptives (void)
 
 /* Parses the VARIABLES subcommand. */
 static int
-dsc_custom_variables (struct cmd_descriptives *cmd unused)
+dsc_custom_variables (struct cmd_descriptives *cmd UNUSED)
 {
   if (!lex_match_id ("VARIABLES")
       && (token != T_ID || dict_lookup_var (default_dict, tokid) == NULL)
@@ -539,9 +539,9 @@ run_z_pass (void)
          struct variable *d;
 
          t->z[count].s = v;
-         t->z[count].d = d = dict_create_var (default_dict,
-                                               v->p.dsc.zname, 0);
-          assert (d != NULL);
+         t->z[count].d = d = dict_create_var_assert (default_dict,
+                                                      v->p.dsc.zname, 0);
+          d->init = 0;
          if (v->label)
            {
              d->label = xmalloc (strlen (v->label) + 12);
@@ -569,7 +569,7 @@ run_z_pass (void)
 /* Statistical calculation. */
 
 static void
-precalc (void)
+precalc (void *aux UNUSED)
 {
   int i;
 
@@ -593,7 +593,7 @@ precalc (void)
 }
 
 static int
-calc (struct ccase * c)
+calc (struct ccase * c, void *aux UNUSED)
 {
   int i;
 
@@ -685,7 +685,7 @@ iterate:
 }
 
 static void
-postcalc (void)
+postcalc (void *aux UNUSED)
 {
   int i;