pos=mFilename.RFind("/mozilla/")+1;
pos=filename.Find("mozilla/");
  void OutputMozillaFilename(ostream& anOutput) {    mFilename.ReplaceChar('\\','/');    PRInt32 pos=mFilename.RFind("/") + 1;    nsCAutoString entries,repository;    {      nsCAutoString cvsbase(        Substring(mFilename, 0, pos) +        NS_LITERAL_CSTRING("CVS/")      );      entries=cvsbase+NS_LITERAL_CSTRING("Entries");      repository=cvsbase+NS_LITERAL_CSTRING("Repository");    }    nsCAutoString filename(      Substring(mFilename, pos)    );    char cvspath[1024], cvsfilename[256], version[10], prefix;    bool found = false;    {      fstream cvsrecord (entries.get(),ios::in);      while (!cvsrecord.eof()) {        cvsrecord.get(prefix);        if (prefix=='/') {          cvsrecord.getline(cvsfilename,sizeof cvsfilename, '/');          if (found = !strcmp(filename.get(), cvsfilename))            break;        }        cvsrecord.ignore(256,'\n');      }      if (found)        cvsrecord.getline(version,sizeof version, '/');    }    {      fstream cvsrecord (repository.get(),ios::in);      cvsrecord.getline(cvspath,sizeof cvspath);      if (cvspath[0])        filename =          NS_LITERAL_CSTRING("/") +          nsDependentCString(cvspath) +           NS_LITERAL_CSTRING("/") +           filename;      else        filename = mFilename;    }    pos=mFilename.RFind("/mozilla/")+1;    const char* buf=filename.get();    if(-1<pos) {      buf+=pos+(found?0:8);      if(gEmitHTML) {        anOutput << "<br><a href=\"" ;        if (found)          anOutput            << "http://bonsai.mozilla.org/cvsblame.cgi?file="            << buf            << "&rev="            << version            << "&mark="            << mLineNumber            << "#"            << mLineNumber - 5;        else          anOutput            << "http://lxr.mozilla.org/mozilla/source/"            << buf            << "#"            << mLineNumber;        cout << "\">";        }      cout << buf << ":" << mLineNumber;      if(gEmitHTML) {        cout << "</a>";      }    }    else {      anOutput << buf;    }  }