/* PSPP - computes sample statistics.
Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
/* PSPP - computes sample statistics.
Copyright (C) 1997-2004, 2006 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
#include <language/command.h>
#include <language/data-io/file-handle.h>
#include <language/lexer/lexer.h>
#include <language/command.h>
#include <language/data-io/file-handle.h>
#include <language/lexer/lexer.h>
#include <libpspp/alloc.h>
#include <libpspp/assertion.h>
#include <libpspp/message.h>
#include <libpspp/alloc.h>
#include <libpspp/assertion.h>
#include <libpspp/message.h>
FILE *file; /* Associated file. */
size_t pos; /* Offset in line of current character. */
unsigned eof_cnt; /* # of attempts to advance past EOF. */
FILE *file; /* Associated file. */
size_t pos; /* Offset in line of current character. */
unsigned eof_cnt; /* # of attempts to advance past EOF. */
file between BEGIN FILE and END FILE. Returns a reader if
successful, or a null pointer otherwise. */
struct dfm_reader *
file between BEGIN FILE and END FILE. Returns a reader if
successful, or a null pointer otherwise. */
struct dfm_reader *
{
msg (SE, _("Unexpected end-of-file while reading data in BEGIN "
"DATA. This probably indicates "
{
msg (SE, _("Unexpected end-of-file while reading data in BEGIN "
"DATA. This probably indicates "
- if (ds_length (&getl_buf) >= 8
- && !strncasecmp (ds_cstr (&getl_buf), "end data", 8))
+ if (ds_length (lex_entire_line_ds (r->lexer) ) >= 8
+ && !strncasecmp (lex_entire_line (r->lexer), "end data", 8))