Browse Source

Fixed for 0 length source files

Author: jgg
Date: 1999-10-18 04:15:24 GMT
Fixed for 0 length source files
debian/1.8.y
Arch Librarian 18 years ago
parent
commit
aaee82939a
  1. 5
      apt-pkg/deb/debsrcrecords.h
  2. 8
      apt-pkg/srcrecords.cc
  3. 4
      cmdline/apt-cache.cc

5
apt-pkg/deb/debsrcrecords.h

@ -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);
};

8
apt-pkg/srcrecords.cc

@ -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;
}
/*}}}*/

4
cmdline/apt-cache.cc

@ -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();

Loading…
Cancel
Save