rv = HandleArbitraryStartup(cmdLine, prefs, heedGeneralStartupPrefs, windowOpened); return rv;
rv = cmdLineArgs->GetCmdLineValue("-width", getter_Copies(tempString)); if (NS_SUCCEEDED(rv) && !tempString.IsEmpty()) PR_sscanf(tempString.get(), "%d", &width);   rv = cmdLineArgs->GetCmdLineValue("-height", getter_Copies(tempString)); if (NS_SUCCEEDED(rv) && !tempString.IsEmpty()) PR_sscanf(tempString.get(), "%d", &height);  if (heedGeneralStartupPrefs) { nsCOMPtr<nsIAppShellService> appShell(do_GetService("@mozilla.org/appshell/appShellService;1", &rv)); if (NS_FAILED(rv)) return rv; rv = appShell->CreateStartupState(width, height, windowOpened); if (NS_FAILED(rv)) return rv; } else { PRInt32 argc = 0; rv = cmdLineArgs->GetArgc(&argc); if (NS_FAILED(rv)) return rv;  char **argv = nsnull; rv = cmdLineArgs->GetArgv(&argv); if (NS_FAILED(rv)) return rv;  PRInt32 i = 0; for (i=1;i<argc;i++) { #ifdef DEBUG_CMD_LINE printf("XXX argv[%d] = %s\n",i,argv[i]); #endif  if (IsStartupCommand(argv[i])) {   char *command = argv[i] + 1; #ifdef XP_UNIX  if ((argv[i][0] == '-') && (argv[i][1] == '-')) { command = argv[i] + 2; } #endif    rv = LaunchApplicationWithArgs((const char *)(argv[i]), cmdLineArgs, command, height, width, windowOpened); if (rv == NS_ERROR_NOT_AVAILABLE || rv == NS_ERROR_ABORT) return rv; } } } return NS_OK;
nsresult DoCommandLines(nsICmdLineService* cmdLine, PRBool heedGeneralStartupPrefs, PRBool *windowOpened){  NS_ENSURE_ARG(windowOpened);  *windowOpened = PR_FALSE;  nsresult rv;  nsCOMPtr<nsIPref> prefs(do_GetService(NS_PREF_CONTRACTID, &rv));  if (NS_FAILED(rv)) return rv;  rv = HandleArbitraryStartup(cmdLine, prefs, heedGeneralStartupPrefs, windowOpened);  return rv;}