bool blank_valid;
};
-static trns_proc_func autorecode_trns_proc;
-static trns_free_func autorecode_trns_free;
+static const struct trns_class autorecode_trns_class;
static int compare_arc_items (const void *, const void *, const void *aux);
static void arc_free (struct autorecode_pgm *);
struct arc_item *item = xmalloc (sizeof *item);
item->width = width;
value_clone (&item->from, value, width);
- item->missing = mv_is_value_missing_varwidth (&spec->mv, value, spec->width,
- MV_ANY);
+ item->missing = mv_is_value_missing_varwidth (&spec->mv, value,
+ spec->width);
item->value_label = ds_steal_cstr (&value_label);
hmap_insert (&spec->items->ht, &item->hmap_node, hash);
/* Free array. */
free (items);
}
- add_transformation (ds, autorecode_trns_proc, autorecode_trns_free, arc);
+ add_transformation (ds, &autorecode_trns_class, arc);
for (size_t i = 0; i < n_dsts; i++)
free (dst_names[i]);
return direction == ASCENDING ? cmp : -cmp;
}
-static int
+static enum trns_result
autorecode_trns_proc (void *arc_, struct ccase **c,
casenumber case_idx UNUSED)
{
arc_free (arc);
return true;
}
+
+static const struct trns_class autorecode_trns_class = {
+ .name = "AUTORECODE",
+ .execute = autorecode_trns_proc,
+ .destroy = autorecode_trns_free,
+};