Mail Archives: cygwin/2008/02/20/10:26:11
Gary R. Van Sickle <g.r.vansickle <at> worldnet.att.net> writes:
>
> > From: Bill Meier
> > or maybe KB/s for kilobytes/sec ?
> >
>
> It should be an option, but that begs an "Options..." dialog, which doesn't
> exist.
>
Unfortunately I didn't express myself clearly in my original message.
The numeric DLL rate shown by the Cygwin setup program is actually in units of
K Bytes/sec and thus either kB/s or KB/s should be used as the text following
the numeric rate.
Looking at the code I also note that maybe the 2nd sprintf should be changed to
use %03.1f to be consistent with the 1st sprintf ...
Bill Meier
=================================================================
From geturl.cc
static void
progress (int bytes)
{
if (is_local_install)
return;
static char buf[100];
double kbps;
<snip>
kbps = ((double)bytes) / (double)(tics - start_tics);
if (max_bytes > 0)
{
int perc = (int)(100.0 * ((double)bytes) / (double)max_bytes);
Progress.SetBar1(bytes, max_bytes);
sprintf (buf, "%d %% (%dk/%dk) %03.1f kb/s",
perc, bytes / 1000, max_bytes / 1000, kbps);
if (total_download_bytes > 0)
Progress.SetBar2(total_download_bytes_sofar + bytes,
total_download_bytes);
}
else
sprintf (buf, "%d %2.1f kb/s", bytes, kbps);
Progress.SetText3(buf);
}
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -