Просмотр исходного кода

do not pollute namespace in the headers with using (Closes: #500198)

David Kalnischkies лет назад: 15
Родитель
Сommit
8f3ba4e870
98 измененных файлов с 598 добавлено и 629 удалено
  1. 1 1
      apt-inst/contrib/arfile.cc
  2. 1 1
      apt-inst/contrib/arfile.h
  3. 2 4
      apt-inst/contrib/extracttar.h
  4. 1 1
      apt-inst/database.cc
  5. 3 3
      apt-inst/database.h
  6. 3 3
      apt-inst/deb/debfile.cc
  7. 2 2
      apt-inst/deb/debfile.h
  8. 4 4
      apt-inst/deb/dpkgdb.h
  9. 1 1
      apt-inst/extract.h
  10. 1 1
      apt-inst/filelist.h
  11. 19 19
      apt-pkg/acquire-method.h
  12. 6 6
      apt-pkg/acquire-worker.h
  13. 16 20
      apt-pkg/acquire.h
  14. 2 4
      apt-pkg/algorithms.h
  15. 5 5
      apt-pkg/aptconfiguration.cc
  16. 3 3
      apt-pkg/cacheiterators.h
  17. 18 20
      apt-pkg/cdrom.h
  18. 5 5
      apt-pkg/clean.cc
  19. 2 2
      apt-pkg/clean.h
  20. 2 0
      apt-pkg/contrib/cdromutl.cc
  21. 5 7
      apt-pkg/contrib/cdromutl.h
  22. 22 24
      apt-pkg/contrib/configuration.h
  23. 20 22
      apt-pkg/contrib/fileutl.h
  24. 13 13
      apt-pkg/contrib/hashes.cc
  25. 7 10
      apt-pkg/contrib/hashes.h
  26. 1 1
      apt-pkg/contrib/hashsum.cc
  27. 5 8
      apt-pkg/contrib/hashsum_template.h
  28. 0 3
      apt-pkg/contrib/md5.h
  29. 1 3
      apt-pkg/contrib/mmap.h
  30. 1 0
      apt-pkg/contrib/netrc.cc
  31. 1 1
      apt-pkg/contrib/netrc.h
  32. 8 10
      apt-pkg/contrib/progress.h
  33. 0 3
      apt-pkg/contrib/sha1.h
  34. 52 56
      apt-pkg/contrib/strutl.h
  35. 34 34
      apt-pkg/deb/debindexfile.h
  36. 2 0
      apt-pkg/deb/deblistparser.cc
  37. 12 12
      apt-pkg/deb/deblistparser.h
  38. 4 2
      apt-pkg/deb/debrecords.cc
  39. 14 14
      apt-pkg/deb/debrecords.h
  40. 4 2
      apt-pkg/deb/debsrcrecords.cc
  41. 9 9
      apt-pkg/deb/debsrcrecords.h
  42. 3 1
      apt-pkg/deb/debsystem.cc
  43. 2 2
      apt-pkg/deb/debversion.cc
  44. 3 3
      apt-pkg/deb/debversion.h
  45. 8 11
      apt-pkg/deb/dpkgpm.h
  46. 3 0
      apt-pkg/depcache.cc
  47. 3 3
      apt-pkg/depcache.h
  48. 1 1
      apt-pkg/edsp/edspindexfile.h
  49. 4 4
      apt-pkg/edsp/edsplistparser.cc
  50. 4 4
      apt-pkg/edsp/edsplistparser.h
  51. 1 1
      apt-pkg/edsp/edspsystem.cc
  52. 19 22
      apt-pkg/indexcopy.h
  53. 5 5
      apt-pkg/indexfile.cc
  54. 5 7
      apt-pkg/indexfile.h
  55. 4 1
      apt-pkg/indexrecords.cc
  56. 15 15
      apt-pkg/indexrecords.h
  57. 3 3
      apt-pkg/init.cc
  58. 9 11
      apt-pkg/metaindex.h
  59. 3 3
      apt-pkg/orderlist.h
  60. 2 4
      apt-pkg/packagemanager.h
  61. 2 2
      apt-pkg/pkgcache.cc
  62. 7 9
      apt-pkg/pkgcache.h
  63. 19 19
      apt-pkg/pkgcachegen.h
  64. 1 1
      apt-pkg/pkgrecords.cc
  65. 13 13
      apt-pkg/pkgrecords.h
  66. 9 11
      apt-pkg/policy.h
  67. 15 18
      apt-pkg/srcrecords.h
  68. 1 1
      apt-pkg/tagfile.h
  69. 3 3
      apt-pkg/vendor.cc
  70. 10 12
      apt-pkg/vendor.h
  71. 3 0
      apt-pkg/vendorlist.cc
  72. 5 9
      apt-pkg/vendorlist.h
  73. 1 3
      apt-pkg/version.h
  74. 2 0
      apt-pkg/versionmatch.cc
  75. 12 14
      apt-pkg/versionmatch.h
  76. 7 0
      debian/changelog
  77. 6 6
      ftparchive/cachedb.cc
  78. 11 11
      ftparchive/cachedb.h
  79. 1 1
      ftparchive/contents.cc
  80. 1 1
      ftparchive/contents.h
  81. 3 3
      ftparchive/multicompress.h
  82. 3 3
      methods/bzip2.cc
  83. 7 7
      methods/connect.cc
  84. 1 1
      methods/connect.h
  85. 1 1
      methods/copy.cc
  86. 3 3
      methods/file.cc
  87. 5 5
      methods/ftp.h
  88. 3 0
      methods/gpgv.cc
  89. 1 1
      methods/gzip.cc
  90. 9 9
      methods/http.h
  91. 2 2
      methods/rred.cc
  92. 9 9
      methods/rsh.cc
  93. 5 5
      methods/rsh.h
  94. 3 1
      test/interactive-helper/test_udevcdrom.cc
  95. 1 1
      test/libapt/getlistoffilesindir_test.cc
  96. 1 1
      test/libapt/hashsums_test.cc
  97. 2 2
      test/libapt/parsedepends_test.cc
  98. 1 1
      test/libapt/strutil_test.cc

+ 1 - 1
apt-inst/contrib/arfile.cc

@@ -115,7 +115,7 @@ bool ARArchive::LoadHeaders()
       {
       {
 	 unsigned int I = sizeof(Head.Name) - 1;
 	 unsigned int I = sizeof(Head.Name) - 1;
 	 for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--);
 	 for (; Head.Name[I] == ' ' || Head.Name[I] == '/'; I--);
-	 Memb->Name = string(Head.Name,I+1);
+	 Memb->Name = std::string(Head.Name,I+1);
       }
       }
 
 
       // Account for the AR header alignment 
       // Account for the AR header alignment 

+ 1 - 1
apt-inst/contrib/arfile.h

