[GRASS-SVN] r36143 - in grass/branches/develbranch_6: imagery/i.cluster lib/gis raster/r.topmodel

svn_grass at osgeo.org svn_grass at osgeo.org
Sun Mar 1 00:45:56 EST 2009


Author: hamish
Date: 2009-03-01 00:45:55 -0500 (Sun, 01 Mar 2009)
New Revision: 36143

Modified:
   grass/branches/develbranch_6/imagery/i.cluster/main.c
   grass/branches/develbranch_6/lib/gis/opencell.c
   grass/branches/develbranch_6/raster/r.topmodel/misc.c
Log:
/dev/null to G_DEV_NULL (trac #508)

Modified: grass/branches/develbranch_6/imagery/i.cluster/main.c
===================================================================
--- grass/branches/develbranch_6/imagery/i.cluster/main.c	2009-02-28 12:59:58 UTC (rev 36142)
+++ grass/branches/develbranch_6/imagery/i.cluster/main.c	2009-03-01 05:45:55 UTC (rev 36143)
@@ -227,7 +227,7 @@
     verbose = !flag.q->answer;
 
     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/branches/develbranch_6/lib/gis/opencell.c
===================================================================
--- grass/branches/develbranch_6/lib/gis/opencell.c	2009-02-28 12:59:58 UTC (rev 36142)
+++ grass/branches/develbranch_6/lib/gis/opencell.c	2009-03-01 05:45:55 UTC (rev 36143)
@@ -257,7 +257,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/branches/develbranch_6/raster/r.topmodel/misc.c
===================================================================
--- grass/branches/develbranch_6/raster/r.topmodel/misc.c	2009-02-28 12:59:58 UTC (rev 36142)
+++ grass/branches/develbranch_6/raster/r.topmodel/misc.c	2009-03-01 05:45:55 UTC (rev 36143)
@@ -37,7 +37,7 @@
     }
 
     if (hdmap) {
-	sprintf(buf, "%s/bin/g.region rast=%s > /dev/null", gisbase, hdmap);
+	sprintf(buf, "%s/bin/g.region rast=%s --quiet", gisbase, hdmap);
 	G_message("g.region rast=%s ... ", hdmap);
 
 	if (run(buf))
@@ -49,7 +49,7 @@
 void depressionless(void)
 {
     sprintf(buf, "%s/bin/r.fill.dir "
-	    "input=%s elev=%s dir=%s type=grass > /dev/null",
+	    "input=%s elev=%s dir=%s type=grass --quiet",
 	    gisbase, 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);
@@ -67,7 +67,7 @@
 void basin_elevation(void)
 {
     sprintf(buf, "%s/bin/r.mapcalc "
-	    "'%s = if(%s == 0 || isnull(%s), null(), %s)' > /dev/null",
+	    "'%s = if(%s == 0 || isnull(%s), null(), %s)' --quiet",
 	    gisbase, 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);
@@ -84,7 +84,7 @@
 {
     if (map.belev) {
 	sprintf(buf, "%s/bin/r.topidx "
-		"input=%s output=%s > /dev/null",
+		"input=%s output=%s --quiet",
 		gisbase, map.belev, map.topidx);
 	G_message("r.topidx input=%s output=%s ... ", map.belev, map.topidx);
 



More information about the grass-commit mailing list