]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/tagfile.h
oops
[apt.git] / apt-pkg / tagfile.h
index 7782b54f94518adcc7842b12bebf0f4a7016e6a8..83dd73d2a79be9355a7df8dc66fd8e15fa812fa2 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: tagfile.h,v 1.10 1998/11/27 01:14:07 jgg Exp $
+// $Id: tagfile.h,v 1.12 1998/12/07 07:26:23 jgg Exp $
 /* ######################################################################
 
    Fast scanner for RFC-822 type header information
@@ -34,6 +34,8 @@ class pkgTagSection
    
    // We have a limit of 256 tags per section.
    unsigned short Indexes[256];
+   unsigned short AlphaIndexes[26 + 26*26];
+   
    unsigned int TagCount;
      
    public:
@@ -46,7 +48,11 @@ class pkgTagSection
    unsigned int FindI(const char *Tag);   
    bool Scan(const char *Start,unsigned long MaxLength);
    inline unsigned long size() {return Stop - Section;};
-   
+
+   inline unsigned int Count() {return TagCount;};
+   inline void Get(const char *&Start,const char *&Stop,unsigned int I)
+                   {Start = Section + Indexes[I]; Stop = Section + Indexes[I+1];}
+           
    inline void GetSection(const char *&Start,const char *&Stop)
    {
       Start = Section;