Patch #5244.
[pspp-builds.git] / src / language / dictionary / formats.c
index 79a6711ea3a3534eb2157a453678825eca9875a7..c567623495197feb51ffc7c46e26be3a19e85128 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
+
 #include <limits.h>
 #include <stdio.h>
 #include <stdlib.h>
+
+#include <data/procedure.h>
+#include <data/variable.h>
 #include <language/command.h>
-#include <libpspp/message.h>
+#include <language/lexer/format-parser.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
+#include <libpspp/message.h>
 #include <libpspp/misc.h>
 #include <libpspp/str.h>
-#include <data/variable.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
@@ -79,7 +84,7 @@ internal_cmd_formats (int which)
        break;
 
       if (!parse_variables (default_dict, &v, &cv, PV_NUMERIC))
-       return CMD_PART_SUCCESS_MAYBE;
+       return CMD_FAILURE;
       type = v[0]->type;
 
       if (!lex_match ('('))
@@ -87,7 +92,7 @@ internal_cmd_formats (int which)
          msg (SE, _("`(' expected after variable list"));
          goto fail;
        }
-      if (!parse_format_specifier (&f, 0)
+      if (!parse_format_specifier (&f)
           || !check_output_specifier (&f, true)
           || !check_specifier_type (&f, NUMERIC, true))
        goto fail;
@@ -112,5 +117,5 @@ internal_cmd_formats (int which)
 
 fail:
   free (v);
-  return CMD_PART_SUCCESS_MAYBE;
+  return CMD_FAILURE;
 }