Damn! Forgot to change casenum_t in *.q
[pspp-builds.git] / src / language / stats / means.q
index a8739bc2f41ec3bf88b1c872ec6b069c38a41db1..fc01c07ae1645c0e553aade4f45bfe97cb2c3369 100644 (file)
 /* (functions) */
 
 /* TABLES: Variable lists for each dimension. */
-int n_dim;             /* Number of dimensions. */
-size_t *nv_dim;                /* Number of variables in each dimension. */
-struct variable ***v_dim;      /* Variables in each dimension.  */
+static int n_dim;              /* Number of dimensions. */
+static size_t *nv_dim;         /* Number of variables in each dimension. */
+static struct variable ***v_dim;       /* Variables in each dimension.  */
 
 /* VARIABLES: List of variables. */
-int n_var;
-struct variable **v_var;
+static struct variable **v_var;
 
 /* Parses and executes the T-TEST procedure. */
 int
-cmd_means (void)
+cmd_means (struct dataset *ds)
 {
   struct cmd_means cmd;
   int success = CMD_FAILURE;
@@ -72,7 +71,7 @@ cmd_means (void)
   v_dim = NULL;
   v_var = NULL;
 
-  if (!parse_means (&cmd, NULL))
+  if (!parse_means (ds, &cmd, NULL))
     goto free;
 
   if (cmd.sbc_cells)
@@ -123,12 +122,12 @@ free:
 
 /* Parses the TABLES subcommand. */
 static int
-mns_custom_tables (struct cmd_means *cmd, void *aux UNUSED)
+mns_custom_tables (struct dataset *ds, struct cmd_means *cmd, void *aux UNUSED)
 {
   struct var_set *var_set;
   
   if (!lex_match_id ("TABLES")
-      && (token != T_ID || dict_lookup_var (dataset_dict (current_dataset), tokid) == NULL)
+      && (token != T_ID || dict_lookup_var (dataset_dict (ds), tokid) == NULL)
       && token != T_ALL)
     return 2;
   lex_match ('=');
@@ -140,7 +139,7 @@ mns_custom_tables (struct cmd_means *cmd, void *aux UNUSED)
       return 0;
     }
 
-  var_set = var_set_create_from_dict (dataset_dict (current_dataset));
+  var_set = var_set_create_from_dict (dataset_dict (ds));
   assert (var_set != NULL);
 
   do