[GRASS-SVN] r34080 - grass/trunk/raster/r.terraflow
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 29 23:47:37 EDT 2008
Author: hamish
Date: 2008-10-29 23:47:36 -0400 (Wed, 29 Oct 2008)
New Revision: 34080
Modified:
grass/trunk/raster/r.terraflow/main.cc
Log:
some G_message (merge from devbr6)
Modified: grass/trunk/raster/r.terraflow/main.cc
===================================================================
--- grass/trunk/raster/r.terraflow/main.cc 2008-10-30 03:42:33 UTC (rev 34079)
+++ grass/trunk/raster/r.terraflow/main.cc 2008-10-30 03:47:36 UTC (rev 34080)
@@ -229,7 +229,7 @@
RASTER_MAP_TYPE data_type;
data_type = G_raster_map_type(opt->elev_grid, mapset);
#ifdef ELEV_SHORT
- G_message(_("elevation stored as SHORT (%dB)"),
+ G_verbose_message(_("Elevation stored as SHORT (%dB)"),
sizeof(elevation_type));
if (data_type == FCELL_TYPE) {
G_warning(_("raster %s is of type FCELL_TYPE "
@@ -241,7 +241,7 @@
}
#endif
#ifdef ELEV_FLOAT
- G_message( _("elevation stored as FLOAT (%dB)"),
+ G_verbose_message( _("Elevation stored as FLOAT (%dB)"),
sizeof(elevation_type));
if (data_type == CELL_TYPE) {
G_warning(_("raster %s is of type CELL_TYPE "
@@ -338,7 +338,7 @@
size_t mm_size = opt->mem << 20; /* (in bytes) */
char tmp[100];
formatNumber(tmp, mm_size);
- sprintf(buf,"memory size: %s bytes", tmp);
+ sprintf(buf, "Memory size: %s bytes", tmp);
stats->comment(buf);
}
@@ -420,18 +420,19 @@
long long maxneed = (fillmaxsize > flowmaxsize) ? fillmaxsize: flowmaxsize;
maxneed = 2*maxneed; /* need 2*N to sort */
- fprintf(stderr, "total elements=%ld, nodata elements=%ld\n", (long)nrows*ncols, nodata_count);
- fprintf(stderr, "largest temporary files: \n");
- fprintf(stderr, "\t\t FILL: %s [%d elements, %dB each]\n",
+ G_message( "total elements=%ld, nodata elements=%ld",
+ (long)nrows*ncols, nodata_count);
+ G_message( "largest temporary files: ");
+ G_message( "\t\t FILL: %s [%d elements, %dB each]",
formatNumber(buf, fillmaxsize),
nrows * ncols, sizeof(waterWindowType));
- fprintf(stderr, "\t\t FLOW: %s [%ld elements, %dB each]\n",
+ G_message( "\t\t FLOW: %s [%ld elements, %dB each]",
formatNumber(buf, flowmaxsize),
(long)(nrows * ncols - nodata_count), sizeof(sweepItem));
- fprintf(stderr, "Will need at least %s space available in %s\n",
- formatNumber(buf, maxneed), /* need 2*N to sort */
+ G_message( "Will need at least %s space available in %s",
+ formatNumber(buf, maxneed), /* need 2*N to sort */
getenv(STREAM_TMPDIR));
-
+
#ifdef HAVE_STATVFS_H
fprintf(stderr, "Checking current space in %s: ", getenv(STREAM_TMPDIR));
struct statvfs statbuf;
@@ -444,7 +445,7 @@
fprintf(stderr, ". OK.\n");
} else {
fprintf(stderr, ". Not enough space available.\n");
- exit(1);
+ exit(EXIT_FAILURE);
}
#endif
}
@@ -458,11 +459,6 @@
Rtimer rtTotal;
char buf[BUFSIZ];
-/* this disturbs the parser
- fprintf(stderr, "r.terraflow December 2003\n");
- fflush(stderr);
-*/
-
/* initialize GIS library */
G_gisinit(argv[0]);
@@ -498,8 +494,7 @@
parse_args(argc, argv);
check_args();
- fprintf(stderr, "region size is %d x %d\n", nrows, ncols);
- fflush(stderr);
+ G_verbose_message( _("Region size is %d x %d"), nrows, ncols);
/* check STREAM path (the place where intermediate STREAMs are placed) */
sprintf(buf, "%s=%s",STREAM_TMPDIR, opt->streamdir);
More information about the grass-commit
mailing list