X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Ftext-data-import-dialog.c;h=330d284741e6cd64185f8dc3faefe86ebd705554;hb=729b96a6bd9342c45e6f65a113fd87c70da85b0a;hp=70e69d13d3041790e8ba365703742a7db6392480;hpb=5c3291dc396b795696e94f47780308fd7ace6fc4;p=pspp-builds.git diff --git a/src/ui/gui/text-data-import-dialog.c b/src/ui/gui/text-data-import-dialog.c index 70e69d13..330d2847 100644 --- a/src/ui/gui/text-data-import-dialog.c +++ b/src/ui/gui/text-data-import-dialog.c @@ -310,11 +310,9 @@ apply_dict (const struct dictionary *dict, struct string *s) syntax_gen_pspp (s, "MISSING VALUES %ss (", name); for (j = 0; j < mv_n_values (mv); j++) { - union value value; if (j) ds_put_cstr (s, ", "); - mv_get_value (mv, &value, j); - syntax_gen_value (s, &value, width, format); + syntax_gen_value (s, mv_get_value (mv, j), width, format); } if (mv_has_range (mv)) @@ -1770,10 +1768,7 @@ parse_field (struct import_assistant *ia, } if (outputp != NULL) { - char *output = xmalloc (out.w + 1); - data_out (&val, &out, output); - output[out.w] = '\0'; - *outputp = output; + *outputp = data_out (&val, dict_get_encoding (ia->formats.dict), &out); } value_destroy (&val, var_get_width (var));