// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: acqprogress.cc,v 1.21 2001/02/20 07:03:17 jgg Exp $
+// $Id: acqprogress.cc,v 1.22 2001/05/27 04:46:43 jgg Exp $
/* ######################################################################
Acquire Progress - Command line progress meter
#include <stdio.h>
#include <signal.h>
+#include <iostream>
/*}}}*/
+using namespace std;
+
// AcqTextStatus::AcqTextStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cache.cc,v 1.48 2001/05/11 05:07:06 jgg Exp $
+// $Id: apt-cache.cc,v 1.49 2001/05/27 04:46:43 jgg Exp $
/* ######################################################################
apt-cache - Manages the cache files
cout << " Version: " << V.VerStr() << endl;
cout << " File: " << V.FileList().File().FileName() << endl;
for (pkgCache::DepIterator D = V.DependsList(); D.end() == false; D++)
- cout << " Depends: " << D.TargetPkg().Name() << ' ' << D.TargetVer() << endl;
+ cout << " Depends: " << D.TargetPkg().Name() << ' ' <<
+ DeNull(D.TargetVer()) << endl;
}
}
cout << " ID: " << F->ID << endl;
cout << " Flags: " << F->Flags << endl;
cout << " Time: " << TimeRFC1123(F->mtime) << endl;
- cout << " Archive: " << F.Archive() << endl;
- cout << " Component: " << F.Component() << endl;
- cout << " Version: " << F.Version() << endl;
- cout << " Origin: " << F.Origin() << endl;
- cout << " Site: " << F.Site() << endl;
- cout << " Label: " << F.Label() << endl;
- cout << " Architecture: " << F.Architecture() << endl;
+ cout << " Archive: " << DeNull(F.Archive()) << endl;
+ cout << " Component: " << DeNull(F.Component()) << endl;
+ cout << " Version: " << DeNull(F.Version()) << endl;
+ cout << " Origin: " << DeNull(F.Origin()) << endl;
+ cout << " Site: " << DeNull(F.Site()) << endl;
+ cout << " Label: " << DeNull(F.Label()) << endl;
+ cout << " Architecture: " << DeNull(F.Architecture()) << endl;
}
return true;
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-cdrom.cc,v 1.37 2001/03/13 05:23:42 jgg Exp $
+// $Id: apt-cdrom.cc,v 1.38 2001/05/27 04:46:43 jgg Exp $
/* ######################################################################
APT CDROM - Tool for handling APT's CDROM database.
#include <stdio.h>
/*}}}*/
+using namespace std;
+
// FindPackages - Find the package files on the CDROM /*{{{*/
// ---------------------------------------------------------------------
/* We look over the cdrom for package files. This is a recursive
// Open the stream for reading
ifstream F((FileExists(File)?File.c_str():"/dev/null"),
- ios::in | ios::nocreate);
+ ios::in );
if (!F != 0)
return _error->Errno("ifstream::ifstream","Opening %s",File.c_str());
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: apt-get.cc,v 1.106 2001/04/28 01:18:37 doogie Exp $
+// $Id: apt-get.cc,v 1.107 2001/05/27 04:45:49 jgg Exp $
/* ######################################################################
apt-get - Cover for dpkg
#include <sys/wait.h>
/*}}}*/
-ostream c0out;
-ostream c1out;
-ostream c2out;
+using namespace std;
+
+ostream c0out(0);
+ostream c1out(0);
+ostream c2out(0);
ofstream devnull("/dev/null");
unsigned int ScreenWidth = 80;
bool Transient = false;
if (_config->FindB("APT::Get::Download",true) == false)
{
- for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd();)
+ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I < Fetcher.ItemsEnd();)
{
if ((*I)->Local == true)
{
// Print out errors
bool Failed = false;
- for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
+ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone &&
(*I)->Complete == true)
return false;
bool Failed = false;
- for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
+ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone)
continue;
// Print error messages
bool Failed = false;
- for (pkgAcquire::Item **I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
+ for (pkgAcquire::ItemIterator I = Fetcher.ItemsBegin(); I != Fetcher.ItemsEnd(); I++)
{
if ((*I)->Status == pkgAcquire::Item::StatDone &&
(*I)->Complete == true)
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexcopy.cc,v 1.7 2001/03/13 05:23:42 jgg Exp $
+// $Id: indexcopy.cc,v 1.8 2001/05/27 04:47:21 jgg Exp $
/* ######################################################################
Index Copying - Aid for copying and verifying the index files
#include <stdio.h>
/*}}}*/
+using namespace std;
+
// IndexCopy::CopyPackages - Copy the package files from the CD /*{{{*/
// ---------------------------------------------------------------------
/* */
SetCloseExec(STDOUT_FILENO,false);
const char *Args[3];
- Args[0] = _config->Find("Dir::bin::gzip","gzip").c_str();
+ string Tmp = _config->Find("Dir::bin::gzip","gzip");
+ Args[0] = Tmp.c_str();
Args[1] = "-d";
Args[2] = 0;
execvp(Args[0],(char **)Args);
return;
// Not a dists type.
- if (stringcmp(Path.begin(),Path.begin()+strlen("dists/"),"dists/") != 0)
+ if (stringcmp(Path.c_str(),Path.c_str()+strlen("dists/"),"dists/") != 0)
return;
// Isolate the dist
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: indexcopy.h,v 1.2 2001/02/20 07:03:17 jgg Exp $
+// $Id: indexcopy.h,v 1.3 2001/05/27 04:46:54 jgg Exp $
/* ######################################################################
Index Copying - Aid for copying and verifying the index files
#include <string>
#include <stdio.h>
+using std::string;
+using std::vector;
+
class pkgTagSection;
class FileFd;