Browse Source

v.select: message cosmetics
(merge from devbr6, https://trac.osgeo.org/grass/changeset/34754)


git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34755 15284696-431f-4ddb-bdfa-cd5b030d7da7

Martin Landa 16 years ago
parent
commit
23e80cfe63
2 changed files with 8 additions and 13 deletions
  1. 0 8
      lib/vector/Vlib/sindex.c
  2. 8 5
      vector/v.select/main.c

+ 0 - 8
lib/vector/Vlib/sindex.c

@@ -161,8 +161,6 @@ int Vect_build_sidx_from_topo(struct Map_info *Map)
 
 
     /* Nodes */
     /* Nodes */
     for (i = 1; i <= plus->n_nodes; i++) {
     for (i = 1; i <= plus->n_nodes; i++) {
-	G_percent(i, total, 1);
-
 	Node = plus->Node[i];
 	Node = plus->Node[i];
 	if (!Node)
 	if (!Node)
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): node does not exist"));
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): node does not exist"));
@@ -173,8 +171,6 @@ int Vect_build_sidx_from_topo(struct Map_info *Map)
     /* Lines */
     /* Lines */
     done = plus->n_nodes;
     done = plus->n_nodes;
     for (i = 1; i <= plus->n_lines; i++) {
     for (i = 1; i <= plus->n_lines; i++) {
-	G_percent(done + i, total, 1);
-
 	Line = plus->Line[i];
 	Line = plus->Line[i];
 	if (!Line)
 	if (!Line)
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): line does not exist"));
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): line does not exist"));
@@ -192,8 +188,6 @@ int Vect_build_sidx_from_topo(struct Map_info *Map)
     /* Areas */
     /* Areas */
     done += plus->n_lines;
     done += plus->n_lines;
     for (i = 1; i <= plus->n_areas; i++) {
     for (i = 1; i <= plus->n_areas; i++) {
-	G_percent(done + i, total, 1);
-
 	Area = plus->Area[i];
 	Area = plus->Area[i];
 	if (!Area)
 	if (!Area)
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): area does not exist"));
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): area does not exist"));
@@ -211,8 +205,6 @@ int Vect_build_sidx_from_topo(struct Map_info *Map)
     /* Isles */
     /* Isles */
     done += plus->n_areas;
     done += plus->n_areas;
     for (i = 1; i <= plus->n_isles; i++) {
     for (i = 1; i <= plus->n_isles; i++) {
-	G_percent(done + i, total, 1);
-
 	Isle = plus->Isle[i];
 	Isle = plus->Isle[i];
 	if (!Isle)
 	if (!Isle)
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): isle does not exist"));
 	    G_fatal_error(_("BUG (Vect_build_sidx_from_topo): isle does not exist"));

+ 8 - 5
vector/v.select/main.c

@@ -220,7 +220,7 @@ int main(int argc, char *argv[])
 
 
     /* Lines in A. Go through all lines and mark those that meets condition */
     /* Lines in A. Go through all lines and mark those that meets condition */
     if (type[0] & (GV_POINTS | GV_LINES)) {
     if (type[0] & (GV_POINTS | GV_LINES)) {
-	G_message(_("Processing vector features..."));
+	G_message(_("Processing features..."));
 	
 	
 	for (aline = 1; aline <= nalines; aline++) {
 	for (aline = 1; aline <= nalines; aline++) {
 	    BOUND_BOX abox;
 	    BOUND_BOX abox;
@@ -300,7 +300,7 @@ int main(int argc, char *argv[])
     if (type[0] & GV_AREA) {
     if (type[0] & GV_AREA) {
 	int aarea, naareas;
 	int aarea, naareas;
 
 
-	G_message(_("Processing vector areas..."));
+	G_message(_("Processing areas..."));
 	
 	
 	naareas = Vect_get_num_areas(&(In[0]));
 	naareas = Vect_get_num_areas(&(In[0]));
 
 
@@ -308,7 +308,7 @@ int main(int argc, char *argv[])
 	    int i;
 	    int i;
 	    BOUND_BOX abox;
 	    BOUND_BOX abox;
 
 
-	    G_percent(aarea, naareas, 1);	/* must be before any continue */
+	    G_percent(aarea, naareas, 2);	/* must be before any continue */
 
 
 	    if (Vect_get_area_cat(&(In[0]), aarea, field[0]) < 0)
 	    if (Vect_get_area_cat(&(In[0]), aarea, field[0]) < 0)
 		continue;
 		continue;
@@ -420,11 +420,14 @@ int main(int argc, char *argv[])
 			    sizeof(int));
 			    sizeof(int));
 	fields[i] = Vect_cidx_get_field_number(&(In[0]), i);
 	fields[i] = Vect_cidx_get_field_number(&(In[0]), i);
     }
     }
+
+    G_message(_("Writing selected features..."));
     for (aline = 1; aline <= nalines; aline++) {
     for (aline = 1; aline <= nalines; aline++) {
 	int atype;
 	int atype;
 
 
 	G_debug(4, "aline = %d ALines[aline] = %d", aline, ALines[aline]);
 	G_debug(4, "aline = %d ALines[aline] = %d", aline, ALines[aline]);
-
+	G_percent(aline, nalines, 2);
+	
 	if (!(ALines[aline]))
 	if (!(ALines[aline]))
 	    continue;
 	    continue;
 
 
@@ -451,7 +454,7 @@ int main(int argc, char *argv[])
     if (!(table_flag->answer)) {
     if (!(table_flag->answer)) {
 	int ttype, ntabs = 0;
 	int ttype, ntabs = 0;
 
 
-	G_verbose_message(_("Writing attributes..."));
+	G_message(_("Writing attributes..."));
 
 
 	/* Number of output tabs */
 	/* Number of output tabs */
 	for (i = 0; i < Vect_get_num_dblinks(&(In[0])); i++) {
 	for (i = 0; i < Vect_get_num_dblinks(&(In[0])); i++) {