nsresult result;  nsCOMPtr<nsIImageManager> manager;  manager = do_GetService(kImageManagerCID, &result); if (NS_FAILED(result)) {  if ((result = NS_NewImageManager(getter_AddRefs(manager))) != NS_OK) { return result; }  nsIImageManager *aManager = manager.get(); NS_ADDREF(aManager);  }
int main(int argc, char **argv){  nsresult result;  // Hack to get il_ss set so it doesn't fail in xpcompat.c  nsCOMPtr<nsIImageManager> manager;    manager = do_GetService(kImageManagerCID, &result);  if (NS_FAILED(result)) {  /* This is just to provide backwards compatibility, until the ImageManagerImpl     can be converted to a service on all platforms. Once, we havedone the conversion     on all platforms, we should be removing the call to NS_NewImageManager(...)   */      if ((result = NS_NewImageManager(getter_AddRefs(manager))) != NS_OK) {          return result;      }		// WARNING Extra addref to simulate older be		nsIImageManager *aManager = manager.get();		NS_ADDREF(aManager);        }  gTheApp = new nsNativeViewerApp();  putenv("MOZ_TOOLKIT=motif");  gTheApp->Initialize(argc, argv);  gTheApp->Run();  return 0;}