summaryrefslogtreecommitdiffstats
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-05 11:43:03 +0200
committerMatthias P. Braendli <matthias.braendli@mpb.li>2017-05-05 11:43:03 +0200
commit2269cc5ed6c4032c017684018a9ee1da234a6123 (patch)
tree802b6398d9e2488f5e6ba26de6329b4c1223fceb /src/Utils.cpp
parentca8ff2b57c4bccfaba4be0d7cee089a3022ea4b6 (diff)
parentbfce4874a0410f8f6521875d7e975f80d05544d4 (diff)
downloaddabmod-2269cc5ed6c4032c017684018a9ee1da234a6123.tar.gz
dabmod-2269cc5ed6c4032c017684018a9ee1da234a6123.tar.bz2
dabmod-2269cc5ed6c4032c017684018a9ee1da234a6123.zip
Merge branch 'next' into next_memless
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp72
1 files changed, 33 insertions, 39 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 5bd93d9..cd116c7 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -30,18 +30,40 @@
#include <sys/prctl.h>
#include <pthread.h>
-void printUsage(const char* progName)
+static void printHeader()
{
- FILE* out = stderr;
-
- fprintf(out, "Welcome to %s %s, compiled at %s, %s\n\n",
- PACKAGE,
+ std::cerr << "ODR-DabMod version " <<
#if defined(GITVERSION)
- GITVERSION,
+ GITVERSION
#else
- VERSION,
+ VERSION
+#endif
+ ", compiled at " << __DATE__ << ", " << __TIME__ << std::endl;
+
+ std::cerr << "Compiled with features: " <<
+#if defined(HAVE_ZEROMQ)
+ "zeromq " <<
+#endif
+#if defined(HAVE_OUTPUT_UHD)
+ "output_uhd " <<
#endif
- __DATE__, __TIME__);
+#if defined(HAVE_SOAPYSDR)
+ "output_soapysdr " <<
+#endif
+#if defined(__FAST_MATH__)
+ "fast-math " <<
+#endif
+#if defined(__SSE__)
+ "SSE " <<
+#endif
+ "\n";
+}
+
+void printUsage(const char* progName)
+{
+ printHeader();
+
+ FILE* out = stderr;
fprintf(out, "Usage with configuration file:\n");
fprintf(out, "\t%s [-C] config_file.ini\n\n", progName);
@@ -87,16 +109,9 @@ void printUsage(const char* progName)
void printVersion(void)
{
- FILE *out = stderr;
+ printHeader();
- fprintf(out, "%s %s, compiled at %s, %s\n\n",
- PACKAGE,
-#if defined(GITVERSION)
- GITVERSION
-#else
- VERSION
-#endif
- ,__DATE__, __TIME__);
+ FILE *out = stderr;
fprintf(out,
" ODR-DabMod is copyright (C) Her Majesty the Queen in Right of Canada,\n"
" 2005 -- 2012 Communications Research Centre (CRC),\n"
@@ -123,28 +138,7 @@ void printVersion(void)
void printStartupInfo()
{
- std::cerr << "ODR-DabMod version " <<
-#if defined(GITVERSION)
- GITVERSION
-#else
- VERSION
-#endif
- << std::endl;
-
- std::cerr << "Compiled with features: " <<
-#if defined(HAVE_ZEROMQ)
- "zeromq " <<
-#endif
-#if defined(HAVE_OUTPUT_UHD)
- "output_uhd " <<
-#endif
-#if defined(HAVE_SOAPYSDR)
- "output_soapysdr " <<
-#endif
-#if defined(__FAST_MATH__)
- "fast-math" <<
-#endif
- "\n";
+ printHeader();
etiLog.level(info) << "Starting up version " <<
#if defined(GITVERSION)