From: John Darrington Date: Sat, 18 Jul 2009 11:20:38 +0000 (+0200) Subject: Merge commit 'origin/data-encoding' X-Git-Tag: build37~53 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f04b0ced35a66cfdebefbcb53c81979add36ca3;p=pspp-builds.git Merge commit 'origin/data-encoding' Conflicts: src/language/dictionary/split-file.c --- 8f04b0ced35a66cfdebefbcb53c81979add36ca3 diff --cc src/data/value.h index 6955eea0,84f08d87..f9782e2d --- a/src/data/value.h +++ b/src/data/value.h @@@ -55,9 -56,12 +56,9 @@@ static inline bool value_try_init (unio static inline void value_destroy (union value *, int width); static inline double value_num (const union value *); - static inline const char *value_str (const union value *, int width); - static inline char *value_str_rw (union value *, int width); + static inline const uint8_t *value_str (const union value *, int width); + static inline uint8_t *value_str_rw (union value *, int width); -int compare_values (const void *, const void *, const void *var); -unsigned hash_value (const void *, const void *var); - static inline void value_copy (union value *, const union value *, int width); void value_copy_rpad (union value *, int dst_width, const union value *, int src_width, diff --cc src/language/dictionary/split-file.c index d2b79c63,0024787f..5d2b42d7 --- a/src/language/dictionary/split-file.c +++ b/src/language/dictionary/split-file.c @@@ -92,13 -92,13 +92,13 @@@ output_split_file_values (const struct const char *val_lab; const struct fmt_spec *print = var_get_print_format (v); - tab_text (t, 0, i + 1, TAB_LEFT | TAT_PRINTF, "%s", var_get_name (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); - tab_text (t, 1, i + 1, TAT_PRINTF, "%.*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);