[GRASS-dev] [bug #4524] (grass) v.clean, v.patch (else?): output to stderr instead of stdout...

Martin Landa landa.martin at gmail.com
Wed May 31 10:37:10 EDT 2006


Hi, just a short note - in case of v.patch, fprintf (stderr, ...) ->
G_message () [1].

Best, Martin

[1] http://freegis.org/cgi-bin/viewcvs.cgi/grass6/vector/v.patch/main.c.diff?r1=1.11&r2=1.12

2006/5/31, Hamish <hamish_nospam at yahoo.com>:
> > this bug's URL: http://intevation.de/rt/webrt?serial_num=4524
> > ---------------------------------------------------------------------
> >
> > Subject: v.clean, v.patch (else?): output to stderr instead of
> > stdout...
> ..
> > GRASS Version: 2006-05-30
> >
> > ...and it is hard to prevent such commands from being verbose when not
> > supposed to, "> /dev/null" doesn't help.
>
> "2> /dev/null" might help, but then you might lose error/warnings.
>
>
> > Especially v.clean is a big mouth.
>
>
>
> v.patch:
>    Vect_build (&OutMap, stdout);
>    Vect_close (&OutMap);
>
>    fprintf (stderr, "Patch complete. %d files patched.\n", n_files);
>    fprintf (stderr, "Intersections at borders will have to be snapped.\n");
>    fprintf (stderr, "Lines common between files will have to be edited.\n");
>    fprintf (stderr, "The header information also may have to be edited.\n");
>
>
>
> As discussed recently on grass5, those fprintf's should use G_message(),
> then G_message(),G_percent() should check some verbosity variable.
>
> This will clean up a lot.
>
> Vect_build() is harder as the intended output is specific. Modify each
> module that uses Vect_build() or test in Vect_build() for != "std*"?
>
>
> Hamish
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>




More information about the grass-dev mailing list