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

svn_grass at osgeo.org svn_grass at osgeo.org
Fri Jun 25 21:33:47 EDT 2010


Author: glynn
Date: 2010-06-26 01:33:47 +0000 (Sat, 26 Jun 2010)
New Revision: 42659

Modified:
   grass/trunk/raster/r.mapcalc/main.c
Log:
Generate error if both file= and expression= are given


Modified: grass/trunk/raster/r.mapcalc/main.c
===================================================================
--- grass/trunk/raster/r.mapcalc/main.c	2010-06-25 23:27:19 UTC (rev 42658)
+++ grass/trunk/raster/r.mapcalc/main.c	2010-06-26 01:33:47 UTC (rev 42659)
@@ -141,6 +141,9 @@
 
     overwrite_flag = module->overwrite;
 
+    if (expr->answer && file->answer)
+	G_fatal_error(_("file= and expression= are mutually exclusive"));
+
     if (expr->answer)
 	result = parse_string(expr->answer);
     else if (file->answer)



More information about the grass-commit mailing list