X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Ftab.c;h=fbb292fdbb84b6639a844b26a1d689df87e1fc31;hb=d4d9866bb2ec1797b8fb103e7144d0e9ffd1abff;hp=862028a8c5ab56959896e8b9cb8c9deb1f9c1c65;hpb=7b98b3a4f58f6dc5a8e9cbc188b627966d5e652d;p=pspp-builds.git diff --git a/src/tab.c b/src/tab.c index 862028a8..fbb292fd 100644 --- a/src/tab.c +++ b/src/tab.c @@ -570,7 +570,6 @@ tab_value (struct tab_table *table, int c, int r, unsigned char opt, const union value *v, const struct fmt_spec *f) { char *contents; - union value temp_val; assert (table != NULL && v != NULL && f != NULL); #if GLOBAL_DEBUGGING @@ -591,11 +590,6 @@ tab_value (struct tab_table *table, int c, int r, unsigned char opt, ls_init (&table->cc[c + r * table->cf], contents, f->w); table->ct[c + r * table->cf] = opt; - if (formats[f->type].cat & FCAT_STRING) - { - temp_val.c = (char *) v->s; - v = &temp_val; - } data_out (contents, f, v); } @@ -609,6 +603,7 @@ tab_float (struct tab_table *table, int c, int r, unsigned char opt, char buf[40], *cp; struct fmt_spec f; + union value double_value; assert (table != NULL && w <= 40); @@ -635,7 +630,9 @@ tab_float (struct tab_table *table, int c, int r, unsigned char opt, } #endif - data_out (buf, &f, (union value *) &val); + double_value.f = val; + data_out (buf, &f, &double_value); + cp = buf; while (isspace ((unsigned char) *cp) && cp < &buf[w]) cp++;