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

@ -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;