[GRASS-SVN] r61160 - grass/trunk/raster/r.reclass

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Jul 6 21:21:01 PDT 2014


Author: hcho
Date: 2014-07-06 21:21:01 -0700 (Sun, 06 Jul 2014)
New Revision: 61160

Modified:
   grass/trunk/raster/r.reclass/main.c
   grass/trunk/raster/r.reclass/parse.c
Log:
r.reclass: Print messages to stderr

Modified: grass/trunk/raster/r.reclass/main.c
===================================================================
--- grass/trunk/raster/r.reclass/main.c	2014-07-07 00:45:08 UTC (rev 61159)
+++ grass/trunk/raster/r.reclass/main.c	2014-07-07 04:21:01 UTC (rev 61160)
@@ -99,16 +99,16 @@
     any = 0;
 
     if (tty) {
-	fprintf(stdout,
+	fprintf(stderr,
 		_("Enter rule(s), \"end\" when done, \"help\" if you need it\n"));
 	if (map_type == FCELL_TYPE)
-	    fprintf(stdout, _("FCELL: Data range is %.7g to %.7g\n"),
+	    fprintf(stderr, _("FCELL: Data range is %.7g to %.7g\n"),
 		    (double)min, (double)max);
 	else if (map_type == DCELL_TYPE)
-	    fprintf(stdout, _("DCELL: Data range is %.15g to %.15g\n"),
+	    fprintf(stderr, _("DCELL: Data range is %.15g to %.15g\n"),
 		    (double)min, (double)max);
 	else
-	    fprintf(stdout, _("CELL: Data range is %ld to %ld\n"), (long)min,
+	    fprintf(stderr, _("CELL: Data range is %ld to %ld\n"), (long)min,
 		    (long)max);
     }
 

Modified: grass/trunk/raster/r.reclass/parse.c
===================================================================
--- grass/trunk/raster/r.reclass/parse.c	2014-07-07 00:45:08 UTC (rev 61159)
+++ grass/trunk/raster/r.reclass/parse.c	2014-07-07 04:21:01 UTC (rev 61160)
@@ -38,11 +38,11 @@
 	case 0:
 	    save = cur;
 	    if (!strncmp(cur, "help", 4)) {	/* help text */
-		fprintf(stdout, _("Enter a rule in one of these formats:\n"));
-		fprintf(stdout, "1 3 5      = 1   %s\n", _("poor quality"));
-		fprintf(stdout, "1 thru 10  = 1\n");
-		fprintf(stdout, "20 thru 50 = 2   %s\n", _("medium quality"));
-		fprintf(stdout, "*          = NULL\n");
+		fprintf(stderr, _("Enter a rule in one of these formats:\n"));
+		fprintf(stderr, "1 3 5      = 1   %s\n", _("poor quality"));
+		fprintf(stderr, "1 thru 10  = 1\n");
+		fprintf(stderr, "20 thru 50 = 2   %s\n", _("medium quality"));
+		fprintf(stderr, "*          = NULL\n");
 		state = 0;
 		cur += 4;
 		continue;
@@ -193,7 +193,7 @@
 	*v = sign * (CELL) fv;
 
 	if (dec && state)
-	    fprintf(stdout, _("%f rounded up to %d\n"), sign * fv, *v);
+	    fprintf(stderr, _("%f rounded up to %d\n"), sign * fv, *v);
     }
 
     switch (*cur) {



More information about the grass-commit mailing list