diff options
-rw-r--r-- | apt-pkg/deb/debrecords.cc | 24 | ||||
-rw-r--r-- | apt-pkg/deb/debrecords.h | 4 | ||||
-rw-r--r-- | cmdline/apt-cache.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-cdrom.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-config.cc | 4 | ||||
-rw-r--r-- | cmdline/apt-get.cc | 4 | ||||
-rw-r--r-- | test/makefile | 6 |
7 files changed, 21 insertions, 29 deletions
diff --git a/apt-pkg/deb/debrecords.cc b/apt-pkg/deb/debrecords.cc index b3f91a840..a2005914d 100644 --- a/apt-pkg/deb/debrecords.cc +++ b/apt-pkg/deb/debrecords.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debrecords.cc,v 1.5 1999/02/22 03:30:06 jgg Exp $ +// $Id: debrecords.cc,v 1.6 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### Debian Package Records - Parser for debian package records @@ -31,24 +31,12 @@ bool debRecordParser::Jump(pkgCache::VerFileIterator const &Ver) return Tags.Jump(Section,Ver->Offset); } /*}}}*/ -// RecordParser::FindTag - Locate a tag and return a string /*{{{*/ -// --------------------------------------------------------------------- -/* */ -string debRecordParser::FindTag(const char *Tag) -{ - const char *Start; - const char *Stop; - if (Section.Find(Tag,Start,Stop) == false) - return string(); - return string(Start,Stop - Start); -} - /*}}}*/ // RecordParser::FileName - Return the archive filename on the site /*{{{*/ // --------------------------------------------------------------------- /* */ string debRecordParser::FileName() { - return FindTag("Filename"); + return Section.FindS("Filename"); } /*}}}*/ // RecordParser::MD5Hash - Return the archive hash /*{{{*/ @@ -56,7 +44,7 @@ string debRecordParser::FileName() /* */ string debRecordParser::MD5Hash() { - return FindTag("MD5sum"); + return Section.FindS("MD5sum"); } /*}}}*/ // RecordParser::Maintainer - Return the maintainer email /*{{{*/ @@ -64,7 +52,7 @@ string debRecordParser::MD5Hash() /* */ string debRecordParser::Maintainer() { - return FindTag("Maintainer"); + return Section.FindS("Maintainer"); } /*}}}*/ // RecordParser::ShortDesc - Return a 1 line description /*{{{*/ @@ -72,7 +60,7 @@ string debRecordParser::Maintainer() /* */ string debRecordParser::ShortDesc() { - string Res = FindTag("Description"); + string Res = Section.FindS("Description"); string::size_type Pos = Res.find('\n'); if (Pos == string::npos) return Res; @@ -84,6 +72,6 @@ string debRecordParser::ShortDesc() /* */ string debRecordParser::LongDesc() { - return FindTag("Description"); + return Section.FindS("Description"); } /*}}}*/ diff --git a/apt-pkg/deb/debrecords.h b/apt-pkg/deb/debrecords.h index 0c204492a..b91d07092 100644 --- a/apt-pkg/deb/debrecords.h +++ b/apt-pkg/deb/debrecords.h @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: debrecords.h,v 1.4 1999/02/22 03:30:06 jgg Exp $ +// $Id: debrecords.h,v 1.5 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### Debian Package Records - Parser for debian package records @@ -27,8 +27,6 @@ class debRecordParser : public pkgRecords::Parser pkgTagFile Tags; pkgTagSection Section; - string FindTag(const char *Tag); - protected: virtual bool Jump(pkgCache::VerFileIterator const &Ver); diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc index 31247f205..75f9f455e 100644 --- a/cmdline/apt-cache.cc +++ b/cmdline/apt-cache.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cache.cc,v 1.31 1999/03/27 01:30:38 jgg Exp $ +// $Id: apt-cache.cc,v 1.32 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### apt-cache - Manages the cache files @@ -616,7 +616,7 @@ bool ShowHelp(CommandLine &Cmd) cout << " -q Disable progress indicator." << endl; cout << " -i Show only important deps for the unmet command." << endl; cout << " -c=? Read this configuration file" << endl; - cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl; + cout << " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" << endl; cout << "See the apt-cache(8) and apt.conf(5) manual pages for more information." << endl; return 100; } diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc index 459e4a48d..cd95eafee 100644 --- a/cmdline/apt-cdrom.cc +++ b/cmdline/apt-cdrom.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-cdrom.cc,v 1.18 1999/03/27 01:30:38 jgg Exp $ +// $Id: apt-cdrom.cc,v 1.19 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### APT CDROM - Tool for handling APT's CDROM database. @@ -986,7 +986,7 @@ int ShowHelp() cout << " -f Fast mode, don't check package files" << endl; cout << " -a Thorough scan mode" << endl; cout << " -c=? Read this configuration file" << endl; - cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl; + cout << " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" << endl; cout << "See fstab(5)" << endl; return 100; } diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc index b1b134d97..3a2a4d9ca 100644 --- a/cmdline/apt-config.cc +++ b/cmdline/apt-config.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-config.cc,v 1.3 1999/01/30 02:12:53 jgg Exp $ +// $Id: apt-config.cc,v 1.4 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### APT Config - Program to manipulate APT configuration files @@ -60,7 +60,7 @@ int ShowHelp() cout << "Options:" << endl; cout << " -h This help text." << endl; cout << " -c=? Read this configuration file" << endl; - cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl; + cout << " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" << endl; return 100; } /*}}}*/ diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index 73397e8ae..859f113f1 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: apt-get.cc,v 1.47 1999/03/27 03:02:39 jgg Exp $ +// $Id: apt-get.cc,v 1.48 1999/03/29 19:28:52 jgg Exp $ /* ###################################################################### apt-get - Cover for dpkg @@ -1122,7 +1122,7 @@ bool ShowHelp(CommandLine &CmdL) cout << " -m Attempt to continue if archives are unlocatable" << endl; cout << " -u Show a list of upgraded packages as well" << endl; cout << " -c=? Read this configuration file" << endl; - cout << " -o=? Set an arbitary configuration option, ie -o dir::cache=/tmp" << endl; + cout << " -o=? Set an arbitary configuration option, eg -o dir::cache=/tmp" << endl; cout << "See the apt-get(8), sources.list(5) and apt.conf(5) manual" << endl; cout << "pages for more information." << endl; return 100; diff --git a/test/makefile b/test/makefile index c12e05f1f..eae6230d0 100644 --- a/test/makefile +++ b/test/makefile @@ -22,3 +22,9 @@ PROGRAM=versiontest SLIBS = -lapt-pkg SOURCE = versiontest.cc include $(PROGRAM_H) + +# Version compare tester +PROGRAM=srcrfind +SLIBS = -lapt-pkg +SOURCE = srcrfind.cc +include $(PROGRAM_H) |