Re: [mu TECH] To print without CR

From: Denis Bredelet (denis.bredelet@laposte.net)
Date: Thu Sep 28 2000 - 17:32:17 CEST


I suppose you could also use:

  printf("%d%%\r", progress);

(display progress indication, character %, then turn back to the
beginning of the line)
C is sometimes nasty but one can take over it.

-- Denis.

Michele Andreoli a écrit :

> I added a progress indicator in "fastdd"; now, during addons loading,
> the completed percentage is shown.
>
> Managing the problem to avoid a new-line to any new percentage value,
> I found the solution in the fdformat.c source (forgive my
> ignorance!):
>
> printf("%3d\b\b\b", integer);
>
> I was initially conviced to must deal with ioctl() or terminal
> attribute!
>
> Michele
> --
> I'd like to conclude with a positive statement, but I can't
> remember any. Would two negative ones do? -- Woody Allen
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
> For additional commands, e-mail: mulinux-help@sunsite.auc.dk

---------------------------------------------------------------------
To unsubscribe, e-mail: mulinux-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: mulinux-help@sunsite.auc.dk



This archive was generated by hypermail 2.1.6 : Sat Feb 08 2003 - 15:27:16 CET