Sfoglia il codice sorgente

Eliminate non-standard logging mechanism

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@34284 15284696-431f-4ddb-bdfa-cd5b030d7da7
Glynn Clements 16 anni fa
parent
commit
64ef9c8bc5
89 ha cambiato i file con 248 aggiunte e 603 eliminazioni
  1. 2 2
      gui/wxpython/vdigit/driver.cpp
  2. 3 3
      gui/wxpython/vdigit/line.cpp
  3. 21 26
      include/Vect.h
  4. 1 1
      lib/manage/do_copy.c
  5. 1 1
      lib/manage/do_rename.c
  6. 1 1
      lib/sites/sites.c
  7. 5 22
      lib/vector/Vlib/break_lines.c
  8. 1 35
      lib/vector/Vlib/break_polygons.c
  9. 6 26
      lib/vector/Vlib/bridges.c
  10. 28 52
      lib/vector/Vlib/build.c
  11. 12 26
      lib/vector/Vlib/build_nat.c
  12. 2 16
      lib/vector/Vlib/build_ogr.c
  13. 1 14
      lib/vector/Vlib/clean_nodes.c
  14. 8 32
      lib/vector/Vlib/dangles.c
  15. 2 4
      lib/vector/Vlib/map.c
  16. 1 1
      lib/vector/Vlib/open.c
  17. 1 12
      lib/vector/Vlib/remove_areas.c
  18. 1 15
      lib/vector/Vlib/remove_duplicates.c
  19. 4 4
      lib/vector/Vlib/select.c
  20. 7 8
      lib/vector/Vlib/sindex.c
  21. 3 47
      lib/vector/Vlib/snap.c
  22. 1 1
      lib/vector/vedit/select.c
  23. 1 1
      raster/r.carve/vect.c
  24. 1 1
      raster/r.contour/main.c
  25. 1 1
      raster/r.flow/io.c
  26. 1 1
      raster/r.random/random.c
  27. 1 1
      raster/r.to.vect/main.c
  28. 1 1
      vector/lidar/v.outlier/main.c
  29. 8 8
      vector/v.buffer/main.c
  30. 1 5
      vector/v.build.polylines/main.c
  31. 2 2
      vector/v.build/main.c
  32. 1 6
      vector/v.category/main.c
  33. 18 25
      vector/v.clean/main.c
  34. 1 9
      vector/v.clean/prune.c
  35. 1 1
      vector/v.convert/old2new.c
  36. 2 2
      vector/v.digit/centre.c
  37. 1 1
      vector/v.digit/main.c
  38. 1 4
      vector/v.distance/main.c
  39. 1 7
      vector/v.drape/main.c
  40. 1 1
      vector/v.edit/a2b.c
  41. 3 7
      vector/v.edit/main.c
  42. 3 11
      vector/v.edit/snap.c
  43. 1 1
      vector/v.external/main.c
  44. 3 10
      vector/v.extract/main.c
  45. 2 6
      vector/v.extrude/main.c
  46. 5 8
      vector/v.generalize/main.c
  47. 1 1
      vector/v.hull/main.c
  48. 2 2
      vector/v.in.ascii/main.c
  49. 1 5
      vector/v.in.db/main.c
  50. 1 1
      vector/v.in.dxf/main.c
  51. 15 22
      vector/v.in.ogr/main.c
  52. 1 1
      vector/v.in.region/main.c
  53. 1 1
      vector/v.in.sites/main.c
  54. 1 1
      vector/v.kcv/main.c
  55. 1 1
      vector/v.kernel/main.c
  56. 2 2
      vector/v.lrs/v.lrs.create/main.c
  57. 1 1
      vector/v.lrs/v.lrs.label/main.c
  58. 1 1
      vector/v.lrs/v.lrs.segment/main.c
  59. 1 4
      vector/v.mkgrid/main.c
  60. 1 1
      vector/v.net.alloc/main.c
  61. 1 1
      vector/v.net.iso/main.c
  62. 1 1
      vector/v.net.path/main.c
  63. 1 1
      vector/v.net.salesman/main.c
  64. 1 1
      vector/v.net.steiner/main.c
  65. 1 5
      vector/v.net.visibility/main.c
  66. 1 1
      vector/v.net/connect.c
  67. 2 5
      vector/v.net/main.c
  68. 5 12
      vector/v.overlay/area_area.c
  69. 2 5
      vector/v.overlay/line_area.c
  70. 3 6
      vector/v.overlay/main.c
  71. 1 1
      vector/v.parallel/main.c
  72. 2 10
      vector/v.patch/main.c
  73. 1 1
      vector/v.perturb/main.c
  74. 1 5
      vector/v.proj/main.c
  75. 1 1
      vector/v.qcount/main.c
  76. 1 4
      vector/v.random/main.c
  77. 1 1
      vector/v.reclass/main.c
  78. 1 1
      vector/v.sample/main.c
  79. 1 7
      vector/v.segment/main.c
  80. 1 1
      vector/v.select/main.c
  81. 1 1
      vector/v.split/main.c
  82. 3 3
      vector/v.surf.rst/main.c
  83. 1 1
      vector/v.to.points/main.c
  84. 1 5
      vector/v.transform/main.c
  85. 1 1
      vector/v.type/main.c
  86. 1 1
      vector/v.vol.rst/main.c
  87. 4 4
      vector/v.voronoi/dt_main.c
  88. 3 3
      vector/v.voronoi/vo_main.c
  89. 1 1
      vector/v.what/main.c

+ 2 - 2
gui/wxpython/vdigit/driver.cpp

@@ -104,8 +104,8 @@ int DisplayDriver::CloseMap()
     if (mapInfo) {
     if (mapInfo) {
 	if (mapInfo->mode == GV_MODE_RW) {
 	if (mapInfo->mode == GV_MODE_RW) {
 	    /* rebuild topology */
 	    /* rebuild topology */
-	    Vect_build_partial(mapInfo, GV_BUILD_NONE, NULL);
-	    Vect_build(mapInfo, NULL);
+	    Vect_build_partial(mapInfo, GV_BUILD_NONE);
+	    Vect_build(mapInfo);
 	}
 	}
 	/* close map and store topo/cidx */
 	/* close map and store topo/cidx */
 	ret = Vect_close(mapInfo); 
 	ret = Vect_close(mapInfo); 

+ 3 - 3
gui/wxpython/vdigit/line.cpp

@@ -603,7 +603,7 @@ int Digit::BreakLines()
     changeset = AddActionsBefore();
     changeset = AddActionsBefore();
     
     
     ret = Vect_break_lines_list(display->mapInfo, display->selected.values, NULL,
     ret = Vect_break_lines_list(display->mapInfo, display->selected.values, NULL,
-				GV_LINES, NULL, NULL);
+				GV_LINES, NULL);
 
 
     if (ret > 0) {
     if (ret > 0) {
 	AddActionsAfter(changeset, nlines);
 	AddActionsAfter(changeset, nlines);
@@ -639,7 +639,7 @@ int Digit::SnapLines(double thresh)
     changeset = AddActionsBefore();
     changeset = AddActionsBefore();
     
     
     Vect_snap_lines_list (display->mapInfo, display->selected.values,
     Vect_snap_lines_list (display->mapInfo, display->selected.values,
-			  thresh, NULL, NULL);
+			  thresh, NULL);
 
 
     if (nlines < Vect_get_num_lines(display->mapInfo)) {
     if (nlines < Vect_get_num_lines(display->mapInfo)) {
 	AddActionsAfter(changeset, nlines);
 	AddActionsAfter(changeset, nlines);
@@ -957,7 +957,7 @@ int Digit::BreakLineAtIntersection(int line, struct line_pnts* points_line,
     }
     }
 
 
     ret = Vect_break_lines_list(display->mapInfo, listBreak, listRef,
     ret = Vect_break_lines_list(display->mapInfo, listBreak, listRef,
-				GV_LINES, NULL, NULL);
+				GV_LINES, NULL);
 
 
     for (int i = 0; i < listBreak->n_values; i++) {	
     for (int i = 0; i < listBreak->n_values; i++) {	
 	if (Vect_line_alive(display->mapInfo, listBreak->value[i]))
 	if (Vect_line_alive(display->mapInfo, listBreak->value[i]))

+ 21 - 26
include/Vect.h

@@ -194,9 +194,9 @@ int Vect_open_new(struct Map_info *, const char *, int);
 int Vect_open_update(struct Map_info *, const char *, const char *);
 int Vect_open_update(struct Map_info *, const char *, const char *);
 int Vect_open_update_head(struct Map_info *, const char *, const char *);
 int Vect_open_update_head(struct Map_info *, const char *, const char *);
 int Vect_copy_head_data(struct Map_info *, struct Map_info *);
 int Vect_copy_head_data(struct Map_info *, struct Map_info *);
-int Vect_build(struct Map_info *, FILE *);
+int Vect_build(struct Map_info *);
 int Vect_get_built(struct Map_info *);
 int Vect_get_built(struct Map_info *);
-int Vect_build_partial(struct Map_info *, int, FILE *);
+int Vect_build_partial(struct Map_info *, int);
 int Vect_set_constraint_region(struct Map_info *, double, double, double,
 int Vect_set_constraint_region(struct Map_info *, double, double, double,
 			       double, double, double);
 			       double, double, double);
 int Vect_set_constraint_type(struct Map_info *, int);
 int Vect_set_constraint_type(struct Map_info *, int);
@@ -296,30 +296,25 @@ int Vect_point_in_area_outer_ring(double, double, struct Map_info *, int);
 int Vect_point_in_island(double, double, struct Map_info *, int);
 int Vect_point_in_island(double, double, struct Map_info *, int);
 
 
 /* Cleaning */
 /* Cleaning */
-void Vect_break_lines(struct Map_info *, int, struct Map_info *, FILE *);
+void Vect_break_lines(struct Map_info *, int, struct Map_info *);
 int Vect_break_lines_list(struct Map_info *, struct ilist *, struct ilist *,
 int Vect_break_lines_list(struct Map_info *, struct ilist *, struct ilist *,
-			  int, struct Map_info *, FILE *);
-void Vect_break_polygons(struct Map_info *, int, struct Map_info *, FILE *);
-void Vect_remove_duplicates(struct Map_info *, int, struct Map_info *,
-			    FILE *);
+			  int, struct Map_info *);
+void Vect_break_polygons(struct Map_info *, int, struct Map_info *);
+void Vect_remove_duplicates(struct Map_info *, int, struct Map_info *);
 int Vect_line_check_duplicate(const struct line_pnts *,
 int Vect_line_check_duplicate(const struct line_pnts *,
 			      const struct line_pnts *, int);
 			      const struct line_pnts *, int);
-void Vect_snap_lines(struct Map_info *, int, double, struct Map_info *,
-		     FILE *);
+void Vect_snap_lines(struct Map_info *, int, double, struct Map_info *);
 void Vect_snap_lines_list(struct Map_info *, struct ilist *, double,
 void Vect_snap_lines_list(struct Map_info *, struct ilist *, double,
-			  struct Map_info *, FILE *);
-void Vect_remove_dangles(struct Map_info *, int, double, struct Map_info *,
-			 FILE *);
-void Vect_chtype_dangles(struct Map_info *, double, struct Map_info *,
-			 FILE *);
-void Vect_select_dangles(struct Map_info *, int, double, FILE *,
-			 struct ilist *);
-void Vect_remove_bridges(struct Map_info *, struct Map_info *, FILE *);
-void Vect_chtype_bridges(struct Map_info *, struct Map_info *, FILE *);
+			  struct Map_info *);
+void Vect_remove_dangles(struct Map_info *, int, double, struct Map_info *);
+void Vect_chtype_dangles(struct Map_info *, double, struct Map_info *);
+void Vect_select_dangles(struct Map_info *, int, double, struct ilist *);
+void Vect_remove_bridges(struct Map_info *, struct Map_info *);
+void Vect_chtype_bridges(struct Map_info *, struct Map_info *);
 int Vect_remove_small_areas(struct Map_info *, double, struct Map_info *,
 int Vect_remove_small_areas(struct Map_info *, double, struct Map_info *,
-			    FILE *, double *);
+			    double *);
 int Vect_clean_small_angles_at_nodes(struct Map_info *, int,
 int Vect_clean_small_angles_at_nodes(struct Map_info *, int,
-				     struct Map_info *, FILE *);
+				     struct Map_info *);
 
 
 /* Overlay */
 /* Overlay */
 int Vect_overlay_str_to_operator(const char *);
 int Vect_overlay_str_to_operator(const char *);
@@ -360,8 +355,8 @@ double Vect_points_distance(double, double, double, double, double, double,
 			    int);
 			    int);
 int Vect_option_to_types(struct Option *);
 int Vect_option_to_types(struct Option *);
 int Vect_copy_map_lines(struct Map_info *, struct Map_info *);
 int Vect_copy_map_lines(struct Map_info *, struct Map_info *);
-int Vect_copy(const char *, const char *, const char *, FILE *);
-int Vect_rename(const char *, const char *, FILE *);
+int Vect_copy(const char *, const char *, const char *);
+int Vect_rename(const char *, const char *);
 int Vect_copy_table(struct Map_info *, struct Map_info *, int, int,
 int Vect_copy_table(struct Map_info *, struct Map_info *, int, int,
 		    const char *, int);
 		    const char *, int);
 int Vect_copy_table_by_cats(struct Map_info *, struct Map_info *, int, int,
 int Vect_copy_table_by_cats(struct Map_info *, struct Map_info *, int, int,
@@ -392,8 +387,8 @@ int Vect_save_topo(struct Map_info *);
 int Vect_open_spatial_index(struct Map_info *);
 int Vect_open_spatial_index(struct Map_info *);
 int Vect_save_spatial_index(struct Map_info *);
 int Vect_save_spatial_index(struct Map_info *);
 int Vect_spatial_index_dump(struct Map_info *, FILE *);
 int Vect_spatial_index_dump(struct Map_info *, FILE *);
-int Vect_build_sidx_from_topo(struct Map_info *, FILE *);
-int Vect_build_spatial_index(struct Map_info *, FILE *);
+int Vect_build_sidx_from_topo(struct Map_info *);
+int Vect_build_spatial_index(struct Map_info *);
 
 
 int Vect__write_head(struct Map_info *);
 int Vect__write_head(struct Map_info *);
 int Vect__read_head(struct Map_info *);
 int Vect__read_head(struct Map_info *);
@@ -446,8 +441,8 @@ long V1_rewrite_line_ogr(struct Map_info *, long offset, int type,
 #endif
 #endif
 
 
     /* Miscellaneous */
     /* Miscellaneous */
-int Vect_build_nat(struct Map_info *, int, FILE *);
-int Vect_build_ogr(struct Map_info *, int, FILE *);
+int Vect_build_nat(struct Map_info *, int);
+int Vect_build_ogr(struct Map_info *, int);
 int Vect_build_line_area(struct Map_info *, int, int);
 int Vect_build_line_area(struct Map_info *, int, int);
 int Vect_isle_find_area(struct Map_info *, int);
 int Vect_isle_find_area(struct Map_info *, int);
 int Vect_attach_isle(struct Map_info *, int);
 int Vect_attach_isle(struct Map_info *, int);

+ 1 - 1
lib/manage/do_copy.c

@@ -24,7 +24,7 @@ int do_copy(int n, char *old, char *mapset, char *new)
 
 
     hold_signals(1);
     hold_signals(1);
     if (G_strcasecmp(list[n].alias, "vect") == 0) {
     if (G_strcasecmp(list[n].alias, "vect") == 0) {
-	ret = Vect_copy(old, mapset, new, stderr);
+	ret = Vect_copy(old, mapset, new);
 	if (ret == -1) {
 	if (ret == -1) {
 	    G_warning("Cannot copy <%s> to current mapset as <%s>",
 	    G_warning("Cannot copy <%s> to current mapset as <%s>",
 		      G_fully_qualified_name(old, mapset), new);
 		      G_fully_qualified_name(old, mapset), new);

+ 1 - 1
lib/manage/do_rename.c

@@ -37,7 +37,7 @@ int do_rename(int n, char *old, char *new)
 	    G_warning(_("Vector map <%s> not found"), old);
 	    G_warning(_("Vector map <%s> not found"), old);
 	}
 	}
 	else {
 	else {
-	    ret = Vect_rename(old, new, stderr);
+	    ret = Vect_rename(old, new);
 	    if (ret != -1) {
 	    if (ret != -1) {
 		renamed = 1;
 		renamed = 1;
 	    }
 	    }

+ 1 - 1
lib/sites/sites.c

@@ -440,7 +440,7 @@ void G_sites_close(struct Map_info *Map)
     int i, j;
     int i, j;
 
 
     if (Map->mode == GV_MODE_WRITE || Map->mode == GV_MODE_RW)
     if (Map->mode == GV_MODE_WRITE || Map->mode == GV_MODE_RW)
-	Vect_build(Map, stderr);
+	Vect_build(Map);
 
 
     Vect_close(Map);
     Vect_close(Map);
 
 

+ 5 - 22
lib/vector/Vlib/break_lines.c

@@ -28,16 +28,14 @@
    \param Map input vector map 
    \param Map input vector map 
    \param type feature type
    \param type feature type
    \param[out] Err vector map where points at intersections will be written or NULL
    \param[out] Err vector map where points at intersections will be written or NULL
-   \param[out] msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 
 
 void
 void
-Vect_break_lines(struct Map_info *Map, int type, struct Map_info *Err,
-		 FILE * msgout)
+Vect_break_lines(struct Map_info *Map, int type, struct Map_info *Err)
 {
 {
-    Vect_break_lines_list(Map, NULL, NULL, type, Err, msgout);
+    Vect_break_lines_list(Map, NULL, NULL, type, Err);
 
 
     return;
     return;
 }
 }
@@ -60,15 +58,13 @@ Vect_break_lines(struct Map_info *Map, int type, struct Map_info *Err,
    \param List_ref list of reference lines or NULL
    \param List_ref list of reference lines or NULL
    \param type feature type
    \param type feature type
    \param[out] Err vector map where points at intersections will be written or NULL
    \param[out] Err vector map where points at intersections will be written or NULL
-   \param[out] msgout file pointer where messages will be written or NULL
 
 
    \return number of intersections
    \return number of intersections
  */
  */
 
 
 int
 int
 Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
 Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
-		      struct ilist *List_ref, int type, struct Map_info *Err,
-		      FILE * msgout)
+		      struct ilist *List_ref, int type, struct Map_info *Err)
 {
 {
     struct line_pnts *APoints, *BPoints, *Points;
     struct line_pnts *APoints, *BPoints, *Points;
     struct line_pnts **AXLines, **BXLines;
     struct line_pnts **AXLines, **BXLines;
@@ -84,7 +80,6 @@ Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
     int is3d;
     int is3d;
     int node, anode1, anode2, bnode1, bnode2;
     int node, anode1, anode2, bnode1, bnode2;
     double nodex, nodey;
     double nodex, nodey;
-    int printed;
 
 
     APoints = Vect_new_line_struct();
     APoints = Vect_new_line_struct();
     BPoints = Vect_new_line_struct();
     BPoints = Vect_new_line_struct();
@@ -116,10 +111,8 @@ Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
      * the file, and process next line (remaining lines overlapping box are skipped)
      * the file, and process next line (remaining lines overlapping box are skipped)
      */
      */
     nbreaks = 0;
     nbreaks = 0;
-    printed = 0;
 
 
-    if (msgout)
-	fprintf(msgout, _("%s %5d"), _("Intersections:"), nbreaks);
+    G_verbose_message(_("Intersections: %5d"), nbreaks);
 
 
     for (iline = 0; iline < nlines; iline++) {
     for (iline = 0; iline < nlines; iline++) {
 	if (List_break) {
 	if (List_break) {
@@ -361,14 +354,6 @@ Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
 		G_free(yx);
 		G_free(yx);
 		G_free(zx);
 		G_free(zx);
 	    }
 	    }
-
-	    if (msgout && printed > 1000) {
-		fprintf(msgout, "\r%s %5d (line %d)", _("Intersections:"),
-			nbreaks, aline);
-		fflush(msgout);
-		printed = 0;
-	    }
-	    printed++;
 	    if (naxlines > 0)
 	    if (naxlines > 0)
 		break;		/* first line was broken and deleted -> take the next one */
 		break;		/* first line was broken and deleted -> take the next one */
 	}
 	}
@@ -382,9 +367,7 @@ Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
 	G_debug(3, "nlines =  %d", nlines);
 	G_debug(3, "nlines =  %d", nlines);
     }				/* for each line */
     }				/* for each line */
 
 
-    if (msgout)
-	fprintf(msgout, "\r%s %5d                        \n",
-		_("Intersections:"), nbreaks);
+    G_verbose_message(_("Intersections: %5d"), nbreaks);
 
 
     Vect_destroy_list(List);
     Vect_destroy_list(List);
 
 

+ 1 - 35
lib/vector/Vlib/break_polygons.c

@@ -55,13 +55,11 @@ void srch(int id, int *arg)
    \param Map input map where polygons will be broken
    \param Map input map where polygons will be broken
    \param type type of line to be broken
    \param type type of line to be broken
    \param Err vector map where points at intersections will be written or NULL
    \param Err vector map where points at intersections will be written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 void
 void
-Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
-		    FILE * msgout)
+Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err)
 {
 {
     struct line_pnts *BPoints, *Points;
     struct line_pnts *BPoints, *Points;
     struct line_cats *Cats;
     struct line_cats *Cats;
@@ -73,7 +71,6 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
     struct Rect rect;
     struct Rect rect;
     double dx, dy, a1 = 0, a2 = 0;
     double dx, dy, a1 = 0, a2 = 0;
     int closed, last_point, cross;
     int closed, last_point, cross;
-    int printed;
 
 
     RTree = RTreeNewIndex();
     RTree = RTreeNewIndex();
 
 
@@ -93,7 +90,6 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
     nallpoints = 0;
     nallpoints = 0;
     XPnts = NULL;
     XPnts = NULL;
 
 
-    printed = 0;
     for (i = 1; i <= nlines; i++) {
     for (i = 1; i <= nlines; i++) {
 	G_debug(3, "i =  %d", i);
 	G_debug(3, "i =  %d", i);
 	if (!Vect_line_alive(Map, i))
 	if (!Vect_line_alive(Map, i))
@@ -210,28 +206,11 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
 		npoints++;
 		npoints++;
 	    }
 	    }
 	}
 	}
-	if (msgout && printed > 5000) {
-	    fprintf(msgout, "\r%s %d", _("Registering points"), npoints - 1);
-	    fflush(msgout);
-	    printed = 0;
-	}
-	printed++;
-    }
-    if (msgout) {
-	fprintf(msgout, "\r%s %d", _("Registering points"), npoints - 1);
-	fprintf(msgout, "\n");
-	fprintf(msgout, "%s: %5d\n", _("All points (vertices)"), nallpoints);
-	fprintf(msgout, "%s: %5d\n",
-		_("Registered points (unique coordinates)"), npoints - 1);
-	fprintf(msgout, "%s: %5d\n", _("Points marked for break"), nmarks);
     }
     }
 
 
     /* G_sleep (10); */
     /* G_sleep (10); */
 
 
     nbreaks = 0;
     nbreaks = 0;
-    if (msgout)
-	fprintf(msgout, "%s: %5d", _("Breaks"), nbreaks);
-    printed = 0;
 
 
     /* Second loop through lines (existing when loop is started, no need to process lines written again)
     /* Second loop through lines (existing when loop is started, no need to process lines written again)
      * and break at points marked for break */
      * and break at points marked for break */
@@ -305,13 +284,6 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
 		broken = 1;
 		broken = 1;
 		nbreaks++;
 		nbreaks++;
 	    }
 	    }
-
-	    if (msgout && printed > 1000) {
-		fprintf(msgout, "\r%s: %5d", _("Breaks"), nbreaks);
-		fflush(msgout);
-		printed = 0;
-	    }
-	    printed++;
 	}
 	}
 	if (!broken && n_orig_points > Points->n_points) {	/* was pruned before -> rewrite */
 	if (!broken && n_orig_points > Points->n_points) {	/* was pruned before -> rewrite */
 	    if (Points->n_points > 1) {
 	    if (Points->n_points > 1) {
@@ -329,9 +301,6 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
 	}
 	}
     }
     }
 
 
-    if (msgout)
-	fprintf(msgout, "\r%s: %5d", _("Breaks"), nbreaks);
-
     /* Write points on breaks */
     /* Write points on breaks */
     if (Err) {
     if (Err) {
 	Vect_reset_cats(Cats);
 	Vect_reset_cats(Cats);
@@ -344,9 +313,6 @@ Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
 	}
 	}
     }
     }
 
 
-    if (msgout)
-	fprintf(msgout, "\n");
-
     G_free(XPnts);
     G_free(XPnts);
     RTreeDestroyNode(RTree);
     RTreeDestroyNode(RTree);
 }
 }

