Adopt use of gnulib for portability.
[pspp-builds.git] / src / dfm-read.c
index a293cb5f308cfc4e0afc0e9f84fbb920b9e766be..2f17d41980fcdc04329e74e8fcafbd8af042e66f 100644 (file)
 #include "error.h"
 #include "file-handle.h"
 #include "filename.h"
-#include "getline.h"
+#include "getl.h"
 #include "lexer.h"
 #include "str.h"
 #include "vfm.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
 #include "debug-print.h"
 
 /* Flags for DFM readers. */
@@ -81,8 +84,9 @@ dfm_close_reader (struct dfm_reader *r)
       if (!still_open) 
         {
           /* Skip any remaining data on the inline file. */
-          while ((r->flags & DFM_EOF) == 0)
-            read_record (r);
+          if (r->flags & DFM_SAW_BEGIN_DATA)
+            while ((r->flags & DFM_EOF) == 0)
+              read_record (r);
           inline_file = NULL;
         }
     }