Cite tokens when reporting invalid identifiers.
[pspp] / src / language / data-io / list.c
index d9798852c1a815bb4aa4f390b39f4fbfbdb07171..8a55f58a1230aa1cfa1a2865d6b987d5e9b8c1d0 100644 (file)
@@ -37,7 +37,6 @@
 #include "libpspp/message.h"
 #include "libpspp/misc.h"
 #include "output/pivot-table.h"
-#include "output/table-item.h"
 
 #include "gl/intprops.h"
 #include "gl/minmax.h"
@@ -132,7 +131,7 @@ list_execute (const struct lst_cmd *lcmd, struct dataset *ds)
   ok = casegrouper_destroy (grouper);
   ok = proc_commit (ds) && ok;
 
-  subcase_destroy (&sc);
+  subcase_uninit (&sc);
   free (lcmd->v_variables);
 
   return ok ? CMD_SUCCESS : CMD_CASCADING_FAILURE;
@@ -158,23 +157,23 @@ cmd_list (struct lexer *lexer, struct dataset *ds)
   while (lex_token (lexer) != T_ENDCMD)
     {
       lex_match (lexer, T_SLASH);
-      if (lex_match_id (lexer, "VARIABLES") )
+      if (lex_match_id (lexer, "VARIABLES"))
         {
           lex_match (lexer, T_EQUALS);
-          if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
+          if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0))
             {
               msg (SE, _("No variables specified."));
               return CMD_FAILURE;
             }
         }
-      else if (lex_match_id (lexer, "FORMAT") )
+      else if (lex_match_id (lexer, "FORMAT"))
         {
           lex_match (lexer, T_EQUALS);
-          if (lex_match_id (lexer, "NUMBERED") )
+          if (lex_match_id (lexer, "NUMBERED"))
             {
               cmd.numbering = format_numbered;
             }
-          else if (lex_match_id (lexer, "UNNUMBERED") )
+          else if (lex_match_id (lexer, "UNNUMBERED"))
             {
               cmd.numbering = format_unnumbered;
             }
@@ -207,7 +206,7 @@ cmd_list (struct lexer *lexer, struct dataset *ds)
               lex_get (lexer);
             }
         }
-      else if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0 ))
+      else if (! parse_variables_const (lexer, dict, &cmd.v_variables, &cmd.n_variables, 0))
         {
           return CMD_FAILURE;
         }
@@ -257,4 +256,3 @@ cmd_list (struct lexer *lexer, struct dataset *ds)
   free (cmd.v_variables);
   return CMD_FAILURE;
 }
-