]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/cachefilter.cc
add basic "edit-sources" command
[apt.git] / apt-pkg / cachefilter.cc
index 64cde41d18526a468a4b85ef011a18f17af77a3c..57b9af15987e1a4bebe02a80dfc03ac57ef5f1b7 100644 (file)
@@ -55,6 +55,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 <kernel>-<cpu> tuple                                        /*{{{*/
 //----------------------------------------------------------------------
 /* The complete architecture, consisting of <kernel>-<cpu>. */