goto open_error;
/* Open file handle. */
- if (!fh_open (fh, "portable file", "we"))
+ if (!fh_open (fh, FH_REF_FILE, "portable file", "we"))
goto error;
/* Initialize data structures. */
/* Writes case ELEM to the portable file represented by H. Returns
success. */
int
-pfm_write_case (struct pfm_writer *w, struct ccase *c)
+pfm_write_case (struct pfm_writer *w, const struct ccase *c)
{
int i;
if (w == NULL)
return;
- fh_close (w->fh, "portable file", "we");
-
if (w->file != NULL)
{
char buf[80];
fh_get_filename (w->fh), strerror (errno));
}
+ fh_close (w->fh, "portable file", "we");
+
free (w->vars);
free (w);
}