Improve the way we handle the various parsing "states". Until now
[pspp-builds.git] / src / language / data-io / get.c
index df31b11d119a505f36038bc4645b3baf84751687..25387d8be44b8f0ae14a99a9abf4647018fb4e3d 100644 (file)
    02110-1301, USA. */
 
 #include <config.h>
-#include "message.h"
+#include <libpspp/message.h>
 #include <stdlib.h>
-#include "alloc.h"
-#include "any-reader.h"
-#include "any-writer.h"
-#include "case.h"
-#include "command.h"
-#include "compiler.h"
-#include "dictionary.h"
-#include "message.h"
-#include "file-handle.h"
-#include "hash.h"
-#include "lexer.h"
-#include "misc.h"
-#include "por-file-writer.h"
-#include "settings.h"
-#include "sys-file-writer.h"
-#include "str.h"
-#include "value-labels.h"
-#include "variable.h"
-#include "procedure.h"
+#include <libpspp/alloc.h>
+#include <data/any-reader.h>
+#include <data/any-writer.h>
+#include <data/case.h>
+#include <language/command.h>
+#include <libpspp/compiler.h>
+#include <data/dictionary.h>
+#include <libpspp/message.h>
+#include <language/data-io/file-handle.h>
+#include <libpspp/hash.h>
+#include <language/lexer/lexer.h>
+#include <libpspp/misc.h>
+#include <data/por-file-writer.h>
+#include <data/settings.h>
+#include <data/sys-file-writer.h>
+#include <libpspp/str.h>
+#include <data/value-labels.h>
+#include <data/variable.h>
+#include <procedure.h>
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
 
-#include "debug-print.h"
-
 /* Rearranging and reducing a dictionary. */
 static void start_case_map (struct dictionary *);
 static struct case_map *finish_case_map (struct dictionary *);
@@ -735,8 +733,6 @@ keep_variables (struct dictionary *dict)
 \f
 /* MATCH FILES. */
 
-#include "debug-print.h"
-
 /* File types. */
 enum
   {
@@ -886,8 +882,7 @@ cmd_match_files (void)
             }
           used_active_file = true;
 
-          assert (pgm_state != STATE_INPUT);
-          if (pgm_state == STATE_INIT)
+          if (vfm_source == NULL)
             {
               msg (SE, _("Cannot specify the active file since no active "
                          "file has been defined."));