Re: [As-users] aterm and fflush()

Pierre Maziere (peetah_ml@club-internet.fr)
Thu, 3 Mar 2005 20:55:26 +0100 (CET)



So nobody for my obviously anachronic problem ?


On Sun, 20 Feb 2005, Pierre Maziere wrote:

>
> Hi,
>
> Sorry if this results in a doublon, as I sent this mail a first time with the 
> wrong address for this mailing list.
>
> I was just testing a little piece of code under aterm 0.4.0 and noticed that 
> the resulting behavior was not the same as with xterm.
>
> here is the short code:
>
> #include <stdlib.h>
> #include <stdio.h>
> #include <unistd.h>
>
> int main(void)
> {
>   unsigned int i;
>   fprintf(stdout,"\n");
>   for (i=0;i<10000;i++)
>     {
>       	usleep(200);
> 	fprintf(stdout,"... %05u\r",i);
> 	fflush(stdout);
>     }
>
>   exit(EXIT_SUCCESS);
> }
>
> With xterm, I obtain the expected behavior: displaying, on the same line,
> numbers from 0 to 10000, then exit.
>
> With aterm 0.4.0, fflush(stdout) doesn't seem to do his job since nothing is 
> displayed on the screen, and the program exits after the time required to 
> perform the loop. Or perhaps it does not handle correctly tha carriage return 
> character '\r'.
>
> I know that aterm is now in version 1.00 beta, but I can't install afterstep 
> 2.0 for several reasons.
>
> Therefore I would like to ask you to answer the 3 following:
>
> - was this a known bug of aterm 0.4.0 ? ( in this case, I apologize for
>  this mail, but my googling did not give me any answer)
>
> - can someone confirm the described behavior with aterm 0.4.0 ?
>
> - can someone test the above code with the latest aterm version and
>  tell me if the resulting behavior is as the one with xterm
>
> thanks
>
> Pierre
_______________________________________________
As-users mailing list
As-users@afterstep.org
http://mail.afterstep.org/mailman/listinfo/as-users