Browse Source

G++3 fixes from Randolph

Author: jgg
Date: 2001-05-27 04:45:49 GMT
G++3 fixes from Randolph
debian/1.8.y
Arch Librarian 19 years ago
parent
commit
076d01b04c
  1. 5
      cmdline/acqprogress.cc
  2. 19
      cmdline/apt-cache.cc
  3. 6
      cmdline/apt-cdrom.cc
  4. 18
      cmdline/apt-get.cc
  5. 9
      cmdline/indexcopy.cc
  6. 5
      cmdline/indexcopy.h

5
cmdline/acqprogress.cc

@ -1,6 +1,6 @@
// -*- 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
@ -18,8 +18,11 @@
#include <stdio.h>
#include <signal.h>
#include <iostream>
/*}}}*/
using namespace std;
// AcqTextStatus::AcqTextStatus - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */

19
cmdline/apt-cache.cc

@ -1,6 +1,6 @@
// -*- 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
@ -337,7 +337,8 @@ bool Dump(CommandLine &Cmd)
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;
}
}
@ -349,13 +350,13 @@ bool Dump(CommandLine &Cmd)
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;

6
cmdline/apt-cdrom.cc

@ -1,6 +1,6 @@
// -*- 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.
@ -34,6 +34,8 @@
#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
@ -364,7 +366,7 @@ bool WriteSourceList(string Name,vector<string> &List,bool Source)
// 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());

18
cmdline/apt-get.cc

@ -1,6 +1,6 @@
// -*- 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
@ -58,9 +58,11 @@
#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;
@ -766,7 +768,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = true,
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)
{
@ -790,7 +792,7 @@ bool InstallPackages(CacheFile &Cache,bool ShwKept,bool Ask = 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)
@ -1149,7 +1151,7 @@ bool DoUpdate(CommandLine &CmdL)
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;
@ -1694,7 +1696,7 @@ bool DoSource(CommandLine &CmdL)
// 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)

9
cmdline/indexcopy.cc

@ -1,6 +1,6 @@
// -*- 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
@ -25,6 +25,8 @@
#include <stdio.h>
/*}}}*/
using namespace std;
// IndexCopy::CopyPackages - Copy the package files from the CD /*{{{*/
// ---------------------------------------------------------------------
/* */
@ -94,7 +96,8 @@ bool IndexCopy::CopyPackages(string CDROM,string Name,vector<string> &List)
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);
@ -394,7 +397,7 @@ void IndexCopy::ConvertToSourceList(string CD,string &Path)
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

5
cmdline/indexcopy.h

@ -1,6 +1,6 @@
// -*- 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
@ -14,6 +14,9 @@
#include <string>
#include <stdio.h>
using std::string;
using std::vector;
class pkgTagSection;
class FileFd;

Loading…
Cancel
Save