Improve the way we handle the various parsing "states". Until now
[pspp] / src / language / dictionary / numeric.c
index 03eb06b72bb729dc19fc2ddb01ce14edf038d840..0cc3adb984db22ba44d7ee8462dd5c23e104e25a 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
-#include "message.h"
+#include <libpspp/message.h>
 #include <stdlib.h>
-#include "command.h"
-#include "dictionary.h"
-#include "message.h"
-#include "lexer.h"
-#include "str.h"
-#include "variable.h"
+#include <language/command.h>
+#include <data/dictionary.h>
+#include <libpspp/message.h>
+#include <language/lexer/lexer.h>
+#include <libpspp/str.h>
+#include <data/variable.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "debug-print.h"
-
 /* Parses the NUMERIC command. */
 int
 cmd_numeric (void)
@@ -49,7 +47,7 @@ cmd_numeric (void)
   do
     {
       if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
-       return CMD_PART_SUCCESS_MAYBE;
+       return CMD_FAILURE;
 
       /* Get the optional format specification. */
       if (lex_match ('('))
@@ -100,7 +98,7 @@ fail:
   for (i = 0; i < nv; i++)
     free (v[i]);
   free (v);
-  return CMD_PART_SUCCESS_MAYBE;
+  return CMD_FAILURE;
 }
 
 /* Parses the STRING command. */
@@ -122,7 +120,7 @@ cmd_string (void)
   do
     {
       if (!parse_DATA_LIST_vars (&v, &nv, PV_NONE))
-       return CMD_PART_SUCCESS_MAYBE;
+       return CMD_FAILURE;
 
       if (!lex_force_match ('(')
          || !parse_format_specifier (&f, 0))
@@ -179,7 +177,7 @@ fail:
   for (i = 0; i < nv; i++)
     free (v[i]);
   free (v);
-  return CMD_PART_SUCCESS_MAYBE;
+  return CMD_FAILURE;
 }
 
 /* Parses the LEAVE command. */