[GRASS-SVN] r33743 - grass/trunk/raster/r.statistics

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Oct 7 20:05:36 EDT 2008


Author: hamish
Date: 2008-10-07 20:05:36 -0400 (Tue, 07 Oct 2008)
New Revision: 33743

Modified:
   grass/trunk/raster/r.statistics/o_distrib.c
Log:
data output to stdout, G_debug (merge from devbr6)

Modified: grass/trunk/raster/r.statistics/o_distrib.c
===================================================================
--- grass/trunk/raster/r.statistics/o_distrib.c	2008-10-08 00:02:28 UTC (rev 33742)
+++ grass/trunk/raster/r.statistics/o_distrib.c	2008-10-08 00:05:36 UTC (rev 33743)
@@ -42,7 +42,9 @@
 
     catb = 0;
     csum = 0;
-    /*    fprintf(stderr,"***** Stage 1 - Calculating sums ****\n"); */
+
+    G_debug(1, "***** Stage 1 - Calculating sums ****");
+
     while (fscanf(fd1, "%ld %ld %ld", &basecat, &covercat, &area) == 3) {
 	if (catb != basecat) {
 	    o_out(fd2, catb, csum);
@@ -56,7 +58,7 @@
     rewind(fd1);
     freopen(tempfile2, "r", fd2);
 
-    /*    fprintf(stderr,"***** Stage 2 - Calculating percents of values in cover  ****\n"); */
+    G_debug(1, "***** Stage 2 - Calculating percents of values in cover  ****");
 
     catb = 0;
     tot = 0;
@@ -73,7 +75,7 @@
 
 	if (basecat) {
 	    sum = (double)(100.0 * area) / total_count;
-	    fprintf(stderr, "%8ld %8ld %f\n", basecat, covercat, sum);
+	    fprintf(stdout, "%8ld %8ld %f\n", basecat, covercat, sum);
 	    /*tot+=sum;
 	       fprintf(stderr,"Area: %ld   Tot: %ld  totsum: %lf\n",area,total_count,tot); */
 	}



More information about the grass-commit mailing list