[GRASS-SVN] r44127 - grass/branches/releasebranch_6_4/raster/r.colors

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Oct 31 06:28:30 EDT 2010


Author: martinl
Date: 2010-10-31 03:28:30 -0700 (Sun, 31 Oct 2010)
New Revision: 44127

Modified:
   grass/branches/releasebranch_6_4/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/releasebranch_6_4/raster/r.colors/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.colors/main.c	2010-10-31 10:27:12 UTC (rev 44126)
+++ grass/branches/releasebranch_6_4/raster/r.colors/main.c	2010-10-31 10:28:30 UTC (rev 44127)
@@ -310,8 +310,10 @@
     /*if (have_colors >= 0)
        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