X-Recipient: archive-cygwin AT delorie DOT com X-Spam-Check-By: sourceware.org To: cygwin AT cygwin DOT com From: Bill Meier Subject: Re: Cygwin setup: DL rate should show as kB/s not kb/s ? Date: Wed, 20 Feb 2008 15:16:26 +0000 (UTC) Lines: 56 Message-ID: References: <200802181525 DOT m1IFPlBS035653 AT member DOT newsguy DOT com> <001601c8729a$8b72dd70$020aa8c0 AT DFW5RB41> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit User-Agent: Loom/3.14 (http://gmane.org/) X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Gary R. Van Sickle 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; 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/