[GRASS5] Re: bugs in 5.7's tcltkgrass

Radim Blazek blazek at itc.it
Fri Oct 15 04:29:22 EDT 2004


On Friday 15 October 2004 08:38, Hamish wrote:
> > > 3. all modules I tried in 5.7 display this instead of percents only:
> > > Percent complete:    2%   5%   8% (...) 100%
> >
> > On my computer, it goes:
> >
> > Percent complete: 2%/b/b/b/b5%/b/b/b and so forth...most of the time.
> > Other times, it stops after a few increments, then does nothing until
> > 100%
>
> To fix this basically we need a G_is_ui() function which could be called
> in G_percent():
>
>
> printf("%3d%%", percent_done);
> if( G_is_ui() )
>    printf("\n");  // newline
> else
>    printf("\b\b\b\b");  // 4x backspaces
>
> easier said than done though.

I think that we should define format of messages printed 
when module is run from GUI. For example
PERCENT: %d
which can be parsed by GUI and displayed in progress bar.

The format could be switched on by enviroment variable.

Radim




More information about the grass-dev mailing list