const nsSubstring& aValue, nsIVersionChecker* aChecker,
const nsSubstring& aValue, nsIVersionComparator* aChecker,
CheckVersionFlag(const nsSubstring& aFlag, const nsSubstring& aData,                 const nsSubstring& aValue, nsIVersionChecker* aChecker,                 TriState& aResult){  if (! (aData.Length() > aFlag.Length() + 2))    return PR_FALSE;  if (!StringBeginsWith(aData, aFlag))    return PR_FALSE;  PRUint32 comparison;  nsAutoString testdata;  switch (aData[aFlag.Length()]) {  case '=':    comparison = COMPARE_EQ;    testdata = Substring(aData, aFlag.Length() + 1);    break;  case '<':    if (aData[aFlag.Length() + 1] == '=') {      comparison = COMPARE_EQ | COMPARE_LT;      testdata = Substring(aData, aFlag.Length() + 2);    }    else {      comparison = COMPARE_LT;      testdata = Substring(aData, aFlag.Length() + 1);    }    break;  case '>':    if (aData[aFlag.Length() + 1] == '=') {      comparison = COMPARE_EQ | COMPARE_GT;      testdata = Substring(aData, aFlag.Length() + 2);    }    else {      comparison = COMPARE_GT;      testdata = Substring(aData, aFlag.Length() + 1);    }    break;  default:    return PR_FALSE;  }  if (aResult != eOK) {    if (!aChecker) {      aResult = eBad;    }    else {      PRInt32 c;      nsresult rv = aChecker->Compare(aValue, testdata, &c);      if (NS_FAILED(rv)) {        aResult = eBad;      }      else {        if ((c == 0 && comparison & COMPARE_EQ) ||            (c < 0 && comparison & COMPARE_LT) ||            (c > 0 && comparison & COMPARE_GT))          aResult = eOK;        else          aResult = eBad;      }    }  }  return PR_TRUE;}