[GRASS-dev] making grass modules less verbose
Glynn Clements
glynn at gclements.plus.com
Sat Sep 23 08:23:38 EDT 2006
Brad Douglas wrote:
> > Anything which is using fprintf(stderr, ...) should be changed to use
> > G_message() instead. Then the problem goes away, right?
>
> G_message("\n") = '\n\n' on screen. G_message(" ") seems a bit obscure.
> But yes, that particular problem would go away, but potentially creating
> a new one.
>
> Also, in loops outputting text, G_message() is generally not desirable
> because of it's "auto-CR" feature.
>
> Would be better to add a function [eg. G_message2()] that does not
> automatically append '\n' to text?
Are you referring to:
a) printing multiple strings without newlines, then adding a newline
at the end, or
b) including blank lines in the output, or
c) something else?
I don't consider either a) or b) to be sufficiently important to
justify bypassing G_message() in favour of explicit fprintf() calls.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list