Commit 8e501e95 authored by mrowe@apple.com's avatar mrowe@apple.com

2007-12-16 Brent Fulgham <bfulgham@gmail.com>

        Reviewed by Adam Roben.

        http://bugs.webkit.org/show_bug.cgi?id=16315
        FindSafari needs a path-only option.

        * FindSafari/FindSafari.cpp:
        (_tmain):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@28788 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 78db8437
2007-12-16 Brent Fulgham <bfulgham@gmail.com>
Reviewed by Adam Roben.
http://bugs.webkit.org/show_bug.cgi?id=16315
FindSafari needs a path-only option.
* FindSafari/FindSafari.cpp:
(_tmain):
2007-12-16 Alexey Proskuryakov <ap@webkit.org>
Reviewed by Darin.
......
......@@ -129,6 +129,7 @@ int _tmain(int argc, TCHAR* argv[])
}
bool printLauncher = false;
bool printEnvironment = false;
bool debugger = false;
for (int i = 1; i < argc; ++i) {
......@@ -136,13 +137,22 @@ int _tmain(int argc, TCHAR* argv[])
printLauncher = true;
continue;
}
if (!_tcscmp(argv[i], TEXT("/printSafariEnvironment"))) {
printEnvironment = true;
continue;
}
if (!_tcscmp(argv[i], TEXT("/debugger"))) {
debugger = true;
continue;
}
}
if (!printLauncher) {
// printLauncher is inclusive of printEnvironment, so do not
// leave both enabled:
if (printLauncher && printEnvironment)
printEnvironment = false;
if (!printLauncher && !printEnvironment) {
_tprintf(TEXT("%s\n"), path);
free(path);
return 0;
......@@ -176,9 +186,13 @@ int _tmain(int argc, TCHAR* argv[])
}
LPCTSTR* endLines = debugger ? debuggerLines : launchLines;
for (unsigned i = 0; i < (debugger ? ARRAYSIZE(debuggerLines) : ARRAYSIZE(launchLines)); ++i) {
_tprintf(endLines[i], command);
_tprintf(TEXT("\n"));
// Don't print launch command if we just want the environment set up...
if (!printEnvironment) {
for (unsigned i = 0; i < (debugger ? ARRAYSIZE(debuggerLines) : ARRAYSIZE(launchLines)); ++i) {
_tprintf(endLines[i], command);
_tprintf(TEXT("\n"));
}
}
free(path);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment