struct flip_pgm
{
struct pool *pool; /* Pool containing FLIP data. */
- struct variable **var; /* Variables to transpose. */
+ const struct variable **var; /* Variables to transpose. */
int *idx_to_fv; /* var[]->index to compacted sink case fv. */
size_t var_cnt; /* Number of elements in `var'. */
int case_cnt; /* Pre-flip case count. */
if (lex_match_id (lexer, "VARIABLES"))
{
lex_match (lexer, '=');
- if (!parse_variables (lexer, dict, &flip->var, &flip->var_cnt,
+ if (!parse_variables_const (lexer, dict, &flip->var, &flip->var_cnt,
PV_NO_DUPLICATE))
goto error;
lex_match (lexer, '/');
flip->file = pool_tmpfile (flip->pool);
if (flip->file == NULL)
{
- msg (SE, _("Could not create temporary file for FLIP."));
+ msg (SE, _("Could not create temporary file for FLIP: %s."),
+ strerror (errno));
return NULL;
}
if (read_cases != fread (input_buf, case_bytes, read_cases, input_file))
{
- msg (SE, _("Error reading FLIP file: %s."), strerror (errno));
+ if (ferror (input_file))
+ msg (SE, _("Error reading FLIP file: %s."), strerror (errno));
+ else
+ msg (SE, _("Unexpected end of file reading FLIP file."));
return false;
}