X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-store.c;h=13ad0cc6cd283edfb9656a67f4eb2b3f7ae7873b;hp=0e378bbec1f989cea8b6c94e971e262ab69d9db5;hb=f15c854d8500105766b2f5666bb62b983ff24f88;hpb=9254d30d06a0565c89daccedd93a94c4c6086004 diff --git a/src/ui/gui/psppire-data-store.c b/src/ui/gui/psppire-data-store.c index 0e378bbe..13ad0cc6 100644 --- a/src/ui/gui/psppire-data-store.c +++ b/src/ui/gui/psppire-data-store.c @@ -585,7 +585,6 @@ psppire_data_store_get_string (PsppireDataStore *store, glong row, glong column) const struct variable *pv ; union value v; int width; - GString *s; g_return_val_if_fail (store->dict, NULL); g_return_val_if_fail (store->datasheet, NULL); @@ -622,21 +621,10 @@ psppire_data_store_get_string (PsppireDataStore *store, glong row, glong column) fp = var_get_write_format (pv); - s = g_string_sized_new (fp->w + 1); - g_string_set_size (s, fp->w); - - memset (s->str, 0, fp->w); - - g_assert (fp->w == s->len); - /* Converts binary value V into printable form in the exactly FP->W character in buffer S according to format specification FP. No null terminator is appended to the buffer. */ - data_out (&v, fp, s->str); - - text = recode_string (UTF8, psppire_dict_encoding (store->dict), - s->str, fp->w); - g_string_free (s, TRUE); + text = data_out (&v, fp); g_strchomp (text);