X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?p=pspp-builds.git;a=blobdiff_plain;f=src%2Flanguage%2Fdictionary%2Fsplit-file.c;fp=src%2Flanguage%2Fdictionary%2Fsplit-file.c;h=5d2b42d758eed2d1e305d05046d59cf0aa290877;hp=d2b79c63dd6ce2a6c65cac7153ad468e52b6877f;hb=8f04b0ced35a66cfdebefbcb53c81979add36ca3;hpb=2f1db0c762ca29e54b29d9a28bce14c54cf090db diff --git a/src/language/dictionary/split-file.c b/src/language/dictionary/split-file.c index d2b79c63..5d2b42d7 100644 --- a/src/language/dictionary/split-file.c +++ b/src/language/dictionary/split-file.c @@ -88,17 +88,17 @@ output_split_file_values (const struct dataset *ds, const struct ccase *c) for (i = 0; i < split_cnt; i++) { const struct variable *v = split[i]; - char temp_buf[80]; + char *s; const char *val_lab; const struct fmt_spec *print = var_get_print_format (v); tab_text_format (t, 0, i + 1, TAB_LEFT, "%s", var_get_name (v)); - data_out (case_data (c, v), print, temp_buf); - temp_buf[print->w] = 0; - - tab_text_format (t, 1, i + 1, 0, "%.*s", print->w, temp_buf); + s = data_out (case_data (c, v), dict_get_encoding (dict), print); + tab_text_format (t, 1, i + 1, 0, "%.*s", print->w, s); + free (s); + val_lab = var_lookup_value_label (v, case_data (c, v)); if (val_lab) tab_text (t, 2, i + 1, TAB_LEFT, val_lab);