summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:53:59 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:53:59 +0000
commit314037ba995328f4ac1026bbfb2125af6224248c (patch)
tree805bd02de46b263652ac8966645724e6de020d21 /cmdline
parent8195ae461bbe065c5d81f0e95b7f834a2549db39 (diff)
Fixed list notation doc bug and 'b' vs 'B'
Author: jgg Date: 1999-06-06 05:52:37 GMT Fixed list notation doc bug and 'b' vs 'B'
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/acqprogress.cc16
-rw-r--r--cmdline/apt-config.cc13
-rw-r--r--cmdline/apt-get.cc16
3 files changed, 28 insertions, 17 deletions
diff --git a/cmdline/acqprogress.cc b/cmdline/acqprogress.cc
index a5383a838..5e88d3cd0 100644
--- a/cmdline/acqprogress.cc
+++ b/cmdline/acqprogress.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acqprogress.cc,v 1.13 1999/04/20 05:59:29 jgg Exp $
+// $Id: acqprogress.cc,v 1.14 1999/06/06 05:52:37 jgg Exp $
/* ######################################################################
Acquire Progress - Command line progress meter
@@ -48,7 +48,7 @@ void AcqTextStatus::IMSHit(pkgAcquire::ItemDesc &Itm)
cout << "Hit " << Itm.Description;
if (Itm.Owner->FileSize != 0)
- cout << " [" << SizeToStr(Itm.Owner->FileSize) << "b]";
+ cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
cout << endl;
Update = true;
};
@@ -72,7 +72,7 @@ void AcqTextStatus::Fetch(pkgAcquire::ItemDesc &Itm)
cout << "Get:" << Itm.Owner->ID << ' ' << Itm.Description;
if (Itm.Owner->FileSize != 0)
- cout << " [" << SizeToStr(Itm.Owner->FileSize) << "b]";
+ cout << " [" << SizeToStr(Itm.Owner->FileSize) << "B]";
cout << endl;
};
/*}}}*/
@@ -122,9 +122,9 @@ void AcqTextStatus::Stop()
cout << '\r' << BlankLine << '\r';
if (FetchedBytes != 0)
- cout << "Fetched " << SizeToStr(FetchedBytes) << "b in " <<
+ cout << "Fetched " << SizeToStr(FetchedBytes) << "B in " <<
TimeToStr(ElapsedTime) << " (" << SizeToStr(CurrentCPS) <<
- "b/s)" << endl;
+ "B/s)" << endl;
}
/*}}}*/
// AcqTextStatus::Pulse - Regular event pulse /*{{{*/
@@ -189,7 +189,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
else
{
if (Mode == Medium || I->TotalSize == 0)
- snprintf(S,End-S," %sb",SizeToStr(I->CurrentSize).c_str());
+ snprintf(S,End-S," %sB",SizeToStr(I->CurrentSize).c_str());
}
S += strlen(S);
@@ -200,7 +200,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
snprintf(S,End-S," %lu%%",
long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
else
- snprintf(S,End-S,"/%sb %lu%%",SizeToStr(I->TotalSize).c_str(),
+ snprintf(S,End-S,"/%sB %lu%%",SizeToStr(I->TotalSize).c_str(),
long(double(I->CurrentSize*100.0)/double(I->TotalSize)));
}
S += strlen(S);
@@ -222,7 +222,7 @@ void AcqTextStatus::Pulse(pkgAcquire *Owner)
{
char Tmp[300];
unsigned long ETA = (unsigned long)((TotalBytes - CurrentBytes)/CurrentCPS);
- sprintf(Tmp," %sb/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
+ sprintf(Tmp," %sB/s %s",SizeToStr(CurrentCPS).c_str(),TimeToStr(ETA).c_str());
unsigned int Len = strlen(Buffer);
unsigned int LenT = strlen(Tmp);
if (Len + LenT < ScreenWidth)
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index c626a1ee0..3de59aee5 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-config.cc,v 1.5 1999/05/23 05:45:12 jgg Exp $
+// $Id: apt-config.cc,v 1.6 1999/06/06 05:52:37 jgg Exp $
/* ######################################################################
APT Config - Program to manipulate APT configuration files
@@ -51,6 +51,15 @@ bool DoShell(CommandLine &CmdL)
return true;
}
/*}}}*/
+// DoDump - Dump the configuration space /*{{{*/
+// ---------------------------------------------------------------------
+/* */
+bool DoDump(CommandLine &CmdL)
+{
+ _config->Dump();
+ return true;
+}
+ /*}}}*/
// ShowHelp - Show the help screen /*{{{*/
// ---------------------------------------------------------------------
/* */
@@ -67,6 +76,7 @@ int ShowHelp()
cout << endl;
cout << "Commands:" << endl;
cout << " shell - Shell mode" << endl;
+ cout << " dump - Show the configuration" << endl;
cout << endl;
cout << "Options:" << endl;
cout << " -h This help text." << endl;
@@ -85,6 +95,7 @@ int main(int argc,const char *argv[])
{'o',"option",0,CommandLine::ArbItem},
{0,0,0,0}};
CommandLine::Dispatch Cmds[] = {{"shell",&DoShell},
+ {"dump",&DoDump},
{0,0}};
// Parse the command line and initialize the package library
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 585026aba..a40b8a4c7 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1,6 +1,6 @@
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.63 1999/06/05 07:30:18 jgg Exp $
+// $Id: apt-get.cc,v 1.64 1999/06/06 05:52:37 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
@@ -525,17 +525,17 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,bool Saftey =
// Number of bytes
c1out << "Need to get ";
if (DebBytes != FetchBytes)
- c1out << SizeToStr(FetchBytes) << "b/" << SizeToStr(DebBytes) << 'b';
+ c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B';
else
- c1out << SizeToStr(DebBytes) << 'b';
+ c1out << SizeToStr(DebBytes) << 'B';
c1out << " of archives. After unpacking ";
// Size delta
if (Cache->UsrSize() >= 0)
- c1out << SizeToStr(Cache->UsrSize()) << "b will be used." << endl;
+ c1out << SizeToStr(Cache->UsrSize()) << "B will be used." << endl;
else
- c1out << SizeToStr(-1*Cache->UsrSize()) << "b will be freed." << endl;
+ c1out << SizeToStr(-1*Cache->UsrSize()) << "B will be freed." << endl;
if (_error->PendingError() == true)
return false;
@@ -1024,7 +1024,7 @@ class LogCleaner : public pkgArchiveCleaner
protected:
virtual void Erase(const char *File,string Pkg,string Ver,struct stat &St)
{
- cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "b]" << endl;
+ cout << "Del " << Pkg << " " << Ver << " [" << SizeToStr(St.st_size) << "B]" << endl;
};
};
@@ -1194,9 +1194,9 @@ bool DoSource(CommandLine &CmdL)
// Number of bytes
c1out << "Need to get ";
if (DebBytes != FetchBytes)
- c1out << SizeToStr(FetchBytes) << "b/" << SizeToStr(DebBytes) << 'b';
+ c1out << SizeToStr(FetchBytes) << "B/" << SizeToStr(DebBytes) << 'B';
else
- c1out << SizeToStr(DebBytes) << 'b';
+ c1out << SizeToStr(DebBytes) << 'B';
c1out << " of source archives." << endl;
if (_config->FindB("APT::Get::Simulate",false) == true)