@@ -49,7 +49,7 @@ class ARArchive
 struct ARArchive::Member
 struct ARArchive::Member
 {
 {
    // Fields from the header
    // Fields from the header
-   string Name;
+   std::string Name;
    unsigned long MTime;
    unsigned long MTime;
    unsigned long UID;
    unsigned long UID;
    unsigned long GID;
    unsigned long GID;

+ 2 - 4
apt-inst/contrib/extracttar.h

@@ -19,8 +19,6 @@
 
 
 #include <algorithm>
 #include <algorithm>
 
 
-using std::min;
-
 class ExtractTar
 class ExtractTar
 {
 {
    protected:
    protected:
@@ -38,7 +36,7 @@ class ExtractTar
    int GZPid;
    int GZPid;
    FileFd InFd;
    FileFd InFd;
    bool Eof;
    bool Eof;
-   string DecompressProg;
+   std::string DecompressProg;
    
    
    // Fork and reap gzip
    // Fork and reap gzip
    bool StartGzip();
    bool StartGzip();
@@ -48,7 +46,7 @@ class ExtractTar
 
 
    bool Go(pkgDirStream &Stream);
    bool Go(pkgDirStream &Stream);
    
    
-   ExtractTar(FileFd &Fd,unsigned long Max,string DecompressionProgram);
+   ExtractTar(FileFd &Fd,unsigned long Max,std::string DecompressionProgram);
    virtual ~ExtractTar();
    virtual ~ExtractTar();
 };
 };
 
 

+ 1 - 1
apt-inst/database.cc

@@ -17,7 +17,7 @@
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This re-initializes the meta temporary directory if it hasn't yet 
 /* This re-initializes the meta temporary directory if it hasn't yet 
    been inited for this cycle. The flag is the emptyness of MetaDir */
    been inited for this cycle. The flag is the emptyness of MetaDir */
-bool pkgDataBase::GetMetaTmp(string &Dir)
+bool pkgDataBase::GetMetaTmp(std::string &Dir)
 {
 {
    if (MetaDir.empty() == true)
    if (MetaDir.empty() == true)
       if (InitMetaTmp(MetaDir) == false)
       if (InitMetaTmp(MetaDir) == false)

+ 3 - 3
apt-inst/database.h

@@ -30,8 +30,8 @@ class pkgDataBase
    
    
    pkgCacheGenerator *Cache;
    pkgCacheGenerator *Cache;
    pkgFLCache *FList;
    pkgFLCache *FList;
-   string MetaDir;
-   virtual bool InitMetaTmp(string &Dir) = 0;
+   std::string MetaDir;
+   virtual bool InitMetaTmp(std::string &Dir) = 0;
    
    
    public:
    public:
 
 
@@ -40,7 +40,7 @@ class pkgDataBase
    inline pkgFLCache &GetFLCache() {return *FList;};
    inline pkgFLCache &GetFLCache() {return *FList;};
    inline pkgCacheGenerator &GetGenerator() {return *Cache;};
    inline pkgCacheGenerator &GetGenerator() {return *Cache;};
    
    
-   bool GetMetaTmp(string &Dir);
+   bool GetMetaTmp(std::string &Dir);
    virtual bool ReadyFileList(OpProgress &Progress) = 0;
    virtual bool ReadyFileList(OpProgress &Progress) = 0;
    virtual bool ReadyPkgCache(OpProgress &Progress) = 0;
    virtual bool ReadyPkgCache(OpProgress &Progress) = 0;
    virtual bool LoadChanges() = 0;
    virtual bool LoadChanges() = 0;

+ 3 - 3
apt-inst/deb/debfile.cc

@@ -107,8 +107,8 @@ bool debDebFile::ExtractControl(pkgDataBase &DB)
       return false;
       return false;
    
    
    // Get into the temporary directory
    // Get into the temporary directory
-   string Cwd = SafeGetCWD();
-   string Tmp;
+   std::string Cwd = SafeGetCWD();
+   std::string Tmp;
    if (DB.GetMetaTmp(Tmp) == false)
    if (DB.GetMetaTmp(Tmp) == false)
       return false;
       return false;
    if (chdir(Tmp.c_str()) != 0)
    if (chdir(Tmp.c_str()) != 0)
@@ -174,7 +174,7 @@ bool debDebFile::ExtractArchive(pkgDirStream &Stream)
 pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB)
 pkgCache::VerIterator debDebFile::MergeControl(pkgDataBase &DB)
 {
 {
    // Open the control file
    // Open the control file
-   string Tmp;
+   std::string Tmp;
    if (DB.GetMetaTmp(Tmp) == false)
    if (DB.GetMetaTmp(Tmp) == false)
       return pkgCache::VerIterator(DB.GetCache());
       return pkgCache::VerIterator(DB.GetCache());
    FileFd Fd(Tmp + "control",FileFd::ReadOnly);
    FileFd Fd(Tmp + "control",FileFd::ReadOnly);

+ 2 - 2
apt-inst/deb/debfile.h

@@ -68,7 +68,7 @@ class debDebFile::MemControlExtract : public pkgDirStream
    char *Control;
    char *Control;
    pkgTagSection Section;
    pkgTagSection Section;
    unsigned long Length;
    unsigned long Length;
-   string Member;
+   std::string Member;
    
    
    // Members from DirStream
    // Members from DirStream
    virtual bool DoItem(Item &Itm,int &Fd);
    virtual bool DoItem(Item &Itm,int &Fd);
@@ -81,7 +81,7 @@ class debDebFile::MemControlExtract : public pkgDirStream
    bool TakeControl(const void *Data,unsigned long Size);
    bool TakeControl(const void *Data,unsigned long Size);
       
       
    MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
    MemControlExtract() : IsControl(false), Control(0), Length(0), Member("control") {};
-   MemControlExtract(string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
+   MemControlExtract(std::string Member) : IsControl(false), Control(0), Length(0), Member(Member) {};
    ~MemControlExtract() {delete [] Control;};   
    ~MemControlExtract() {delete [] Control;};   
 };
 };
 									/*}}}*/
 									/*}}}*/

+ 4 - 4
apt-inst/deb/dpkgdb.h

@@ -25,14 +25,14 @@
 class debDpkgDB : public pkgDataBase
 class debDpkgDB : public pkgDataBase
 {
 {
    protected:
    protected:
-   
-   string AdminDir;
+
+   std::string AdminDir;
    DynamicMMap *CacheMap;
    DynamicMMap *CacheMap;
    DynamicMMap *FileMap;
    DynamicMMap *FileMap;
    unsigned long DiverInode;
    unsigned long DiverInode;
    signed long DiverTime;
    signed long DiverTime;
-   
-   virtual bool InitMetaTmp(string &Dir);
+
+   virtual bool InitMetaTmp(std::string &Dir);
    bool ReadFList(OpProgress &Progress);
    bool ReadFList(OpProgress &Progress);
    bool ReadDiversions();
    bool ReadDiversions();
    bool ReadConfFiles();
    bool ReadConfFiles();

+ 1 - 1
apt-inst/extract.h

@@ -33,7 +33,7 @@ class pkgExtract : public pkgDirStream
    
    
    bool HandleOverwrites(pkgFLCache::NodeIterator Nde,
    bool HandleOverwrites(pkgFLCache::NodeIterator Nde,
 			 bool DiverCheck = false);
 			 bool DiverCheck = false);
-   bool CheckDirReplace(string Dir,unsigned int Depth = 0);
+   bool CheckDirReplace(std::string Dir,unsigned int Depth = 0);
    
    
    public:
    public:
    
    

+ 1 - 1
apt-inst/filelist.h

@@ -48,7 +48,7 @@ class pkgFLCache
    class DiverIterator;
    class DiverIterator;
    
    
    protected:
    protected:
-   string CacheFile;
+   std::string CacheFile;
    DynamicMMap &Map;
    DynamicMMap &Map;
    map_ptrloc LastTreeLookup;
    map_ptrloc LastTreeLookup;
    unsigned long LastLookupSize;
    unsigned long LastLookupSize;

+ 19 - 19
apt-pkg/acquire-method.h

@@ -34,8 +34,8 @@ class pkgAcqMethod
    {
    {
       FetchItem *Next;
       FetchItem *Next;
 
 
-      string Uri;
-      string DestFile;
+      std::string Uri;
+      std::string DestFile;
       time_t LastModified;
       time_t LastModified;
       bool IndexFile;
       bool IndexFile;
       bool FailIgnore;
       bool FailIgnore;
@@ -43,14 +43,14 @@ class pkgAcqMethod
    
    
    struct FetchResult
    struct FetchResult
    {
    {
-      string MD5Sum;
-      string SHA1Sum;
-      string SHA256Sum;
-      string SHA512Sum;
-      vector<string> GPGVOutput;
+      std::string MD5Sum;
+      std::string SHA1Sum;
+      std::string SHA256Sum;
+      std::string SHA512Sum;
+      std::vector<std::string> GPGVOutput;
       time_t LastModified;
       time_t LastModified;
       bool IMSHit;
       bool IMSHit;
-      string Filename;
+      std::string Filename;
       unsigned long long Size;
       unsigned long long Size;
       unsigned long long ResumePoint;
       unsigned long long ResumePoint;
       
       
@@ -59,25 +59,25 @@ class pkgAcqMethod
    };
    };
 
 
    // State
    // State
-   vector<string> Messages;
+   std::vector<std::string> Messages;
    FetchItem *Queue;
    FetchItem *Queue;
    FetchItem *QueueBack;
    FetchItem *QueueBack;
-   string FailReason;
-   string UsedMirror;
-   string IP;
+   std::string FailReason;
+   std::string UsedMirror;
+   std::string IP;
    
    
    // Handlers for messages
    // Handlers for messages
-   virtual bool Configuration(string Message);
+   virtual bool Configuration(std::string Message);
    virtual bool Fetch(FetchItem * /*Item*/) {return true;};
    virtual bool Fetch(FetchItem * /*Item*/) {return true;};
    
    
    // Outgoing messages
    // Outgoing messages
    void Fail(bool Transient = false);
    void Fail(bool Transient = false);
-   inline void Fail(const char *Why, bool Transient = false) {Fail(string(Why),Transient);};
-   virtual void Fail(string Why, bool Transient = false);
+   inline void Fail(const char *Why, bool Transient = false) {Fail(std::string(Why),Transient);};
+   virtual void Fail(std::string Why, bool Transient = false);
    virtual void URIStart(FetchResult &Res);
    virtual void URIStart(FetchResult &Res);
    virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
    virtual void URIDone(FetchResult &Res,FetchResult *Alt = 0);
 
 
-   bool MediaFail(string Required,string Drive);
+   bool MediaFail(std::string Required,std::string Drive);
    virtual void Exit() {};
    virtual void Exit() {};
 
 
    void PrintStatus(char const * const header, const char* Format, va_list &args) const;
    void PrintStatus(char const * const header, const char* Format, va_list &args) const;
@@ -91,11 +91,11 @@ class pkgAcqMethod
    void Log(const char *Format,...);
    void Log(const char *Format,...);
    void Status(const char *Format,...);
    void Status(const char *Format,...);
    
    
-   void Redirect(const string &NewURI);
+   void Redirect(const std::string &NewURI);
  
  
    int Run(bool Single = false);
    int Run(bool Single = false);
-   inline void SetFailReason(string Msg) {FailReason = Msg;};
-   inline void SetIP(string aIP) {IP = aIP;};
+   inline void SetFailReason(std::string Msg) {FailReason = Msg;};
+   inline void SetIP(std::string aIP) {IP = aIP;};
    
    
    pkgAcqMethod(const char *Ver,unsigned long Flags = 0);
    pkgAcqMethod(const char *Ver,unsigned long Flags = 0);
    virtual ~pkgAcqMethod() {};
    virtual ~pkgAcqMethod() {};

+ 6 - 6
apt-pkg/acquire-worker.h

@@ -79,7 +79,7 @@ class pkgAcquire::Worker : public WeakPointable
     *
     *
     *  \todo Doesn't this duplicate Config->Access?
     *  \todo Doesn't this duplicate Config->Access?
     */
     */
-   string Access;
+   std::string Access;
 
 
    /** \brief The PID of the subprocess. */
    /** \brief The PID of the subprocess. */
    pid_t Process;
    pid_t Process;
@@ -118,13 +118,13 @@ class pkgAcquire::Worker : public WeakPointable
    /** \brief The raw text values of messages received from the
    /** \brief The raw text values of messages received from the
     *  worker, in sequence.
     *  worker, in sequence.
     */
     */
-   vector<string> MessageQueue;
+   std::vector<std::string> MessageQueue;
 
 
    /** \brief Buffers pending writes to the subprocess.
    /** \brief Buffers pending writes to the subprocess.
     *
     *
     *  \todo Wouldn't a std::dequeue be more appropriate?
     *  \todo Wouldn't a std::dequeue be more appropriate?
     */
     */
-   string OutQueue;
+   std::string OutQueue;
    
    
    /** \brief Common code for the constructor.
    /** \brief Common code for the constructor.
     *
     *
@@ -183,7 +183,7 @@ class pkgAcquire::Worker : public WeakPointable
     *
     *
     *  \return \b true.
     *  \return \b true.
     */
     */
-   bool Capabilities(string Message);
+   bool Capabilities(std::string Message);
 
 
    /** \brief Send a 601 Configuration message (containing the APT
    /** \brief Send a 601 Configuration message (containing the APT
     *  configuration) to the subprocess.
     *  configuration) to the subprocess.
@@ -214,7 +214,7 @@ class pkgAcquire::Worker : public WeakPointable
     *  603 Media Changed, with the Failed field set to \b true if the
     *  603 Media Changed, with the Failed field set to \b true if the
     *  user cancelled the media change).
     *  user cancelled the media change).
     */
     */
-   bool MediaChange(string Message);
+   bool MediaChange(std::string Message);
    
    
    /** \brief Invoked when the worked process dies unexpectedly.
    /** \brief Invoked when the worked process dies unexpectedly.
     *
     *
@@ -242,7 +242,7 @@ class pkgAcquire::Worker : public WeakPointable
    /** \brief The most recent status string received from the
    /** \brief The most recent status string received from the
     *  subprocess.
     *  subprocess.
     */
     */
-   string Status;
+   std::string Status;
 
 
    /** \brief How many bytes of the file have been downloaded.  Zero
    /** \brief How many bytes of the file have been downloaded.  Zero
     *  if the current progress of the file cannot be determined.
     *  if the current progress of the file cannot be determined.

+ 16 - 20
apt-pkg/acquire.h

@@ -72,10 +72,6 @@
 #include <vector>
 #include <vector>
 #include <string>
 #include <string>
 
 
-using std::vector;
-using std::string;
-
-
 #include <sys/time.h>
 #include <sys/time.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
@@ -107,8 +103,8 @@ class pkgAcquire
    friend class Item;
    friend class Item;
    friend class Queue;
    friend class Queue;
 
 
-   typedef vector<Item *>::iterator ItemIterator;
-   typedef vector<Item *>::const_iterator ItemCIterator;
+   typedef std::vector<Item *>::iterator ItemIterator;
+   typedef std::vector<Item *>::const_iterator ItemCIterator;
 
 
    protected:
    protected:
    
    
@@ -117,7 +113,7 @@ class pkgAcquire
     *  This is built monotonically as items are created and only
     *  This is built monotonically as items are created and only
     *  emptied when the download shuts down.
     *  emptied when the download shuts down.
     */
     */
-   vector<Item *> Items;
+   std::vector<Item *> Items;
    
    
    /** \brief The head of the list of active queues.
    /** \brief The head of the list of active queues.
     *
     *
@@ -202,7 +198,7 @@ class pkgAcquire
     *  \return the string-name of the queue in which a fetch request
     *  \return the string-name of the queue in which a fetch request
     *  for the given URI should be placed.
     *  for the given URI should be placed.
     */
     */
-   string QueueName(string URI,MethodConfig const *&Config);
+   std::string QueueName(std::string URI,MethodConfig const *&Config);
 
 
    /** \brief Build up the set of file descriptors upon which select() should
    /** \brief Build up the set of file descriptors upon which select() should
     *  block.
     *  block.
@@ -248,7 +244,7 @@ class pkgAcquire
     *
     *
     *  \return the method whose name is Access, or \b NULL if no such method exists.
     *  \return the method whose name is Access, or \b NULL if no such method exists.
     */
     */
-   MethodConfig *GetConfig(string Access);
+   MethodConfig *GetConfig(std::string Access);
 
 
    /** \brief Provides information on how a download terminated. */
    /** \brief Provides information on how a download terminated. */
    enum RunResult {
    enum RunResult {
@@ -319,7 +315,7 @@ class pkgAcquire
     *
     *
     *  \return \b true if the directory exists and is readable.
     *  \return \b true if the directory exists and is readable.
     */
     */
-   bool Clean(string Dir);
+   bool Clean(std::string Dir);
 
 
    /** \return the total size in bytes of all the items included in
    /** \return the total size in bytes of all the items included in
     *  this download.
     *  this download.
@@ -347,7 +343,7 @@ class pkgAcquire
     *  only one Acquire class is in action at the time or an empty string
     *  only one Acquire class is in action at the time or an empty string
     *  if no lock file should be used.
     *  if no lock file should be used.
     */
     */
-   bool Setup(pkgAcquireStatus *Progress = NULL, string const &Lock = "");
+   bool Setup(pkgAcquireStatus *Progress = NULL, std::string const &Lock = "");
 
 
    void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
    void SetLog(pkgAcquireStatus *Progress) { Log = Progress; }
 
 
@@ -372,11 +368,11 @@ class pkgAcquire
 struct pkgAcquire::ItemDesc : public WeakPointable
 struct pkgAcquire::ItemDesc : public WeakPointable
 {
 {
    /** \brief The URI from which to download this item. */
    /** \brief The URI from which to download this item. */
-   string URI;
+   std::string URI;
    /** brief A description of this item. */
    /** brief A description of this item. */
-   string Description;
+   std::string Description;
    /** brief A shorter description of this item. */
    /** brief A shorter description of this item. */
-   string ShortDesc;
+   std::string ShortDesc;
    /** brief The underlying item which is to be downloaded. */
    /** brief The underlying item which is to be downloaded. */
    Item *Owner;
    Item *Owner;
 };
 };
@@ -420,7 +416,7 @@ class pkgAcquire::Queue
    };
    };
    
    
    /** \brief The name of this queue. */
    /** \brief The name of this queue. */
-   string Name;
+   std::string Name;
 
 
    /** \brief The head of the list of items contained in this queue.
    /** \brief The head of the list of items contained in this queue.
     *
     *
@@ -475,7 +471,7 @@ class pkgAcquire::Queue
     *  \return the first item in the queue whose URI is #URI and that
     *  \return the first item in the queue whose URI is #URI and that
     *  is being downloaded by #Owner.
     *  is being downloaded by #Owner.
     */
     */
-   QItem *FindItem(string URI,pkgAcquire::Worker *Owner);
+   QItem *FindItem(std::string URI,pkgAcquire::Worker *Owner);
 
 
    /** Presumably this should start downloading an item?
    /** Presumably this should start downloading an item?
     *
     *
@@ -538,7 +534,7 @@ class pkgAcquire::Queue
     *  \param Name The name of the new queue.
     *  \param Name The name of the new queue.
     *  \param Owner The download process that owns the new queue.
     *  \param Owner The download process that owns the new queue.
     */
     */
-   Queue(string Name,pkgAcquire *Owner);
+   Queue(std::string Name,pkgAcquire *Owner);
 
 
    /** Shut down all the worker processes associated with this queue
    /** Shut down all the worker processes associated with this queue
     *  and empty the queue.
     *  and empty the queue.
@@ -603,10 +599,10 @@ struct pkgAcquire::MethodConfig
    MethodConfig *Next;
    MethodConfig *Next;
    
    
    /** \brief The name of this acquire method (e.g., http). */
    /** \brief The name of this acquire method (e.g., http). */
-   string Access;
+   std::string Access;
 
 
    /** \brief The implementation version of this acquire method. */
    /** \brief The implementation version of this acquire method. */
-   string Version;
+   std::string Version;
 
 
    /** \brief If \b true, only one download queue should be created for this
    /** \brief If \b true, only one download queue should be created for this
     *  method.
     *  method.
@@ -748,7 +744,7 @@ class pkgAcquireStatus
     *  \todo This is a horrible blocking monster; it should be CPSed
     *  \todo This is a horrible blocking monster; it should be CPSed
     *  with prejudice.
     *  with prejudice.
     */
     */
-   virtual bool MediaChange(string Media,string Drive) = 0;
+   virtual bool MediaChange(std::string Media,std::string Drive) = 0;
    
    
    /** \brief Invoked when an item is confirmed to be up-to-date.
    /** \brief Invoked when an item is confirmed to be up-to-date.
 
 

+ 2 - 4
apt-pkg/algorithms.h

@@ -37,8 +37,6 @@
 
 
 #include <iostream>
 #include <iostream>
 
 
-using std::ostream;
-
 class pkgSimulate : public pkgPackageManager				/*{{{*/
 class pkgSimulate : public pkgPackageManager				/*{{{*/
 {
 {
    protected:
    protected:
@@ -63,13 +61,13 @@ class pkgSimulate : public pkgPackageManager				/*{{{*/
    pkgDepCache::ActionGroup group;
    pkgDepCache::ActionGroup group;
    
    
    // The Actuall installation implementation
    // The Actuall installation implementation
-   virtual bool Install(PkgIterator Pkg,string File);
+   virtual bool Install(PkgIterator Pkg,std::string File);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Remove(PkgIterator Pkg,bool Purge);
    virtual bool Remove(PkgIterator Pkg,bool Purge);
 
 
 private:
 private:
    void ShortBreaks();
    void ShortBreaks();
-   void Describe(PkgIterator iPkg,ostream &out,bool Current,bool Candidate);
+   void Describe(PkgIterator iPkg,std::ostream &out,bool Current,bool Candidate);
    
    
    public:
    public:
 
 

+ 5 - 5
apt-pkg/aptconfiguration.cc

@@ -59,10 +59,10 @@ const Configuration::getCompressionTypes(bool const &Cached) {
 		if ((*o).empty() == true)
 		if ((*o).empty() == true)
 			continue;
 			continue;
 		// ignore types we have no method ready to use
 		// ignore types we have no method ready to use
-		if (_config->Exists(string("Acquire::CompressionTypes::").append(*o)) == false)
+		if (_config->Exists(std::string("Acquire::CompressionTypes::").append(*o)) == false)
 			continue;
 			continue;
 		// ignore types we have no app ready to use
 		// ignore types we have no app ready to use
-		string const appsetting = string("Dir::Bin::").append(*o);
+		std::string const appsetting = std::string("Dir::Bin::").append(*o);
 		if (_config->Exists(appsetting) == true) {
 		if (_config->Exists(appsetting) == true) {
 			std::string const app = _config->FindFile(appsetting.c_str(), "");
 			std::string const app = _config->FindFile(appsetting.c_str(), "");
 			if (app.empty() == false && FileExists(app) == false)
 			if (app.empty() == false && FileExists(app) == false)
@@ -83,7 +83,7 @@ const Configuration::getCompressionTypes(bool const &Cached) {
 		if (std::find(types.begin(),types.end(),Types->Tag) != types.end())
 		if (std::find(types.begin(),types.end(),Types->Tag) != types.end())
 			continue;
 			continue;
 		// ignore types we have no app ready to use
 		// ignore types we have no app ready to use
-		string const appsetting = string("Dir::Bin::").append(Types->Value);
+		std::string const appsetting = std::string("Dir::Bin::").append(Types->Value);
 		if (appsetting.empty() == false && _config->Exists(appsetting) == true) {
 		if (appsetting.empty() == false && _config->Exists(appsetting) == true) {
 			std::string const app = _config->FindFile(appsetting.c_str(), "");
 			std::string const app = _config->FindFile(appsetting.c_str(), "");
 			if (app.empty() == false && FileExists(app) == false)
 			if (app.empty() == false && FileExists(app) == false)
@@ -95,7 +95,7 @@ const Configuration::getCompressionTypes(bool const &Cached) {
 	// add the special "uncompressed" type
 	// add the special "uncompressed" type
 	if (std::find(types.begin(), types.end(), "uncompressed") == types.end())
 	if (std::find(types.begin(), types.end(), "uncompressed") == types.end())
 	{
 	{
-		string const uncompr = _config->FindFile("Dir::Bin::uncompressed", "");
+		std::string const uncompr = _config->FindFile("Dir::Bin::uncompressed", "");
 		if (uncompr.empty() == true || FileExists(uncompr) == true)
 		if (uncompr.empty() == true || FileExists(uncompr) == true)
 			types.push_back("uncompressed");
 			types.push_back("uncompressed");
 	}
 	}
@@ -441,7 +441,7 @@ Configuration::Compressor::Compressor(char const *name, char const *extension,
 				      char const *binary,
 				      char const *binary,
 				      char const *compressArg, char const *uncompressArg,
 				      char const *compressArg, char const *uncompressArg,
 				      unsigned short const cost) {
 				      unsigned short const cost) {
-	std::string const config = string("APT:Compressor::").append(name).append("::");
+	std::string const config = std::string("APT:Compressor::").append(name).append("::");
 	Name = _config->Find(std::string(config).append("Name"), name);
 	Name = _config->Find(std::string(config).append("Name"), name);
 	Extension = _config->Find(std::string(config).append("Extension"), extension);
 	Extension = _config->Find(std::string(config).append("Extension"), extension);
 	Binary = _config->Find(std::string(config).append("Binary"), binary);
 	Binary = _config->Find(std::string(config).append("Binary"), binary);

+ 3 - 3
apt-pkg/cacheiterators.h

@@ -111,7 +111,7 @@ class pkgCache::GrpIterator: public Iterator<Group, GrpIterator> {
 
 
 	inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;};
 	inline const char *Name() const {return S->Name == 0?0:Owner->StrP + S->Name;};
 	inline PkgIterator PackageList() const;
 	inline PkgIterator PackageList() const;
-	PkgIterator FindPkg(string Arch = "any") const;
+	PkgIterator FindPkg(std::string Arch = "any") const;
 	/** \brief find the package with the "best" architecture
 	/** \brief find the package with the "best" architecture
 
 
 	    The best architecture is either the "native" or the first
 	    The best architecture is either the "native" or the first
@@ -219,7 +219,7 @@ class pkgCache::VerIterator : public Iterator<Version, VerIterator> {
 	inline VerFileIterator FileList() const;
 	inline VerFileIterator FileList() const;
 	bool Downloadable() const;
 	bool Downloadable() const;
 	inline const char *PriorityType() const {return Owner->Priority(S->Priority);};
 	inline const char *PriorityType() const {return Owner->Priority(S->Priority);};
-	string RelStr() const;
+	std::string RelStr() const;
 
 
 	bool Automatic() const;
 	bool Automatic() const;
 	VerFileIterator NewestFile() const;
 	VerFileIterator NewestFile() const;
@@ -365,7 +365,7 @@ class pkgCache::PkgFileIterator : public Iterator<PackageFile, PkgFileIterator>
 	inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;};
 	inline const char *IndexType() const {return S->IndexType == 0?0:Owner->StrP + S->IndexType;};
 
 
 	bool IsOk();
 	bool IsOk();
-	string RelStr();
+	std::string RelStr();
 
 
 	// Constructors
 	// Constructors
 	inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {};
 	inline PkgFileIterator() : Iterator<PackageFile, PkgFileIterator>() {};

+ 18 - 20
apt-pkg/cdrom.h

@@ -6,8 +6,6 @@
 #include<vector>
 #include<vector>
 
 
 
 
-using namespace std;
-
 class pkgCdromStatus							/*{{{*/
 class pkgCdromStatus							/*{{{*/
 {
 {
  protected:
  protected:
@@ -20,12 +18,12 @@ class pkgCdromStatus							/*{{{*/
    // total steps
    // total steps
    virtual void SetTotal(int total) { totalSteps = total; };
    virtual void SetTotal(int total) { totalSteps = total; };
    // update steps, will be called regularly as a "pulse"
    // update steps, will be called regularly as a "pulse"
-   virtual void Update(string text="", int current=0) = 0;
+   virtual void Update(std::string text="", int current=0) = 0;
    
    
    // ask for cdrom insert
    // ask for cdrom insert
    virtual bool ChangeCdrom() = 0;
    virtual bool ChangeCdrom() = 0;
    // ask for cdrom name
    // ask for cdrom name
-   virtual bool AskCdromName(string &Name) = 0;
+   virtual bool AskCdromName(std::string &Name) = 0;
    // Progress indicator for the Index rewriter
    // Progress indicator for the Index rewriter
    virtual OpProgress* GetOpProgress() {return NULL; };
    virtual OpProgress* GetOpProgress() {return NULL; };
 };
 };
@@ -47,22 +45,22 @@ class pkgCdrom								/*{{{*/
    };
    };
 
 
 
 
-   bool FindPackages(string CD,
-		     vector<string> &List,
-		     vector<string> &SList, 
-		     vector<string> &SigList,
-		     vector<string> &TransList,
-		     string &InfoDir, pkgCdromStatus *log,
+   bool FindPackages(std::string CD,
+		     std::vector<std::string> &List,
+		     std::vector<std::string> &SList, 
+		     std::vector<std::string> &SigList,
+		     std::vector<std::string> &TransList,
+		     std::string &InfoDir, pkgCdromStatus *log,
 		     unsigned int Depth = 0);
 		     unsigned int Depth = 0);
-   bool DropBinaryArch(vector<string> &List);
-   bool DropRepeats(vector<string> &List,const char *Name);
-   void ReduceSourcelist(string CD,vector<string> &List);
+   bool DropBinaryArch(std::vector<std::string> &List);
+   bool DropRepeats(std::vector<std::string> &List,const char *Name);
+   void ReduceSourcelist(std::string CD,std::vector<std::string> &List);
    bool WriteDatabase(Configuration &Cnf);
    bool WriteDatabase(Configuration &Cnf);
-   bool WriteSourceList(string Name,vector<string> &List,bool Source);
-   int Score(string Path);
+   bool WriteSourceList(std::string Name,std::vector<std::string> &List,bool Source);
+   int Score(std::string Path);
 
 
  public:
  public:
-   bool Ident(string &ident, pkgCdromStatus *log);
+   bool Ident(std::string &ident, pkgCdromStatus *log);
    bool Add(pkgCdromStatus *log);
    bool Add(pkgCdromStatus *log);
 };
 };
 									/*}}}*/
 									/*}}}*/
@@ -71,9 +69,9 @@ class pkgCdrom								/*{{{*/
 // class that uses libudev to find cdrom/removable devices dynamically
 // class that uses libudev to find cdrom/removable devices dynamically
 struct CdromDevice							/*{{{*/
 struct CdromDevice							/*{{{*/
 {
 {
-   string DeviceName;
+   std::string DeviceName;
    bool Mounted;
    bool Mounted;
-   string MountPath;
+   std::string MountPath;
 };
 };
 									/*}}}*/
 									/*}}}*/
 class pkgUdevCdromDevices						/*{{{*/
 class pkgUdevCdromDevices						/*{{{*/
@@ -104,9 +102,9 @@ class pkgUdevCdromDevices						/*{{{*/
 
 
    // convenience interface, this will just call ScanForRemovable
    // convenience interface, this will just call ScanForRemovable
    // with "APT::cdrom::CdromOnly"
    // with "APT::cdrom::CdromOnly"
-   vector<CdromDevice> Scan();
+   std::vector<CdromDevice> Scan();
 
 
-   vector<CdromDevice> ScanForRemovable(bool CdromOnly);
+   std::vector<CdromDevice> ScanForRemovable(bool CdromOnly);
 };
 };
 									/*}}}*/
 									/*}}}*/
 
 

+ 5 - 5
apt-pkg/clean.cc

@@ -26,7 +26,7 @@
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Scan the directory for files to erase, we check the version information
 /* Scan the directory for files to erase, we check the version information
    against our database to see if it is interesting */
    against our database to see if it is interesting */
-bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache)
+bool pkgArchiveCleaner::Go(std::string Dir,pkgCache &Cache)
 {
 {
    bool CleanInstalled = _config->FindB("APT::Clean-Installed",true);
    bool CleanInstalled = _config->FindB("APT::Clean-Installed",true);
       
       
@@ -34,7 +34,7 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache)
    if (D == 0)
    if (D == 0)
       return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());
       return _error->Errno("opendir",_("Unable to read %s"),Dir.c_str());
 
 
-   string StartDir = SafeGetCWD();
+   std::string StartDir = SafeGetCWD();
    if (chdir(Dir.c_str()) != 0)
    if (chdir(Dir.c_str()) != 0)
    {
    {
       closedir(D);
       closedir(D);
@@ -63,21 +63,21 @@ bool pkgArchiveCleaner::Go(string Dir,pkgCache &Cache)
       for (; *I != 0 && *I != '_';I++);
       for (; *I != 0 && *I != '_';I++);
       if (*I != '_')
       if (*I != '_')
 	 continue;
 	 continue;
-      string Pkg = DeQuoteString(string(Dir->d_name,I-Dir->d_name));
+      std::string Pkg = DeQuoteString(std::string(Dir->d_name,I-Dir->d_name));
 
 
       // Grab the version
       // Grab the version
       const char *Start = I + 1;
       const char *Start = I + 1;
       for (I = Start; *I != 0 && *I != '_';I++);
       for (I = Start; *I != 0 && *I != '_';I++);
       if (*I != '_')
       if (*I != '_')
 	 continue;
 	 continue;
-      string Ver = DeQuoteString(string(Start,I-Start));
+      std::string Ver = DeQuoteString(std::string(Start,I-Start));
   
   
       // Grab the arch
       // Grab the arch
       Start = I + 1;
       Start = I + 1;
       for (I = Start; *I != 0 && *I != '.' ;I++);
       for (I = Start; *I != 0 && *I != '.' ;I++);
       if (*I != '.')
       if (*I != '.')
 	 continue;
 	 continue;
-      string const Arch = DeQuoteString(string(Start,I-Start));
+      std::string const Arch = DeQuoteString(std::string(Start,I-Start));
       
       
       if (APT::Configuration::checkArchitecture(Arch) == false)
       if (APT::Configuration::checkArchitecture(Arch) == false)
 	 continue;
 	 continue;

+ 2 - 2
apt-pkg/clean.h

@@ -20,11 +20,11 @@ class pkgArchiveCleaner
 
 
    protected:
    protected:
    
    
-   virtual void Erase(const char * /*File*/,string /*Pkg*/,string /*Ver*/,struct stat & /*St*/) {};
+   virtual void Erase(const char * /*File*/,std::string /*Pkg*/,std::string /*Ver*/,struct stat & /*St*/) {};
 
 
    public:   
    public:   
    
    
-   bool Go(string Dir,pkgCache &Cache);
+   bool Go(std::string Dir,pkgCache &Cache);
    virtual ~pkgArchiveCleaner() {};
    virtual ~pkgArchiveCleaner() {};
 };
 };
 
 

+ 2 - 0
apt-pkg/contrib/cdromutl.cc

@@ -30,6 +30,8 @@
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // IsMounted - Returns true if the mount point is mounted		/*{{{*/
 // IsMounted - Returns true if the mount point is mounted		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This is a simple algorithm that should always work, we stat the mount point
 /* This is a simple algorithm that should always work, we stat the mount point

+ 5 - 7
apt-pkg/contrib/cdromutl.h

@@ -12,13 +12,11 @@
 
 
 #include <string>
 #include <string>
 
 
-using std::string;
-
 // mount cdrom, DeviceName (e.g. /dev/sr0) is optional
 // mount cdrom, DeviceName (e.g. /dev/sr0) is optional
-bool MountCdrom(string Path, string DeviceName="");
-bool UnmountCdrom(string Path);
-bool IdentCdrom(string CD,string &Res,unsigned int Version = 2);
-bool IsMounted(string &Path);
-string FindMountPointForDevice(const char *device);
+bool MountCdrom(std::string Path, std::string DeviceName="");
+bool UnmountCdrom(std::string Path);
+bool IdentCdrom(std::string CD,std::string &Res,unsigned int Version = 2);
+bool IsMounted(std::string &Path);
+std::string FindMountPointForDevice(const char *device);
 
 
 #endif
 #endif

+ 22 - 24
apt-pkg/contrib/configuration.h

@@ -34,21 +34,19 @@
 #include <vector>
 #include <vector>
 #include <iostream>
 #include <iostream>
 
 
-using std::string;
-
 class Configuration
 class Configuration
 {
 {
    public:
    public:
    
    
    struct Item
    struct Item
    {
    {
-      string Value;
-      string Tag;
+      std::string Value;
+      std::string Tag;
       Item *Parent;
       Item *Parent;
       Item *Child;
       Item *Child;
       Item *Next;
       Item *Next;
       
       
-      string FullTag(const Item *Stop = 0) const;
+      std::string FullTag(const Item *Stop = 0) const;
       
       
       Item() : Parent(0), Child(0), Next(0) {};
       Item() : Parent(0), Child(0), Next(0) {};
    };
    };
@@ -67,35 +65,35 @@ class Configuration
    
    
    public:
    public:
 
 
-   string Find(const char *Name,const char *Default = 0) const;
-   string Find(string const &Name,const char *Default = 0) const {return Find(Name.c_str(),Default);};
-   string Find(string const &Name, string const &Default) const {return Find(Name.c_str(),Default.c_str());};
-   string FindFile(const char *Name,const char *Default = 0) const;
-   string FindDir(const char *Name,const char *Default = 0) const;
-   std::vector<string> FindVector(const char *Name) const;
-   std::vector<string> FindVector(string const &Name) const { return FindVector(Name.c_str()); };
+   std::string Find(const char *Name,const char *Default = 0) const;
+   std::string Find(std::string const &Name,const char *Default = 0) const {return Find(Name.c_str(),Default);};
+   std::string Find(std::string const &Name, std::string const &Default) const {return Find(Name.c_str(),Default.c_str());};
+   std::string FindFile(const char *Name,const char *Default = 0) const;
+   std::string FindDir(const char *Name,const char *Default = 0) const;
+   std::vector<std::string> FindVector(const char *Name) const;
+   std::vector<std::string> FindVector(std::string const &Name) const { return FindVector(Name.c_str()); };
    int FindI(const char *Name,int const &Default = 0) const;
    int FindI(const char *Name,int const &Default = 0) const;
-   int FindI(string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
+   int FindI(std::string const &Name,int const &Default = 0) const {return FindI(Name.c_str(),Default);};
    bool FindB(const char *Name,bool const &Default = false) const;
    bool FindB(const char *Name,bool const &Default = false) const;
-   bool FindB(string const &Name,bool const &Default = false) const {return FindB(Name.c_str(),Default);};
-   string FindAny(const char *Name,const char *Default = 0) const;
+   bool FindB(std::string const &Name,bool const &Default = false) const {return FindB(Name.c_str(),Default);};
+   std::string FindAny(const char *Name,const char *Default = 0) const;
 	      
 	      
-   inline void Set(const string &Name,const string &Value) {Set(Name.c_str(),Value);};
-   void CndSet(const char *Name,const string &Value);
+   inline void Set(const std::string &Name,const std::string &Value) {Set(Name.c_str(),Value);};
+   void CndSet(const char *Name,const std::string &Value);
    void CndSet(const char *Name,const int Value);
    void CndSet(const char *Name,const int Value);
-   void Set(const char *Name,const string &Value);
+   void Set(const char *Name,const std::string &Value);
    void Set(const char *Name,const int &Value);
    void Set(const char *Name,const int &Value);
    
    
-   inline bool Exists(const string &Name) const {return Exists(Name.c_str());};
+   inline bool Exists(const std::string &Name) const {return Exists(Name.c_str());};
    bool Exists(const char *Name) const;
    bool Exists(const char *Name) const;
    bool ExistsAny(const char *Name) const;
    bool ExistsAny(const char *Name) const;
 
 
    // clear a whole tree
    // clear a whole tree
-   void Clear(const string &Name);
+   void Clear(const std::string &Name);
 
 
    // remove a certain value from a list (e.g. the list of "APT::Keep-Fds")
    // remove a certain value from a list (e.g. the list of "APT::Keep-Fds")
-   void Clear(string const &List, string const &Value);
-   void Clear(string const &List, int const &Value);
+   void Clear(std::string const &List, std::string const &Value);
+   void Clear(std::string const &List, int const &Value);
 
 
    inline const Item *Tree(const char *Name) const {return Lookup(Name);};
    inline const Item *Tree(const char *Name) const {return Lookup(Name);};
 
 
@@ -127,11 +125,11 @@ class Configuration
 
 
 extern Configuration *_config;
 extern Configuration *_config;
 
 
-bool ReadConfigFile(Configuration &Conf,const string &FName,
+bool ReadConfigFile(Configuration &Conf,const std::string &FName,
 		    bool const &AsSectional = false,
 		    bool const &AsSectional = false,
 		    unsigned const &Depth = 0);
 		    unsigned const &Depth = 0);
 
 
-bool ReadConfigDir(Configuration &Conf,const string &Dir,
+bool ReadConfigDir(Configuration &Conf,const std::string &Dir,
 		   bool const &AsSectional = false,
 		   bool const &AsSectional = false,
 		   unsigned const &Depth = 0);
 		   unsigned const &Depth = 0);
 
 

+ 20 - 22
apt-pkg/contrib/fileutl.h

@@ -31,8 +31,6 @@
 /* Define this for python-apt */
 /* Define this for python-apt */
 #define APT_HAS_GZIP 1
 #define APT_HAS_GZIP 1
 
 
-using std::string;
-
 class FileFd
 class FileFd
 {
 {
    protected:
    protected:
@@ -41,8 +39,8 @@ class FileFd
    enum LocalFlags {AutoClose = (1<<0),Fail = (1<<1),DelOnFail = (1<<2),
    enum LocalFlags {AutoClose = (1<<0),Fail = (1<<1),DelOnFail = (1<<2),
                     HitEof = (1<<3), Replace = (1<<4) };
                     HitEof = (1<<3), Replace = (1<<4) };
    unsigned long Flags;
    unsigned long Flags;
-   string FileName;
-   string TemporaryFileName;
+   std::string FileName;
+   std::string TemporaryFileName;
    gzFile gz;
    gzFile gz;
 
 
    public:
    public:
@@ -79,7 +77,7 @@ class FileFd
 	return T;
 	return T;
    }
    }
 
 
-   bool Open(string FileName,OpenMode Mode,unsigned long Perms = 0666);
+   bool Open(std::string FileName,OpenMode Mode,unsigned long Perms = 0666);
    bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false);
    bool OpenDescriptor(int Fd, OpenMode Mode, bool AutoClose=false);
    bool Close();
    bool Close();
    bool Sync();
    bool Sync();
@@ -93,9 +91,9 @@ class FileFd
    inline void EraseOnFailure() {Flags |= DelOnFail;};
    inline void EraseOnFailure() {Flags |= DelOnFail;};
    inline void OpFail() {Flags |= Fail;};
    inline void OpFail() {Flags |= Fail;};
    inline bool Eof() {return (Flags & HitEof) == HitEof;};
    inline bool Eof() {return (Flags & HitEof) == HitEof;};
-   inline string &Name() {return FileName;};
+   inline std::string &Name() {return FileName;};
    
    
-   FileFd(string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1), 
+   FileFd(std::string FileName,OpenMode Mode,unsigned long Perms = 0666) : iFd(-1), 
             Flags(0), gz(NULL)
             Flags(0), gz(NULL)
    {
    {
       Open(FileName,Mode,Perms);
       Open(FileName,Mode,Perms);
@@ -107,12 +105,12 @@ class FileFd
 
 
 bool RunScripts(const char *Cnf);
 bool RunScripts(const char *Cnf);
 bool CopyFile(FileFd &From,FileFd &To);
 bool CopyFile(FileFd &From,FileFd &To);
-int GetLock(string File,bool Errors = true);
-bool FileExists(string File);
-bool RealFileExists(string File);
-bool DirectoryExists(string const &Path) __attrib_const;
-bool CreateDirectory(string const &Parent, string const &Path);
-time_t GetModificationTime(string const &Path);
+int GetLock(std::string File,bool Errors = true);
+bool FileExists(std::string File);
+bool RealFileExists(std::string File);
+bool DirectoryExists(std::string const &Path) __attrib_const;
+bool CreateDirectory(std::string const &Parent, std::string const &Path);
+time_t GetModificationTime(std::string const &Path);
 
 
 /** \brief Ensure the existence of the given Path
 /** \brief Ensure the existence of the given Path
  *
  *
@@ -120,13 +118,13 @@ time_t GetModificationTime(string const &Path);
  *  /apt/ will be removed before CreateDirectory call.
  *  /apt/ will be removed before CreateDirectory call.
  *  \param Path which should exist after (successful) call
  *  \param Path which should exist after (successful) call
  */
  */
-bool CreateAPTDirectoryIfNeeded(string const &Parent, string const &Path);
+bool CreateAPTDirectoryIfNeeded(std::string const &Parent, std::string const &Path);
 
 
-std::vector<string> GetListOfFilesInDir(string const &Dir, string const &Ext,
+std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::string const &Ext,
 					bool const &SortList, bool const &AllowNoExt=false);
 					bool const &SortList, bool const &AllowNoExt=false);
-std::vector<string> GetListOfFilesInDir(string const &Dir, std::vector<string> const &Ext,
+std::vector<std::string> GetListOfFilesInDir(std::string const &Dir, std::vector<std::string> const &Ext,
 					bool const &SortList);
 					bool const &SortList);
-string SafeGetCWD();
+std::string SafeGetCWD();
 void SetCloseExec(int Fd,bool Close);
 void SetCloseExec(int Fd,bool Close);
 void SetNonBlock(int Fd,bool Block);
 void SetNonBlock(int Fd,bool Block);
 bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
 bool WaitFd(int Fd,bool write = false,unsigned long timeout = 0);
@@ -134,10 +132,10 @@ pid_t ExecFork();
 bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
 bool ExecWait(pid_t Pid,const char *Name,bool Reap = false);
 
 
 // File string manipulators
 // File string manipulators
-string flNotDir(string File);
-string flNotFile(string File);
-string flNoLink(string File);
-string flExtension(string File);
-string flCombine(string Dir,string File);
+std::string flNotDir(std::string File);
+std::string flNotFile(std::string File);
+std::string flNoLink(std::string File);
+std::string flExtension(std::string File);
+std::string flCombine(std::string Dir,std::string File);
 
 
 #endif
 #endif

+ 13 - 13
apt-pkg/contrib/hashes.cc

@@ -32,20 +32,20 @@ HashString::HashString()
 {
 {
 }
 }
 
 
-HashString::HashString(string Type, string Hash) : Type(Type), Hash(Hash)
+HashString::HashString(std::string Type, std::string Hash) : Type(Type), Hash(Hash)
 {
 {
 }
 }
 
 
-HashString::HashString(string StringedHash)				/*{{{*/
+HashString::HashString(std::string StringedHash)			/*{{{*/
 {
 {
    // legacy: md5sum without "MD5Sum:" prefix
    // legacy: md5sum without "MD5Sum:" prefix
-   if (StringedHash.find(":") == string::npos && StringedHash.size() == 32)
+   if (StringedHash.find(":") == std::string::npos && StringedHash.size() == 32)
    {
    {
       Type = "MD5Sum";
       Type = "MD5Sum";
       Hash = StringedHash;
       Hash = StringedHash;
       return;
       return;
    }
    }
-   string::size_type pos = StringedHash.find(":");
+   std::string::size_type pos = StringedHash.find(":");
    Type = StringedHash.substr(0,pos);
    Type = StringedHash.substr(0,pos);
    Hash = StringedHash.substr(pos+1, StringedHash.size() - pos);
    Hash = StringedHash.substr(pos+1, StringedHash.size() - pos);
 
 
@@ -53,34 +53,34 @@ HashString::HashString(string StringedHash)				/*{{{*/
       std::clog << "HashString(string): " << Type << " : " << Hash << std::endl;
       std::clog << "HashString(string): " << Type << " : " << Hash << std::endl;
 }
 }
 									/*}}}*/
 									/*}}}*/
-bool HashString::VerifyFile(string filename) const			/*{{{*/
+bool HashString::VerifyFile(std::string filename) const			/*{{{*/
 {
 {
-   string fileHash;
+   std::string fileHash;
 
 
    FileFd Fd(filename, FileFd::ReadOnly);
    FileFd Fd(filename, FileFd::ReadOnly);
    if(Type == "MD5Sum")
    if(Type == "MD5Sum")
    {
    {
       MD5Summation MD5;
       MD5Summation MD5;
       MD5.AddFD(Fd.Fd(), Fd.Size());
       MD5.AddFD(Fd.Fd(), Fd.Size());
-      fileHash = (string)MD5.Result();
+      fileHash = (std::string)MD5.Result();
    }
    }
    else if (Type == "SHA1")
    else if (Type == "SHA1")
    {
    {
       SHA1Summation SHA1;
       SHA1Summation SHA1;
       SHA1.AddFD(Fd.Fd(), Fd.Size());
       SHA1.AddFD(Fd.Fd(), Fd.Size());
-      fileHash = (string)SHA1.Result();
+      fileHash = (std::string)SHA1.Result();
    }
    }
    else if (Type == "SHA256")
    else if (Type == "SHA256")
    {
    {
       SHA256Summation SHA256;
       SHA256Summation SHA256;
       SHA256.AddFD(Fd.Fd(), Fd.Size());
       SHA256.AddFD(Fd.Fd(), Fd.Size());
-      fileHash = (string)SHA256.Result();
+      fileHash = (std::string)SHA256.Result();
    }
    }
    else if (Type == "SHA512")
    else if (Type == "SHA512")
    {
    {
       SHA512Summation SHA512;
       SHA512Summation SHA512;
       SHA512.AddFD(Fd.Fd(), Fd.Size());
       SHA512.AddFD(Fd.Fd(), Fd.Size());
-      fileHash = (string)SHA512.Result();
+      fileHash = (std::string)SHA512.Result();
    }
    }
    Fd.Close();
    Fd.Close();
 
 
@@ -100,9 +100,9 @@ bool HashString::empty() const
    return (Type.empty() || Hash.empty());
    return (Type.empty() || Hash.empty());
 }
 }
 
 
-string HashString::toStr() const
+std::string HashString::toStr() const
 {
 {
-   return Type+string(":")+Hash;
+   return Type + std::string(":") + Hash;
 }
 }
 
 
 // Hashes::AddFD - Add the contents of the FD				/*{{{*/
 // Hashes::AddFD - Add the contents of the FD				/*{{{*/
@@ -117,7 +117,7 @@ bool Hashes::AddFD(int const Fd,unsigned long long Size, bool const addMD5,
    while (Size != 0 || ToEOF)
    while (Size != 0 || ToEOF)
    {
    {
       unsigned long long n = sizeof(Buf);
       unsigned long long n = sizeof(Buf);
-      if (!ToEOF) n = min(Size, n);
+      if (!ToEOF) n = std::min(Size, n);
       Res = read(Fd,Buf,n);
       Res = read(Fd,Buf,n);
       if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read
       if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read
 	 return false;
 	 return false;

+ 7 - 10
apt-pkg/contrib/hashes.h

@@ -22,31 +22,28 @@
 #include <vector>
 #include <vector>
 #include <cstring>
 #include <cstring>
 
 
-using std::min;
-using std::vector;
-
 // helper class that contains hash function name
 // helper class that contains hash function name
 // and hash
 // and hash
 class HashString
 class HashString
 {
 {
  protected:
  protected:
-   string Type;
-   string Hash;
+   std::string Type;
+   std::string Hash;
    static const char * _SupportedHashes[10];
    static const char * _SupportedHashes[10];
 
 
  public:
  public:
-   HashString(string Type, string Hash);
-   HashString(string StringedHashString);  // init from str as "type:hash"
+   HashString(std::string Type, std::string Hash);
+   HashString(std::string StringedHashString);  // init from str as "type:hash"
    HashString();
    HashString();
 
 
    // get hash type used
    // get hash type used
-   string HashType() { return Type; };
+   std::string HashType() { return Type; };
 
 
    // verify the given filename against the currently loaded hash
    // verify the given filename against the currently loaded hash
-   bool VerifyFile(string filename) const;
+   bool VerifyFile(std::string filename) const;
 
 
    // helper
    // helper
-   string toStr() const;                    // convert to str as "type:hash"
+   std::string toStr() const;                    // convert to str as "type:hash"
    bool empty() const;
    bool empty() const;
 
 
    // return the list of hashes we support
    // return the list of hashes we support

+ 1 - 1
apt-pkg/contrib/hashsum.cc

@@ -14,7 +14,7 @@ bool SummationImplementation::AddFD(int const Fd, unsigned long long Size) {
    while (Size != 0 || ToEOF)
    while (Size != 0 || ToEOF)
    {
    {
       unsigned long long n = sizeof(Buf);
       unsigned long long n = sizeof(Buf);
-      if (!ToEOF) n = min(Size, n);
+      if (!ToEOF) n = std::min(Size, n);
       Res = read(Fd, Buf, n);
       Res = read(Fd, Buf, n);
       if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read
       if (Res < 0 || (!ToEOF && Res != (ssize_t) n)) // error, or short read
 	 return false;
 	 return false;

+ 5 - 8
apt-pkg/contrib/hashsum_template.h

@@ -15,9 +15,6 @@
 #include <algorithm>
 #include <algorithm>
 #include <stdint.h>
 #include <stdint.h>
 
 
-using std::string;
-using std::min;
-
 template<int N>
 template<int N>
 class HashSumValue
 class HashSumValue
 {
 {
@@ -31,7 +28,7 @@ class HashSumValue
       return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0;
       return memcmp(Sum,rhs.Sum,sizeof(Sum)) == 0;
    }; 
    }; 
 
 
-   string Value() const
+   std::string Value() const
    {
    {
       char Conv[16] =
       char Conv[16] =
       { '0','1','2','3','4','5','6','7','8','9','a','b',
       { '0','1','2','3','4','5','6','7','8','9','a','b',
@@ -48,7 +45,7 @@ class HashSumValue
          Result[I] = Conv[Sum[J] >> 4];
          Result[I] = Conv[Sum[J] >> 4];
          Result[I + 1] = Conv[Sum[J] & 0xF];
          Result[I + 1] = Conv[Sum[J] & 0xF];
       }
       }
-      return string(Result);
+      return std::string(Result);
    };
    };
    
    
    inline void Value(unsigned char S[N/8])
    inline void Value(unsigned char S[N/8])
@@ -57,12 +54,12 @@ class HashSumValue
          S[I] = Sum[I];
          S[I] = Sum[I];
    };
    };
 
 
-   inline operator string() const 
+   inline operator std::string() const 
    {
    {
       return Value();
       return Value();
    };
    };
 
 
-   bool Set(string Str) 
+   bool Set(std::string Str) 
    {
    {
       return Hex2Num(Str,Sum,sizeof(Sum));
       return Hex2Num(Str,Sum,sizeof(Sum));
    };
    };
@@ -73,7 +70,7 @@ class HashSumValue
          Sum[I] = S[I];
          Sum[I] = S[I];
    };
    };
 
 
-   HashSumValue(string Str) 
+   HashSumValue(std::string Str) 
    {
    {
          memset(Sum,0,sizeof(Sum));
          memset(Sum,0,sizeof(Sum));
          Set(Str);
          Set(Str);

+ 0 - 3
apt-pkg/contrib/md5.h

@@ -29,9 +29,6 @@
 #include <algorithm>
 #include <algorithm>
 #include <stdint.h>
 #include <stdint.h>
 
 
-using std::string;
-using std::min;
-
 #include "hashsum_template.h"
 #include "hashsum_template.h"
 
 
 typedef HashSumValue<128> MD5SumValue;
 typedef HashSumValue<128> MD5SumValue;

+ 1 - 3
apt-pkg/contrib/mmap.h

@@ -29,8 +29,6 @@
 #include <string>
 #include <string>
 #include <apt-pkg/fileutl.h>
 #include <apt-pkg/fileutl.h>
 
 
-using std::string;
-
 /* This should be a 32 bit type, larger tyes use too much ram and smaller
 /* 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
    types are too small. Where ever possible 'unsigned long' should be used
    instead of this internal type */
    instead of this internal type */
@@ -102,7 +100,7 @@ class DynamicMMap : public MMap
    unsigned long RawAllocate(unsigned long long Size,unsigned long Aln = 0);
    unsigned long RawAllocate(unsigned long long Size,unsigned long Aln = 0);
    unsigned long Allocate(unsigned long ItemSize);
    unsigned long Allocate(unsigned long ItemSize);
    unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1);
    unsigned long WriteString(const char *String,unsigned long Len = (unsigned long)-1);
-   inline unsigned long WriteString(const string &S) {return WriteString(S.c_str(),S.length());};
+   inline unsigned long WriteString(const std::string &S) {return WriteString(S.c_str(),S.length());};
    void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;};
    void UsePools(Pool &P,unsigned int Count) {Pools = &P; PoolCount = Count;};
    
    
    DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &WorkSpace = 2*1024*1024,
    DynamicMMap(FileFd &F,unsigned long Flags,unsigned long const &WorkSpace = 2*1024*1024,

+ 1 - 0
apt-pkg/contrib/netrc.cc

@@ -24,6 +24,7 @@
 
 
 #include "netrc.h"
 #include "netrc.h"
 
 
+using std::string;
 
 
 /* Get user and password from .netrc when given a machine name */
 /* Get user and password from .netrc when given a machine name */
 
 

+ 1 - 1
apt-pkg/contrib/netrc.h

@@ -25,5 +25,5 @@
 // If login[0] != 0, search for password within machine and login.
 // If login[0] != 0, search for password within machine and login.
 int parsenetrc (char *host, char *login, char *password, char *filename);
 int parsenetrc (char *host, char *login, char *password, char *filename);
 
 
-void maybe_add_auth (URI &Uri, string NetRCFile);
+void maybe_add_auth (URI &Uri, std::string NetRCFile);
 #endif
 #endif

+ 8 - 10
apt-pkg/contrib/progress.h

@@ -25,8 +25,6 @@
 #include <string>
 #include <string>
 #include <sys/time.h>
 #include <sys/time.h>
 
 
-using std::string;
-
 class Configuration;
 class Configuration;
 class OpProgress
 class OpProgress
 {
 {
@@ -38,13 +36,13 @@ class OpProgress
    
    
    // Change reduction code
    // Change reduction code
    struct timeval LastTime;
    struct timeval LastTime;
-   string LastOp;
-   string LastSubOp;
+   std::string LastOp;
+   std::string LastSubOp;
    
    
    protected:
    protected:
    
    
-   string Op;
-   string SubOp;
+   std::string Op;
+   std::string SubOp;
    float Percent;
    float Percent;
    
    
    bool MajorChange;
    bool MajorChange;
@@ -55,9 +53,9 @@ class OpProgress
    public:
    public:
    
    
    void Progress(unsigned long long Current);
    void Progress(unsigned long long Current);
-   void SubProgress(unsigned long long SubTotal, const string &Op = "", float const Percent = -1);
+   void SubProgress(unsigned long long SubTotal, const std::string &Op = "", float const Percent = -1);
    void OverallProgress(unsigned long long Current,unsigned long long Total,
    void OverallProgress(unsigned long long Current,unsigned long long Total,
-			unsigned long long Size,const string &Op);
+			unsigned long long Size,const std::string &Op);
    virtual void Done() {};
    virtual void Done() {};
    
    
    OpProgress();
    OpProgress();
@@ -67,8 +65,8 @@ class OpProgress
 class OpTextProgress : public OpProgress
 class OpTextProgress : public OpProgress
 {
 {
    protected:
    protected:
-   
-   string OldOp;
+
+   std::string OldOp;
    bool NoUpdate;
    bool NoUpdate;
    bool NoDisplay;
    bool NoDisplay;
    unsigned long LastLen;
    unsigned long LastLen;

+ 0 - 3
apt-pkg/contrib/sha1.h

@@ -18,9 +18,6 @@
 #include <cstring>
 #include <cstring>
 #include <algorithm>
 #include <algorithm>
 
 
-using std::string;
-using std::min;
-
 #include "hashsum_template.h"
 #include "hashsum_template.h"
 
 
 typedef  HashSumValue<160> SHA1SumValue;
 typedef  HashSumValue<160> SHA1SumValue;

+ 52 - 56
apt-pkg/contrib/strutl.h

@@ -27,60 +27,56 @@
 
 
 #include "macros.h"
 #include "macros.h"
 
 
-using std::string;
-using std::vector;
-using std::ostream;
-
-bool UTF8ToCodeset(const char *codeset, const string &orig, string *dest);
+bool UTF8ToCodeset(const char *codeset, const std::string &orig, std::string *dest);
 char *_strstrip(char *String);
 char *_strstrip(char *String);
 char *_strtabexpand(char *String,size_t Len);
 char *_strtabexpand(char *String,size_t Len);
-bool ParseQuoteWord(const char *&String,string &Res);
-bool ParseCWord(const char *&String,string &Res);
-string QuoteString(const string &Str,const char *Bad);
-string DeQuoteString(const string &Str);
-string DeQuoteString(string::const_iterator const &begin, string::const_iterator const &end);
+bool ParseQuoteWord(const char *&String,std::string &Res);
+bool ParseCWord(const char *&String,std::string &Res);
+std::string QuoteString(const std::string &Str,const char *Bad);
+std::string DeQuoteString(const std::string &Str);
+std::string DeQuoteString(std::string::const_iterator const &begin, std::string::const_iterator const &end);
 
 
 // unescape (\0XX and \xXX) from a string
 // unescape (\0XX and \xXX) from a string
-string DeEscapeString(const string &input);
-
-string SizeToStr(double Bytes);
-string TimeToStr(unsigned long Sec);
-string Base64Encode(const string &Str);
-string OutputInDepth(const unsigned long Depth, const char* Separator="  ");
-string URItoFileName(const string &URI);
-string TimeRFC1123(time_t Date);
+std::string DeEscapeString(const std::string &input);
+
+std::string SizeToStr(double Bytes);
+std::string TimeToStr(unsigned long Sec);
+std::string Base64Encode(const std::string &Str);
+std::string OutputInDepth(const unsigned long Depth, const char* Separator="  ");
+std::string URItoFileName(const std::string &URI);
+std::string TimeRFC1123(time_t Date);
 bool RFC1123StrToTime(const char* const str,time_t &time) __must_check;
 bool RFC1123StrToTime(const char* const str,time_t &time) __must_check;
 bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check;
 bool FTPMDTMStrToTime(const char* const str,time_t &time) __must_check;
-__deprecated bool StrToTime(const string &Val,time_t &Result);
-string LookupTag(const string &Message,const char *Tag,const char *Default = 0);
-int StringToBool(const string &Text,int Default = -1);
-bool ReadMessages(int Fd, vector<string> &List);
+__deprecated bool StrToTime(const std::string &Val,time_t &Result);
+std::string LookupTag(const std::string &Message,const char *Tag,const char *Default = 0);
+int StringToBool(const std::string &Text,int Default = -1);
+bool ReadMessages(int Fd, std::vector<std::string> &List);
 bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0);
 bool StrToNum(const char *Str,unsigned long &Res,unsigned Len,unsigned Base = 0);
 bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0);
 bool StrToNum(const char *Str,unsigned long long &Res,unsigned Len,unsigned Base = 0);
 bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
 bool Base256ToNum(const char *Str,unsigned long &Res,unsigned int Len);
-bool Hex2Num(const string &Str,unsigned char *Num,unsigned int Length);
+bool Hex2Num(const std::string &Str,unsigned char *Num,unsigned int Length);
 bool TokSplitString(char Tok,char *Input,char **List,
 bool TokSplitString(char Tok,char *Input,char **List,
 		    unsigned long ListMax);
 		    unsigned long ListMax);
-vector<string> VectorizeString(string const &haystack, char const &split) __attrib_const;
-void ioprintf(ostream &out,const char *format,...) __like_printf(2);
-void strprintf(string &out,const char *format,...) __like_printf(2);
+std::vector<std::string> VectorizeString(std::string const &haystack, char const &split) __attrib_const;
+void ioprintf(std::ostream &out,const char *format,...) __like_printf(2);
+void strprintf(std::string &out,const char *format,...) __like_printf(2);
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3);
 char *safe_snprintf(char *Buffer,char *End,const char *Format,...) __like_printf(3);
-bool CheckDomainList(const string &Host, const string &List);
+bool CheckDomainList(const std::string &Host, const std::string &List);
 int tolower_ascii(int const c) __attrib_const __hot;
 int tolower_ascii(int const c) __attrib_const __hot;
-string StripEpoch(const string &VerStr);
+std::string StripEpoch(const std::string &VerStr);
 
 
 #define APT_MKSTRCMP(name,func) \
 #define APT_MKSTRCMP(name,func) \
 inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \
 inline int name(const char *A,const char *B) {return func(A,A+strlen(A),B,B+strlen(B));}; \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
-inline int name(const string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \
-inline int name(const string& A,const string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \
-inline int name(const string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);};
+inline int name(const std::string& A,const char *B) {return func(A.c_str(),A.c_str()+A.length(),B,B+strlen(B));}; \
+inline int name(const std::string& A,const std::string& B) {return func(A.c_str(),A.c_str()+A.length(),B.c_str(),B.c_str()+B.length());}; \
+inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.c_str(),A.c_str()+A.length(),B,BEnd);};
 
 
 #define APT_MKSTRCMP2(name,func) \
 #define APT_MKSTRCMP2(name,func) \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
 inline int name(const char *A,const char *AEnd,const char *B) {return func(A,AEnd,B,B+strlen(B));}; \
-inline int name(const string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \
-inline int name(const string& A,const string& B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \
-inline int name(const string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);};
+inline int name(const std::string& A,const char *B) {return func(A.begin(),A.end(),B,B+strlen(B));}; \
+inline int name(const std::string& A,const std::string& B) {return func(A.begin(),A.end(),B.begin(),B.end());}; \
+inline int name(const std::string& A,const char *B,const char *BEnd) {return func(A.begin(),A.end(),B,BEnd);};
 
 
 int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
 int stringcmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
 int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
 int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd);
@@ -89,17 +85,17 @@ int stringcasecmp(const char *A,const char *AEnd,const char *B,const char *BEnd)
    case the definition of string::const_iterator is not the same as
    case the definition of string::const_iterator is not the same as
    const char * and we need these extra functions */
    const char * and we need these extra functions */
 #if __GNUC__ >= 3
 #if __GNUC__ >= 3
-int stringcmp(string::const_iterator A,string::const_iterator AEnd,
+int stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
 	      const char *B,const char *BEnd);
 	      const char *B,const char *BEnd);
-int stringcmp(string::const_iterator A,string::const_iterator AEnd,
-	      string::const_iterator B,string::const_iterator BEnd);
-int stringcasecmp(string::const_iterator A,string::const_iterator AEnd,
+int stringcmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+	      std::string::const_iterator B,std::string::const_iterator BEnd);
+int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
 		  const char *B,const char *BEnd);
 		  const char *B,const char *BEnd);
-int stringcasecmp(string::const_iterator A,string::const_iterator AEnd,
-                  string::const_iterator B,string::const_iterator BEnd);
+int stringcasecmp(std::string::const_iterator A,std::string::const_iterator AEnd,
+                  std::string::const_iterator B,std::string::const_iterator BEnd);
 
 
-inline int stringcmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));};
-inline int stringcasecmp(string::const_iterator A,string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));};
+inline int stringcmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcmp(A,Aend,B,B+strlen(B));};
+inline int stringcasecmp(std::string::const_iterator A,std::string::const_iterator Aend,const char *B) {return stringcasecmp(A,Aend,B,B+strlen(B));};
 #endif
 #endif
 
 
 APT_MKSTRCMP2(stringcmp,stringcmp);
 APT_MKSTRCMP2(stringcmp,stringcmp);
@@ -109,34 +105,34 @@ inline const char *DeNull(const char *s) {return (s == 0?"(null)":s);};
 
 
 class URI
 class URI
 {
 {
-   void CopyFrom(const string &From);
+   void CopyFrom(const std::string &From);
 		 
 		 
    public:
    public:
    
    
-   string Access;
-   string User;
-   string Password;
-   string Host;
-   string Path;
+   std::string Access;
+   std::string User;
+   std::string Password;
+   std::string Host;
+   std::string Path;
    unsigned int Port;
    unsigned int Port;
    
    
-   operator string();
-   inline void operator =(const string &From) {CopyFrom(From);};
+   operator std::string();
+   inline void operator =(const std::string &From) {CopyFrom(From);};
    inline bool empty() {return Access.empty();};
    inline bool empty() {return Access.empty();};
-   static string SiteOnly(const string &URI);
-   static string NoUserPassword(const string &URI);
+   static std::string SiteOnly(const std::string &URI);
+   static std::string NoUserPassword(const std::string &URI);
    
    
-   URI(string Path) {CopyFrom(Path);};
+   URI(std::string Path) {CopyFrom(Path);};
    URI() : Port(0) {};
    URI() : Port(0) {};
 };
 };
 
 
 struct SubstVar
 struct SubstVar
 {
 {
    const char *Subst;
    const char *Subst;
-   const string *Contents;
+   const std::string *Contents;
 };
 };
-string SubstVar(string Str,const struct SubstVar *Vars);
-string SubstVar(const string &Str,const string &Subst,const string &Contents);
+std::string SubstVar(std::string Str,const struct SubstVar *Vars);
+std::string SubstVar(const std::string &Str,const std::string &Subst,const std::string &Contents);
 
 
 struct RxChoiceList
 struct RxChoiceList
 {
 {

+ 34 - 34
apt-pkg/deb/debindexfile.h

@@ -26,14 +26,14 @@ class debStatusIndex : public pkgIndexFile
    void *d;
    void *d;
 
 
    protected:
    protected:
-   string File;
+   std::string File;
 
 
    public:
    public:
 
 
    virtual const Type *GetType() const;
    virtual const Type *GetType() const;
    
    
    // Interface for acquire
    // Interface for acquire
-   virtual string Describe(bool Short) const {return File;};
+   virtual std::string Describe(bool Short) const {return File;};
    
    
    // Interface for the Cache Generator
    // Interface for the Cache Generator
    virtual bool Exists() const;
    virtual bool Exists() const;
@@ -43,7 +43,7 @@ class debStatusIndex : public pkgIndexFile
    bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog, unsigned long const Flag) const;
    bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog, unsigned long const Flag) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
 
-   debStatusIndex(string File);
+   debStatusIndex(std::string File);
    virtual ~debStatusIndex() {};
    virtual ~debStatusIndex() {};
 };
 };
     
     
@@ -52,25 +52,25 @@ class debPackagesIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
    void *d;
 
 
-   string URI;
-   string Dist;
-   string Section;
-   string Architecture;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
+   std::string Architecture;
 
 
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
    
    
    public:
    public:
    
    
    virtual const Type *GetType() const;
    virtual const Type *GetType() const;
 
 
    // Stuff for accessing files on remote items
    // Stuff for accessing files on remote items
-   virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
-   virtual string ArchiveURI(string File) const {return URI + File;};
+   virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
+   virtual std::string ArchiveURI(std::string File) const {return URI + File;};
    
    
    // Interface for acquire
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
    
    
    // Interface for the Cache Generator
    // Interface for the Cache Generator
    virtual bool Exists() const;
    virtual bool Exists() const;
@@ -79,8 +79,8 @@ class debPackagesIndex : public pkgIndexFile
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
 
-   debPackagesIndex(string const &URI, string const &Dist, string const &Section,
-			bool const &Trusted, string const &Arch = "native");
+   debPackagesIndex(std::string const &URI, std::string const &Dist, std::string const &Section,
+			bool const &Trusted, std::string const &Arch = "native");
    virtual ~debPackagesIndex() {};
    virtual ~debPackagesIndex() {};
 };
 };
 
 
@@ -89,23 +89,23 @@ class debTranslationsIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
    void *d;
 
 
-   string URI;
-   string Dist;
-   string Section;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
    const char * const Language;
    const char * const Language;
    
    
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
 
 
-   inline string TranslationFile() const {return string("Translation-").append(Language);};
+   inline std::string TranslationFile() const {return std::string("Translation-").append(Language);};
 
 
    public:
    public:
    
    
    virtual const Type *GetType() const;
    virtual const Type *GetType() const;
 
 
    // Interface for acquire
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
    virtual bool GetIndexes(pkgAcquire *Owner) const;
    virtual bool GetIndexes(pkgAcquire *Owner) const;
    
    
    // Interface for the Cache Generator
    // Interface for the Cache Generator
@@ -115,7 +115,7 @@ class debTranslationsIndex : public pkgIndexFile
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
    virtual pkgCache::PkgFileIterator FindInCache(pkgCache &Cache) const;
 
 
-   debTranslationsIndex(string URI,string Dist,string Section, char const * const Language);
+   debTranslationsIndex(std::string URI,std::string Dist,std::string Section, char const * const Language);
    virtual ~debTranslationsIndex() {};
    virtual ~debTranslationsIndex() {};
 };
 };
 
 
@@ -124,25 +124,25 @@ class debSourcesIndex : public pkgIndexFile
    /** \brief dpointer placeholder (for later in case we need it) */
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
    void *d;
 
 
-   string URI;
-   string Dist;
-   string Section;
+   std::string URI;
+   std::string Dist;
+   std::string Section;
 
 
-   string Info(const char *Type) const;
-   string IndexFile(const char *Type) const;
-   string IndexURI(const char *Type) const;
+   std::string Info(const char *Type) const;
+   std::string IndexFile(const char *Type) const;
+   std::string IndexURI(const char *Type) const;
    
    
    public:
    public:
 
 
    virtual const Type *GetType() const;
    virtual const Type *GetType() const;
 
 
    // Stuff for accessing files on remote items
    // Stuff for accessing files on remote items
-   virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
+   virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
 			     pkgSrcRecords::File const &File) const;
 			     pkgSrcRecords::File const &File) const;
