Author: dmacvicar Date: Fri Aug 10 16:08:37 2007 New Revision: 6599 URL: http://svn.opensuse.org/viewcvs/zypp?rev=6599&view=rev Log: unify on regex_match(), remove regex_search Modified: trunk/libzypp/zypp/KeyRing.cc trunk/libzypp/zypp/base/Regex.cc trunk/libzypp/zypp/base/Regex.h Modified: trunk/libzypp/zypp/KeyRing.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/KeyRing.cc?rev=6599&... ============================================================================== --- trunk/libzypp/zypp/KeyRing.cc (original) +++ trunk/libzypp/zypp/KeyRing.cc Fri Aug 10 16:08:37 2007 @@ -568,7 +568,7 @@ { //MIL << "[" << line << "]" << endl; str::smatch what; - if(str::regex_search(line, what, rxNoKey)) + if(str::regex_match(line, what, rxNoKey)) { if ( what.size() >= 1 ) id = what[1]; Modified: trunk/libzypp/zypp/base/Regex.cc URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/Regex.cc?rev=65... ============================================================================== --- trunk/libzypp/zypp/base/Regex.cc (original) +++ trunk/libzypp/zypp/base/Regex.cc Fri Aug 10 16:08:37 2007 @@ -44,14 +44,6 @@ return !regexec(®ex.m_preg, s.c_str(), 0, NULL, 0); } -bool zypp::str::regex_search(const std::string& s, smatch& matches, const regex& regex) -{ - bool r= regex.m_valid && !regexec(®ex.m_preg, s.c_str(), 12, &matches.pmatch[0], 0); - if (r) - matches.match_str = s; - return r; -} - smatch::smatch() { memset(&pmatch, -1, sizeof(pmatch)); Modified: trunk/libzypp/zypp/base/Regex.h URL: http://svn.opensuse.org/viewcvs/zypp/trunk/libzypp/zypp/base/Regex.h?rev=659... ============================================================================== --- trunk/libzypp/zypp/base/Regex.h (original) +++ trunk/libzypp/zypp/base/Regex.h Fri Aug 10 16:08:37 2007 @@ -61,7 +61,6 @@ bool regex_match(const std::string& s, str::smatch& matches, const regex& regex); bool regex_match(const std::string& s, const regex& regex); - bool regex_search(const std::string& s, str::smatch& matches, const regex& regex); ///////////////////////////////////////////////////////////////// } // namespace str -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org