+ 6 - 26
lib/vector/Vlib/bridges.c

@@ -23,8 +23,7 @@
 #include <grass/glocale.h>
 #include <grass/glocale.h>
 
 
 static void
 static void
-remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
-	       FILE * msgout);
+remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err);
 
 
 /*!
 /*!
    \brief Remove bridges from vector map.
    \brief Remove bridges from vector map.
@@ -37,15 +36,14 @@ remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
 
 
    \param Map input map where bridges are deleted
    \param Map input map where bridges are deleted
    \param Err vector map where deleted bridges are written or NULL
    \param Err vector map where deleted bridges are written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 
 
 void
 void
-Vect_remove_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
+Vect_remove_bridges(struct Map_info *Map, struct Map_info *Err)
 {
 {
-    remove_bridges(Map, 0, Err, msgout);
+    remove_bridges(Map, 0, Err);
 }
 }
 
 
 /*!
 /*!
@@ -59,15 +57,14 @@ Vect_remove_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
 
 
    \param Map input map where bridges are changed
    \param Map input map where bridges are changed
    \param Err vector map where changed bridges are written or NULL
    \param Err vector map where changed bridges are written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 
 
 void
 void
-Vect_chtype_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
+Vect_chtype_bridges(struct Map_info *Map, struct Map_info *Err)
 {
 {
-    remove_bridges(Map, 1, Err, msgout);
+    remove_bridges(Map, 1, Err);
 }
 }
 
 
 /* 
 /* 
@@ -84,8 +81,7 @@ Vect_chtype_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
    List of all lines in chain is created during the cycle.
    List of all lines in chain is created during the cycle.
  */
  */
 void
 void
-remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
-	       FILE * msgout)
+remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err)
 {
 {
     int i, type, nlines, line;
     int i, type, nlines, line;
     int left, right, node1, node2, current_line, next_line;
     int left, right, node1, node2, current_line, next_line;
@@ -116,10 +112,6 @@ remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
 
 
     G_debug(1, "nlines =  %d", nlines);
     G_debug(1, "nlines =  %d", nlines);
 
 
-    if (msgout)
-	fprintf(msgout, "%s: %5d  %s: %5d",
-		_("Removed bridges"), bridges_removed, lmsg, lines_removed);
-
     for (line = 1; line <= nlines; line++) {
     for (line = 1; line <= nlines; line++) {
 	if (!Vect_line_alive(Map, line))
 	if (!Vect_line_alive(Map, line))
 	    continue;
 	    continue;
@@ -196,17 +188,5 @@ remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
 	    }
 	    }
 	    bridges_removed++;
 	    bridges_removed++;
 	}
 	}
-
-	if (msgout) {
-	    fprintf(msgout, "\r%s: %5d  %s: %5d",
-		    _("Removed bridges"), bridges_removed, lmsg,
-		    lines_removed);
-	    fflush(msgout);
-	}
-    }
-    if (msgout) {
-	fprintf(msgout, "\r%s: %5d  %s: %5d",
-		_("Removed bridges"), bridges_removed, lmsg, lines_removed);
-	fprintf(msgout, "\n");
     }
     }
 }
 }

+ 28 - 52
lib/vector/Vlib/build.c

@@ -42,37 +42,17 @@ static int (*Build_array[]) () = {
 #endif
 #endif
 };
 };
 
 
-FILE *Msgout = NULL;
-
-
-int prnmsg(char *msg, ...)
-{
-    char buffer[1000];
-    va_list ap;
-
-    if (Msgout != NULL) {
-	va_start(ap, msg);
-	vsprintf(buffer, msg, ap);
-	va_end(ap);
-	fprintf(Msgout, "%s", buffer);
-	fflush(Msgout);
-    }
-
-    return 1;
-}
-
 /*!
 /*!
    \brief Build topology for vector map
    \brief Build topology for vector map
 
 
    \param Map vector map
    \param Map vector map
-   \param msgout file for message output (stdout/stderr for example) or NULL
 
 
    \return 1 on success
    \return 1 on success
    \return 0 on error
    \return 0 on error
  */
  */
-int Vect_build(struct Map_info *Map, FILE * msgout)
+int Vect_build(struct Map_info *Map)
 {
 {
-    return Vect_build_partial(Map, GV_BUILD_ALL, msgout);
+    return Vect_build_partial(Map, GV_BUILD_ALL);
 }
 }
 
 
 
 
@@ -121,17 +101,15 @@ int Vect_get_built(struct Map_info *Map)
 
 
    \param Map vector map
    \param Map vector map
    \param build highest level of build
    \param build highest level of build
-   \param msgout file pointer for message output (stdout/stderr for example) or NULL
 
 
    \return 1 on success, 0 on error
    \return 1 on success, 0 on error
  */
  */
-int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
+int Vect_build_partial(struct Map_info *Map, int build)
 {
 {
     struct Plus_head *plus;
     struct Plus_head *plus;
     int ret;
     int ret;
 
 
     G_debug(3, "Vect_build(): build = %d", build);
     G_debug(3, "Vect_build(): build = %d", build);
-    Msgout = msgout;
 
 
     /* If topology is already build (map on level2), set level to 1 so that lines will
     /* If topology is already build (map on level2), set level to 1 so that lines will
      *  be read by V1_read_ (all lines) */
      *  be read by V1_read_ (all lines) */
@@ -141,8 +119,8 @@ int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
     Map->plus.Spidx_built = 1;
     Map->plus.Spidx_built = 1;
 
 
     plus = &(Map->plus);
     plus = &(Map->plus);
-    prnmsg(_("Building topology for vector map <%s>...\n"),
-	   Vect_get_name(Map));
+    G_verbose_message(_("Building topology for vector map <%s>..."),
+		      Vect_get_name(Map));
     plus->with_z = Map->head.with_z;
     plus->with_z = Map->head.with_z;
     plus->spidx_with_z = Map->head.with_z;
     plus->spidx_with_z = Map->head.with_z;
 
 
@@ -151,13 +129,13 @@ int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
 	dig_cidx_init(plus);
 	dig_cidx_init(plus);
     }
     }
 
 
-    ret = ((*Build_array[Map->format]) (Map, build, msgout));
+    ret = ((*Build_array[Map->format]) (Map, build));
 
 
     if (ret == 0) {
     if (ret == 0) {
 	return 0;
 	return 0;
     }
     }
 
 
-    prnmsg(_("Topology was built\n"));
+    G_verbose_message(_("Topology was built"));
 
 
     Map->level = LEVEL_2;
     Map->level = LEVEL_2;
     plus->mode = GV_MODE_WRITE;
     plus->mode = GV_MODE_WRITE;
@@ -167,20 +145,18 @@ int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
 	dig_cidx_sort(plus);
 	dig_cidx_sort(plus);
     }
     }
 
 
-    /* prnmsg ("Topology was built.\n") ; */
-
-    prnmsg(_("Number of nodes     :   %d\n"), plus->n_nodes);
-    prnmsg(_("Number of primitives:   %d\n"), plus->n_lines);
-    prnmsg(_("Number of points    :   %d\n"), plus->n_plines);
-    prnmsg(_("Number of lines     :   %d\n"), plus->n_llines);
-    prnmsg(_("Number of boundaries:   %d\n"), plus->n_blines);
-    prnmsg(_("Number of centroids :   %d\n"), plus->n_clines);
+    G_verbose_message(_("Number of nodes: %d"), plus->n_nodes);
+    G_verbose_message(_("Number of primitives: %d"), plus->n_lines);
+    G_verbose_message(_("Number of points: %d"), plus->n_plines);
+    G_verbose_message(_("Number of lines: %d"), plus->n_llines);
+    G_verbose_message(_("Number of boundaries: %d"), plus->n_blines);
+    G_verbose_message(_("Number of centroids: %d"), plus->n_clines);
 
 
     if (plus->n_flines > 0)
     if (plus->n_flines > 0)
