[GRASS-SVN] r44124 - grass/trunk/raster/r.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 31 06:18:19 EDT 2010


Author: martinl
Date: 2010-10-31 03:18:19 -0700 (Sun, 31 Oct 2010)
New Revision: 44124

Modified:
   grass/trunk/raster/r.colors/main.c
Log:
r.colors: print warning when color table exists and flag -w is given


Modified: grass/trunk/raster/r.colors/main.c
===================================================================
--- grass/trunk/raster/r.colors/main.c	2010-10-31 10:03:56 UTC (rev 44123)
+++ grass/trunk/raster/r.colors/main.c	2010-10-31 10:18:19 UTC (rev 44124)
@@ -290,8 +290,10 @@
       Rast_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