// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.cc,v 1.33 2002/05/30 04:19:48 jgg Exp $
+// $Id: tagfile.cc,v 1.37.2.2 2003/12/31 16:02:30 mdz Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
// TagFile::pkgTagFile - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) : Fd(*pFd), Size(Size)
+pkgTagFile::pkgTagFile(FileFd *pFd,unsigned long Size) :
+ Fd(*pFd),
+ Size(Size)
{
if (Fd.IsOpen() == false)
{
if (Tag.Scan(Start,End - Start) == false)
return _error->Error(_("Unable to parse package file %s (1)"),
Fd.Name().c_str());
- }
+ }
Start += Tag.size();
iOffset += Tag.size();
bool pkgTagFile::Fill()
{
unsigned long EndSize = End - Start;
- unsigned long Actual;
+ unsigned long Actual = 0;
memmove(Buffer,Start,EndSize);
Start = Buffer;
if (Stop == 0)
return false;
- for (; Stop+1 < End && Stop[1] == '\r'; Stop++);
+ for (; Stop+1 < End && Stop[1] == '\r'; Stop++);
// Double newline marks the end of the record
if (Stop+1 < End && Stop[1] == '\n')