]> git.saurik.com Git - apt.git/commitdiff
Fixed for 0 length source files
authorArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:55 +0000 (16:54 +0000)
committerArch Librarian <arch@canonical.com>
Mon, 20 Sep 2004 16:54:55 +0000 (16:54 +0000)
Author: jgg
Date: 1999-10-18 04:15:24 GMT
Fixed for 0 length source files

apt-pkg/deb/debsrcrecords.h
apt-pkg/srcrecords.cc
cmdline/apt-cache.cc

index e09a57f3cae555d3513027578beb52457832db74..50488d4b6de1138fec2318a8bc0542b5be2a9c2b 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: debsrcrecords.h,v 1.4 1999/10/18 03:44:39 jgg Exp $
+// $Id: debsrcrecords.h,v 1.5 1999/10/18 04:15:25 jgg Exp $
 /* ######################################################################
    
    Debian Source Package Records - Parser implementation for Debian style
@@ -38,10 +38,9 @@ class debSrcRecordParser : public pkgSrcRecords::Parser
    virtual string Section() {return Sect.FindS("Section");};
    virtual const char **Binaries();
    virtual unsigned long Offset() {return iOffset;};
-   virtual unsigned long Length() {return Sec.size();};
    virtual string AsStr() 
    {
-      const char *Start,Stop;
+      const char *Start=0,*Stop=0;
       Sect.GetSection(Start,Stop);
       return string(Start,Stop);
    };
index 23d3a5fc018fc97c412f3b21b123f23474fdeb99..6da902d986f20e930a4587543099d3b1cfa3b566 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: srcrecords.cc,v 1.2 1999/04/07 05:30:18 jgg Exp $
+// $Id: srcrecords.cc,v 1.3 1999/10/18 04:15:24 jgg Exp $
 /* ######################################################################
    
    Source Package Records - Allows access to source package records
@@ -66,7 +66,7 @@ pkgSrcRecords::pkgSrcRecords(pkgSourceList &List) : Files(0), Current(0)
       Files[Count] = new debSrcRecordParser(FD,I);
       Count++;
    }
-   
+
    Restart();
 }
                                                                        /*}}}*/
@@ -90,8 +90,8 @@ bool pkgSrcRecords::Restart()
 {
    Current = Files;
    for (Parser **I = Files; *I != 0; I++)
-      if ((*I)->Restart() == false)
-        return false;
+      (*I)->Restart();
+   
    return true;
 }
                                                                        /*}}}*/
index 5bb9db7ccf0f7fa7fb7a4f8133c4c77af0ed059b..8dc56a72b5763a6502c32cbf3747e25fa771e4eb 100644 (file)
@@ -1,6 +1,6 @@
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
-// $Id: apt-cache.cc,v 1.39 1999/10/18 03:44:39 jgg Exp $
+// $Id: apt-cache.cc,v 1.40 1999/10/18 04:15:25 jgg Exp $
 /* ######################################################################
    
    apt-cache - Manages the cache files
@@ -613,6 +613,8 @@ bool ShowSrcPackage(CommandLine &CmdL)
 
    for (const char **I = CmdL.FileList + 1; *I != 0; I++)
    {
+      SrcRecs.Restart();
+      
       pkgSrcRecords::Parser *Parse;
       while ((Parse = SrcRecs.Find(*I,false)) != 0)
         cout << Parse->AsStr();