[GRASS-dev] r.timestamp script style output wish

Hamish hamish_b at yahoo.com
Wed Oct 6 05:43:48 EDT 2010


Markus wrote:
> I would like to add a -g flag to r.timestamp for shell
> script style output plus another
> -n flag for numerical month output (only with -g to avoid
> timestamp order confusion):
...
> The problem is that r.timestamp uses
>  G__write_timestamp(stdout, &ts);
...
> Since it prints into stdout and prints directly in the
> libgis function I have no idea how to hijack the output in 
> order to apply G_str_replace() for the month-name to
> month-number replacement etc.
> 
> How could -g and -n be implemented?

add a new
 G__write_timestamp2(FILE *, const struct TimeStamp *,
                     int shell_style, int numeric)

then apply booleans at runtime?


Hamish



      


More information about the grass-dev mailing list