[GRASS-dev] howto rewrite r.colors using G_message and G_warning

Helena Mitasova hmitaso at unity.ncsu.edu
Tue Sep 26 09:28:34 EDT 2006


On Sep 26, 2006, at 5:17 AM, Jachym Cepicky wrote:

> Hallo,
> i have question considering replacing fprintf functions with  
> G_message and G_warning in GRASS modules.
>
> Currently, i come to r.colors, which structure is very complicated.  
> This
> module can be also run in interactive mode:
>
> r.colors pokus color=rules
> Enter rules, "end" when done, "help" if you need it.
> Data range is 1 to 683
>>
>
> I'm not shure, if these strings should be printed using G_message  
> or if
> they should stay untouched. I'm also not shure, if the module needs  
> this
> interactive mode at all - if it should not better be removed (and the
> structure of the module would be simplified).

Please do not remove this option - I use this option much more than  
the other ones.
Of course, it can be replaced by a nicer implementation.

Helena
>
> If the interactive mode should remain untached, maybe functions
> G_tty() and G_promt() should be introduced:
>
> G_tty(_(Enter rules, "end" when done, "help" if you need it.));
> G_promt()
>
> which would show
>
> Enter rules, "end" when done, "help" if you need it.
>>
>
> Could anybody give advice how to approach to modules like r.colors?
>
> Thank you
>
> jachym
> -- 
> Jachym Cepicky
> e-mail: jachym.cepicky at centrum.cz
> URL: http://les-ejk.cz
> GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky- 
> gpg_public_key.asc
> -----------------------------------------
> OFFICE:
> GDF-Hannover
> Mengendamm 16d
> 30177 Hannover
> Germany
> e-mail: cepicky at gdf-hannover.de
> URL:    http://gdf-hannover.de
> Tel.:   +49 511-39088507
> _______________________________________________
> grass-dev mailing list
> grass-dev at grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev




More information about the grass-dev mailing list