[GRASS-SVN] r60522 - grass/trunk/raster/r.series
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue May 27 16:06:36 PDT 2014
Author: glynn
Date: 2014-05-27 16:06:36 -0700 (Tue, 27 May 2014)
New Revision: 60522
Modified:
grass/trunk/raster/r.series/main.c
Log:
Allow file=- for stdin
Modified: grass/trunk/raster/r.series/main.c
===================================================================
--- grass/trunk/raster/r.series/main.c 2014-05-27 22:30:53 UTC (rev 60521)
+++ grass/trunk/raster/r.series/main.c 2014-05-27 23:06:36 UTC (rev 60522)
@@ -205,11 +205,15 @@
if (parm.file->answer) {
FILE *in;
int max_inputs;
+
+ if (strcmp(parm.file->answer, "-") == 0)
+ in = stdin;
+ else {
+ in = fopen(parm.file->answer, "r");
+ if (!in)
+ G_fatal_error(_("Unable to open input file <%s>"), parm.file->answer);
+ }
- in = fopen(parm.file->answer, "r");
- if (!in)
- G_fatal_error(_("Unable to open input file <%s>"), parm.file->answer);
-
num_inputs = 0;
max_inputs = 0;
More information about the grass-commit
mailing list