-	prnmsg(_("Number of faces     :   %d\n"), plus->n_flines);
+	G_verbose_message(_("Number of faces: %d"), plus->n_flines);
 
 
     if (plus->n_klines > 0)
     if (plus->n_klines > 0)
-	prnmsg(_("Number of kernels   :   %d\n"), plus->n_klines);
+	G_verbose_message(_("Number of kernels: %d"), plus->n_klines);
 
 
     if (plus->built >= GV_BUILD_AREAS) {
     if (plus->built >= GV_BUILD_AREAS) {
 	int line, nlines, area, nareas, err_boundaries, err_centr_out,
 	int line, nlines, area, nareas, err_boundaries, err_centr_out,
@@ -220,29 +196,29 @@ int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
 		err_nocentr++;
 		err_nocentr++;
 	}
 	}
 
 
-	prnmsg(_("Number of areas     :   %d\n"), plus->n_areas);
-	prnmsg(_("Number of isles     :   %d\n"), plus->n_isles);
+	G_verbose_message(_("Number of areas: %d"), plus->n_areas);
+	G_verbose_message(_("Number of isles: %d"), plus->n_isles);
 
 
 	if (err_boundaries)
 	if (err_boundaries)
-	    prnmsg(_("Number of incorrect boundaries   :   %d\n"),
-		   err_boundaries);
+	    G_verbose_message(_("Number of incorrect boundaries: %d"),
+			      err_boundaries);
 
 
 	if (err_centr_out)
 	if (err_centr_out)
-	    prnmsg(_("Number of centroids outside area :   %d\n"),
-		   err_centr_out);
+	    G_verbose_message(_("Number of centroids outside area: %d"),
+			      err_centr_out);
 
 
 	if (err_centr_dupl)
 	if (err_centr_dupl)
-	    prnmsg(_("Number of duplicate centroids    :   %d\n"),
-		   err_centr_dupl);
+	    G_verbose_message(_("Number of duplicate centroids: %d"),
+			      err_centr_dupl);
 
 
 	if (err_nocentr)
 	if (err_nocentr)
-	    prnmsg(_("Number of areas without centroid :   %d\n"),
-		   err_nocentr);
+	    G_verbose_message(_("Number of areas without centroid: %d"),
+			      err_nocentr);
 
 
     }
     }
     else {
     else {
-	prnmsg(_("Number of areas     :   -\n"));
-	prnmsg(_("Number of isles     :   -\n"));
+	G_verbose_message(_("Number of areas: -"));
+	G_verbose_message(_("Number of isles: -"));
     }
     }
     return 1;
     return 1;
 }
 }
@@ -451,7 +427,7 @@ int Vect_save_spatial_index(struct Map_info *Map)
 int Vect_spatial_index_dump(struct Map_info *Map, FILE * out)
 int Vect_spatial_index_dump(struct Map_info *Map, FILE * out)
 {
 {
     if (!(Map->plus.Spidx_built)) {
     if (!(Map->plus.Spidx_built)) {
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     fprintf(out, "---------- SPATIAL INDEX DUMP ----------\n");
     fprintf(out, "---------- SPATIAL INDEX DUMP ----------\n");

+ 12 - 26
lib/vector/Vlib/build_nat.c

@@ -23,9 +23,6 @@
 #include <grass/gis.h>
 #include <grass/gis.h>
 #include <grass/Vect.h>
 #include <grass/Vect.h>
 
 
-extern FILE *Msgout;
-extern int prnmsg(char *msg, ...);
-
 /*!
 /*!
    \brief Build area on given side of line (GV_LEFT or GV_RIGHT)
    \brief Build area on given side of line (GV_LEFT or GV_RIGHT)
 
 
@@ -417,12 +414,11 @@ int Vect_attach_centroids(struct Map_info *Map, BOUND_BOX * box)
 
 
    \param Map_info vector map
    \param Map_info vector map
    \param build build level
    \param build build level
-   \param msgout message output (stdout/stderr for example) or NULL
 
 
    \return 1 on success
    \return 1 on success
    \return 0 on error
    \return 0 on error
  */
  */
-int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
+int Vect_build_nat(struct Map_info *Map, int build)
 {
 {
     struct Plus_head *plus;
     struct Plus_head *plus;
     int i, j, s, type, lineid;
     int i, j, s, type, lineid;
@@ -439,7 +435,6 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
     G_debug(3, "Vect_build_nat() build = %d", build);
     G_debug(3, "Vect_build_nat() build = %d", build);
 
 
     plus = &(Map->plus);
     plus = &(Map->plus);
-    Msgout = msgout;
 
 
     if (build == plus->built)
     if (build == plus->built)
 	return 1;		/* Do nothing */
 	return 1;		/* Do nothing */
@@ -507,7 +502,7 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
 
 
 	/* register lines, create nodes */
 	/* register lines, create nodes */
 	Vect_rewind(Map);
 	Vect_rewind(Map);
-	prnmsg(_("Registering primitives: "));
+	G_verbose_message(_("Registering primitives:"));
 	i = 1;
 	i = 1;
 	j = 1;
 	j = 1;
 	npoints = 0;
 	npoints = 0;
@@ -547,18 +542,11 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
 		if (Cats->n_cats == 0)	/* add field 0, cat 0 */
 		if (Cats->n_cats == 0)	/* add field 0, cat 0 */
 		    dig_cidx_add_cat(plus, 0, 0, lineid, type);
 		    dig_cidx_add_cat(plus, 0, 0, lineid, type);
 	    }
 	    }
-
-	    /* print progress */
-	    if (i == 1000) {
-		prnmsg("%7d\b\b\b\b\b\b\b", j);
-		i = 0;
-	    }
 	    i++;
 	    i++;
 	    j++;
 	    j++;
 	}
 	}
-	prnmsg("\r%d %s            \n", plus->n_lines,
-	       _("primitives registered"));
-	prnmsg("%d %s\n", npoints, _("vertices registered"));
+	G_verbose_message(_("%d primitives registered"), plus->n_lines);
+	G_verbose_message(_("%d vertices registered"), npoints);
 
 
 	plus->built = GV_BUILD_BASE;
 	plus->built = GV_BUILD_BASE;
     }
     }
@@ -569,9 +557,9 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
     if (plus->built < GV_BUILD_AREAS) {
     if (plus->built < GV_BUILD_AREAS) {
 	/* Build areas */
 	/* Build areas */
 	/* Go through all bundaries and try to build area for both sides */
 	/* Go through all bundaries and try to build area for both sides */
-	prnmsg(_("Building areas: "));
+	G_verbose_message(_("Building areas:"));
 	for (i = 1; i <= plus->n_lines; i++) {
 	for (i = 1; i <= plus->n_lines; i++) {
-	    G_percent2(i, plus->n_lines, 1, msgout);
+	    G_percent(i, plus->n_lines, 1);
 
 
 	    /* build */
 	    /* build */
 	    if (plus->Line[i] == NULL) {
 	    if (plus->Line[i] == NULL) {
@@ -592,8 +580,8 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
 		Vect_build_line_area(Map, i, side);
 		Vect_build_line_area(Map, i, side);
 	    }
 	    }
 	}
 	}
-	prnmsg("\r%d %s      \n%d %s\n", plus->n_areas, _("areas built"),
-	       plus->n_isles, _("isles built"));
+	G_verbose_message(_("%d areas built"), plus->n_areas);
+	G_verbose_message(_("%d isles built"), plus->n_isles);
 	plus->built = GV_BUILD_AREAS;
 	plus->built = GV_BUILD_AREAS;
     }
     }
 
 
@@ -602,13 +590,11 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
 
 
     /* Attach isles to areas */
     /* Attach isles to areas */
     if (plus->built < GV_BUILD_ATTACH_ISLES) {
     if (plus->built < GV_BUILD_ATTACH_ISLES) {
-	prnmsg(_("Attaching islands: "));
+	G_verbose_message(_("Attaching islands:"));
 	for (i = 1; i <= plus->n_isles; i++) {
 	for (i = 1; i <= plus->n_isles; i++) {
-	    G_percent2(i, plus->n_isles, 1, msgout);
+	    G_percent(i, plus->n_isles, 1);
 	    Vect_attach_isle(Map, i);
 	    Vect_attach_isle(Map, i);
 	}
 	}
-	if (i == 1)
-	    prnmsg("\n");
 	plus->built = GV_BUILD_ATTACH_ISLES;
 	plus->built = GV_BUILD_ATTACH_ISLES;
     }
     }
 
 
@@ -619,11 +605,11 @@ int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
     if (plus->built < GV_BUILD_CENTROIDS) {
     if (plus->built < GV_BUILD_CENTROIDS) {
 	int nlines;
 	int nlines;
 
 
-	prnmsg(_("Attaching centroids: "));
+	G_verbose_message(_("Attaching centroids:"));
 
 
 	nlines = Vect_get_num_lines(Map);
 	nlines = Vect_get_num_lines(Map);
 	for (line = 1; line <= nlines; line++) {
 	for (line = 1; line <= nlines; line++) {
-	    G_percent2(line, nlines, 1, msgout);
+	    G_percent(line, nlines, 1);
 
 
 	    Line = plus->Line[line];
 	    Line = plus->Line[line];
 	    if (!Line)
 	    if (!Line)

+ 2 - 16
lib/vector/Vlib/build_ogr.c

@@ -36,9 +36,6 @@
 #ifdef HAVE_OGR
 #ifdef HAVE_OGR
 #include <ogr_api.h>
 #include <ogr_api.h>
 
 
-extern FILE *Msgout;
-extern int prnmsg(char *msg, ...);
-
 /* 
 /* 
  *  This structure keeps info about geometry parts above current geometry, path to curent geometry in the 
  *  This structure keeps info about geometry parts above current geometry, path to curent geometry in the 
  *  feature. First 'part' number however is feature Id 
  *  feature. First 'part' number however is feature Id 
@@ -321,12 +318,11 @@ static int add_geometry(struct Map_info *Map, OGRGeometryH hGeom, int FID,
 
 
    \param Map_info vector map
    \param Map_info vector map
    \param build build level 
    \param build build level 
-   \param msgout message output (stdout/stderr for example) or NULL
 
 
    \return 1 on success
    \return 1 on success
    \return 0 on error
    \return 0 on error
  */
  */
-int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
+int Vect_build_ogr(struct Map_info *Map, int build)
 {
 {
     int iFeature, count, FID;
     int iFeature, count, FID;
     GEOM_PARTS parts;
     GEOM_PARTS parts;
@@ -336,8 +332,6 @@ int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
     if (build != GV_BUILD_ALL)
     if (build != GV_BUILD_ALL)
 	G_fatal_error(_("Partial build for OGR is not supported"));
 	G_fatal_error(_("Partial build for OGR is not supported"));
 
 
-    Msgout = msgout;
-
     /* TODO move this init to better place (Vect_open_ ?), because in theory build may be reused on level2 */
     /* TODO move this init to better place (Vect_open_ ?), because in theory build may be reused on level2 */
     Map->fInfo.ogr.offset = NULL;
     Map->fInfo.ogr.offset = NULL;
     Map->fInfo.ogr.offset_num = 0;
     Map->fInfo.ogr.offset_num = 0;
@@ -352,7 +346,7 @@ int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
     init_parts(&parts);
     init_parts(&parts);
 
 
     /* Note: Do not use OGR_L_GetFeatureCount (it may scan all features)!!! */
     /* Note: Do not use OGR_L_GetFeatureCount (it may scan all features)!!! */
-    prnmsg(_("Feature: "));
+    G_verbose_message(_("Feature: "));
 
 
     OGR_L_ResetReading(Map->fInfo.ogr.layer);
     OGR_L_ResetReading(Map->fInfo.ogr.layer);
     count = iFeature = 0;
     count = iFeature = 0;
@@ -362,12 +356,6 @@ int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
 
 
 	G_debug(4, "---- Feature %d ----", iFeature);
 	G_debug(4, "---- Feature %d ----", iFeature);
 
 
-	/* print progress */
-	if (count == 1000) {
-	    prnmsg("%7d\b\b\b\b\b\b\b", iFeature);
-	    count = 0;
-	}
-
 	hGeom = OGR_F_GetGeometryRef(hFeature);
 	hGeom = OGR_F_GetGeometryRef(hFeature);
 	if (hGeom == NULL) {
 	if (hGeom == NULL) {
 	    G_warning(_("Feature %d without geometry ignored"), iFeature);
 	    G_warning(_("Feature %d without geometry ignored"), iFeature);
@@ -391,8 +379,6 @@ int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
     }				/* while */
     }				/* while */
     free_parts(&parts);
     free_parts(&parts);
 
 
-    prnmsg("%4d\n", iFeature);
-
     Map->plus.built = GV_BUILD_ALL;
     Map->plus.built = GV_BUILD_ALL;
     return 1;
     return 1;
 }
 }

+ 1 - 14
lib/vector/Vlib/clean_nodes.c

@@ -32,13 +32,12 @@
 
 
    \param Map input map
    \param Map input map
    \param Err vector map where error line segments are written
    \param Err vector map where error line segments are written
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return number of line modifications
    \return number of line modifications
  */
  */
 int
 int
 Vect_clean_small_angles_at_nodes(struct Map_info *Map, int otype,
 Vect_clean_small_angles_at_nodes(struct Map_info *Map, int otype,
-				 struct Map_info *Err, FILE * msgout)
+				 struct Map_info *Err)
 {
 {
     int node;
     int node;
     int nmodif = 0;
     int nmodif = 0;
@@ -50,9 +49,6 @@ Vect_clean_small_angles_at_nodes(struct Map_info *Map, int otype,
     LCats = Vect_new_cats_struct();
     LCats = Vect_new_cats_struct();
     OCats = Vect_new_cats_struct();
     OCats = Vect_new_cats_struct();
 
 
-    if (msgout)
-	fprintf(msgout, "%s: %5d", _("Modifications"), nmodif);
-
     for (node = 1; node <= Vect_get_num_nodes(Map); node++) {
     for (node = 1; node <= Vect_get_num_nodes(Map); node++) {
 	int i, nlines;
 	int i, nlines;
 
 
@@ -246,19 +242,10 @@ Vect_clean_small_angles_at_nodes(struct Map_info *Map, int otype,
 		angle1 = angle2;
 		angle1 = angle2;
 	    }
 	    }
 
 
-	    if (msgout) {
-		fprintf(msgout, "\r%s: %5d", _("Modifications"), nmodif);
-		fflush(msgout);
-	    }
-
 	    if (clean)
 	    if (clean)
 		break;
 		break;
-
 	}
 	}
-
     }
     }
-    if (msgout)
-	fprintf(stderr, "\n");
 
 
     return (nmodif);
     return (nmodif);
 }
 }

+ 8 - 32
lib/vector/Vlib/dangles.c

@@ -27,7 +27,7 @@
 #define SELECT_DANGLE 2
 #define SELECT_DANGLE 2
 
 
 static void dangles(struct Map_info *, int, int, double,
 static void dangles(struct Map_info *, int, int, double,
-		    struct Map_info *, FILE *, struct ilist *);
+		    struct Map_info *, struct ilist *);
 
 
 /*!
 /*!
    \brief Remove dangles from vector map.
    \brief Remove dangles from vector map.
@@ -47,15 +47,14 @@ static void dangles(struct Map_info *, int, int, double,
    \param type type of dangles (GV_LINES, GV_LINE or GV_BOUNDARY)
    \param type type of dangles (GV_LINES, GV_LINE or GV_BOUNDARY)
    \param maxlength maxlength of dangles or -1 for all dangles
    \param maxlength maxlength of dangles or -1 for all dangles
    \param Err vector map where deleted dangles are written or NULL
    \param Err vector map where deleted dangles are written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 void
 void
 Vect_remove_dangles(struct Map_info *Map, int type, double maxlength,
 Vect_remove_dangles(struct Map_info *Map, int type, double maxlength,
-		    struct Map_info *Err, FILE * msgout)
+		    struct Map_info *Err)
 {
 {
-    dangles(Map, type, REMOVE_DANGLE, maxlength, Err, msgout, NULL);
+    dangles(Map, type, REMOVE_DANGLE, maxlength, Err, NULL);
 }
 }
 
 
 /*!
 /*!
@@ -74,15 +73,14 @@ Vect_remove_dangles(struct Map_info *Map, int type, double maxlength,
    \param Map input map where have to be deleted
    \param Map input map where have to be deleted
    \param maxlength maxlength of dangles or -1 for all dangles
    \param maxlength maxlength of dangles or -1 for all dangles
    \param Err vector map where deleted dangles are written or NULL
    \param Err vector map where deleted dangles are written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return 
    \return 
  */
  */
 void
 void
 Vect_chtype_dangles(struct Map_info *Map, double maxlength,
 Vect_chtype_dangles(struct Map_info *Map, double maxlength,
-		    struct Map_info *Err, FILE * msgout)
+		    struct Map_info *Err)
 {
 {
-    dangles(Map, 0, CHTYPE_DANGLE, maxlength, Err, msgout, NULL);
+    dangles(Map, 0, CHTYPE_DANGLE, maxlength, Err, NULL);
 }
 }
 
 
 /*!
 /*!
@@ -99,15 +97,14 @@ Vect_chtype_dangles(struct Map_info *Map, double maxlength,
    \param Map input map where have to be deleted
    \param Map input map where have to be deleted
    \param type type of dangles (GV_LINES, GV_LINE or GV_BOUNDARY)
    \param type type of dangles (GV_LINES, GV_LINE or GV_BOUNDARY)
    \param maxlength maxlength of dangles or -1 for all dangles
    \param maxlength maxlength of dangles or -1 for all dangles
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return
    \return
  */
  */
 void
 void
 Vect_select_dangles(struct Map_info *Map, int type, double maxlength,
 Vect_select_dangles(struct Map_info *Map, int type, double maxlength,
-		    FILE * msgout, struct ilist *List)
+		    struct ilist *List)
 {
 {
-    dangles(Map, type, SELECT_DANGLE, maxlength, NULL, msgout, List);
+    dangles(Map, type, SELECT_DANGLE, maxlength, NULL, List);
 }
 }
 
 
 /*
 /*
@@ -126,11 +123,10 @@ Vect_select_dangles(struct Map_info *Map, int type, double maxlength,
    option dangle option (REMOVE_DANGLE, CHTYPE_DANGLE, SELECT_DANGLE)
    option dangle option (REMOVE_DANGLE, CHTYPE_DANGLE, SELECT_DANGLE)
    maxlength maxlength of dangles or -1 for all dangles
    maxlength maxlength of dangles or -1 for all dangles
    Err vector map where deleted dangles are written or NULL
    Err vector map where deleted dangles are written or NULL
-   msgout file pointer where messages will be written or NULL
    List_dangle list of feature (selected dangles) ids 
    List_dangle list of feature (selected dangles) ids 
  */
  */
 static void dangles(struct Map_info *Map, int type, int option,
 static void dangles(struct Map_info *Map, int type, int option,
-		    double maxlength, struct Map_info *Err, FILE * msgout,
+		    double maxlength, struct Map_info *Err,
 		    struct ilist *List_dangle)
 		    struct ilist *List_dangle)
 {
 {
     struct line_pnts *Points;
     struct line_pnts *Points;
@@ -168,10 +164,6 @@ static void dangles(struct Map_info *Map, int type, int option,
     Cats = Vect_new_cats_struct();
     Cats = Vect_new_cats_struct();
     List = Vect_new_list();
     List = Vect_new_list();
 
 
-    if (msgout)
-	fprintf(msgout, "%s %5d  %s: %5d",
-		_("Removed dangles:"), dangles_removed, lmsg, lines_removed);
-
     nnodes = Vect_get_num_nodes(Map);
     nnodes = Vect_get_num_nodes(Map);
     G_debug(2, "nnodes =  %d", nnodes);
     G_debug(2, "nnodes =  %d", nnodes);
 
 
@@ -266,23 +258,7 @@ static void dangles(struct Map_info *Map, int type, int option,
 		}
 		}
 	    }			/* delete the chain */
 	    }			/* delete the chain */
 
 
-	    if (msgout) {
-		if (msgout)
-		    fprintf(msgout, "\r%s %5d  %s: %5d",
-			    _("Removed dangles:"), dangles_removed, lmsg,
-			    lines_removed);
-		fflush(msgout);
-	    }
-
 	    dangles_removed++;
 	    dangles_removed++;
 	}			/* lcount == 1 */
 	}			/* lcount == 1 */
     }				/* node <= nnodes */
     }				/* node <= nnodes */