-   virtual string ArchiveURI(string File) const {return URI + File;};
+   virtual std::string ArchiveURI(std::string File) const {return URI + File;};
    
    
    // Interface for acquire
    // Interface for acquire
-   virtual string Describe(bool Short) const;   
+   virtual std::string Describe(bool Short) const;   
 
 
    // Interface for the record parsers
    // Interface for the record parsers
    virtual pkgSrcRecords::Parser *CreateSrcParser() const;
    virtual pkgSrcRecords::Parser *CreateSrcParser() const;
@@ -152,7 +152,7 @@ class debSourcesIndex : public pkgIndexFile
    virtual bool HasPackages() const {return false;};
    virtual bool HasPackages() const {return false;};
    virtual unsigned long Size() const;
    virtual unsigned long Size() const;
    
    
-   debSourcesIndex(string URI,string Dist,string Section,bool Trusted);
+   debSourcesIndex(std::string URI,std::string Dist,std::string Section,bool Trusted);
    virtual ~debSourcesIndex() {};
    virtual ~debSourcesIndex() {};
 };
 };
 
 

+ 2 - 0
apt-pkg/deb/deblistparser.cc

@@ -25,6 +25,8 @@
 #include <ctype.h>
 #include <ctype.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important},
 static debListParser::WordList PrioList[] = {{"important",pkgCache::State::Important},
                        {"required",pkgCache::State::Required},
                        {"required",pkgCache::State::Required},
                        {"standard",pkgCache::State::Standard},
                        {"standard",pkgCache::State::Standard},

+ 12 - 12
apt-pkg/deb/deblistparser.h

@@ -34,7 +34,7 @@ class debListParser : public pkgCacheGenerator::ListParser
    pkgTagFile Tags;
    pkgTagFile Tags;
    pkgTagSection Section;
    pkgTagSection Section;
    unsigned long iOffset;
    unsigned long iOffset;
-   string Arch;
+   std::string Arch;
    std::vector<std::string> Architectures;
    std::vector<std::string> Architectures;
    bool MultiArchEnabled;
    bool MultiArchEnabled;
 
 
@@ -43,21 +43,21 @@ class debListParser : public pkgCacheGenerator::ListParser
    bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag,
    bool ParseDepends(pkgCache::VerIterator &Ver,const char *Tag,
 		     unsigned int Type);
 		     unsigned int Type);
    bool ParseProvides(pkgCache::VerIterator &Ver);
    bool ParseProvides(pkgCache::VerIterator &Ver);
