{
struct flip_pgm *flip;
+ if (temporary != 0)
+ {
+ msg (SM, _("FLIP ignores TEMPORARY. "
+ "Temporary transformations will be made permanent."));
+ cancel_temporary ();
+ }
+
flip = xmalloc (sizeof *flip);
flip->var = NULL;
flip->var_cnt = 0;
temp_trns = temporary = 0;
vfm_sink = flip_sink_create (flip);
flip->new_names_tail = NULL;
- procedure (NULL, NULL, NULL, NULL);
+ procedure (NULL, NULL);
/* Flip the data we read. */
flip_file (flip);
flip->case_cnt = 1;
- return create_case_sink (&flip_sink_class, info);
+ return create_case_sink (&flip_sink_class, default_dict, info);
}
/* Writes case C to the FLIP sink. */
v->next = NULL;
if (flip->new_names->type == NUMERIC)
{
- double f = c->data[flip->new_names->fv].f;
+ double f = c->data[sink->idx_to_fv[flip->new_names->index]].f;
if (f == SYSMIS)
strcpy (v->name, "VSYSMIS");
else
{
int width = min (flip->new_names->width, 8);
- memcpy (v->name, c->data[flip->new_names->fv].s, width);
+ memcpy (v->name, c->data[sink->idx_to_fv[flip->new_names->index]].s,
+ width);
v->name[width] = 0;
}
/* Write to external file. */
for (i = 0; i < flip->var_cnt; i++)
if (flip->var[i]->type == NUMERIC)
- info->output_buf[i].f = c->data[flip->var[i]->fv].f;
+ info->output_buf[i].f = c->data[sink->idx_to_fv[flip->var[i]->index]].f;
else
info->output_buf[i].f = SYSMIS;
/* Allocate memory for many cases. */
case_bytes = flip->var_cnt * sizeof *input_buf;
- case_capacity = set_max_workspace / case_bytes;
+ case_capacity = get_max_workspace() / case_bytes;
if (case_capacity > flip->case_cnt * 2)
case_capacity = flip->case_cnt * 2;
if (case_capacity < 2)