+static MatchRuleList::ConstIterator
+findMatchRule(const MatchRuleList &matchRules, int revnum, const QString ¤t)
+{
+ MatchRuleList::ConstIterator it = matchRules.constBegin(),
+ end = matchRules.constEnd();
+ for ( ; it != end; ++it) {
+ if (it->minRevision > revnum)
+ continue;
+ if (it->maxRevision != -1 && it->maxRevision < revnum)
+ continue;
+ if (it->rx.indexIn(current) == 0)
+ return it;
+ }
+
+ // no match
+ return end;
+}
+
+