use C locale, because POSIX locale is not supported on windows, and operation is...
authorBen Loftis <ben@harrisonconsoles.com>
Mon, 19 Jan 2015 13:29:25 +0000 (07:29 -0600)
committerBen Loftis <ben@harrisonconsoles.com>
Mon, 19 Jan 2015 13:29:25 +0000 (07:29 -0600)
25 files changed:
gtk2_ardour/ui_config.cc
gtk2_ardour/video_timeline.cc
libs/ardour/audio_diskstream.cc
libs/ardour/audio_track.cc
libs/ardour/audio_unit.cc
libs/ardour/audioregion.cc
libs/ardour/automation_list.cc
libs/ardour/diskstream.cc
libs/ardour/io.cc
libs/ardour/ladspa_plugin.cc
libs/ardour/lv2_plugin.cc
libs/ardour/midi_diskstream.cc
libs/ardour/midi_track.cc
libs/ardour/monitor_processor.cc
libs/ardour/panner_shell.cc
libs/ardour/plugin.cc
libs/ardour/rc_configuration.cc
libs/ardour/region.cc
libs/ardour/session_configuration.cc
libs/ardour/session_state.cc
libs/ardour/speakers.cc
libs/ardour/tempo.cc
libs/ardour/vst_plugin.cc
libs/canvas/colors.cc
libs/pbd/controllable.cc

