rv = compMgr->RegisterComponent(kRUProbDetectorCID, "Probability based Russian Charset Detector", NS_CHARSET_DETECTOR_PROGID_BASE "ruprob", path, PR_TRUE, PR_TRUE); rv = compMgr->RegisterComponent(kUKProbDetectorCID, "Probability based Ukrainian Charset Detector", NS_CHARSET_DETECTOR_PROGID_BASE "ukprob", path, PR_TRUE, PR_TRUE); rv = compMgr->RegisterComponent(kRUStringProbDetectorCID, "Probability based Russian String Charset Detector", NS_STRCDETECTOR_PROGID_BASE "ruprob", path, PR_TRUE, PR_TRUE); rv = compMgr->RegisterComponent(kUKStringProbDetectorCID, "Probability based Ukrainian String Charset Detector", NS_STRCDETECTOR_PROGID_BASE "ukprob", path, PR_TRUE, PR_TRUE);
extern "C" NS_EXPORT nsresult NSRegisterSelf(nsISupports* aServMgr, const char *path){  nsresult rv;  nsCOMPtr<nsIServiceManager> servMgr(do_QueryInterface(aServMgr, &rv));  if (NS_FAILED(rv)) return rv;  nsIComponentManager* compMgr;  rv = servMgr->GetService(kComponentManagerCID,                            nsIComponentManager::GetIID(),                            (nsISupports**)&compMgr);  if (NS_FAILED(rv)) return rv;  rv = compMgr->RegisterComponent(kMetaCharsetCID,                                   "Meta Charset",                                   NS_META_CHARSET_PROGID,                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kXMLEncodingCID,                                   "XML Encoding",                                   NS_XML_ENCODING_PROGID,                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kCharsetDetectionAdaptorCID,                                   "Charset Detection Adaptor",                                   NS_CHARSET_DETECTION_ADAPTOR_PROGID,                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kJAPSMDetectorCID,                                   "PSM based Japanese Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "japsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kJAStringPSMDetectorCID,                                   "PSM based Japanese String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "japsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kKOPSMDetectorCID,                                   "PSM based Korean Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "kopsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kKOStringPSMDetectorCID,                                   "PSM based Korean String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "kopsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHTWPSMDetectorCID,                                   "PSM based Traditional Chinese Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "zhtwpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHTWStringPSMDetectorCID,                                   "PSM based Traditional Chinese String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "zhtwpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHCNPSMDetectorCID,                                   "PSM based Simplified Chinese Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "zhcnpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHCNStringPSMDetectorCID,                                   "PSM based Simplified Chinese String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "zhcnpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHPSMDetectorCID,                                   "PSM based Chinese Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "zhpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kZHStringPSMDetectorCID,                                   "PSM based Chinese String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "zhpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kCJKPSMDetectorCID,                                   "PSM based CJK Charset Detector",                                   NS_CHARSET_DETECTOR_PROGID_BASE "cjkpsm",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(kCJKStringPSMDetectorCID,                                   "PSM based CJK String Charset Detector",                                   NS_STRCDETECTOR_PROGID_BASE "cjkpsm",                                   path,                                  PR_TRUE, PR_TRUE);#ifdef INCLUDE_DBGDETECTOR  rv = compMgr->RegisterComponent(k1stBlkDbgDetectorCID,                                  "Debuging Detector 1st block",                                   NS_CHARSET_DETECTOR_PROGID_BASE "1stblkdbg",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(k2ndBlkDbgDetectorCID,                                  "Debuging Detector 2nd block",                                   NS_CHARSET_DETECTOR_PROGID_BASE "2ndblkdbg",                                   path,                                  PR_TRUE, PR_TRUE);  rv = compMgr->RegisterComponent(klastBlkDbgDetectorCID,                                  "Debuging Detector last block",                                   NS_CHARSET_DETECTOR_PROGID_BASE "lastblkdbg",                                   path,                                  PR_TRUE, PR_TRUE);#endif /* INCLUDE_DBGDETECTOR */  (void)servMgr->ReleaseService(kComponentManagerCID, compMgr);  return rv;}