[GRASS-dev] G_program_name to every message

Glynn Clements glynn at gclements.plus.com
Mon Jan 8 10:18:11 EST 2007


Brad Douglas wrote:

> > Hi Jachym. Great idea. I would condition that on the debug environment
> > variable. You might even consider adding __FILE__ and __LINE__
> > references then.
> 
> No.  The only place that is appropriate is G_debug().

Also, that would mean that G_debug() has to be a macro (within
G_debug(), __FILE__ and __LINE__ will refer to G_debug() itself, not
the caller, which isn't much use). But G_debug() is variadic, and
variadic macros aren't ANSI C (gcc provides them as an extension).

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




More information about the grass-dev mailing list