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

Hamish hamish_nospam at yahoo.com
Tue May 30 23:22:36 EDT 2006


> 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




More information about the grass-dev mailing list