RELEASE tests
[pspp] / src / language / stats / matrix.c
index f79a1f8a094675a89b96b2c404818b6ec2fcc8c0..e7d3ae8e27f380facbf3a0105d029b287a940fb4 100644 (file)
@@ -3401,8 +3401,6 @@ struct matrix_cmd
         struct display_command
           {
             struct matrix_state *state;
-            bool dictionary;
-            bool status;
           }
         display;
 
@@ -4253,32 +4251,18 @@ matrix_parse_break (struct matrix_state *s)
 static struct matrix_cmd *
 matrix_parse_display (struct matrix_state *s)
 {
-  bool dictionary = false;
-  bool status = false;
-  while (lex_token (s->lexer) == T_ID)
+  while (lex_token (s->lexer) != T_ENDCMD)
     {
-      if (lex_match_id (s->lexer, "DICTIONARY"))
-        dictionary = true;
-      else if (lex_match_id (s->lexer, "STATUS"))
-        status = true;
-      else
+      if (!lex_match_id (s->lexer, "DICTIONARY")
+          && !lex_match_id (s->lexer, "STATUS"))
         {
           lex_error_expecting (s->lexer, "DICTIONARY", "STATUS");
           return NULL;
         }
     }
-  if (!dictionary && !status)
-    dictionary = status = true;
 
   struct matrix_cmd *cmd = xmalloc (sizeof *cmd);
-  *cmd = (struct matrix_cmd) {
-    .type = MCMD_DISPLAY,
-    .display = {
-      .state = s,
-      .dictionary = dictionary,
-      .status = status,
-    }
-  };
+  *cmd = (struct matrix_cmd) { .type = MCMD_DISPLAY, .display = { s } };
   return cmd;
 }