mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
calc: Uses osName() to reduce string literals
This commit is contained in:
parent
2d20f4d57b
commit
bc34397e9b
1 changed files with 2 additions and 23 deletions
25
src/calc.cpp
25
src/calc.cpp
|
@ -33,6 +33,7 @@
|
|||
#include <Dates.h>
|
||||
#include <Context.h>
|
||||
#include <text.h>
|
||||
#include <util.h>
|
||||
#include <i18n.h>
|
||||
|
||||
Context context;
|
||||
|
@ -83,29 +84,7 @@ int main (int argc, char** argv)
|
|||
{
|
||||
std::cout << "\n"
|
||||
<< format (STRING_CMD_VERSION_BUILT, "calc", VERSION)
|
||||
#if defined (DARWIN)
|
||||
<< "darwin"
|
||||
#elif defined (SOLARIS)
|
||||
<< "solaris"
|
||||
#elif defined (CYGWIN)
|
||||
<< "cygwin"
|
||||
#elif defined (HAIKU)
|
||||
<< "haiku"
|
||||
#elif defined (OPENBSD)
|
||||
<< "openbsd"
|
||||
#elif defined (FREEBSD)
|
||||
<< "freebsd"
|
||||
#elif defined (NETBSD)
|
||||
<< "netbsd"
|
||||
#elif defined (LINUX)
|
||||
<< "linux"
|
||||
#elif defined (KFREEBSD)
|
||||
<< "gnu-kfreebsd"
|
||||
#elif defined (GNUHURD)
|
||||
<< "gnu-hurd"
|
||||
#else
|
||||
<< STRING_CMD_VERSION_UNKNOWN
|
||||
#endif
|
||||
<< osName ()
|
||||
<< "\n"
|
||||
<< STRING_CMD_VERSION_COPY
|
||||
<< "\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue