as the widest destination variable. */
if (trns->dst_type == VAL_STRING)
{
- if ( ! enlarge_dst_widths (trns))
+ if (! enlarge_dst_widths (trns))
{
recode_trns_free (trns);
return CMD_FAILURE;
out->copy_input = false;
value_init_pool (pool, &out->value, length);
- memcpy (value_str_rw (&out->value, length), string, length);
+ memcpy (out->value.s, string, length);
out->width = length;
}
switch (in->type)
{
case MAP_SINGLE:
- match = !memcmp (value, value_str (&in->x, trns->max_src_width),
- width);
+ match = !memcmp (value, in->x.s, width);
break;
case MAP_ELSE:
match = true;
char *error;
error = data_in (ss_buffer (CHAR_CAST_BUG (char *, value), width),
- C_ENCODING, FMT_F, &uv, 0, encoding);
+ C_ENCODING, FMT_F, settings_get_fmt_settings (),
+ &uv, 0, encoding);
match = error == NULL;
free (error);
if (trns->dst_type == VAL_NUMERIC)
{
- double *dst = &case_data_rw (*c, dst_var)->f;
+ double *dst = case_num_rw (*c, dst_var);
if (out != NULL)
*dst = !out->copy_input ? out->value.f : case_num (*c, src_var);
else if (trns->src_vars != trns->dst_vars)
if (out != NULL)
{
if (!out->copy_input)
- memcpy (dst, value_str (&out->value, trns->max_dst_width),
- var_get_width (dst_var));
+ memcpy (dst, out->value.s, var_get_width (dst_var));
else if (trns->src_vars != trns->dst_vars)
{
union value *dst_data = case_data_rw (*c, dst_var);