[GRASS-SVN] r55183 - grass/branches/releasebranch_6_4/lib/gis

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Feb 23 03:01:54 PST 2013


Author: mmetz
Date: 2013-02-23 03:01:54 -0800 (Sat, 23 Feb 2013)
New Revision: 55183

Modified:
   grass/branches/releasebranch_6_4/lib/gis/color_write.c
Log:
libgis: revert r55122

Modified: grass/branches/releasebranch_6_4/lib/gis/color_write.c
===================================================================
--- grass/branches/releasebranch_6_4/lib/gis/color_write.c	2013-02-23 08:53:38 UTC (rev 55182)
+++ grass/branches/releasebranch_6_4/lib/gis/color_write.c	2013-02-23 11:01:54 UTC (rev 55183)
@@ -121,7 +121,7 @@
     fprintf(fd, "%% %s %s\n", str1, str2);
 
     if (colors->shift) {
-	sprintf(str2, "%.15g", (double)colors->shift);
+	sprintf(str2, "%.17g", (double)colors->shift);
 	G_trim_decimal(str2);
 	fprintf(fd, "shift:%s\n", str2);
     }
@@ -169,7 +169,7 @@
 	if (rule->low.value == dmin)
 	    format_min(str, (double)rule->low.value);
 	else {
-	    sprintf(str, "%.15g", (double)rule->low.value);
+	    sprintf(str, "%.17g", (double)rule->low.value);
 	    G_trim_decimal(str);
 	}
 	fprintf(fd, "%s:%d", str, (int)rule->low.red);
@@ -180,7 +180,7 @@
 	    if (rule->high.value == dmax)
 		format_max(str, (double)rule->high.value);
 	    else {
-		sprintf(str, "%.15g", (double)rule->high.value);
+		sprintf(str, "%.17g", (double)rule->high.value);
 		G_trim_decimal(str);
 	    }
 	    fprintf(fd, " %s:%d", str, (int)rule->high.red);
@@ -246,16 +246,16 @@
 {
     double dtmp;
 
-    sprintf(str, "%.15g", dval);
+    sprintf(str, "%.17g", dval);
     /* Note that G_trim_decimal() does not trim e.g. 1.0000000e-20 */
     G_trim_decimal(str);
     sscanf(str, "%lf", &dtmp);
     if (dtmp != dval) {  /* if no zeros after decimal point were trimmed */
 	/* lower dval by GRASS_EPSILON fraction */
 	if (dval > 0)
-	    sprintf(str, "%.15g", dval * (1 - GRASS_EPSILON));
+	    sprintf(str, "%.17g", dval * (1 - GRASS_EPSILON));
 	else
-	    sprintf(str, "%.15g", dval * (1 + GRASS_EPSILON));
+	    sprintf(str, "%.17g", dval * (1 + GRASS_EPSILON));
     }
 
     return 0;
@@ -265,16 +265,16 @@
 {
     double dtmp;
 
-    sprintf(str, "%.15g", dval);
+    sprintf(str, "%.17g", dval);
     /* Note that G_trim_decimal() does not trim e.g. 1.0000000e-20 */
     G_trim_decimal(str);
     sscanf(str, "%lf", &dtmp);
     if (dtmp != dval) {  /* if  no zeros after decimal point were trimmed */
 	/* increase dval by by GRASS_EPSILON fraction */
 	if (dval > 0)
-	    sprintf(str, "%.15g", dval * (1 + GRASS_EPSILON));
+	    sprintf(str, "%.17g", dval * (1 + GRASS_EPSILON));
 	else
-	    sprintf(str, "%.15g", dval * (1 - GRASS_EPSILON));
+	    sprintf(str, "%.17g", dval * (1 - GRASS_EPSILON));
     }
 
     return 0;



More information about the grass-commit mailing list