#ifndef PKGLIB_TAGFILE_H
#define PKGLIB_TAGFILE_H
-#ifdef __GNUG__
-#pragma interface "apt-pkg/tagfile.h"
-#endif
+#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 short Indexes[256];
- unsigned short AlphaIndexes[0x100];
+ unsigned int Indexes[256];
+ unsigned int AlphaIndexes[0x100];
unsigned int TagCount;
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
char *End;
bool Done;
unsigned long iOffset;
- unsigned long Size;
+ MMap *Map;
bool Fill();
- bool Resize();
public: