Skip to content

Commit

Permalink
Merge pull request #279 from m1geo/master
Browse files Browse the repository at this point in the history
Added Git ID Version to the --version switch
  • Loading branch information
g4klx committed Mar 13, 2017
2 parents 84f4418 + 9d71de3 commit 8073ff9
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions MMDVMHost.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,21 +78,21 @@ const char* HEADER4 = "Copyright(C) 2015-2017 by Jonathan Naylor, G4KLX and othe

int main(int argc, char** argv)
{
const char* iniFile = DEFAULT_INI_FILE;
if (argc > 1) {
for (int currentArg = 1; currentArg < argc; ++currentArg) {
std::string arg = argv[currentArg];
if ((arg == "-v") || (arg == "--version")) {
::fprintf(stdout, "MMDVMHost version %s\n", VERSION);
return 0;
} else if (arg.substr(0,1) == "-") {
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [filename]\n");
return 1;
} else {
iniFile = argv[currentArg];
}
}
}
const char* iniFile = DEFAULT_INI_FILE;
if (argc > 1) {
for (int currentArg = 1; currentArg < argc; ++currentArg) {
std::string arg = argv[currentArg];
if ((arg == "-v") || (arg == "--version")) {
::fprintf(stdout, "MMDVMHost version %s git #%.7s\n", VERSION, gitversion);
return 0;
} else if (arg.substr(0,1) == "-") {
::fprintf(stderr, "Usage: MMDVMHost [-v|--version] [filename]\n");
return 1;
} else {
iniFile = argv[currentArg];
}
}
}

#if !defined(_WIN32) && !defined(_WIN64)
::signal(SIGTERM, sigHandler);
Expand Down

0 comments on commit 8073ff9

Please sign in to comment.