-
-    if (msgout) {
-	if (msgout)
-	    fprintf(msgout, "\r%s %5d  %s: %5d",
-		    _("Removed dangles:"), dangles_removed, lmsg,
-		    lines_removed);
-	fprintf(msgout, "\n");
-    }
 }
 }

+ 2 - 4
lib/vector/Vlib/map.c

@@ -148,13 +148,12 @@ static int copy_file(const char *src, const char *dst)
    \param[in] in input vector map name
    \param[in] in input vector map name
    \param[in] mapset mapset name
    \param[in] mapset mapset name
    \param[in] out output vector map name
    \param[in] out output vector map name
-   \param[in] msgout output file for messages or NULL 
 
 
    \return -1 error
    \return -1 error
    \return 0 success
    \return 0 success
  */
  */
 int
 int
-Vect_copy(const char *in, const char *mapset, const char *out, FILE * msgout)
+Vect_copy(const char *in, const char *mapset, const char *out)
 {
 {
     int i, n, ret, type;
     int i, n, ret, type;
     struct Map_info In, Out;
     struct Map_info In, Out;
@@ -294,12 +293,11 @@ Vect_copy(const char *in, const char *mapset, const char *out, FILE * msgout)
 
 
    \param[in] in input vector map name
    \param[in] in input vector map name
    \param[in] out output vector map name
    \param[in] out output vector map name
-   \param[in] msgout output file for messages or NULL 
 
 
    \return -1 error
    \return -1 error
    \return 0 success
    \return 0 success
  */
  */
-int Vect_rename(const char *in, const char *out, FILE * msgout)
+int Vect_rename(const char *in, const char *out)
 {
 {
     int i, n, ret, type;
     int i, n, ret, type;
     struct Map_info Map;
     struct Map_info Map;

+ 1 - 1
lib/vector/Vlib/open.c

@@ -445,7 +445,7 @@ Vect_open_update(struct Map_info *Map, const char *name, const char *mapset)
 	Map->plus.alloc_upnodes = 0;
 	Map->plus.alloc_upnodes = 0;
 
 
 	/* Build spatial index from topo */
 	/* Build spatial index from topo */
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     return ret;
     return ret;

+ 1 - 12
lib/vector/Vlib/remove_areas.c

@@ -32,15 +32,13 @@
    \param Map vector map
    \param Map vector map
    \param thresh maximum area size for removed areas
    \param thresh maximum area size for removed areas
    \param Err vector map where removed lines and centroids are written
    \param Err vector map where removed lines and centroids are written
-   \param msgout file pointer where messages will be written or NULL
    \param removed_area  pointer to where total size of removed area is stored or NULL
    \param removed_area  pointer to where total size of removed area is stored or NULL
 
 
    \return number of removed areas 
    \return number of removed areas 
  */
  */
 int
 int
 Vect_remove_small_areas(struct Map_info *Map, double thresh,
 Vect_remove_small_areas(struct Map_info *Map, double thresh,
-			struct Map_info *Err, FILE * msgout,
-			double *removed_area)
+			struct Map_info *Err, double *removed_area)
 {
 {
     int area;
     int area;
     int nremoved = 0;
     int nremoved = 0;
@@ -55,9 +53,6 @@ Vect_remove_small_areas(struct Map_info *Map, double thresh,
     Points = Vect_new_line_struct();
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
     Cats = Vect_new_cats_struct();
 
 
-    if (msgout)
-	fprintf(msgout, "%s: %5d", _("Removed areas"), nremoved);
-
     for (area = 1; area <= Vect_get_num_areas(Map); area++) {
     for (area = 1; area <= Vect_get_num_areas(Map); area++) {
 	int i, j, centroid, dissolve_neighbour;
 	int i, j, centroid, dissolve_neighbour;
 	double length, size;
 	double length, size;
@@ -176,13 +171,7 @@ Vect_remove_small_areas(struct Map_info *Map, double thresh,
 	}
 	}
 
 
 	nremoved++;
 	nremoved++;
-	if (msgout) {
-	    fprintf(msgout, "\r%s: %5d", _("Removed areas"), nremoved);
-	    fflush(stderr);
-	}
     }
     }
-    if (msgout)
-	fprintf(stderr, "\n");
 
 
     if (removed_area)
     if (removed_area)
 	*removed_area = size_removed;
 	*removed_area = size_removed;

+ 1 - 15
lib/vector/Vlib/remove_duplicates.c

@@ -31,13 +31,11 @@
    \param Map vector map where duplicate lines will be deleted
    \param Map vector map where duplicate lines will be deleted
    \param type type of line to be delete
    \param type type of line to be delete
    \param Err vector map where duplicate lines will be written or NULL
    \param Err vector map where duplicate lines will be written or NULL
-   \param msgout file pointer where messages will be written or NULL
 
 
    \return void
    \return void
  */
  */
 void
 void
-Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err,
-		       FILE * msgout)
+Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err)
 {
 {
     struct line_pnts *APoints, *BPoints;
     struct line_pnts *APoints, *BPoints;
     struct line_cats *ACats, *BCats, *Cats;
     struct line_cats *ACats, *BCats, *Cats;
@@ -65,9 +63,6 @@ Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err,
 
 
     ndupl = 0;
     ndupl = 0;
 
 
-    if (msgout)
-	fprintf(msgout, "%s: %5d", _("Duplicates"), ndupl);
-
     for (i = 1; i <= nlines; i++) {
     for (i = 1; i <= nlines; i++) {
 	if (!Vect_line_alive(Map, i))
 	if (!Vect_line_alive(Map, i))
 	    continue;
 	    continue;
@@ -113,20 +108,11 @@ Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err,
 
 
 	    ndupl++;
 	    ndupl++;
 
 
-	    if (msgout) {
-		fprintf(msgout, "\r%s: %5d", _("Duplicates"), ndupl);
-		fflush(msgout);
-	    }
-
 	    break;		/* line was deleted -> take the next one */
 	    break;		/* line was deleted -> take the next one */
 	}
 	}
 	nlines = Vect_get_num_lines(Map);	/* For future when lines with cats will be rewritten */
 	nlines = Vect_get_num_lines(Map);	/* For future when lines with cats will be rewritten */
 	G_debug(3, "nlines =  %d\n", nlines);
 	G_debug(3, "nlines =  %d\n", nlines);
     }
     }
-    if (msgout)
-	fprintf(msgout, "\n");
-
-    return;
 }
 }
 
 
 /*!
 /*!

+ 4 - 4
lib/vector/Vlib/select.c

@@ -50,7 +50,7 @@ Vect_select_lines_by_box(struct Map_info *Map, BOUND_BOX * Box,
 
 
     if (!(plus->Spidx_built)) {
     if (!(plus->Spidx_built)) {
 	G_debug(3, "Building spatial index.");
 	G_debug(3, "Building spatial index.");
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     list->n_values = 0;
     list->n_values = 0;
@@ -100,7 +100,7 @@ Vect_select_areas_by_box(struct Map_info *Map, BOUND_BOX * Box,
 
 
     if (!(Map->plus.Spidx_built)) {
     if (!(Map->plus.Spidx_built)) {
 	G_debug(3, "Building spatial index.");
 	G_debug(3, "Building spatial index.");
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     dig_select_areas(&(Map->plus), Box, list);
     dig_select_areas(&(Map->plus), Box, list);
@@ -137,7 +137,7 @@ Vect_select_isles_by_box(struct Map_info *Map, BOUND_BOX * Box,
 
 
     if (!(Map->plus.Spidx_built)) {
     if (!(Map->plus.Spidx_built)) {
 	G_debug(3, "Building spatial index.");
 	G_debug(3, "Building spatial index.");
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     dig_select_isles(&(Map->plus), Box, list);
     dig_select_isles(&(Map->plus), Box, list);
@@ -169,7 +169,7 @@ Vect_select_nodes_by_box(struct Map_info *Map, BOUND_BOX * Box,
 
 
     if (!(plus->Spidx_built)) {
     if (!(plus->Spidx_built)) {
 	G_debug(3, "Building spatial index.");
 	G_debug(3, "Building spatial index.");
-	Vect_build_sidx_from_topo(Map, NULL);
+	Vect_build_sidx_from_topo(Map);
     }
     }
 
 
     list->n_values = 0;
     list->n_values = 0;

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

@@ -121,14 +121,14 @@ void Vect_spatial_index_del_item(SPATIAL_INDEX * si, int id)
    \return 0 OK
    \return 0 OK
    \return 1 error
    \return 1 error
  */
  */
-int Vect_build_spatial_index(struct Map_info *Map, FILE * msgout)
+int Vect_build_spatial_index(struct Map_info *Map)
 {
 {
     if (Map->level < 2) {
     if (Map->level < 2) {
 	G_fatal_error(_("Unable to build spatial index from topology, "
 	G_fatal_error(_("Unable to build spatial index from topology, "
 			"vector map is not opened at topo level 2"));
 			"vector map is not opened at topo level 2"));
     }
     }
     if (!(Map->plus.Spidx_built)) {
     if (!(Map->plus.Spidx_built)) {
-	return (Vect_build_sidx_from_topo(Map, msgout));
+	return (Vect_build_sidx_from_topo(Map));
     }
     }
     return 0;
     return 0;
 }
 }
@@ -137,12 +137,11 @@ int Vect_build_spatial_index(struct Map_info *Map, FILE * msgout)
    \brief Create spatial index from topo if necessary
    \brief Create spatial index from topo if necessary
 
 
    \param Map pointer to vector map
    \param Map pointer to vector map
-   \param msgout print progress here
 
 
    \return 0 OK
    \return 0 OK
    \return 1 error
    \return 1 error
  */
  */
-int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
+int Vect_build_sidx_from_topo(struct Map_info *Map)
 {
 {
     int i, total, done;
     int i, total, done;
     struct Plus_head *plus;
     struct Plus_head *plus;
@@ -162,7 +161,7 @@ int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
 
 
     /* Nodes */
     /* Nodes */
     for (i = 1; i <= plus->n_nodes; i++) {
     for (i = 1; i <= plus->n_nodes; i++) {
-	G_percent2(i, total, 1, msgout);
+	G_percent(i, total, 1);
 
 
 	Node = plus->Node[i];
 	Node = plus->Node[i];
 	if (!Node)
 	if (!Node)
@@ -174,7 +173,7 @@ int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
     /* 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_percent2(done + i, total, 1, msgout);
+	G_percent(done + i, total, 1);
 
 
 	Line = plus->Line[i];
 	Line = plus->Line[i];
 	if (!Line)
 	if (!Line)
@@ -193,7 +192,7 @@ int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
     /* 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_percent2(done + i, total, 1, msgout);
+	G_percent(done + i, total, 1);
 
 
 	Area = plus->Area[i];
 	Area = plus->Area[i];
 	if (!Area)
 	if (!Area)
@@ -212,7 +211,7 @@ int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
     /* 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_percent2(done + i, total, 1, msgout);
+	G_percent(done + i, total, 1);
 
 
 	Isle = plus->Isle[i];
 	Isle = plus->Isle[i];
 	if (!Isle)
 	if (!Isle)

+ 3 - 47
lib/vector/Vlib/snap.c

@@ -62,7 +62,6 @@ int add_item(int id, struct ilist *list)
  * \param[in] List_lines list of lines to snap
  * \param[in] List_lines list of lines to snap
  * \param[in] thresh threshold in which snap vertices
  * \param[in] thresh threshold in which snap vertices
  * \param[out] Err vector map where lines representing snap are written or NULL
  * \param[out] Err vector map where lines representing snap are written or NULL
- * \param[out] msgout file pointer where messages will be written or NULL
  *
  *
  * \return void
  * \return void
  */
  */
@@ -80,13 +79,12 @@ int add_item(int id, struct ilist *list)
  */
  */
 void
 void
 Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
 Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
-		     double thresh, struct Map_info *Err, FILE * msgout)
+		     double thresh, struct Map_info *Err)
 {
 {
     struct line_pnts *Points, *NPoints;
     struct line_pnts *Points, *NPoints;
     struct line_cats *Cats;
     struct line_cats *Cats;
     int line, ltype, line_idx;
     int line, ltype, line_idx;
     double thresh2;
     double thresh2;
-    int printed;
 
 
     struct Node *RTree;
     struct Node *RTree;
     int point;			/* index in points array */
     int point;			/* index in points array */
@@ -100,7 +98,6 @@ Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
     struct ilist *List;
     struct ilist *List;
     int *Index = NULL;		/* indexes of anchors for vertices */
     int *Index = NULL;		/* indexes of anchors for vertices */
     int aindex = 0;		/* allocated Index */
     int aindex = 0;		/* allocated Index */
-    int width = 26;		/* fprintf width */
 
 
     if (List_lines->n_values < 1)
     if (List_lines->n_values < 1)
 	return;
 	return;
@@ -118,10 +115,6 @@ Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
     point = 1;			/* index starts from 1 ! */
     point = 1;			/* index starts from 1 ! */
     nvertices = 0;
     nvertices = 0;
     XPnts = NULL;
     XPnts = NULL;
-    printed = 0;
-
-    if (msgout)
-	fprintf(msgout, "%s...", _("Registering points"));
 
 
     for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
     for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
 	int v;
 	int v;
@@ -166,21 +159,8 @@ Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
 		point++;
 		point++;
 	    }
 	    }
 	}
 	}
-	if (msgout && printed > 1000) {
-	    fprintf(msgout, "\r%s... %d", _("Registering points"), point - 1);
-	    fflush(msgout);
-	    printed = 0;
-	}
-	printed++;
     }
     }
     npoints = point - 1;
     npoints = point - 1;
-    if (msgout) {
-	fprintf(msgout,
-		"\r                                               \r");
-	fprintf(msgout, "%-*s: %4d\n", width, _("All vertices"), nvertices);
-	fprintf(msgout, "%-*s: %4d\n", width, _("Registered points"),
-		npoints);
-    }
 
 
     /* Go through all registered points and if not yet marked mark it as anchor and assign this anchor
     /* Go through all registered points and if not yet marked mark it as anchor and assign this anchor
      * to all not yet marked points in threshold */
      * to all not yet marked points in threshold */
@@ -226,21 +206,12 @@ Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
 	    }
 	    }
 	}
 	}
     }
     }
-    if (msgout) {
-	fprintf(msgout, "%-*s: %4d\n", width, _("Nodes marked as anchor"),
-		nanchors);
-	fprintf(msgout, "%-*s: %4d\n", width, _("Nodes marked to be snapped"),
-		ntosnap);
-    }
 
 
     /* Go through all lines and: 
     /* Go through all lines and: 
      *   1) for all vertices: if not anchor snap it to its anchor
      *   1) for all vertices: if not anchor snap it to its anchor
      *   2) for all segments: snap it to all anchors in threshold (except anchors of vertices of course) */
      *   2) for all segments: snap it to all anchors in threshold (except anchors of vertices of course) */
 
 
-    printed = 0;
     nsnapped = ncreated = 0;
     nsnapped = ncreated = 0;
-    if (msgout)
-	fprintf(msgout, "%-*s: %4d", width, _("Snaps"), nsnapped + ncreated);
 
 
     for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
     for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
 	int v, spoint, anchor;
 	int v, spoint, anchor;
@@ -407,22 +378,8 @@ Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
 		Vect_write_line(Err, ltype, Points, Cats);
 		Vect_write_line(Err, ltype, Points, Cats);
 	    }
 	    }
 	}
 	}
-
-	if (msgout && printed > 1000) {
-	    fprintf(msgout, "\r%s: %5d  (line = %d)", _("Snaps"),
-		    nsnapped + ncreated, line);
-	    fflush(msgout);
-	    printed = 0;
-	}
-	printed++;
     }				/* for each line */
     }				/* for each line */
 
 
-    if (msgout) {
-	fprintf(msgout, "\r%-*s: %4d\n", width, _("Snapped vertices"),
-		nsnapped);
-	fprintf(msgout, "%-*s: %4d\n", width, _("New vertices"), ncreated);
-    }
-
     Vect_destroy_line_struct(Points);
     Vect_destroy_line_struct(Points);
     Vect_destroy_line_struct(NPoints);
     Vect_destroy_line_struct(NPoints);
     Vect_destroy_cats_struct(Cats);
     Vect_destroy_cats_struct(Cats);
@@ -454,13 +411,12 @@ static int sort_new(const void *pa, const void *pb)
  * \param[in] type type of lines to snap
  * \param[in] type type of lines to snap
  * \param[in] thresh threshold in which snap vertices
  * \param[in] thresh threshold in which snap vertices
  * \param[out] Err vector map where lines representing snap are written or NULL
  * \param[out] Err vector map where lines representing snap are written or NULL
- * \param[out] msgout file pointer where messages will be written or NULL
  *
  *
  * \return void
  * \return void
  */
  */
 void
 void
 Vect_snap_lines(struct Map_info *Map, int type, double thresh,
 Vect_snap_lines(struct Map_info *Map, int type, double thresh,
-		struct Map_info *Err, FILE * msgout)
+		struct Map_info *Err)
 {
 {
     int line, nlines, ltype;
     int line, nlines, ltype;
 
 
@@ -484,7 +440,7 @@ Vect_snap_lines(struct Map_info *Map, int type, double thresh,
 	Vect_list_append(List, line);
 	Vect_list_append(List, line);
     }
     }
 
 
-    Vect_snap_lines_list(Map, List, thresh, Err, msgout);
+    Vect_snap_lines_list(Map, List, thresh, Err);
 
 
     Vect_destroy_list(List);
     Vect_destroy_list(List);
 
 

+ 1 - 1
lib/vector/vedit/select.c

@@ -91,7 +91,7 @@ int Vedit_select_by_query(struct Map_info *Map,
 	    thresh_tmp = fabs(thresh);
 	    thresh_tmp = fabs(thresh);
 
 
 	    /* select dangles shorter than 'thresh_tmp' */
 	    /* select dangles shorter than 'thresh_tmp' */
-	    Vect_select_dangles(Map, type, thresh_tmp, NULL, List_dangle);
+	    Vect_select_dangles(Map, type, thresh_tmp, List_dangle);
 
 
 	    if (thresh <= 0.0) {	/* shorter than */
 	    if (thresh <= 0.0) {	/* shorter than */
 		for (i = 0; i < List_dangle->n_values; i++) {
 		for (i = 0; i < List_dangle->n_values; i++) {

+ 1 - 1
raster/r.carve/vect.c

@@ -42,7 +42,7 @@ int open_new_vect(struct Map_info *map, char *vect)
 int close_vect(struct Map_info *map, const int build_support)
 int close_vect(struct Map_info *map, const int build_support)
 {
 {
     if (build_support)
     if (build_support)
-	Vect_build(map, stderr);
+	Vect_build(map);
 
 
     Vect_set_release_support(map);
     Vect_set_release_support(map);
     Vect_close(map);
     Vect_close(map);

+ 1 - 1
raster/r.contour/main.c

@@ -198,7 +198,7 @@ int main(int argc, char *argv[])
 
 
     db_close_database_shutdown_driver(Driver);
     db_close_database_shutdown_driver(Driver);
 
 
-    Vect_build(&Map, stderr);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     G_done_msg("");
     G_done_msg("");

+ 1 - 1
raster/r.flow/io.c

@@ -181,7 +181,7 @@ void close_files(void)
     /*   if (parm.lgout)
     /*   if (parm.lgout)
        G_close_cell(lgfd); */
        G_close_cell(lgfd); */
     if (parm.flout) {
     if (parm.flout) {
-	Vect_build(&fl, stderr);
+	Vect_build(&fl);
 	Vect_close(&fl);
 	Vect_close(&fl);
     }
     }
 }
 }

+ 1 - 1
raster/r.random/random.c

@@ -251,7 +251,7 @@ int execute_random(struct rr_state *theState)
     if (theState->outvector) {
     if (theState->outvector) {
 	db_commit_transaction(driver);
 	db_commit_transaction(driver);
 	db_close_database_shutdown_driver(driver);
 	db_close_database_shutdown_driver(driver);
-	Vect_build(&Out, stderr);
+	Vect_build(&Out);
 	Vect_close(&Out);
 	Vect_close(&Out);
     }
     }
     if (theState->outraster)
     if (theState->outraster)

+ 1 - 1
raster/r.to.vect/main.c

@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
     G_close_cell(input_fd);
     G_close_cell(input_fd);
 
 
     if (!no_topol->answer)
     if (!no_topol->answer)
-	Vect_build(&Map, stderr);
+	Vect_build(&Map);
 
 
 
 
     /* insert cats and optionally labels if raster cats were used */
     /* insert cats and optionally labels if raster cats were used */

+ 1 - 1
vector/lidar/v.outlier/main.c

@@ -352,7 +352,7 @@ int main(int argc, char *argv[])
     Vect_close(&Out);
     Vect_close(&Out);
     Vect_close(&Outlier);
     Vect_close(&Outlier);
     if (qgis_opt->answer) {
     if (qgis_opt->answer) {
-	Vect_build(&Qgis, stderr);
+	Vect_build(&Qgis);
 	Vect_close(&Qgis);
 	Vect_close(&Qgis);
     }
     }
 
 

+ 8 - 8
vector/v.buffer/main.c

@@ -222,8 +222,8 @@ void stop(struct Map_info *In, struct Map_info *Out)
     Vect_close(In);
     Vect_close(In);
 
 
     G_message(_("Rebuilding topology..."));
     G_message(_("Rebuilding topology..."));
-    Vect_build_partial(Out, GV_BUILD_NONE, NULL);
-    Vect_build(Out, stderr);
+    Vect_build_partial(Out, GV_BUILD_NONE);
+    Vect_build(Out);
     Vect_close(Out);
     Vect_close(Out);
 }
 }
 
 
@@ -601,7 +601,7 @@ int main(int argc, char *argv[])
 
 
     /* Break lines */
     /* Break lines */
     G_message(_("Building parts of topology..."));
     G_message(_("Building parts of topology..."));
-    Vect_build_partial(&Out, GV_BUILD_BASE, stderr);
+    Vect_build_partial(&Out, GV_BUILD_BASE);
 
 
     /* Warning: snapping must be done, otherwise colinear boundaries are not broken and 
     /* Warning: snapping must be done, otherwise colinear boundaries are not broken and 
      * topology cannot be built (the same angle). But snapping distance must be very, very 
      * topology cannot be built (the same angle). But snapping distance must be very, very 
@@ -613,13 +613,13 @@ int main(int argc, char *argv[])
      * the same angles of lines at nodes, don't forget about LongLat data, probably
      * the same angles of lines at nodes, don't forget about LongLat data, probably
      * calculate different threshold for each map, depending on map's bounding box */
      * calculate different threshold for each map, depending on map's bounding box */
     G_message(_("Snapping boundaries..."));
     G_message(_("Snapping boundaries..."));
-    Vect_snap_lines(&Out, GV_BOUNDARY, 1e-7, NULL, stderr);
+    Vect_snap_lines(&Out, GV_BOUNDARY, 1e-7, NULL);
 
 
     G_message(_("Breaking boundaries..."));
     G_message(_("Breaking boundaries..."));
-    Vect_break_lines(&Out, GV_BOUNDARY, NULL, stderr);
+    Vect_break_lines(&Out, GV_BOUNDARY, NULL);
 
 
     G_message(_("Removing duplicates..."));
     G_message(_("Removing duplicates..."));
-    Vect_remove_duplicates(&Out, GV_BOUNDARY, NULL, stderr);
+    Vect_remove_duplicates(&Out, GV_BOUNDARY, NULL);
 
 
     /* Dangles and bridges don't seem to be necessary if snapping is small enough. */
     /* Dangles and bridges don't seem to be necessary if snapping is small enough. */
     /*
     /*
@@ -631,7 +631,7 @@ int main(int argc, char *argv[])
      */
      */
 
 
     G_message(_("Attaching islands..."));
     G_message(_("Attaching islands..."));
-    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, stderr);
+    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
 
 
     /* Calculate new centroids for all areas */
     /* Calculate new centroids for all areas */
     nareas = Vect_get_num_areas(&Out);
     nareas = Vect_get_num_areas(&Out);
@@ -745,7 +745,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     G_message(_("Attaching centroids..."));
     G_message(_("Attaching centroids..."));
-    Vect_build_partial(&Out, GV_BUILD_CENTROIDS, stderr);
+    Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
 
 
     stop(&In, &Out);
     stop(&In, &Out);
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 5
vector/v.build.polylines/main.c

@@ -213,11 +213,7 @@ int main(int argc, char **argv)
     G_free(lines_visited);
     G_free(lines_visited);
     Vect_close(&map);
     Vect_close(&map);
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out, stderr);
-    else
-	Vect_build(&Out, NULL);
-
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 2 - 2
vector/v.build/main.c

@@ -82,7 +82,7 @@ int main(int argc, char *argv[])
 	Vect_set_open_level(1);
 	Vect_set_open_level(1);
 	Vect_open_old(&Map, map_opt->answer, G_mapset());
 	Vect_open_old(&Map, map_opt->answer, G_mapset());
 
 
-	Vect_build(&Map, stderr);
+	Vect_build(&Map);
     }
     }
     /* dump topology */
     /* dump topology */
     if (dump || sdump || cdump) {
     if (dump || sdump || cdump) {
@@ -150,7 +150,7 @@ int main(int argc, char *argv[])
 	    }
 	    }
 	}
 	}
 
 
-	Vect_build(&Err, stderr);
+	Vect_build(&Err);
 	Vect_close(&Err);
 	Vect_close(&Err);
     }
     }
 
 

+ 1 - 6
vector/v.category/main.c

@@ -483,12 +483,7 @@ int main(int argc, char *argv[])
     if (option == O_ADD || option == O_DEL || option == O_CHFIELD ||
     if (option == O_ADD || option == O_DEL || option == O_CHFIELD ||
 	option == O_SUM) {
 	option == O_SUM) {
 	Vect_copy_tables(&In, &Out, 0);
 	Vect_copy_tables(&In, &Out, 0);
-	if (G_verbose() > G_verbose_min()) {
-	    Vect_build(&Out, stderr);
-	}
-	else {
-	    Vect_build(&Out, NULL);
-	}
+	Vect_build(&Out);
 	Vect_close(&Out);
 	Vect_close(&Out);
     }
     }
     Vect_close(&In);
     Vect_close(&In);

+ 18 - 25
vector/v.clean/main.c

@@ -35,7 +35,6 @@ int main(int argc, char *argv[])
     int level;
     int level;
     int count;
     int count;
     double size;
     double size;
-    FILE *output;		/* NULL | stderr */
 
 
     G_gisinit(argv[0]);
     G_gisinit(argv[0]);
 
 
@@ -277,32 +276,27 @@ int main(int argc, char *argv[])
     Vect_set_release_support(&In);
     Vect_set_release_support(&In);
     Vect_close(&In);
     Vect_close(&In);
 
 
-    if (G_verbose() > G_verbose_min())
-	output = stderr;
-    else
-	output = NULL;
-
     /* Start with GV_BUILD_NONE and for each tool use unly the necessary level! */
     /* Start with GV_BUILD_NONE and for each tool use unly the necessary level! */
 
 
     for (i = 0; i < ntools; i++) {
     for (i = 0; i < ntools; i++) {
 	if (tools[i] == TOOL_RMDAC || tools[i] == TOOL_PRUNE ||
 	if (tools[i] == TOOL_RMDAC || tools[i] == TOOL_PRUNE ||
 	    tools[i] == TOOL_RMAREA) {
 	    tools[i] == TOOL_RMAREA) {
 	    if (Vect_get_built(&Out) >= GV_BUILD_CENTROIDS) {
 	    if (Vect_get_built(&Out) >= GV_BUILD_CENTROIDS) {
-		Vect_build_partial(&Out, GV_BUILD_CENTROIDS, NULL);
+		Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
 	    }
 	    }
 	    else {
 	    else {
 		G_important_message(_("Rebuilding parts of topology..."));
 		G_important_message(_("Rebuilding parts of topology..."));
-		Vect_build_partial(&Out, GV_BUILD_CENTROIDS, output);
+		Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
 		G_message(SEP);
 		G_message(SEP);
 	    }
 	    }
 	}
 	}
 	else {
 	else {
 	    if (Vect_get_built(&Out) >= GV_BUILD_BASE) {
 	    if (Vect_get_built(&Out) >= GV_BUILD_BASE) {
-		Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
+		Vect_build_partial(&Out, GV_BUILD_BASE);
 	    }
 	    }
 	    else {
 	    else {
 		G_important_message(_("Rebuilding parts of topology..."));
 		G_important_message(_("Rebuilding parts of topology..."));
-		Vect_build_partial(&Out, GV_BUILD_BASE, output);
+		Vect_build_partial(&Out, GV_BUILD_BASE);
 		G_message(SEP);
 		G_message(SEP);
 	    }
 	    }
 	}
 	}
@@ -310,27 +304,27 @@ int main(int argc, char *argv[])
 	switch (tools[i]) {
 	switch (tools[i]) {
 	case TOOL_BREAK:
 	case TOOL_BREAK:
 	    G_message(_("Tool: Break lines at intersections"));
 	    G_message(_("Tool: Break lines at intersections"));
-	    Vect_break_lines(&Out, otype, pErr, output);
+	    Vect_break_lines(&Out, otype, pErr);
 	    break;
 	    break;
 	case TOOL_RMDUPL:
 	case TOOL_RMDUPL:
 	    G_message(_("Tool: Remove duplicates"));
 	    G_message(_("Tool: Remove duplicates"));
-	    Vect_remove_duplicates(&Out, otype, pErr, output);
+	    Vect_remove_duplicates(&Out, otype, pErr);
 	    break;
 	    break;
 	case TOOL_RMDANGLE:
 	case TOOL_RMDANGLE:
 	    G_message(_("Tool: Remove dangles"));
 	    G_message(_("Tool: Remove dangles"));
-	    Vect_remove_dangles(&Out, otype, threshs[i], pErr, output);
+	    Vect_remove_dangles(&Out, otype, threshs[i], pErr);
 	    break;
 	    break;
 	case TOOL_CHDANGLE:
 	case TOOL_CHDANGLE:
 	    G_message(_("Tool: Change type of boundary dangles"));
 	    G_message(_("Tool: Change type of boundary dangles"));
-	    Vect_chtype_dangles(&Out, threshs[i], pErr, stderr);
+	    Vect_chtype_dangles(&Out, threshs[i], pErr);
 	    break;
 	    break;
 	case TOOL_RMBRIDGE:
 	case TOOL_RMBRIDGE:
 	    G_message(_("Tool: Remove bridges"));
 	    G_message(_("Tool: Remove bridges"));
-	    Vect_remove_bridges(&Out, pErr, output);
+	    Vect_remove_bridges(&Out, pErr);
 	    break;
 	    break;
 	case TOOL_CHBRIDGE:
 	case TOOL_CHBRIDGE:
 	    G_message(_("Tool: Change type of boundary bridges"));
 	    G_message(_("Tool: Change type of boundary bridges"));
-	    Vect_chtype_bridges(&Out, pErr, output);
+	    Vect_chtype_bridges(&Out, pErr);
 	    break;
 	    break;
 	case TOOL_RMDAC:
 	case TOOL_RMDAC:
 	    G_message(_("Tool: Remove duplicate area centroids"));
 	    G_message(_("Tool: Remove duplicate area centroids"));
@@ -338,11 +332,11 @@ int main(int argc, char *argv[])
 	    break;
 	    break;
 	case TOOL_SNAP:
 	case TOOL_SNAP:
 	    G_message(_("Tool: Snap line to vertex in threshold"));
 	    G_message(_("Tool: Snap line to vertex in threshold"));
-	    Vect_snap_lines(&Out, otype, threshs[i], pErr, output);
+	    Vect_snap_lines(&Out, otype, threshs[i], pErr);
 	    break;
 	    break;
 	case TOOL_BPOL:
 	case TOOL_BPOL:
 	    G_message(_("Tool: Break polygons"));
 	    G_message(_("Tool: Break polygons"));
-	    Vect_break_polygons(&Out, otype, pErr, stderr);
+	    Vect_break_polygons(&Out, otype, pErr);
 	    break;
 	    break;
 	case TOOL_PRUNE:
 	case TOOL_PRUNE:
 	    G_message(_("Tool: Prune lines/boundaries"));
 	    G_message(_("Tool: Prune lines/boundaries"));
@@ -351,14 +345,13 @@ int main(int argc, char *argv[])
 	case TOOL_RMAREA:
 	case TOOL_RMAREA:
 	    G_message(_("Tool: Remove small areas"));
 	    G_message(_("Tool: Remove small areas"));
 	    count =
 	    count =
-		Vect_remove_small_areas(&Out, threshs[i], pErr, output,
-					&size);
+		Vect_remove_small_areas(&Out, threshs[i], pErr, &size);
 	    G_message(_("%d areas of total size %g removed"), count, size);
 	    G_message(_("%d areas of total size %g removed"), count, size);
 	    break;
 	    break;
 	case TOOL_RMSA:
 	case TOOL_RMSA:
 	    G_message(_("Tool: Remove small angles at nodes"));
 	    G_message(_("Tool: Remove small angles at nodes"));
 	    count =
 	    count =
-		Vect_clean_small_angles_at_nodes(&Out, otype, pErr, output);
+		Vect_clean_small_angles_at_nodes(&Out, otype, pErr);
 	    G_message(_("%d modifications done"), count);
 	    G_message(_("%d modifications done"), count);
 	    break;
 	    break;
 	case TOOL_RMLINE:
 	case TOOL_RMLINE:
@@ -373,18 +366,18 @@ int main(int argc, char *argv[])
 
 
     if (!no_build_flag->answer) {
     if (!no_build_flag->answer) {
 	G_important_message(_("Rebuilding topology for output vector map..."));
 	G_important_message(_("Rebuilding topology for output vector map..."));
-	Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-	Vect_build(&Out, output);
+	Vect_build_partial(&Out, GV_BUILD_NONE);
+	Vect_build(&Out);
     }
     }
     else {
     else {
-	Vect_build_partial(&Out, GV_BUILD_NONE, NULL);	/* -> topo not saved */
+	Vect_build_partial(&Out, GV_BUILD_NONE);	/* -> topo not saved */
     }
     }
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     if (pErr) {
     if (pErr) {
 	G_message(SEP);
 	G_message(SEP);
 	G_important_message(_("Building topology for error vector map..."));
 	G_important_message(_("Building topology for error vector map..."));
-	Vect_build(pErr, output);
+	Vect_build(pErr);
 	Vect_close(pErr);
 	Vect_close(pErr);
     }
     }
 
 

+ 1 - 9
vector/v.clean/prune.c

@@ -56,10 +56,7 @@ prune(struct Map_info *Out, int otype, double thresh, struct Map_info *Err)
     G_debug(1, "nlines =  %d", nlines);
     G_debug(1, "nlines =  %d", nlines);
 
 
     if (Err)
     if (Err)
-	Vect_build_partial(Err, GV_BUILD_BASE, NULL);
-
-    if (G_verbose() > G_verbose_min())
-	fprintf(stderr, _("Removed vertices: %5d"), nremoved);
+	Vect_build_partial(Err, GV_BUILD_BASE);
 
 
     for (line = 1; line <= nlines; line++) {
     for (line = 1; line <= nlines; line++) {
 
 
@@ -210,11 +207,6 @@ prune(struct Map_info *Out, int otype, double thresh, struct Map_info *Err)
 	    nremoved += norig - TPoints->n_points;
 	    nremoved += norig - TPoints->n_points;
 	    G_debug(4, "%d vertices removed", norig - TPoints->n_points);
 	    G_debug(4, "%d vertices removed", norig - TPoints->n_points);
 	}
 	}
-
-	if (G_verbose() > G_verbose_min())
-	    fprintf(stderr, "\r%s: %5d", _("Removed vertices"), nremoved);
-
-	fflush(stderr);
     }
     }
 
 
     G_important_message(_("\n%d vertices from input %d (vertices of given type) removed, i.e. %.2f %%"),
     G_important_message(_("\n%d vertices from input %d (vertices of given type) removed, i.e. %.2f %%"),

+ 1 - 1
vector/v.convert/old2new.c

@@ -141,7 +141,7 @@ int old2new(char *in, char *out, int endian)
     /* Convert dig_cats to table */
     /* Convert dig_cats to table */
     attributes(in, &Mapout);
     attributes(in, &Mapout);
 
 
-    Vect_build(&Mapout, stderr);
+    Vect_build(&Mapout);
     Vect_close(&Mapout);
     Vect_close(&Mapout);
 
 
     fclose(Digin);
     fclose(Digin);

+ 2 - 2
vector/v.digit/centre.c

@@ -168,8 +168,8 @@ void update(int wx, int wy)
 void end(void)
 void end(void)
 {
 {
     G_debug(1, "end()");
     G_debug(1, "end()");
-    Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
-    Vect_build(&Map, stdout);
+    Vect_build_partial(&Map, GV_BUILD_NONE);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     if (1 == G_put_window(&GRegion))
     if (1 == G_put_window(&GRegion))

+ 1 - 1
vector/v.digit/main.c

@@ -192,7 +192,7 @@ int main(int argc, char *argv[])
 	if (new_f->answer) {
 	if (new_f->answer) {
 	    G_message(_("New empty map created."));
 	    G_message(_("New empty map created."));
 	    Vect_open_new(&Map, map_opt->answer, 0);
 	    Vect_open_new(&Map, map_opt->answer, 0);
-	    Vect_build(&Map, NULL);
+	    Vect_build(&Map);
 	    Vect_close(&Map);
 	    Vect_close(&Map);
 	    Vect_open_update(&Map, map_opt->answer, G_mapset());
 	    Vect_open_update(&Map, map_opt->answer, G_mapset());
 	}
 	}

+ 1 - 4
vector/v.distance/main.c

@@ -1131,10 +1131,7 @@ int main(int argc, char *argv[])
 
 
     Vect_close(&From);
     Vect_close(&From);
     if (Outp != NULL) {
     if (Outp != NULL) {
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(Outp, stderr);
-	else
-	    Vect_build(Outp, NULL);
+	Vect_build(Outp);
 	Vect_close(Outp);
 	Vect_close(Outp);
     }
     }
 
 

+ 1 - 7
vector/v.drape/main.c

@@ -267,13 +267,7 @@ int main(int argc, char *argv[])
     /* close input vector */
     /* close input vector */
     Vect_close(&In);
     Vect_close(&In);
     /* build topology for output vector */
     /* build topology for output vector */
-    if (G_verbose() > G_verbose_min()) {
-	Vect_build(&Out, stderr);
-    }
-    else {
-	Vect_build(&Out, NULL);
-    }
-
+    Vect_build(&Out);
     /* close output vector */
     /* close output vector */
     Vect_close(&Out);
     Vect_close(&Out);
 
 

+ 1 - 1
vector/v.edit/a2b.c

@@ -299,7 +299,7 @@ int close_lines(struct Map_info *Map, int ltype, double thresh)
 
 
     nlines_modified = 0;
     nlines_modified = 0;
 
 
-    Vect_build_partial(Map, GV_BUILD_BASE, NULL);
+    Vect_build_partial(Map, GV_BUILD_BASE);
     nlines = Vect_get_num_lines(Map);
     nlines = Vect_get_num_lines(Map);
 
 
     for (line = 1; line <= nlines; line++) {
     for (line = 1; line <= nlines; line++) {

+ 3 - 7
vector/v.edit/main.c

@@ -286,8 +286,7 @@ int main(int argc, char *argv[])
 				    coord, thresh[THRESH_COORDS], NULL);
 				    coord, thresh[THRESH_COORDS], NULL);
 	}
 	}
 	else {
 	else {
-	    ret = Vect_break_lines_list(&Map, List, NULL,
-					GV_LINES, NULL, NULL);
+	    ret = Vect_break_lines_list(&Map, List, NULL, GV_LINES, NULL);
 	}
 	}
 	G_message(_("%d lines broken"), ret);
 	G_message(_("%d lines broken"), ret);
 	break;
 	break;
@@ -410,11 +409,8 @@ int main(int argc, char *argv[])
     /* build topology only if requested or if tool!=select */
     /* build topology only if requested or if tool!=select */
     if (!(action_mode == MODE_SELECT || params.topo->answer == 1 ||
     if (!(action_mode == MODE_SELECT || params.topo->answer == 1 ||
 	 !MODE_NONE)) {
 	 !MODE_NONE)) {
-	Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(&Map, stderr);
-	else
-	    Vect_build(&Map, NULL);
+	Vect_build_partial(&Map, GV_BUILD_NONE);
+	Vect_build(&Map);
     }
     }
 
 
     if (List)
     if (List)

+ 3 - 11
vector/v.edit/snap.c

@@ -31,21 +31,13 @@
  */
  */
 int snap_lines(struct Map_info *Map, struct ilist *List, double thresh)
 int snap_lines(struct Map_info *Map, struct ilist *List, double thresh)
 {
 {
-
-    FILE *output;
-
-    if (G_verbose() > G_verbose_min()) {
+    if (G_verbose() > G_verbose_min())
 	G_important_message(SEP);
 	G_important_message(SEP);
-	output = stderr;
-    }
-    else
-	output = NULL;
 
 
-    Vect_snap_lines_list(Map, List, thresh, NULL, output);
+    Vect_snap_lines_list(Map, List, thresh, NULL);
 
 
-    if (G_verbose() > G_verbose_min()) {
+    if (G_verbose() > G_verbose_min())
 	G_important_message(SEP);
 	G_important_message(SEP);
-    }
 
 
     return 1;
     return 1;
 }
 }

+ 1 - 1
vector/v.external/main.c

@@ -158,7 +158,7 @@ int main(int argc, char *argv[])
     fclose(fd);
     fclose(fd);
 
 
     Vect_open_old(&Map, out_opt->answer, G_mapset());
     Vect_open_old(&Map, out_opt->answer, G_mapset());
-    Vect_build(&Map, stderr);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 3 - 10
vector/v.extract/main.c

@@ -369,11 +369,7 @@ int main(int argc, char **argv)
     xtract_line(cat_count, cat_array, &In, &Out, new_cat, type, dissolve,
     xtract_line(cat_count, cat_array, &In, &Out, new_cat, type, dissolve,
 		field, type_only, r_flag->answer ? 1 : 0);
 		field, type_only, r_flag->answer ? 1 : 0);
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out, stderr);
-    else
-	Vect_build(&Out, NULL);
-
+    Vect_build(&Out);
 
 
     /* Copy tables */
     /* Copy tables */
     if (!t_flag->answer) {
     if (!t_flag->answer) {
@@ -500,11 +496,8 @@ int main(int argc, char **argv)
 		Vect_delete_line(&Out, line);
 		Vect_delete_line(&Out, line);
 	    }
 	    }
 	}
 	}
-	Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(&Out, stderr);
-	else
-	    Vect_build(&Out, NULL);
+	Vect_build_partial(&Out, GV_BUILD_NONE);
+	Vect_build(&Out);
     }
     }
 
 
     Vect_close(&Out);
     Vect_close(&Out);

+ 2 - 6
vector/v.extrude/main.c

@@ -61,6 +61,7 @@ int main(int argc, char *argv[])
     dbColumn *column;
     dbColumn *column;
     dbValue *value;
     dbValue *value;
     int more;
     int more;
+    char *comment;
 
 
     module = G_define_module();
     module = G_define_module();
     module->keywords = _("vector, geometry, 3D");
     module->keywords = _("vector, geometry, 3D");
@@ -324,14 +325,9 @@ int main(int argc, char *argv[])
 	db_shutdown_driver(driver);
 	db_shutdown_driver(driver);
     }
     }
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out, stderr);
-    else
-	Vect_build(&Out, NULL);
+    Vect_build(&Out);
 
 
     /* header */
     /* header */
-    char *comment;
-
     G_asprintf(&comment, "Generated by %s from vector map <%s>",
     G_asprintf(&comment, "Generated by %s from vector map <%s>",
 	       G_program_name(), old->answer);
 	       G_program_name(), old->answer);
     Vect_set_comment(&Out, comment);
     Vect_set_comment(&Out, comment);

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

