[GRASS-SVN] r49478 - grass/branches/develbranch_6/raster/r.recode

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Dec 1 22:45:35 EST 2011


Author: hamish
Date: 2011-12-01 19:45:35 -0800 (Thu, 01 Dec 2011)
New Revision: 49478

Modified:
   grass/branches/develbranch_6/raster/r.recode/main.c
Log:
support '-' as an alias for stdin

Modified: grass/branches/develbranch_6/raster/r.recode/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.recode/main.c	2011-12-01 23:25:58 UTC (rev 49477)
+++ grass/branches/develbranch_6/raster/r.recode/main.c	2011-12-02 03:45:35 UTC (rev 49478)
@@ -1,4 +1,3 @@
-
 /****************************************************************************
  *
  * MODULE:       r.recode
@@ -6,7 +5,7 @@
  *               Bob Covill <bcovill tekmap.ns.ca>, Hamish Bowman <hamish_b yahoo.com>,
  *               Jan-Oliver Wagner <jan intevation.de>
  * PURPOSE:      Recode categorical raster maps
- * COPYRIGHT:    (C) 1999-2006, 2010 by the GRASS Development Team
+ * COPYRIGHT:    (C) 1999-2011 by the GRASS Development Team
  *
  *               This program is free software under the GNU General
  *               Public License (>=v2). Read the file COPYING that
@@ -88,7 +87,7 @@
 	G_fatal_error(_("Input map can NOT be the same as output map"));
 
     srcfp = stdin;
-    if (parm.rules->answer) {
+    if (parm.rules->answer && strcmp("-", parm.rules->answer) != 0) {
 	srcfp = fopen(parm.rules->answer, "r");
 	if (!srcfp)
 	    G_fatal_error(_("Unable to open file <%s>"),



More information about the grass-commit mailing list