Parse arg refactoring #4124

Used argParser to parse arguments and removed the old code
This commit is contained in:
Xinyu Hou 2014-10-23 11:30:51 +01:00
parent e26ccfdce6
commit 943a355359
14 changed files with 80 additions and 458 deletions

View file

@ -58,29 +58,6 @@ BOOL WINAPI CAppUtilWindows::consoleHandler(DWORD)
return TRUE;
}
bool
CAppUtilWindows::parseArg(const int& argc, const char* const* argv, int& i)
{
if (app().isArg(i, argc, argv, NULL, "--service")) {
LOG((CLOG_WARN "obsolete argument --service, use synergyd instead."));
app().bye(kExitFailed);
}
else if (app().isArg(i, argc, argv, NULL, "--exit-pause")) {
app().argsBase().m_pauseOnExit = true;
}
else if (app().isArg(i, argc, argv, NULL, "--stop-on-desk-switch")) {
app().argsBase().m_stopOnDeskSwitch = true;
}
else {
// option not supported here
return false;
}
return true;
}
static
int
mainLoopStatic()