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
48167f53eb
commit
677c2e87b5
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 <Dates.h>
|
||||||
#include <Context.h>
|
#include <Context.h>
|
||||||
#include <text.h>
|
#include <text.h>
|
||||||
|
#include <util.h>
|
||||||
#include <i18n.h>
|
#include <i18n.h>
|
||||||
|
|
||||||
Context context;
|
Context context;
|
||||||
|
@ -83,29 +84,7 @@ int main (int argc, char** argv)
|
||||||
{
|
{
|
||||||
std::cout << "\n"
|
std::cout << "\n"
|
||||||
<< format (STRING_CMD_VERSION_BUILT, "calc", VERSION)
|
<< format (STRING_CMD_VERSION_BUILT, "calc", VERSION)
|
||||||
#if defined (DARWIN)
|
<< osName ()
|
||||||
<< "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
|
|
||||||
<< "\n"
|
<< "\n"
|
||||||
<< STRING_CMD_VERSION_COPY
|
<< STRING_CMD_VERSION_COPY
|
||||||
<< "\n"
|
<< "\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue