[GRASS-SVN] r49480 - grass/branches/develbranch_6/raster/r.reclass
svn_grass at osgeo.org
svn_grass at osgeo.org
Thu Dec 1 23:05:28 EST 2011
Author: hamish
Date: 2011-12-01 20:05:28 -0800 (Thu, 01 Dec 2011)
New Revision: 49480
Modified:
grass/branches/develbranch_6/raster/r.reclass/main.c
Log:
support '-' as an alias for stdin
Modified: grass/branches/develbranch_6/raster/r.reclass/main.c
===================================================================
--- grass/branches/develbranch_6/raster/r.reclass/main.c 2011-12-02 03:49:36 UTC (rev 49479)
+++ grass/branches/develbranch_6/raster/r.reclass/main.c 2011-12-02 04:05:28 UTC (rev 49480)
@@ -60,7 +60,8 @@
parm.rules = G_define_standard_option(G_OPT_F_INPUT);
parm.rules->key = "rules";
- parm.rules->description = _("File containing reclass rules");
+ parm.rules->label = _("File containing reclass rules");
+ parm.rules->description = _("\"-\" to read from stdin");
parm.rules->required = NO;
parm.rules->guisection = _("Required");
@@ -85,7 +86,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(_("Cannot open rules file <%s>"),
More information about the grass-commit
mailing list