From 9b87b488a4425730dfd3d2fb48609ee234cf1cad Mon Sep 17 00:00:00 2001 From: Brian Bruns Date: Tue, 3 Aug 2010 19:59:41 -0400 Subject: [PATCH] =?UTF-8?q?revised=20patch=20130-export-smallfloat=20from?= =?UTF-8?q?=20Nirgal=20Vourg=C3=A8re?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/libmdb/data.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libmdb/data.c b/src/libmdb/data.c index d6a2e1f..6811117 100644 --- a/src/libmdb/data.c +++ b/src/libmdb/data.c @@ -704,6 +704,7 @@ mdb_num_to_string(MdbHandle *mdb, int start, int datatype, int prec, int scale) return text; } +#if 0 static int trim_trailing_zeros(char * buff) { char *p; @@ -724,6 +725,7 @@ static int trim_trailing_zeros(char * buff) return 0; } +#endif /* Date/Time is stored as a double, where the whole part is the days from 12/30/1899 and the fractional @@ -839,13 +841,11 @@ char *mdb_col_to_string(MdbHandle *mdb, void *buf, int start, int datatype, int tf = mdb_get_single(buf, start); text = g_strdup_printf("%.*e", FLT_DIG - floor_log10(tf,1) - 1, tf); - trim_trailing_zeros(text); break; case MDB_DOUBLE: td = mdb_get_double(buf, start); text = g_strdup_printf("%.*e", DBL_DIG - floor_log10(td,0) - 1, td); - trim_trailing_zeros(text); break; case MDB_BINARY: case MDB_TEXT: