X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=src%2Flanguage%2Fxforms%2Frecode.c;h=62b03ba073b9a5f6f6a1c5b282d9c26b0ce286b9;hp=e8a382a3d51cb739162b9ba192d24b5566c0357c;hb=a5097a183f00ab2d2dc538ba7094a4696e2fea04;hpb=4a8a4cd81b9d7d9e6b757be4d0a8a62b48325051 diff --git a/src/language/xforms/recode.c b/src/language/xforms/recode.c index e8a382a3..62b03ba0 100644 --- a/src/language/xforms/recode.c +++ b/src/language/xforms/recode.c @@ -83,6 +83,8 @@ struct recode_trns { struct pool *pool; + + /* Variable types, for convenience. */ enum val_type src_type; /* src_vars[*] type. */ enum val_type dst_type; /* dst_vars[*] type. */ @@ -90,6 +92,7 @@ struct recode_trns /* Variables. */ const struct variable **src_vars; /* Source variables. */ const struct variable **dst_vars; /* Destination variables. */ + const struct dictionary *dst_dict; /* Dictionary of dst_vars */ char **dst_names; /* Name of dest variables, if they're new. */ size_t var_cnt; /* Number of variables. */ @@ -540,6 +543,8 @@ create_dst_vars (struct recode_trns *trns, struct dictionary *dict) { size_t i; + trns->dst_dict = dict; + for (i = 0; i < trns->var_cnt; i++) { const struct variable **var = &trns->dst_vars[i]; @@ -625,7 +630,7 @@ find_src_string (struct recode_trns *trns, const uint8_t *value, msg_disable (); match = data_in (ss_buffer (value, width), LEGACY_NATIVE, - FMT_F, 0, 0, 0, &uv, 0); + FMT_F, 0, 0, 0, trns->dst_dict, &uv, 0); msg_enable (); out->value.f = uv.f; break;