[GRASS-SVN] r44126 - grass/branches/develbranch_6/raster/r.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 31 06:27:12 EDT 2010


Author: martinl
Date: 2010-10-31 03:27:12 -0700 (Sun, 31 Oct 2010)
New Revision: 44126

Modified:
   grass/branches/develbranch_6/raster/r.colors/main.c
Log:
r.colors: print warning when color table exists and flag -w is given
(merge r44124 from trunk)


Modified: grass/branches/develbranch_6/raster/r.colors/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.colors/main.c	2010-10-31 10:18:44 UTC (rev 44125)
+++ grass/branches/develbranch_6/raster/r.colors/main.c	2010-10-31 10:27:12 UTC (rev 44126)
@@ -324,8 +324,10 @@
       G_free_colors(&colors);
     */
     
-    if (have_colors > 0 && !overwrite)
-	exit(EXIT_SUCCESS);
+    if (have_colors > 0 && !overwrite) {
+	G_warning(_("Color table exists. Exiting."));
+	exit(EXIT_FAILURE);
+    }
 
     G_suppress_warnings(0);
 



More information about the grass-commit mailing list