[GRASS-dev] v.clean -- thresholds & G_message

Martin:

There are two problems:

1) mixing of printf (stderr, ) & G_message (see [1]).

2) the function G_message (or G_waring ...) removes all redundant
spaces from the original message.

  G_message(_("+---------------------------------+---------------
  +")); G_message(_("| Tool | Threshold
      |"));
  G_message(_("+---------------------------------+---------------
  +"));

->

+---------------------------------+---------------+
| Tool | Threshold |
+---------------------------------+---------------+

Jachym:

imho this is more "output" then "message".

I agree, it's part of a data table. the whole table should be output
together to stdout or stderr. As it isn't the result of analysis maybe
stderr is right? (shrug)

I suggest to add flag -t for tabular output

If anything, a flag to disable it not to enable it. Otherwise 99% of the
time you never see it, and it can be important to see as different tools
have different defaults etc. My vote: as you can test GRASS_VERBOSE
level within a module, you can still have "--quiet" turn off the table
without going through G_message().

This could be good candidate for --verbose, but as currently all modules
cry wolf (report having --verbose) there would be no way of a user
knowing that it actually does anything in this module (without studying
the help page). Could there be a way to only suggest "--verbose" in the
module help if it was flagged in some way? G_define_standard_flag()
could do it, but it needs to be --v not -v and there are other -v flags.
The only other way I can think of is adding "module->has_verbose=TRUE;"
???

Hamish