~ubuntu-branches/debian/experimental/apt/experimental

« back to all changes in this revision

Viewing changes to apt-pkg/tagfile.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2010-02-18 22:07:23 UTC
  • mfrom: (9.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100218220723-zb7zdh6fmsmp30tr
Tags: 0.7.26~exp2
fix crash when LANGUAGE is not set

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#define PKGLIB_TAGFILE_H
22
22
 
23
23
 
24
 
#include <apt-pkg/contrib/fileutl.h>
 
24
#include <apt-pkg/fileutl.h>
25
25
#include <stdio.h>
26
26
    
27
27
class pkgTagSection
28
28
{
29
29
   const char *Section;
30
 
   const char *Stop;
31
30
   
32
31
   // We have a limit of 256 tags per section.
33
32
   unsigned int Indexes[256];
35
34
   
36
35
   unsigned int TagCount;
37
36
     
 
37
   protected:
 
38
   const char *Stop;
 
39
 
38
40
   public:
39
41
   
40
42
   inline bool operator ==(const pkgTagSection &rhs) {return Section == rhs.Section;};
49
51
   bool Scan(const char *Start,unsigned long MaxLength);
50
52
   inline unsigned long size() const {return Stop - Section;};
51
53
   void Trim();
 
54
   virtual void TrimRecord(bool BeforeRecord, const char* &End);
52
55
   
53
56
   inline unsigned int Count() const {return TagCount;};
54
57
   inline void Get(const char *&Start,const char *&Stop,unsigned int I) const