@@ -432,7 +432,7 @@ int main(int argc, char *argv[])
     /* remove incorrect boundaries
     /* remove incorrect boundaries
      * they may occur only if they were generalized */
      * they may occur only if they were generalized */
     if (mask_type & GV_BOUNDARY) {
     if (mask_type & GV_BOUNDARY) {
-	Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
+	Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
 	n_lines = Vect_get_num_lines(&Out);
 	n_lines = Vect_get_num_lines(&Out);
 	for (i = 1; i <= n_lines; i++) {
 	for (i = 1; i <= n_lines; i++) {
 	    type = Vect_read_line(&Out, Points, Cats, i);
 	    type = Vect_read_line(&Out, Points, Cats, i);
@@ -452,7 +452,7 @@ int main(int argc, char *argv[])
      * were generalized
      * were generalized
      */
      */
     if ((mask_type & GV_BOUNDARY) && method != DISPLACEMENT) {
     if ((mask_type & GV_BOUNDARY) && method != DISPLACEMENT) {
-	Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
+	Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
 	n_areas = Vect_get_num_areas(&Out);
 	n_areas = Vect_get_num_areas(&Out);
 	for (i = 1; i <= n_areas; i++) {
 	for (i = 1; i <= n_areas; i++) {
 	    /* skip dead area */
 	    /* skip dead area */
@@ -472,14 +472,11 @@ int main(int argc, char *argv[])
 
 
     /* remove small areas */
     /* remove small areas */
     if (rs_flag->answer && simplification && (mask_type & GV_AREA)) {
     if (rs_flag->answer && simplification && (mask_type & GV_AREA)) {
-	Vect_build_partial(&Out, GV_BUILD_CENTROIDS, NULL);
-	Vect_remove_small_areas(&Out, thresh, NULL, NULL, &slide);
+	Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
+	Vect_remove_small_areas(&Out, thresh, NULL, &slide);
     }
     }
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out, stderr);
-    else
-	Vect_build(&Out, NULL);
+    Vect_build(&Out);
 
 
     /* finally copy tables */
     /* finally copy tables */
     if (ca_flag->answer)
     if (ca_flag->answer)

+ 1 - 1
vector/v.hull/main.c

@@ -368,7 +368,7 @@ int main(int argc, char **argv)
 
 
 
 
     /* clean up and bye bye */
     /* clean up and bye bye */
-    Vect_build(&Map, stderr);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 2 - 2
vector/v.in.ascii/main.c

@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
     Vect_hist_command(&Map);
     Vect_hist_command(&Map);
 
 
     if (e_flag->answer) {
     if (e_flag->answer) {
-	Vect_build(&Map, stderr);
+	Vect_build(&Map);
 	Vect_close(&Map);
 	Vect_close(&Map);
 	exit(EXIT_SUCCESS);
 	exit(EXIT_SUCCESS);
     }
     }
@@ -535,7 +535,7 @@ int main(int argc, char *argv[])
 	Vect_close(&Map);
 	Vect_close(&Map);
     }
     }
     else {
     else {
-	Vect_build(&Map, stderr);
+	Vect_build(&Map);
 	Vect_close(&Map);
 	Vect_close(&Map);
     }
     }
 
 

+ 1 - 5
vector/v.in.db/main.c

@@ -223,11 +223,7 @@ int main(int argc, char *argv[])
 			    fi->database, fi->driver);
 			    fi->database, fi->driver);
     }
     }
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Map, stderr);
-    else
-	Vect_build(&Map, NULL);
-
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     G_done_msg(" ");
     G_done_msg(" ");

+ 1 - 1
vector/v.in.dxf/main.c

@@ -163,7 +163,7 @@ int main(int argc, char *argv[])
 	if (found_layers) {
 	if (found_layers) {
 	    if (Vect_open_old(Map, output, G_mapset())) {
 	    if (Vect_open_old(Map, output, G_mapset())) {
 		if (!flag_topo)
 		if (!flag_topo)
-		    if (!Vect_build(Map, stderr))
+		    if (!Vect_build(Map))
 			G_warning(_("Building topology failed"));
 			G_warning(_("Building topology failed"));
 		Vect_close(Map);
 		Vect_close(Map);
 	    }
 	    }

+ 15 - 22
vector/v.in.ogr/main.c

@@ -94,7 +94,6 @@ int main(int argc, char *argv[])
     int navailable_layers;
     int navailable_layers;
     int layer_id;
     int layer_id;
     int overwrite;
     int overwrite;
-    FILE *output;
 
 
     G_gisinit(argv[0]);
     G_gisinit(argv[0]);
 
 
@@ -246,11 +245,6 @@ int main(int argc, char *argv[])
 
 
     OGRRegisterAll();
     OGRRegisterAll();
 
 
-    if (G_verbose() > G_verbose_min())
-	output = stderr;
-    else
-	output = NULL;
-
     /* list supported formats */
     /* list supported formats */
     if (formats_flag->answer) {
     if (formats_flag->answer) {
 	int iDriver;
 	int iDriver;
@@ -888,7 +882,7 @@ int main(int argc, char *argv[])
     G_message("%s", separator);
     G_message("%s", separator);
 
 
     /* TODO: is it necessary to build here? probably not, consumes time */
     /* TODO: is it necessary to build here? probably not, consumes time */
-    Vect_build(&Map, output);
+    Vect_build(&Map);
 
 
     if (!no_clean_flag->answer &&
     if (!no_clean_flag->answer &&
 	Vect_get_num_primitives(&Map, GV_BOUNDARY) > 0) {
 	Vect_get_num_primitives(&Map, GV_BOUNDARY) > 0) {
@@ -908,12 +902,12 @@ int main(int argc, char *argv[])
 	Vect_set_release_support(&Map);
 	Vect_set_release_support(&Map);
 	Vect_close(&Map);
 	Vect_close(&Map);
 	Vect_open_update(&Map, out_opt->answer, G_mapset());
 	Vect_open_update(&Map, out_opt->answer, G_mapset());
-	Vect_build_partial(&Map, GV_BUILD_BASE, output);	/* Downgrade topo */
+	Vect_build_partial(&Map, GV_BUILD_BASE);	/* Downgrade topo */
 
 
 	if (snap >= 0) {
 	if (snap >= 0) {
 	    G_message("%s", separator);
 	    G_message("%s", separator);
 	    G_message(_("Snap boundaries (threshold = %.3e):"), snap);
 	    G_message(_("Snap boundaries (threshold = %.3e):"), snap);
-	    Vect_snap_lines(&Map, GV_BOUNDARY, snap, NULL, output);
+	    Vect_snap_lines(&Map, GV_BOUNDARY, snap, NULL);
 	}
 	}
 
 
 	/* It is not to clean to snap centroids, but I have seen data with 2 duplicate polygons
 	/* It is not to clean to snap centroids, but I have seen data with 2 duplicate polygons
@@ -927,12 +921,12 @@ int main(int argc, char *argv[])
 
 
 	G_message("%s", separator);
 	G_message("%s", separator);
 	G_message(_("Break polygons:"));
 	G_message(_("Break polygons:"));
-	Vect_break_polygons(&Map, GV_BOUNDARY, NULL, output);
+	Vect_break_polygons(&Map, GV_BOUNDARY, NULL);
 
 
 	/* It is important to remove also duplicate centroids in case of duplicate imput polygons */
 	/* It is important to remove also duplicate centroids in case of duplicate imput polygons */
 	G_message("%s", separator);
 	G_message("%s", separator);
 	G_message(_("Remove duplicates:"));
 	G_message(_("Remove duplicates:"));
-	Vect_remove_duplicates(&Map, GV_BOUNDARY | GV_CENTROID, NULL, output);
+	Vect_remove_duplicates(&Map, GV_BOUNDARY | GV_CENTROID, NULL);
 
 
 	/* Vect_clean_small_angles_at_nodes() can change the geometry so that new intersections
 	/* Vect_clean_small_angles_at_nodes() can change the geometry so that new intersections
 	 * are created. We must call Vect_break_lines(), Vect_remove_duplicates()
 	 * are created. We must call Vect_break_lines(), Vect_remove_duplicates()
@@ -940,42 +934,41 @@ int main(int argc, char *argv[])
 	do {
 	do {
 	    G_message("%s", separator);
 	    G_message("%s", separator);
 	    G_message(_("Break boundaries:"));
 	    G_message(_("Break boundaries:"));
-	    Vect_break_lines(&Map, GV_BOUNDARY, NULL, output);
+	    Vect_break_lines(&Map, GV_BOUNDARY, NULL);
 
 
 	    G_message("%s", separator);
 	    G_message("%s", separator);
 	    G_message(_("Remove duplicates:"));
 	    G_message(_("Remove duplicates:"));
-	    Vect_remove_duplicates(&Map, GV_BOUNDARY, NULL, output);
+	    Vect_remove_duplicates(&Map, GV_BOUNDARY, NULL);
 
 
 	    G_message("%s", separator);
 	    G_message("%s", separator);
 	    G_message(_("Clean boundaries at nodes:"));
 	    G_message(_("Clean boundaries at nodes:"));
 	    nmodif =
 	    nmodif =
-		Vect_clean_small_angles_at_nodes(&Map, GV_BOUNDARY, NULL,
-						 output);
+		Vect_clean_small_angles_at_nodes(&Map, GV_BOUNDARY, NULL);
 	} while (nmodif > 0);
 	} while (nmodif > 0);
 
 
 	G_message("%s", separator);
 	G_message("%s", separator);
 	if (type & GV_BOUNDARY) {	/* that means lines were converted boundaries */
 	if (type & GV_BOUNDARY) {	/* that means lines were converted boundaries */
 	    G_message(_("Change boundary dangles to lines:"));
 	    G_message(_("Change boundary dangles to lines:"));
-	    Vect_chtype_dangles(&Map, -1.0, NULL, output);
+	    Vect_chtype_dangles(&Map, -1.0, NULL);
 	}
 	}
 	else {
 	else {
 	    G_message(_("Change dangles to lines:"));
 	    G_message(_("Change dangles to lines:"));
-	    Vect_remove_dangles(&Map, GV_BOUNDARY, -1.0, NULL, output);
+	    Vect_remove_dangles(&Map, GV_BOUNDARY, -1.0, NULL);
 	}
 	}
 
 
 	G_message("%s", separator);
 	G_message("%s", separator);
 	if (type & GV_BOUNDARY) {
 	if (type & GV_BOUNDARY) {
 	    G_message(_("Change boundary bridges to lines:"));
 	    G_message(_("Change boundary bridges to lines:"));
-	    Vect_chtype_bridges(&Map, NULL, output);
+	    Vect_chtype_bridges(&Map, NULL);
 	}
 	}
 	else {
 	else {
 	    G_message(_("Remove bridges:"));
 	    G_message(_("Remove bridges:"));
-	    Vect_remove_bridges(&Map, NULL, output);
+	    Vect_remove_bridges(&Map, NULL);
 	}
 	}
 
 
 	/* Boundaries are hopefully clean, build areas */
 	/* Boundaries are hopefully clean, build areas */
 	G_message("%s", separator);
 	G_message("%s", separator);
-	Vect_build_partial(&Map, GV_BUILD_ATTACH_ISLES, output);
+	Vect_build_partial(&Map, GV_BUILD_ATTACH_ISLES);
 
 
 	/* Calculate new centroids for all areas, centroids have the same id as area */
 	/* Calculate new centroids for all areas, centroids have the same id as area */
 	ncentr = Vect_get_num_areas(&Map);
 	ncentr = Vect_get_num_areas(&Map);
@@ -1059,10 +1052,10 @@ int main(int argc, char *argv[])
 	if (Centr)
 	if (Centr)
 	    G_free(Centr);
 	    G_free(Centr);
 	G_message("%s", separator);
 	G_message("%s", separator);
-	Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
+	Vect_build_partial(&Map, GV_BUILD_NONE);
 
 
 	G_message("%s", separator);
 	G_message("%s", separator);
-	Vect_build(&Map, output);
+	Vect_build(&Map);
 
 
 	G_message("%s", separator);
 	G_message("%s", separator);
 
 

+ 1 - 1
vector/v.in.region/main.c

@@ -94,7 +94,7 @@ int main(int argc, char **argv)
 	Vect_write_line(&Out, GV_LINE, Points, Cats);
 	Vect_write_line(&Out, GV_LINE, Points, Cats);
     }
     }
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.in.sites/main.c

@@ -247,7 +247,7 @@ int main(int argc, char *argv[])
     db_close_database(driver);
     db_close_database(driver);
     db_shutdown_driver(driver);
     db_shutdown_driver(driver);
 
 
-    Vect_build(&Map, stderr);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     G_site_free_struct(s);
     G_site_free_struct(s);

+ 1 - 1
vector/v.kcv/main.c

@@ -253,7 +253,7 @@ int main(int argc, char *argv[])
 
 
     db_close_database_shutdown_driver(Driver);
     db_close_database_shutdown_driver(Driver);
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.kernel/main.c

@@ -384,7 +384,7 @@ int main(int argc, char **argv)
 
 
 	Vect_close(&Net);
 	Vect_close(&Net);
 
 
-	Vect_build(&Out, stderr);
+	Vect_build(&Out);
 	Vect_close(&Out);
 	Vect_close(&Out);
     }
     }
     else {
     else {

+ 2 - 2
vector/v.lrs/v.lrs.create/main.c

@@ -861,13 +861,13 @@ int main(int argc, char **argv)
     Vect_close(&PMap);
     Vect_close(&PMap);
 
 
     G_message(_("Building topology for output (out_lines) map..."));
     G_message(_("Building topology for output (out_lines) map..."));
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     /* Write errors */
     /* Write errors */
     if (err_opt->answer) {
     if (err_opt->answer) {
 	G_message(_("Building topology for error (err) map..."));
 	G_message(_("Building topology for error (err) map..."));
-	Vect_build(&EMap, stderr);
+	Vect_build(&EMap);
 	Vect_close(&EMap);
 	Vect_close(&EMap);
     }
     }
 
 

+ 1 - 1
vector/v.lrs/v.lrs.label/main.c

@@ -513,7 +513,7 @@ int main(int argc, char **argv)
     }
     }
 
 
     db_close_database(rsdriver);
     db_close_database(rsdriver);
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, close ... */
     /* Free, close ... */
     Vect_close(&In);
     Vect_close(&In);

+ 1 - 1
vector/v.lrs/v.lrs.segment/main.c

@@ -334,7 +334,7 @@ int main(int argc, char **argv)
     }
     }
 
 
     db_close_database(rsdriver);
     db_close_database(rsdriver);
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, close ... */
     /* Free, close ... */
     Vect_close(&In);
     Vect_close(&In);

+ 1 - 4
vector/v.mkgrid/main.c

@@ -276,10 +276,7 @@ int main(int argc, char *argv[])
 
 
     db_close_database_shutdown_driver(Driver);
     db_close_database_shutdown_driver(Driver);
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Map, stderr);
-    else
-	Vect_build(&Map, NULL);
+    Vect_build(&Map);
     Vect_close(&Map);
     Vect_close(&Map);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.net.alloc/main.c

@@ -360,7 +360,7 @@ int main(int argc, char **argv)
 	}
 	}
     }
     }
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, ... */
     /* Free, ... */
     G_free(Nodes);
     G_free(Nodes);

+ 1 - 1
vector/v.net.iso/main.c

@@ -520,7 +520,7 @@ int main(int argc, char **argv)
 	}
 	}
     }
     }
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, ... */
     /* Free, ... */
     G_free(Nodes);
     G_free(Nodes);

+ 1 - 1
vector/v.net.path/main.c

@@ -142,7 +142,7 @@ int main(int argc, char **argv)
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.net.salesman/main.c

@@ -371,7 +371,7 @@ int main(int argc, char **argv)
     }
     }
     fprintf(stdout, "\n\n");
     fprintf(stdout, "\n\n");
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, ... */
     /* Free, ... */
     Vect_destroy_list(StArcs);
     Vect_destroy_list(StArcs);

+ 1 - 1
vector/v.net.steiner/main.c

@@ -629,7 +629,7 @@ int main(int argc, char **argv)
 
 
     fprintf(stdout, "\n\n");
     fprintf(stdout, "\n\n");
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, ... */
     /* Free, ... */
     Vect_destroy_list(StArcs);
     Vect_destroy_list(StArcs);

+ 1 - 5
vector/v.net.visibility/main.c

@@ -118,11 +118,7 @@ int main(int argc, char *argv[])
     G_free(points);
     G_free(points);
     G_free(lines);
     G_free(lines);
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&out, stderr);
-    else
-	Vect_build(&out, NULL);
-
+    Vect_build(&out);
     Vect_close(&out);
     Vect_close(&out);
     Vect_close(&in);
     Vect_close(&in);
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.net/connect.c

