mode = S_IRUSR | S_IRGRP | S_IROTH;
if (opts.create_writeable)
mode |= S_IWUSR | S_IWGRP | S_IWOTH;
- fd = open (handle_get_filename (fh), O_WRONLY | O_CREAT | O_TRUNC, mode);
+ fd = open (fh_get_filename (fh), O_WRONLY | O_CREAT | O_TRUNC, mode);
if (fd < 0)
goto open_error;
w->vars = NULL;
w->var_cnt = dict_get_var_cnt (dict);
- w->vars = xmalloc (sizeof *w->vars * w->var_cnt);
+ w->vars = xnmalloc (w->var_cnt, sizeof *w->vars);
for (i = 0; i < w->var_cnt; i++)
{
const struct variable *dv = dict_get_var (dict, i);
open_error:
msg (ME, _("An error occurred while opening \"%s\" for writing "
"as a portable file: %s."),
- handle_get_filename (fh), strerror (errno));
+ fh_get_filename (fh), strerror (errno));
err_cond_fail ();
goto error;
}
error:
msg (ME, _("%s: Writing portable file: %s."),
- handle_get_filename (w->fh), strerror (errno));
+ fh_get_filename (w->fh), strerror (errno));
return 0;
}
{
/* PORTME: Translation table from SPSS character code to this
computer's native character code (which is probably ASCII). */
- static const unsigned char spss2ascii[256] =
+ static const char spss2ascii[256] =
{
"0000000000000000000000000000000000000000000000000000000000000000"
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ."
if (fclose (w->file) == EOF)
msg (ME, _("%s: Closing portable file: %s."),
- handle_get_filename (w->fh), strerror (errno));
+ fh_get_filename (w->fh), strerror (errno));
}
free (w->vars);