Fixed buglet which manifested itself when running two consecutive EXAMINE
[pspp] / src / dfm-read.c
index 4bc59caf92bcc9e6a690da30f8b0086f3a3a3a0a..6d173cf3e929bdace5c73f4b0c3da606460fac23 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "dfm-read.h"
 #include "command.h"
 #include "error.h"
 #include "file-handle.h"
+#include "file-handle-def.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 +85,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;
         }
     }