[GRASS-SVN] r36145 - in grass/trunk: imagery/i.cluster lib/gis
raster/r.topmodel
svn_grass at osgeo.org
svn_grass at osgeo.org
Sun Mar 1 00:51:59 EST 2009
Author: hamish
Date: 2009-03-01 00:51:59 -0500 (Sun, 01 Mar 2009)
New Revision: 36145
Modified:
grass/trunk/imagery/i.cluster/main.c
grass/trunk/lib/gis/opencell.c
grass/trunk/raster/r.topmodel/misc.c
Log:
/dev/null to G_DEV_NULL (trac #508; merge from devbr6)
Modified: grass/trunk/imagery/i.cluster/main.c
===================================================================
--- grass/trunk/imagery/i.cluster/main.c 2009-03-01 05:47:42 UTC (rev 36144)
+++ grass/trunk/imagery/i.cluster/main.c 2009-03-01 05:51:59 UTC (rev 36145)
@@ -215,7 +215,7 @@
}
if ((reportfile = parm.report_file->answer) == NULL)
- report = fopen("/dev/null", "w");
+ report = fopen(G_DEV_NULL, "w");
else
report = fopen(reportfile, "w");
if (report == NULL) {
Modified: grass/trunk/lib/gis/opencell.c
===================================================================
--- grass/trunk/lib/gis/opencell.c 2009-03-01 05:47:42 UTC (rev 36144)
+++ grass/trunk/lib/gis/opencell.c 2009-03-01 05:51:59 UTC (rev 36145)
@@ -258,7 +258,7 @@
if (gdal) {
#ifdef HAVE_GDAL
/* dummy descriptor to reserve the fileinfo slot */
- fd = open("/dev/null", O_RDONLY);
+ fd = open(G_DEV_NULL, O_RDONLY);
#else
G_warning(_("map <%s@%s> is a GDAL link but GRASS is compiled without GDAL support"),
r_name, r_mapset);
Modified: grass/trunk/raster/r.topmodel/misc.c
===================================================================
--- grass/trunk/raster/r.topmodel/misc.c 2009-03-01 05:47:42 UTC (rev 36144)
+++ grass/trunk/raster/r.topmodel/misc.c 2009-03-01 05:51:59 UTC (rev 36145)
@@ -38,7 +38,7 @@
}
if (hdmap) {
- sprintf(buf, "g.region rast=%s > /dev/null", hdmap);
+ sprintf(buf, "g.region rast=%s --quiet", hdmap);
G_message("g.region rast=%s ... ", hdmap);
if (run(buf))
@@ -50,7 +50,7 @@
void depressionless(void)
{
char buf[GPATH_MAX];
- sprintf(buf, "r.fill.dir input=%s elev=%s dir=%s type=grass > /dev/null",
+ sprintf(buf, "r.fill.dir input=%s elev=%s dir=%s type=grass --quiet",
map.elev, map.fill, map.dir);
G_message("r.fill.dir input=%s elev=%s dir=%s type=grass ... ",
map.elev, map.fill, map.dir);
@@ -68,7 +68,7 @@
void basin_elevation(void)
{
char buf[GPATH_MAX];
- sprintf(buf, "r.mapcalc '%s = if(%s == 0 || isnull(%s), null(), %s)' > /dev/null",
+ sprintf(buf, "r.mapcalc '%s = if(%s == 0 || isnull(%s), null(), %s)' --quiet",
map.belev, map.basin, map.basin, map.elev);
G_message("r.mapcalc '%s = if(%s == 0 || isnull(%s), null(), %s)'"
" ... ", map.belev, map.basin, map.basin, map.elev);
@@ -85,7 +85,7 @@
{
char buf[GPATH_MAX];
if (map.belev) {
- sprintf(buf, "r.topidx input=%s output=%s > /dev/null",
+ sprintf(buf, "r.topidx input=%s output=%s --quiet",
map.belev, map.topidx);
G_message("r.topidx input=%s output=%s ... ", map.belev, map.topidx);
More information about the grass-commit
mailing list