[GRASS-SVN] r39130 - grass/trunk/raster/r.mapcalc

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Sep 11 23:34:43 EDT 2009


Author: glynn
Date: 2009-09-11 23:34:43 -0400 (Fri, 11 Sep 2009)
New Revision: 39130

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


Modified: grass/trunk/raster/r.mapcalc/xround.c
===================================================================
--- grass/trunk/raster/r.mapcalc/xround.c	2009-09-11 15:55:37 UTC (rev 39129)
+++ grass/trunk/raster/r.mapcalc/xround.c	2009-09-12 03:34:43 UTC (rev 39130)
@@ -19,9 +19,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;
 
@@ -77,7 +77,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:
@@ -88,7 +88,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