[GRASS-SVN] r38806 - grass/branches/releasebranch_6_4/raster/r.what

svn_grass at osgeo.org svn_grass at osgeo.org
Thu Aug 20 07:44:58 EDT 2009


Author: hamish
Date: 2009-08-20 07:44:57 -0400 (Thu, 20 Aug 2009)
New Revision: 38806

Modified:
   grass/branches/releasebranch_6_4/raster/r.what/main.c
Log:
export fs evenly, even if cell is NULL. otherwise you get column misalignment with multiple maps (merge from devbr6)

Modified: grass/branches/releasebranch_6_4/raster/r.what/main.c
===================================================================
--- grass/branches/releasebranch_6_4/raster/r.what/main.c	2009-08-20 09:49:11 UTC (rev 38805)
+++ grass/branches/releasebranch_6_4/raster/r.what/main.c	2009-08-20 11:44:57 UTC (rev 38806)
@@ -392,6 +392,10 @@
 		if (out_type[i] == CELL_TYPE) {
 		    if (G_is_c_null_value(&cache[point].value[i])) {
 			fprintf(stdout, "%c%s", fs, null_str);
+			if (withcats)
+			    fprintf(stdout, "%c", fs);
+			if (flag4->answer)
+			    fprintf(stdout, "%c", fs);
 			continue;
 		    }
 		    fprintf(stdout, "%c%ld", fs, (long)cache[point].value[i]);
@@ -400,6 +404,10 @@
 
 		    if (G_is_d_null_value(&cache[point].dvalue[i])) {
 			fprintf(stdout, "%c%s", fs, null_str);
+			if (withcats)
+			    fprintf(stdout, "%c", fs);
+			if (flag4->answer)
+			    fprintf(stdout, "%c", fs);
 			continue;
 		    }
 		    sprintf(tmp_buf, "%.10f", cache[point].dvalue[i]);



More information about the grass-commit mailing list