[GRASS-SVN] r49479 -
grass/branches/releasebranch_6_4/raster/r.recode
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 1 22:49:36 EST 2011
Author: hamish
Date: 2011-12-01 19:49:36 -0800 (Thu, 01 Dec 2011)
New Revision: 49479
Modified:
grass/branches/releasebranch_6_4/raster/r.recode/main.c
Log:
support '-' as an alias for stdin (merge from devbr6)
Modified: grass/branches/releasebranch_6_4/raster/r.recode/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.recode/main.c 2011-12-02 03:45:35 UTC (rev 49478)
+++ grass/branches/releasebranch_6_4/raster/r.recode/main.c 2011-12-02 03:49:36 UTC (rev 49479)
@@ -1,4 +1,3 @@
-
/****************************************************************************
*
* MODULE: r.recode
@@ -6,7 +5,7 @@
* Bob Covill <bcovill tekmap.ns.ca>, Hamish Bowman <hamish_nospam 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