-   bool NewProvidesAllArch(pkgCache::VerIterator &Ver, string const &Package, string const &Version);
-   static bool GrabWord(string Word,WordList *List,unsigned char &Out);
+   bool NewProvidesAllArch(pkgCache::VerIterator &Ver, std::string const &Package, std::string const &Version);
+   static bool GrabWord(std::string Word,WordList *List,unsigned char &Out);
    
    
    public:
    public:
 
 
-   static unsigned char GetPrio(string Str);
+   static unsigned char GetPrio(std::string Str);
       
       
    // These all operate against the current section
    // These all operate against the current section
-   virtual string Package();
-   virtual string Architecture();
+   virtual std::string Package();
+   virtual std::string Architecture();
    virtual bool ArchitectureAll();
    virtual bool ArchitectureAll();
-   virtual string Version();
+   virtual std::string Version();
    virtual bool NewVersion(pkgCache::VerIterator &Ver);
    virtual bool NewVersion(pkgCache::VerIterator &Ver);
-   virtual string Description();
-   virtual string DescriptionLanguage();
+   virtual std::string Description();
+   virtual std::string DescriptionLanguage();
    virtual MD5SumValue Description_md5();
    virtual MD5SumValue Description_md5();
    virtual unsigned short VersionHash();
    virtual unsigned short VersionHash();
    virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
    virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
@@ -68,15 +68,15 @@ class debListParser : public pkgCacheGenerator::ListParser
    virtual bool Step();
    virtual bool Step();
    
    
    bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
    bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
-			string section);
+			std::string section);
    
    
    static const char *ParseDepends(const char *Start,const char *Stop,
    static const char *ParseDepends(const char *Start,const char *Stop,
-			    string &Package,string &Ver,unsigned int &Op,
+			    std::string &Package,std::string &Ver,unsigned int &Op,
 			    bool const &ParseArchFlags = false,
 			    bool const &ParseArchFlags = false,
 			    bool const &StripMultiArch = true);
 			    bool const &StripMultiArch = true);
    static const char *ConvertRelation(const char *I,unsigned int &Op);
    static const char *ConvertRelation(const char *I,unsigned int &Op);
 
 
-   debListParser(FileFd *File, string const &Arch = "");
+   debListParser(FileFd *File, std::string const &Arch = "");
    virtual ~debListParser() {};
    virtual ~debListParser() {};
 };
 };
 
 

+ 4 - 2
apt-pkg/deb/debrecords.cc

@@ -17,6 +17,8 @@
 #include <langinfo.h>
 #include <langinfo.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // RecordParser::debRecordParser - Constructor				/*{{{*/
 // RecordParser::debRecordParser - Constructor				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
@@ -135,8 +137,8 @@ string debRecordParser::LongDesc()
      orig = Section.FindS("Description").c_str();
      orig = Section.FindS("Description").c_str();
   else
   else
   {
   {
-     vector<string> const lang = APT::Configuration::getLanguages();
-     for (vector<string>::const_iterator l = lang.begin();
+     std::vector<string> const lang = APT::Configuration::getLanguages();
+     for (std::vector<string>::const_iterator l = lang.begin();
 	  orig.empty() && l != lang.end(); ++l)
 	  orig.empty() && l != lang.end(); ++l)
 	orig = Section.FindS(string("Description-").append(*l).c_str());
 	orig = Section.FindS(string("Description-").append(*l).c_str());
   }
   }

+ 14 - 14
apt-pkg/deb/debrecords.h

@@ -35,27 +35,27 @@ class debRecordParser : public pkgRecords::Parser
    public:
    public:
 
 
    // These refer to the archive file for the Version
    // These refer to the archive file for the Version
-   virtual string FileName();
-   virtual string MD5Hash();
-   virtual string SHA1Hash();
-   virtual string SHA256Hash();
-   virtual string SHA512Hash();
-   virtual string SourcePkg();
-   virtual string SourceVer();
+   virtual std::string FileName();
+   virtual std::string MD5Hash();
+   virtual std::string SHA1Hash();
+   virtual std::string SHA256Hash();
+   virtual std::string SHA512Hash();
+   virtual std::string SourcePkg();
+   virtual std::string SourceVer();
    
    
    // These are some general stats about the package
    // These are some general stats about the package
-   virtual string Maintainer();
-   virtual string ShortDesc();
-   virtual string LongDesc();
-   virtual string Name();
-   virtual string Homepage();
+   virtual std::string Maintainer();
+   virtual std::string ShortDesc();
+   virtual std::string LongDesc();
+   virtual std::string Name();
+   virtual std::string Homepage();
 
 
    // An arbitrary custom field
    // An arbitrary custom field
-   virtual string RecordField(const char *fieldName);
+   virtual std::string RecordField(const char *fieldName);
 
 
    virtual void GetRec(const char *&Start,const char *&Stop);
    virtual void GetRec(const char *&Start,const char *&Stop);
    
    
-   debRecordParser(string FileName,pkgCache &Cache);
+   debRecordParser(std::string FileName,pkgCache &Cache);
    virtual ~debRecordParser() {};
    virtual ~debRecordParser() {};
 };
 };
 
 

+ 4 - 2
apt-pkg/deb/debsrcrecords.cc

@@ -21,6 +21,8 @@
 using std::max;
 using std::max;
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // SrcRecordParser::Binaries - Return the binaries field		/*{{{*/
 // SrcRecordParser::Binaries - Return the binaries field		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This member parses the binaries field into a pair of class arrays and
 /* This member parses the binaries field into a pair of class arrays and
@@ -57,7 +59,7 @@ const char **debSrcRecordParser::Binaries()
    package/version records representing the build dependency. The returned 
    package/version records representing the build dependency. The returned 
    array need not be freed and will be reused by the next call to this 
    array need not be freed and will be reused by the next call to this 
    function */
    function */
-bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps,
+bool debSrcRecordParser::BuildDepends(std::vector<pkgSrcRecords::Parser::BuildDepRec> &BuildDeps,
 					bool const &ArchOnly, bool const &StripMultiArch)
 					bool const &ArchOnly, bool const &StripMultiArch)
 {
 {
    unsigned int I;
    unsigned int I;
@@ -102,7 +104,7 @@ bool debSrcRecordParser::BuildDepends(vector<pkgSrcRecords::Parser::BuildDepRec>
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This parses the list of files and returns it, each file is required to have
 /* This parses the list of files and returns it, each file is required to have
    a complete source package */
    a complete source package */
-bool debSrcRecordParser::Files(vector<pkgSrcRecords::File> &List)
+bool debSrcRecordParser::Files(std::vector<pkgSrcRecords::File> &List)
 {
 {
    List.erase(List.begin(),List.end());
    List.erase(List.begin(),List.end());
    
    

+ 9 - 9
apt-pkg/deb/debsrcrecords.h

@@ -35,22 +35,22 @@ class debSrcRecordParser : public pkgSrcRecords::Parser
    virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
    virtual bool Step() {iOffset = Tags.Offset(); return Tags.Step(Sect);};
    virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
    virtual bool Jump(unsigned long const &Off) {iOffset = Off; return Tags.Jump(Sect,Off);};
 
 
-   virtual string Package() const {return Sect.FindS("Package");};
-   virtual string Version() const {return Sect.FindS("Version");};
-   virtual string Maintainer() const {return Sect.FindS("Maintainer");};
-   virtual string Section() const {return Sect.FindS("Section");};
+   virtual std::string Package() const {return Sect.FindS("Package");};
+   virtual std::string Version() const {return Sect.FindS("Version");};
+   virtual std::string Maintainer() const {return Sect.FindS("Maintainer");};
+   virtual std::string Section() const {return Sect.FindS("Section");};
    virtual const char **Binaries();
    virtual const char **Binaries();
-   virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true);
+   virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true);
    virtual unsigned long Offset() {return iOffset;};
    virtual unsigned long Offset() {return iOffset;};
-   virtual string AsStr() 
+   virtual std::string AsStr() 
    {
    {
       const char *Start=0,*Stop=0;
       const char *Start=0,*Stop=0;
       Sect.GetSection(Start,Stop);
       Sect.GetSection(Start,Stop);
-      return string(Start,Stop);
+      return std::string(Start,Stop);
    };
    };
-   virtual bool Files(vector<pkgSrcRecords::File> &F);
+   virtual bool Files(std::vector<pkgSrcRecords::File> &F);
 
 
-   debSrcRecordParser(string const &File,pkgIndexFile const *Index) 
+   debSrcRecordParser(std::string const &File,pkgIndexFile const *Index) 
       : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), 
       : Parser(Index), Fd(File,FileFd::ReadOnlyGzip), Tags(&Fd,102400), 
         Buffer(0), BufSize(0) {}
         Buffer(0), BufSize(0) {}
    virtual ~debSrcRecordParser();
    virtual ~debSrcRecordParser();

+ 3 - 1
apt-pkg/deb/debsystem.cc

@@ -27,6 +27,8 @@
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 debSystem debSys;
 debSystem debSys;
 
 
 class debSystemPrivate {
 class debSystemPrivate {
@@ -219,7 +221,7 @@ signed debSystem::Score(Configuration const &Cnf)
 // System::AddStatusFiles - Register the status files			/*{{{*/
 // System::AddStatusFiles - Register the status files			/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-bool debSystem::AddStatusFiles(vector<pkgIndexFile *> &List)
+bool debSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List)
 {
 {
    if (d->StatusFile == 0)
    if (d->StatusFile == 0)
       d->StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status"));
       d->StatusFile = new debStatusIndex(_config->FindFile("Dir::State::status"));

+ 2 - 2
apt-pkg/deb/debversion.cc

@@ -263,7 +263,7 @@ bool debVersioningSystem::CheckDep(const char *PkgVer,
 // debVS::UpstreamVersion - Return the upstream version string		/*{{{*/
 // debVS::UpstreamVersion - Return the upstream version string		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This strips all the debian specific information from the version number */
 /* This strips all the debian specific information from the version number */
-string debVersioningSystem::UpstreamVersion(const char *Ver)
+std::string debVersioningSystem::UpstreamVersion(const char *Ver)
 {
 {
    // Strip off the bit before the first colon
    // Strip off the bit before the first colon
    const char *I = Ver;
    const char *I = Ver;
@@ -278,6 +278,6 @@ string debVersioningSystem::UpstreamVersion(const char *Ver)
       if (*I == '-')
       if (*I == '-')
 	 Last = I - Ver;
 	 Last = I - Ver;
    
    
-   return string(Ver,Last);
+   return std::string(Ver,Last);
 }
 }
 									/*}}}*/
 									/*}}}*/

+ 3 - 3
apt-pkg/deb/debversion.h

@@ -32,7 +32,7 @@ class debVersioningSystem : public pkgVersioningSystem
    {
    {
       return DoCmpVersion(A,Aend,B,Bend);
       return DoCmpVersion(A,Aend,B,Bend);
    }   
    }   
-   virtual string UpstreamVersion(const char *A);
+   virtual std::string UpstreamVersion(const char *A);
 
 
    debVersioningSystem();
    debVersioningSystem();
 };
 };
@@ -53,7 +53,7 @@ inline int pkgVersionCompare(const char *A, const char *AEnd,
 {
 {
    return debVS.DoCmpVersion(A,AEnd,B,BEnd);
    return debVS.DoCmpVersion(A,AEnd,B,BEnd);
 }
 }
-inline int pkgVersionCompare(string A,string B)
+inline int pkgVersionCompare(std::string A,std::string B)
 {
 {
    return debVS.CmpVersion(A,B);
    return debVS.CmpVersion(A,B);
 }
 }
@@ -61,7 +61,7 @@ inline bool pkgCheckDep(const char *DepVer,const char *PkgVer,int Op)
 {
 {
    return debVS.CheckDep(PkgVer,Op,DepVer);
    return debVS.CheckDep(PkgVer,Op,DepVer);
 }
 }
-inline string pkgBaseVersion(const char *Ver)
+inline std::string pkgBaseVersion(const char *Ver)
 {
 {
    return debVS.UpstreamVersion(Ver);
    return debVS.UpstreamVersion(Ver);
 }
 }

+ 8 - 11
apt-pkg/deb/dpkgpm.h

@@ -15,9 +15,6 @@
 #include <map>
 #include <map>
 #include <stdio.h>
 #include <stdio.h>
 
 
-using std::vector;
-using std::map;
-
 class pkgDPkgPMPrivate;
 class pkgDPkgPMPrivate;
 
 
 class pkgDPkgPM : public pkgPackageManager
 class pkgDPkgPM : public pkgPackageManager
@@ -38,7 +35,7 @@ class pkgDPkgPM : public pkgPackageManager
       needs to declare a Replaces on the disappeared package.
       needs to declare a Replaces on the disappeared package.
       \param pkgname Name of the package that disappeared
       \param pkgname Name of the package that disappeared
    */
    */
-   void handleDisappearAction(string const &pkgname);
+   void handleDisappearAction(std::string const &pkgname);
 
 
    protected:
    protected:
    int pkgFailures;
    int pkgFailures;
@@ -53,11 +50,11 @@ class pkgDPkgPM : public pkgPackageManager
    // the dpkg states that the pkg will run through, the string is 
    // the dpkg states that the pkg will run through, the string is 
    // the package, the vector contains the dpkg states that the package
    // the package, the vector contains the dpkg states that the package
    // will go through
    // will go through
-   map<string,vector<struct DpkgState> > PackageOps;
+   std::map<std::string,std::vector<struct DpkgState> > PackageOps;
    // the dpkg states that are already done; the string is the package
    // the dpkg states that are already done; the string is the package
    // the int is the state that is already done (e.g. a package that is
    // the int is the state that is already done (e.g. a package that is
    // going to be install is already in state "half-installed")
    // going to be install is already in state "half-installed")
-   map<string,unsigned int> PackageOpsDone;
+   std::map<std::string,unsigned int> PackageOpsDone;
 
 
    // progress reporting
    // progress reporting
    unsigned int PackagesDone;
    unsigned int PackagesDone;
@@ -66,19 +63,19 @@ class pkgDPkgPM : public pkgPackageManager
    struct Item
    struct Item
    {
    {
       enum Ops {Install, Configure, Remove, Purge, ConfigurePending, TriggersPending} Op;
       enum Ops {Install, Configure, Remove, Purge, ConfigurePending, TriggersPending} Op;
-      string File;
+      std::string File;
       PkgIterator Pkg;
       PkgIterator Pkg;
-      Item(Ops Op,PkgIterator Pkg,string File = "") : Op(Op),
+      Item(Ops Op,PkgIterator Pkg,std::string File = "") : Op(Op),
             File(File), Pkg(Pkg) {};
             File(File), Pkg(Pkg) {};
       Item() {};
       Item() {};
       
       
    };
    };
-   vector<Item> List;
+   std::vector<Item> List;
 
 
    // Helpers
    // Helpers
    bool RunScriptsWithPkgs(const char *Cnf);
    bool RunScriptsWithPkgs(const char *Cnf);
    bool SendV2Pkgs(FILE *F);
    bool SendV2Pkgs(FILE *F);
-   void WriteHistoryTag(string const &tag, string value);
+   void WriteHistoryTag(std::string const &tag, std::string value);
 
 
    // apport integration
    // apport integration
    void WriteApportReport(const char *pkgpath, const char *errormsg);
    void WriteApportReport(const char *pkgpath, const char *errormsg);
@@ -94,7 +91,7 @@ class pkgDPkgPM : public pkgPackageManager
    void ProcessDpkgStatusLine(int OutStatusFd, char *line);
    void ProcessDpkgStatusLine(int OutStatusFd, char *line);
 
 
    // The Actuall installation implementation
    // The Actuall installation implementation
-   virtual bool Install(PkgIterator Pkg,string File);
+   virtual bool Install(PkgIterator Pkg,std::string File);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Configure(PkgIterator Pkg);
    virtual bool Remove(PkgIterator Pkg,bool Purge = false);
    virtual bool Remove(PkgIterator Pkg,bool Purge = false);
    virtual bool Go(int StatusFd=-1);
    virtual bool Go(int StatusFd=-1);

+ 3 - 0
apt-pkg/depcache.cc

@@ -32,6 +32,9 @@
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
+
+using std::string;
+
 // helper for Install-Recommends-Sections and Never-MarkAuto-Sections	/*{{{*/
 // helper for Install-Recommends-Sections and Never-MarkAuto-Sections	/*{{{*/
 static bool 
 static bool 
 ConfigValueInSubTree(const char* SubTree, const char *needle)
 ConfigValueInSubTree(const char* SubTree, const char *needle)

+ 3 - 3
apt-pkg/depcache.h

@@ -338,9 +338,9 @@ class pkgDepCache : protected pkgCache::Namespace
    inline Header &Head() {return *Cache->HeaderP;};
    inline Header &Head() {return *Cache->HeaderP;};
    inline GrpIterator GrpBegin() {return Cache->GrpBegin();};
    inline GrpIterator GrpBegin() {return Cache->GrpBegin();};
    inline PkgIterator PkgBegin() {return Cache->PkgBegin();};
    inline PkgIterator PkgBegin() {return Cache->PkgBegin();};
-   inline GrpIterator FindGrp(string const &Name) {return Cache->FindGrp(Name);};
-   inline PkgIterator FindPkg(string const &Name) {return Cache->FindPkg(Name);};
-   inline PkgIterator FindPkg(string const &Name, string const &Arch) {return Cache->FindPkg(Name, Arch);};
+   inline GrpIterator FindGrp(std::string const &Name) {return Cache->FindGrp(Name);};
+   inline PkgIterator FindPkg(std::string const &Name) {return Cache->FindPkg(Name);};
+   inline PkgIterator FindPkg(std::string const &Name, std::string const &Arch) {return Cache->FindPkg(Name, Arch);};
 
 
    inline pkgCache &GetCache() {return *Cache;};
    inline pkgCache &GetCache() {return *Cache;};
    inline pkgVersioningSystem &VS() {return *Cache->VS;};
    inline pkgVersioningSystem &VS() {return *Cache->VS;};

+ 1 - 1
apt-pkg/edsp/edspindexfile.h

@@ -22,7 +22,7 @@ class edspIndex : public debStatusIndex
 
 
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
    virtual bool Merge(pkgCacheGenerator &Gen,OpProgress *Prog) const;
 
 
-   edspIndex(string File);
+   edspIndex(std::string File);
 };
 };
 
 
 #endif
 #endif

+ 4 - 4
apt-pkg/edsp/edsplistparser.cc

@@ -20,7 +20,7 @@
 									/*}}}*/
 									/*}}}*/
 
 
 // ListParser::edspListParser - Constructor				/*{{{*/
 // ListParser::edspListParser - Constructor				/*{{{*/
-edspListParser::edspListParser(FileFd *File, string const &Arch) : debListParser(File, Arch)
+edspListParser::edspListParser(FileFd *File, std::string const &Arch) : debListParser(File, Arch)
 {}
 {}
 									/*}}}*/
 									/*}}}*/
 // ListParser::NewVersion - Fill in the version structure		/*{{{*/
 // ListParser::NewVersion - Fill in the version structure		/*{{{*/
@@ -33,11 +33,11 @@ bool edspListParser::NewVersion(pkgCache::VerIterator &Ver)
 // ListParser::Description - Return the description string		/*{{{*/
 // ListParser::Description - Return the description string		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Sorry, no description for the resolvers… */
 /* Sorry, no description for the resolvers… */
-string edspListParser::Description()
+std::string edspListParser::Description()
 {
 {
    return "";
    return "";
 }
 }
-string edspListParser::DescriptionLanguage()
+std::string edspListParser::DescriptionLanguage()
 {
 {
    return "";
    return "";
 }
 }
@@ -85,7 +85,7 @@ bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
 									/*}}}*/
 									/*}}}*/
 // ListParser::LoadReleaseInfo - Load the release information		/*{{{*/
 // ListParser::LoadReleaseInfo - Load the release information		/*{{{*/
 bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
 bool edspListParser::LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,
-				    FileFd &File, string component)
+				    FileFd &File, std::string component)
 {
 {
    return true;
    return true;
 }
 }

+ 4 - 4
apt-pkg/edsp/edsplistparser.h

@@ -20,15 +20,15 @@ class edspListParser : public debListParser
 {
 {
    public:
    public:
    virtual bool NewVersion(pkgCache::VerIterator &Ver);
    virtual bool NewVersion(pkgCache::VerIterator &Ver);
-   virtual string Description();
-   virtual string DescriptionLanguage();
+   virtual std::string Description();
+   virtual std::string DescriptionLanguage();
    virtual MD5SumValue Description_md5();
    virtual MD5SumValue Description_md5();
    virtual unsigned short VersionHash();
    virtual unsigned short VersionHash();
 
 
    bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
    bool LoadReleaseInfo(pkgCache::PkgFileIterator &FileI,FileFd &File,
-			string section);
+			std::string section);
 
 
-   edspListParser(FileFd *File, string const &Arch = "");
+   edspListParser(FileFd *File, std::string const &Arch = "");
 
 
    protected:
    protected:
    virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);
    virtual bool ParseStatus(pkgCache::PkgIterator &Pkg,pkgCache::VerIterator &Ver);

+ 1 - 1
apt-pkg/edsp/edspsystem.cc

@@ -97,7 +97,7 @@ signed edspSystem::Score(Configuration const &Cnf)
 }
 }
 									/*}}}*/
 									/*}}}*/
 // System::AddStatusFiles - Register the status files			/*{{{*/
 // System::AddStatusFiles - Register the status files			/*{{{*/
