use %a for more precision
authorraster <raster>
Thu, 19 May 2005 00:13:25 +0000 (00:13 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 19 May 2005 00:13:25 +0000 (00:13 +0000)
git-svn-id: http://svn.enlightenment.org/svn/e/trunk/e17/libs/eet@14848 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/eet_data.c

index 43c4649..28f1c14 100644 (file)
@@ -355,7 +355,7 @@ eet_data_put_float(void *src, int *size_ret)
    
    s = (float *)src;
    prev_locale = setlocale(LC_NUMERIC, "C");
-   snprintf(buf, sizeof(buf), "%16.16f", (double)(*s));
+   snprintf(buf, sizeof(buf), "%a", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
    len = strlen(buf);
    d = malloc(len + 1);
@@ -400,7 +400,7 @@ eet_data_put_double(void *src, int *size_ret)
    
    s = (double *)src;
    prev_locale = setlocale(LC_NUMERIC, "C");
-   snprintf(buf, sizeof(buf), "%32.32f", (double)(*s));
+   snprintf(buf, sizeof(buf), "%a", (double)(*s));
    if (prev_locale) setlocale(LC_NUMERIC, prev_locale);
    len = strlen(buf);
    d = malloc(len + 1);