[GRASS-SVN] r39147 - grass/branches/releasebranch_6_4/raster/r.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Sat Sep 12 03:16:45 EDT 2009


Author: neteler
Date: 2009-09-12 03:16:44 -0400 (Sat, 12 Sep 2009)
New Revision: 39147

Modified:
   grass/branches/releasebranch_6_4/raster/r.mapcalc/xround.c
Log:
Rename round() -> i_round() to avoid conflict with C99 function of that name (merge from trunk, r39130)

Modified: grass/branches/releasebranch_6_4/raster/r.mapcalc/xround.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.mapcalc/xround.c	2009-09-12 07:16:33 UTC (rev 39146)
+++ grass/branches/releasebranch_6_4/raster/r.mapcalc/xround.c	2009-09-12 07:16:44 UTC (rev 39147)
@@ -18,9 +18,9 @@
   numbers, and subtracting .5 from negatives.
 **********************************************************************/
 
-/* round(x) rounds x to nearest CELL value, handles negative correctly */
+/* i_round(x) rounds x to nearest CELL value, handles negative correctly */
 
-static int round(double x)
+static int i_round(double x)
 {
     int n;
 
@@ -76,7 +76,7 @@
 		if (IS_NULL_F(&arg1[i]))
 		    SET_NULL_C(&res[i]);
 		else
-		    res[i] = round(arg1[i]);
+		    res[i] = i_round(arg1[i]);
 	    return 0;
 	}
     case DCELL_TYPE:
@@ -87,7 +87,7 @@
 		if (IS_NULL_D(&arg1[i]))
 		    SET_NULL_C(&res[i]);
 		else
-		    res[i] = round(arg1[i]);
+		    res[i] = i_round(arg1[i]);
 	    return 0;
 	}
     default:



More information about the grass-commit mailing list