[GRASS-SVN] r33742 -
grass/branches/develbranch_6/raster/r.statistics
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Oct 7 20:02:29 EDT 2008
Author: hamish
Date: 2008-10-07 20:02:28 -0400 (Tue, 07 Oct 2008)
New Revision: 33742
Modified:
grass/branches/develbranch_6/raster/r.statistics/o_distrib.c
Log:
data output to stdout, G_debug
Modified: grass/branches/develbranch_6/raster/r.statistics/o_distrib.c
===================================================================
--- grass/branches/develbranch_6/raster/r.statistics/o_distrib.c 2008-10-08 00:02:05 UTC (rev 33741)
+++ grass/branches/develbranch_6/raster/r.statistics/o_distrib.c 2008-10-08 00:02:28 UTC (rev 33742)
@@ -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