@@ -54,7 +54,7 @@ int connect_arcs(struct Map_info *In, struct Map_info *Pnts,
 
 
     /* rewrite all primitives to output file */
     /* rewrite all primitives to output file */
     Vect_copy_map_lines(In, Out);
     Vect_copy_map_lines(In, Out);
-    Vect_build_partial(Out, GV_BUILD_BASE, NULL);
+    Vect_build_partial(Out, GV_BUILD_BASE);
 
 
     /* go thorough all points in point map and write a new arcs if missing */
     /* go thorough all points in point map and write a new arcs if missing */
     while ((type = Vect_read_next_line(Pnts, Points, Cats)) >= 0) {
     while ((type = Vect_read_next_line(Pnts, Points, Cats)) >= 0) {

+ 2 - 5
vector/v.net/main.c

@@ -185,11 +185,8 @@ int main(int argc, char **argv)
 	Vect_copy_tables(&In, &Out, 0);
 	Vect_copy_tables(&In, &Out, 0);
 
 
 	/* support */
 	/* support */
-	Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(&Out, stderr);
-	else
-	    Vect_build(&Out, NULL);
+	Vect_build_partial(&Out, GV_BUILD_NONE);
+	Vect_build(&Out);
 
 
 	Vect_close(&In);
 	Vect_close(&In);
 	Vect_close(&Out);
 	Vect_close(&Out);

+ 5 - 12
vector/v.overlay/area_area.c

@@ -29,13 +29,6 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Out,
     dbString stmt;
     dbString stmt;
     int nmodif;
     int nmodif;
 
 
-    FILE *output;
-
-    if (G_verbose() > G_verbose_min())
-	output = stderr;
-    else
-	output = NULL;
-
     Points = Vect_new_line_struct();
     Points = Vect_new_line_struct();
     Cats = Vect_new_cats_struct();
     Cats = Vect_new_cats_struct();
 
 
@@ -44,15 +37,15 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Out,
      * and Vect_clean_small_angles_at_nodes() until no more small dangles are found */
      * and Vect_clean_small_angles_at_nodes() until no more small dangles are found */
     do {
     do {
 	G_message(_("Breaking lines..."));
 	G_message(_("Breaking lines..."));
-	Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, output);
+	Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL);
 
 
 	/* Probably not necessary for LINE x AREA */
 	/* Probably not necessary for LINE x AREA */
 	G_message(_("Removing duplicates..."));
 	G_message(_("Removing duplicates..."));
-	Vect_remove_duplicates(Out, GV_BOUNDARY, NULL, output);
+	Vect_remove_duplicates(Out, GV_BOUNDARY, NULL);
 
 
 	G_message(_("Cleaning boundaries at nodes..."));
 	G_message(_("Cleaning boundaries at nodes..."));
 	nmodif =
 	nmodif =
-	    Vect_clean_small_angles_at_nodes(Out, GV_BOUNDARY, NULL, output);
+	    Vect_clean_small_angles_at_nodes(Out, GV_BOUNDARY, NULL);
     } while (nmodif > 0);
     } while (nmodif > 0);
 
 
     /* ?: May be result of Vect_break_lines() + Vect_remove_duplicates() any dangle or bridge?
     /* ?: May be result of Vect_break_lines() + Vect_remove_duplicates() any dangle or bridge?
@@ -60,7 +53,7 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Out,
 
 
     /* Attach islands */
     /* Attach islands */
     G_message(_("Attaching islands..."));
     G_message(_("Attaching islands..."));
-    Vect_build_partial(Out, GV_BUILD_ATTACH_ISLES, output);
+    Vect_build_partial(Out, GV_BUILD_ATTACH_ISLES);
 
 
 
 
     /* Calculate new centroids for all areas */
     /* Calculate new centroids for all areas */
@@ -269,7 +262,7 @@ int area_area(struct Map_info *In, int *field, struct Map_info *Out,
 
 
     /* Build topology and remove boundaries with area without centroid on both sides */
     /* Build topology and remove boundaries with area without centroid on both sides */
     G_message(_("Attaching centroids..."));
     G_message(_("Attaching centroids..."));
-    Vect_build_partial(Out, GV_BUILD_ALL, output);
+    Vect_build_partial(Out, GV_BUILD_ALL);
 
 
     /* Create a list of lines to be deleted */
     /* Create a list of lines to be deleted */
     nlines = Vect_get_num_lines(Out);
     nlines = Vect_get_num_lines(Out);

+ 2 - 5
vector/v.overlay/line_area.c

@@ -67,13 +67,10 @@ int line_area(struct Map_info *In, int *field, struct Map_info *Out,
     db_init_string(&stmt);
     db_init_string(&stmt);
 
 
     G_message(_("Breaking lines..."));
     G_message(_("Breaking lines..."));
-    if (G_verbose() > G_verbose_min())
-	Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, stderr);
-    else
-	Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, NULL);
+    Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL);
 
 
     /* Basic topology needed only */
     /* Basic topology needed only */
-    Vect_build_partial(Out, GV_BUILD_BASE, NULL);
+    Vect_build_partial(Out, GV_BUILD_BASE);
 
 
     nlines = Vect_get_num_lines(Out);
     nlines = Vect_get_num_lines(Out);
 
 

+ 3 - 6
vector/v.overlay/main.c

@@ -461,7 +461,7 @@ int main(int argc, char *argv[])
 
 
     G_message(_("Building partial topology..."));
     G_message(_("Building partial topology..."));
     /* do not print output, because befor cleaning it is nonsense */
     /* do not print output, because befor cleaning it is nonsense */
-    Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
+    Vect_build_partial(&Out, GV_BUILD_BASE);
 
 
     /* AREA x AREA */
     /* AREA x AREA */
     if (type[0] == GV_AREA) {
     if (type[0] == GV_AREA) {
@@ -472,11 +472,8 @@ int main(int argc, char *argv[])
     }
     }
 
 
     G_message(_("Rebuilding topology..."));
     G_message(_("Rebuilding topology..."));
-    Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out, stderr);
-    else
-	Vect_build(&Out, NULL);
+    Vect_build_partial(&Out, GV_BUILD_NONE);
+    Vect_build(&Out);
     /* Build topology to show the final result and prepare for Vect_close() */
     /* Build topology to show the final result and prepare for Vect_close() */
 
 
     if (driver) {
     if (driver) {

+ 1 - 1
vector/v.parallel/main.c

@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     Vect_close(&In);
     Vect_close(&In);
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 2 - 10
vector/v.patch/main.c

@@ -353,11 +353,7 @@ int main(int argc, char *argv[])
     Vect_set_map_name(&OutMap, "Output from v.patch");
     Vect_set_map_name(&OutMap, "Output from v.patch");
     Vect_set_person(&OutMap, G_whoami());
     Vect_set_person(&OutMap, G_whoami());
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&OutMap, stderr);
-    else
-	Vect_build(&OutMap, NULL);
-
+    Vect_build(&OutMap);
     Vect_close(&OutMap);
     Vect_close(&OutMap);
 
 
     if (bbox_name) {
     if (bbox_name) {
@@ -366,11 +362,7 @@ int main(int argc, char *argv[])
 	G_important_message("");
 	G_important_message("");
 	G_important_message(_("Building topology for vector map <%s>..."),
 	G_important_message(_("Building topology for vector map <%s>..."),
 			    bbox_name);
 			    bbox_name);
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(&BBoxMap, stderr);
-	else
-	    Vect_build(&BBoxMap, NULL);
-
+	Vect_build(&BBoxMap);
 	Vect_close(&BBoxMap);
 	Vect_close(&BBoxMap);
     }
     }
 
 

+ 1 - 1
vector/v.perturb/main.c

@@ -241,7 +241,7 @@ int main(int argc, char **argv)
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     return (EXIT_SUCCESS);
     return (EXIT_SUCCESS);

+ 1 - 5
vector/v.proj/main.c

@@ -279,11 +279,7 @@ int main(int argc, char *argv[])
 
 
     Vect_close(&Map);
     Vect_close(&Map);
 
 
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&Out_Map, stderr);
-    else
-	Vect_build(&Out_Map, NULL);
-
+    Vect_build(&Out_Map);
     Vect_close(&Out_Map);
     Vect_close(&Out_Map);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.qcount/main.c

@@ -147,7 +147,7 @@ int main(int argc, char **argv)
 	    Vect_write_line(&Out, GV_POINT, Points, Cats);
 	    Vect_write_line(&Out, GV_POINT, Points, Cats);
 	}
 	}
 
 
-	Vect_build(&Out, stderr);
+	Vect_build(&Out);
 	Vect_close(&Out);
 	Vect_close(&Out);
 
 
     }
     }

+ 1 - 4
vector/v.random/main.c

@@ -296,10 +296,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     if (!flag.notopo->answer) {
     if (!flag.notopo->answer) {
-	if (G_verbose() > G_verbose_min())
-	    Vect_build(&Out, stderr);
-	else
-	    Vect_build(&Out, NULL);
+	Vect_build(&Out);
     }
     }
     Vect_close(&Out);
     Vect_close(&Out);
 
 

+ 1 - 1
vector/v.reclass/main.c

@@ -414,7 +414,7 @@ int main(int argc, char *argv[])
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     G_message(_("%d features reclassed"), rclelem);
     G_message(_("%d features reclassed"), rclelem);

+ 1 - 1
vector/v.sample/main.c

@@ -283,7 +283,7 @@ int main(int argc, char **argv)
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 7
vector/v.segment/main.c

@@ -228,13 +228,7 @@ int main(int argc, char **argv)
     G_message(_("%d lines written to output map (%d lost)"),
     G_message(_("%d lines written to output map (%d lost)"),
 	      lines_written, lines_read - lines_written);
 	      lines_written, lines_read - lines_written);
 
 
-    if (G_verbose() > G_verbose_min()) {
-	Vect_build(&Out, stderr);
-    }
-    else {
-	Vect_build(&Out, NULL);
-    }
-
+    Vect_build(&Out);
     /* Free, close ... */
     /* Free, close ... */
     Vect_close(&In);
     Vect_close(&In);
     Vect_close(&Out);
     Vect_close(&Out);

+ 1 - 1
vector/v.select/main.c

@@ -509,7 +509,7 @@ int main(int argc, char *argv[])
 
 
     Vect_close(&(In[0]));
     Vect_close(&(In[0]));
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     G_done_msg(" ");
     G_done_msg(" ");

+ 1 - 1
vector/v.split/main.c

@@ -183,7 +183,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     Vect_close(&In);
     Vect_close(&In);
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(0);
     exit(0);

+ 3 - 3
vector/v.surf.rst/main.c

@@ -597,7 +597,7 @@ int main(int argc, char *argv[])
 	   TreeMap.head.plani_zone = G_zone ();
 	   TreeMap.head.plani_zone = G_zone ();
 	 */
 	 */
 	print_tree(root, x_orig, y_orig, &TreeMap);
 	print_tree(root, x_orig, y_orig, &TreeMap);
-	Vect_build(&TreeMap, NULL);
+	Vect_build(&TreeMap);
 	Vect_close(&TreeMap);
 	Vect_close(&TreeMap);
     }
     }
 
 
@@ -691,7 +691,7 @@ int main(int argc, char *argv[])
 	   OverMap.head.plani_zone = G_zone ();
 	   OverMap.head.plani_zone = G_zone ();
 	 */
 	 */
 	print_tree(root, x_orig, y_orig, &OverMap);
 	print_tree(root, x_orig, y_orig, &OverMap);
-	Vect_build(&OverMap, NULL);
+	Vect_build(&OverMap);
 	Vect_close(&OverMap);
 	Vect_close(&OverMap);
     }
     }
 
 
@@ -711,7 +711,7 @@ int main(int argc, char *argv[])
     if (cvdev != NULL || devi != NULL) {
     if (cvdev != NULL || devi != NULL) {
 	/*  db_close_database_shutdown_driver ( driver2 ); */
 	/*  db_close_database_shutdown_driver ( driver2 ); */
 	db_close_database(driver2);
 	db_close_database(driver2);
-	Vect_build(&Map2, stderr);
+	Vect_build(&Map2);
 	Vect_close(&Map2);
 	Vect_close(&Map2);
     }
     }
 
 

+ 1 - 1
vector/v.to.points/main.c

@@ -367,7 +367,7 @@ int main(int argc, char **argv)
 	db_close_database_shutdown_driver(driver);
 	db_close_database_shutdown_driver(driver);
     }
     }
 
 
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
 
 
     /* Free, close ... */
     /* Free, close ... */
     Vect_close(&In);
     Vect_close(&In);

+ 1 - 5
vector/v.transform/main.c

@@ -338,11 +338,7 @@ int main(int argc, char *argv[])
 
 
     Vect_copy_tables(&Old, &New, 0);
     Vect_copy_tables(&Old, &New, 0);
     Vect_close(&Old);
     Vect_close(&Old);
-
-    if (G_verbose() > G_verbose_min())
-	Vect_build(&New, stderr);
-    else
-	Vect_build(&New, NULL);
+    Vect_build(&New);
 
 
     if (!quiet_flag->answer) {
     if (!quiet_flag->answer) {
 	Vect_get_map_box(&New, &box);
 	Vect_get_map_box(&New, &box);

+ 1 - 1
vector/v.type/main.c

@@ -226,7 +226,7 @@ int main(int argc, char *argv[])
     }
     }
 
 
     Vect_copy_tables(&In, &Out, 0);
     Vect_copy_tables(&In, &Out, 0);
-    Vect_build(&Out, stderr);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
     Vect_close(&In);
     Vect_close(&In);
 
 

+ 1 - 1
vector/v.vol.rst/main.c

@@ -885,7 +885,7 @@ int main(int argc, char *argv[])
 
 
 	    if (cvdev != NULL || devi != NULL) {
 	    if (cvdev != NULL || devi != NULL) {
 		db_close_database_shutdown_driver(driver);
 		db_close_database_shutdown_driver(driver);
-		Vect_build(&Map, stderr);
+		Vect_build(&Map);
 		Vect_close(&Map);
 		Vect_close(&Map);
 	    }
 	    }
 
 

+ 4 - 4
vector/v.voronoi/dt_main.c

@@ -98,7 +98,7 @@ int main(int argc, char **argv)
     Vect_hist_copy(&In, &Out);
     Vect_hist_copy(&In, &Out);
     Vect_hist_command(&Out);
     Vect_hist_command(&Out);
 
 
-    Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
+    Vect_build_partial(&Out, GV_BUILD_BASE);
 
 
     /* initialize working region */
     /* initialize working region */
     G_get_window(&Window);
     G_get_window(&Window);
@@ -119,7 +119,7 @@ int main(int argc, char **argv)
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
+    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
 
 
     nareas = Vect_get_num_areas(&Out);
     nareas = Vect_get_num_areas(&Out);
     G_debug(3, "nareas = %d", nareas);
     G_debug(3, "nareas = %d", nareas);
@@ -150,8 +150,8 @@ int main(int argc, char **argv)
 	Vect_write_line(&Out, GV_CENTROID, Points, Cats);
 	Vect_write_line(&Out, GV_CENTROID, Points, Cats);
     }
     }
 
 
-    Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-    Vect_build(&Out, stderr);
+    Vect_build_partial(&Out, GV_BUILD_NONE);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 3 - 3
vector/v.voronoi/vo_main.c

@@ -177,7 +177,7 @@ int main(int argc, char **argv)
     voronoi(triangulate, nextone);
     voronoi(triangulate, nextone);
 
 
     /* Close free ends by cyrrent region */
     /* Close free ends by cyrrent region */
-    Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
+    Vect_build_partial(&Out, GV_BUILD_BASE);
 
 
     ncoor = 0;
     ncoor = 0;
     acoor = 100;
     acoor = 100;
@@ -346,8 +346,8 @@ int main(int argc, char **argv)
 
 
     Vect_close(&In);
     Vect_close(&In);
 
 
-    Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
-    Vect_build(&Out, stderr);
+    Vect_build_partial(&Out, GV_BUILD_NONE);
+    Vect_build(&Out);
     Vect_close(&Out);
     Vect_close(&Out);
 
 
     exit(EXIT_SUCCESS);
     exit(EXIT_SUCCESS);

+ 1 - 1
vector/v.what/main.c

@@ -137,7 +137,7 @@ int main(int argc, char **argv)
 			      vect[i]);
 			      vect[i]);
 
 
 	    G_verbose_message(_("Building spatial index..."));
 	    G_verbose_message(_("Building spatial index..."));
-	    Vect_build_spatial_index(&Map[i], NULL);
+	    Vect_build_spatial_index(&Map[i]);
 	}
 	}
     }
     }