index c40ab8a887c9e116605dd048d2ddc1eb07d4d71b..1040c546ed89095495c15997295b791cbd26fc00 100644 (file)
@@ -240,7 +240,7 @@ int
 UIConfiguration::store_color_theme ()
 {
        XMLNode* root;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root = new XMLNode("Ardour");
 
@@ -375,7 +375,7 @@ XMLNode&
 UIConfiguration::get_state ()
 {
        XMLNode* root;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root = new XMLNode("Ardour");
 
@@ -393,7 +393,7 @@ XMLNode&
 UIConfiguration::get_variables (std::string which_node)
 {
        XMLNode* node;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        node = new XMLNode (which_node);
 
@@ -506,7 +506,7 @@ UIConfiguration::load_colors (XMLNode const & node)
 void
 UIConfiguration::load_modifiers (XMLNode const & node)
 {
-       PBD::LocaleGuard lg ("POSIX");
+       PBD::LocaleGuard lg ("C");
        XMLNodeList const nlist = node.children();
        XMLNodeConstIterator niter;
        XMLProperty const *name;
index 8093ecdb1f658f3a875d5d82d094fbde42613488..0e58534772b064635ded225e109acc15565c22ea 100644 (file)
@@ -85,7 +85,7 @@ VideoTimeLine::save_session ()
                return;
        }
 
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        XMLNode* node = new XMLNode(X_("Videomonitor"));
        if (!node) return;
@@ -143,7 +143,7 @@ VideoTimeLine::set_session (ARDOUR::Session *s)
        if (!_session) { return ; }
 
        _session->SaveSession.connect_same_thread (sessionsave, boost::bind (&VideoTimeLine::save_session, this));
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        XMLNode* node = _session->extra_xml (X_("Videotimeline"));
 
@@ -224,7 +224,7 @@ VideoTimeLine::save_undo ()
 int
 VideoTimeLine::set_state (const XMLNode& node, int /*version*/)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        const XMLProperty* propoffset = node.property (X_("VideoOffset"));
        if (propoffset) {
                video_offset = atoll(propoffset->value());
@@ -237,7 +237,7 @@ XMLNode&
 VideoTimeLine::get_state ()
 {
        XMLNode* node = new XMLNode (X_("Videotimeline"));
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        node->add_property (X_("VideoOffset"), video_offset_p);
        return *node;
 }
index 70ffa1831cc96d21709b069d1a333af67aa3a2fb..b31e6abe9155ac71b71d30a549270102db5dd6d2 100644 (file)
@@ -1805,7 +1805,7 @@ AudioDiskstream::get_state ()
 {
        XMLNode& node (Diskstream::get_state());
        char buf[64] = "";
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        boost::shared_ptr<ChannelList> c = channels.reader();
        snprintf (buf, sizeof(buf), "%u", (unsigned int) c->size());
@@ -1847,7 +1847,7 @@ AudioDiskstream::set_state (const XMLNode& node, int version)
        XMLNodeIterator niter;
        uint32_t nchans = 1;
        XMLNode* capture_pending_node = 0;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* prevent write sources from being created */
 
index c458668e181ed3ba438083ae1a5f624550e5c145..62109e86c7b5e81620487f304689e979916c98e8 100644 (file)
@@ -244,7 +244,7 @@ AudioTrack::set_state_part_two ()
 {
        XMLNode* fnode;
        XMLProperty* prop;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* This is called after all session state has been restored but before
           have been made ports and connections are established.
index 820f41061b024fa36424f1a8084e4b546e1e0776..680960bbff6f776f7b52378134d57ee2b5488392 100644 (file)
@@ -1683,7 +1683,7 @@ AUPlugin::parameter_is_output (uint32_t) const
 void
 AUPlugin::add_state (XMLNode* root) const
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        CFDataRef xmlData;
        CFPropertyListRef propertyList;
 
@@ -1722,7 +1722,7 @@ AUPlugin::set_state(const XMLNode& node, int version)
 {
        int ret = -1;
        CFPropertyListRef propertyList;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if (node.name() != state_node_name()) {
                error << _("Bad node sent to AUPlugin::set_state") << endmsg;
index 506596430f2d9fd01cd806a6936e3883c1efa18b..1e556c97d04a85c51c582d930c4902ad365860b3 100644 (file)
@@ -768,7 +768,7 @@ AudioRegion::get_basic_state ()
 {
        XMLNode& node (Region::state ());
        char buf[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        snprintf (buf, sizeof (buf), "%u", (uint32_t) _sources.size());
        node.add_property ("channels", buf);
@@ -781,7 +781,7 @@ AudioRegion::state ()
 {
        XMLNode& node (get_basic_state());
        XMLNode *child;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        child = node.add_child ("Envelope");
 
@@ -838,7 +838,7 @@ AudioRegion::_set_state (const XMLNode& node, int version, PropertyChange& what_
 {
        const XMLNodeList& nlist = node.children();
        const XMLProperty *prop;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        boost::shared_ptr<Playlist> the_playlist (_playlist.lock());
 
        suspend_property_changes ();
index cf41c4183943c0dee50952c7cd1c0d89a5c900f3..941178a698520b622fb0fdc6620e9228cc101f90 100644 (file)
@@ -253,7 +253,7 @@ AutomationList::state (bool full)
 {
        XMLNode* root = new XMLNode (X_("AutomationList"));
        char buf[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root->add_property ("automation-id", EventTypeMap::instance().to_symbol(_parameter));
 
@@ -367,7 +367,7 @@ AutomationList::deserialize_events (const XMLNode& node)
 int
 AutomationList::set_state (const XMLNode& node, int version)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        XMLNodeList nlist = node.children();
        XMLNode* nsos;
        XMLNodeIterator niter;
index 41f1eccdf7248dc3b62d6f5d69b96bedb12d22c5..427063c3a2ee2f9d83bc6058baeb5c774ac8a5b0 100644 (file)
@@ -462,7 +462,7 @@ Diskstream::get_state ()
 {
        XMLNode* node = new XMLNode ("Diskstream");
         char buf[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        node->add_property ("flags", enum_2_string (_flags));
        node->add_property ("playlist", _playlist->name());
index be626b30100576f2608ae9225e7bc6bf8a0e4c7d..0d66da7795faf10853c96b7beabf9be55898ad62 100644 (file)
@@ -527,7 +527,7 @@ IO::state (bool /*full_state*/)
        string str;
        vector<string>::iterator ci;
        int n;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        Glib::Threads::Mutex::Lock lm (io_lock);
 
        node->add_property("name", _name);
@@ -588,7 +588,7 @@ IO::set_state (const XMLNode& node, int version)
 
        const XMLProperty* prop;
        XMLNodeConstIterator iter;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* force use of non-localized representation of decimal point,
           since we use it a lot in XML files and so forth.
@@ -644,7 +644,7 @@ IO::set_state_2X (const XMLNode& node, int version, bool in)
 {
        const XMLProperty* prop;
        XMLNodeConstIterator iter;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* force use of non-localized representation of decimal point,
           since we use it a lot in XML files and so forth.
index db28d6d199b074b04cc9228864164f39fc0b0da4..61149c78a01d61c81786aeddc9c2dede3f888560 100644 (file)
@@ -351,7 +351,7 @@ LadspaPlugin::add_state (XMLNode* root) const
 {
        XMLNode *child;
        char buf[16];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        for (uint32_t i = 0; i < parameter_count(); ++i){
 
@@ -384,7 +384,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version)
        const char *data;
        uint32_t port_id;
 #endif
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if (node.name() != state_node_name()) {
                error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
@@ -434,7 +434,7 @@ LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */)
        const char *data;
        uint32_t port_id;
 #endif
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if (node.name() != state_node_name()) {
                error << _("Bad node sent to LadspaPlugin::set_state") << endmsg;
index edb872605c280002eb80d8eefda88e909ad1d6c6..9890ab235601b392b08b2600cabdf087a7a7add8 100644 (file)
@@ -914,7 +914,7 @@ LV2Plugin::add_state(XMLNode* root) const
 
        XMLNode*    child;
        char        buf[16];
-       LocaleGuard lg(X_("POSIX"));
+       LocaleGuard lg(X_("C"));
 
        for (uint32_t i = 0; i < parameter_count(); ++i) {
                if (parameter_is_input(i) && parameter_is_control(i)) {
@@ -1529,7 +1529,7 @@ LV2Plugin::set_state(const XMLNode& node, int version)
        const char*          sym;
        const char*          value;
        uint32_t             port_id;
-       LocaleGuard          lg(X_("POSIX"));
+       LocaleGuard          lg(X_("C"));
 
        if (node.name() != state_node_name()) {
                error << _("Bad node sent to LV2Plugin::set_state") << endmsg;
index fed0dbc0ceba93cc27122a3ac2159f15e3b8ba93..e1c29fa7086af43d66c53e3f21094f434dea84db 100644 (file)
@@ -1165,7 +1165,7 @@ MidiDiskstream::get_state ()
 {
        XMLNode& node (Diskstream::get_state());
        char buf[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if (_write_source && _session.get_record_enabled()) {
 
@@ -1199,7 +1199,7 @@ MidiDiskstream::set_state (const XMLNode& node, int version)
        XMLNodeList nlist = node.children();
        XMLNodeIterator niter;
        XMLNode* capture_pending_node = 0;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* prevent write sources from being created */
 
index ce07fa8f24991f2bcad3344e200e9377bf1aef03..2de47263b5cff79de5dbc42610fc4a6855e7bbb8 100644 (file)
@@ -258,7 +258,7 @@ MidiTrack::set_state_part_two ()
 {
        XMLNode* fnode;
        XMLProperty* prop;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        /* This is called after all session state has been restored but before
           have been made ports and connections are established.
index ed0664786034059ed8c417590d78dc2645f41cdf..a88de86ec15383cd709fb97a1717ba9f9bc9dea3 100644 (file)
@@ -224,7 +224,7 @@ MonitorProcessor::set_state (const XMLNode& node, int version)
 XMLNode&
 MonitorProcessor::state (bool full)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
         XMLNode& node (Processor::state (full));
         char buf[64];
 
index de0780cdba5396d795ca0683350083c307f6a147..7b19977b9c79a8b9994b2fa1476dabb91903601c 100644 (file)
@@ -172,7 +172,7 @@ PannerShell::set_state (const XMLNode& node, int version)
        XMLNodeList nlist = node.children ();
        XMLNodeConstIterator niter;
        const XMLProperty *prop;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if ((prop = node.property (X_("bypassed"))) != 0) {
                set_bypassed (string_is_affirmative (prop->value ()));
index 14766fca2a7102140f200f9911d81644378e7324..a93dae9e0f8f68b1909430a29160ec71c0e5f88e 100644 (file)
@@ -389,7 +389,7 @@ XMLNode &
 Plugin::get_state ()
 {
        XMLNode* root = new XMLNode (state_node_name ());
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root->add_property (X_("last-preset-uri"), _last_preset.uri);
        root->add_property (X_("last-preset-label"), _last_preset.label);
index d1e80e75ef2602bc7115a0578435a81ca395fe5b..840b8f6883cf6a594e81caae9eb3c6f15bff1b17 100644 (file)
@@ -171,7 +171,7 @@ XMLNode&
 RCConfiguration::get_state ()
 {
        XMLNode* root;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root = new XMLNode("Ardour");
 
@@ -192,7 +192,7 @@ XMLNode&
 RCConfiguration::get_variables ()
 {
        XMLNode* node;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        node = new XMLNode ("Config");
 
index 2e5d95be9fbd8b1dbedb6e10432f611b16c9317c..813fb93584b7cbcf69b3a2b20a1736c6df097978 100644 (file)
@@ -1138,7 +1138,7 @@ Region::state ()
        XMLNode *node = new XMLNode ("Region");
        char buf[64];
        char buf2[64];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        const char* fe = NULL;
 
        /* custom version of 'add_properties (*node);'
index dc4f9a6bc8ac3c1eb9c34fadb95b1567f485305a..2daeee334801aae2099895b8e91c001968816ea6 100644 (file)
@@ -54,7 +54,7 @@ XMLNode&
 SessionConfiguration::get_state ()
 {
        XMLNode* root;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        root = new XMLNode ("Ardour");
        root->add_child_nocopy (get_variables ());
@@ -67,7 +67,7 @@ XMLNode&
 SessionConfiguration::get_variables ()
 {
        XMLNode* node;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        node = new XMLNode ("Config");
 
@@ -159,7 +159,7 @@ SessionConfiguration::load_state ()
 
                XMLNode* node;
                if (((node = find_named_node (root, X_("Config"))) != 0)) {
-                       LocaleGuard lg (X_("POSIX"));
+                       LocaleGuard lg (X_("C"));
                        set_variables(*node);
                        info << _("Loaded custom session defaults.") << endmsg;
                } else {
index 4609751daa8c5feee2896b93a9b9a058d3674744..29825b5505a16e31d705148444304b6671a2bfea 100644 (file)
@@ -880,7 +880,7 @@ Session::load_state (string snapshot_name)
 int
 Session::load_options (const XMLNode& node)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        config.set_variables (node);
        return 0;
 }
index bbad254f6ec4d0049c70e31a50b863059d351223..7c7b02f0cc796ab4bbda3b637d8f186aac1e289e 100644 (file)
@@ -245,7 +245,7 @@ Speakers::get_state ()
 {
         XMLNode* node = new XMLNode (X_("Speakers"));
         char buf[32];
-        LocaleGuard lg (X_("POSIX"));
+        LocaleGuard lg (X_("C"));
 
         for (vector<Speaker>::const_iterator i = _speakers.begin(); i != _speakers.end(); ++i) {
                 XMLNode* speaker = new XMLNode (X_("Speaker"));
@@ -269,7 +269,7 @@ Speakers::set_state (const XMLNode& node, int /*version*/)
         XMLNodeConstIterator i;
         const XMLProperty* prop;
         double a, e, d;
-        LocaleGuard lg (X_("POSIX"));
+        LocaleGuard lg (X_("C"));
         int n = 0;
 
         _speakers.clear ();
index dfcc264547b33ecac7b1ab6bfbb18420dd60f203..ff6553e82048feb42388b7ec0c6016503322c233 100644 (file)
@@ -73,7 +73,7 @@ TempoSection::TempoSection (const XMLNode& node)
 {
        const XMLProperty *prop;
        BBT_Time start;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if ((prop = node.property ("start")) == 0) {
                error << _("TempoSection XML node has no \"start\" property") << endmsg;
@@ -132,7 +132,7 @@ TempoSection::get_state() const
 {
        XMLNode *root = new XMLNode (xml_state_node_name);
        char buf[256];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        snprintf (buf, sizeof (buf), "%" PRIu32 "|%" PRIu32 "|%" PRIu32,
                  start().bars,
@@ -195,7 +195,7 @@ MeterSection::MeterSection (const XMLNode& node)
 {
        const XMLProperty *prop;
        BBT_Time start;
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if ((prop = node.property ("start")) == 0) {
                error << _("MeterSection XML node has no \"start\" property") << endmsg;
@@ -249,7 +249,7 @@ MeterSection::get_state() const
 {
        XMLNode *root = new XMLNode (xml_state_node_name);
        char buf[256];
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        snprintf (buf, sizeof (buf), "%" PRIu32 "|%" PRIu32 "|%" PRIu32,
                  start().bars,
index 24020e835672f4c2d2de5029706082e600b887a7..0b2bc6afcaf8db727f17e14ba7c50ebae7882c24 100644 (file)
@@ -158,7 +158,7 @@ VSTPlugin::set_chunk (gchar const * data, bool single)
 void
 VSTPlugin::add_state (XMLNode* root) const
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
 
        if (_plugin->flags & 32 /* effFlagsProgramsChunks */) {
 
@@ -195,7 +195,7 @@ VSTPlugin::add_state (XMLNode* root) const
 int
 VSTPlugin::set_state (const XMLNode& node, int version)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        int ret = -1;
 
        if (node.name() != state_node_name()) {
index d83c471c2face7481c16210db55075f63d75a2f1..a747124cb2fe2212552a7aeaec77296036b46749 100644 (file)
@@ -596,7 +596,7 @@ SVAModifier::from_string (string const & str)
 string
 SVAModifier::to_string () const
 {
-       PBD::LocaleGuard lg ("POSIX");
+       PBD::LocaleGuard lg ("C");
        stringstream ss;
 
        switch (type) {
index 42e015ac6f90a6d179841ba25cd96a42d7f3ad52..b0aeaac2c08101d603805b954647193e2c8d97f1 100644 (file)
@@ -107,7 +107,7 @@ XMLNode&
 Controllable::get_state ()
 {
        XMLNode* node = new XMLNode (xml_node_name);
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        char buf[64];
 
        node->add_property (X_("name"), _name); // not reloaded from XML state, just there to look at
@@ -128,7 +128,7 @@ Controllable::get_state ()
 int
 Controllable::set_state (const XMLNode& node, int /*version*/)
 {
-       LocaleGuard lg (X_("POSIX"));
+       LocaleGuard lg (X_("C"));
        const XMLProperty* prop;
 
        Stateful::save_extra_xml (node);