[GRASS-SVN] r39146 - grass/branches/develbranch_6/raster/r.mapcalc

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


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

Modified:
   grass/branches/develbranch_6/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/develbranch_6/raster/r.mapcalc/xround.c
===================================================================
--- grass/branches/develbranch_6/raster/r.mapcalc/xround.c	2009-09-12 07:11:11 UTC (rev 39145)
+++ grass/branches/develbranch_6/raster/r.mapcalc/xround.c	2009-09-12 07:16:33 UTC (rev 39146)
@@ -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