X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fpbd%2Fpbd.cc;h=a7a818ee5ffff8782c16451dc67e8bad39971c22;hb=3c7dea43af9d9e5b2563aee81ac5253fb2ee7858;hp=86d04c45bc7fdba63158d2601205adaf9ef8414c;hpb=d007fc05b18c7767cc72c13ac89882bd9ae36f63;p=ardour.git diff --git a/libs/pbd/pbd.cc b/libs/pbd/pbd.cc index 86d04c45bc..a7a818ee5f 100644 --- a/libs/pbd/pbd.cc +++ b/libs/pbd/pbd.cc @@ -42,7 +42,7 @@ #include "pbd/windows_mmcss.h" #endif -#include "i18n.h" +#include "pbd/i18n.h" extern void setup_libpbd_enums (); @@ -50,8 +50,7 @@ namespace { static bool libpbd_initialized = false; -} - +static void set_debug_options_from_env () { @@ -60,12 +59,13 @@ set_debug_options_from_env () options = Glib::getenv ("PBD_DEBUG", set); if (set) { - std::cerr << "PBD_DEBUG=" << options << std::endl; + std::cerr << X_("PBD_DEBUG=") << options << std::endl; PBD::parse_debug_options (options.c_str()); } } #ifdef PLATFORM_WINDOWS +static void test_timers_from_env () { @@ -75,14 +75,16 @@ test_timers_from_env () options = Glib::getenv ("PBD_TEST_TIMERS", set); if (set) { if (!PBD::QPC::check_timer_valid ()) { - PBD::error << "Windows QPC Timer source not usable." << endmsg; + PBD::error << X_("Windows QPC Timer source not usable") << endmsg; } else { - PBD::info << "Windows QPC Timer source usable." << endmsg; + PBD::info << X_("Windows QPC Timer source usable") << endmsg; } } } #endif +} // namespace + bool PBD::init () { @@ -99,20 +101,19 @@ PBD::init () /* Initialize windows socket DLL for PBD::CrossThreadChannel */ - + if (WSAStartup(MAKEWORD(1,1),&wsaData) != 0) { - fatal << "Windows socket initialization failed with error: " << WSAGetLastError() << endmsg; - abort(); - /*NOTREACHED*/ + error << X_("Windows socket initialization failed with error: ") << WSAGetLastError() << endmsg; return false; } + QPC::initialize(); test_timers_from_env (); if (!PBD::MMCSS::initialize()) { - PBD::info << "Unable to initialize MMCSS" << endmsg; + PBD::info << X_("Unable to initialize MMCSS") << endmsg; } else { - PBD::info << "MMCSS Initialized" << endmsg; + PBD::info << X_("MMCSS Initialized") << endmsg; } #endif @@ -138,7 +139,7 @@ PBD::cleanup () #ifdef PLATFORM_WINDOWS PBD::MMCSS::deinitialize (); WSACleanup(); -#endif +#endif EnumWriter::destroy (); FPU::destroy ();