X-Git-Url: https://git.saurik.com/apt.git/blobdiff_plain/afd7b358f94efddb83a2911ec1a21e7280074b1e..f7feb041e8d8dac5fac3c6cd44c8108e12ea4cd6:/apt-pkg/versionmatch.cc diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc index f336b3c35..284098bdf 100644 --- a/apt-pkg/versionmatch.cc +++ b/apt-pkg/versionmatch.cc @@ -16,14 +16,21 @@ #include #include #include +#include +#include +#include +#include +#include +#include #include #include #include -#include #include /*}}}*/ +using std::string; + // VersionMatch::pkgVersionMatch - Constructor /*{{{*/ // --------------------------------------------------------------------- /* Break up the data string according to the selected type */ @@ -179,9 +186,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg) bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string) { if (pattern[0] == '/') { - bool res = false; size_t length = strlen(pattern); if (pattern[length - 1] == '/') { + bool res = false; regex_t preg; char *regex = strdup(pattern + 1); regex[length - 2] = '\0';