change macro call to showVersion function call

pull/92/head
Leif Sawyer 2020-01-22 13:45:29 -09:00
parent 8a3115b095
commit 9aa2403f8d
10 changed files with 27 additions and 63 deletions

View File

@ -16,11 +16,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
/*
Monitoring the satellites for sensible alerts.
@ -189,7 +184,7 @@ int main(int argc, char **argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -26,11 +26,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
void unixDie(const std::string& str)
{
throw std::runtime_error(str+string(": ")+string(strerror(errno)));
@ -188,7 +183,7 @@ int main(int argc, char** argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -23,11 +23,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
struct WinKeeper
{
WinKeeper();
@ -148,11 +143,26 @@ void WinKeeper::setStatus(int sv, std::string_view line)
}
int main()
int main(int argc, char** argv)
{
WinKeeper wk;
bool doVERSION{false};
CLI::App app(program);
app.add_flag("--version", doVERSION, "show program version and copyright");
try {
app.parse(argc, argv);
} catch(const CLI::Error &e) {
return app.exit(e);
}
if(doVERSION) {
showVersion(program, g_gitHash);
exit(0);
}
WinKeeper wk;
for(;;) {
char bert[4];
if(readn2(0, bert, 4) != 4 || bert[0]!='b' || bert[1]!='e' || bert[2] !='r' || bert[3]!='t') {

View File

@ -35,11 +35,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
Point g_ourpos;
@ -272,7 +267,7 @@ try
return app.exit(e);
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}
SVFilter svfilter;

View File

@ -25,12 +25,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
std::mutex g_clientmut;
set<int> g_clients;
@ -169,7 +163,7 @@ int main(int argc, char** argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -40,11 +40,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
struct ObserverPosition
{
Point pos;
@ -440,7 +435,7 @@ try
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -21,11 +21,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
/* Goals in life:
1) NEVER EVER GO DOWN
@ -207,7 +202,7 @@ int main(int argc, char** argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -14,11 +14,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
/*
Goal: generate statistics from influxdb.
@ -70,7 +65,7 @@ int main(int argc, char **argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -11,11 +11,6 @@ using namespace std;
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
int main(int argc, char **argv)
{
string line;
@ -36,7 +31,7 @@ int main(int argc, char **argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}

View File

@ -50,11 +50,6 @@ int g_fixtype{-1};
double g_speed{-1};
extern const char* g_gitHash;
void showVersion()
{
_showVersion(program,g_gitHash)
}
static int getBaudrate(int baud)
{
if(baud==115200)
@ -599,7 +594,7 @@ int main(int argc, char** argv)
}
if(doVERSION) {
showVersion();
showVersion(program, g_gitHash);
exit(0);
}