/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2009, 2010 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 published by
}
}
- flip->file = pool_tmpfile (flip->pool);
+ flip->file = pool_create_temp_file (flip->pool);
if (flip->file == NULL)
{
msg (SE, _("Could not create temporary file for FLIP."));
{
name = data_out_pool (value, dict_get_encoding (flip->dict), var_get_write_format (flip->new_names_var),
flip->pool);
-
}
var_names_add (flip->pool, &flip->new_names, name);
}
*cp = '_';
}
*cp = '\0';
- str_uppercase (name);
/* Use the mangled name, if it is available, or add numeric
extensions until we find one that is. */
output_buf = input_buf + flip->n_vars * case_capacity;
input_file = flip->file;
- if (fseek (input_file, 0, SEEK_SET) != 0)
+ if (fseeko (input_file, 0, SEEK_SET) != 0)
{
msg (SE, _("Error rewinding FLIP file: %s."), strerror (errno));
return false;
}
- output_file = pool_tmpfile (flip->pool);
+ output_file = pool_create_temp_file (flip->pool);
if (output_file == NULL)
{
msg (SE, _("Error creating FLIP source file."));
case_idx += read_cases;
}
- if (pool_fclose (flip->pool, input_file) == EOF)
- {
- msg (SE, _("Error closing FLIP source file: %s."), strerror (errno));
- return false;
- }
+ pool_fclose_temp_file (flip->pool, input_file);
pool_unregister (flip->pool, input_buf);
free (input_buf);
- if (fseek (output_file, 0, SEEK_SET) != 0)
+ if (fseeko (output_file, 0, SEEK_SET) != 0)
{
msg (SE, _("Error rewinding FLIP source file: %s."), strerror (errno));
return false;
c = case_create (casereader_get_proto (reader));
data_in (ss_cstr (flip->old_names.names[flip->cases_read]), dict_get_encoding (flip->dict),
- FMT_A, 0,
+ FMT_A,
0, 0,
flip->dict,
case_data_rw_idx (c, 0), 8);