Continue reforming procedure execution. In this phase, get rid of
[pspp-builds.git] / src / language / dictionary / numeric.c
index 03eb06b72bb729dc19fc2ddb01ce14edf038d840..f946e74a4808e61696f4bdcb563fb582904b1ceb 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
-#include "message.h"
+
 #include <stdlib.h>
-#include "command.h"
-#include "dictionary.h"
-#include "message.h"
-#include "lexer.h"
-#include "str.h"
-#include "variable.h"
+
+#include <data/dictionary.h>
+#include <procedure.h>
+#include <data/variable.h>
+#include <language/command.h>
+#include <language/lexer/lexer.h>
+#include <libpspp/message.h>
+#include <libpspp/message.h>
+#include <libpspp/str.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "debug-print.h"
-
 /* Parses the NUMERIC command. */
 int
 cmd_numeric (void)
@@ -49,7 +50,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 +101,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 +123,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 +180,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. */
@@ -194,12 +195,7 @@ cmd_leave (void)
   if (!parse_variables (default_dict, &v, &nv, PV_NONE))
     return CMD_CASCADING_FAILURE;
   for (i = 0; i < nv; i++)
-    {
-      if (!v[i]->reinit)
-       continue;
-      v[i]->reinit = 0;
-      v[i]->init = 1;
-    }
+    v[i]->leave = true;
   free (v);
 
   return lex_end_of_command ();