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

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Mar 24 23:37:23 EDT 2009


Author: hcho
Date: 2009-03-24 23:37:23 -0400 (Tue, 24 Mar 2009)
New Revision: 36473

Modified:
   grass/trunk/raster/r.mapcalc/evaluate.c
   grass/trunk/raster/r.mapcalc/globals.h
   grass/trunk/raster/r.mapcalc/main.c
Log:
Fixed segfault: naming conflicts with overwrite(3) in Slackware 12

Modified: grass/trunk/raster/r.mapcalc/evaluate.c
===================================================================
--- grass/trunk/raster/r.mapcalc/evaluate.c	2009-03-24 21:33:31 UTC (rev 36472)
+++ grass/trunk/raster/r.mapcalc/evaluate.c	2009-03-25 03:37:23 UTC (rev 36473)
@@ -305,7 +305,7 @@
 
 	var = e->data.bind.var;
 
-	if (!overwrite && check_output_map(var))
+	if (!overwrite_flag && check_output_map(var))
 	    G_fatal_error(_("output map <%s> exists"), var);
     }
 

Modified: grass/trunk/raster/r.mapcalc/globals.h
===================================================================
--- grass/trunk/raster/r.mapcalc/globals.h	2009-03-24 21:33:31 UTC (rev 36472)
+++ grass/trunk/raster/r.mapcalc/globals.h	2009-03-25 03:37:23 UTC (rev 36473)
@@ -5,7 +5,7 @@
 extern volatile int floating_point_exception;
 extern volatile int floating_point_exception_occurred;
 extern int overflow_occurred;
-extern int overwrite;
+extern int overwrite_flag;
 
 extern int current_depth, current_row;
 extern int depths, rows, columns;

Modified: grass/trunk/raster/r.mapcalc/main.c
===================================================================
--- grass/trunk/raster/r.mapcalc/main.c	2009-03-24 21:33:31 UTC (rev 36472)
+++ grass/trunk/raster/r.mapcalc/main.c	2009-03-25 03:37:23 UTC (rev 36473)
@@ -26,7 +26,7 @@
 /****************************************************************************/
 
 int overflow_occurred;
-int overwrite;
+int overwrite_flag;
 
 volatile int floating_point_exception;
 volatile int floating_point_exception_occurred;
@@ -135,7 +135,7 @@
     if (G_parser(argc, argv))
 	exit(EXIT_FAILURE);
 
-    overwrite = module->overwrite;
+    overwrite_flag = module->overwrite;
 
     if (expr->answer)
 	result = parse_string(expr->answer);



More information about the grass-commit mailing list