X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/3444603f5ff2b4c4816e45e686e06e01df31cdc4..b6fea8bbe25e3c0312de72c99b0d49c699d02b7b:/apt-pkg/cachefilter.cc diff --git a/apt-pkg/cachefilter.cc b/apt-pkg/cachefilter.cc index 64cde41d1..e388f2450 100644 --- a/apt-pkg/cachefilter.cc +++ b/apt-pkg/cachefilter.cc @@ -9,10 +9,12 @@ #include #include #include +#include #include +#include #include - +#include #include #include @@ -55,6 +57,17 @@ PackageNameMatchesRegEx::~PackageNameMatchesRegEx() { /*{{{*/ } /*}}}*/ +// Fnmatch support /*{{{*/ +//---------------------------------------------------------------------- +bool PackageNameMatchesFnmatch::operator() (pkgCache::PkgIterator const &Pkg) {/*{{{*/ + return fnmatch(Pattern.c_str(), Pkg.Name(), FNM_CASEFOLD) == 0; +} + /*}}}*/ +bool PackageNameMatchesFnmatch::operator() (pkgCache::GrpIterator const &Grp) {/*{{{*/ + return fnmatch(Pattern.c_str(), Grp.Name(), FNM_CASEFOLD) == 0; +} + /*}}}*/ + // CompleteArch to - tuple /*{{{*/ //---------------------------------------------------------------------- /* The complete architecture, consisting of -. */