[GRASS-dev] remove d.vect -v flag

Hamish hamish_nospam at yahoo.com
Fri Nov 24 23:03:25 EST 2006

> > > do you think we can remove the -v flag from d.vect module? I don't
> > > think it is used in scripts, etc.
> > To prepare for it's removal in GRASS 7 you can modify the -v flag to
> > assert GRASS_VERBOSE=x and print a G_warning("-v depreciated"), and
> > then modify the module's "quiet=" code to set itself based on the
> > GRASS_VERBOSEity level. Then when GRASS 7 comes out it is simple to
> > remove it.
> done in CVS (I hope;-)

Hi Martin,

I just made a few more slight refinements to this in CVS. :)

Standard verbosity level is "2", max is "3". putenv(=2) would override
--verbose (which now sets v=3).

I have just added a new G_verbose_std() fn to take care of this:
  int verbose=FALSE;

  if(G_verbose() > G_verbose_std())

So it should be cleaner to set verbose mode in future.

I used G_putenv() instead of putenv(). (sorry r.buffer example I gave uses
putenv(), but as it's POSIX it's everywhere so I doubt this change makes
much of a difference)

I put the verbose tests back in for the G_message() and G_done_msg()
calls; you don't want d.vect chatty by default when called from the
command line, only when --verbose (or -v) was used.


More information about the grass-dev mailing list