nsresult rv = NS_InitXPCOM(nsnull, nsnull, nsnull);
nsresult rv = NS_InitXPCOM(nsnull, nsnull);
int main(int argc, char **argv){  /* I need this to free shared memory in case of a crash */  signal(SIGTERM, abnormal_exit_handler);  signal(SIGQUIT, abnormal_exit_handler);  signal(SIGINT,  abnormal_exit_handler);  signal(SIGHUP,  abnormal_exit_handler);  signal(SIGSEGV, abnormal_exit_handler);  signal(SIGILL,  abnormal_exit_handler);  signal(SIGABRT, abnormal_exit_handler);  // Initialize XPCOM  nsresult rv = NS_InitXPCOM(nsnull, nsnull, nsnull);  NS_ASSERTION(NS_SUCCEEDED(rv), "NS_InitXPCOM failed");  if (NS_SUCCEEDED(rv)) {    // The toolkit service in mozilla will look in the environment    // to determine which toolkit to use.  Yes, it is a dumb hack to    // force it here, but we have no choice because of toolkit specific    // code linked into the viewer.    putenv("MOZ_TOOLKIT=photon");	    gTheApp = new nsNativeViewerApp();    gTheApp->Initialize(argc, argv);    gTheApp->Run();    delete gTheApp;    NS_FreeImageManager();    // Shutdown XPCOM    rv = NS_ShutdownXPCOM(nsnull);    NS_ASSERTION(NS_SUCCEEDED(rv), "NS_ShutdownXPCOM failed");  }    return 0;}