avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [avrdude-dev] optional hash mark progress indicator


From: Rune Christensen
Subject: RE: [avrdude-dev] optional hash mark progress indicator
Date: Fri, 25 Jul 2003 12:41:08 +0200

Hello

The problem as I understand it is that in emacs the \r gives a newline ??

If that correct why not use \010 backspace or can't emacs handle that either
??

int i;

printf("writing: ....."); // five . to give the needed space

i = 0;

while(i <= 65535)
{
  if (i % 128 == 0)
  {
    printf("\010\010\010\010\010%5d", i);
  }

  i++;
}

printf("\010\010\010\010\010done.\n"); // writing: done.

Best Regards
Rune Christensen

-----Original Message-----
From: address@hidden
[mailto:address@hidden
Behalf Of Joerg Wunsch
Sent: Friday, July 25, 2003 9:55 AM
To: address@hidden
Subject: Re: [avrdude-dev] optional hash mark progress indicator


As Alex Shepherd wrote:

> Are you saying that it is it is updated every 16 bytes now but used
> to be every byte?

It used to be updated for every byte only in very early Unix versions
when the program was still called `avrprog'.  Apparently, even each 16
bytes is already slow enough on Win*'s sucking terminal emulation.
(But i agree, it's not that Win* has patented this idea, Sun's console
tty emulator sucks in a similar way, but nobody is ever going to use
/that/ except while booting the machine. ;-)

Perhaps a real tty @9600 Bd is even faster. :-)

Btw., how about turning the progress indicator into a percentage
indicator, now that you're going to touch it anyways?  After all,
avrdude knows beforehand how much data to write or expect, so it
shouldn't be that difficult.  Then, print out the progress each 5 or
10 % (perhaps using smaller percentage steps on large devices).  If
output goes to a tty, make the progress printout similar to what it is
now, i. e. each new number uses a \r first, and overwrites the
previous one.  If output doesn't go to a tty, instead simply append a
space and the new number behind.  When printing each 10 % mark, this
would even fit into 80 columns.

--
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/


_______________________________________________
avrdude-dev mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/avrdude-dev





reply via email to

[Prev in Thread] Current Thread [Next in Thread]