X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-editor.c;h=a2ca1d8851c2f5f0b0f7db905cad41ca1a1153e0;hb=729b96a6bd9342c45e6f65a113fd87c70da85b0a;hp=e02cf730c7f381b1e7c81ef3b2bea247c0b92af8;hpb=16ca75fe99859fdec9f214a0fb9c1a3ef58c8442;p=pspp-builds.git diff --git a/src/ui/gui/psppire-data-editor.c b/src/ui/gui/psppire-data-editor.c index e02cf730..a2ca1d88 100644 --- a/src/ui/gui/psppire-data-editor.c +++ b/src/ui/gui/psppire-data-editor.c @@ -1646,20 +1646,17 @@ enum { /* Perform data_out for case CC, variable V, appending to STRING */ static void -data_out_g_string (GString *string, const struct variable *v, +data_out_g_string (GString *string, const struct dictionary *dict, const struct variable *v, const struct ccase *cc) { - char *buf ; - const struct fmt_spec *fs = var_get_print_format (v); const union value *val = case_data (cc, v); - buf = xzalloc (fs->w); - data_out (val, fs, buf); + char *s = data_out (val, dict_get_encoding (dict), fs); - g_string_append_len (string, buf, fs->w); + g_string_append_len (string, s, fs->w); - g_free (buf); + g_free (s); } static GString * @@ -1689,7 +1686,7 @@ clip_to_text (void) for (c = 0 ; c < var_cnt ; ++c) { const struct variable *v = dict_get_var (clip_dict, c); - data_out_g_string (string, v, cc); + data_out_g_string (string, clip_dict, v, cc); if ( c < val_cnt - 1 ) g_string_append (string, "\t"); } @@ -1734,7 +1731,7 @@ clip_to_html (void) { const struct variable *v = dict_get_var (clip_dict, c); g_string_append (string, ""); - data_out_g_string (string, v, cc); + data_out_g_string (string, clip_dict, v, cc); g_string_append (string, "\n"); }