From d568ed2d3ba5d7d05e4381ee59468a124309f152 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:51:37 +0000 Subject: Item done counters Author: jgg Date: 1998-11-23 07:32:19 GMT Item done counters --- cmdline/acqprogress.cc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'cmdline/acqprogress.cc') diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc index ccc322084..194d3bb56 100644 --- a/cmdline/acqprogress.cc +++ b/cmdline/acqprogress.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: acqprogress.cc,v 1.2 1998/11/12 05:30:07 jgg Exp $ +// $Id: acqprogress.cc,v 1.3 1998/11/23 07:32:24 jgg Exp $ /* ###################################################################### Acquire Progress - Command line progress meter @@ -136,8 +136,9 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner) char *S = Buffer; // Put in the percent done - sprintf(S,"%ld%%",long(double(CurrentBytes*100.0)/double(TotalBytes))); - + sprintf(S,"%ld%%",long(double((CurrentBytes + CurrentItems)*100.0)/double(TotalBytes+TotalItems))); + + bool Shown = false; for (pkgAcquire::Worker *I = Owner->WorkersBegin(); I != 0; I = Owner->WorkerStep(I)) { @@ -151,6 +152,8 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner) continue; } + Shown = true; + // Add in the short description if (I->CurrentItem->Owner->ID != 0) snprintf(S,End-S," [%x %s",I->CurrentItem->Owner->ID, @@ -190,6 +193,10 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner) snprintf(S,End-S,"]"); } + // Show something.. + if (Shown == false) + snprintf(S,End-S," [Working]"); + // Put in the ETA and cps meter if (CurrentCPS != 0) { -- cgit v1.2.3