Преглед изворни кода

r.proj: percent cosmetics

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@59653 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa пре 11 година
родитељ
комит
2d40675bc0
2 измењених фајлова са 7 додато и 8 уклоњено
  1. 3 3
      raster/r.proj/main.c
  2. 4 5
      raster/r.proj/readcell.c

+ 3 - 3
raster/r.proj/main.c

@@ -494,12 +494,13 @@ int main(int argc, char **argv)
 
     xcoord2 = outcellhd.west + (outcellhd.ew_res / 2);
     ycoord2 = outcellhd.north - (outcellhd.ns_res / 2);
-    G_important_message(_("Projecting..."));
-    G_percent(0, outcellhd.rows, 2);
 
+    G_important_message(_("Projecting..."));
     for (row = 0; row < outcellhd.rows; row++) {
 	/* obufptr = obuffer */;
 
+        G_percent(row, outcellhd.rows - 1, 2);
+
 #if 0
 	/* parallelization does not always work,
 	 * segfaults in the interpolation functions 
@@ -537,7 +538,6 @@ int main(int argc, char **argv)
 
 	xcoord2 = outcellhd.west + (outcellhd.ew_res / 2);
 	ycoord2 -= outcellhd.ns_res;
-	G_percent(row, outcellhd.rows - 1, 2);
     }
 
     Rast_close(fdo);

+ 4 - 5
raster/r.proj/readcell.c

@@ -60,11 +60,10 @@ struct cache *readcell(int fdi, const char *size)
 	c->fd = -1;
 	c->fname = NULL;
     }
-    G_message("%.2f percent are kept in memory", 100.0 * nblocks / (nx * ny));
-
-    G_important_message(_("Allocating memory and reading input map..."));
-    G_percent(0, nrows, 5);
+    G_verbose_message("%.2f percent are kept in memory", 100.0 * nblocks / (nx * ny));
 
+    G_important_message(_("Allocating memory and reading input raster map..."));
+    
     for (i = 0; i < c->nblocks; i++)
 	c->refs[i] = -1;
 
@@ -95,7 +94,7 @@ struct cache *readcell(int fdi, const char *size)
 			   &tmpbuf[(y * nx + x) * BDIM],
 			   BDIM * sizeof(FCELL));
     }
-
+    
     G_free(tmpbuf);
 
     if (c->fd < 0) {