diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:59 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:24:59 +0200 |
commit | a1c91f4695e208d5a8f80dc37b1818169b7829ff (patch) | |
tree | 52f5134376d17c99b6c9e53133a2eb5cf171377c /zen/format_unit.cpp | |
parent | 5.16 (diff) | |
download | FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.gz FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.tar.bz2 FreeFileSync-a1c91f4695e208d5a8f80dc37b1818169b7829ff.zip |
5.17
Diffstat (limited to 'zen/format_unit.cpp')
-rw-r--r-- | zen/format_unit.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/zen/format_unit.cpp b/zen/format_unit.cpp index 60eb6869..9e5975d9 100644 --- a/zen/format_unit.cpp +++ b/zen/format_unit.cpp @@ -12,12 +12,12 @@ #include <ctime> #include <cstdio> -#ifdef FFS_WIN +#ifdef ZEN_WIN #include <zen/win.h> //includes "windows.h" #include <zen/win_ver.h> -#elif defined FFS_LINUX || defined FFS_MAC -#include <clocale> //thousands separator +#elif defined ZEN_LINUX || defined ZEN_MAC +#include <clocale> //thousands separator #include <zen/utf.h> // #endif @@ -152,7 +152,7 @@ std::wstring zen::fractionToString(double fraction) } -#ifdef FFS_WIN +#ifdef ZEN_WIN namespace { bool getUserSetting(LCTYPE lt, UINT& setting) @@ -233,7 +233,7 @@ private: std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number) { -#ifdef FFS_WIN +#ifdef ZEN_WIN if (IntegerFormat::isValid()) { int bufferSize = ::GetNumberFormat(LOCALE_USER_DEFAULT, 0, number.c_str(), &IntegerFormat::get(), nullptr, 0); @@ -251,7 +251,7 @@ std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number) } return number; -#elif defined FFS_LINUX || defined FFS_MAC +#elif defined ZEN_LINUX || defined ZEN_MAC //we have to include thousands separator ourselves; this doesn't work for all countries (e.g india), but is better than nothing //::setlocale (LC_ALL, ""); -> implicitly called by wxLocale @@ -277,7 +277,7 @@ std::wstring zen::ffs_Impl::includeNumberSeparator(const std::wstring& number) } -#ifdef FFS_WIN +#ifdef ZEN_WIN namespace { const bool useNewLocalTimeCalculation = zen::vistaOrLater(); @@ -289,7 +289,7 @@ std::wstring zen::utcToLocalTimeString(Int64 utcTime) { auto errorMsg = [&] { return _("Error") + L" (time_t: " + numberTo<std::wstring>(utcTime) + L")"; }; -#ifdef FFS_WIN +#ifdef ZEN_WIN FILETIME lastWriteTimeUtc = tofiletime(utcTime); //convert ansi C time to FILETIME SYSTEMTIME systemTimeLocal = {}; @@ -326,7 +326,7 @@ std::wstring zen::utcToLocalTimeString(Int64 utcTime) loc.minute = systemTimeLocal.wMinute; loc.second = systemTimeLocal.wSecond; -#elif defined FFS_LINUX || defined FFS_MAC +#elif defined ZEN_LINUX || defined ZEN_MAC zen::TimeComp loc = zen::localTime(to<time_t>(utcTime)); #endif |