Refactor macro scope for version_string
This commit is contained in:
parent
22370cac20
commit
44a5c13c4b
1 changed files with 12 additions and 8 deletions
|
@ -63,22 +63,26 @@
|
||||||
#include "getopt/getopt.h"
|
#include "getopt/getopt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
char const *version_string(void)
|
||||||
|
{
|
||||||
|
return "rtl_433"
|
||||||
#ifdef GIT_VERSION
|
#ifdef GIT_VERSION
|
||||||
#define STR_VALUE(arg) #arg
|
#define STR_VALUE(arg) #arg
|
||||||
#define STR_EXPAND(s) STR_VALUE(s)
|
#define STR_EXPAND(s) STR_VALUE(s)
|
||||||
#define VERSION "version " STR_EXPAND(GIT_VERSION) " branch " STR_EXPAND(GIT_BRANCH) " at " STR_EXPAND(GIT_TIMESTAMP)
|
" version " STR_EXPAND(GIT_VERSION)
|
||||||
|
" branch " STR_EXPAND(GIT_BRANCH)
|
||||||
|
" at " STR_EXPAND(GIT_TIMESTAMP)
|
||||||
|
#undef STR_VALUE
|
||||||
|
#undef STR_EXPAND
|
||||||
#else
|
#else
|
||||||
#define VERSION "version unknown"
|
" version unknown"
|
||||||
#endif
|
#endif
|
||||||
|
" inputs file rtl_tcp"
|
||||||
char const *version_string(void)
|
|
||||||
{
|
|
||||||
return "rtl_433 " VERSION " inputs file rtl_tcp"
|
|
||||||
#ifdef RTLSDR
|
#ifdef RTLSDR
|
||||||
" RTL-SDR"
|
" RTL-SDR"
|
||||||
#endif
|
#endif
|
||||||
#ifdef SOAPYSDR
|
#ifdef SOAPYSDR
|
||||||
" SoapySDR"
|
" SoapySDR"
|
||||||
#endif
|
#endif
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue