Fix a couple of bugs reported by Ben Kujala
[pspp-builds.git] / src / oneway.q
index 390ce029e47f0c907f0c86f9f00b50bcec1684ef..16a1e90803d87823b1f1fd42b6eab51f4e17d3dc 100644 (file)
@@ -47,7 +47,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 
 /* (specification)
    "ONEWAY" (oneway_):
-   *variables=custom;
+   *^variables=custom;
    +missing=miss:!analysis/listwise,
    incl:include/!exclude;
    contrast= double list;
@@ -140,6 +140,8 @@ cmd_oneway(void)
 
   multipass_procedure_with_splits (run_oneway, &cmd);
 
+  free (vars);
+  free_oneway (&cmd);
 
   return CMD_SUCCESS;
 }
@@ -439,18 +441,8 @@ show_descriptives(void)
           gs != 0; 
           gs = hsh_next(group_hash,&g))
        {
-         const char *s = val_labs_find(indep_var->val_labs, gs->id );
-  
-         if ( s ) 
-           tab_text (t, 1, row + count, 
-                     TAB_LEFT | TAT_TITLE ,s);
-         else if ( indep_var->width != 0 ) 
-           tab_text (t, 1, row + count,
-                     TAB_LEFT | TAT_TITLE, gs->id.s);
-         else
-           tab_text (t, 1, row + count,
-                     TAB_LEFT | TAT_TITLE | TAT_PRINTF, "%g", gs->id.f);
-         
+         tab_text (t, 1, row + count, 
+                   TAB_LEFT | TAT_TITLE ,value_to_string(&gs->id,indep_var));
 
          /* Now fill in the numbers ... */