]> git.saurik.com Git - apt.git/commitdiff
More tagfile accessors
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:44 +0000 (16:51 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:51:44 +0000 (16:51 +0000)
Author: jgg
Date: 1998-11-28 03:54:29 GMT
More tagfile accessors

apt-pkg/tagfile.cc
apt-pkg/tagfile.h

index a55d5214a86bd6356ee09dcca30f0b058172b9d6..9a7c9734d3bc1855fe92f1e5f711c402d04a124d 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: tagfile.cc,v 1.15 1998/11/27 01:14:06 jgg Exp $
+// $Id: tagfile.cc,v 1.16 1998/11/28 03:54:29 jgg Exp $
 /* ######################################################################
 
    Fast scanner for RFC-822 type header information
@@ -180,7 +180,7 @@ bool pkgTagSection::Find(const char *Tag,const char *&Start,
    return false;
 }
                                                                        /*}}}*/
-// pkgTagSection::FindS - Find a string                                        /*{{{*/
+// TagSection::FindS - Find a string                                   /*{{{*/
 // ---------------------------------------------------------------------
 /* */
 string pkgTagSection::FindS(const char *Tag)
@@ -205,3 +205,4 @@ unsigned int pkgTagSection::FindI(const char *Tag)
    return atoi(string(Start,End).c_str());
 }
                                                                        /*}}}*/
+                                 
index 7782b54f94518adcc7842b12bebf0f4a7016e6a8..a18888198cfd75fb5ca7bd66ca6fe28e945bfcc9 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.11 1998/11/28 03:54:31 jgg Exp $
 /* ######################################################################
 
    Fast scanner for RFC-822 type header information
@@ -46,7 +46,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;