Debian patch 130-export-smallfloat from Vincent Fourmond

This commit is contained in:
Brian Bruns 2010-06-17 19:56:22 -04:00
parent 6181b11faf
commit 4fb8786418

View File

@ -837,13 +837,13 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int
break; break;
case MDB_FLOAT: case MDB_FLOAT:
tf = mdb_get_single(buf, start); tf = mdb_get_single(buf, start);
text = g_strdup_printf("%.*f", text = g_strdup_printf("%.*e",
FLT_DIG - floor_log10(tf,1) - 1, tf); FLT_DIG - floor_log10(tf,1) - 1, tf);
trim_trailing_zeros(text); trim_trailing_zeros(text);
break; break;
case MDB_DOUBLE: case MDB_DOUBLE:
td = mdb_get_double(buf, start); td = mdb_get_double(buf, start);
text = g_strdup_printf("%.*f", text = g_strdup_printf("%.*e",
DBL_DIG - floor_log10(td,0) - 1, td); DBL_DIG - floor_log10(td,0) - 1, td);
trim_trailing_zeros(text); trim_trailing_zeros(text);
break; break;