Continue reforming procedure execution. In this phase, get rid of
[pspp-builds.git] / src / language / dictionary / value-labels.c
index 976d54790965ff26ab6598216ea9de72ecb9ca00..a9d3d8751799d5fc6bc1d4ea0e2184ae28858982 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
+
 #include <stdio.h>
 #include <stdlib.h>
-#include <libpspp/alloc.h>
+
+#include <procedure.h>
+#include <data/value-labels.h>
+#include <data/variable.h>
 #include <language/command.h>
-#include <libpspp/message.h>
-#include <libpspp/hash.h>
 #include <language/lexer/lexer.h>
+#include <libpspp/alloc.h>
+#include <libpspp/hash.h>
+#include <libpspp/message.h>
 #include <libpspp/str.h>
-#include <data/value-labels.h>
-#include <data/variable.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -92,17 +95,14 @@ do_value_labels (int erase)
       free (vars);
     }
 
-  if (token != '.')
-    {
-      lex_error (NULL);
-      return CMD_TRAILING_GARBAGE;
-    }
+  if (parse_err)
+    return CMD_FAILURE;
 
-  return parse_err ? CMD_PART_SUCCESS_MAYBE : CMD_SUCCESS;
+  return lex_end_of_command ();
 
  lossage:
   free (vars);
-  return CMD_PART_SUCCESS_MAYBE;
+  return CMD_FAILURE;
 }
 
 /* Verifies that none of the VAR_CNT variables in VARS are long