PRInt32 pos=mFilename.Find("mozilla"); const char* buf=mFilename.GetBuffer();
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();
  void OutputMozillaFilename(ostream& anOutput) {        PRInt32 pos=mFilename.Find("mozilla");    const char* buf=mFilename.GetBuffer();    if(-1<pos) {      buf+=pos+8;        if(gEmitHTML) {        anOutput << "<br><a href=\"" ;              anOutput << "http://lxr.mozilla.org/mozilla/source/";        anOutput << buf << "#" << mLineNumber;        cout << "\">";        }      cout << buf << ":" << mLineNumber;      if(gEmitHTML) {        cout << "</a>";      }    }    else {      anOutput << buf;    }  }