[GRASS-dev] g.rename consolidation

Glynn Clements glynn at gclements.plus.com
Thu Feb 22 11:07:21 EST 2007


Martin Landa wrote:

> > There needs to be a new function for messages which allows specifying
> > the verbosity level.
> >
> > Rather than individual modules having to do:
> >
> >         if (G_verbose() >= level)
> >                 G_message(...);
> >
> > they would do e.g.:
> >
> >         G_message_ex(level, ...);
> >
> > The new function would check the verbosity level.
> >
> > The current mechanism is just making the code messy.
> 
> OK, it would be also useful to have G_message_no_nl() which does not
> print new-line character at the of the message. I am not sure how to
> derive these functions from the existing G_message() fn. Is there any
> way how to redirect variadic parameters. E.g.:
> 
> void foo (char *text, ...);
> void foo1 (char *text, ...);
> 
> void foo (char *text) {
>     foo1 (?)
> }

You would need a version of the callee which takes a va_list as a
parameter, and I'm not sure whether there's any portable way to write
such functions.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list