Terminal interface: Remove support for the ncurses library.
[pspp] / src / language / stats / oneway.c
index f2214e49e2bd273b2ca1c4fee673f58229071d65..791ee86978dabe586e1d41ae6bf2d01f968de094 100644 (file)
@@ -450,9 +450,12 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds)
                              PV_NO_DUPLICATE | PV_NUMERIC))
     goto error;
 
-  lex_force_match (lexer, T_BY);
+  if (!lex_force_match (lexer, T_BY))
+    goto error;
 
   oneway.indep_var = parse_variable_const (lexer, dict);
+  if (oneway.indep_var == NULL)
+    goto error;
 
   while (lex_token (lexer) != T_ENDCMD)
     {
@@ -502,7 +505,8 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds)
                    {
                      if ( !lex_force_match (lexer, T_LPAREN))
                        goto error;
-                     lex_force_num (lexer);
+                     if (! lex_force_num (lexer))
+                       goto error;
                      oneway.alpha = lex_number (lexer);
                      lex_get (lexer);
                      if ( !lex_force_match (lexer, T_RPAREN))
@@ -543,6 +547,9 @@ cmd_oneway (struct lexer *lexer, struct dataset *ds)
                  goto error;
                }
            }
+         
+         if ( ll_count (coefficient_list) <= 0)
+           goto error;
 
          ll_push_tail (&oneway.contrast_list, &cl->ll);
        }
@@ -1387,6 +1394,8 @@ show_contrast_tests (const struct oneway_spec *cmd, const struct oneway_workspac
     {
       const struct per_var_ws *pvw = &ws->vws[v];
       const struct categoricals *cats = covariance_get_categoricals (pvw->cov);
+      if (!categoricals_is_complete (cats))
+       continue;
       struct ll *cli;
       int i = 0;
       int lines_per_variable = 2 * n_contrasts;