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

svn_grass at osgeo.org svn_grass at osgeo.org
Wed Sep 24 09:49:14 EDT 2008


Author: glynn
Date: 2008-09-24 09:49:14 -0400 (Wed, 24 Sep 2008)
New Revision: 33521

Modified:
   grass/branches/develbranch_6/raster/r.colors/main.c
Log:
Revert DWIM-ism


Modified: grass/branches/develbranch_6/raster/r.colors/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.colors/main.c	2008-09-24 13:43:16 UTC (rev 33520)
+++ grass/branches/develbranch_6/raster/r.colors/main.c	2008-09-24 13:49:14 UTC (rev 33521)
@@ -259,24 +259,6 @@
     cmap = opt.rast->answer;
     rules = opt.rules->answer;
 
-    /* handle 'color=rules rules=file' */
-    if(style && rules) {
-	if(strcmp(style, "rules") == 0)
-	    style = NULL;
-    }
-
-    /* handle rules="-" (from stdin) by translating that to colors=rules */
-    /* this method should not be ported to GRASS 7 where color=rules DNE */
-    if(rules && strcmp(rules, "-") == 0) {
-	if(style && (strcmp(style, "rules") != 0))
-	    G_fatal_error(
-	      _("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
-	else {
-	    style = G_store("rules");
-	    rules = NULL;
-	}
-    }
-
     if (!name)
 	G_fatal_error(_("No map specified"));
 
@@ -289,6 +271,12 @@
     if ((style && (cmap || rules)) || (cmap && rules))
 	G_fatal_error(_("\"color\", \"rules\", and \"raster\" options are mutually exclusive"));
 
+    /* handle rules="-" (from stdin) by translating that to colors=rules */
+    /* this method should not be ported to GRASS 7 where color=rules DNE */
+    if (rules && strcmp(rules, "-") == 0) {
+	style = G_store("rules");
+	rules = NULL;
+    }
 
     mapset = G_find_cell2(name, "");
     if (mapset == NULL)



More information about the grass-commit mailing list