]> git.saurik.com Git - apt-legacy.git/blobdiff - apt-pkg/tagfile.h
Fix compilation of http when embedding into Cydia.
[apt-legacy.git] / apt-pkg / tagfile.h
index 6536932ddbc4a2a7ded65eacd008fce845d44bf7..ba42c73d9e0425821c4c344ef055cca5f07ae38c 100644 (file)
 #define PKGLIB_TAGFILE_H
 
 
+#include <apt-pkg/mmap.h>
 #include <apt-pkg/fileutl.h>
 #include <stdio.h>
     
 class pkgTagSection
 {
    const char *Section;
+   
+   protected:
    const char *Stop;
    
+   private:
    // We have a limit of 256 tags per section.
    unsigned int Indexes[256];
    unsigned int AlphaIndexes[0x100];
@@ -49,6 +53,7 @@ class pkgTagSection
    bool Scan(const char *Start,unsigned long MaxLength);
    inline unsigned long size() const {return Stop - Section;};
    void Trim();
+   void TrimRecord(bool BeforeRecord, const char* &End);
    
    inline unsigned int Count() const {return TagCount;};
    inline void Get(const char *&Start,const char *&Stop,unsigned int I) const
@@ -71,10 +76,9 @@ class pkgTagFile
    char *End;
    bool Done;
    unsigned long iOffset;
-   unsigned long Size;
+   MMap *Map;
 
    bool Fill();
-   bool Resize();
 
    public: