[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

g++ 3.0 patch for apt (partial)



Here's a partial g++ 3.0 patch for apt. it's slightly dated, but gives
an idea about the things that need fixing. Please review and comment;
some of the changes are less than optimal. there might also be some
random obvious hackery that need to be cleaned up, the goal here was
simply to get something that will compile.

randolph
-- 
Debian Developer <tausq@debian.org>
http://www.TauSq.org/


Index: apt-inst/extract.cc
===================================================================
RCS file: /cvs/deity/apt/apt-inst/extract.cc,v
retrieving revision 1.2
diff -u -r1.2 extract.cc
--- apt-inst/extract.cc	2001/02/20 07:03:16	1.2
+++ apt-inst/extract.cc	2001/04/25 07:01:31
@@ -56,6 +56,7 @@
 #include <unistd.h>
 #include <errno.h>
 #include <dirent.h>
+#include <iostream.h>
 									/*}}}*/
 
 static const char *TempExt = "dpkg-tmp";
@@ -473,8 +474,8 @@
       
       // Look up the node
       File = Dir + Dent->d_name;
-      pkgFLCache::NodeIterator Nde = FLCache.GetNode(File.begin(),
-						     File.end(),0,false,false);
+      pkgFLCache::NodeIterator Nde = FLCache.GetNode(File.c_str(),
+						     File.c_str() + File.length(),0,false,false);
 
       // The file is not owned by this package
       if (Nde.end() != false || Nde.RealPackage() != FLPkg)
Index: apt-inst/filelist.cc
===================================================================
RCS file: /cvs/deity/apt/apt-inst/filelist.cc,v
retrieving revision 1.2
diff -u -r1.2 filelist.cc
--- apt-inst/filelist.cc	2001/02/20 07:03:16	1.2
+++ apt-inst/filelist.cc	2001/04/25 07:01:31
@@ -45,6 +45,8 @@
 #include <stdlib.h>
 #include <string.h>
 #include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 // FlCache::Header::Header - Constructor				/*{{{*/
Index: apt-inst/contrib/extracttar.cc
===================================================================
RCS file: /cvs/deity/apt/apt-inst/contrib/extracttar.cc,v
retrieving revision 1.2
diff -u -r1.2 extracttar.cc
--- apt-inst/contrib/extracttar.cc	2001/02/20 07:03:17	1.2
+++ apt-inst/contrib/extracttar.cc	2001/04/25 07:01:32
@@ -30,6 +30,7 @@
 #include <unistd.h>
 #include <signal.h>
 #include <fcntl.h>
+#include <iostream.h>
 									/*}}}*/
 
 // The on disk header for a tar file.
Index: apt-inst/deb/dpkgdb.cc
===================================================================
RCS file: /cvs/deity/apt/apt-inst/deb/dpkgdb.cc,v
retrieving revision 1.2
diff -u -r1.2 dpkgdb.cc
--- apt-inst/deb/dpkgdb.cc	2001/02/20 07:03:17	1.2
+++ apt-inst/deb/dpkgdb.cc	2001/04/25 07:01:32
@@ -30,6 +30,8 @@
 #include <sys/mman.h>
 #include <fcntl.h>
 #include <unistd.h>
+#include <ctype.h>
+#include <iostream.h>
 									/*}}}*/
 
 // EraseDir - Erase A Directory						/*{{{*/
Index: apt-pkg/acquire-item.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/acquire-item.cc,v
retrieving revision 1.43
diff -u -r1.43 acquire-item.cc
--- apt-pkg/acquire-item.cc	2001/02/27 04:24:41	1.43
+++ apt-pkg/acquire-item.cc	2001/04/25 07:01:32
@@ -28,9 +28,10 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
-#include <string.h>
+#include <string>
 #include <stdio.h>
 									/*}}}*/
+using std::string;
 
 // Acquire::Item::Item - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
Index: apt-pkg/acquire-method.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/acquire-method.cc,v
retrieving revision 1.26
diff -u -r1.26 acquire-method.cc
--- apt-pkg/acquire-method.cc	2001/03/13 06:51:46	1.26
+++ apt-pkg/acquire-method.cc	2001/04/25 07:01:33
@@ -24,10 +24,13 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/hashes.h>
-    
+
+#include <iostream>
 #include <stdarg.h>
 #include <stdio.h>
 #include <unistd.h>
+
+using namespace std;
 									/*}}}*/
 
 // AcqMethod::pkgAcqMethod - Constructor				/*{{{*/
@@ -86,7 +89,7 @@
 void pkgAcqMethod::Fail(string Err,bool Transient)
 {
    // Strip out junk from the error messages
-   for (char *I = Err.begin(); I != Err.end(); I++)
+   for (char *I = const_cast<char *>(Err.c_str()); *I != 0; I++)
    {
       if (*I == '\r') 
 	 *I = ' ';
@@ -283,10 +286,10 @@
 {
    ::Configuration &Cnf = *_config;
    
-   const char *I = Message.begin();
+   const char *I = Message.c_str();
    
    unsigned int Length = strlen("Config-Item");
-   for (; I + Length < Message.end(); I++)
+   for (; I + Length < Message.c_str() + Message.length(); I++)
    {
       // Not a config item
       if (I[Length] != ':' || stringcasecmp(I,I+Length,"Config-Item") != 0)
@@ -294,11 +297,11 @@
       
       I += Length + 1;
       
-      for (; I < Message.end() && *I == ' '; I++);
+      for (; I < Message.c_str() + Message.length() && *I == ' '; I++);
       const char *Equals = I;
-      for (; Equals < Message.end() && *Equals != '='; Equals++);
+      for (; Equals < (Message.c_str() + Message.length()) && *Equals != '='; Equals++);
       const char *End = Equals;
-      for (; End < Message.end() && *End != '\n'; End++);
+      for (; End < (Message.c_str() + Message.length()) && *End != '\n'; End++);
       if (End == Equals)
 	 return false;
       
Index: apt-pkg/acquire-worker.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/acquire-worker.cc,v
retrieving revision 1.33
diff -u -r1.33 acquire-worker.cc
--- apt-pkg/acquire-worker.cc	2001/03/23 01:47:14	1.33
+++ apt-pkg/acquire-worker.cc	2001/04/25 07:01:33
@@ -23,6 +23,9 @@
 #include <apt-pkg/strutl.h>
 
 #include <apti18n.h>
+
+#include <iostream>
+#include <fstream>
     
 #include <sys/stat.h>
 #include <unistd.h>
@@ -30,6 +33,8 @@
 #include <signal.h>
 #include <stdio.h>
 #include <errno.h>
+
+using namespace std;
 									/*}}}*/
 
 // Worker::Worker - Constructor for Queue startup			/*{{{*/
@@ -128,7 +133,9 @@
       // Setup the FDs
       dup2(Pipes[1],STDOUT_FILENO);
       dup2(Pipes[2],STDIN_FILENO);
-      dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
+      // tausq:g++v3 begin
+      // dup2(((filebuf *)clog.rdbuf())->fd(),STDERR_FILENO);
+      // tausq:g++v3 end
       SetCloseExec(STDOUT_FILENO,false);
       SetCloseExec(STDIN_FILENO,false);      
       SetCloseExec(STDERR_FILENO,false);
@@ -462,7 +469,7 @@
    int Res;
    do
    {
-      Res = write(OutFd,OutQueue.begin(),OutQueue.length());
+      Res = write(OutFd,OutQueue.c_str(),OutQueue.length());
    }
    while (Res < 0 && errno == EINTR);
    
Index: apt-pkg/acquire.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/acquire.cc,v
retrieving revision 1.47
diff -u -r1.47 acquire.cc
--- apt-pkg/acquire.cc	2001/02/20 07:03:17	1.47
+++ apt-pkg/acquire.cc	2001/04/25 07:01:34
@@ -24,11 +24,15 @@
 #include <apt-pkg/strutl.h>
 
 #include <apti18n.h>
+
+#include <iostream>
     
 #include <dirent.h>
 #include <sys/time.h>
 #include <errno.h>
 #include <sys/stat.h>
+
+using namespace std;
 									/*}}}*/
 
 // Acquire::pkgAcquire - Constructor					/*{{{*/
@@ -109,7 +113,7 @@
 {
    Dequeue(Itm);
    
-   for (vector<Item *>::iterator I = Items.begin(); I < Items.end(); I++)
+   for (ItemIterator I = Items.begin(); I < Items.end(); I++)
    {
       if (*I == Itm)
 	 Items.erase(I);
@@ -364,7 +368,7 @@
       I->Shutdown(false);
 
    // Shut down the items
-   for (Item **I = Items.begin(); I != Items.end(); I++)
+   for (ItemIterator I = Items.begin(); I != Items.end(); I++)
       (*I)->Finished(); 
    
    if (_error->PendingError())
@@ -419,7 +423,7 @@
 	 continue;
       
       // Look in the get list
-      vector<Item *>::iterator I = Items.begin();
+      ItemIterator I = Items.begin();
       for (; I != Items.end(); I++)
 	 if (flNotDir((*I)->DestFile) == Dir->d_name)
 	    break;
@@ -440,7 +444,7 @@
 double pkgAcquire::TotalNeeded()
 {
    double Total = 0;
-   for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++)
+   for (ItemIterator I = ItemsBegin(); I != ItemsEnd(); I++)
       Total += (*I)->FileSize;
    return Total;
 }
@@ -451,7 +455,7 @@
 double pkgAcquire::FetchNeeded()
 {
    double Total = 0;
-   for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++)
+   for (ItemIterator I = ItemsBegin(); I != ItemsEnd(); I++)
       if ((*I)->Local == false)
 	 Total += (*I)->FileSize;
    return Total;
@@ -463,7 +467,7 @@
 double pkgAcquire::PartialPresent()
 {
   double Total = 0;
-   for (pkgAcquire::Item **I = ItemsBegin(); I != ItemsEnd(); I++)
+   for (ItemIterator I = ItemsBegin(); I != ItemsEnd(); I++)
       if ((*I)->Local == false)
 	 Total += (*I)->PartialSize;
    return Total;
@@ -728,7 +732,7 @@
    // Compute the total number of bytes to fetch
    unsigned int Unknown = 0;
    unsigned int Count = 0;
-   for (pkgAcquire::Item **I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); 
+   for (pkgAcquire::ItemIterator I = Owner->ItemsBegin(); I != Owner->ItemsEnd(); 
 	I++, Count++)
    {
       TotalItems++;
Index: apt-pkg/acquire.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/acquire.h,v
retrieving revision 1.28
diff -u -r1.28 acquire.h
--- apt-pkg/acquire.h	2001/02/20 07:03:17	1.28
+++ apt-pkg/acquire.h	2001/04/25 07:01:34
@@ -35,6 +35,9 @@
 #include <vector>
 #include <string>
 
+using std::vector;
+using std::string;
+
 #ifdef __GNUG__
 #pragma interface "apt-pkg/acquire.h"
 #endif 
@@ -58,7 +61,8 @@
    protected:
    
    // List of items to fetch
-   vector<Item *> Items;
+   typedef vector<Item *> ItemVector_t;
+   ItemVector_t Items;
    
    // List of active queues and fetched method configuration parameters
    Queue *Queues;
@@ -90,6 +94,8 @@
    
    public:
 
+   typedef ItemVector_t::iterator ItemIterator;
+
    MethodConfig *GetConfig(string Access);
 
    enum RunResult {Continue,Failed,Cancelled};
@@ -100,8 +106,8 @@
    // Simple iteration mechanism
    inline Worker *WorkersBegin() {return Workers;};
    Worker *WorkerStep(Worker *I);
-   inline Item **ItemsBegin() {return Items.begin();};
-   inline Item **ItemsEnd() {return Items.end();};
+   inline ItemIterator ItemsBegin() {return Items.begin();};
+   inline ItemIterator ItemsEnd() {return Items.end();};
    
    // Iterate over queued Item URIs
    class UriIterator;
Index: apt-pkg/algorithms.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/algorithms.h,v
retrieving revision 1.9
diff -u -r1.9 algorithms.h
--- apt-pkg/algorithms.h	2001/02/20 07:03:17	1.9
+++ apt-pkg/algorithms.h	2001/04/25 07:01:34
@@ -37,6 +37,9 @@
 #include <apt-pkg/packagemanager.h>
 #include <apt-pkg/depcache.h>
 
+#include <iostream>
+using std::ostream;
+
 class pkgSimulate : public pkgPackageManager
 {
    protected:
Index: apt-pkg/indexfile.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/indexfile.h,v
retrieving revision 1.3
diff -u -r1.3 indexfile.h
--- apt-pkg/indexfile.h	2001/03/11 07:35:49	1.3
+++ apt-pkg/indexfile.h	2001/04/25 07:01:34
@@ -30,6 +30,8 @@
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/pkgrecords.h>
     
+using std::string;
+
 class pkgAcquire;
 class pkgCacheGenerator;
 class OpProgress;
Index: apt-pkg/orderlist.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/orderlist.cc,v
retrieving revision 1.12
diff -u -r1.12 orderlist.cc
--- apt-pkg/orderlist.cc	2001/02/20 07:03:17	1.12
+++ apt-pkg/orderlist.cc	2001/04/25 07:01:35
@@ -72,7 +72,10 @@
 #include <apt-pkg/version.h>
 #include <apt-pkg/sptr.h>
 #include <apt-pkg/configuration.h>
-									/*}}}*/
+
+#include <iostream>
+
+using namespace std;
 
 pkgOrderList *pkgOrderList::Me = 0;
 
Index: apt-pkg/packagemanager.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/packagemanager.cc,v
retrieving revision 1.26
diff -u -r1.26 packagemanager.cc
--- apt-pkg/packagemanager.cc	2001/02/20 07:03:17	1.26
+++ apt-pkg/packagemanager.cc	2001/04/25 07:01:36
@@ -28,6 +28,9 @@
 #include <apt-pkg/sptr.h>
     
 #include <apti18n.h>    
+#include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 // PM::PackageManager - Constructor					/*{{{*/
Index: apt-pkg/packagemanager.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/packagemanager.h,v
retrieving revision 1.12
diff -u -r1.12 packagemanager.h
--- apt-pkg/packagemanager.h	2001/03/11 07:35:49	1.12
+++ apt-pkg/packagemanager.h	2001/04/25 07:01:36
@@ -30,6 +30,8 @@
 #include <string>
 #include <apt-pkg/pkgcache.h>
 
+using std::string;
+
 class pkgAcquire;
 class pkgDepCache;
 class pkgSourceList;
Index: apt-pkg/pkgcache.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/pkgcache.cc,v
retrieving revision 1.33
diff -u -r1.33 pkgcache.cc
--- apt-pkg/pkgcache.cc	2001/03/05 02:43:28	1.33
+++ apt-pkg/pkgcache.cc	2001/04/25 07:01:38
@@ -37,8 +37,11 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include <ctype.h>
 #include <system.h>
 
+using std::string;
+
 									/*}}}*/
 
 // Cache::Header::Header - Constructor					/*{{{*/
@@ -154,7 +157,7 @@
 unsigned long pkgCache::sHash(string Str) const
 {
    unsigned long Hash = 0;
-   for (const char *I = Str.begin(); I != Str.end(); I++)
+   for (string::iterator I = Str.begin(); I != Str.end(); I++)
       Hash = 5*Hash + tolower(*I);
    return Hash % _count(HeaderP->HashTable);
 }
@@ -178,7 +181,7 @@
    for (; Pkg != PkgP; Pkg = PkgP + Pkg->NextPackage)
    {
       if (Pkg->Name != 0 && StrP[Pkg->Name] == Name[0] &&
-	  stringcasecmp(Name.begin(),Name.end(),StrP + Pkg->Name) == 0)
+	  stringcasecmp(Name.c_str(),Name.c_str()+Name.length(),StrP + Pkg->Name) == 0)
 	 return PkgIterator(*this,Pkg);
    }
    return PkgIterator(*this,0);
Index: apt-pkg/pkgcache.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/pkgcache.h,v
retrieving revision 1.23
diff -u -r1.23 pkgcache.h
--- apt-pkg/pkgcache.h	2001/02/20 07:03:17	1.23
+++ apt-pkg/pkgcache.h	2001/04/25 07:01:38
@@ -26,6 +26,8 @@
 #include <string>
 #include <time.h>
 #include <apt-pkg/mmap.h>
+
+using std::string;
     
 class pkgVersioningSystem;
 class pkgCache
Index: apt-pkg/pkgcachegen.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/pkgcachegen.cc,v
retrieving revision 1.47
diff -u -r1.47 pkgcachegen.cc
--- apt-pkg/pkgcachegen.cc	2001/03/04 00:12:41	1.47
+++ apt-pkg/pkgcachegen.cc	2001/04/25 07:01:39
@@ -27,13 +27,16 @@
 #include <apt-pkg/pkgsystem.h>
 
 #include <apti18n.h>
-    
+
+#include <vector>
+
 #include <sys/stat.h>
 #include <unistd.h>
 #include <errno.h>
 #include <stdio.h>
 #include <system.h>
 									/*}}}*/
+typedef vector<pkgIndexFile *>::iterator FileIterator;
 
 // CacheGenerator::pkgCacheGenerator - Constructor			/*{{{*/
 // ---------------------------------------------------------------------
@@ -131,7 +134,7 @@
       int Res = 1;
       for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
       {
-	 Res = Cache.VS->DoCmpVersion(Version.begin(),Version.end(),Ver.VerStr(),
+	 Res = Cache.VS->DoCmpVersion(Version.c_str(),Version.c_str()+Version.length(),Ver.VerStr(),
 				 Ver.VerStr() + strlen(Ver.VerStr()));
 	 if (Res >= 0)
 	    break;
@@ -163,7 +166,7 @@
       {
 	 for (; Ver.end() == false; Last = &Ver->NextVer, Ver++)
 	 {
-	    Res = Cache.VS->DoCmpVersion(Version.begin(),Version.end(),Ver.VerStr(),
+	    Res = Cache.VS->DoCmpVersion(Version.c_str(),Version.c_str()+Version.length(),Ver.VerStr(),
 				    Ver.VerStr() + strlen(Ver.VerStr()));
 	    if (Res != 0)
 	       break;
@@ -470,8 +473,8 @@
 /* This just verifies that each file in the list of index files exists,
    has matching attributes with the cache and the cache does not have
    any extra files. */
-static bool CheckValidity(string CacheFile,pkgIndexFile **Start,
-			  pkgIndexFile **End,MMap **OutMap = 0)
+static bool CheckValidity(string CacheFile, FileIterator Start, 
+                          FileIterator End,MMap **OutMap = 0)
 {
    // No file, certainly invalid
    if (CacheFile.empty() == true || FileExists(CacheFile) == false)
@@ -530,7 +533,7 @@
 // ---------------------------------------------------------------------
 /* Size is kind of an abstract notion that is only used for the progress
    meter */
-static unsigned long ComputeSize(pkgIndexFile **Start,pkgIndexFile **End)
+static unsigned long ComputeSize(FileIterator Start,FileIterator End)
 {
    unsigned long TotalSize = 0;
    for (; Start != End; Start++)
@@ -548,7 +551,7 @@
 static bool BuildCache(pkgCacheGenerator &Gen,
 		       OpProgress &Progress,
 		       unsigned long &CurrentSize,unsigned long TotalSize,
-		       pkgIndexFile **Start,pkgIndexFile **End)
+		       FileIterator Start, FileIterator End)
 {
    for (; Start != End; Start++)
    {
Index: apt-pkg/policy.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/policy.cc,v
retrieving revision 1.5
diff -u -r1.5 policy.cc
--- apt-pkg/policy.cc	2001/03/13 05:23:42	1.5
+++ apt-pkg/policy.cc	2001/04/25 07:01:40
@@ -34,6 +34,10 @@
 #include <apt-pkg/sptr.h>
     
 #include <apti18n.h>
+
+#include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 // Policy::Init - Startup and bind to a cache				/*{{{*/
@@ -195,7 +199,10 @@
    Pin *P = 0;
    
    if (Name.empty() == true)
-      P = Defaults.insert(Defaults.end());
+      // tausq:g++v3 begin
+	;
+      // P = Defaults.insert(Defaults.end());
+      // tausq:g++v3 end
    else
    {
       // Get a spot to put the pin
@@ -205,10 +212,16 @@
 	 for (vector<PkgPin>::iterator I = Unmatched.begin(); 
 	      I != Unmatched.end() && P == 0; I++)
 	    if (I->Pkg == Name)
-	       P = I;
+               // tausq:g++-v3 begin
+	       P = &(*I);
+	       // P = I;
+               // tausq:g++-v3 end
 	 
 	 if (P == 0)
-	    P = Unmatched.insert(Unmatched.end());      
+            // tausq:g++v3 begin
+            ;
+	    // P = Unmatched.insert(Unmatched.end());      
+            // tausq:g++v3 end
       }
       else
       {
Index: apt-pkg/policy.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/policy.h,v
retrieving revision 1.2
diff -u -r1.2 policy.h
--- apt-pkg/policy.h	2001/02/20 07:03:17	1.2
+++ apt-pkg/policy.h	2001/04/25 07:01:40
@@ -41,6 +41,8 @@
 #include <apt-pkg/versionmatch.h>
 #include <vector>
 
+using std::vector;
+
 class pkgPolicy : public pkgDepCache::Policy
 {
    struct Pin
Index: apt-pkg/sourcelist.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/sourcelist.cc,v
retrieving revision 1.19
diff -u -r1.19 sourcelist.cc
--- apt-pkg/sourcelist.cc	2001/03/13 06:51:46	1.19
+++ apt-pkg/sourcelist.cc	2001/04/25 07:01:40
@@ -21,6 +21,8 @@
 #include <apti18n.h>
 
 #include <fstream.h>
+
+using namespace std;
 									/*}}}*/
 
 // Global list of Item supported
@@ -186,7 +188,7 @@
 bool pkgSourceList::Read(string File)
 {
    // Open the stream for reading
-   ifstream F(File.c_str(),ios::in | ios::nocreate);
+   ifstream F(File.c_str(),ios::in /*| ios::nocreate*/);
    if (!F != 0)
       return _error->Errno("ifstream::ifstream",_("Opening %s"),File.c_str());
    
Index: apt-pkg/sourcelist.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/sourcelist.h,v
retrieving revision 1.10
diff -u -r1.10 sourcelist.h
--- apt-pkg/sourcelist.h	2001/03/13 06:51:46	1.10
+++ apt-pkg/sourcelist.h	2001/04/25 07:01:40
@@ -31,6 +31,9 @@
 #include <vector>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/indexfile.h>
+
+using std::string;
+using std::vector;
     
 #ifdef __GNUG__
 #pragma interface "apt-pkg/sourcelist.h"
Index: apt-pkg/srcrecords.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/srcrecords.h,v
retrieving revision 1.6
diff -u -r1.6 srcrecords.h
--- apt-pkg/srcrecords.h	2001/02/20 07:03:17	1.6
+++ apt-pkg/srcrecords.h	2001/04/25 07:01:40
@@ -20,6 +20,9 @@
 #include <string>
 #include <vector>    
 
+using std::string;
+using std::vector;
+
 class pkgSourceList;
 class pkgIndexFile;
 class pkgSrcRecords
Index: apt-pkg/tagfile.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/tagfile.cc,v
retrieving revision 1.28
diff -u -r1.28 tagfile.cc
--- apt-pkg/tagfile.cc	2001/03/13 06:51:46	1.28
+++ apt-pkg/tagfile.cc	2001/04/25 07:01:41
@@ -23,6 +23,9 @@
     
 #include <string>
 #include <stdio.h>
+#include <ctype.h>
+
+using std::string;
 									/*}}}*/
 
 // TagFile::pkgTagFile - Constructor					/*{{{*/
Index: apt-pkg/version.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/version.h,v
retrieving revision 1.6
diff -u -r1.6 version.h
--- apt-pkg/version.h	2001/02/20 07:03:17	1.6
+++ apt-pkg/version.h	2001/04/25 07:01:41
@@ -26,6 +26,8 @@
 
 #include <string>
 
+using std::string;
+
 class pkgVersioningSystem
 {
    public:
@@ -39,6 +41,7 @@
    // Compare versions..
    virtual int DoCmpVersion(const char *A,const char *Aend,
 			  const char *B,const char *Bend) = 0;   
+
    virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0;
    virtual int DoCmpReleaseVer(const char *A,const char *Aend,
 			       const char *B,const char *Bend) = 0;
@@ -55,7 +58,7 @@
    };
    inline int CmpVersion(string A,string B)
    {
-      return DoCmpVersion(A.begin(),A.end(),B.begin(),B.end());
+      return DoCmpVersion(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());
    };  
    inline int CmpReleaseVer(const char *A, const char *B)
    {
@@ -63,7 +66,7 @@
    };
    inline int CmpReleaseVer(string A,string B)
    {
-      return DoCmpReleaseVer(A.begin(),A.end(),B.begin(),B.end());
+      return DoCmpReleaseVer(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());
    };  
    
    pkgVersioningSystem();
Index: apt-pkg/versionmatch.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/versionmatch.cc,v
retrieving revision 1.2
diff -u -r1.2 versionmatch.cc
--- apt-pkg/versionmatch.cc	2001/02/20 07:03:17	1.2
+++ apt-pkg/versionmatch.cc	2001/04/25 07:01:42
@@ -20,6 +20,7 @@
 #include <apt-pkg/error.h>
 
 #include <stdio.h>
+#include <ctype.h>
 									/*}}}*/
 
 // VersionMatch::pkgVersionMatch - Constructor				/*{{{*/
@@ -36,7 +37,7 @@
       if (Data.end()[-1] == '*')
       {
 	 VerPrefixMatch = true;
-	 VerStr = string(Data.begin(),Data.end()-1);
+	 VerStr = string(Data.c_str(), Data.length()-1);
       }
       else
 	 VerStr = Data;
@@ -50,9 +51,9 @@
 	 return;
       
       // Are we a simple specification?
-      const char *I = Data.begin();
-      for (; I < Data.end() && *I != '='; I++);	 
-      if (I == Data.end())
+      const char *I = Data.c_str();
+      for (; *I != 0 && *I != '='; I++);	 
+      if (*I == 0)
       {
 	 // Temporary
 	 if (isdigit(Data[0]))
@@ -124,7 +125,7 @@
       return false;
    
    // Match (leading?)
-   if (stringcasecmp(B.begin(),B.end(),
+   if (stringcasecmp(B.c_str(),B.c_str()+B.length(),
 		     Ab,Ab + B.length()) == 0)
       return true;
    
Index: apt-pkg/versionmatch.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/versionmatch.h,v
retrieving revision 1.2
diff -u -r1.2 versionmatch.h
--- apt-pkg/versionmatch.h	2001/02/20 07:03:17	1.2
+++ apt-pkg/versionmatch.h	2001/04/25 07:01:42
@@ -38,6 +38,8 @@
 #include <string>
 #include <apt-pkg/pkgcache.h>
 
+using std::string;
+
 class pkgVersionMatch
 {
    // Version Matching
Index: apt-pkg/contrib/cdromutl.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/cdromutl.h,v
retrieving revision 1.2
diff -u -r1.2 cdromutl.h
--- apt-pkg/contrib/cdromutl.h	1999/06/05 03:54:29	1.2
+++ apt-pkg/contrib/cdromutl.h	2001/04/25 07:01:42
@@ -12,6 +12,8 @@
 
 #include <string>
 
+using std::string;
+
 #ifdef __GNUG__
 #pragma interface "apt-pkg/cdromutl.h"
 #endif 
Index: apt-pkg/contrib/configuration.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/configuration.cc,v
retrieving revision 1.19
diff -u -r1.19 configuration.cc
--- apt-pkg/contrib/configuration.cc	2001/03/11 07:22:19	1.19
+++ apt-pkg/contrib/configuration.cc	2001/04/25 07:01:43
@@ -24,11 +24,14 @@
 #include <vector>
 #include <algorithm>
 #include <fstream>
+#include <iostream>
     
 #include <stdio.h>
 #include <dirent.h>
 #include <sys/stat.h>
 #include <unistd.h>
+
+using namespace std;
 									/*}}}*/
 
 Configuration *_config = new Configuration;
@@ -92,7 +95,7 @@
    if (Len != 0)
    {
       for (; I != 0; Last = &I->Next, I = I->Next)
-	 if ((Res = stringcasecmp(I->Tag.begin(),I->Tag.end(),S,S + Len)) == 0)
+	 if ((Res = stringcasecmp(I->Tag.c_str(),I->Tag.c_str()+I->Tag.length(),S,S + Len)) == 0)
 	    break;
    }
    else
@@ -438,7 +441,7 @@
 		    unsigned Depth)
 {   
    // Open the stream for reading
-   ifstream F(FName.c_str(),ios::in | ios::nocreate);
+   ifstream F(FName.c_str(),ios::in); 
    if (!F != 0)
       return _error->Errno("ifstream::ifstream",_("Opening configuration file %s"),FName.c_str());
    
Index: apt-pkg/contrib/configuration.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/configuration.h,v
retrieving revision 1.13
diff -u -r1.13 configuration.h
--- apt-pkg/contrib/configuration.h	2001/03/11 07:22:19	1.13
+++ apt-pkg/contrib/configuration.h	2001/04/25 07:01:43
@@ -34,6 +34,8 @@
 
 #include <string>
 
+using std::string;
+
 class Configuration
 {
    public:
Index: apt-pkg/contrib/error.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/error.cc,v
retrieving revision 1.9
diff -u -r1.9 error.cc
--- apt-pkg/contrib/error.cc	2001/02/20 07:03:17	1.9
+++ apt-pkg/contrib/error.cc	2001/04/25 07:01:43
@@ -20,11 +20,14 @@
 
 #include <apt-pkg/error.h>
 
+#include <iostream.h>
 #include <errno.h>
 #include <stdio.h>
-#include <string.h>
+#include <string>
 #include <stdarg.h>
 #include <unistd.h>
+
+using namespace std;
 
 #include "config.h"
    									/*}}}*/
Index: apt-pkg/contrib/error.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/error.h,v
retrieving revision 1.7
diff -u -r1.7 error.h
--- apt-pkg/contrib/error.h	2001/02/20 07:03:17	1.7
+++ apt-pkg/contrib/error.h	2001/04/25 07:01:43
@@ -55,6 +55,8 @@
     
 #include <string>
 
+using std::string;
+
 class GlobalError
 {
    struct Item
Index: apt-pkg/contrib/fileutl.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/fileutl.cc,v
retrieving revision 1.37
diff -u -r1.37 fileutl.cc
--- apt-pkg/contrib/fileutl.cc	2001/03/03 22:45:59	1.37
+++ apt-pkg/contrib/fileutl.cc	2001/04/25 07:01:44
@@ -23,6 +23,8 @@
 
 #include <apti18n.h>
 
+#include <iostream>
+
 #include <unistd.h>
 #include <fcntl.h>
 #include <sys/stat.h>
@@ -31,6 +33,8 @@
 #include <sys/wait.h>
 #include <signal.h>
 #include <errno.h>
+
+using namespace std;
 									/*}}}*/
 
 // CopyFile - Buffered copy of a file					/*{{{*/
Index: apt-pkg/contrib/fileutl.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/fileutl.h,v
retrieving revision 1.24
diff -u -r1.24 fileutl.h
--- apt-pkg/contrib/fileutl.h	2001/03/03 22:36:20	1.24
+++ apt-pkg/contrib/fileutl.h	2001/04/25 07:01:44
@@ -27,6 +27,8 @@
 
 #include <string>
 
+using std::string;
+
 class FileFd
 {
    protected:
Index: apt-pkg/contrib/md5.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/md5.cc,v
retrieving revision 1.11
diff -u -r1.11 md5.cc
--- apt-pkg/contrib/md5.cc	1999/12/10 23:40:29	1.11
+++ apt-pkg/contrib/md5.cc	2001/04/25 07:01:44
@@ -191,7 +191,7 @@
 /* Converts the hex string into a set of chars */
 bool MD5SumValue::Set(string Str)
 {
-   return Hex2Num(Str.begin(),Str.end(),Sum,sizeof(Sum));
+   return Hex2Num(Str.c_str(),Str.c_str()+Str.length(),Sum,sizeof(Sum));
 }
 									/*}}}*/
 // MD5SumValue::Value - Convert the number into a string		/*{{{*/
Index: apt-pkg/contrib/md5.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/md5.h,v
retrieving revision 1.5
diff -u -r1.5 md5.h
--- apt-pkg/contrib/md5.h	2001/02/20 07:03:17	1.5
+++ apt-pkg/contrib/md5.h	2001/04/25 07:01:44
@@ -29,6 +29,8 @@
 
 #include <string>
 
+using std::string;
+
 class MD5Summation;
 
 class MD5SumValue
Index: apt-pkg/contrib/mmap.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/mmap.h,v
retrieving revision 1.11
diff -u -r1.11 mmap.h
--- apt-pkg/contrib/mmap.h	1999/08/02 03:07:47	1.11
+++ apt-pkg/contrib/mmap.h	2001/04/25 07:01:45
@@ -32,6 +32,8 @@
 #include <string>
 #include <apt-pkg/fileutl.h>
 
+using std::string;
+
 /* This should be a 32 bit type, larger tyes use too much ram and smaller
    types are too small. Where ever possible 'unsigned long' should be used
    instead of this internal type */
@@ -92,7 +94,7 @@
    unsigned long RawAllocate(unsigned long Size,unsigned long Aln = 0);
    unsigned long Allocate(unsigned long ItemSize);
    unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1);
-   inline unsigned long WriteString(string S) {return WriteString(S.begin(),S.size());};
+   inline unsigned long WriteString(string S) {return WriteString(S.c_str(),S.length());};
    void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;};
    
    DynamicMMap(FileFd &F,unsigned long Flags,unsigned long WorkSpace = 2*1024*1024);
Index: apt-pkg/contrib/progress.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/progress.cc,v
retrieving revision 1.10
diff -u -r1.10 progress.cc
--- apt-pkg/contrib/progress.cc	2001/02/20 07:03:17	1.10
+++ apt-pkg/contrib/progress.cc	2001/04/25 07:01:45
@@ -17,8 +17,11 @@
 
 #include <apti18n.h>
     
+#include <iostream>
+
 #include <stdio.h>
-									/*}}}*/
+
+using namespace std;
 
 // OpProgress::OpProgress - Constructor					/*{{{*/
 // ---------------------------------------------------------------------
Index: apt-pkg/contrib/progress.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/progress.h,v
retrieving revision 1.5
diff -u -r1.5 progress.h
--- apt-pkg/contrib/progress.h	1999/01/18 06:20:08	1.5
+++ apt-pkg/contrib/progress.h	2001/04/25 07:01:45
@@ -28,6 +28,8 @@
 #include <string>
 #include <sys/time.h>
 
+using std::string;
+
 class Configuration;
 class OpProgress
 {
Index: apt-pkg/contrib/sha1.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/sha1.cc,v
retrieving revision 1.2
diff -u -r1.2 sha1.cc
--- apt-pkg/contrib/sha1.cc	2001/03/11 05:30:20	1.2
+++ apt-pkg/contrib/sha1.cc	2001/04/25 07:01:45
@@ -206,7 +206,7 @@
 /* Converts the hex string into a set of chars */
 bool SHA1SumValue::Set(string Str)
 {
-   return Hex2Num(Str.begin(),Str.end(),Sum,sizeof(Sum));
+   return Hex2Num(Str.c_str(),Str.c_str()+Str.length(),Sum,sizeof(Sum));
 }
 
 									/*}}} */
Index: apt-pkg/contrib/sha1.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/sha1.h,v
retrieving revision 1.1
diff -u -r1.1 sha1.h
--- apt-pkg/contrib/sha1.h	2001/03/06 05:03:49	1.1
+++ apt-pkg/contrib/sha1.h	2001/04/25 07:01:45
@@ -20,6 +20,8 @@
 
 #include <string>
 
+using std::string;
+
 class SHA1Summation;
 
 class SHA1SumValue
Index: apt-pkg/contrib/strutl.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/strutl.cc,v
retrieving revision 1.38
diff -u -r1.38 strutl.cc
--- apt-pkg/contrib/strutl.cc	2001/03/11 07:22:19	1.38
+++ apt-pkg/contrib/strutl.cc	2001/04/25 07:01:46
@@ -32,6 +32,8 @@
 #include <regex.h>
 #include <errno.h>
 #include <stdarg.h>
+
+using namespace std;
 									/*}}}*/
 
 // strstrip - Remove white space from the front and back of a string	/*{{{*/
@@ -198,7 +200,7 @@
 string QuoteString(string Str,const char *Bad)
 {
    string Res;
-   for (string::iterator I = Str.begin(); I != Str.end(); I++)
+   for (const char *I = Str.c_str(); *I != 0; I++)
    {
       if (strchr(Bad,*I) != 0 || isprint(*I) == 0 || 
 	  *I <= 0x20 || *I >= 0x7F)
@@ -219,9 +221,9 @@
 string DeQuoteString(string Str)
 {
    string Res;
-   for (string::iterator I = Str.begin(); I != Str.end(); I++)
+   for (const char *I = Str.c_str(); *I != 0; I++)
    {
-      if (*I == '%' && I + 2 < Str.end())
+      if (*I == '%' && I + 2 < Str.c_str() + Str.length())
       {
 	 char Tmp[3];
 	 Tmp[0] = I[1];
@@ -354,8 +356,8 @@
    
    // "\x00-\x20{}|\\\\^\\[\\]<>\"\x7F-\xFF";
    URI = QuoteString(U,"\\|{}[]<>\"^~_=!@#$%^&*");
-   string::iterator J = URI.begin();
-   for (; J != URI.end(); J++)
+   char *J = const_cast<char *>(URI.c_str());
+   for (; *J != 0; J++)
       if (*J == '/') 
 	 *J = '_';
    return URI;
@@ -385,24 +387,24 @@
 
    /* Transform the 3x8 bits to 4x6 bits, as required by
       base64.  */
-   for (string::const_iterator I = S.begin(); I < S.end(); I += 3)
+   for (const char *I = S.c_str(); I < (S.c_str() + S.length()); I += 3)
    {
       char Bits[3] = {0,0,0};
       Bits[0] = I[0];
-      if (I + 1 < S.end())
+      if (I + 1 < S.c_str() + S.length())
 	 Bits[1] = I[1];
-      if (I + 2 < S.end())
+      if (I + 2 < S.c_str() + S.length())
 	 Bits[2] = I[2];
 
       Final += tbl[Bits[0] >> 2];
       Final += tbl[((Bits[0] & 3) << 4) + (Bits[1] >> 4)];
       
-      if (I + 1 >= S.end())
+      if (I + 1 >= S.c_str() + S.length())
 	 break;
       
       Final += tbl[((Bits[1] & 0xf) << 2) + (Bits[2] >> 6)];
       
-      if (I + 2 >= S.end())
+      if (I + 2 >= S.c_str() + S.length())
 	 break;
       
       Final += tbl[Bits[2] & 0x3f];
@@ -467,22 +469,22 @@
 {
    // Look for a matching tag.
    int Length = strlen(Tag);
-   for (string::iterator I = Message.begin(); I + Length < Message.end(); I++)
+   for (const char *I = Message.c_str(); I + Length < Message.c_str() + Message.length(); I++)
    {
       // Found the tag
       if (I[Length] == ':' && stringcasecmp(I,I+Length,Tag) == 0)
       {
 	 // Find the end of line and strip the leading/trailing spaces
-	 string::iterator J;
+	 const char *J;
 	 I += Length + 1;
-	 for (; isspace(*I) != 0 && I < Message.end(); I++);
-	 for (J = I; *J != '\n' && J < Message.end(); J++);
+	 for (; isspace(*I) != 0 && *I != 0; I++);
+	 for (J = I; *J != '\n' && *J != 0; J++);
 	 for (; J > I && isspace(J[-1]) != 0; J--);
 	 
-	 return string(I,J-I);
+	 return string(I,J);
       }
       
-      for (; *I != '\n' && I < Message.end(); I++);
+      for (; *I != '\n' && *I != 0; I++);
    }   
    
    // Failed to find a match
@@ -876,7 +878,7 @@
    // sprintf the description
    char S[400];
    vsnprintf(S,sizeof(S),format,args);
-   out << S;
+   // std::ostream::operator <<(out, (const char *)S);
 }
 									/*}}}*/
 
@@ -886,16 +888,16 @@
    matched against the argument */
 bool CheckDomainList(string Host,string List)
 {
-   const char *Start = List.begin();
-   for (const char *Cur = List.begin(); Cur <= List.end() ; Cur++)
+   const char *Start = List.c_str();
+   for (const char *Cur = List.c_str(); *Cur != 0; Cur++)
    {
-      if (Cur < List.end() && *Cur != ',')
+      if (*Cur != ',')
 	 continue;
       
       // Match the end of the string..
-      if ((Host.size() >= (unsigned)(Cur - List.begin())) &&
+      if ((Host.size() >= (unsigned)(Cur - List.c_str())) &&
 	  Cur - Start != 0 &&
-	  stringcasecmp(Host.end() - (Cur - Start),Host.end(),Start,Cur) == 0)
+	  stringcasecmp(Host.c_str() + Host.length() - (Cur - Start),Host.c_str()+Host.length(),Start,Cur) == 0)
 	 return true;
       
       Start = Cur + 1;
@@ -909,22 +911,22 @@
 /* This parses the URI into all of its components */
 void URI::CopyFrom(string U)
 {
-   string::const_iterator I = U.begin();
+   const char *I = U.c_str();
 
    // Locate the first colon, this separates the scheme
-   for (; I < U.end() && *I != ':' ; I++);
-   string::const_iterator FirstColon = I;
+   for (; *I != 0  && *I != ':' ; I++);
+   const char *FirstColon = I;
 
    /* Determine if this is a host type URI with a leading double //
       and then search for the first single / */
-   string::const_iterator SingleSlash = I;
-   if (I + 3 < U.end() && I[1] == '/' && I[2] == '/')
+   const char *SingleSlash = I;
+   if (I + 3 < U.c_str() + U.length() && I[1] == '/' && I[2] == '/')
       SingleSlash += 3;
    
    /* Find the / indicating the end of the hostname, ignoring /'s in the
       square brackets */
    bool InBracket = false;
-   for (; SingleSlash < U.end() && (*SingleSlash != '/' || InBracket == true); SingleSlash++)
+   for (; SingleSlash < U.c_str() + U.length() && (*SingleSlash != '/' || InBracket == true); SingleSlash++)
    {
       if (*SingleSlash == '[')
 	 InBracket = true;
@@ -932,13 +934,13 @@
 	 InBracket = false;
    }
    
-   if (SingleSlash > U.end())
-      SingleSlash = U.end();
+   if (SingleSlash > U.c_str() + U.length())
+      SingleSlash = U.c_str() + U.length();
 
    // We can now write the access and path specifiers
-   Access = string(U,0,FirstColon - U.begin());
-   if (SingleSlash != U.end())
-      Path = string(U,SingleSlash - U.begin());
+   Access = string(U,0,FirstColon - U.c_str());
+   if (*SingleSlash != 0)
+      Path = string(U,SingleSlash - U.c_str());
    if (Path.empty() == true)
       Path = "/";
 
@@ -947,7 +949,7 @@
       FirstColon += 3;
    else
       FirstColon += 1;
-   if (FirstColon >= U.end())
+   if (FirstColon >= U.c_str() + U.length())
       return;
    
    if (FirstColon > SingleSlash)
@@ -958,24 +960,24 @@
    if (I > SingleSlash)
       I = SingleSlash;
    for (; I < SingleSlash && *I != ':'; I++);
-   string::const_iterator SecondColon = I;
+   const char *SecondColon = I;
    
    // Search for the @ after the colon
    for (; I < SingleSlash && *I != '@'; I++);
-   string::const_iterator At = I;
+   const char *At = I;
    
    // Now write the host and user/pass
    if (At == SingleSlash)
    {
       if (FirstColon < SingleSlash)
-	 Host = string(U,FirstColon - U.begin(),SingleSlash - FirstColon);
+	 Host = string(U,FirstColon - U.c_str(),SingleSlash - FirstColon);
    }
    else
    {
-      Host = string(U,At - U.begin() + 1,SingleSlash - At - 1);
-      User = string(U,FirstColon - U.begin(),SecondColon - FirstColon);
+      Host = string(U,At - U.c_str() + 1,SingleSlash - At - 1);
+      User = string(U,FirstColon - U.c_str(),SecondColon - FirstColon);
       if (SecondColon < At)
-	 Password = string(U,SecondColon - U.begin() + 1,At - SecondColon - 1);
+	 Password = string(U,SecondColon - U.c_str() + 1,At - SecondColon - 1);
    }   
    
    // Now we parse the RFC 2732 [] hostnames.
Index: apt-pkg/contrib/strutl.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/contrib/strutl.h,v
retrieving revision 1.17
diff -u -r1.17 strutl.h
--- apt-pkg/contrib/strutl.h	2001/02/23 05:45:27	1.17
+++ apt-pkg/contrib/strutl.h	2001/04/25 07:01:46
@@ -23,8 +23,13 @@
 #include <stdlib.h>
 #include <string>
 #include <vector>
+#include <iostream>
 #include <time.h>
 
+using std::string;
+using std::vector;
+using std::ostream;
+
 #ifdef __GNUG__
 // Methods have a hidden this parameter that is visible to this attribute
 #define APT_FORMAT2 __attribute__ ((format (printf, 2, 3)))
@@ -57,11 +62,11 @@
 
 int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
 inline int stringcmp(const char *A,const char *AEnd,const char *B) {return stringcmp(A,AEnd,B,B+strlen(B));};
-inline int stringcmp(string A,const char *B) {return stringcmp(A.begin(),A.end(),B,B+strlen(B));};
+inline int stringcmp(string A,const char *B) {return stringcmp(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));};
 int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
 inline int stringcasecmp(const char *A,const char *AEnd,const char *B) {return stringcasecmp(A,AEnd,B,B+strlen(B));};
-inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.begin(),A.end(),B,B+strlen(B));};
-inline int stringcasecmp(string A,string B) {return stringcasecmp(A.begin(),A.end(),B.begin(),B.end());};
+inline int stringcasecmp(string A,const char *B) {return stringcasecmp(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));};
+inline int stringcasecmp(string A,string B) {return stringcasecmp(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());};
 
 class URI
 {
Index: apt-pkg/deb/debindexfile.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/deb/debindexfile.h,v
retrieving revision 1.2
diff -u -r1.2 debindexfile.h
--- apt-pkg/deb/debindexfile.h	2001/02/20 07:03:17	1.2
+++ apt-pkg/deb/debindexfile.h	2001/04/25 07:01:47
@@ -59,7 +59,12 @@
 
    // Stuff for accessing files on remote items
    virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
-   virtual string ArchiveURI(string File) const {return URI + File;};
+   virtual string ArchiveURI(string File) const 
+   {
+      string tmp = URI;
+      tmp += File;
+      return tmp;
+   }
    
    // Interface for acquire
    virtual string Describe() const;   
Index: apt-pkg/deb/deblistparser.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/deb/deblistparser.cc,v
retrieving revision 1.24
diff -u -r1.24 deblistparser.cc
--- apt-pkg/deb/deblistparser.cc	2001/02/20 07:03:17	1.24
+++ apt-pkg/deb/deblistparser.cc	2001/04/25 07:01:47
@@ -16,6 +16,8 @@
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/crc-16.h>
 
+#include <ctype.h>
+
 #include <system.h>
 									/*}}}*/
 
@@ -409,7 +411,7 @@
 	    if (End == Stop) 
 	       return 0;
 	    
-	    if (stringcmp(I,End,arch.begin(),arch.end()) == 0)
+	    if (stringcmp(arch.c_str(),arch.c_str()+arch.length(),I,End) == 0)
 	       Found = true;
 	    
 	    if (*End++ == ']') {
@@ -536,7 +538,7 @@
       if (Section.Find("Architecture",Start,Stop) == false)
 	 return true;
 
-      if (stringcmp(Start,Stop,Arch.begin(),Arch.end()) == 0)
+      if (stringcmp(Arch.c_str(),Arch.c_str()+Arch.length(),Start,Stop) == 0)
 	 return true;
 
       if (stringcmp(Start,Stop,"all") == 0)
Index: apt-pkg/deb/debversion.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/deb/debversion.cc,v
retrieving revision 1.2
diff -u -r1.2 debversion.cc
--- apt-pkg/deb/debversion.cc	2001/02/20 07:03:17	1.2
+++ apt-pkg/deb/debversion.cc	2001/04/25 07:01:47
@@ -19,6 +19,7 @@
 #include <apt-pkg/pkgcache.h>
 
 #include <stdlib.h>
+#include <ctype.h>
 									/*}}}*/
 
 debVersioningSystem debVS;
Index: apt-pkg/deb/dpkgpm.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/deb/dpkgpm.cc,v
retrieving revision 1.19
diff -u -r1.19 dpkgpm.cc
--- apt-pkg/deb/dpkgpm.cc	2001/02/22 06:26:27	1.19
+++ apt-pkg/deb/dpkgpm.cc	2001/04/25 07:01:48
@@ -16,6 +16,8 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/strutl.h>
+
+#include <iostream>
     
 #include <unistd.h>
 #include <stdlib.h>
@@ -25,6 +27,8 @@
 #include <signal.h>
 #include <errno.h>
 #include <stdio.h>
+
+using namespace std;
 									/*}}}*/
 
 // DPkgPM::pkgDPkgPM - Constructor					/*{{{*/
Index: apt-pkg/deb/dpkgpm.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/deb/dpkgpm.h,v
retrieving revision 1.7
diff -u -r1.7 dpkgpm.h
--- apt-pkg/deb/dpkgpm.h	2001/02/20 07:03:17	1.7
+++ apt-pkg/deb/dpkgpm.h	2001/04/25 07:01:48
@@ -18,6 +18,8 @@
 #include <vector>
 #include <stdio.h>
 
+using std::vector;
+
 class pkgDPkgPM : public pkgPackageManager
 {
    protected:
Index: buildlib/debiandoc.mak
===================================================================
RCS file: /cvs/deity/apt/buildlib/debiandoc.mak,v
retrieving revision 1.2
diff -u -r1.2 debiandoc.mak
--- buildlib/debiandoc.mak	2001/02/20 07:03:17	1.2
+++ buildlib/debiandoc.mak	2001/04/25 07:01:48
@@ -27,7 +27,8 @@
 $(DOC)/%.html: %.sgml
 	echo Creating html for $< to $@
 	-rm -rf $@
-	(HERE=`pwd`; cd $(@D) && $(DEBIANDOC_HTML) $$HERE/$<)
+	touch $@
+	#(HERE=`pwd`; cd $(@D) && $(DEBIANDOC_HTML) $$HERE/$<)
 
 # Clean rule
 .PHONY: veryclean/html/$(LOCAL)
Index: buildlib/defaults.mak
===================================================================
RCS file: /cvs/deity/apt/buildlib/defaults.mak,v
retrieving revision 1.24
diff -u -r1.24 defaults.mak
--- buildlib/defaults.mak	2001/03/05 21:11:52	1.24
+++ buildlib/defaults.mak	2001/04/25 07:01:48
@@ -142,7 +142,7 @@
 # Compile rules are expected to call this macro after calling the compiler
 ifdef INLINEDEPFLAG
  define DoDep
-	sed -e "1s/.*:/$(subst /,\\/,$@):/" $(basename $(@F)).d > $(DEP)/$(@F).d
+	sed -e "1s/.*:/$(subst /,\\/,$@):/" $(DEP)/$(basename $(@F)).d > $(DEP)/$(@F).d
 	-rm -f $(basename $(@F)).d
  endef
 else
Index: buildlib/sgml_manpage.mak
===================================================================
RCS file: /cvs/deity/apt/buildlib/sgml_manpage.mak,v
retrieving revision 1.2
diff -u -r1.2 sgml_manpage.mak
--- buildlib/sgml_manpage.mak	2001/02/20 07:03:17	1.2
+++ buildlib/sgml_manpage.mak	2001/04/25 07:01:48
@@ -24,7 +24,8 @@
 
 $($(LOCAL)-LIST) :: % : %.sgml $(INCLUDES)
 	echo Creating man page $@
-	$(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN) 
+	#$(NSGMLS) $< | $(SGMLSPL) $(DOCBOOK2MAN) 
+	touch $@
 
 # Clean rule
 .PHONY: veryclean/$(LOCAL)
Index: cmdline/acqprogress.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/acqprogress.cc,v
retrieving revision 1.21
diff -u -r1.21 acqprogress.cc
--- cmdline/acqprogress.cc	2001/02/20 07:03:17	1.21
+++ cmdline/acqprogress.cc	2001/04/25 07:01:49
@@ -18,6 +18,9 @@
     
 #include <stdio.h>
 #include <signal.h>
+#include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 // AcqTextStatus::AcqTextStatus - Constructor				/*{{{*/
Index: cmdline/apt-cdrom.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/apt-cdrom.cc,v
retrieving revision 1.37
diff -u -r1.37 apt-cdrom.cc
--- cmdline/apt-cdrom.cc	2001/03/13 05:23:42	1.37
+++ cmdline/apt-cdrom.cc	2001/04/25 07:01:50
@@ -33,6 +33,7 @@
 #include <unistd.h>
 #include <stdio.h>
 									/*}}}*/
+using namespace std;
 
 // FindPackages - Find the package files on the CDROM			/*{{{*/
 // ---------------------------------------------------------------------
@@ -364,7 +365,7 @@
 
    // 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());
 
Index: cmdline/apt-get.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/apt-get.cc,v
retrieving revision 1.104
diff -u -r1.104 apt-get.cc
--- cmdline/apt-get.cc	2001/03/13 05:23:42	1.104
+++ cmdline/apt-get.cc	2001/04/25 07:01:54
@@ -56,11 +56,13 @@
 #include <errno.h>
 #include <regex.h>
 #include <sys/wait.h>
+
+using namespace std;
 									/*}}}*/
 
-ostream c0out;
-ostream c1out;
-ostream c2out;
+ostream c0out(0);
+ostream c1out(0);
+ostream c2out(0);
 ofstream devnull("/dev/null");
 unsigned int ScreenWidth = 80;
 
@@ -763,7 +765,7 @@
       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)
 	    {
@@ -787,7 +789,7 @@
       
       // 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)
@@ -1146,7 +1148,7 @@
       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;
@@ -1691,7 +1693,7 @@
 
    // 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)
Index: cmdline/indexcopy.cc
===================================================================
RCS file: /cvs/deity/apt/cmdline/indexcopy.cc,v
retrieving revision 1.7
diff -u -r1.7 indexcopy.cc
--- cmdline/indexcopy.cc	2001/03/13 05:23:42	1.7
+++ cmdline/indexcopy.cc	2001/04/25 07:01:54
@@ -24,6 +24,7 @@
 #include <sys/stat.h>
 #include <stdio.h>
 									/*}}}*/
+using namespace std;
 
 // IndexCopy::CopyPackages - Copy the package files from the CD		/*{{{*/
 // ---------------------------------------------------------------------
@@ -394,7 +395,7 @@
       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
Index: cmdline/indexcopy.h
===================================================================
RCS file: /cvs/deity/apt/cmdline/indexcopy.h,v
retrieving revision 1.2
diff -u -r1.2 indexcopy.h
--- cmdline/indexcopy.h	2001/02/20 07:03:17	1.2
+++ cmdline/indexcopy.h	2001/04/25 07:01:54
@@ -14,6 +14,9 @@
 #include <string>
 #include <stdio.h>
 
+using std::string;
+using std::vector;
+
 class pkgTagSection;
 class FileFd;
 
Index: debian/rules
===================================================================
RCS file: /cvs/deity/apt/debian/rules,v
retrieving revision 1.31
diff -u -r1.31 rules
--- debian/rules	2001/03/04 23:01:45	1.31
+++ debian/rules	2001/04/25 07:01:55
@@ -158,7 +158,7 @@
 	cp $(BLD)/bin/apt-* debian/apt/usr/bin/
 	
 	# Remove the bits that are in apt-utils
-	rm $(addprefix debian/apt/usr/bin/apt-,$(APT_UTILS))
+	-rm $(addprefix debian/apt/usr/bin/apt-,$(APT_UTILS))
 	
 	# install the shared libs
 	find $(BLD)/bin/ -type f -name "libapt-pkg*.so.*" -exec cp -a "{}" debian/apt/usr/lib/ \;
Index: ftparchive/apt-ftparchive.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/apt-ftparchive.cc,v
retrieving revision 1.2
diff -u -r1.2 apt-ftparchive.cc
--- ftparchive/apt-ftparchive.cc	2001/02/20 07:03:18	1.2
+++ ftparchive/apt-ftparchive.cc	2001/04/25 07:01:56
@@ -30,11 +30,13 @@
 #include "contents.h"
 #include "multicompress.h"
 #include "writer.h"    
+
+using namespace std;
 									/*}}}*/
 
-ostream c0out;
-ostream c1out;
-ostream c2out;
+ostream c0out(0);
+ostream c1out(0);
+ostream c2out(0);
 ofstream devnull("/dev/null");
 unsigned Quiet = 0;
 
@@ -93,7 +95,8 @@
    bool GenPackages(Configuration &Setup,struct CacheDB::Stats &Stats);
    bool GenSources(Configuration &Setup,struct CacheDB::Stats &Stats);
    bool GenContents(Configuration &Setup,
-		    PackageMap *Begin,PackageMap *End,
+		    vector<PackageMap>::iterator Begin,
+		    vector<PackageMap>::iterator End,
 		    unsigned long &Left);
    
    PackageMap() : DeLinkLimit(0), Permissions(1), ContentsDone(false), 
@@ -307,8 +310,9 @@
    It searches the given iterator range for other package files that map
    into this contents file and includes their data as well when building. */
 bool PackageMap::GenContents(Configuration &Setup,
-			    PackageMap *Begin,PackageMap *End,
-			    unsigned long &Left)
+		    vector<PackageMap>::iterator Begin,
+		    vector<PackageMap>::iterator End,
+		    unsigned long &Left)
 {
    if (Contents.empty() == true)
       return true;
@@ -366,17 +370,17 @@
       files associated with this contents file into one great big honking
       memory structure, then dump the sorted version */
    c0out << ' ' << this->Contents << ":" << flush;
-   for (PackageMap *I = Begin; I != End; I++)
+   for (vector<PackageMap>::iterator I = Begin; I != End; I++)
    {
-      if (I->Contents != this->Contents)
+      if ((*I).Contents != this->Contents)
 	 continue;
       
       Contents.Prefix = ArchiveDir;
-      Contents.ReadyDB(flCombine(CacheDir,I->BinCacheDB));
-      Contents.ReadFromPkgs(flCombine(ArchiveDir,I->PkgFile),
-			    I->PkgCompress);
+      Contents.ReadyDB(flCombine(CacheDir,(*I).BinCacheDB));
+      Contents.ReadFromPkgs(flCombine(ArchiveDir,(*I).PkgFile),
+			    (*I).PkgCompress);
       
-      I->ContentsDone = true;	    
+      (*I).ContentsDone = true;	    
    }
    
    Contents.Finish();
@@ -687,11 +691,11 @@
    // Generate packages
    if (CmdL.FileSize() <= 2)
    {
-      for (PackageMap *I = PkgList.begin(); I != PkgList.end(); I++)
-	 if (I->GenPackages(Setup,Stats) == false)
+      for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
+	 if ((*I).GenPackages(Setup,Stats) == false)
 	    _error->DumpErrors();
-      for (PackageMap *I = PkgList.begin(); I != PkgList.end(); I++)
-	 if (I->GenSources(Setup,SrcStats) == false)
+      for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
+	 if ((*I).GenSources(Setup,SrcStats) == false)
 	    _error->DumpErrors();
    }
    else
@@ -699,14 +703,14 @@
       // Make a choice list out of the package list..
       RxChoiceList *List = new RxChoiceList[2*PkgList.size()+1];
       RxChoiceList *End = List;
-      for (PackageMap *I = PkgList.begin(); I != PkgList.end(); I++)
+      for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
       {
-	 End->UserData = I;
-	 End->Str = I->BaseDir.c_str();
+	 End->UserData = &(*I);
+	 End->Str = (*I).BaseDir.c_str();
 	 End++;
 	 
-	 End->UserData = I;
-	 End->Str = I->Tag.c_str();
+	 End->UserData = &(*I);
+	 End->Str = (*I).Tag.c_str();
 	 End++;	 
       }
       End->Str = 0;
@@ -755,14 +759,14 @@
 
    // Sort the contents file list by date
    string ArchiveDir = Setup.FindDir("Dir::ArchiveDir");
-   for (PackageMap *I = PkgList.begin(); I != PkgList.end(); I++)
+   for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
    {
       struct stat A;
-      if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents),
-				 I->CntCompress,A) == false)
-	 time(&I->ContentsMTime);
+      if (MultiCompress::GetStat(flCombine(ArchiveDir,(*I).Contents),
+				 (*I).CntCompress,A) == false)
+	 time(&((*I).ContentsMTime));
       else
-	 I->ContentsMTime = A.st_mtime;
+	 (*I).ContentsMTime = A.st_mtime;
    }
    stable_sort(PkgList.begin(),PkgList.end(),PackageMap::ContentsCompare());
    
@@ -772,23 +776,23 @@
       hashes of the .debs this means they have not changed either so the 
       contents must be up to date. */
    unsigned long MaxContentsChange = Setup.FindI("Default::MaxContentsChange",UINT_MAX)*1024;
-   for (PackageMap *I = PkgList.begin(); I != PkgList.end(); I++)
+   for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); I++)
    {
       // This record is not relevent
-      if (I->ContentsDone == true ||
-	  I->Contents.empty() == true)
+      if ((*I).ContentsDone == true ||
+	  (*I).Contents.empty() == true)
 	 continue;
 
       // Do not do everything if the user specified sections.
-      if (CmdL.FileSize() > 2 && I->PkgDone == false)
+      if (CmdL.FileSize() > 2 && (*I).PkgDone == false)
 	 continue;
 
       struct stat A,B;
-      if (MultiCompress::GetStat(flCombine(ArchiveDir,I->Contents),I->CntCompress,A) == true)
+      if (MultiCompress::GetStat(flCombine(ArchiveDir,(*I).Contents),(*I).CntCompress,A) == true)
       {
-	 if (MultiCompress::GetStat(flCombine(ArchiveDir,I->PkgFile),I->PkgCompress,B) == false)
+	 if (MultiCompress::GetStat(flCombine(ArchiveDir,(*I).PkgFile),(*I).PkgCompress,B) == false)
 	 {
-	    _error->Warning("Some files are missing in the package file group `%s'",I->PkgFile.c_str());
+	    _error->Warning("Some files are missing in the package file group `%s'",(*I).PkgFile.c_str());
 	    continue;
 	 }
 	 
@@ -796,7 +800,7 @@
 	    continue;
       }
       
-      if (I->GenContents(Setup,PkgList.begin(),PkgList.end(),
+      if ((*I).GenContents(Setup,PkgList.begin(),PkgList.end(),
 			 MaxContentsChange) == false)
 	 _error->DumpErrors();
       
@@ -840,14 +844,14 @@
 
    string CacheDir = Setup.FindDir("Dir::CacheDir");
    
-   for (PackageMap *I = PkgList.begin(); I != PkgList.end(); )
+   for (vector<PackageMap>::iterator I = PkgList.begin(); I != PkgList.end(); )
    {
-      c0out << I->BinCacheDB << endl;
-      CacheDB DB(flCombine(CacheDir,I->BinCacheDB));
+      c0out << (*I).BinCacheDB << endl;
+      CacheDB DB(flCombine(CacheDir,(*I).BinCacheDB));
       if (DB.Clean() == false)
 	 _error->DumpErrors();
       
-      string CacheDB = I->BinCacheDB;
+      string CacheDB = (*I).BinCacheDB;
       for (; I != PkgList.end() && I->BinCacheDB == CacheDB; I++);
    }
    
Index: ftparchive/apt-ftparchive.h
===================================================================
RCS file: /cvs/deity/apt/ftparchive/apt-ftparchive.h,v
retrieving revision 1.2
diff -u -r1.2 apt-ftparchive.h
--- ftparchive/apt-ftparchive.h	2001/02/20 07:03:18	1.2
+++ ftparchive/apt-ftparchive.h	2001/04/25 07:01:56
@@ -19,6 +19,9 @@
 
 #include <fstream>
 
+using std::ostream;
+using std::ofstream;
+
 extern ostream c0out;
 extern ostream c1out;
 extern ostream c2out;
Index: ftparchive/cachedb.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/cachedb.cc,v
retrieving revision 1.2
diff -u -r1.2 cachedb.cc
--- ftparchive/cachedb.cc	2001/02/20 07:03:18	1.2
+++ ftparchive/cachedb.cc	2001/04/25 07:01:56
@@ -213,7 +213,7 @@
    
    MD5Res = MD5.Result();
    InitQuery("m5");
-   if (Put(MD5Res.begin(),MD5Res.length()) == true)
+   if (Put(MD5Res.c_str(),MD5Res.length()) == true)
       CurStat.Flags |= FlMD5;
    return true;
 }
Index: ftparchive/multicompress.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/multicompress.cc,v
retrieving revision 1.2
diff -u -r1.2 multicompress.cc
--- ftparchive/multicompress.cc	2001/02/20 07:03:18	1.2
+++ ftparchive/multicompress.cc	2001/04/25 07:01:56
@@ -28,6 +28,9 @@
 #include <sys/stat.h>
 #include <utime.h>
 #include <unistd.h>
+#include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 const MultiCompress::CompType MultiCompress::Compressors[] =
@@ -50,14 +53,14 @@
    
    /* Parse the compression string, a space separated lists of compresison
       types */
-   string::const_iterator I = Compress.begin();
-   for (; I != Compress.end();)
+   const char *I = Compress.c_str();
+   for (; *I != 0;)
    {
-      for (; I != Compress.end() && isspace(*I); I++);
+      for (; *I != 0 && isspace(*I); I++);
       
       // Grab a word
-      string::const_iterator Start = I;
-      for (; I != Compress.end() && !isspace(*I); I++);
+      const char *Start = I;
+      for (; *I != 0 && !isspace(*I); I++);
 
       // Find the matching compressor
       const CompType *Comp = Compressors;
@@ -129,15 +132,15 @@
 {
    /* Parse the compression string, a space separated lists of compresison
       types */
-   string::const_iterator I = Compress.begin();
+   const char *I = Compress.c_str();
    bool DidStat = false;
-   for (; I != Compress.end();)
+   for (; *I != 0; )
    {
-      for (; I != Compress.end() && isspace(*I); I++);
+      for (; *I != 0 && isspace(*I); I++);
       
       // Grab a word
-      string::const_iterator Start = I;
-      for (; I != Compress.end() && !isspace(*I); I++);
+      const char *Start = I;
+      for (; *I != 0 && !isspace(*I); I++);
 
       // Find the matching compressor
       const CompType *Comp = Compressors;
Index: ftparchive/override.h
===================================================================
RCS file: /cvs/deity/apt/ftparchive/override.h,v
retrieving revision 1.2
diff -u -r1.2 override.h
--- ftparchive/override.h	2001/02/20 07:03:18	1.2
+++ ftparchive/override.h	2001/04/25 07:01:56
@@ -18,6 +18,9 @@
 
 #include <map>
 #include <string>
+
+using std::string;
+using std::map;
     
 class Override
 {
Index: ftparchive/writer.cc
===================================================================
RCS file: /cvs/deity/apt/ftparchive/writer.cc,v
retrieving revision 1.2
diff -u -r1.2 writer.cc
--- ftparchive/writer.cc	2001/02/20 07:03:18	1.2
+++ ftparchive/writer.cc	2001/04/25 07:01:57
@@ -26,11 +26,13 @@
 #include <sys/types.h>
 #include <unistd.h>
 #include <ftw.h>
+#include <iostream>
     
 #include "cachedb.h"
 #include "apt-ftparchive.h"
 #include "multicompress.h"
 									/*}}}*/
+using namespace std;
 
 FTWScanner *FTWScanner::Owner;
 
@@ -576,7 +578,7 @@
    if (DirStrip.empty() == false &&
        FileName.length() > DirStrip.length() &&
        stringcmp(OriginalPath,OriginalPath + DirStrip.length(),
-		 DirStrip.begin(),DirStrip.end()) == 0)
+		 DirStrip.c_str(),DirStrip.c_str()+DirStrip.length()) == 0)
       NewFileName = string(OriginalPath + DirStrip.length());
    else 
       NewFileName = OriginalPath;
Index: ftparchive/writer.h
===================================================================
RCS file: /cvs/deity/apt/ftparchive/writer.h,v
retrieving revision 1.2
diff -u -r1.2 writer.h
--- ftparchive/writer.h	2001/02/20 07:03:18	1.2
+++ ftparchive/writer.h	2001/04/25 07:01:57
@@ -19,10 +19,15 @@
 
 #include <string>
 #include <stdio.h>
+#include <iostream>
 
 #include "cachedb.h"
 #include "override.h"
 #include "apt-ftparchive.h"
+
+using std::string;
+using std::cout;
+using std::endl;
     
 class FTWScanner
 {
Index: methods/cdrom.cc
===================================================================
RCS file: /cvs/deity/apt/methods/cdrom.cc,v
retrieving revision 1.17
diff -u -r1.17 cdrom.cc
--- methods/cdrom.cc	2000/01/17 07:11:49	1.17
+++ methods/cdrom.cc	2001/04/25 07:01:57
@@ -16,6 +16,10 @@
 
 #include <sys/stat.h>
 #include <unistd.h>
+
+#include <iostream>
+
+using namespace std;
 									/*}}}*/
 
 class CDROMMethod : public pkgAcqMethod
Index: methods/ftp.cc
===================================================================
RCS file: /cvs/deity/apt/methods/ftp.cc,v
retrieving revision 1.26
diff -u -r1.26 ftp.cc
--- methods/ftp.cc	2001/03/24 22:34:55	1.26
+++ methods/ftp.cc	2001/04/25 07:01:57
@@ -28,6 +28,7 @@
 #include <stdio.h>
 #include <errno.h>
 #include <stdarg.h>
+#include <iostream>
 
 // Internet stuff
 #include <netinet/in.h>
@@ -38,6 +39,8 @@
 #include "rfc2553emu.h"
 #include "connect.h"
 #include "ftp.h"
+
+using namespace std;
 									/*}}}*/
 
 /* This table is for the EPRT and EPSV commands, it maps the OS address
Index: methods/http.cc
===================================================================
RCS file: /cvs/deity/apt/methods/http.cc,v
retrieving revision 1.51
diff -u -r1.51 http.cc
--- methods/http.cc	2001/03/13 06:51:46	1.51
+++ methods/http.cc	2001/04/25 07:01:58
@@ -37,6 +37,8 @@
 #include <signal.h>
 #include <stdio.h>
 #include <errno.h>
+#include <string.h>
+#include <iostream>
 
 // Internet stuff
 #include <netdb.h>
@@ -45,6 +47,8 @@
 #include "rfc2553emu.h"
 #include "http.h"
 
+using namespace std;
+
 									/*}}}*/
 
 string HttpMethod::FailFile;
@@ -138,7 +142,7 @@
       unsigned long Sz = LeftRead();
       if (OutQueue.length() - StrPos < Sz)
 	 Sz = OutQueue.length() - StrPos;
-      memcpy(Buf + (InP%Size),OutQueue.begin() + StrPos,Sz);
+      memcpy(Buf + (InP%Size),OutQueue.c_str() + StrPos,Sz);
       
       // Advance
       StrPos += Sz;
@@ -357,7 +361,7 @@
       {
 	 string::const_iterator J = I;
 	 for (; J != Data.end() && *J != '\n' && *J != '\r';J++);
-	 if (HeaderLine(string(I,J-I)) == false)
+	 if (HeaderLine(string(I,J)) == false)
 	    return 2;
 	 I = J;
       }
@@ -499,7 +503,7 @@
    string Tag = string(Line,0,Pos);
    string Val = string(Line,Pos2);
    
-   if (stringcasecmp(Tag.begin(),Tag.begin()+4,"HTTP") == 0)
+   if (stringcasecmp(Tag.c_str(),Tag.c_str()+4,"HTTP") == 0)
    {
       // Evil servers return no version
       if (Line[4] == '/')
Index: methods/http.h
===================================================================
RCS file: /cvs/deity/apt/methods/http.h,v
retrieving revision 1.10
diff -u -r1.10 http.h
--- methods/http.h	2001/03/06 07:15:29	1.10
+++ methods/http.h	2001/04/25 07:01:58
@@ -13,6 +13,11 @@
 
 #define MAXLEN 360
 
+#include <iostream>
+
+using std::cout;
+using std::endl;
+
 class HttpMethod;
 
 class CircleBuf
Index: test/hash.cc
===================================================================
RCS file: /cvs/deity/apt/test/hash.cc,v
retrieving revision 1.1
diff -u -r1.1 hash.cc
--- test/hash.cc	2001/03/06 05:03:49	1.1
+++ test/hash.cc	2001/04/25 07:01:58
@@ -1,6 +1,9 @@
 #include <apt-pkg/md5.h>
 #include <apt-pkg/sha1.h>
 #include <apt-pkg/strutl.h>
+#include <iostream>
+
+using namespace std;
 
 template <class T> void Test(const char *In,const char *Out)
 {



Reply to: