Hello,

I'm including one patch to change the current tagfile.cc code to
include backward compatibility interface with all uses of
pkgTagSection.Scan(...).

Index: apt-pkg/tagfile.cc
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/tagfile.cc,v
retrieving revision 1.36
diff -u -r1.36 tagfile.cc
--- apt-pkg/tagfile.cc  27 Apr 2003 05:59:14 -0000      1.36
+++ apt-pkg/tagfile.cc  14 May 2003 19:33:01 -0000
@@ -63,13 +63,13 @@
 /* If the Section Scanner fails we refill the buffer and try again. */
 bool pkgTagFile::Step(pkgTagSection &Tag)
 {
-   pkgTagSection::ScanFlags ret = Tag.Scan(Start,End - Start);
+   pkgTagSection::ScanFlags ret = Tag.Scan_detail(Start,End - Start);
    if (ret == pkgTagSection::ScanEOF) {
       CurSize <<= 1;
       if (Fill() == false)
         return false;
       do {
-          ret = Tag.Scan(Start,End - Start);
+          ret = Tag.Scan_detail(Start,End - Start);
           if (ret == pkgTagSection::ScanEOF) {
              CurSize <<= 1;
              if (Fill() == false)
@@ -156,13 +156,13 @@
    if (Fill() == false)
       return false;
 
-   pkgTagSection::ScanFlags ret = Tag.Scan(Start,End - Start);
+   pkgTagSection::ScanFlags ret = Tag.Scan_detail(Start,End - Start);
    if (ret == pkgTagSection::ScanEOF) {
       CurSize <<= 1;
       if (Fill() == false)
         return false;
       do {
-          ret = Tag.Scan(Start,End - Start);
+          ret = Tag.Scan_detail(Start,End - Start);
           if (ret == pkgTagSection::ScanEOF) {
              CurSize <<= 1;
              if (Fill() == false)
@@ -189,7 +189,7 @@
    return Res & 0xFF;
 }
 
-enum pkgTagSection::ScanFlags pkgTagSection::Scan(const char *Start,unsigned 
long MaxLength)
+enum pkgTagSection::ScanFlags pkgTagSection::Scan_detail(const char 
*Start,unsigned long MaxLength)
 {
    const char *End = Start + MaxLength;
    Stop = Section = Start;
Index: apt-pkg/tagfile.h
===================================================================
RCS file: /cvs/deity/apt/apt-pkg/tagfile.h,v
retrieving revision 1.19
diff -u -r1.19 tagfile.h
--- apt-pkg/tagfile.h   27 Apr 2003 05:59:14 -0000      1.19
+++ apt-pkg/tagfile.h   14 May 2003 19:33:01 -0000
@@ -50,7 +50,8 @@
    signed int FindI(const char *Tag,signed long Default = 0) const ;
    bool FindFlag(const char *Tag,unsigned long &Flags,
                 unsigned long Flag) const;
-   enum ScanFlags Scan(const char *Start,unsigned long MaxLength);
+   inline bool Scan(const char *Start,unsigned long MaxLength) { return 
Scan_detail(Start,MaxLength) == ScanSuccess; };
+   enum ScanFlags Scan_detail(const char *Start,unsigned long MaxLength);
    inline unsigned long size() const {return Stop - Section;};
    void Trim();
    
TIA,
Otavio

-- 
        O T A V I O    S A L V A D O R
---------------------------------------------
 E-mail: [EMAIL PROTECTED]      UIN: 5906116
 GNU/Linux User: 239058     GPG ID: 49A5F855
 Home Page: http://www.freedom.ind.br/otavio
---------------------------------------------

Reply via email to