// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debrecords.cc,v 1.4 1999/01/27 02:48:53 jgg Exp $
+// $Id: debrecords.cc,v 1.5 1999/02/22 03:30:06 jgg Exp $
/* ######################################################################
Debian Package Records - Parser for debian package records
// RecordParser::debRecordParser - Constructor /*{{{*/
// ---------------------------------------------------------------------
/* */
-debRecordParser::debRecordParser(FileFd &File) : Tags(File,4*1024)
+debRecordParser::debRecordParser(FileFd &File,pkgCache &Cache) :
+ Tags(File,Cache.Head().MaxVerFileSize + 20)
{
}
/*}}}*/
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: debrecords.h,v 1.3 1998/11/13 04:23:38 jgg Exp $
+// $Id: debrecords.h,v 1.4 1999/02/22 03:30:06 jgg Exp $
/* ######################################################################
Debian Package Records - Parser for debian package records
virtual string ShortDesc();
virtual string LongDesc();
- debRecordParser(FileFd &File);
+ debRecordParser(FileFd &File,pkgCache &Cache);
};
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: pkgrecords.cc,v 1.4 1998/11/13 04:23:34 jgg Exp $
+// $Id: pkgrecords.cc,v 1.5 1999/02/22 03:30:06 jgg Exp $
/* ######################################################################
Package Records - Allows access to complete package description records
return;
// Create the parser
- Files[I->ID].Parse = new debRecordParser(*Files[I->ID].File);
+ Files[I->ID].Parse = new debRecordParser(*Files[I->ID].File,Cache);
if (_error->PendingError() == true)
return;
}
// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: tagfile.cc,v 1.23 1999/02/21 08:38:53 jgg Exp $
+// $Id: tagfile.cc,v 1.24 1999/02/22 03:30:06 jgg Exp $
/* ######################################################################
Fast scanner for RFC-822 type header information
return false;
if (Tag.Scan(Start,End - Start) == false)
+ {
+ cout << string(Start,End) << endl;
return _error->Error("Unable to parse package file %s (2)",Fd.Name().c_str());
-
+ }
+
return true;
}
/*}}}*/
// Strip off the gunk from the start end
Start = C;
End = Section + Indexes[I+1];
+ if (Start >= End)
+ return _error->Error("Internal parsing error");
+
for (; (isspace(*Start) != 0 || *Start == ':') && Start < End; Start++);
for (; isspace(End[-1]) != 0 && End > Start; End--);
-
+
return true;
}
return true;
}
/*}}}*/
-
-