-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.cpp
More file actions
24 lines (19 loc) · 658 Bytes
/
cli.cpp
File metadata and controls
24 lines (19 loc) · 658 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "cli.h"
CLI::Options CLI::ReadOptions(int argc, char** argv)
{
CLI::Options options;
if (argc == 0)
return options;
options.process = argv[0];
for (int i = 1; i < argc; i++)
{
if (!std::strcmp(argv[i], "/v")) options.verbose = true;
else if (!std::strcmp(argv[i], "/h")) options.help = true;
else if (!std::strcmp(argv[i], "/help")) options.help = true;
else if (!std::strcmp(argv[i], "/?")) options.help = true;
else if (!std::strcmp(argv[i], "/guids")) options.guids = true;
else if (!std::strcmp(argv[i], "/set")) options.setOnly = true;
else options.dllPath = argv[i];
}
return options;
}