1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-keygen synced 2026-06-17 03:50:03 +02:00

main.cpp: adding "-v" version flag.

This commit is contained in:
Henrik Hautakoski 2020-02-19 13:49:23 +01:00
parent 243acc8014
commit ca617cfa3b
2 changed files with 16 additions and 3 deletions

View file

@ -12,6 +12,10 @@ EOS
.OP \-h|--help
.YS
.SY @PROJECT_NAME@
.OP \-v
.YS
.SY @PROJECT_NAME@
search
.OP -m
@ -38,6 +42,9 @@ Options and subcommands are as follows:
.B -h, --help
Shows this help text.
.TP 15
.B -v
Shows version.
.TP 15
.B search
performs a search, finding
.I <count>

View file

@ -74,7 +74,7 @@ void cmd_search(const eoskeygen::strlist_t& words, const eoskeygen::Dictionary&
void usage(const char *name) {
std::cout << name
<< " [ -h | --help | search [ -m | --l33t"
<< " [ -h | --help | -v | search [ -m | --l33t"
#ifdef HAVE_THREADS
<< " | --threads=<num>"
#endif /* HAVE_THREADS */
@ -90,8 +90,9 @@ void usage(const char *name) {
std::cout
<< " Options:" << std::endl
<< " -h, --help Shows this help text."
<< std::endl
<< std::endl;
<< std::endl << std::endl
<< " -v Shows version."
<< std::endl << std::endl;
std::cout << " search: " << std::endl
<< " performs a search, finding <count> public keys containing" << std::endl
@ -159,6 +160,11 @@ int main(int argc, char **argv) {
return 0;
}
if (!strcmp(argv[p], "-v")) {
std::cout << PROGRAM_NAME << " v" << PROGRAM_VERSION << std::endl;
return 0;
}
if (!strcmp(argv[p], "search")) {
int count = 10;