From 0489de37fb681a3e2d2054513eabcfa8d5741e1a Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 23 Oct 2014 17:35:27 -0700 Subject: [PATCH] Bug 1080302 (part 2) - Convert all mentions of -foo options to --foo options in comments, help messages and error messages. r=glandium. --- b2g/components/OopCommandLine.js | 2 +- b2g/gaia/run-b2g.c | 4 +- browser/base/content/browser.js | 2 +- .../content/test/general/browser_bug520538.js | 6 +- .../browser_save_private_link_perwindowpb.js | 2 +- browser/components/nsBrowserContentHandler.js | 16 ++-- .../components/shell/nsSetDefaultBrowser.js | 4 +- browser/devtools/devtools-clhandler.js | 4 +- .../devtools/webide/components/webideCli.js | 6 +- browser/metro/components/BrowserCLH.js | 4 +- .../CommandExecuteHandler.cpp | 2 +- docshell/base/nsDocShell.cpp | 2 +- layout/tools/recording/recording-cmdline.js | 4 +- layout/tools/reftest/reftest-cmdline.js | 2 +- .../extensions/tps/components/tps-cmdline.js | 6 +- .../commandlines/nsICommandLine.idl | 2 +- .../commandlines/nsICommandLineHandler.idl | 2 +- .../components/console/jsconsole-clhandler.js | 2 +- toolkit/mozapps/update/updater/updater.cpp | 2 +- toolkit/xre/nsAppRunner.cpp | 74 +++++++++---------- toolkit/xre/nsNativeAppSupportWin.cpp | 10 +-- webapprt/mac/webapprt.mm | 2 +- webapprt/win/webapprt.cpp | 2 +- widget/windows/winrt/MetroContracts.cpp | 2 +- xpfe/test/winopen.js | 4 +- 25 files changed, 85 insertions(+), 83 deletions(-) diff --git a/b2g/components/OopCommandLine.js b/b2g/components/OopCommandLine.js index 56df0e9f0a2..cfe13ed914b 100644 --- a/b2g/components/OopCommandLine.js +++ b/b2g/components/OopCommandLine.js @@ -39,7 +39,7 @@ oopCommandlineHandler.prototype = { } }, - helpInfo: " -oop Use out-of-process model in B2G\n", + helpInfo: " --oop Use out-of-process model in B2G\n", classID: Components.ID("{e30b0e13-2d12-4cb0-bc4c-4e617a1bf76e}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), }; diff --git a/b2g/gaia/run-b2g.c b/b2g/gaia/run-b2g.c index 325182e75ec..2fffa9f176c 100644 --- a/b2g/gaia/run-b2g.c +++ b/b2g/gaia/run-b2g.c @@ -35,9 +35,11 @@ int main(int argc, char* argv[], char* envp[]){ sprintf(full_path, "%s/%s", cwd, B2G_NAME); sprintf(full_profile_path, "%s/%s", cwd, GAIA_PATH); free(cwd); - printf("Running: %s -profile %s\n", full_path, full_profile_path); + printf("Running: %s --profile %s\n", full_path, full_profile_path); fflush(stdout); fflush(stderr); + // XXX: yes, the printf above says --profile and this execle uses -profile. + // Bug 1088430 will change the execle to use --profile. execle(full_path, full_path, "-profile", full_profile_path, NULL, envp); error("unable to start"); perror(argv[0]); diff --git a/browser/base/content/browser.js b/browser/base/content/browser.js index e86b41e9da8..6669fbd4d6a 100644 --- a/browser/base/content/browser.js +++ b/browser/base/content/browser.js @@ -4259,7 +4259,7 @@ nsBrowserAccess.prototype = { var isExternal = (aContext == Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); if (isExternal && aURI && aURI.schemeIs("chrome")) { - dump("use -chrome command-line option to load external chrome urls\n"); + dump("use --chrome command-line option to load external chrome urls\n"); return null; } diff --git a/browser/base/content/test/general/browser_bug520538.js b/browser/base/content/test/general/browser_bug520538.js index 4489b64c3ca..e0b64db9dfa 100644 --- a/browser/base/content/test/general/browser_bug520538.js +++ b/browser/base/content/test/general/browser_bug520538.js @@ -6,10 +6,10 @@ function test() { Ci.nsIBrowserDOMWindow.OPEN_NEWTAB, Ci.nsIBrowserDOMWindow.OPEN_EXTERNAL); is(gBrowser.tabs.length, tabCount + 1, - "'-new-tab about:blank' opens a new tab"); + "'--new-tab about:blank' opens a new tab"); is(gBrowser.selectedTab, gBrowser.tabs[tabCount], - "'-new-tab about:blank' selects the new tab"); + "'--new-tab about:blank' selects the new tab"); is(document.activeElement, gURLBar.inputField, - "'-new-tab about:blank' focuses the location bar"); + "'--new-tab about:blank' focuses the location bar"); gBrowser.removeCurrentTab(); } diff --git a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js index c34c67fccc6..c3ba0530565 100644 --- a/browser/base/content/test/general/browser_save_private_link_perwindowpb.js +++ b/browser/base/content/test/general/browser_save_private_link_perwindowpb.js @@ -92,7 +92,7 @@ function test() { } aWindow.gBrowser.addEventListener("pageshow", function pageShown(event) { - // If data: -url PAC file isn't loaded soon enough, we may get about:privatebrowsing loaded + // If data: --url PAC file isn't loaded soon enough, we may get about:privatebrowsing loaded if (event.target.location == "about:blank" || event.target.location == "about:privatebrowsing") { aWindow.gBrowser.selectedBrowser.loadURI(testURI); diff --git a/browser/components/nsBrowserContentHandler.js b/browser/components/nsBrowserContentHandler.js index 20db9e6b287..9722b0fe88f 100644 --- a/browser/components/nsBrowserContentHandler.js +++ b/browser/components/nsBrowserContentHandler.js @@ -48,7 +48,7 @@ function shouldLoadURI(aURI) { return true; dump("*** Preventing external load of chrome: URI into browser window\n"); - dump(" Use -chrome instead\n"); + dump(" Use --chrome instead\n"); return false; } @@ -456,16 +456,16 @@ nsBrowserContentHandler.prototype = { #endif }, - helpInfo : " -browser Open a browser window.\n" + - " -new-window Open in a new window.\n" + - " -new-tab Open in a new tab.\n" + - " -private-window Open in a new private window.\n" + + helpInfo : " --browser Open a browser window.\n" + + " --new-window Open in a new window.\n" + + " --new-tab Open in a new tab.\n" + + " --private-window Open in a new private window.\n" + #ifdef XP_WIN - " -preferences Open Options dialog.\n" + + " --preferences Open Options dialog.\n" + #else - " -preferences Open Preferences dialog.\n" + + " --preferences Open Preferences dialog.\n" + #endif - " -search Search with your default search engine.\n", + " --search Search with your default search engine.\n", /* nsIBrowserHandler */ diff --git a/browser/components/shell/nsSetDefaultBrowser.js b/browser/components/shell/nsSetDefaultBrowser.js index f0fb661f728..d63a9d1635c 100644 --- a/browser/components/shell/nsSetDefaultBrowser.js +++ b/browser/components/shell/nsSetDefaultBrowser.js @@ -3,7 +3,7 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ /* - * -setDefaultBrowser commandline handler + * --setDefaultBrowser commandline handler * Makes the current executable the "default browser". */ @@ -22,7 +22,7 @@ nsSetDefaultBrowser.prototype = { } }, - helpInfo: " -setDefaultBrowser Set this app as the default browser.\n", + helpInfo: " --setDefaultBrowser Set this app as the default browser.\n", classID: Components.ID("{F57899D0-4E2C-4ac6-9E29-50C736103B0C}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), diff --git a/browser/devtools/devtools-clhandler.js b/browser/devtools/devtools-clhandler.js index 079e2cce9c6..4b870c3570c 100644 --- a/browser/devtools/devtools-clhandler.js +++ b/browser/devtools/devtools-clhandler.js @@ -67,8 +67,8 @@ devtoolsCommandlineHandler.prototype = { } }, - helpInfo : " -jsconsole Open the Browser Console.\n" + - " -jsdebugger Open the Browser Toolbox.\n", + helpInfo : " --jsconsole Open the Browser Console.\n" + + " --jsdebugger Open the Browser Toolbox.\n", classID: Components.ID("{9e9a9283-0ce9-4e4a-8f1c-ba129a032c32}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), diff --git a/browser/devtools/webide/components/webideCli.js b/browser/devtools/webide/components/webideCli.js index 8abccdd8cd9..3f98bc89016 100644 --- a/browser/devtools/webide/components/webideCli.js +++ b/browser/devtools/webide/components/webideCli.js @@ -10,7 +10,7 @@ Cu.import("resource://gre/modules/XPCOMUtils.jsm"); XPCOMUtils.defineLazyModuleGetter(this, "Services", "resource://gre/modules/Services.jsm"); /** - * Handles -webide command line option. + * Handles --webide command line option. */ function webideCli() { } @@ -23,10 +23,10 @@ webideCli.prototype = { return; } - // If -webide is used remotely, we don't want to open + // If --webide is used remotely, we don't want to open // a new tab. // - // If -webide is used for a new Firefox instance, we + // If --webide is used for a new Firefox instance, we // want to open webide only. cmdLine.preventDefault = true; diff --git a/browser/metro/components/BrowserCLH.js b/browser/metro/components/BrowserCLH.js index 6d1b9e5405c..eb12c1e0845 100644 --- a/browser/metro/components/BrowserCLH.js +++ b/browser/metro/components/BrowserCLH.js @@ -137,10 +137,10 @@ BrowserCLH.prototype = { #endif // Instantiate the search service so the search engine cache is created now // instead when the application is running. The install process will register - // this component by using the -silent command line flag, thereby creating + // this component by using the --silent command line flag, thereby creating // the cache during install, not runtime. // NOTE: This code assumes this CLH is run before the nsDefaultCLH, which - // consumes the "-silent" flag. + // consumes the "--silent" flag. if (aCmdLine.findFlag("silent", false) > -1) { let searchService = Services.search; let autoComplete = Cc["@mozilla.org/autocomplete/search;1?name=history"]. diff --git a/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp b/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp index 8894239d677..6c8d764e686 100644 --- a/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp +++ b/browser/metro/shell/commandexecutehandler/CommandExecuteHandler.cpp @@ -616,7 +616,7 @@ void LaunchDesktopBrowserWithParams(CStringW& aBrowserPath, CStringW& aVerb, params += "\""; } - // Tack on any extra parameters we received (for example -profilemanager) + // Tack on any extra parameters we received (for example --profilemanager) if (!aParameters.IsEmpty()) { params += " "; params += aParameters; diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index f3f7d090af1..2ab1698c3e9 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -9642,7 +9642,7 @@ nsDocShell::InternalLoad(nsIURI * aURI, // Disallow external chrome: loads targetted at content windows bool isChrome = false; if (NS_SUCCEEDED(aURI->SchemeIs("chrome", &isChrome)) && isChrome) { - NS_WARNING("blocked external chrome: url -- use '-chrome' option"); + NS_WARNING("blocked external chrome: url -- use '--chrome' option"); return NS_ERROR_FAILURE; } diff --git a/layout/tools/recording/recording-cmdline.js b/layout/tools/recording/recording-cmdline.js index ec0e8343abd..e043aa29caa 100644 --- a/layout/tools/recording/recording-cmdline.js +++ b/layout/tools/recording/recording-cmdline.js @@ -67,8 +67,8 @@ RecordingCmdLineHandler.prototype = cmdLine.preventDefault = true; }, - helpInfo : " -recording Record drawing for a given URL.\n" + - " -recording-output Specify destination file for a drawing recording.\n" + helpInfo : " --recording Record drawing for a given URL.\n" + + " --recording-output Specify destination file for a drawing recording.\n" }; this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RecordingCmdLineHandler]); diff --git a/layout/tools/reftest/reftest-cmdline.js b/layout/tools/reftest/reftest-cmdline.js index e2654de1f71..fde70c9c04a 100644 --- a/layout/tools/reftest/reftest-cmdline.js +++ b/layout/tools/reftest/reftest-cmdline.js @@ -105,7 +105,7 @@ RefTestCmdLineHandler.prototype = cmdLine.preventDefault = true; }, - helpInfo : " -reftest Run layout acceptance tests on given manifest.\n" + helpInfo : " --reftest Run layout acceptance tests on given manifest.\n" }; this.NSGetFactory = XPCOMUtils.generateNSGetFactory([RefTestCmdLineHandler]); diff --git a/services/sync/tps/extensions/tps/components/tps-cmdline.js b/services/sync/tps/extensions/tps/components/tps-cmdline.js index 67e9293fb6c..aaa9870ba8c 100644 --- a/services/sync/tps/extensions/tps/components/tps-cmdline.js +++ b/services/sync/tps/extensions/tps/components/tps-cmdline.js @@ -72,9 +72,9 @@ TPSCmdLineHandler.prototype = { //cmdLine.preventDefault = true; }, - helpInfo : " -tps Run TPS tests with the given test file.\n" + - " -tpsphase Run the specified phase in the TPS test.\n" + - " -tpslogfile Logfile for TPS output.\n" + + helpInfo : " --tps Run TPS tests with the given test file.\n" + + " --tpsphase Run the specified phase in the TPS test.\n" + + " --tpslogfile Logfile for TPS output.\n" + " --ignore-unused-engines Don't load engines not used in tests.\n", }; diff --git a/toolkit/components/commandlines/nsICommandLine.idl b/toolkit/components/commandlines/nsICommandLine.idl index 14e592d7513..e44b3de9a3c 100644 --- a/toolkit/components/commandlines/nsICommandLine.idl +++ b/toolkit/components/commandlines/nsICommandLine.idl @@ -16,7 +16,7 @@ interface nsIDOMWindow; * DEFINITIONS: * "arguments" are any values found on the command line. * "flags" are switches. In normalized form they are preceded by a single dash. - * Some flags may take "parameters", e.g. "-url " or "-install-xpi " + * Some flags may take "parameters", e.g. "--url ". */ [scriptable, uuid(bc3173bd-aa46-46a0-9d25-d9867a9659b6)] diff --git a/toolkit/components/commandlines/nsICommandLineHandler.idl b/toolkit/components/commandlines/nsICommandLineHandler.idl index 16607029a6e..cd042d6a539 100644 --- a/toolkit/components/commandlines/nsICommandLineHandler.idl +++ b/toolkit/components/commandlines/nsICommandLineHandler.idl @@ -43,7 +43,7 @@ interface nsICommandLineHandler : nsISupports void handle(in nsICommandLine aCommandLine); /** - * When the app is launched with the -help argument, this attribute + * When the app is launched with the --help argument, this attribute * is retrieved and displayed to the user (on stdout). The text should * have embedded newlines which wrap at 76 columns, and should include * a newline at the end. By convention, the right column which contains flag diff --git a/toolkit/components/console/jsconsole-clhandler.js b/toolkit/components/console/jsconsole-clhandler.js index 3fbbce3f80c..4411321eba9 100644 --- a/toolkit/components/console/jsconsole-clhandler.js +++ b/toolkit/components/console/jsconsole-clhandler.js @@ -31,7 +31,7 @@ jsConsoleHandler.prototype = { cmdLine.preventDefault = true; }, - helpInfo : " -jsconsole Open the Error console.\n", + helpInfo : " --jsconsole Open the Error console.\n", classID: Components.ID("{2cd0c310-e127-44d0-88fc-4435c9ab4d4b}"), QueryInterface: XPCOMUtils.generateQI([Ci.nsICommandLineHandler]), diff --git a/toolkit/mozapps/update/updater/updater.cpp b/toolkit/mozapps/update/updater/updater.cpp index d0690c91055..2b198b20858 100644 --- a/toolkit/mozapps/update/updater/updater.cpp +++ b/toolkit/mozapps/update/updater/updater.cpp @@ -2185,7 +2185,7 @@ UpdateThreadFunc(void *param) // staged directory as it won't be useful any more. ensure_remove_recursive(gWorkingDirPath); WriteStatusFile(sUsingService ? "pending-service" : "pending"); - putenv(const_cast("MOZ_PROCESS_UPDATES=")); // We need to use -process-updates again in the tests + putenv(const_cast("MOZ_PROCESS_UPDATES=")); // We need to use --process-updates again in the tests reportRealResults = false; // pretend success } diff --git a/toolkit/xre/nsAppRunner.cpp b/toolkit/xre/nsAppRunner.cpp index df50e9fa758..b0adaca1b3c 100644 --- a/toolkit/xre/nsAppRunner.cpp +++ b/toolkit/xre/nsAppRunner.cpp @@ -491,7 +491,7 @@ CheckArg(const char* aArg, bool aCheckOSInt = false, const char **aParam = nullp ArgResult arOSInt = CheckArg("osint"); if (arOSInt == ARG_FOUND) { ar = ARG_BAD; - PR_fprintf(PR_STDERR, "Error: argument -osint is invalid\n"); + PR_fprintf(PR_STDERR, "Error: argument --osint is invalid\n"); } } @@ -1513,22 +1513,22 @@ DumpHelp() "\n%s options\n", gAppData->name); #endif - printf(" -h or -help Print this message.\n" - " -v or -version Print %s version.\n" + printf(" -h or --help Print this message.\n" + " -v or --version Print %s version.\n" " -P Start with .\n" - " -profile Start with profile at .\n" - " -migration Start with migration wizard.\n" - " -ProfileManager Start with ProfileManager.\n" - " -no-remote Do not accept or send remote commands; implies -new-instance.\n" - " -new-instance Open new instance, not a new window in running instance.\n" - " -UILocale Start with resources as UI Locale.\n" - " -safe-mode Disables extensions and themes for this session.\n", gAppData->name); + " --profile Start with profile at .\n" + " --migration Start with migration wizard.\n" + " --ProfileManager Start with ProfileManager.\n" + " --no-remote Do not accept or send remote commands; implies --new-instance.\n" + " --new-instance Open new instance, not a new window in running instance.\n" + " --UILocale Start with resources as UI Locale.\n" + " --safe-mode Disables extensions and themes for this session.\n", gAppData->name); #if defined(XP_WIN) - printf(" -console Start %s with a debugging console.\n", gAppData->name); + printf(" --console Start %s with a debugging console.\n", gAppData->name); #endif - // this works, but only after the components have registered. so if you drop in a new command line handler, -help + // this works, but only after the components have registered. so if you drop in a new command line handler, --help // won't not until the second run. // out of the bug, because we ship a component.reg file, it works correctly. DumpArbitraryHelp(); @@ -2092,9 +2092,9 @@ static bool gDoProfileReset = false; // Pick a profile. We need to end up with a profile lock. // -// 1) check for -profile +// 1) check for --profile // 2) check for -P -// 3) check for -ProfileManager +// 3) check for --ProfileManager // 4) use the default profile, if there is one // 5) if there are *no* profiles, set up profile-migration // 6) display the profile-manager UI @@ -2112,7 +2112,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n ar = CheckArg("offline", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -offline is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --offline is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } @@ -2128,7 +2128,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n // reset-profile and migration args need to be checked before any profiles are chosen below. ar = CheckArg("reset-profile", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -reset-profile is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --reset-profile is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } else if (ar == ARG_FOUND) { gDoProfileReset = true; @@ -2136,7 +2136,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n ar = CheckArg("migration", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -migration is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --migration is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } else if (ar == ARG_FOUND) { gDoMigration = true; @@ -2197,7 +2197,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n ar = CheckArg("profile", true, &arg); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -profile requires a path\n"); + PR_fprintf(PR_STDERR, "Error: argument --profile requires a path\n"); return NS_ERROR_FAILURE; } if (ar) { @@ -2231,7 +2231,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n ar = CheckArg("createprofile", true, &arg); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -createprofile requires a profile name\n"); + PR_fprintf(PR_STDERR, "Error: argument --createprofile requires a profile name\n"); return NS_ERROR_FAILURE; } if (ar) { @@ -2246,8 +2246,8 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n PR_fprintf(PR_STDERR, "Error: profile path not valid.\n"); return rv; } - - // As with -profile, assume that the given path will be used for the + + // As with --profile, assume that the given path will be used for the // main profile directory. rv = aProfileSvc->CreateProfile(lf, nsDependentCSubstring(arg, delim), getter_AddRefs(profile)); @@ -2288,7 +2288,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n if (ar == ARG_BAD) { ar = CheckArg("osint"); if (ar == ARG_FOUND) { - PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } @@ -2299,7 +2299,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n if (ar) { ar = CheckArg("osint"); if (ar == ARG_FOUND) { - PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument -p is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } nsCOMPtr profile; @@ -2329,7 +2329,7 @@ SelectProfile(nsIProfileLock* *aResult, nsIToolkitProfileService* aProfileSvc, n ar = CheckArg("profilemanager", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -profilemanager is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --profilemanager is invalid when argument --osint is specified\n"); return NS_ERROR_FAILURE; } else if (ar == ARG_FOUND && CanShowProfileManager()) { return ShowProfileManager(aProfileSvc, aNative); @@ -3010,7 +3010,7 @@ XREMain::XRE_mainInit(bool* aExitFlag) const char* override = nullptr; ar = CheckArg("override", true, &override); if (ar == ARG_BAD) { - Output(true, "Incorrect number of arguments passed to -override"); + Output(true, "Incorrect number of arguments passed to --override"); return 1; } else if (ar == ARG_FOUND) { @@ -3220,7 +3220,7 @@ XREMain::XRE_mainInit(bool* aExitFlag) ar = CheckArg("safe-mode", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -safe-mode is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --safe-mode is invalid when argument --osint is specified\n"); return 1; } else if (ar == ARG_FOUND) { gSafeMode = true; @@ -3243,12 +3243,12 @@ XREMain::XRE_mainInit(bool* aExitFlag) gSafeMode = true; #endif - // Handle -no-remote and -new-instance command line arguments. Setup + // Handle --no-remote and --new-instance command line arguments. Setup // the environment to better accommodate other components and various // restart scenarios. ar = CheckArg("no-remote", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -no-remote is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --no-remote is invalid when argument --osint is specified\n"); return 1; } else if (ar == ARG_FOUND) { SaveToEnv("MOZ_NO_REMOTE=1"); @@ -3256,13 +3256,13 @@ XREMain::XRE_mainInit(bool* aExitFlag) ar = CheckArg("new-instance", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -new-instance is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --new-instance is invalid when argument --osint is specified\n"); return 1; } else if (ar == ARG_FOUND) { SaveToEnv("MOZ_NEW_INSTANCE=1"); } - // Handle -help and -version command line arguments. + // Handle --help and --version command line arguments. // They should return quickly, so we deal with them here. if (CheckArg("h") || CheckArg("help") || CheckArg("?")) { DumpHelp(); @@ -3283,10 +3283,10 @@ XREMain::XRE_mainInit(bool* aExitFlag) rv = XRE_InitCommandLine(gArgc, gArgv); NS_ENSURE_SUCCESS(rv, 1); - // Check for -register, which registers chrome and then exits immediately. + // Check for --register, which registers chrome and then exits immediately. ar = CheckArg("register", true); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -register is invalid when argument -osint is specified\n"); + PR_fprintf(PR_STDERR, "Error: argument --register is invalid when argument --osint is specified\n"); return 1; } else if (ar == ARG_FOUND) { ScopedXPCOMStartup xpcom; @@ -3537,7 +3537,7 @@ XREMain::XRE_mainStartup(bool* aExitFlag) #endif /* MOZ_WIDGET_GTK */ #ifdef MOZ_ENABLE_XREMOTE - // handle -remote now that xpcom is fired up + // handle --remote now that xpcom is fired up bool newInstance; { char *e = PR_GetEnv("MOZ_NO_REMOTE"); @@ -4454,7 +4454,7 @@ XRE_InitCommandLine(int aArgc, char* aArgv[]) const char *path = nullptr; ArgResult ar = CheckArg("greomni", false, &path); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -greomni requires a path argument\n"); + PR_fprintf(PR_STDERR, "Error: argument --greomni requires a path argument\n"); return NS_ERROR_FAILURE; } @@ -4464,13 +4464,13 @@ XRE_InitCommandLine(int aArgc, char* aArgv[]) nsCOMPtr greOmni; rv = XRE_GetFileFromPath(path, getter_AddRefs(greOmni)); if (NS_FAILED(rv)) { - PR_fprintf(PR_STDERR, "Error: argument -greomni requires a valid path\n"); + PR_fprintf(PR_STDERR, "Error: argument --greomni requires a valid path\n"); return rv; } ar = CheckArg("appomni", false, &path); if (ar == ARG_BAD) { - PR_fprintf(PR_STDERR, "Error: argument -appomni requires a path argument\n"); + PR_fprintf(PR_STDERR, "Error: argument --appomni requires a path argument\n"); return NS_ERROR_FAILURE; } @@ -4478,7 +4478,7 @@ XRE_InitCommandLine(int aArgc, char* aArgv[]) if (path) { rv = XRE_GetFileFromPath(path, getter_AddRefs(appOmni)); if (NS_FAILED(rv)) { - PR_fprintf(PR_STDERR, "Error: argument -appomni requires a valid path\n"); + PR_fprintf(PR_STDERR, "Error: argument --appomni requires a valid path\n"); return rv; } } diff --git a/toolkit/xre/nsNativeAppSupportWin.cpp b/toolkit/xre/nsNativeAppSupportWin.cpp index 49d75890408..f9c9c7bac20 100644 --- a/toolkit/xre/nsNativeAppSupportWin.cpp +++ b/toolkit/xre/nsNativeAppSupportWin.cpp @@ -251,12 +251,12 @@ private: * WWW_OpenURL topic and the params as specified in the default value of the * ddeexec registry key (e.g. "%1",,0,0,,,, where '%1' is the url to open) * for the verb (e.g. open). - * 2. If the application is not running it is launched with the -requestPending - * and the -url argument. - * 2.1 If the application does not need to restart and the -requestPending + * 2. If the application is not running it is launched with the --requestPending + * and the --url argument. + * 2.1 If the application does not need to restart and the --requestPending * argument is present the accompanying url will not be used. Instead the * application will wait for the DDE message to open the url. - * 2.2 If the application needs to restart the -requestPending argument is + * 2.2 If the application needs to restart the --requestPending argument is * removed from the arguments used to restart the application and the url * will be handled normally. * @@ -278,7 +278,7 @@ public: // The "old" Start method (renamed). NS_IMETHOD StartDDE(); // Utility function to handle a Win32-specific command line - // option: "-console", which dynamically creates a Windows + // option: "--console", which dynamically creates a Windows // console. void CheckConsole(); diff --git a/webapprt/mac/webapprt.mm b/webapprt/mac/webapprt.mm index f0c4eb9c1a1..dea620e4d44 100644 --- a/webapprt/mac/webapprt.mm +++ b/webapprt/mac/webapprt.mm @@ -259,7 +259,7 @@ main(int argc, char **argv) NSString *profile = [args objectForKey:@"profile"]; if (profile) { - NSLog(@"Profile specified with -profile: %@", profile); + NSLog(@"Profile specified with --profile: %@", profile); } else { nsINIParser parser; diff --git a/webapprt/win/webapprt.cpp b/webapprt/win/webapprt.cpp index fe968593069..9dfe0adad6b 100644 --- a/webapprt/win/webapprt.cpp +++ b/webapprt/win/webapprt.cpp @@ -444,7 +444,7 @@ main(int argc, char* argv[]) return 255; } - // Check if the runtime was executed with the "-profile" argument + // Check if the runtime was executed with the "--profile" argument for (int i = 1; i < argc; i++) { if (!strcmp(argv[i], "-profile") || !strcmp(argv[i], "--profile") || diff --git a/widget/windows/winrt/MetroContracts.cpp b/widget/windows/winrt/MetroContracts.cpp index 02697c0a63f..7bb04e431af 100644 --- a/widget/windows/winrt/MetroContracts.cpp +++ b/widget/windows/winrt/MetroContracts.cpp @@ -97,7 +97,7 @@ FrameworkView::LaunchActivated(ComPtr& aArgs, bool aS if (WindowsIsStringEmpty(data.Get())) return; - // If we're being launched from a secondary tile then we have a 2nd command line param of -url + // If we're being launched from a secondary tile then we have a 2nd command line param of --url // and a third of the secondary tile. We want it in sActivationURI so that browser.js will // load it in without showing the start UI. int argc; diff --git a/xpfe/test/winopen.js b/xpfe/test/winopen.js index 8d6c3fe9bd5..11548c441d5 100644 --- a/xpfe/test/winopen.js +++ b/xpfe/test/winopen.js @@ -36,10 +36,10 @@ const options = [ [ "phase1", "PHASE_ONE", false ], // Note: You can attach search options to the url for this file to control // any of the options in the array above. E.g., specifying -// mozilla -chrome "file:///D|/mozilla/xpfe/test/winopen.xul?phase1=16&close=0" +// mozilla --chrome "file:///D|/mozilla/xpfe/test/winopen.xul?phase1=16&close=0" // will run this script with PHASE_ONE=16 and AUTOCLOSE=0. // -// On Win32, you must enclose the -chrome option in quotes in order pass funny Win32 shell +// On Win32, you must enclose the --chrome option in quotes in order pass funny Win32 shell // characters such as '&' or '|'! var opts = window.location.search.substring(1).split( '&' );