-bool edspSystem::AddStatusFiles(vector<pkgIndexFile *> &List)
+bool edspSystem::AddStatusFiles(std::vector<pkgIndexFile *> &List)
 {
 {
    if (StatusFile == 0)
    if (StatusFile == 0)
    {
    {

+ 19 - 22
apt-pkg/indexcopy.h

@@ -14,9 +14,6 @@
 #include <string>
 #include <string>
 #include <stdio.h>
 #include <stdio.h>
 
 
-using std::string;
-using std::vector;
-
 class pkgTagSection;
 class pkgTagSection;
 class FileFd;
 class FileFd;
 class indexRecords;
 class indexRecords;
@@ -31,20 +28,20 @@ class IndexCopy								/*{{{*/
    
    
    pkgTagSection *Section;
    pkgTagSection *Section;
    
    
-   string ChopDirs(string Path,unsigned int Depth);
-   bool ReconstructPrefix(string &Prefix,string OrigPath,string CD,
-			  string File);
-   bool ReconstructChop(unsigned long &Chop,string Dir,string File);
-   void ConvertToSourceList(string CD,string &Path);
-   bool GrabFirst(string Path,string &To,unsigned int Depth);
-   virtual bool GetFile(string &Filename,unsigned long long &Size) = 0;
-   virtual bool RewriteEntry(FILE *Target,string File) = 0;
+   std::string ChopDirs(std::string Path,unsigned int Depth);
+   bool ReconstructPrefix(std::string &Prefix,std::string OrigPath,std::string CD,
+			  std::string File);
+   bool ReconstructChop(unsigned long &Chop,std::string Dir,std::string File);
+   void ConvertToSourceList(std::string CD,std::string &Path);
+   bool GrabFirst(std::string Path,std::string &To,unsigned int Depth);
+   virtual bool GetFile(std::string &Filename,unsigned long long &Size) = 0;
+   virtual bool RewriteEntry(FILE *Target,std::string File) = 0;
    virtual const char *GetFileName() = 0;
    virtual const char *GetFileName() = 0;
    virtual const char *Type() = 0;
    virtual const char *Type() = 0;
    
    
    public:
    public:
 
 
-   bool CopyPackages(string CDROM,string Name,vector<string> &List,
+   bool CopyPackages(std::string CDROM,std::string Name,std::vector<std::string> &List,
 		     pkgCdromStatus *log);
 		     pkgCdromStatus *log);
    virtual ~IndexCopy() {};
    virtual ~IndexCopy() {};
 };
 };
@@ -53,8 +50,8 @@ class PackageCopy : public IndexCopy					/*{{{*/
 {
 {
    protected:
    protected:
    
    
-   virtual bool GetFile(string &Filename,unsigned long long &Size);
-   virtual bool RewriteEntry(FILE *Target,string File);
+   virtual bool GetFile(std::string &Filename,unsigned long long &Size);
+   virtual bool RewriteEntry(FILE *Target,std::string File);
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *GetFileName() {return "Packages";};
    virtual const char *Type() {return "Package";};
    virtual const char *Type() {return "Package";};
    
    
@@ -64,8 +61,8 @@ class SourceCopy : public IndexCopy					/*{{{*/
 {
 {
    protected:
    protected:
    
    
-   virtual bool GetFile(string &Filename,unsigned long long &Size);
-   virtual bool RewriteEntry(FILE *Target,string File);
+   virtual bool GetFile(std::string &Filename,unsigned long long &Size);
+   virtual bool RewriteEntry(FILE *Target,std::string File);
    virtual const char *GetFileName() {return "Sources";};
    virtual const char *GetFileName() {return "Sources";};
    virtual const char *Type() {return "Source";};
    virtual const char *Type() {return "Source";};
    
    
@@ -77,7 +74,7 @@ class TranslationsCopy							/*{{{*/
    pkgTagSection *Section;
    pkgTagSection *Section;
 
 
    public:
    public:
-   bool CopyTranslations(string CDROM,string Name,vector<string> &List,
+   bool CopyTranslations(std::string CDROM,std::string Name,std::vector<std::string> &List,
 			 pkgCdromStatus *log);
 			 pkgCdromStatus *log);
 };
 };
 									/*}}}*/
 									/*}}}*/
@@ -86,13 +83,13 @@ class SigVerify								/*{{{*/
    /** \brief dpointer placeholder (for later in case we need it) */
    /** \brief dpointer placeholder (for later in case we need it) */
    void *d;
    void *d;
 
 
-   bool Verify(string prefix,string file, indexRecords *records);
-   bool CopyMetaIndex(string CDROM, string CDName, 
-		      string prefix, string file);
+   bool Verify(std::string prefix,std::string file, indexRecords *records);
+   bool CopyMetaIndex(std::string CDROM, std::string CDName, 
+		      std::string prefix, std::string file);
 
 
  public:
  public:
-   bool CopyAndVerify(string CDROM,string Name,vector<string> &SigList,
-		      vector<string> PkgList,vector<string> SrcList);
+   bool CopyAndVerify(std::string CDROM,std::string Name,std::vector<std::string> &SigList,
+		      std::vector<std::string> PkgList,std::vector<std::string> SrcList);
 
 
    /** \brief generates and run the command to verify a file with gpgv */
    /** \brief generates and run the command to verify a file with gpgv */
    static bool RunGPGV(std::string const &File, std::string const &FileOut,
    static bool RunGPGV(std::string const &File, std::string const &FileOut,

+ 5 - 5
apt-pkg/indexfile.cc

@@ -47,9 +47,9 @@ pkgIndexFile::Type *pkgIndexFile::Type::GetType(const char *Type)
 // IndexFile::ArchiveInfo - Stub					/*{{{*/
 // IndexFile::ArchiveInfo - Stub					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
+std::string pkgIndexFile::ArchiveInfo(pkgCache::VerIterator Ver) const
 {
 {
-   return string();
+   return std::string();
 }
 }
 									/*}}}*/
 									/*}}}*/
 // IndexFile::FindInCache - Stub					/*{{{*/
 // IndexFile::FindInCache - Stub					/*{{{*/
@@ -63,10 +63,10 @@ pkgCache::PkgFileIterator pkgIndexFile::FindInCache(pkgCache &Cache) const
 // IndexFile::SourceIndex - Stub					/*{{{*/
 // IndexFile::SourceIndex - Stub					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
+std::string pkgIndexFile::SourceInfo(pkgSrcRecords::Parser const &Record,
 				pkgSrcRecords::File const &File) const
 				pkgSrcRecords::File const &File) const
 {
 {
-   return string();
+   return std::string();
 }
 }
 									/*}}}*/
 									/*}}}*/
 // IndexFile::TranslationsAvailable - Check if will use Translation	/*{{{*/
 // IndexFile::TranslationsAvailable - Check if will use Translation	/*{{{*/
@@ -98,7 +98,7 @@ __attribute__ ((deprecated)) bool pkgIndexFile::CheckLanguageCode(const char *La
 /* As we have now possibly more than one LanguageCode this method is
 /* As we have now possibly more than one LanguageCode this method is
    supersided by a) private classmembers or b) getLanguages().
    supersided by a) private classmembers or b) getLanguages().
    TODO: Remove method with next API break */
    TODO: Remove method with next API break */
-__attribute__ ((deprecated)) string pkgIndexFile::LanguageCode() {
+__attribute__ ((deprecated)) std::string pkgIndexFile::LanguageCode() {
 	if (TranslationsAvailable() == false)
 	if (TranslationsAvailable() == false)
 		return "";
 		return "";
 	return APT::Configuration::getLanguages()[0];
 	return APT::Configuration::getLanguages()[0];

+ 5 - 7
apt-pkg/indexfile.h

@@ -27,8 +27,6 @@
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/srcrecords.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/pkgrecords.h>
-    
-using std::string;
 
 
 class pkgAcquire;
 class pkgAcquire;
 class pkgCacheGenerator;
 class pkgCacheGenerator;
@@ -59,13 +57,13 @@ class pkgIndexFile
    virtual const Type *GetType() const = 0;
    virtual const Type *GetType() const = 0;
    
    
    // Return descriptive strings of various sorts
    // Return descriptive strings of various sorts
-   virtual string ArchiveInfo(pkgCache::VerIterator Ver) const;
-   virtual string SourceInfo(pkgSrcRecords::Parser const &Record,
+   virtual std::string ArchiveInfo(pkgCache::VerIterator Ver) const;
+   virtual std::string SourceInfo(pkgSrcRecords::Parser const &Record,
 			     pkgSrcRecords::File const &File) const;
 			     pkgSrcRecords::File const &File) const;
-   virtual string Describe(bool Short = false) const = 0;   
+   virtual std::string Describe(bool Short = false) const = 0;   
 
 
    // Interface for acquire
    // Interface for acquire
-   virtual string ArchiveURI(string /*File*/) const {return string();};
+   virtual std::string ArchiveURI(std::string /*File*/) const {return std::string();};
 
 
    // Interface for the record parsers
    // Interface for the record parsers
    virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;};
    virtual pkgSrcRecords::Parser *CreateSrcParser() const {return 0;};
@@ -84,7 +82,7 @@ class pkgIndexFile
 
 
    static bool TranslationsAvailable();
    static bool TranslationsAvailable();
    static bool CheckLanguageCode(const char *Lang);
    static bool CheckLanguageCode(const char *Lang);
-   static string LanguageCode();
+   static std::string LanguageCode();
 
 
    bool IsTrusted() const { return Trusted; };
    bool IsTrusted() const { return Trusted; };
    
    

+ 4 - 1
apt-pkg/indexrecords.cc

@@ -15,6 +15,9 @@
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
+
+using std::string;
+
 string indexRecords::GetDist() const
 string indexRecords::GetDist() const
 {
 {
    return this->Dist;
    return this->Dist;
@@ -146,7 +149,7 @@ bool indexRecords::Load(const string Filename)				/*{{{*/
    return true;
    return true;
 }
 }
 									/*}}}*/
 									/*}}}*/
-vector<string> indexRecords::MetaKeys()					/*{{{*/
+std::vector<string> indexRecords::MetaKeys()				/*{{{*/
 {
 {
    std::vector<std::string> keys;
    std::vector<std::string> keys;
    std::map<string,checkSum *>::iterator I = Entries.begin();
    std::map<string,checkSum *>::iterator I = Entries.begin();

+ 15 - 15
apt-pkg/indexrecords.h

@@ -16,42 +16,42 @@
 
 
 class indexRecords
 class indexRecords
 {
 {
-   bool parseSumData(const char *&Start, const char *End, string &Name,
-		     string &Hash, unsigned long long &Size);
+   bool parseSumData(const char *&Start, const char *End, std::string &Name,
+		     std::string &Hash, unsigned long long &Size);
    public:
    public:
    struct checkSum;
    struct checkSum;
-   string ErrorText;
+   std::string ErrorText;
    
    
    protected:
    protected:
-   string Dist;
-   string Suite;
-   string ExpectedDist;
+   std::string Dist;
+   std::string Suite;
+   std::string ExpectedDist;
    time_t ValidUntil;
    time_t ValidUntil;
 
 
-   std::map<string,checkSum *> Entries;
+   std::map<std::string,checkSum *> Entries;
 
 
    public:
    public:
 
 
    indexRecords();
    indexRecords();
-   indexRecords(const string ExpectedDist);
+   indexRecords(const std::string ExpectedDist);
 
 
    // Lookup function
    // Lookup function
-   virtual const checkSum *Lookup(const string MetaKey);
+   virtual const checkSum *Lookup(const std::string MetaKey);
    /** \brief tests if a checksum for this file is available */
    /** \brief tests if a checksum for this file is available */
-   bool Exists(string const &MetaKey) const;
+   bool Exists(std::string const &MetaKey) const;
    std::vector<std::string> MetaKeys();
    std::vector<std::string> MetaKeys();
 
 
-   virtual bool Load(string Filename);
-   string GetDist() const;
+   virtual bool Load(std::string Filename);
+   std::string GetDist() const;
    time_t GetValidUntil() const;
    time_t GetValidUntil() const;
-   virtual bool CheckDist(const string MaybeDist) const;
-   string GetExpectedDist() const;
+   virtual bool CheckDist(const std::string MaybeDist) const;
+   std::string GetExpectedDist() const;
    virtual ~indexRecords(){};
    virtual ~indexRecords(){};
 };
 };
 
 
 struct indexRecords::checkSum
 struct indexRecords::checkSum
 {
 {
-   string MetaKeyFilename;
+   std::string MetaKeyFilename;
    HashString Hash;
    HashString Hash;
    unsigned long long Size;
    unsigned long long Size;
 };
 };

+ 3 - 3
apt-pkg/init.cc

@@ -108,14 +108,14 @@ bool pkgInitConfig(Configuration &Cnf)
    }
    }
 
 
    // Read the configuration parts dir
    // Read the configuration parts dir
-   string Parts = Cnf.FindDir("Dir::Etc::parts");
+   std::string Parts = Cnf.FindDir("Dir::Etc::parts");
    if (DirectoryExists(Parts) == true)
    if (DirectoryExists(Parts) == true)
       Res &= ReadConfigDir(Cnf,Parts);
       Res &= ReadConfigDir(Cnf,Parts);
    else
    else
       _error->WarningE("DirectoryExists",_("Unable to read %s"),Parts.c_str());
       _error->WarningE("DirectoryExists",_("Unable to read %s"),Parts.c_str());
 
 
    // Read the main config file
    // Read the main config file
-   string FName = Cnf.FindFile("Dir::Etc::main");
+   std::string FName = Cnf.FindFile("Dir::Etc::main");
    if (RealFileExists(FName) == true)
    if (RealFileExists(FName) == true)
       Res &= ReadConfigFile(Cnf,FName);
       Res &= ReadConfigFile(Cnf,FName);
 
 
@@ -142,7 +142,7 @@ bool pkgInitConfig(Configuration &Cnf)
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
 bool pkgInitSystem(Configuration &Cnf,pkgSystem *&Sys)
 {
 {
    Sys = 0;
    Sys = 0;
-   string Label = Cnf.Find("Apt::System","");
+   std::string Label = Cnf.Find("Apt::System","");
    if (Label.empty() == false)
    if (Label.empty() == false)
    {
    {
       Sys = pkgSystem::GetSystem(Label.c_str());
       Sys = pkgSystem::GetSystem(Label.c_str());

+ 9 - 11
apt-pkg/metaindex.h

@@ -8,8 +8,6 @@
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/pkgrecords.h>
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/indexfile.h>
 #include <apt-pkg/vendor.h>
 #include <apt-pkg/vendor.h>
-    
-using std::string;
 
 
 class pkgAcquire;
 class pkgAcquire;
 class pkgCacheGenerator;
 class pkgCacheGenerator;
@@ -18,35 +16,35 @@ class OpProgress;
 class metaIndex
 class metaIndex
 {
 {
    protected:
    protected:
-   vector <pkgIndexFile *> *Indexes;
+   std::vector <pkgIndexFile *> *Indexes;
    const char *Type;
    const char *Type;
-   string URI;
-   string Dist;
+   std::string URI;
+   std::string Dist;
    bool Trusted;
    bool Trusted;
 
 
    public:
    public:
 
 
    
    
    // Various accessors
    // Various accessors
-   virtual string GetURI() const {return URI;}
-   virtual string GetDist() const {return Dist;}
+   virtual std::string GetURI() const {return URI;}
+   virtual std::string GetDist() const {return Dist;}
    virtual const char* GetType() const {return Type;}
    virtual const char* GetType() const {return Type;}
 
 
    // Interface for acquire
    // Interface for acquire
-   virtual string ArchiveURI(string const& /*File*/) const = 0;
+   virtual std::string ArchiveURI(std::string const& /*File*/) const = 0;
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0;
    virtual bool GetIndexes(pkgAcquire *Owner, bool const &GetAll=false) const = 0;
    
    
-   virtual vector<pkgIndexFile *> *GetIndexFiles() = 0; 
+   virtual std::vector<pkgIndexFile *> *GetIndexFiles() = 0; 
    virtual bool IsTrusted() const = 0;
    virtual bool IsTrusted() const = 0;
 
 
-   metaIndex(string const &URI, string const &Dist, char const * const Type) :
+   metaIndex(std::string const &URI, std::string const &Dist, char const * const Type) :
 		Indexes(NULL), Type(Type), URI(URI), Dist(Dist) {
 		Indexes(NULL), Type(Type), URI(URI), Dist(Dist) {
    }
    }
 
 
    virtual ~metaIndex() {
    virtual ~metaIndex() {
       if (Indexes == 0)
       if (Indexes == 0)
 	 return;
 	 return;
-      for (vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
+      for (std::vector<pkgIndexFile *>::iterator I = (*Indexes).begin(); I != (*Indexes).end(); ++I)
 	 delete *I;
 	 delete *I;
       delete Indexes;
       delete Indexes;
    }
    }

+ 3 - 3
apt-pkg/orderlist.h

@@ -38,7 +38,7 @@ class pkgOrderList : protected pkgCache::Namespace
    Package **End;
    Package **End;
    Package **List;
    Package **List;
    Package **AfterEnd;
    Package **AfterEnd;
-   string *FileList;
+   std::string *FileList;
    DepIterator Loops[20];
    DepIterator Loops[20];
    int LoopCount;
    int LoopCount;
    int Depth;
    int Depth;
@@ -102,7 +102,7 @@ class pkgOrderList : protected pkgCache::Namespace
    inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;};
    inline bool IsNow(PkgIterator Pkg) {return (Flags[Pkg->ID] & (States & (~Removed))) == 0;};
    bool IsMissing(PkgIterator Pkg);
    bool IsMissing(PkgIterator Pkg);
    void WipeFlags(unsigned long F);
    void WipeFlags(unsigned long F);
-   void SetFileList(string *FileList) {this->FileList = FileList;};
+   void SetFileList(std::string *FileList) {this->FileList = FileList;};
 
 
    // Accessors
    // Accessors
    inline iterator begin() {return List;};
    inline iterator begin() {return List;};
@@ -115,7 +115,7 @@ class pkgOrderList : protected pkgCache::Namespace
    
    
    // Ordering modes
    // Ordering modes
    bool OrderCritical();
    bool OrderCritical();
-   bool OrderUnpack(string *FileList = 0);
+   bool OrderUnpack(std::string *FileList = 0);
    bool OrderConfigure();
    bool OrderConfigure();
 
 
    int Score(PkgIterator Pkg);
    int Score(PkgIterator Pkg);

+ 2 - 4
apt-pkg/packagemanager.h

@@ -30,8 +30,6 @@
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/depcache.h>
 #include <set>
 #include <set>
 
 
-using std::string;
-
 class pkgAcquire;
 class pkgAcquire;
 class pkgDepCache;
 class pkgDepCache;
 class pkgSourceList;
 class pkgSourceList;
@@ -45,7 +43,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    static bool SigINTStop;
    static bool SigINTStop;
    
    
    protected:
    protected:
-   string *FileNames;
+   std::string *FileNames;
    pkgDepCache &Cache;
    pkgDepCache &Cache;
    pkgOrderList *List;
    pkgOrderList *List;
    bool Debug;
    bool Debug;
@@ -78,7 +76,7 @@ class pkgPackageManager : protected pkgCache::Namespace
    bool EarlyRemove(PkgIterator Pkg);  
    bool EarlyRemove(PkgIterator Pkg);  
    
    
    // The Actual installation implementation
    // The Actual installation implementation
-   virtual bool Install(PkgIterator /*Pkg*/,string /*File*/) {return false;};
+   virtual bool Install(PkgIterator /*Pkg*/,std::string /*File*/) {return false;};
    virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
    virtual bool Configure(PkgIterator /*Pkg*/) {return false;};
    virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
    virtual bool Remove(PkgIterator /*Pkg*/,bool /*Purge*/=false) {return false;};
    virtual bool Go(int statusFd=-1) {return true;};
    virtual bool Go(int statusFd=-1) {return true;};

+ 2 - 2
apt-pkg/pkgcache.cc

@@ -490,7 +490,7 @@ pkgCache::PkgIterator::CurVersion() const
    if they provide no new information (e.g. there is no newer version than candidate)
    if they provide no new information (e.g. there is no newer version than candidate)
    If no version and/or section can be found "none" is used. */
    If no version and/or section can be found "none" is used. */
 std::ostream& 
 std::ostream& 
-operator<<(ostream& out, pkgCache::PkgIterator Pkg) 
+operator<<(std::ostream& out, pkgCache::PkgIterator Pkg) 
 {
 {
    if (Pkg.end() == true)
    if (Pkg.end() == true)
       return out << "invalid package";
       return out << "invalid package";
@@ -685,7 +685,7 @@ void pkgCache::DepIterator::GlobOr(DepIterator &Start,DepIterator &End)
 // ostream operator to handle string representation of a dependecy	/*{{{*/
 // ostream operator to handle string representation of a dependecy	/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-std::ostream& operator<<(ostream& out, pkgCache::DepIterator D)
+std::ostream& operator<<(std::ostream& out, pkgCache::DepIterator D)
 {
 {
    if (D.end() == true)
    if (D.end() == true)
       return out << "invalid dependency";
       return out << "invalid dependency";

+ 7 - 9
apt-pkg/pkgcache.h

@@ -79,8 +79,6 @@
 #include <time.h>
 #include <time.h>
 #include <apt-pkg/mmap.h>
 #include <apt-pkg/mmap.h>
 
 
-using std::string;
-    
 class pkgVersioningSystem;
 class pkgVersioningSystem;
 class pkgCache								/*{{{*/
 class pkgCache								/*{{{*/
 {
 {
@@ -152,10 +150,10 @@ class pkgCache								/*{{{*/
    protected:
    protected:
    
    
    // Memory mapped cache file
    // Memory mapped cache file
-   string CacheFile;
+   std::string CacheFile;
    MMap &Map;
    MMap &Map;
 
 
-   unsigned long sHash(const string &S) const;
+   unsigned long sHash(const std::string &S) const;
    unsigned long sHash(const char *S) const;
    unsigned long sHash(const char *S) const;
    
    
    public:
    public:
@@ -180,16 +178,16 @@ class pkgCache								/*{{{*/
    inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();};
    inline void *DataEnd() {return ((unsigned char *)Map.Data()) + Map.Size();};
       
       
    // String hashing function (512 range)
    // String hashing function (512 range)
-   inline unsigned long Hash(const string &S) const {return sHash(S);};
+   inline unsigned long Hash(const std::string &S) const {return sHash(S);};
    inline unsigned long Hash(const char *S) const {return sHash(S);};
    inline unsigned long Hash(const char *S) const {return sHash(S);};
 
 
    // Useful transformation things
    // Useful transformation things
    const char *Priority(unsigned char Priority);
    const char *Priority(unsigned char Priority);
    
    
    // Accessors
    // Accessors
-   GrpIterator FindGrp(const string &Name);
-   PkgIterator FindPkg(const string &Name);
-   PkgIterator FindPkg(const string &Name, const string &Arch);
+   GrpIterator FindGrp(const std::string &Name);
+   PkgIterator FindPkg(const std::string &Name);
+   PkgIterator FindPkg(const std::string &Name, const std::string &Arch);
 
 
    Header &Head() {return *HeaderP;};
    Header &Head() {return *HeaderP;};
    inline GrpIterator GrpBegin();
    inline GrpIterator GrpBegin();
@@ -214,7 +212,7 @@ class pkgCache								/*{{{*/
 
 
 private:
 private:
    bool MultiArchEnabled;
    bool MultiArchEnabled;
-   PkgIterator SingleArchFindPkg(const string &Name);
+   PkgIterator SingleArchFindPkg(const std::string &Name);
    inline char const * const NativeArch() const;
    inline char const * const NativeArch() const;
 };
 };
 									/*}}}*/
 									/*}}}*/

+ 19 - 19
apt-pkg/pkgcachegen.h

@@ -63,29 +63,29 @@ class pkgCacheGenerator							/*{{{*/
    pkgCache Cache;
    pkgCache Cache;
    OpProgress *Progress;
    OpProgress *Progress;
    
    
-   string PkgFileName;
+   std::string PkgFileName;
    pkgCache::PackageFile *CurrentFile;
    pkgCache::PackageFile *CurrentFile;
 
 
    // Flag file dependencies
    // Flag file dependencies
    bool FoundFileDeps;
    bool FoundFileDeps;
    
    
-   bool NewGroup(pkgCache::GrpIterator &Grp,const string &Name);
-   bool NewPackage(pkgCache::PkgIterator &Pkg,const string &Name, const string &Arch);
+   bool NewGroup(pkgCache::GrpIterator &Grp,const std::string &Name);
+   bool NewPackage(pkgCache::PkgIterator &Pkg,const std::string &Name, const std::string &Arch);
    bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List);
    bool NewFileVer(pkgCache::VerIterator &Ver,ListParser &List);
    bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
    bool NewFileDesc(pkgCache::DescIterator &Desc,ListParser &List);
    bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
    bool NewDepends(pkgCache::PkgIterator &Pkg, pkgCache::VerIterator &Ver,
-		   string const &Version, unsigned int const &Op,
+		   std::string const &Version, unsigned int const &Op,
 		   unsigned int const &Type, map_ptrloc* &OldDepLast);
 		   unsigned int const &Type, map_ptrloc* &OldDepLast);
-   unsigned long NewVersion(pkgCache::VerIterator &Ver,const string &VerStr,unsigned long Next);
-   map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const string &Lang,const MD5SumValue &md5sum,map_ptrloc Next);
+   unsigned long NewVersion(pkgCache::VerIterator &Ver,const std::string &VerStr,unsigned long Next);
+   map_ptrloc NewDescription(pkgCache::DescIterator &Desc,const std::string &Lang,const MD5SumValue &md5sum,map_ptrloc Next);
 
 
    public:
    public:
 
 
    unsigned long WriteUniqString(const char *S,unsigned int Size);
    unsigned long WriteUniqString(const char *S,unsigned int Size);
-   inline unsigned long WriteUniqString(const string &S) {return WriteUniqString(S.c_str(),S.length());};
+   inline unsigned long WriteUniqString(const std::string &S) {return WriteUniqString(S.c_str(),S.length());};
 
 
    void DropProgress() {Progress = 0;};
    void DropProgress() {Progress = 0;};
-   bool SelectFile(const string &File,const string &Site,pkgIndexFile const &Index,
+   bool SelectFile(const std::string &File,const std::string &Site,pkgIndexFile const &Index,
 		   unsigned long Flags = 0);
 		   unsigned long Flags = 0);
    bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0);
    bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0);
    inline pkgCache &GetCache() {return Cache;};
    inline pkgCache &GetCache() {return Cache;};
@@ -122,26 +122,26 @@ class pkgCacheGenerator::ListParser
       
       
    protected:
    protected:
 
 
-   inline unsigned long WriteUniqString(string S) {return Owner->WriteUniqString(S);};
+   inline unsigned long WriteUniqString(std::string S) {return Owner->WriteUniqString(S);};
    inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);};
    inline unsigned long WriteUniqString(const char *S,unsigned int Size) {return Owner->WriteUniqString(S,Size);};
-   inline unsigned long WriteString(const string &S) {return Owner->WriteStringInMap(S);};
+   inline unsigned long WriteString(const std::string &S) {return Owner->WriteStringInMap(S);};
    inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
    inline unsigned long WriteString(const char *S,unsigned int Size) {return Owner->WriteStringInMap(S,Size);};
-   bool NewDepends(pkgCache::VerIterator &Ver,const string &Package, const string &Arch,
-		   const string &Version,unsigned int Op,
+   bool NewDepends(pkgCache::VerIterator &Ver,const std::string &Package, const std::string &Arch,
+		   const std::string &Version,unsigned int Op,
 		   unsigned int Type);
 		   unsigned int Type);
-   bool NewProvides(pkgCache::VerIterator &Ver,const string &PkgName,
-		    const string &PkgArch, const string &Version);
+   bool NewProvides(pkgCache::VerIterator &Ver,const std::string &PkgName,
+		    const std::string &PkgArch, const std::string &Version);
    
    
    public:
    public:
    
    
    // These all operate against the current section
    // These all operate against the current section
-   virtual string Package() = 0;
-   virtual string Architecture() = 0;
+   virtual std::string Package() = 0;
+   virtual std::string Architecture() = 0;
    virtual bool ArchitectureAll() = 0;
    virtual bool ArchitectureAll() = 0;
-   virtual string Version() = 0;
+   virtual std::string Version() = 0;
    virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
    virtual bool NewVersion(pkgCache::VerIterator &Ver) = 0;
-   virtual string Description() = 0;
-   virtual string DescriptionLanguage() = 0;
+   virtual std::string Description() = 0;
+   virtual std::string DescriptionLanguage() = 0;
    virtual MD5SumValue Description_md5() = 0;
    virtual MD5SumValue Description_md5() = 0;
    virtual unsigned short VersionHash() = 0;
    virtual unsigned short VersionHash() = 0;
    virtual bool UsePackage(pkgCache::PkgIterator &Pkg,
    virtual bool UsePackage(pkgCache::PkgIterator &Pkg,

+ 1 - 1
apt-pkg/pkgrecords.cc

@@ -46,7 +46,7 @@ pkgRecords::pkgRecords(pkgCache &Cache) : Cache(Cache),
 /* */
 /* */
 pkgRecords::~pkgRecords()
 pkgRecords::~pkgRecords()
 {
 {
-   for ( vector<Parser*>::iterator it = Files.begin();
+   for ( std::vector<Parser*>::iterator it = Files.begin();
      it != Files.end();
      it != Files.end();
      ++it)
      ++it)
    {
    {

+ 13 - 13
apt-pkg/pkgrecords.h

@@ -54,23 +54,23 @@ class pkgRecords::Parser						/*{{{*/
    friend class pkgRecords;
    friend class pkgRecords;
    
    
    // These refer to the archive file for the Version
    // These refer to the archive file for the Version
-   virtual string FileName() {return string();};
-   virtual string MD5Hash() {return string();};
-   virtual string SHA1Hash() {return string();};
-   virtual string SHA256Hash() {return string();};
-   virtual string SHA512Hash() {return string();};
-   virtual string SourcePkg() {return string();};
-   virtual string SourceVer() {return string();};
+   virtual std::string FileName() {return std::string();};
+   virtual std::string MD5Hash() {return std::string();};
+   virtual std::string SHA1Hash() {return std::string();};
+   virtual std::string SHA256Hash() {return std::string();};
+   virtual std::string SHA512Hash() {return std::string();};
+   virtual std::string SourcePkg() {return std::string();};
+   virtual std::string SourceVer() {return std::string();};
 
 
    // These are some general stats about the package
    // These are some general stats about the package
-   virtual string Maintainer() {return string();};
-   virtual string ShortDesc() {return string();};
-   virtual string LongDesc() {return string();};
-   virtual string Name() {return string();};
-   virtual string Homepage() {return string();}
+   virtual std::string Maintainer() {return std::string();};
+   virtual std::string ShortDesc() {return std::string();};
+   virtual std::string LongDesc() {return std::string();};
+   virtual std::string Name() {return std::string();};
+   virtual std::string Homepage() {return std::string();}
 
 
    // An arbitrary custom field
    // An arbitrary custom field
-   virtual string RecordField(const char *fieldName) { return string();};
+   virtual std::string RecordField(const char *fieldName) { return std::string();};
 
 
    // The record in binary form
    // The record in binary form
    virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};
    virtual void GetRec(const char *&Start,const char *&Stop) {Start = Stop = 0;};

+ 9 - 11
apt-pkg/policy.h

@@ -38,8 +38,6 @@
 #include <apt-pkg/versionmatch.h>
 #include <apt-pkg/versionmatch.h>
 #include <vector>
 #include <vector>
 
 
-using std::vector;
-
 class pkgPolicy : public pkgDepCache::Policy
 class pkgPolicy : public pkgDepCache::Policy
 {
 {
    protected:
    protected:
@@ -47,29 +45,29 @@ class pkgPolicy : public pkgDepCache::Policy
    struct Pin
    struct Pin
    {
    {
       pkgVersionMatch::MatchType Type;
       pkgVersionMatch::MatchType Type;
-      string Data;
+      std::string Data;
       signed short Priority;
       signed short Priority;
       Pin() : Type(pkgVersionMatch::None), Priority(0) {};
       Pin() : Type(pkgVersionMatch::None), Priority(0) {};
    };
    };
 
 
    struct PkgPin : Pin
    struct PkgPin : Pin
    {
    {
-      string Pkg;
-      PkgPin(string const &Pkg) : Pin(), Pkg(Pkg) {};
+      std::string Pkg;
+      PkgPin(std::string const &Pkg) : Pin(), Pkg(Pkg) {};
    };
    };
    
    
    Pin *Pins;
    Pin *Pins;
    signed short *PFPriority;
    signed short *PFPriority;
-   vector<Pin> Defaults;
-   vector<PkgPin> Unmatched;
+   std::vector<Pin> Defaults;
+   std::vector<PkgPin> Unmatched;
    pkgCache *Cache;
    pkgCache *Cache;
    bool StatusOverride;
    bool StatusOverride;
    
    
    public:
    public:
 
 
    // Things for manipulating pins
    // Things for manipulating pins
-   void CreatePin(pkgVersionMatch::MatchType Type,string Pkg,
-		  string Data,signed short Priority);
+   void CreatePin(pkgVersionMatch::MatchType Type,std::string Pkg,
+		  std::string Data,signed short Priority);
    pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg);
    pkgCache::VerIterator GetMatch(pkgCache::PkgIterator const &Pkg);
 
 
    // Things for the cache interface.
    // Things for the cache interface.
@@ -83,7 +81,7 @@ class pkgPolicy : public pkgDepCache::Policy
    virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;};
    virtual ~pkgPolicy() {delete [] PFPriority; delete [] Pins;};
 };
 };
 
 
-bool ReadPinFile(pkgPolicy &Plcy,string File = "");
-bool ReadPinDir(pkgPolicy &Plcy,string Dir = "");
+bool ReadPinFile(pkgPolicy &Plcy, std::string File = "");
+bool ReadPinDir(pkgPolicy &Plcy, std::string Dir = "");
 
 
 #endif
 #endif

+ 15 - 18
apt-pkg/srcrecords.h

@@ -15,10 +15,7 @@
 
 
 
 
 #include <string>
 #include <string>
-#include <vector>    
-
-using std::string;
-using std::vector;
+#include <vector>
 
 
 class pkgSourceList;
 class pkgSourceList;
 class pkgIndexFile;
 class pkgIndexFile;
@@ -29,10 +26,10 @@ class pkgSrcRecords
    // Describes a single file
    // Describes a single file
    struct File
    struct File
    {
    {
-      string MD5Hash;
+      std::string MD5Hash;
       unsigned long Size;
       unsigned long Size;
-      string Path;
-      string Type;
+      std::string Path;
+      std::string Type;
    };
    };
    
    
    // Abstract parser for each source record
    // Abstract parser for each source record
@@ -49,8 +46,8 @@ class pkgSrcRecords
 
 
       struct BuildDepRec 
       struct BuildDepRec 
       {
       {
-         string Package;
-	 string Version;
+	 std::string Package;
+	 std::string Version;
 	 unsigned int Op;
 	 unsigned int Op;
 	 unsigned char Type;
 	 unsigned char Type;
       };
       };
@@ -61,18 +58,18 @@ class pkgSrcRecords
       virtual bool Step() = 0;
       virtual bool Step() = 0;
       virtual bool Jump(unsigned long const &Off) = 0;
       virtual bool Jump(unsigned long const &Off) = 0;
       virtual unsigned long Offset() = 0;
       virtual unsigned long Offset() = 0;
-      virtual string AsStr() = 0;
+      virtual std::string AsStr() = 0;
       
       
-      virtual string Package() const = 0;
-      virtual string Version() const = 0;
-      virtual string Maintainer() const = 0;
-      virtual string Section() const = 0;
+      virtual std::string Package() const = 0;
+      virtual std::string Version() const = 0;
+      virtual std::string Maintainer() const = 0;
+      virtual std::string Section() const = 0;
       virtual const char **Binaries() = 0;   // Ownership does not transfer
       virtual const char **Binaries() = 0;   // Ownership does not transfer
 
 
-      virtual bool BuildDepends(vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0;
+      virtual bool BuildDepends(std::vector<BuildDepRec> &BuildDeps, bool const &ArchOnly, bool const &StripMultiArch = true) = 0;
       static const char *BuildDepType(unsigned char const &Type);
       static const char *BuildDepType(unsigned char const &Type);
 
 
-      virtual bool Files(vector<pkgSrcRecords::File> &F) = 0;
+      virtual bool Files(std::vector<pkgSrcRecords::File> &F) = 0;
       
       
       Parser(const pkgIndexFile *Index) : iIndex(Index) {};
       Parser(const pkgIndexFile *Index) : iIndex(Index) {};
       virtual ~Parser() {};
       virtual ~Parser() {};
@@ -83,8 +80,8 @@ class pkgSrcRecords
    void *d;
    void *d;
    
    
    // The list of files and the current parser pointer
    // The list of files and the current parser pointer
-   vector<Parser*> Files;
-   vector<Parser *>::iterator Current;
+   std::vector<Parser*> Files;
+   std::vector<Parser *>::iterator Current;
    
    
    public:
    public:
 
 

+ 1 - 1
apt-pkg/tagfile.h

@@ -54,7 +54,7 @@ class pkgTagSection
    
    
    bool Find(const char *Tag,const char *&Start, const char *&End) const;
    bool Find(const char *Tag,const char *&Start, const char *&End) const;
    bool Find(const char *Tag,unsigned &Pos) const;
    bool Find(const char *Tag,unsigned &Pos) const;
-   string FindS(const char *Tag) const;
+   std::string FindS(const char *Tag) const;
    signed int FindI(const char *Tag,signed long Default = 0) const ;
    signed int FindI(const char *Tag,signed long Default = 0) const ;
    unsigned long long FindULL(const char *Tag, unsigned long long const &Default = 0) const;
    unsigned long long FindULL(const char *Tag, unsigned long long const &Default = 0) const;
    bool FindFlag(const char *Tag,unsigned long &Flags,
    bool FindFlag(const char *Tag,unsigned long &Flags,

+ 3 - 3
apt-pkg/vendor.cc

@@ -22,16 +22,16 @@ Vendor::Vendor(std::string VendorID,
    delete FingerprintList;
    delete FingerprintList;
 }
 }
 
 
-const string Vendor::LookupFingerprint(string Print) const
+const std::string Vendor::LookupFingerprint(std::string Print) const
 {
 {
-   std::map<string,string>::const_iterator Elt = Fingerprints.find(Print);
+   std::map<std::string,std::string>::const_iterator Elt = Fingerprints.find(Print);
    if (Elt == Fingerprints.end())
    if (Elt == Fingerprints.end())
       return "";
       return "";
    else
    else
       return (*Elt).second;
       return (*Elt).second;
 }
 }
 
 
-bool Vendor::CheckDist(string Dist)
+bool Vendor::CheckDist(std::string Dist)
 {
 {
    return true;
    return true;
 }
 }

+ 10 - 12
apt-pkg/vendor.h

@@ -6,29 +6,27 @@
 
 
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>
 
 
-using std::string;
-
-// A class representing a particular software provider. 
+// A class representing a particular software provider.
 class __deprecated Vendor
 class __deprecated Vendor
 {
 {
    public:
    public:
    struct Fingerprint
    struct Fingerprint
    {
    {
-      string Print;
-      string Description;
+      std::string Print;
+      std::string Description;
    };
    };
 
 
    protected:
    protected:
-   string VendorID;
-   string Origin;
-   std::map<string, string> Fingerprints;
+   std::string VendorID;
+   std::string Origin;
+   std::map<std::string, std::string> Fingerprints;
 
 
    public:
    public:
-   Vendor(string VendorID, string Origin,
+   Vendor(std::string VendorID, std::string Origin,
           std::vector<struct Fingerprint *> *FingerprintList);
           std::vector<struct Fingerprint *> *FingerprintList);
-   virtual const string& GetVendorID() const { return VendorID; };
-   virtual const string LookupFingerprint(string Print) const;
-   virtual bool CheckDist(string Dist);
+   virtual const std::string& GetVendorID() const { return VendorID; };
+   virtual const std::string LookupFingerprint(std::string Print) const;
+   virtual bool CheckDist(std::string Dist);
    virtual ~Vendor(){};
    virtual ~Vendor(){};
 };
 };
 
 

+ 3 - 0
apt-pkg/vendorlist.cc

@@ -10,6 +10,9 @@
 
 
 #include <apt-pkg/vendorlist.h>
 #include <apt-pkg/vendorlist.h>
 
 
+using std::string;
+using std::vector;
+
 pkgVendorList::~pkgVendorList()
 pkgVendorList::~pkgVendorList()
 {
 {
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 
    for (vector<const Vendor *>::const_iterator I = VendorList.begin(); 

+ 5 - 9
apt-pkg/vendorlist.h

@@ -19,22 +19,18 @@
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/macros.h>
 #include <apt-pkg/macros.h>
 
 
-using std::string;
-using std::vector;
-
-
 class __deprecated pkgVendorList
 class __deprecated pkgVendorList
 {
 {
    protected:
    protected:
-   vector<Vendor const *> VendorList;
+   std::vector<Vendor const *> VendorList;
 
 
    bool CreateList(Configuration& Cnf);
    bool CreateList(Configuration& Cnf);
-   const Vendor* LookupFingerprint(string Fingerprint);
+   const Vendor* LookupFingerprint(std::string Fingerprint);
 
 
    public:
    public:
-   typedef vector<Vendor const *>::const_iterator const_iterator;
+   typedef std::vector<Vendor const *>::const_iterator const_iterator;
    bool ReadMainList();
    bool ReadMainList();
-   bool Read(string File);
+   bool Read(std::string File);
 
 
    // List accessors
    // List accessors
    inline const_iterator begin() const {return VendorList.begin();};
    inline const_iterator begin() const {return VendorList.begin();};
@@ -42,7 +38,7 @@ class __deprecated pkgVendorList
    inline unsigned int size() const {return VendorList.size();};
    inline unsigned int size() const {return VendorList.size();};
    inline bool empty() const {return VendorList.empty();};
    inline bool empty() const {return VendorList.empty();};
 
 
-   const Vendor* FindVendor(const vector<string> GPGVOutput);
+   const Vendor* FindVendor(const std::vector<std::string> GPGVOutput);
 
 
    ~pkgVendorList();
    ~pkgVendorList();
 };
 };

+ 1 - 3
apt-pkg/version.h

@@ -24,8 +24,6 @@
 #include <apt-pkg/strutl.h>    
 #include <apt-pkg/strutl.h>    
 #include <string>
 #include <string>
 
 
-using std::string;
-
 class pkgVersioningSystem
 class pkgVersioningSystem
 {
 {
    public:
    public:
@@ -43,7 +41,7 @@ class pkgVersioningSystem
    virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0;
    virtual bool CheckDep(const char *PkgVer,int Op,const char *DepVer) = 0;
    virtual int DoCmpReleaseVer(const char *A,const char *Aend,
    virtual int DoCmpReleaseVer(const char *A,const char *Aend,
 			       const char *B,const char *Bend) = 0;
 			       const char *B,const char *Bend) = 0;
-   virtual string UpstreamVersion(const char *A) = 0;
+   virtual std::string UpstreamVersion(const char *A) = 0;
    
    
    // See if the given VS is compatible with this one.. 
    // See if the given VS is compatible with this one.. 
    virtual bool TestCompatibility(pkgVersioningSystem const &Against) 
    virtual bool TestCompatibility(pkgVersioningSystem const &Against) 

+ 2 - 0
apt-pkg/versionmatch.cc

@@ -24,6 +24,8 @@
 #include <regex.h>
 #include <regex.h>
 									/*}}}*/
 									/*}}}*/
 
 
+using std::string;
+
 // VersionMatch::pkgVersionMatch - Constructor				/*{{{*/
 // VersionMatch::pkgVersionMatch - Constructor				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Break up the data string according to the selected type */
 /* Break up the data string according to the selected type */

+ 12 - 14
apt-pkg/versionmatch.h

@@ -39,40 +39,38 @@
 #include <string>
 #include <string>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/pkgcache.h>
 
 
-using std::string;
-
 class pkgVersionMatch
 class pkgVersionMatch
 {   
 {   
    // Version Matching
    // Version Matching
-   string VerStr;
+   std::string VerStr;
    bool VerPrefixMatch;
    bool VerPrefixMatch;
 
 
    // Release Matching
    // Release Matching
-   string RelVerStr;
+   std::string RelVerStr;
    bool RelVerPrefixMatch;
    bool RelVerPrefixMatch;
-   string RelOrigin;
-   string RelRelease;
-   string RelCodename;
-   string RelArchive;
-   string RelLabel;
-   string RelComponent;
-   string RelArchitecture;
+   std::string RelOrigin;
+   std::string RelRelease;
+   std::string RelCodename;
+   std::string RelArchive;
+   std::string RelLabel;
+   std::string RelComponent;
+   std::string RelArchitecture;
    bool MatchAll;
    bool MatchAll;
    
    
    // Origin Matching
    // Origin Matching
-   string OrSite;
+   std::string OrSite;
    
    
    public:
    public:
    
    
    enum MatchType {None = 0,Version,Release,Origin} Type;
    enum MatchType {None = 0,Version,Release,Origin} Type;
    
    
-   bool MatchVer(const char *A,string B,bool Prefix);
+   bool MatchVer(const char *A,std::string B,bool Prefix);
    bool ExpressionMatches(const char *pattern, const char *string);
    bool ExpressionMatches(const char *pattern, const char *string);
    bool ExpressionMatches(const std::string& pattern, const char *string);
    bool ExpressionMatches(const std::string& pattern, const char *string);
    bool FileMatch(pkgCache::PkgFileIterator File);
    bool FileMatch(pkgCache::PkgFileIterator File);
    pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg);
    pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg);
 			       
 			       
-   pkgVersionMatch(string Data,MatchType Type);
+   pkgVersionMatch(std::string Data,MatchType Type);
 };
 };
 
 
 #endif
 #endif

+ 7 - 0
debian/changelog

@@ -1,3 +1,10 @@
+apt (0.8.16~exp7) experimental; urgency=low
+
+  [ David Kalnischkies ]
+  * do not pollute namespace in the headers with using (Closes: #500198)
+
+ -- David Kalnischkies <kalnischkies@gmail.com>  Mon, 19 Sep 2011 13:25:58 +0200
+
 apt (0.8.16~exp6) experimental; urgency=low
 apt (0.8.16~exp6) experimental; urgency=low
 
 
   [ Christopher Baines ]
   [ Christopher Baines ]

+ 6 - 6
ftparchive/cachedb.cc

@@ -28,7 +28,7 @@
 // CacheDB::ReadyDB - Ready the DB2					/*{{{*/
 // CacheDB::ReadyDB - Ready the DB2					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This opens the DB2 file for caching package information */
 /* This opens the DB2 file for caching package information */
-bool CacheDB::ReadyDB(string const &DB)
+bool CacheDB::ReadyDB(std::string const &DB)
 {
 {
    int err;
    int err;
 
 
@@ -48,7 +48,7 @@ bool CacheDB::ReadyDB(string const &DB)
    
    
    DBLoaded = false;
    DBLoaded = false;
    Dbp = 0;
    Dbp = 0;
-   DBFile = string();
+   DBFile = std::string();
    
    
    if (DB.empty())
    if (DB.empty())
       return true;
       return true;
@@ -162,7 +162,7 @@ bool CacheDB::GetCurStat()
 									/*}}}*/
 									/*}}}*/
 // CacheDB::GetFileInfo - Get all the info about the file		/*{{{*/
 // CacheDB::GetFileInfo - Get all the info about the file		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
-bool CacheDB::GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents,
+bool CacheDB::GetFileInfo(std::string const &FileName, bool const &DoControl, bool const &DoContents,
 				bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1,
 				bool const &GenContentsOnly, bool const &DoMD5, bool const &DoSHA1,
 				bool const &DoSHA256, 	bool const &DoSHA512, 
 				bool const &DoSHA256, 	bool const &DoSHA512, 
                           bool const &checkMtime)
                           bool const &checkMtime)
@@ -298,12 +298,12 @@ bool CacheDB::LoadContents(bool const &GenOnly)
 }
 }
 									/*}}}*/
 									/*}}}*/
 
 
-static string bytes2hex(uint8_t *bytes, size_t length) {
+static std::string bytes2hex(uint8_t *bytes, size_t length) {
    char space[65];
    char space[65];
    if (length * 2 > sizeof(space) - 1) length = (sizeof(space) - 1) / 2;
    if (length * 2 > sizeof(space) - 1) length = (sizeof(space) - 1) / 2;
    for (size_t i = 0; i < length; i++)
    for (size_t i = 0; i < length; i++)
       snprintf(&space[i*2], 3, "%02x", bytes[i]);
       snprintf(&space[i*2], 3, "%02x", bytes[i]);
-   return string(space);
+   return std::string(space);
 }
 }
 
 
 static inline unsigned char xdig2num(char const &dig) {
 static inline unsigned char xdig2num(char const &dig) {
@@ -496,7 +496,7 @@ bool CacheDB::Clean()
              stringcmp(Colon + 1, (char *)Key.data+Key.size,"cl") == 0 ||
              stringcmp(Colon + 1, (char *)Key.data+Key.size,"cl") == 0 ||
              stringcmp(Colon + 1, (char *)Key.data+Key.size,"cn") == 0)
              stringcmp(Colon + 1, (char *)Key.data+Key.size,"cn") == 0)
 	 {
 	 {
-            if (FileExists(string((const char *)Key.data,Colon)) == true)
+            if (FileExists(std::string((const char *)Key.data,Colon)) == true)
 		continue;	     
 		continue;	     
 	 }
 	 }
       }
       }

+ 11 - 11
ftparchive/cachedb.h

@@ -34,7 +34,7 @@ class CacheDB
    DB *Dbp;
    DB *Dbp;
    bool DBLoaded;
    bool DBLoaded;
    bool ReadOnly;
    bool ReadOnly;
-   string DBFile;
+   std::string DBFile;
 
 
    // Generate a key for the DB of a given type
    // Generate a key for the DB of a given type
    inline void InitQuery(const char *Type)
    inline void InitQuery(const char *Type)
@@ -90,7 +90,7 @@ class CacheDB
    struct StatStore OldStat;
    struct StatStore OldStat;
    
    
    // 'set' state
    // 'set' state
-   string FileName;
+   std::string FileName;
    FileFd *Fd;
    FileFd *Fd;
    debDebFile *DebFile;
    debDebFile *DebFile;
    
    
@@ -99,10 +99,10 @@ class CacheDB
    // Data collection helpers
    // Data collection helpers
    debDebFile::MemControlExtract Control;
    debDebFile::MemControlExtract Control;
    ContentsExtract Contents;
    ContentsExtract Contents;
-   string MD5Res;
-   string SHA1Res;
-   string SHA256Res;
-   string SHA512Res;
+   std::string MD5Res;
+   std::string SHA1Res;
+   std::string SHA256Res;
+   std::string SHA512Res;
    
    
    // Runtime statistics
    // Runtime statistics
    struct Stats
    struct Stats
@@ -129,21 +129,21 @@ class CacheDB
       Stats() : Bytes(0), MD5Bytes(0), SHA1Bytes(0), SHA256Bytes(0), Packages(0), Misses(0), DeLinkBytes(0) {};
       Stats() : Bytes(0), MD5Bytes(0), SHA1Bytes(0), SHA256Bytes(0), Packages(0), Misses(0), DeLinkBytes(0) {};
    } Stats;
    } Stats;
    
    
-   bool ReadyDB(string const &DB);
+   bool ReadyDB(std::string const &DB);
    inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;};
    inline bool DBFailed() {return Dbp != 0 && DBLoaded == false;};
    inline bool Loaded() {return DBLoaded == true;};
    inline bool Loaded() {return DBLoaded == true;};
    
    
    inline unsigned long long GetFileSize(void) {return CurStat.FileSize;}
    inline unsigned long long GetFileSize(void) {return CurStat.FileSize;}
    
    
-   bool SetFile(string const &FileName,struct stat St,FileFd *Fd);
-   bool GetFileInfo(string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly,
+   bool SetFile(std::string const &FileName,struct stat St,FileFd *Fd);
+   bool GetFileInfo(std::string const &FileName, bool const &DoControl, bool const &DoContents, bool const &GenContentsOnly,
 		    bool const &DoMD5, bool const &DoSHA1, bool const &DoSHA256, bool const &DoSHA512, bool const &checkMtime = false);
 		    bool const &DoMD5, bool const &DoSHA1, bool const &DoSHA256, bool const &DoSHA512, bool const &checkMtime = false);
    bool Finish();   
    bool Finish();   
    
    
    bool Clean();
    bool Clean();
    
    
-   CacheDB(string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);};
-   ~CacheDB() {ReadyDB(string()); delete DebFile;};
+   CacheDB(std::string const &DB) : Dbp(0), Fd(NULL), DebFile(0) {ReadyDB(DB);};
+   ~CacheDB() {ReadyDB(std::string()); delete DebFile;};
 };
 };
     
     
 #endif
 #endif

+ 1 - 1
ftparchive/contents.cc

@@ -380,7 +380,7 @@ bool ContentsExtract::TakeContents(const void *NewData,unsigned long long Length
 // ContentsExtract::Add - Read the contents data into the sorter	/*{{{*/
 // ContentsExtract::Add - Read the contents data into the sorter	/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-void ContentsExtract::Add(GenContents &Contents,string const &Package)
+void ContentsExtract::Add(GenContents &Contents,std::string const &Package)
 {
 {
    const char *Start = Data;
    const char *Start = Data;
    char *Pkg = Contents.Mystrdup(Package.c_str());
    char *Pkg = Contents.Mystrdup(Package.c_str());

+ 1 - 1
ftparchive/contents.h

@@ -80,7 +80,7 @@ class ContentsExtract : public pkgDirStream
    virtual bool DoItem(Item &Itm,int &Fd);      
    virtual bool DoItem(Item &Itm,int &Fd);      
    void Reset() {CurSize = 0;};
    void Reset() {CurSize = 0;};
    bool TakeContents(const void *Data,unsigned long long Length);
    bool TakeContents(const void *Data,unsigned long long Length);
-   void Add(GenContents &Contents,string const &Package);
+   void Add(GenContents &Contents,std::string const &Package);
    
    
    ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {};
    ContentsExtract() : Data(0), MaxSize(0), CurSize(0) {};
    virtual ~ContentsExtract() {delete [] Data;};
    virtual ~ContentsExtract() {delete [] Data;};

+ 3 - 3
ftparchive/multicompress.h

@@ -29,7 +29,7 @@ class MultiCompress
    // An output file
    // An output file
    struct Files
    struct Files
    {
    {
-      string Output;
+      std::string Output;
       APT::Configuration::Compressor CompressProg;
       APT::Configuration::Compressor CompressProg;
       Files *Next;
       Files *Next;
       FileFd TmpFile;
       FileFd TmpFile;
@@ -57,9 +57,9 @@ class MultiCompress
    bool Finalize(unsigned long long &OutSize);
    bool Finalize(unsigned long long &OutSize);
    bool OpenOld(int &Fd,pid_t &Proc);
    bool OpenOld(int &Fd,pid_t &Proc);
    bool CloseOld(int Fd,pid_t Proc);
    bool CloseOld(int Fd,pid_t Proc);
-   static bool GetStat(string const &Output,string const &Compress,struct stat &St);
+   static bool GetStat(std::string const &Output,std::string const &Compress,struct stat &St);
    
    
-   MultiCompress(string const &Output,string const &Compress,
+   MultiCompress(std::string const &Output,std::string const &Compress,
 		 mode_t const &Permissions, bool const &Write = true);
 		 mode_t const &Permissions, bool const &Write = true);
    ~MultiCompress();
    ~MultiCompress();
 };
 };

+ 3 - 3
methods/bzip2.cc

@@ -47,9 +47,9 @@ class Bzip2Method : public pkgAcqMethod
 bool Bzip2Method::Fetch(FetchItem *Itm)
 bool Bzip2Method::Fetch(FetchItem *Itm)
 {
 {
    URI Get = Itm->Uri;
    URI Get = Itm->Uri;
-   string Path = Get.Host + Get.Path; // To account for relative paths
+   std::string Path = Get.Host + Get.Path; // To account for relative paths
    
    
-   string GzPathOption = "Dir::bin::"+string(Prog);
+   std::string GzPathOption = "Dir::bin::" + std::string(Prog);
 
 
    FetchResult Res;
    FetchResult Res;
    Res.Filename = Itm->DestFile;
    Res.Filename = Itm->DestFile;
@@ -78,7 +78,7 @@ bool Bzip2Method::Fetch(FetchItem *Itm)
       SetCloseExec(STDOUT_FILENO,false);
       SetCloseExec(STDOUT_FILENO,false);
       
       
       const char *Args[3];
       const char *Args[3];
-      string Tmp = _config->Find(GzPathOption,Prog);
+      std::string Tmp = _config->Find(GzPathOption,Prog);
       Args[0] = Tmp.c_str();
       Args[0] = Tmp.c_str();
       Args[1] = "-d";
       Args[1] = "-d";
       Args[2] = 0;
       Args[2] = 0;

+ 7 - 7
methods/connect.cc

@@ -35,13 +35,13 @@
 #include <apti18n.h>
 #include <apti18n.h>
 									/*}}}*/
 									/*}}}*/
 
 
-static string LastHost;
+static std::string LastHost;
 static int LastPort = 0;
 static int LastPort = 0;
 static struct addrinfo *LastHostAddr = 0;
 static struct addrinfo *LastHostAddr = 0;
 static struct addrinfo *LastUsed = 0;
 static struct addrinfo *LastUsed = 0;
 
 
 // Set of IP/hostnames that we timed out before or couldn't resolve
 // Set of IP/hostnames that we timed out before or couldn't resolve
-static std::set<string> bad_addr;
+static std::set<std::string> bad_addr;
 
 
 // RotateDNS - Select a new server from a DNS rotation			/*{{{*/
 // RotateDNS - Select a new server from a DNS rotation			/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
@@ -58,7 +58,7 @@ void RotateDNS()
 // DoConnect - Attempt a connect operation				/*{{{*/
 // DoConnect - Attempt a connect operation				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* This helper function attempts a connection to a single address. */
 /* This helper function attempts a connection to a single address. */
-static bool DoConnect(struct addrinfo *Addr,string Host,
+static bool DoConnect(struct addrinfo *Addr,std::string Host,
 		      unsigned long TimeOut,int &Fd,pkgAcqMethod *Owner)
 		      unsigned long TimeOut,int &Fd,pkgAcqMethod *Owner)
 {
 {
    // Show a status indicator
    // Show a status indicator
@@ -73,7 +73,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name);
    Owner->Status(_("Connecting to %s (%s)"),Host.c_str(),Name);
 
 
    // if that addr did timeout before, we do not try it again
    // if that addr did timeout before, we do not try it again
-   if(bad_addr.find(string(Name)) != bad_addr.end())
+   if(bad_addr.find(std::string(Name)) != bad_addr.end())
       return false;
       return false;
 
 
    /* If this is an IP rotation store the IP we are using.. If something goes
    /* If this is an IP rotation store the IP we are using.. If something goes
@@ -100,7 +100,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
    /* This implements a timeout for connect by opening the connection
    /* This implements a timeout for connect by opening the connection
       nonblocking */
       nonblocking */
    if (WaitFd(Fd,true,TimeOut) == false) {
    if (WaitFd(Fd,true,TimeOut) == false) {
-      bad_addr.insert(bad_addr.begin(), string(Name));
+      bad_addr.insert(bad_addr.begin(), std::string(Name));
       Owner->SetFailReason("Timeout");
       Owner->SetFailReason("Timeout");
       return _error->Error(_("Could not connect to %s:%s (%s), "
       return _error->Error(_("Could not connect to %s:%s (%s), "
 			   "connection timed out"),Host.c_str(),Service,Name);
 			   "connection timed out"),Host.c_str(),Service,Name);
@@ -119,7 +119,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
          Owner->SetFailReason("ConnectionRefused");
          Owner->SetFailReason("ConnectionRefused");
       else if (errno == ETIMEDOUT)
       else if (errno == ETIMEDOUT)
 	 Owner->SetFailReason("ConnectionTimedOut");
 	 Owner->SetFailReason("ConnectionTimedOut");
-      bad_addr.insert(bad_addr.begin(), string(Name));
+      bad_addr.insert(bad_addr.begin(), std::string(Name));
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
       return _error->Errno("connect",_("Could not connect to %s:%s (%s)."),Host.c_str(),
 			   Service,Name);
 			   Service,Name);
    }
    }
@@ -130,7 +130,7 @@ static bool DoConnect(struct addrinfo *Addr,string Host,
 // Connect - Connect to a server					/*{{{*/
 // Connect - Connect to a server					/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* Performs a connection to the server */
 /* Performs a connection to the server */
-bool Connect(string Host,int Port,const char *Service,int DefPort,int &Fd,
+bool Connect(std::string Host,int Port,const char *Service,int DefPort,int &Fd,
 	     unsigned long TimeOut,pkgAcqMethod *Owner)
 	     unsigned long TimeOut,pkgAcqMethod *Owner)
 {
 {
    if (_error->PendingError() == true)
    if (_error->PendingError() == true)

+ 1 - 1
methods/connect.h

@@ -13,7 +13,7 @@
 #include <string>
 #include <string>
 #include <apt-pkg/acquire-method.h>
 #include <apt-pkg/acquire-method.h>
 
 
-bool Connect(string To,int Port,const char *Service,int DefPort,
+bool Connect(std::string To,int Port,const char *Service,int DefPort,
 	     int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner);
 	     int &Fd,unsigned long TimeOut,pkgAcqMethod *Owner);
 void RotateDNS();
 void RotateDNS();
 
 

+ 1 - 1
methods/copy.cc

@@ -37,7 +37,7 @@ class CopyMethod : public pkgAcqMethod
 bool CopyMethod::Fetch(FetchItem *Itm)
 bool CopyMethod::Fetch(FetchItem *Itm)
 {
 {
    URI Get = Itm->Uri;
    URI Get = Itm->Uri;
-   string File = Get.Path;
+   std::string File = Get.Path;
 
 
    // Stat the file and send a start message
    // Stat the file and send a start message
    struct stat Buf;
    struct stat Buf;

+ 3 - 3
methods/file.cc

@@ -40,7 +40,7 @@ class FileMethod : public pkgAcqMethod
 bool FileMethod::Fetch(FetchItem *Itm)
 bool FileMethod::Fetch(FetchItem *Itm)
 {
 {
    URI Get = Itm->Uri;
    URI Get = Itm->Uri;
-   string File = Get.Path;
+   std::string File = Get.Path;
    FetchResult Res;
    FetchResult Res;
    if (Get.Host.empty() == false)
    if (Get.Host.empty() == false)
       return _error->Error(_("Invalid URI, local URIS must not start with //"));
       return _error->Error(_("Invalid URI, local URIS must not start with //"));
@@ -58,10 +58,10 @@ bool FileMethod::Fetch(FetchItem *Itm)
    }
    }
    
    
    // See if we can compute a file without a .gz exentsion
    // See if we can compute a file without a .gz exentsion
-   string::size_type Pos = File.rfind(".gz");
+   std::string::size_type Pos = File.rfind(".gz");
    if (Pos + 3 == File.length())
    if (Pos + 3 == File.length())
    {
    {
-      File = string(File,0,Pos);
+      File = std::string(File,0,Pos);
       if (stat(File.c_str(),&Buf) == 0)
       if (stat(File.c_str(),&Buf) == 0)
       {
       {
 	 FetchResult AltRes;
 	 FetchResult AltRes;

+ 5 - 5
methods/ftp.h

@@ -33,7 +33,7 @@ class FTPConn
    socklen_t ServerAddrLen;
    socklen_t ServerAddrLen;
    
    
    // Private helper functions
    // Private helper functions
-   bool ReadLine(string &Text);      
+   bool ReadLine(std::string &Text);
    bool Login();
    bool Login();
    bool CreateDataFd();
    bool CreateDataFd();
    bool Finalize();
    bool Finalize();
@@ -43,8 +43,8 @@ class FTPConn
    bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
    bool Comp(URI Other) {return Other.Host == ServerName.Host && Other.Port == ServerName.Port && Other.User == ServerName.User && Other.Password == ServerName.Password; };
    
    
    // Raw connection IO
    // Raw connection IO
-   bool ReadResp(unsigned int &Ret,string &Text);
-   bool WriteMsg(unsigned int &Ret,string &Text,const char *Fmt,...);
+   bool ReadResp(unsigned int &Ret,std::string &Text);
+   bool WriteMsg(unsigned int &Ret,std::string &Text,const char *Fmt,...);
    
    
    // Connection control
    // Connection control
    bool Open(pkgAcqMethod *Owner);
    bool Open(pkgAcqMethod *Owner);
@@ -65,11 +65,11 @@ class FTPConn
 class FtpMethod : public pkgAcqMethod
 class FtpMethod : public pkgAcqMethod
 {
 {
    virtual bool Fetch(FetchItem *Itm);
    virtual bool Fetch(FetchItem *Itm);
-   virtual bool Configuration(string Message);
+   virtual bool Configuration(std::string Message);
    
    
    FTPConn *Server;
    FTPConn *Server;
    
    
-   static string FailFile;
+   static std::string FailFile;
    static int FailFd;
    static int FailFd;
    static time_t FailTime;
    static time_t FailTime;
    static void SigTerm(int);
    static void SigTerm(int);

+ 3 - 0
methods/gpgv.cc

@@ -17,6 +17,9 @@
 
 
 #include <apti18n.h>
 #include <apti18n.h>
 
 
+using std::string;
+using std::vector;
+
 #define GNUPGPREFIX "[GNUPG:]"
 #define GNUPGPREFIX "[GNUPG:]"
 #define GNUPGBADSIG "[GNUPG:] BADSIG"
 #define GNUPGBADSIG "[GNUPG:] BADSIG"
 #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY"
 #define GNUPGNOPUBKEY "[GNUPG:] NO_PUBKEY"

+ 1 - 1
methods/gzip.cc

@@ -41,7 +41,7 @@ class GzipMethod : public pkgAcqMethod
 bool GzipMethod::Fetch(FetchItem *Itm)
 bool GzipMethod::Fetch(FetchItem *Itm)
 {
 {
    URI Get = Itm->Uri;
    URI Get = Itm->Uri;
-   string Path = Get.Host + Get.Path; // To account for relative paths
+   std::string Path = Get.Host + Get.Path; // To account for relative paths
    
    
    FetchResult Res;
    FetchResult Res;
    Res.Filename = Itm->DestFile;
    Res.Filename = Itm->DestFile;

+ 9 - 9
methods/http.h

@@ -26,7 +26,7 @@ class CircleBuf
    unsigned long long Size;
    unsigned long long Size;
    unsigned long long InP;
    unsigned long long InP;
    unsigned long long OutP;
    unsigned long long OutP;
-   string OutQueue;
+   std::string OutQueue;
    unsigned long long StrPos;
    unsigned long long StrPos;
    unsigned long long MaxGet;
    unsigned long long MaxGet;
    struct timeval Start;
    struct timeval Start;
@@ -60,11 +60,11 @@ class CircleBuf
    
    
    // Read data in
    // Read data in
    bool Read(int Fd);
    bool Read(int Fd);
-   bool Read(string Data);
+   bool Read(std::string Data);
    
    
    // Write data out
    // Write data out
    bool Write(int Fd);
    bool Write(int Fd);
-   bool WriteTillEl(string &Data,bool Single = false);
+   bool WriteTillEl(std::string &Data,bool Single = false);
    
    
    // Control the write limit
    // Control the write limit
    void Limit(long long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;}   
    void Limit(long long Max) {if (Max == -1) MaxGet = 0-1; else MaxGet = OutP + Max;}   
@@ -99,7 +99,7 @@ struct ServerState
    enum {Chunked,Stream,Closes} Encoding;
    enum {Chunked,Stream,Closes} Encoding;
    enum {Header, Data} State;
    enum {Header, Data} State;
    bool Persistent;
    bool Persistent;
-   string Location;
+   std::string Location;
    
    
    // This is a Persistent attribute of the server itself.
    // This is a Persistent attribute of the server itself.
    bool Pipeline;
    bool Pipeline;
@@ -112,7 +112,7 @@ struct ServerState
    int ServerFd;
    int ServerFd;
    URI ServerName;
    URI ServerName;
   
   
-   bool HeaderLine(string Line);
+   bool HeaderLine(std::string Line);
    bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
    bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
    void Reset() {Major = 0; Minor = 0; Result = 0; Size = 0; StartPos = 0;
    void Reset() {Major = 0; Minor = 0; Result = 0; Size = 0; StartPos = 0;
                  Encoding = Closes; time(&Date); ServerFd = -1; 
                  Encoding = Closes; time(&Date); ServerFd = -1; 
@@ -167,10 +167,10 @@ class HttpMethod : public pkgAcqMethod
    /** \brief Try to AutoDetect the proxy */
    /** \brief Try to AutoDetect the proxy */
    bool AutoDetectProxy();
    bool AutoDetectProxy();
 
 
-   virtual bool Configuration(string Message);
+   virtual bool Configuration(std::string Message);
    
    
    // In the event of a fatal signal this file will be closed and timestamped.
    // In the event of a fatal signal this file will be closed and timestamped.
-   static string FailFile;
+   static std::string FailFile;
    static int FailFd;
    static int FailFd;
    static time_t FailTime;
    static time_t FailTime;
    static void SigTerm(int);
    static void SigTerm(int);
@@ -178,8 +178,8 @@ class HttpMethod : public pkgAcqMethod
    protected:
    protected:
    virtual bool Fetch(FetchItem *);
    virtual bool Fetch(FetchItem *);
    
    
-   string NextURI;
-   string AutoDetectProxyCmd;
+   std::string NextURI;
+   std::string AutoDetectProxyCmd;
 
 
    public:
    public:
    friend struct ServerState;
    friend struct ServerState;

+ 2 - 2
methods/rred.cc

@@ -472,7 +472,7 @@ bool RredMethod::Fetch(FetchItem *Itm)						/*{{{*/
 {
 {
    Debug = _config->FindB("Debug::pkgAcquire::RRed", false);
    Debug = _config->FindB("Debug::pkgAcquire::RRed", false);
    URI Get = Itm->Uri;
    URI Get = Itm->Uri;
-   string Path = Get.Host + Get.Path; // To account for relative paths
+   std::string Path = Get.Host + Get.Path; // To account for relative paths
 
 
    FetchResult Res;
    FetchResult Res;
    Res.Filename = Itm->DestFile;
    Res.Filename = Itm->DestFile;
@@ -525,7 +525,7 @@ bool RredMethod::Fetch(FetchItem *Itm)						/*{{{*/
       and use the access time from the "old" file */
       and use the access time from the "old" file */
    struct stat BufBase, BufPatch;
    struct stat BufBase, BufPatch;
    if (stat(Path.c_str(),&BufBase) != 0 ||
    if (stat(Path.c_str(),&BufBase) != 0 ||
-       stat(string(Path+".ed").c_str(),&BufPatch) != 0)
+       stat(std::string(Path+".ed").c_str(),&BufPatch) != 0)
       return _error->Errno("stat",_("Failed to stat"));
       return _error->Errno("stat",_("Failed to stat"));
 
 
    struct utimbuf TimeBuf;
    struct utimbuf TimeBuf;

+ 9 - 9
methods/rsh.cc

@@ -32,7 +32,7 @@ const char *Prog;
 unsigned long TimeOut = 120;
 unsigned long TimeOut = 120;
 Configuration::Item const *RshOptions = 0;
 Configuration::Item const *RshOptions = 0;
 time_t RSHMethod::FailTime = 0;
 time_t RSHMethod::FailTime = 0;
-string RSHMethod::FailFile;
+std::string RSHMethod::FailFile;
 int RSHMethod::FailFd = -1;
 int RSHMethod::FailFd = -1;
 
 
 // RSHConn::RSHConn - Constructor					/*{{{*/
 // RSHConn::RSHConn - Constructor					/*{{{*/
@@ -85,7 +85,7 @@ bool RSHConn::Open()
 // RSHConn::Connect - Fire up rsh and connect				/*{{{*/
 // RSHConn::Connect - Fire up rsh and connect				/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-bool RSHConn::Connect(string Host, string User)
+bool RSHConn::Connect(std::string Host, std::string User)
 {
 {
    // Create the pipes
    // Create the pipes
    int Pipes[4] = {-1,-1,-1,-1};
    int Pipes[4] = {-1,-1,-1,-1};
@@ -154,7 +154,7 @@ bool RSHConn::Connect(string Host, string User)
 // RSHConn::ReadLine - Very simple buffered read with timeout		/*{{{*/
 // RSHConn::ReadLine - Very simple buffered read with timeout		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* */
 /* */
-bool RSHConn::ReadLine(string &Text)
+bool RSHConn::ReadLine(std::string &Text)
 {
 {
    if (Process == -1 || ReadFd == -1)
    if (Process == -1 || ReadFd == -1)
       return false;
       return false;
@@ -174,7 +174,7 @@ bool RSHConn::ReadLine(string &Text)
             continue;
             continue;
 
 
          I++;
          I++;
-         Text = string(Buffer,I);
+         Text = std::string(Buffer,I);
          memmove(Buffer,Buffer+I,Len - I);
          memmove(Buffer,Buffer+I,Len - I);
          Len -= I;
          Len -= I;
          return true;
          return true;
@@ -205,7 +205,7 @@ bool RSHConn::ReadLine(string &Text)
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
 /* The remote sync flag appends a || echo which will insert blank line
 /* The remote sync flag appends a || echo which will insert blank line
    once the command completes. */
    once the command completes. */
-bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...)
+bool RSHConn::WriteMsg(std::string &Text,bool Sync,const char *Fmt,...)
 {
 {
    va_list args;
    va_list args;
    va_start(args,Fmt);
    va_start(args,Fmt);
@@ -254,7 +254,7 @@ bool RSHConn::WriteMsg(string &Text,bool Sync,const char *Fmt,...)
 bool RSHConn::Size(const char *Path,unsigned long long &Size)
 bool RSHConn::Size(const char *Path,unsigned long long &Size)
 {
 {
    // Query the size
    // Query the size
-   string Msg;
+	std::string Msg;
    Size = 0;
    Size = 0;
 
 
    if (WriteMsg(Msg,true,"find %s -follow -printf '%%s\\n'",Path) == false)
    if (WriteMsg(Msg,true,"find %s -follow -printf '%%s\\n'",Path) == false)
@@ -276,7 +276,7 @@ bool RSHConn::ModTime(const char *Path, time_t &Time)
 {
 {
    Time = time(&Time);
    Time = time(&Time);
    // Query the mod time
    // Query the mod time
-   string Msg;
+   std::string Msg;
 
 
    if (WriteMsg(Msg,true,"TZ=UTC find %s -follow -printf '%%TY%%Tm%%Td%%TH%%TM%%TS\\n'",Path) == false)
    if (WriteMsg(Msg,true,"TZ=UTC find %s -follow -printf '%%TY%%Tm%%Td%%TH%%TM%%TS\\n'",Path) == false)
       return false;
       return false;
@@ -309,7 +309,7 @@ bool RSHConn::Get(const char *Path,FileFd &To,unsigned long long Resume,
    }
    }
    
    
    // FIXME: Detect file-not openable type errors.
    // FIXME: Detect file-not openable type errors.
-   string Jnk;
+   std::string Jnk;
    if (WriteMsg(Jnk,false,"dd if=%s bs=2048 skip=%u", Path, Resume / 2048) == false)
    if (WriteMsg(Jnk,false,"dd if=%s bs=2048 skip=%u", Path, Resume / 2048) == false)
       return false;
       return false;
 
 
@@ -366,7 +366,7 @@ RSHMethod::RSHMethod() : pkgAcqMethod("1.0",SendConfig)
 									/*}}}*/
 									/*}}}*/
 // RSHMethod::Configuration - Handle a configuration message		/*{{{*/
 // RSHMethod::Configuration - Handle a configuration message		/*{{{*/
 // ---------------------------------------------------------------------
 // ---------------------------------------------------------------------
-bool RSHMethod::Configuration(string Message)
+bool RSHMethod::Configuration(std::string Message)
 {
 {
    char ProgStr[100];
    char ProgStr[100];
   
   

+ 5 - 5
methods/rsh.h

@@ -25,15 +25,15 @@ class RSHConn
    URI ServerName;
    URI ServerName;
 
 
    // Private helper functions
    // Private helper functions
-   bool ReadLine(string &Text);
+   bool ReadLine(std::string &Text);
 
 
    public:
    public:
 
 
    pid_t Process;
    pid_t Process;
 
 
    // Raw connection IO
    // Raw connection IO
-   bool WriteMsg(string &Text,bool Sync,const char *Fmt,...);
-   bool Connect(string Host, string User);
+   bool WriteMsg(std::string &Text,bool Sync,const char *Fmt,...);
+   bool Connect(std::string Host, std::string User);
    bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
    bool Comp(URI Other) const {return Other.Host == ServerName.Host && Other.Port == ServerName.Port;};
 
 
    // Connection control
    // Connection control
@@ -53,11 +53,11 @@ class RSHConn
 class RSHMethod : public pkgAcqMethod
 class RSHMethod : public pkgAcqMethod
 {
 {
    virtual bool Fetch(FetchItem *Itm);
    virtual bool Fetch(FetchItem *Itm);
-   virtual bool Configuration(string Message);
+   virtual bool Configuration(std::string Message);
 
 
    RSHConn *Server;
    RSHConn *Server;
 
 
-   static string FailFile;
+   static std::string FailFile;
    static int FailFd;
    static int FailFd;
    static time_t FailTime;
    static time_t FailTime;
    static void SigTerm(int);
    static void SigTerm(int);

+ 3 - 1
test/interactive-helper/test_udevcdrom.cc

@@ -2,12 +2,14 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <assert.h>
 #include <assert.h>
 
 
+#include <vector>
+
 int main()
 int main()
 {
 {
    pkgUdevCdromDevices c;
    pkgUdevCdromDevices c;
    assert(c.Dlopen());
    assert(c.Dlopen());
 
 
-   vector<CdromDevice> l;
+   std::vector<CdromDevice> l;
    l = c.Scan();
    l = c.Scan();
    assert(l.empty() == false);
    assert(l.empty() == false);
    for (size_t i = 0; i < l.size(); ++i)
    for (size_t i = 0; i < l.size(); ++i)

+ 1 - 1
test/libapt/getlistoffilesindir_test.cc

@@ -7,7 +7,7 @@
 #include <stdio.h>
 #include <stdio.h>
 #include <iostream>
 #include <iostream>
 
 
-#define P(x)	string(argv[1]).append("/").append(x)
+#define P(x)	std::string(argv[1]).append("/").append(x)
 
 
 int main(int argc,char *argv[])
 int main(int argc,char *argv[])
 {
 {

+ 1 - 1
test/libapt/hashsums_test.cc

@@ -146,7 +146,7 @@ int main(int argc, char** argv)
    equals(sha2.VerifyFile(argv[1]), true);
    equals(sha2.VerifyFile(argv[1]), true);
    }
    }
    {
    {
-   HashString sha2("SHA256:"+string(argv[4]));
+   HashString sha2("SHA256:" + std::string(argv[4]));
    equals(sha2.VerifyFile(argv[1]), true);
    equals(sha2.VerifyFile(argv[1]), true);
    }
    }
 
 

+ 2 - 2
test/libapt/parsedepends_test.cc

@@ -4,8 +4,8 @@
 #include "assert.h"
 #include "assert.h"
 
 
 int main(int argc,char *argv[]) {
 int main(int argc,char *argv[]) {
-	string Package;
-	string Version;
+	std::string Package;
+	std::string Version;
 	unsigned int Op = 5;
 	unsigned int Op = 5;
 	unsigned int Null = 0;
 	unsigned int Null = 0;
 	bool StripMultiArch = true;
 	bool StripMultiArch = true;

+ 1 - 1
test/libapt/strutil_test.cc

@@ -4,7 +4,7 @@
 
 
 int main(int argc,char *argv[])
 int main(int argc,char *argv[])
 {
 {
-   string input, output, expected;
+   std::string input, output, expected;
 
 
    // no input
    // no input
    input = "foobar";
    input = "foobar";