Move var_set and variable parsing declarations into new header.
[pspp-builds.git] / src / language / stats / flip.c
index 3aed8323e29b8830bfe305d8ab913328ff4e7486..0e9b56c5c87ecf7962db9cacd7083d9c29c8f2b8 100644 (file)
@@ -38,6 +38,7 @@
 #include <data/variable.h>
 #include <language/command.h>
 #include <language/lexer/lexer.h>
+#include <language/lexer/variable-parser.h>
 #include <libpspp/alloc.h>
 #include <libpspp/array.h>
 #include <libpspp/message.h>
@@ -474,7 +475,11 @@ flip_file (struct flip_pgm *flip)
       case_idx += read_cases;
     }
 
-  pool_fclose (flip->pool, input_file);
+  if (pool_fclose (flip->pool, input_file) == EOF)
+    {
+      msg (SE, _("Error closing FLIP source file: %s."), strerror (errno));
+      return false;
+    }
   pool_unregister (flip->pool, input_buf);
   free (input_buf);