Changeset 34288


Ignore:
Timestamp:
Nov 14, 2008, 7:30:19 AM (16 years ago)
Author:
neteler
Message:

glynn: Eliminate non-standard logging mechanism (merge from trunk, r34284)

Location:
grass/branches/develbranch_6
Files:
87 edited

Legend:

Unmodified
Added
Removed
  • grass/branches/develbranch_6/gui/wxpython/vdigit/driver.cpp

    r33537 r34288  
    105105        if (mapInfo->mode == GV_MODE_RW) {
    106106            /* rebuild topology */
    107             Vect_build_partial(mapInfo, GV_BUILD_NONE, NULL);
    108             Vect_build(mapInfo, NULL);
     107            Vect_build_partial(mapInfo, GV_BUILD_NONE);
     108            Vect_build(mapInfo);
    109109        }
    110110        /* close map and store topo/cidx */
  • grass/branches/develbranch_6/gui/wxpython/vdigit/line.cpp

    r33588 r34288  
    604604   
    605605    ret = Vect_break_lines_list(display->mapInfo, display->selected.values, NULL,
    606                                 GV_LINES, NULL, NULL);
     606                                GV_LINES, NULL);
    607607
    608608    if (ret > 0) {
     
    640640   
    641641    Vect_snap_lines_list (display->mapInfo, display->selected.values,
    642                           thresh, NULL, NULL);
     642                          thresh, NULL);
    643643
    644644    if (nlines < Vect_get_num_lines(display->mapInfo)) {
     
    958958
    959959    ret = Vect_break_lines_list(display->mapInfo, listBreak, listRef,
    960                                 GV_LINES, NULL, NULL);
     960                                GV_LINES, NULL);
    961961
    962962    for (int i = 0; i < listBreak->n_values; i++) {     
  • grass/branches/develbranch_6/include/Vect.h

    r33533 r34288  
    195195int Vect_open_update_head(struct Map_info *, const char *, const char *);
    196196int Vect_copy_head_data(struct Map_info *, struct Map_info *);
    197 int Vect_build(struct Map_info *, FILE *);
     197int Vect_build(struct Map_info *);
    198198int Vect_get_built(struct Map_info *);
    199 int Vect_build_partial(struct Map_info *, int, FILE *);
     199int Vect_build_partial(struct Map_info *, int);
    200200int Vect_set_constraint_region(struct Map_info *, double, double, double,
    201201                               double, double, double);
     
    297297
    298298/* Cleaning */
    299 void Vect_break_lines(struct Map_info *, int, struct Map_info *, FILE *);
     299void Vect_break_lines(struct Map_info *, int, struct Map_info *);
    300300int Vect_break_lines_list(struct Map_info *, struct ilist *, struct ilist *,
    301                           int, struct Map_info *, FILE *);
    302 void Vect_break_polygons(struct Map_info *, int, struct Map_info *, FILE *);
    303 void Vect_remove_duplicates(struct Map_info *, int, struct Map_info *,
    304                             FILE *);
     301                          int, struct Map_info *);
     302void Vect_break_polygons(struct Map_info *, int, struct Map_info *);
     303void Vect_remove_duplicates(struct Map_info *, int, struct Map_info *);
    305304int Vect_line_check_duplicate(const struct line_pnts *,
    306305                              const struct line_pnts *, int);
    307 void Vect_snap_lines(struct Map_info *, int, double, struct Map_info *,
    308                      FILE *);
     306void Vect_snap_lines(struct Map_info *, int, double, struct Map_info *);
    309307void Vect_snap_lines_list(struct Map_info *, struct ilist *, double,
    310                           struct Map_info *, FILE *);
    311 void Vect_remove_dangles(struct Map_info *, int, double, struct Map_info *,
    312                          FILE *);
    313 void Vect_chtype_dangles(struct Map_info *, double, struct Map_info *,
    314                          FILE *);
    315 void Vect_select_dangles(struct Map_info *, int, double, FILE *,
    316                          struct ilist *);
    317 void Vect_remove_bridges(struct Map_info *, struct Map_info *, FILE *);
    318 void Vect_chtype_bridges(struct Map_info *, struct Map_info *, FILE *);
     308                          struct Map_info *);
     309void Vect_remove_dangles(struct Map_info *, int, double, struct Map_info *);
     310void Vect_chtype_dangles(struct Map_info *, double, struct Map_info *);
     311void Vect_select_dangles(struct Map_info *, int, double, struct ilist *);
     312void Vect_remove_bridges(struct Map_info *, struct Map_info *);
     313void Vect_chtype_bridges(struct Map_info *, struct Map_info *);
    319314int Vect_remove_small_areas(struct Map_info *, double, struct Map_info *,
    320                             FILE *, double *);
     315                            double *);
    321316int Vect_clean_small_angles_at_nodes(struct Map_info *, int,
    322                                      struct Map_info *, FILE *);
     317                                     struct Map_info *);
    323318
    324319/* Overlay */
     
    361356int Vect_option_to_types(struct Option *);
    362357int Vect_copy_map_lines(struct Map_info *, struct Map_info *);
    363 int Vect_copy(const char *, const char *, const char *, FILE *);
    364 int Vect_rename(const char *, const char *, FILE *);
     358int Vect_copy(const char *, const char *, const char *);
     359int Vect_rename(const char *, const char *);
    365360int Vect_copy_table(struct Map_info *, struct Map_info *, int, int,
    366361                    const char *, int);
     
    393388int Vect_save_spatial_index(struct Map_info *);
    394389int Vect_spatial_index_dump(struct Map_info *, FILE *);
    395 int Vect_build_sidx_from_topo(struct Map_info *, FILE *);
    396 int Vect_build_spatial_index(struct Map_info *, FILE *);
     390int Vect_build_sidx_from_topo(struct Map_info *);
     391int Vect_build_spatial_index(struct Map_info *);
    397392
    398393int Vect__write_head(struct Map_info *);
     
    448443
    449444    /* Miscellaneous */
    450 int Vect_build_nat(struct Map_info *, int, FILE *);
    451 int Vect_build_ogr(struct Map_info *, int, FILE *);
     445int Vect_build_nat(struct Map_info *, int);
     446int Vect_build_ogr(struct Map_info *, int);
    452447int Vect_build_line_area(struct Map_info *, int, int);
    453448int Vect_isle_find_area(struct Map_info *, int);
  • grass/branches/develbranch_6/lib/sites/sites.c

    r34143 r34288  
    493493
    494494    if (Map->mode == GV_MODE_WRITE || Map->mode == GV_MODE_RW)
    495         Vect_build(Map, stderr);
     495        Vect_build(Map);
    496496
    497497    Vect_close(Map);
  • grass/branches/develbranch_6/lib/vector/Vlib/break_lines.c

    r33779 r34288  
    2929   \param type feature type
    3030   \param[out] Err vector map where points at intersections will be written or NULL
    31    \param[out] msgout file pointer where messages will be written or NULL
    3231
    3332   \return
     
    3534
    3635void
    37 Vect_break_lines(struct Map_info *Map, int type, struct Map_info *Err,
    38                  FILE * msgout)
     36Vect_break_lines(struct Map_info *Map, int type, struct Map_info *Err)
    3937{
    40     Vect_break_lines_list(Map, NULL, NULL, type, Err, msgout);
     38    Vect_break_lines_list(Map, NULL, NULL, type, Err);
    4139
    4240    return;
     
    6159   \param type feature type
    6260   \param[out] Err vector map where points at intersections will be written or NULL
    63    \param[out] msgout file pointer where messages will be written or NULL
    6461
    6562   \return number of intersections
     
    6865int
    6966Vect_break_lines_list(struct Map_info *Map, struct ilist *List_break,
    70                       struct ilist *List_ref, int type, struct Map_info *Err,
    71                       FILE * msgout)
     67                      struct ilist *List_ref, int type, struct Map_info *Err)
    7268{
    7369    struct line_pnts *APoints, *BPoints, *Points;
     
    8581    int node, anode1, anode2, bnode1, bnode2;
    8682    double nodex, nodey;
    87     int printed;
    8883
    8984    APoints = Vect_new_line_struct();
     
    117112     */
    118113    nbreaks = 0;
    119     printed = 0;
    120 
    121     if (msgout)
    122         fprintf(msgout, _("%s %5d"), _("Intersections:"), nbreaks);
     114
     115    G_verbose_message(_("Intersections: %5d"), nbreaks);
    123116
    124117    for (iline = 0; iline < nlines; iline++) {
     
    362355                G_free(zx);
    363356            }
    364 
    365             if (msgout && printed > 1000) {
    366                 fprintf(msgout, "\r%s %5d (line %d)", _("Intersections:"),
    367                         nbreaks, aline);
    368                 fflush(msgout);
    369                 printed = 0;
    370             }
    371             printed++;
    372357            if (naxlines > 0)
    373358                break;          /* first line was broken and deleted -> take the next one */
     
    383368    }                           /* for each line */
    384369
    385     if (msgout)
    386         fprintf(msgout, "\r%s %5d                        \n",
    387                 _("Intersections:"), nbreaks);
     370    G_verbose_message(_("Intersections: %5d"), nbreaks);
    388371
    389372    Vect_destroy_list(List);
  • grass/branches/develbranch_6/lib/vector/Vlib/break_polygons.c

    r33605 r34288  
    5656   \param type type of line to be broken
    5757   \param Err vector map where points at intersections will be written or NULL
    58    \param msgout file pointer where messages will be written or NULL
    5958
    6059   \return
    6160 */
    6261void
    63 Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err,
    64                     FILE * msgout)
     62Vect_break_polygons(struct Map_info *Map, int type, struct Map_info *Err)
    6563{
    6664    struct line_pnts *BPoints, *Points;
     
    7472    double dx, dy, a1 = 0, a2 = 0;
    7573    int closed, last_point, cross;
    76     int printed;
    7774
    7875    RTree = RTreeNewIndex();
     
    9491    XPnts = NULL;
    9592
    96     printed = 0;
    9793    for (i = 1; i <= nlines; i++) {
    9894        G_debug(3, "i =  %d", i);
     
    211207            }
    212208        }
    213         if (msgout && printed > 5000) {
    214             fprintf(msgout, "\r%s %d", _("Registering points"), npoints - 1);
    215             fflush(msgout);
    216             printed = 0;
    217         }
    218         printed++;
    219209    }
    220     if (msgout) {
    221         fprintf(msgout, "\r%s %d", _("Registering points"), npoints - 1);
    222         fprintf(msgout, "\n");
    223         fprintf(msgout, "%s: %5d\n", _("All points (vertices)"), nallpoints);
    224         fprintf(msgout, "%s: %5d\n",
    225                 _("Registered points (unique coordinates)"), npoints - 1);
    226         fprintf(msgout, "%s: %5d\n", _("Points marked for break"), nmarks);
    227     }
    228210
    229211    /* G_sleep (10); */
    230212
    231213    nbreaks = 0;
    232     if (msgout)
    233         fprintf(msgout, "%s: %5d", _("Breaks"), nbreaks);
    234     printed = 0;
    235214
    236215    /* Second loop through lines (existing when loop is started, no need to process lines written again)
     
    306285                nbreaks++;
    307286            }
    308 
    309             if (msgout && printed > 1000) {
    310                 fprintf(msgout, "\r%s: %5d", _("Breaks"), nbreaks);
    311                 fflush(msgout);
    312                 printed = 0;
    313             }
    314             printed++;
    315287        }
    316288        if (!broken && n_orig_points > Points->n_points) {      /* was pruned before -> rewrite */
     
    329301        }
    330302    }
    331 
    332     if (msgout)
    333         fprintf(msgout, "\r%s: %5d", _("Breaks"), nbreaks);
    334303
    335304    /* Write points on breaks */
     
    345314    }
    346315
    347     if (msgout)
    348         fprintf(msgout, "\n");
    349 
    350316    G_free(XPnts);
    351317    RTreeDestroyNode(RTree);
  • grass/branches/develbranch_6/lib/vector/Vlib/bridges.c

    r33605 r34288  
    2424
    2525static void
    26 remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
    27                FILE * msgout);
     26remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err);
    2827
    2928/*!
     
    3837   \param Map input map where bridges are deleted
    3938   \param Err vector map where deleted bridges are written or NULL
    40    \param msgout file pointer where messages will be written or NULL
    4139
    4240   \return
     
    4442
    4543void
    46 Vect_remove_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
     44Vect_remove_bridges(struct Map_info *Map, struct Map_info *Err)
    4745{
    48     remove_bridges(Map, 0, Err, msgout);
     46    remove_bridges(Map, 0, Err);
    4947}
    5048
     
    6058   \param Map input map where bridges are changed
    6159   \param Err vector map where changed bridges are written or NULL
    62    \param msgout file pointer where messages will be written or NULL
    6360
    6461   \return
     
    6663
    6764void
    68 Vect_chtype_bridges(struct Map_info *Map, struct Map_info *Err, FILE * msgout)
     65Vect_chtype_bridges(struct Map_info *Map, struct Map_info *Err)
    6966{
    70     remove_bridges(Map, 1, Err, msgout);
     67    remove_bridges(Map, 1, Err);
    7168}
    7269
     
    8582 */
    8683void
    87 remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err,
    88                FILE * msgout)
     84remove_bridges(struct Map_info *Map, int chtype, struct Map_info *Err)
    8985{
    9086    int i, type, nlines, line;
     
    116112
    117113    G_debug(1, "nlines =  %d", nlines);
    118 
    119     if (msgout)
    120         fprintf(msgout, "%s: %5d  %s: %5d",
    121                 _("Removed bridges"), bridges_removed, lmsg, lines_removed);
    122114
    123115    for (line = 1; line <= nlines; line++) {
     
    197189            bridges_removed++;
    198190        }
    199 
    200         if (msgout) {
    201             fprintf(msgout, "\r%s: %5d  %s: %5d",
    202                     _("Removed bridges"), bridges_removed, lmsg,
    203                     lines_removed);
    204             fflush(msgout);
    205         }
    206     }
    207     if (msgout) {
    208         fprintf(msgout, "\r%s: %5d  %s: %5d",
    209                 _("Removed bridges"), bridges_removed, lmsg, lines_removed);
    210         fprintf(msgout, "\n");
    211191    }
    212192}
  • grass/branches/develbranch_6/lib/vector/Vlib/build.c

    r33641 r34288  
    4343};
    4444
    45 FILE *Msgout = NULL;
    46 
    47 
    48 int prnmsg(char *msg, ...)
    49 {
    50     char buffer[1000];
    51     va_list ap;
    52 
    53     if (G_verbose() == G_verbose_min())
    54         return 1;
    55    
    56     if (Msgout != NULL) {
    57         va_start(ap, msg);
    58         vsprintf(buffer, msg, ap);
    59         va_end(ap);
    60         fprintf(Msgout, "%s", buffer);
    61         fflush(Msgout);
    62     }
    63 
    64     return 1;
    65 }
    66 
    6745/*!
    6846   \brief Build topology for vector map
    6947
    7048   \param Map vector map
    71    \param msgout file for message output (stdout/stderr for example) or NULL
    7249
    7350   \return 1 on success
    7451   \return 0 on error
    7552 */
    76 int Vect_build(struct Map_info *Map, FILE * msgout)
    77 {
    78     return Vect_build_partial(Map, GV_BUILD_ALL, msgout);
     53int Vect_build(struct Map_info *Map)
     54{
     55    return Vect_build_partial(Map, GV_BUILD_ALL);
    7956}
    8057
     
    125102   \param Map vector map
    126103   \param build highest level of build
    127    \param msgout file pointer for message output (stdout/stderr for example) or NULL
    128104
    129105   \return 1 on success, 0 on error
    130106 */
    131 int Vect_build_partial(struct Map_info *Map, int build, FILE * msgout)
     107int Vect_build_partial(struct Map_info *Map, int build)
    132108{
    133109    struct Plus_head *plus;
     
    135111
    136112    G_debug(3, "Vect_build(): build = %d", build);
    137     Msgout = msgout;
    138113
    139114    /* If topology is already build (map on level2), set level to 1 so that lines will
     
    145120
    146121    plus = &(Map->plus);
    147     prnmsg(_("Building topology for vector map <%s>...\n"),
    148            Vect_get_name(Map));
     122    G_verbose_message(_("Building topology for vector map <%s>..."),
     123                      Vect_get_name(Map));
    149124    plus->with_z = Map->head.with_z;
    150125    plus->spidx_with_z = Map->head.with_z;
     
    155130    }
    156131
    157     ret = ((*Build_array[Map->format]) (Map, build, msgout));
     132    ret = ((*Build_array[Map->format]) (Map, build));
    158133
    159134    if (ret == 0) {
     
    161136    }
    162137
    163     prnmsg(_("Topology was built\n"));
     138    G_verbose_message(_("Topology was built"));
    164139
    165140    Map->level = LEVEL_2;
     
    171146    }
    172147
    173     /* prnmsg ("Topology was built.\n") ; */
    174 
    175     prnmsg(_("Number of nodes     :   %d\n"), plus->n_nodes);
    176     prnmsg(_("Number of primitives:   %d\n"), plus->n_lines);
    177     prnmsg(_("Number of points    :   %d\n"), plus->n_plines);
    178     prnmsg(_("Number of lines     :   %d\n"), plus->n_llines);
    179     prnmsg(_("Number of boundaries:   %d\n"), plus->n_blines);
    180     prnmsg(_("Number of centroids :   %d\n"), plus->n_clines);
     148    G_verbose_message(_("Number of nodes: %d"), plus->n_nodes);
     149    G_verbose_message(_("Number of primitives: %d"), plus->n_lines);
     150    G_verbose_message(_("Number of points: %d"), plus->n_plines);
     151    G_verbose_message(_("Number of lines: %d"), plus->n_llines);
     152    G_verbose_message(_("Number of boundaries: %d"), plus->n_blines);
     153    G_verbose_message(_("Number of centroids: %d"), plus->n_clines);
    181154
    182155    if (plus->n_flines > 0)
    183         prnmsg(_("Number of faces     :   %d\n"), plus->n_flines);
     156        G_verbose_message(_("Number of faces: %d"), plus->n_flines);
    184157
    185158    if (plus->n_klines > 0)
    186         prnmsg(_("Number of kernels   :   %d\n"), plus->n_klines);
     159        G_verbose_message(_("Number of kernels: %d"), plus->n_klines);
    187160
    188161    if (plus->built >= GV_BUILD_AREAS) {
     
    224197        }
    225198
    226         prnmsg(_("Number of areas     :   %d\n"), plus->n_areas);
    227         prnmsg(_("Number of isles     :   %d\n"), plus->n_isles);
     199        G_verbose_message(_("Number of areas: %d"), plus->n_areas);
     200        G_verbose_message(_("Number of isles: %d"), plus->n_isles);
    228201
    229202        if (err_boundaries)
    230             prnmsg(_("Number of incorrect boundaries   :   %d\n"),
    231                    err_boundaries);
     203            G_verbose_message(_("Number of incorrect boundaries: %d"),
     204                              err_boundaries);
    232205
    233206        if (err_centr_out)
    234             prnmsg(_("Number of centroids outside area :   %d\n"),
    235                    err_centr_out);
     207            G_verbose_message(_("Number of centroids outside area: %d"),
     208                              err_centr_out);
    236209
    237210        if (err_centr_dupl)
    238             prnmsg(_("Number of duplicate centroids    :   %d\n"),
    239                    err_centr_dupl);
     211            G_verbose_message(_("Number of duplicate centroids: %d"),
     212                              err_centr_dupl);
    240213
    241214        if (err_nocentr)
    242             prnmsg(_("Number of areas without centroid :   %d\n"),
    243                    err_nocentr);
     215            G_verbose_message(_("Number of areas without centroid: %d"),
     216                              err_nocentr);
    244217
    245218    }
    246219    else {
    247         prnmsg(_("Number of areas     :   -\n"));
    248         prnmsg(_("Number of isles     :   -\n"));
     220        G_verbose_message(_("Number of areas: -"));
     221        G_verbose_message(_("Number of isles: -"));
    249222    }
    250223    return 1;
     
    455428{
    456429    if (!(Map->plus.Spidx_built)) {
    457         Vect_build_sidx_from_topo(Map, NULL);
     430        Vect_build_sidx_from_topo(Map);
    458431    }
    459432
  • grass/branches/develbranch_6/lib/vector/Vlib/build_nat.c

    r33779 r34288  
    2323#include <grass/gis.h>
    2424#include <grass/Vect.h>
    25 
    26 extern FILE *Msgout;
    27 extern int prnmsg(char *msg, ...);
    2825
    2926/*!
     
    418415   \param Map_info vector map
    419416   \param build build level
    420    \param msgout message output (stdout/stderr for example) or NULL
    421417
    422418   \return 1 on success
    423419   \return 0 on error
    424420 */
    425 int Vect_build_nat(struct Map_info *Map, int build, FILE * msgout)
     421int Vect_build_nat(struct Map_info *Map, int build)
    426422{
    427423    struct Plus_head *plus;
     
    440436
    441437    plus = &(Map->plus);
    442     Msgout = msgout;
    443438
    444439    if (build == plus->built)
     
    508503        /* register lines, create nodes */
    509504        Vect_rewind(Map);
    510         prnmsg(_("Registering primitives: "));
     505        G_verbose_message(_("Registering primitives:"));
    511506        i = 1;
    512507        j = 1;
     
    548543                    dig_cidx_add_cat(plus, 0, 0, lineid, type);
    549544            }
    550 
    551             /* print progress */
    552             if (i == 1000) {
    553                 prnmsg("%7d\b\b\b\b\b\b\b", j);
    554                 i = 0;
    555             }
    556545            i++;
    557546            j++;
    558547        }
    559         prnmsg("\r%d %s            \n", plus->n_lines,
    560                _("primitives registered"));
    561         prnmsg("%d %s\n", npoints, _("vertices registered"));
     548        G_verbose_message(_("%d primitives registered"), plus->n_lines);
     549        G_verbose_message(_("%d vertices registered"), npoints);
    562550
    563551        plus->built = GV_BUILD_BASE;
     
    570558        /* Build areas */
    571559        /* Go through all bundaries and try to build area for both sides */
    572         prnmsg(_("Building areas: "));
     560        G_verbose_message(_("Building areas:"));
    573561        for (i = 1; i <= plus->n_lines; i++) {
    574             G_percent2(i, plus->n_lines, 1, msgout);
     562            G_percent(i, plus->n_lines, 1);
    575563
    576564            /* build */
     
    593581            }
    594582        }
    595         prnmsg("\r%d %s      \n%d %s\n", plus->n_areas, _("areas built"),
    596                plus->n_isles, _("isles built"));
     583        G_verbose_message(_("%d areas built"), plus->n_areas);
     584        G_verbose_message(_("%d isles built"), plus->n_isles);
    597585        plus->built = GV_BUILD_AREAS;
    598586    }
     
    603591    /* Attach isles to areas */
    604592    if (plus->built < GV_BUILD_ATTACH_ISLES) {
    605         prnmsg(_("Attaching islands: "));
     593        G_verbose_message(_("Attaching islands:"));
    606594        for (i = 1; i <= plus->n_isles; i++) {
    607             G_percent2(i, plus->n_isles, 1, msgout);
     595            G_percent(i, plus->n_isles, 1);
    608596            Vect_attach_isle(Map, i);
    609597        }
    610         if (i == 1)
    611             prnmsg("\n");
    612598        plus->built = GV_BUILD_ATTACH_ISLES;
    613599    }
     
    620606        int nlines;
    621607
    622         prnmsg(_("Attaching centroids: "));
     608        G_verbose_message(_("Attaching centroids:"));
    623609
    624610        nlines = Vect_get_num_lines(Map);
    625611        for (line = 1; line <= nlines; line++) {
    626             G_percent2(line, nlines, 1, msgout);
     612            G_percent(line, nlines, 1);
    627613
    628614            Line = plus->Line[line];
  • grass/branches/develbranch_6/lib/vector/Vlib/build_ogr.c

    r32583 r34288  
    3636#ifdef HAVE_OGR
    3737#include <ogr_api.h>
    38 
    39 extern FILE *Msgout;
    40 extern int prnmsg(char *msg, ...);
    4138
    4239/*
     
    322319   \param Map_info vector map
    323320   \param build build level
    324    \param msgout message output (stdout/stderr for example) or NULL
    325321
    326322   \return 1 on success
    327323   \return 0 on error
    328324 */
    329 int Vect_build_ogr(struct Map_info *Map, int build, FILE * msgout)
     325int Vect_build_ogr(struct Map_info *Map, int build)
    330326{
    331327    int iFeature, count, FID;
     
    337333        G_fatal_error(_("Partial build for OGR is not supported"));
    338334
    339     Msgout = msgout;
    340 
    341335    /* TODO move this init to better place (Vect_open_ ?), because in theory build may be reused on level2 */
    342336    Map->fInfo.ogr.offset = NULL;
     
    353347
    354348    /* Note: Do not use OGR_L_GetFeatureCount (it may scan all features)!!! */
    355     prnmsg(_("Feature: "));
     349    G_verbose_message(_("Feature: "));
    356350
    357351    OGR_L_ResetReading(Map->fInfo.ogr.layer);
     
    363357        G_debug(4, "---- Feature %d ----", iFeature);
    364358
    365         /* print progress */
    366         if (count == 1000) {
    367             prnmsg("%7d\b\b\b\b\b\b\b", iFeature);
    368             count = 0;
    369         }
    370 
    371359        hGeom = OGR_F_GetGeometryRef(hFeature);
    372360        if (hGeom == NULL) {
     
    392380    free_parts(&parts);
    393381
    394     prnmsg("%4d\n", iFeature);
    395 
    396382    Map->plus.built = GV_BUILD_ALL;
    397383    return 1;
  • grass/branches/develbranch_6/lib/vector/Vlib/clean_nodes.c

    r32527 r34288  
    3333   \param Map input map
    3434   \param Err vector map where error line segments are written
    35    \param msgout file pointer where messages will be written or NULL
    3635
    3736   \return number of line modifications
     
    3938int
    4039Vect_clean_small_angles_at_nodes(struct Map_info *Map, int otype,
    41                                  struct Map_info *Err, FILE * msgout)
     40                                 struct Map_info *Err)
    4241{
    4342    int node;
     
    5049    LCats = Vect_new_cats_struct();
    5150    OCats = Vect_new_cats_struct();
    52 
    53     if (msgout)
    54         fprintf(msgout, "%s: %5d", _("Modifications"), nmodif);
    5551
    5652    for (node = 1; node <= Vect_get_num_nodes(Map); node++) {
     
    247243            }
    248244
    249             if (msgout) {
    250                 fprintf(msgout, "\r%s: %5d", _("Modifications"), nmodif);
    251                 fflush(msgout);
    252             }
    253 
    254245            if (clean)
    255246                break;
    256 
    257247        }
    258 
    259248    }
    260     if (msgout)
    261         fprintf(stderr, "\n");
    262249
    263250    return (nmodif);
  • grass/branches/develbranch_6/lib/vector/Vlib/dangles.c

    r33605 r34288  
    2828
    2929static void dangles(struct Map_info *, int, int, double,
    30                     struct Map_info *, FILE *, struct ilist *);
     30                    struct Map_info *, struct ilist *);
    3131
    3232/*!
     
    4848   \param maxlength maxlength of dangles or -1 for all dangles
    4949   \param Err vector map where deleted dangles are written or NULL
    50    \param msgout file pointer where messages will be written or NULL
    5150
    5251   \return
     
    5453void
    5554Vect_remove_dangles(struct Map_info *Map, int type, double maxlength,
    56                     struct Map_info *Err, FILE * msgout)
    57 {
    58     dangles(Map, type, REMOVE_DANGLE, maxlength, Err, msgout, NULL);
     55                    struct Map_info *Err)
     56{
     57    dangles(Map, type, REMOVE_DANGLE, maxlength, Err, NULL);
    5958}
    6059
     
    7574   \param maxlength maxlength of dangles or -1 for all dangles
    7675   \param Err vector map where deleted dangles are written or NULL
    77    \param msgout file pointer where messages will be written or NULL
    7876
    7977   \return
     
    8179void
    8280Vect_chtype_dangles(struct Map_info *Map, double maxlength,
    83                     struct Map_info *Err, FILE * msgout)
    84 {
    85     dangles(Map, 0, CHTYPE_DANGLE, maxlength, Err, msgout, NULL);
     81                    struct Map_info *Err)
     82{
     83    dangles(Map, 0, CHTYPE_DANGLE, maxlength, Err, NULL);
    8684}
    8785
     
    10098   \param type type of dangles (GV_LINES, GV_LINE or GV_BOUNDARY)
    10199   \param maxlength maxlength of dangles or -1 for all dangles
    102    \param msgout file pointer where messages will be written or NULL
    103100
    104101   \return
     
    106103void
    107104Vect_select_dangles(struct Map_info *Map, int type, double maxlength,
    108                     FILE * msgout, struct ilist *List)
    109 {
    110     dangles(Map, type, SELECT_DANGLE, maxlength, NULL, msgout, List);
     105                    struct ilist *List)
     106{
     107    dangles(Map, type, SELECT_DANGLE, maxlength, NULL, List);
    111108}
    112109
     
    127124   maxlength maxlength of dangles or -1 for all dangles
    128125   Err vector map where deleted dangles are written or NULL
    129    msgout file pointer where messages will be written or NULL
    130126   List_dangle list of feature (selected dangles) ids
    131127 */
    132128static void dangles(struct Map_info *Map, int type, int option,
    133                     double maxlength, struct Map_info *Err, FILE * msgout,
     129                    double maxlength, struct Map_info *Err,
    134130                    struct ilist *List_dangle)
    135131{
     
    169165    List = Vect_new_list();
    170166
    171     if (msgout)
    172         fprintf(msgout, "%s %5d  %s: %5d",
    173                 _("Removed dangles:"), dangles_removed, lmsg, lines_removed);
    174 
    175167    nnodes = Vect_get_num_nodes(Map);
    176168    G_debug(2, "nnodes =  %d", nnodes);
     
    267259            }                   /* delete the chain */
    268260
    269             if (msgout) {
    270                 if (msgout)
    271                     fprintf(msgout, "\r%s %5d  %s: %5d",
    272                             _("Removed dangles:"), dangles_removed, lmsg,
    273                             lines_removed);
    274                 fflush(msgout);
    275             }
    276 
    277261            dangles_removed++;
    278262        }                       /* lcount == 1 */
    279263    }                           /* node <= nnodes */
    280 
    281     if (msgout) {
    282         if (msgout)
    283             fprintf(msgout, "\r%s %5d  %s: %5d",
    284                     _("Removed dangles:"), dangles_removed, lmsg,
    285                     lines_removed);
    286         fprintf(msgout, "\n");
    287     }
    288 }
     264}
  • grass/branches/develbranch_6/lib/vector/Vlib/map.c

    r32941 r34288  
    149149   \param[in] mapset mapset name
    150150   \param[in] out output vector map name
    151    \param[in] msgout output file for messages or NULL
    152151
    153152   \return -1 error
     
    155154 */
    156155int
    157 Vect_copy(const char *in, const char *mapset, const char *out, FILE * msgout)
     156Vect_copy(const char *in, const char *mapset, const char *out)
    158157{
    159158    int i, n, ret, type;
     
    295294   \param[in] in input vector map name
    296295   \param[in] out output vector map name
    297    \param[in] msgout output file for messages or NULL
    298296
    299297   \return -1 error
    300298   \return 0 success
    301299 */
    302 int Vect_rename(const char *in, const char *out, FILE * msgout)
     300int Vect_rename(const char *in, const char *out)
    303301{
    304302    int i, n, ret, type;
  • grass/branches/develbranch_6/lib/vector/Vlib/open.c

    r33206 r34288  
    446446
    447447        /* Build spatial index from topo */
    448         Vect_build_sidx_from_topo(Map, NULL);
     448        Vect_build_sidx_from_topo(Map);
    449449    }
    450450
  • grass/branches/develbranch_6/lib/vector/Vlib/remove_areas.c

    r32527 r34288  
    3232   \param thresh maximum area size for removed areas
    3333   \param Err vector map where removed lines and centroids are written
    34    \param msgout file pointer where messages will be written or NULL
    3534   \param removed_area  pointer to where total size of removed area is stored or NULL
    3635
     
    3938int
    4039Vect_remove_small_areas(struct Map_info *Map, double thresh,
    41                         struct Map_info *Err, FILE * msgout,
    42                         double *removed_area)
     40                        struct Map_info *Err, double *removed_area)
    4341{
    4442    int area;
     
    5452    Points = Vect_new_line_struct();
    5553    Cats = Vect_new_cats_struct();
    56 
    57     if (msgout)
    58         fprintf(msgout, "%s: %5d", _("Removed areas"), nremoved);
    5954
    6055    for (area = 1; area <= Vect_get_num_areas(Map); area++) {
     
    176171
    177172        nremoved++;
    178         if (msgout) {
    179             fprintf(msgout, "\r%s: %5d", _("Removed areas"), nremoved);
    180             fflush(stderr);
    181         }
    182173    }
    183     if (msgout)
    184         fprintf(stderr, "\n");
    185174
    186175    if (removed_area)
  • grass/branches/develbranch_6/lib/vector/Vlib/remove_duplicates.c

    r33605 r34288  
    3232   \param type type of line to be delete
    3333   \param Err vector map where duplicate lines will be written or NULL
    34    \param msgout file pointer where messages will be written or NULL
    3534
    3635   \return void
    3736 */
    3837void
    39 Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err,
    40                        FILE * msgout)
     38Vect_remove_duplicates(struct Map_info *Map, int type, struct Map_info *Err)
    4139{
    4240    struct line_pnts *APoints, *BPoints;
     
    6563
    6664    ndupl = 0;
    67 
    68     if (msgout)
    69         fprintf(msgout, "%s: %5d", _("Duplicates"), ndupl);
    7065
    7166    for (i = 1; i <= nlines; i++) {
     
    114109            ndupl++;
    115110
    116             if (msgout) {
    117                 fprintf(msgout, "\r%s: %5d", _("Duplicates"), ndupl);
    118                 fflush(msgout);
    119             }
    120 
    121111            break;              /* line was deleted -> take the next one */
    122112        }
     
    124114        G_debug(3, "nlines =  %d\n", nlines);
    125115    }
    126     if (msgout)
    127         fprintf(msgout, "\n");
    128 
    129     return;
    130116}
    131117
  • grass/branches/develbranch_6/lib/vector/Vlib/select.c

    r32527 r34288  
    5151    if (!(plus->Spidx_built)) {
    5252        G_debug(3, "Building spatial index.");
    53         Vect_build_sidx_from_topo(Map, NULL);
     53        Vect_build_sidx_from_topo(Map);
    5454    }
    5555
     
    101101    if (!(Map->plus.Spidx_built)) {
    102102        G_debug(3, "Building spatial index.");
    103         Vect_build_sidx_from_topo(Map, NULL);
     103        Vect_build_sidx_from_topo(Map);
    104104    }
    105105
     
    138138    if (!(Map->plus.Spidx_built)) {
    139139        G_debug(3, "Building spatial index.");
    140         Vect_build_sidx_from_topo(Map, NULL);
     140        Vect_build_sidx_from_topo(Map);
    141141    }
    142142
     
    170170    if (!(plus->Spidx_built)) {
    171171        G_debug(3, "Building spatial index.");
    172         Vect_build_sidx_from_topo(Map, NULL);
     172        Vect_build_sidx_from_topo(Map);
    173173    }
    174174
  • grass/branches/develbranch_6/lib/vector/Vlib/sindex.c

    r32583 r34288  
    122122   \return 1 error
    123123 */
    124 int Vect_build_spatial_index(struct Map_info *Map, FILE * msgout)
     124int Vect_build_spatial_index(struct Map_info *Map)
    125125{
    126126    if (Map->level < 2) {
     
    129129    }
    130130    if (!(Map->plus.Spidx_built)) {
    131         return (Vect_build_sidx_from_topo(Map, msgout));
     131        return (Vect_build_sidx_from_topo(Map));
    132132    }
    133133    return 0;
     
    138138
    139139   \param Map pointer to vector map
    140    \param msgout print progress here
    141140
    142141   \return 0 OK
    143142   \return 1 error
    144143 */
    145 int Vect_build_sidx_from_topo(struct Map_info *Map, FILE * msgout)
     144int Vect_build_sidx_from_topo(struct Map_info *Map)
    146145{
    147146    int i, total, done;
     
    163162    /* Nodes */
    164163    for (i = 1; i <= plus->n_nodes; i++) {
    165         G_percent2(i, total, 1, msgout);
     164        G_percent(i, total, 1);
    166165
    167166        Node = plus->Node[i];
     
    175174    done = plus->n_nodes;
    176175    for (i = 1; i <= plus->n_lines; i++) {
    177         G_percent2(done + i, total, 1, msgout);
     176        G_percent(done + i, total, 1);
    178177
    179178        Line = plus->Line[i];
     
    194193    done += plus->n_lines;
    195194    for (i = 1; i <= plus->n_areas; i++) {
    196         G_percent2(done + i, total, 1, msgout);
     195        G_percent(done + i, total, 1);
    197196
    198197        Area = plus->Area[i];
     
    213212    done += plus->n_areas;
    214213    for (i = 1; i <= plus->n_isles; i++) {
    215         G_percent2(done + i, total, 1, msgout);
     214        G_percent(done + i, total, 1);
    216215
    217216        Isle = plus->Isle[i];
  • grass/branches/develbranch_6/lib/vector/Vlib/snap.c

    r33605 r34288  
    6262 * \param[in] thresh threshold in which snap vertices
    6363 * \param[out] Err vector map where lines representing snap are written or NULL
    64  * \param[out] msgout file pointer where messages will be written or NULL
    6564 *
    6665 * \return void
     
    8079void
    8180Vect_snap_lines_list(struct Map_info *Map, struct ilist *List_lines,
    82                      double thresh, struct Map_info *Err, FILE * msgout)
     81                     double thresh, struct Map_info *Err)
    8382{
    8483    struct line_pnts *Points, *NPoints;
     
    8685    int line, ltype, line_idx;
    8786    double thresh2;
    88     int printed;
    8987
    9088    struct Node *RTree;
     
    10098    int *Index = NULL;          /* indexes of anchors for vertices */
    10199    int aindex = 0;             /* allocated Index */
    102     int width = 26;             /* fprintf width */
    103100
    104101    if (List_lines->n_values < 1)
     
    118115    nvertices = 0;
    119116    XPnts = NULL;
    120     printed = 0;
    121 
    122     if (msgout)
    123         fprintf(msgout, "%s...", _("Registering points"));
    124117
    125118    for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
     
    166159            }
    167160        }
    168         if (msgout && printed > 1000) {
    169             fprintf(msgout, "\r%s... %d", _("Registering points"), point - 1);
    170             fflush(msgout);
    171             printed = 0;
    172         }
    173         printed++;
    174161    }
    175162    npoints = point - 1;
    176     if (msgout) {
    177         fprintf(msgout,
    178                 "\r                                               \r");
    179         fprintf(msgout, "%-*s: %4d\n", width, _("All vertices"), nvertices);
    180         fprintf(msgout, "%-*s: %4d\n", width, _("Registered points"),
    181                 npoints);
    182     }
    183163
    184164    /* Go through all registered points and if not yet marked mark it as anchor and assign this anchor
     
    226206        }
    227207    }
    228     if (msgout) {
    229         fprintf(msgout, "%-*s: %4d\n", width, _("Nodes marked as anchor"),
    230                 nanchors);
    231         fprintf(msgout, "%-*s: %4d\n", width, _("Nodes marked to be snapped"),
    232                 ntosnap);
    233     }
    234208
    235209    /* Go through all lines and:
     
    237211     *   2) for all segments: snap it to all anchors in threshold (except anchors of vertices of course) */
    238212
    239     printed = 0;
    240213    nsnapped = ncreated = 0;
    241     if (msgout)
    242         fprintf(msgout, "%-*s: %4d", width, _("Snaps"), nsnapped + ncreated);
    243214
    244215    for (line_idx = 0; line_idx < List_lines->n_values; line_idx++) {
     
    407378            }
    408379        }
    409 
    410         if (msgout && printed > 1000) {
    411             fprintf(msgout, "\r%s: %5d  (line = %d)", _("Snaps"),
    412                     nsnapped + ncreated, line);
    413             fflush(msgout);
    414             printed = 0;
    415         }
    416         printed++;
    417380    }                           /* for each line */
    418 
    419     if (msgout) {
    420         fprintf(msgout, "\r%-*s: %4d\n", width, _("Snapped vertices"),
    421                 nsnapped);
    422         fprintf(msgout, "%-*s: %4d\n", width, _("New vertices"), ncreated);
    423     }
    424381
    425382    Vect_destroy_line_struct(Points);
     
    454411 * \param[in] thresh threshold in which snap vertices
    455412 * \param[out] Err vector map where lines representing snap are written or NULL
    456  * \param[out] msgout file pointer where messages will be written or NULL
    457413 *
    458414 * \return void
     
    460416void
    461417Vect_snap_lines(struct Map_info *Map, int type, double thresh,
    462                 struct Map_info *Err, FILE * msgout)
     418                struct Map_info *Err)
    463419{
    464420    int line, nlines, ltype;
     
    484440    }
    485441
    486     Vect_snap_lines_list(Map, List, thresh, Err, msgout);
     442    Vect_snap_lines_list(Map, List, thresh, Err);
    487443
    488444    Vect_destroy_list(List);
  • grass/branches/develbranch_6/lib/vector/vedit/select.c

    r33124 r34288  
    9191
    9292            /* select dangles shorter than 'thresh_tmp' */
    93             Vect_select_dangles(Map, type, thresh_tmp, NULL, List_dangle);
     93            Vect_select_dangles(Map, type, thresh_tmp, List_dangle);
    9494
    9595            if (thresh <= 0.0) {        /* shorter than */
  • grass/branches/develbranch_6/raster/r.carve/vect.c

    r32527 r34288  
    4343{
    4444    if (build_support)
    45         Vect_build(map, stderr);
     45        Vect_build(map);
    4646
    4747    Vect_set_release_support(map);
  • grass/branches/develbranch_6/raster/r.contour/main.c

    r32583 r34288  
    225225    db_close_database_shutdown_driver(Driver);
    226226
    227     Vect_build(&Map, stderr);
     227    Vect_build(&Map);
    228228    Vect_close(&Map);
    229229
  • grass/branches/develbranch_6/raster/r.flow/io.c

    r32583 r34288  
    182182       G_close_cell(lgfd); */
    183183    if (parm.flout) {
    184         Vect_build(&fl, stderr);
     184        Vect_build(&fl);
    185185        Vect_close(&fl);
    186186    }
  • grass/branches/develbranch_6/raster/r.random/random.c

    r32583 r34288  
    252252        db_commit_transaction(driver);
    253253        db_close_database_shutdown_driver(driver);
    254         Vect_build(&Out, stderr);
     254        Vect_build(&Out);
    255255        Vect_close(&Out);
    256256    }
  • grass/branches/develbranch_6/raster/r.to.vect/main.c

    r33605 r34288  
    233233
    234234    if (!no_topol->answer)
    235         Vect_build(&Map, stderr);
     235        Vect_build(&Map);
    236236
    237237
  • grass/branches/develbranch_6/vector/lidar/v.outlier/main.c

    r33779 r34288  
    352352    Vect_close(&Outlier);
    353353    if (qgis_opt->answer) {
    354         Vect_build(&Qgis, stderr);
     354        Vect_build(&Qgis);
    355355        Vect_close(&Qgis);
    356356    }
  • grass/branches/develbranch_6/vector/v.buffer/main.c

    r32696 r34288  
    222222
    223223    G_message(_("Rebuilding topology..."));
    224     Vect_build_partial(Out, GV_BUILD_NONE, NULL);
    225     Vect_build(Out, stderr);
     224    Vect_build_partial(Out, GV_BUILD_NONE);
     225    Vect_build(Out);
    226226    Vect_close(Out);
    227227}
     
    606606    /* Break lines */
    607607    G_message(_("Building parts of topology..."));
    608     Vect_build_partial(&Out, GV_BUILD_BASE, stderr);
     608    Vect_build_partial(&Out, GV_BUILD_BASE);
    609609
    610610    /* Warning: snapping must be done, otherwise colinear boundaries are not broken and
     
    618618     * calculate different threshold for each map, depending on map's bounding box */
    619619    G_message(_("Snapping boundaries..."));
    620     Vect_snap_lines(&Out, GV_BOUNDARY, 1e-7, NULL, stderr);
     620    Vect_snap_lines(&Out, GV_BOUNDARY, 1e-7, NULL);
    621621
    622622    G_message(_("Breaking boundaries..."));
    623     Vect_break_lines(&Out, GV_BOUNDARY, NULL, stderr);
     623    Vect_break_lines(&Out, GV_BOUNDARY, NULL);
    624624
    625625    G_message(_("Removing duplicates..."));
    626     Vect_remove_duplicates(&Out, GV_BOUNDARY, NULL, stderr);
     626    Vect_remove_duplicates(&Out, GV_BOUNDARY, NULL);
    627627
    628628    /* Dangles and bridges don't seem to be necessary if snapping is small enough. */
     
    636636
    637637    G_message(_("Attaching islands..."));
    638     Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, stderr);
     638    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
    639639
    640640    /* Calculate new centroids for all areas */
     
    750750
    751751    G_message(_("Attaching centroids..."));
    752     Vect_build_partial(&Out, GV_BUILD_CENTROIDS, stderr);
     752    Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
    753753
    754754    stop(&In, &Out);
  • grass/branches/develbranch_6/vector/v.build.polylines/main.c

    r33351 r34288  
    220220    Vect_close(&map);
    221221
    222     if (G_verbose() > G_verbose_min())
    223         Vect_build(&Out, stderr);
    224     else
    225         Vect_build(&Out, NULL);
    226 
     222    Vect_build(&Out);
    227223    Vect_close(&Out);
    228224
  • grass/branches/develbranch_6/vector/v.build/main.c

    r32696 r34288  
    8888        Vect_open_old(&Map, map_opt->answer, G_mapset());
    8989
    90         Vect_build(&Map, stderr);
     90        Vect_build(&Map);
    9191    }
    9292    /* dump topology */
     
    156156        }
    157157
    158         Vect_build(&Err, stderr);
     158        Vect_build(&Err);
    159159        Vect_close(&Err);
    160160    }
  • grass/branches/develbranch_6/vector/v.category/main.c

    r32583 r34288  
    488488        option == O_SUM) {
    489489        Vect_copy_tables(&In, &Out, 0);
    490         if (G_verbose() > G_verbose_min()) {
    491             Vect_build(&Out, stderr);
    492         }
    493         else {
    494             Vect_build(&Out, NULL);
    495         }
     490        Vect_build(&Out);
    496491        Vect_close(&Out);
    497492    }
  • grass/branches/develbranch_6/vector/v.clean/main.c

    r32583 r34288  
    3737    int count;
    3838    double size;
    39     FILE *output;               /* NULL | stderr */
    4039
    4140    G_gisinit(argv[0]);
     
    284283    Vect_close(&In);
    285284
    286     if (G_verbose() > G_verbose_min())
    287         output = stderr;
    288     else
    289         output = NULL;
    290 
    291285    /* Start with GV_BUILD_NONE and for each tool use unly the necessary level! */
    292286
     
    295289            tools[i] == TOOL_RMAREA) {
    296290            if (Vect_get_built(&Out) >= GV_BUILD_CENTROIDS) {
    297                 Vect_build_partial(&Out, GV_BUILD_CENTROIDS, NULL);
     291                Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
    298292            }
    299293            else {
    300294                G_important_message(_("Rebuilding parts of topology..."));
    301                 Vect_build_partial(&Out, GV_BUILD_CENTROIDS, output);
     295                Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
    302296                G_message(SEP);
    303297            }
     
    305299        else {
    306300            if (Vect_get_built(&Out) >= GV_BUILD_BASE) {
    307                 Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
     301                Vect_build_partial(&Out, GV_BUILD_BASE);
    308302            }
    309303            else {
    310304                G_important_message(_("Rebuilding parts of topology..."));
    311                 Vect_build_partial(&Out, GV_BUILD_BASE, output);
     305                Vect_build_partial(&Out, GV_BUILD_BASE);
    312306                G_message(SEP);
    313307            }
     
    317311        case TOOL_BREAK:
    318312            G_message(_("Tool: Break lines at intersections"));
    319             Vect_break_lines(&Out, otype, pErr, output);
     313            Vect_break_lines(&Out, otype, pErr);
    320314            break;
    321315        case TOOL_RMDUPL:
    322316            G_message(_("Tool: Remove duplicates"));
    323             Vect_remove_duplicates(&Out, otype, pErr, output);
     317            Vect_remove_duplicates(&Out, otype, pErr);
    324318            break;
    325319        case TOOL_RMDANGLE:
    326320            G_message(_("Tool: Remove dangles"));
    327             Vect_remove_dangles(&Out, otype, threshs[i], pErr, output);
     321            Vect_remove_dangles(&Out, otype, threshs[i], pErr);
    328322            break;
    329323        case TOOL_CHDANGLE:
    330324            G_message(_("Tool: Change type of boundary dangles"));
    331             Vect_chtype_dangles(&Out, threshs[i], pErr, stderr);
     325            Vect_chtype_dangles(&Out, threshs[i], pErr);
    332326            break;
    333327        case TOOL_RMBRIDGE:
    334328            G_message(_("Tool: Remove bridges"));
    335             Vect_remove_bridges(&Out, pErr, output);
     329            Vect_remove_bridges(&Out, pErr);
    336330            break;
    337331        case TOOL_CHBRIDGE:
    338332            G_message(_("Tool: Change type of boundary bridges"));
    339             Vect_chtype_bridges(&Out, pErr, output);
     333            Vect_chtype_bridges(&Out, pErr);
    340334            break;
    341335        case TOOL_RMDAC:
     
    345339        case TOOL_SNAP:
    346340            G_message(_("Tool: Snap line to vertex in threshold"));
    347             Vect_snap_lines(&Out, otype, threshs[i], pErr, output);
     341            Vect_snap_lines(&Out, otype, threshs[i], pErr);
    348342            break;
    349343        case TOOL_BPOL:
    350344            G_message(_("Tool: Break polygons"));
    351             Vect_break_polygons(&Out, otype, pErr, stderr);
     345            Vect_break_polygons(&Out, otype, pErr);
    352346            break;
    353347        case TOOL_PRUNE:
     
    358352            G_message(_("Tool: Remove small areas"));
    359353            count =
    360                 Vect_remove_small_areas(&Out, threshs[i], pErr, output,
    361                                         &size);
     354                Vect_remove_small_areas(&Out, threshs[i], pErr, &size);
    362355            G_message(_("%d areas of total size %g removed"), count, size);
    363356            break;
     
    365358            G_message(_("Tool: Remove small angles at nodes"));
    366359            count =
    367                 Vect_clean_small_angles_at_nodes(&Out, otype, pErr, output);
     360                Vect_clean_small_angles_at_nodes(&Out, otype, pErr);
    368361            G_message(_("%d modifications done"), count);
    369362            break;
     
    380373    if (!no_build_flag->answer) {
    381374        G_important_message(_("Rebuilding topology for output vector map..."));
    382         Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    383         Vect_build(&Out, output);
     375        Vect_build_partial(&Out, GV_BUILD_NONE);
     376        Vect_build(&Out);
    384377    }
    385378    else {
    386         Vect_build_partial(&Out, GV_BUILD_NONE, NULL);  /* -> topo not saved */
     379        Vect_build_partial(&Out, GV_BUILD_NONE);        /* -> topo not saved */
    387380    }
    388381    Vect_close(&Out);
     
    391384        G_message(SEP);
    392385        G_important_message(_("Building topology for error vector map..."));
    393         Vect_build(pErr, output);
     386        Vect_build(pErr);
    394387        Vect_close(pErr);
    395388    }
  • grass/branches/develbranch_6/vector/v.clean/prune.c

    r32583 r34288  
    5757
    5858    if (Err)
    59         Vect_build_partial(Err, GV_BUILD_BASE, NULL);
    60 
    61     if (G_verbose() > G_verbose_min())
    62         fprintf(stderr, _("Removed vertices: %5d"), nremoved);
     59        Vect_build_partial(Err, GV_BUILD_BASE);
    6360
    6461    for (line = 1; line <= nlines; line++) {
     
    211208            G_debug(4, "%d vertices removed", norig - TPoints->n_points);
    212209        }
    213 
    214         if (G_verbose() > G_verbose_min())
    215             fprintf(stderr, "\r%s: %5d", _("Removed vertices"), nremoved);
    216 
    217         fflush(stderr);
    218210    }
    219211
  • grass/branches/develbranch_6/vector/v.convert/old2new.c

    r32583 r34288  
    142142    attributes(in, &Mapout);
    143143
    144     Vect_build(&Mapout, stderr);
     144    Vect_build(&Mapout);
    145145    Vect_close(&Mapout);
    146146
  • grass/branches/develbranch_6/vector/v.digit/centre.c

    r32527 r34288  
    169169{
    170170    G_debug(1, "end()");
    171     Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
    172     Vect_build(&Map, stdout);
     171    Vect_build_partial(&Map, GV_BUILD_NONE);
     172    Vect_build(&Map);
    173173    Vect_close(&Map);
    174174
  • grass/branches/develbranch_6/vector/v.digit/main.c

    r32696 r34288  
    150150            G_message(_("New empty map created."));
    151151            Vect_open_new(&Map, map_opt->answer, 0);
    152             Vect_build(&Map, NULL);
     152            Vect_build(&Map);
    153153            Vect_close(&Map);
    154154            Vect_open_update(&Map, map_opt->answer, G_mapset());
  • grass/branches/develbranch_6/vector/v.distance/main.c

    r33605 r34288  
    11411141    Vect_close(&From);
    11421142    if (Outp != NULL) {
    1143         if (G_verbose() > G_verbose_min())
    1144             Vect_build(Outp, stderr);
    1145         else
    1146             Vect_build(Outp, NULL);
     1143        Vect_build(Outp);
    11471144        Vect_close(Outp);
    11481145    }
  • grass/branches/develbranch_6/vector/v.drape/main.c

    r34150 r34288  
    399399    /* build topology for output vector */
    400400    if (out_num > 0) {
    401         if (G_verbose() > G_verbose_min()) {
    402             Vect_build(&Out, stderr);
    403         }
    404         else {
    405             Vect_build(&Out, NULL);
    406         }
     401        Vect_build(&Out);
    407402       
    408403        /* Now let's move attribute data from all old map layers to new map */
  • grass/branches/develbranch_6/vector/v.edit/a2b.c

    r33605 r34288  
    300300    nlines_modified = 0;
    301301
    302     Vect_build_partial(Map, GV_BUILD_BASE, NULL);
     302    Vect_build_partial(Map, GV_BUILD_BASE);
    303303    nlines = Vect_get_num_lines(Map);
    304304
  • grass/branches/develbranch_6/vector/v.edit/main.c

    r33779 r34288  
    309309        }
    310310        else {
    311             ret = Vect_break_lines_list(&Map, List, NULL,
    312                                         GV_LINES, NULL, NULL);
     311            ret = Vect_break_lines_list(&Map, List, NULL, GV_LINES, NULL);
    313312        }
    314313        G_message(_("%d lines broken"), ret);
     
    433432    if (!(action_mode == MODE_SELECT || params.topo->answer == 1 ||
    434433         !MODE_NONE)) {
    435         Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
    436         if (G_verbose() > G_verbose_min())
    437             Vect_build(&Map, stderr);
    438         else
    439             Vect_build(&Map, NULL);
     434        Vect_build_partial(&Map, GV_BUILD_NONE);
     435        Vect_build(&Map);
    440436    }
    441437
  • grass/branches/develbranch_6/vector/v.edit/snap.c

    r32527 r34288  
    3232int snap_lines(struct Map_info *Map, struct ilist *List, double thresh)
    3333{
     34    if (G_verbose() > G_verbose_min())
     35        G_important_message(SEP);
    3436
    35     FILE *output;
     37    Vect_snap_lines_list(Map, List, thresh, NULL);
    3638
    37     if (G_verbose() > G_verbose_min()) {
     39    if (G_verbose() > G_verbose_min())
    3840        G_important_message(SEP);
    39         output = stderr;
    40     }
    41     else
    42         output = NULL;
    43 
    44     Vect_snap_lines_list(Map, List, thresh, NULL, output);
    45 
    46     if (G_verbose() > G_verbose_min()) {
    47         G_important_message(SEP);
    48     }
    4941
    5042    return 1;
  • grass/branches/develbranch_6/vector/v.external/main.c

    r32696 r34288  
    159159
    160160    Vect_open_old(&Map, out_opt->answer, G_mapset());
    161     Vect_build(&Map, stderr);
     161    Vect_build(&Map);
    162162    Vect_close(&Map);
    163163
  • grass/branches/develbranch_6/vector/v.extract/main.c

    r33639 r34288  
    375375                field, type_only, r_flag->answer ? 1 : 0);
    376376
    377     if (G_verbose() > G_verbose_min())
    378         Vect_build(&Out, stderr);
    379     else
    380         Vect_build(&Out, NULL);
    381 
     377    Vect_build(&Out);
    382378
    383379    /* Copy tables */
     
    506502            }
    507503        }
    508         Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    509         if (G_verbose() > G_verbose_min())
    510             Vect_build(&Out, stderr);
    511         else
    512             Vect_build(&Out, NULL);
     504        Vect_build_partial(&Out, GV_BUILD_NONE);
     505        Vect_build(&Out);
    513506    }
    514507
  • grass/branches/develbranch_6/vector/v.extrude/main.c

    r33120 r34288  
    6363    dbValue *value;
    6464    int more;
     65    char *comment;
    6566
    6667    module = G_define_module();
     
    332333    }
    333334
    334     if (G_verbose() > G_verbose_min())
    335         Vect_build(&Out, stderr);
    336     else
    337         Vect_build(&Out, NULL);
     335    Vect_build(&Out);
    338336
    339337    /* header */
    340     char *comment;
    341 
    342338    G_asprintf(&comment, "Generated by %s from vector map <%s>",
    343339               G_program_name(), G_fully_qualified_name(old->answer, mapset));
  • grass/branches/develbranch_6/vector/v.generalize/main.c

    r32696 r34288  
    437437     * they may occur only if they were generalized */
    438438    if (mask_type & GV_BOUNDARY) {
    439         Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
     439        Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
    440440        n_lines = Vect_get_num_lines(&Out);
    441441        for (i = 1; i <= n_lines; i++) {
     
    457457     */
    458458    if ((mask_type & GV_BOUNDARY) && method != DISPLACEMENT) {
    459         Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
     459        Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
    460460        n_areas = Vect_get_num_areas(&Out);
    461461        for (i = 1; i <= n_areas; i++) {
     
    477477    /* remove small areas */
    478478    if (rs_flag->answer && simplification && (mask_type & GV_AREA)) {
    479         Vect_build_partial(&Out, GV_BUILD_CENTROIDS, NULL);
    480         Vect_remove_small_areas(&Out, thresh, NULL, NULL, &slide);
    481     }
    482 
    483     if (G_verbose() > G_verbose_min())
    484         Vect_build(&Out, stderr);
    485     else
    486         Vect_build(&Out, NULL);
     479        Vect_build_partial(&Out, GV_BUILD_CENTROIDS);
     480        Vect_remove_small_areas(&Out, thresh, NULL, &slide);
     481    }
     482
     483    Vect_build(&Out);
    487484
    488485    /* finally copy tables */
  • grass/branches/develbranch_6/vector/v.hull/main.c

    r32696 r34288  
    374374
    375375    /* clean up and bye bye */
    376     Vect_build(&Map, stderr);
     376    Vect_build(&Map);
    377377    Vect_close(&Map);
    378378
  • grass/branches/develbranch_6/vector/v.in.ascii/in.c

    r32934 r34288  
    222222
    223223    if (e_flag->answer) {
    224         Vect_build(&Map, stderr);
     224        Vect_build(&Map);
    225225        Vect_close(&Map);
    226226        exit(EXIT_SUCCESS);
     
    536536    }
    537537    else {
    538         Vect_build(&Map, stderr);
     538        Vect_build(&Map);
    539539        Vect_close(&Map);
    540540    }
  • grass/branches/develbranch_6/vector/v.in.db/main.c

    r32696 r34288  
    224224    }
    225225
    226     if (G_verbose() > G_verbose_min())
    227         Vect_build(&Map, stderr);
    228     else
    229         Vect_build(&Map, NULL);
    230 
     226    Vect_build(&Map);
    231227    Vect_close(&Map);
    232228
  • grass/branches/develbranch_6/vector/v.in.dxf/main.c

    r32946 r34288  
    186186            if (Vect_open_old(Map, output, G_mapset())) {
    187187                if (!flag_topo)
    188                     if (!Vect_build(Map, stderr))
     188                    if (!Vect_build(Map))
    189189                        G_warning(_("Building topology failed"));
    190190                Vect_close(Map);
  • grass/branches/develbranch_6/vector/v.in.ogr/main.c

    r32696 r34288  
    9393    int layer_id;
    9494    int overwrite;
    95     FILE *output;
    9695
    9796    G_gisinit(argv[0]);
     
    245244
    246245    OGRRegisterAll();
    247 
    248     if (G_verbose() > G_verbose_min())
    249         output = stderr;
    250     else
    251         output = NULL;
    252246
    253247    /* list supported formats */
     
    889883
    890884    /* TODO: is it necessary to build here? probably not, consumes time */
    891     Vect_build(&Map, output);
     885    Vect_build(&Map);
    892886
    893887    if (!no_clean_flag->answer &&
     
    909903        Vect_close(&Map);
    910904        Vect_open_update(&Map, out_opt->answer, G_mapset());
    911         Vect_build_partial(&Map, GV_BUILD_BASE, output);        /* Downgrade topo */
     905        Vect_build_partial(&Map, GV_BUILD_BASE);        /* Downgrade topo */
    912906
    913907        if (snap >= 0) {
    914908            G_message("%s", separator);
    915909            G_message(_("Snap boundaries (threshold = %.3e):"), snap);
    916             Vect_snap_lines(&Map, GV_BOUNDARY, snap, NULL, output);
     910            Vect_snap_lines(&Map, GV_BOUNDARY, snap, NULL);
    917911        }
    918912
     
    928922        G_message("%s", separator);
    929923        G_message(_("Break polygons:"));
    930         Vect_break_polygons(&Map, GV_BOUNDARY, NULL, output);
     924        Vect_break_polygons(&Map, GV_BOUNDARY, NULL);
    931925
    932926        /* It is important to remove also duplicate centroids in case of duplicate imput polygons */
    933927        G_message("%s", separator);
    934928        G_message(_("Remove duplicates:"));
    935         Vect_remove_duplicates(&Map, GV_BOUNDARY | GV_CENTROID, NULL, output);
     929        Vect_remove_duplicates(&Map, GV_BOUNDARY | GV_CENTROID, NULL);
    936930
    937931        /* Vect_clean_small_angles_at_nodes() can change the geometry so that new intersections
     
    941935            G_message("%s", separator);
    942936            G_message(_("Break boundaries:"));
    943             Vect_break_lines(&Map, GV_BOUNDARY, NULL, output);
     937            Vect_break_lines(&Map, GV_BOUNDARY, NULL);
    944938
    945939            G_message("%s", separator);
    946940            G_message(_("Remove duplicates:"));
    947             Vect_remove_duplicates(&Map, GV_BOUNDARY, NULL, output);
     941            Vect_remove_duplicates(&Map, GV_BOUNDARY, NULL);
    948942
    949943            G_message("%s", separator);
    950944            G_message(_("Clean boundaries at nodes:"));
    951945            nmodif =
    952                 Vect_clean_small_angles_at_nodes(&Map, GV_BOUNDARY, NULL,
    953                                                  output);
     946                Vect_clean_small_angles_at_nodes(&Map, GV_BOUNDARY, NULL);
    954947        } while (nmodif > 0);
    955948
     
    957950        if (type & GV_BOUNDARY) {       /* that means lines were converted boundaries */
    958951            G_message(_("Change boundary dangles to lines:"));
    959             Vect_chtype_dangles(&Map, -1.0, NULL, output);
     952            Vect_chtype_dangles(&Map, -1.0, NULL);
    960953        }
    961954        else {
    962955            G_message(_("Change dangles to lines:"));
    963             Vect_remove_dangles(&Map, GV_BOUNDARY, -1.0, NULL, output);
     956            Vect_remove_dangles(&Map, GV_BOUNDARY, -1.0, NULL);
    964957        }
    965958
     
    967960        if (type & GV_BOUNDARY) {
    968961            G_message(_("Change boundary bridges to lines:"));
    969             Vect_chtype_bridges(&Map, NULL, output);
     962            Vect_chtype_bridges(&Map, NULL);
    970963        }
    971964        else {
    972965            G_message(_("Remove bridges:"));
    973             Vect_remove_bridges(&Map, NULL, output);
     966            Vect_remove_bridges(&Map, NULL);
    974967        }
    975968
    976969        /* Boundaries are hopefully clean, build areas */
    977970        G_message("%s", separator);
    978         Vect_build_partial(&Map, GV_BUILD_ATTACH_ISLES, output);
     971        Vect_build_partial(&Map, GV_BUILD_ATTACH_ISLES);
    979972
    980973        /* Calculate new centroids for all areas, centroids have the same id as area */
     
    10601053            G_free(Centr);
    10611054        G_message("%s", separator);
    1062         Vect_build_partial(&Map, GV_BUILD_NONE, NULL);
     1055        Vect_build_partial(&Map, GV_BUILD_NONE);
    10631056
    10641057        G_message("%s", separator);
    1065         Vect_build(&Map, output);
     1058        Vect_build(&Map);
    10661059
    10671060        G_message("%s", separator);
  • grass/branches/develbranch_6/vector/v.in.region/main.c

    r32527 r34288  
    9595    }
    9696
    97     Vect_build(&Out, stderr);
     97    Vect_build(&Out);
    9898    Vect_close(&Out);
    9999
  • grass/branches/develbranch_6/vector/v.in.sites/main.c

    r33779 r34288  
    248248    db_shutdown_driver(driver);
    249249
    250     Vect_build(&Map, stderr);
     250    Vect_build(&Map);
    251251    Vect_close(&Map);
    252252
  • grass/branches/develbranch_6/vector/v.kcv/main.c

    r32583 r34288  
    259259    db_close_database_shutdown_driver(Driver);
    260260
    261     Vect_build(&Out, stderr);
     261    Vect_build(&Out);
    262262    Vect_close(&Out);
    263263
  • grass/branches/develbranch_6/vector/v.kernel/main.c

    r32696 r34288  
    411411        Vect_close(&Net);
    412412
    413         Vect_build(&Out, stderr);
     413        Vect_build(&Out);
    414414        Vect_close(&Out);
    415415    }
  • grass/branches/develbranch_6/vector/v.lrs/v.lrs.create/main.c

    r32583 r34288  
    861861
    862862    G_message(_("Building topology for output (out_lines) map..."));
    863     Vect_build(&Out, stderr);
     863    Vect_build(&Out);
    864864    Vect_close(&Out);
    865865
     
    867867    if (err_opt->answer) {
    868868        G_message(_("Building topology for error (err) map..."));
    869         Vect_build(&EMap, stderr);
     869        Vect_build(&EMap);
    870870        Vect_close(&EMap);
    871871    }
  • grass/branches/develbranch_6/vector/v.lrs/v.lrs.label/main.c

    r32527 r34288  
    514514
    515515    db_close_database(rsdriver);
    516     Vect_build(&Out, stderr);
     516    Vect_build(&Out);
    517517
    518518    /* Free, close ... */
  • grass/branches/develbranch_6/vector/v.lrs/v.lrs.segment/main.c

    r32583 r34288  
    335335
    336336    db_close_database(rsdriver);
    337     Vect_build(&Out, stderr);
     337    Vect_build(&Out);
    338338
    339339    /* Free, close ... */
  • grass/branches/develbranch_6/vector/v.mkgrid/main.c

    r32527 r34288  
    292292    db_close_database_shutdown_driver(Driver);
    293293
    294     if (G_verbose() > G_verbose_min())
    295         Vect_build(&Map, stderr);
    296     else
    297         Vect_build(&Map, NULL);
     294    Vect_build(&Map);
    298295    Vect_close(&Map);
    299296
  • grass/branches/develbranch_6/vector/v.net.alloc/main.c

    r33779 r34288  
    367367    }
    368368
    369     Vect_build(&Out, stderr);
     369    Vect_build(&Out);
    370370
    371371    /* Free, ... */
  • grass/branches/develbranch_6/vector/v.net.iso/main.c

    r33779 r34288  
    527527    }
    528528
    529     Vect_build(&Out, stderr);
     529    Vect_build(&Out);
    530530
    531531    /* Free, ... */
  • grass/branches/develbranch_6/vector/v.net.path/main.c

    r32527 r34288  
    149149    Vect_close(&In);
    150150
    151     Vect_build(&Out, stderr);
     151    Vect_build(&Out);
    152152    Vect_close(&Out);
    153153
  • grass/branches/develbranch_6/vector/v.net.salesman/main.c

    r32696 r34288  
    378378    fprintf(stdout, "\n\n");
    379379
    380     Vect_build(&Out, stderr);
     380    Vect_build(&Out);
    381381
    382382    /* Free, ... */
  • grass/branches/develbranch_6/vector/v.net.steiner/main.c

    r33779 r34288  
    636636    fprintf(stdout, "\n\n");
    637637
    638     Vect_build(&Out, stderr);
     638    Vect_build(&Out);
    639639
    640640    /* Free, ... */
  • grass/branches/develbranch_6/vector/v.net.visibility/main.c

    r32527 r34288  
    130130    G_free(lines);
    131131
    132     if (G_verbose() > G_verbose_min())
    133         Vect_build(&out, stderr);
    134     else
    135         Vect_build(&out, NULL);
    136 
     132    Vect_build(&out);
    137133    Vect_close(&out);
    138134    Vect_close(&in);
  • grass/branches/develbranch_6/vector/v.net/connect.c

    r32527 r34288  
    5555    /* rewrite all primitives to output file */
    5656    Vect_copy_map_lines(In, Out);
    57     Vect_build_partial(Out, GV_BUILD_BASE, NULL);
     57    Vect_build_partial(Out, GV_BUILD_BASE);
    5858
    5959    /* go thorough all points in point map and write a new arcs if missing */
  • grass/branches/develbranch_6/vector/v.net/main.c

    r33779 r34288  
    195195
    196196        /* support */
    197         Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    198         if (G_verbose() > G_verbose_min())
    199             Vect_build(&Out, stderr);
    200         else
    201             Vect_build(&Out, NULL);
     197        Vect_build_partial(&Out, GV_BUILD_NONE);
     198        Vect_build(&Out);
    202199
    203200        Vect_close(&In);
  • grass/branches/develbranch_6/vector/v.overlay/area_area.c

    r32527 r34288  
    3030    int nmodif;
    3131
    32     FILE *output;
    33 
    34     if (G_verbose() > G_verbose_min())
    35         output = stderr;
    36     else
    37         output = NULL;
    38 
    3932    Points = Vect_new_line_struct();
    4033    Cats = Vect_new_cats_struct();
     
    4538    do {
    4639        G_message(_("Breaking lines..."));
    47         Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, output);
     40        Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL);
    4841
    4942        /* Probably not necessary for LINE x AREA */
    5043        G_message(_("Removing duplicates..."));
    51         Vect_remove_duplicates(Out, GV_BOUNDARY, NULL, output);
     44        Vect_remove_duplicates(Out, GV_BOUNDARY, NULL);
    5245
    5346        G_message(_("Cleaning boundaries at nodes..."));
    5447        nmodif =
    55             Vect_clean_small_angles_at_nodes(Out, GV_BOUNDARY, NULL, output);
     48            Vect_clean_small_angles_at_nodes(Out, GV_BOUNDARY, NULL);
    5649    } while (nmodif > 0);
    5750
     
    6154    /* Attach islands */
    6255    G_message(_("Attaching islands..."));
    63     Vect_build_partial(Out, GV_BUILD_ATTACH_ISLES, output);
     56    Vect_build_partial(Out, GV_BUILD_ATTACH_ISLES);
    6457
    6558
     
    270263    /* Build topology and remove boundaries with area without centroid on both sides */
    271264    G_message(_("Attaching centroids..."));
    272     Vect_build_partial(Out, GV_BUILD_ALL, output);
     265    Vect_build_partial(Out, GV_BUILD_ALL);
    273266
    274267    /* Create a list of lines to be deleted */
  • grass/branches/develbranch_6/vector/v.overlay/line_area.c

    r32527 r34288  
    6868
    6969    G_message(_("Breaking lines..."));
    70     if (G_verbose() > G_verbose_min())
    71         Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, stderr);
    72     else
    73         Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL, NULL);
     70    Vect_break_lines(Out, GV_LINE | GV_BOUNDARY, NULL);
    7471
    7572    /* Basic topology needed only */
    76     Vect_build_partial(Out, GV_BUILD_BASE, NULL);
     73    Vect_build_partial(Out, GV_BUILD_BASE);
    7774
    7875    nlines = Vect_get_num_lines(Out);
  • grass/branches/develbranch_6/vector/v.overlay/main.c

    r32583 r34288  
    468468    G_message(_("Building partial topology..."));
    469469    /* do not print output, because befor cleaning it is nonsense */
    470     Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
     470    Vect_build_partial(&Out, GV_BUILD_BASE);
    471471
    472472    /* AREA x AREA */
     
    479479
    480480    G_message(_("Rebuilding topology..."));
    481     Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    482     if (G_verbose() > G_verbose_min())
    483         Vect_build(&Out, stderr);
    484     else
    485         Vect_build(&Out, NULL);
     481    Vect_build_partial(&Out, GV_BUILD_NONE);
     482    Vect_build(&Out);
    486483    /* Build topology to show the final result and prepare for Vect_close() */
    487484
  • grass/branches/develbranch_6/vector/v.parallel/main.c

    r32527 r34288  
    9090
    9191    Vect_close(&In);
    92     Vect_build(&Out, stderr);
     92    Vect_build(&Out);
    9393    Vect_close(&Out);
    9494
  • grass/branches/develbranch_6/vector/v.patch/main.c

    r32696 r34288  
    355355    Vect_set_person(&OutMap, G_whoami());
    356356
    357     if (G_verbose() > G_verbose_min())
    358         Vect_build(&OutMap, stderr);
    359     else
    360         Vect_build(&OutMap, NULL);
    361 
     357    Vect_build(&OutMap);
    362358    Vect_close(&OutMap);
    363359
     
    368364        G_important_message(_("Building topology for vector map <%s>..."),
    369365                            bbox_name);
    370         if (G_verbose() > G_verbose_min())
    371             Vect_build(&BBoxMap, stderr);
    372         else
    373             Vect_build(&BBoxMap, NULL);
    374 
     366        Vect_build(&BBoxMap);
    375367        Vect_close(&BBoxMap);
    376368    }
  • grass/branches/develbranch_6/vector/v.perturb/main.c

    r32583 r34288  
    246246    Vect_close(&In);
    247247
    248     Vect_build(&Out, stderr);
     248    Vect_build(&Out);
    249249    Vect_close(&Out);
    250250
  • grass/branches/develbranch_6/vector/v.proj/main.c

    r33543 r34288  
    279279    Vect_close(&Map);
    280280
    281     if (G_verbose() > G_verbose_min())
    282         Vect_build(&Out_Map, stderr);
    283     else
    284         Vect_build(&Out_Map, NULL);
    285 
     281    Vect_build(&Out_Map);
    286282    Vect_close(&Out_Map);
    287283
  • grass/branches/develbranch_6/vector/v.qcount/main.c

    r32527 r34288  
    166166        }
    167167
    168         Vect_build(&Out, stderr);
     168        Vect_build(&Out);
    169169        Vect_close(&Out);
    170170
  • grass/branches/develbranch_6/vector/v.random/main.c

    r32696 r34288  
    297297
    298298    if (!flag.notopo->answer) {
    299         if (G_verbose() > G_verbose_min())
    300             Vect_build(&Out, stderr);
    301         else
    302             Vect_build(&Out, NULL);
     299        Vect_build(&Out);
    303300    }
    304301    Vect_close(&Out);
  • grass/branches/develbranch_6/vector/v.reclass/main.c

    r34238 r34288  
    417417    Vect_close(&In);
    418418
    419     Vect_build(&Out, stderr);
     419    Vect_build(&Out);
    420420    Vect_close(&Out);
    421421
  • grass/branches/develbranch_6/vector/v.sample/main.c

    r33093 r34288  
    298298    Vect_close(&In);
    299299
    300     Vect_build(&Out, stderr);
     300    Vect_build(&Out);
    301301    Vect_close(&Out);
    302302
  • grass/branches/develbranch_6/vector/v.segment/main.c

    r32583 r34288  
    232232              lines_written, lines_read - lines_written);
    233233
    234     if (G_verbose() > G_verbose_min()) {
    235         Vect_build(&Out, stderr);
    236     }
    237     else {
    238         Vect_build(&Out, NULL);
    239     }
    240 
     234    Vect_build(&Out);
    241235    /* Free, close ... */
    242236    Vect_close(&In);
  • grass/branches/develbranch_6/vector/v.select/main.c

    r34262 r34288  
    516516    Vect_close(&(In[0]));
    517517
    518     Vect_build(&Out, stderr);
     518    Vect_build(&Out);
    519519    Vect_close(&Out);
    520520
  • grass/branches/develbranch_6/vector/v.split/main.c

    r32903 r34288  
    184184
    185185    Vect_close(&In);
    186     Vect_build(&Out, stderr);
     186    Vect_build(&Out);
    187187    Vect_close(&Out);
    188188
  • grass/branches/develbranch_6/vector/v.surf.rst/main.c

    r33779 r34288  
    685685         */
    686686        print_tree(root, x_orig, y_orig, &TreeMap);
    687         Vect_build(&TreeMap, NULL);
     687        Vect_build(&TreeMap);
    688688        Vect_close(&TreeMap);
    689689    }
     
    774774         */
    775775        print_tree(root, x_orig, y_orig, &OverMap);
    776         Vect_build(&OverMap, NULL);
     776        Vect_build(&OverMap);
    777777        Vect_close(&OverMap);
    778778    }
     
    794794        /*  db_close_database_shutdown_driver ( driver2 ); */
    795795        db_close_database(driver2);
    796         Vect_build(&Map2, stderr);
     796        Vect_build(&Map2);
    797797        Vect_close(&Map2);
    798798    }
  • grass/branches/develbranch_6/vector/v.to.points/main.c

    r32527 r34288  
    373373    }
    374374
    375     Vect_build(&Out, stderr);
     375    Vect_build(&Out);
    376376
    377377    /* Free, close ... */
  • grass/branches/develbranch_6/vector/v.transform/main.c

    r32583 r34288  
    331331    Vect_copy_tables(&Old, &New, 0);
    332332    Vect_close(&Old);
    333 
    334     if (G_verbose() > G_verbose_min())
    335         Vect_build(&New, stderr);
    336     else
    337         Vect_build(&New, NULL);
     333    Vect_build(&New);
    338334
    339335    if (!quiet_flag->answer) {
  • grass/branches/develbranch_6/vector/v.type/main.c

    r32527 r34288  
    232232
    233233    Vect_copy_tables(&In, &Out, 0);
    234     Vect_build(&Out, stderr);
     234    Vect_build(&Out);
    235235    Vect_close(&Out);
    236236    Vect_close(&In);
  • grass/branches/develbranch_6/vector/v.vol.rst/main.c

    r32696 r34288  
    847847            if (cvdev != NULL || devi != NULL) {
    848848                db_close_database_shutdown_driver(driver);
    849                 Vect_build(&Map, stderr);
     849                Vect_build(&Map);
    850850                Vect_close(&Map);
    851851            }
  • grass/branches/develbranch_6/vector/v.voronoi/dt_main.c

    r32527 r34288  
    105105    Vect_hist_command(&Out);
    106106
    107     Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
     107    Vect_build_partial(&Out, GV_BUILD_BASE);
    108108
    109109    /* initialize working region */
     
    126126    Vect_close(&In);
    127127
    128     Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES, NULL);
     128    Vect_build_partial(&Out, GV_BUILD_ATTACH_ISLES);
    129129
    130130    nareas = Vect_get_num_areas(&Out);
     
    157157    }
    158158
    159     Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    160     Vect_build(&Out, stderr);
     159    Vect_build_partial(&Out, GV_BUILD_NONE);
     160    Vect_build(&Out);
    161161    Vect_close(&Out);
    162162
  • grass/branches/develbranch_6/vector/v.voronoi/vo_main.c

    r32527 r34288  
    185185
    186186    /* Close free ends by cyrrent region */
    187     Vect_build_partial(&Out, GV_BUILD_BASE, NULL);
     187    Vect_build_partial(&Out, GV_BUILD_BASE);
    188188
    189189    ncoor = 0;
     
    354354    Vect_close(&In);
    355355
    356     Vect_build_partial(&Out, GV_BUILD_NONE, NULL);
    357     Vect_build(&Out, stderr);
     356    Vect_build_partial(&Out, GV_BUILD_NONE);
     357    Vect_build(&Out);
    358358    Vect_close(&Out);
    359359
  • grass/branches/develbranch_6/vector/v.what/main.c

    r32527 r34288  
    157157
    158158            G_verbose_message(_("Building spatial index..."));
    159             Vect_build_spatial_index(&Map[i], NULL);
     159            Vect_build_spatial_index(&Map[i]);
    160160        }
    161161    }
Note: See TracChangeset for help on using the changeset viewer.