NS_LITERAL_CSTRING("resource:/res/fonts/mathfont.properties"));
NS_LITERAL_CSTRING("resource:
InitOperators(void){  // Load the property file containing the Operator Dictionary  nsresult rv;  nsCOMPtr<nsIPersistentProperties> mathfontProp;  rv = NS_LoadPersistentPropertiesFromURISpec(getter_AddRefs(mathfontProp),       NS_LITERAL_CSTRING("resource:/res/fonts/mathfont.properties"));  if NS_FAILED(rv) return rv;  // Get the list of invariant chars  for (PRInt32 i = 0; i < nsMathMLOperators::eMATHVARIANT_COUNT; ++i) {    nsCAutoString key(NS_LITERAL_CSTRING("mathvariant."));    key.Append(kMathVariant_name[i]);    nsAutoString value;    mathfontProp->GetStringProperty(key, value);    gInvariantCharArray->AppendString(value); // i.e., gInvariantCharArray[i] holds this list  }  // Parse the Operator Dictionary in two passes.  // The first pass is to count the number of operators; the second pass is to  // allocate the necessary space for them and to add them in the hash table.  for (PRInt32 pass = 1; pass <= 2; pass++) {    OperatorData dummyData;    OperatorData* operatorData = &dummyData;    nsCOMPtr<nsISimpleEnumerator> iterator;    if (NS_SUCCEEDED(mathfontProp->Enumerate(getter_AddRefs(iterator)))) {      PRBool more;      PRInt32 index = 0;      nsCAutoString name;      nsAutoString attributes;      while ((NS_SUCCEEDED(iterator->HasMoreElements(&more))) && more) {        nsCOMPtr<nsIPropertyElement> element;        if (NS_SUCCEEDED(iterator->GetNext(getter_AddRefs(element)))) {          if (NS_SUCCEEDED(element->GetKey(name)) &&              NS_SUCCEEDED(element->GetValue(attributes))) {            // expected key: operator.\uNNNN.{infix,postfix,prefix}            if ((21 <= name.Length()) && (0 == name.Find("operator.\\u"))) {              name.Cut(0, 9); // 9 is the length of "operator.";              PRInt32 len = name.Length();              nsOperatorFlags form = 0;              if (kNotFound != name.RFind(".infix")) {                form = NS_MATHML_OPERATOR_FORM_INFIX;                len -= 6;  // 6 is the length of ".infix";              }              else if (kNotFound != name.RFind(".postfix")) {                form = NS_MATHML_OPERATOR_FORM_POSTFIX;                len -= 8; // 8 is the length of ".postfix";              }              else if (kNotFound != name.RFind(".prefix")) {                form = NS_MATHML_OPERATOR_FORM_PREFIX;                len -= 7; // 7 is the length of ".prefix";              }              else continue; // input is not applicable              name.SetLength(len);              if (2 == pass) { // allocate space and start the storage                if (!gOperatorArray) {                  if (0 == gOperatorCount) return NS_ERROR_UNEXPECTED;                  gOperatorArray = new OperatorData[gOperatorCount];                  if (!gOperatorArray) return NS_ERROR_OUT_OF_MEMORY;                }                operatorData = &gOperatorArray[index];              }              else {                form = 0; // to quickly return from SetOperator() at pass 1              }              // See if the operator should be retained              if (SetOperator(operatorData, form, name, attributes)) {                index++;                if (1 == pass) gOperatorCount = index;              }            }          }        }      }    }  }  return NS_OK;}