forward port 2.X changes up to and including rev 6909
[ardour.git] / libs / ardour / utils.cc
index 66835dc1b2ed6805c7e64aa6665bf0fc3317e5a9..a7d5b960f82c2beb31fe05d7fca3a2ab8022ac1e 100644 (file)
@@ -96,7 +96,7 @@ bump_name_once (const std::string& name, char delimiter)
                }
 
                errno = 0;
-               long int version = strtol (name.c_str()+delim+1, (char **)NULL, 10);
+               int32_t version = strtol (name.c_str()+delim+1, (char **)NULL, 10);
 
                if (isnumber == 0 || errno != 0) {
                        // last_element is not a number, or is too large
@@ -106,7 +106,7 @@ bump_name_once (const std::string& name, char delimiter)
                } else {
                        char buf[32];
 
-                       snprintf (buf, sizeof(buf), "%ld", version+1);
+                       snprintf (buf, sizeof(buf), "%d", version+1);
 
                        newname  = name.substr (0, delim+1);
                        newname += buf;
@@ -205,7 +205,7 @@ path_is_paired (ustring path, ustring& pair_base)
 
        /* remove any leading path */
 
-       if ((pos = path.find_last_of ('/')) != string::npos) {
+       if ((pos = path.find_last_of (G_DIR_SEPARATOR)) != string::npos) {
                path = path.substr(pos+1);
        }
 
@@ -309,11 +309,11 @@ compute_equal_power_fades (nframes_t nframes, float* in, float* out)
 EditMode
 string_to_edit_mode (string str)
 {
-       if (str == _("Splice Edit")) {
+       if (str == _("Splice")) {
                return Splice;
-       } else if (str == _("Slide Edit")) {
+       } else if (str == _("Slide")) {
                return Slide;
-       } else if (str == _("Lock Edit")) {
+       } else if (str == _("Lock")) {
                return Lock;
        }
        fatal << string_compose (_("programming error: unknown edit mode string \"%1\""), str) << endmsg;
@@ -326,14 +326,14 @@ edit_mode_to_string (EditMode mode)
 {
        switch (mode) {
        case Slide:
-               return _("Slide Edit");
+               return _("Slide");
 
        case Lock:
-               return _("Lock Edit");
+               return _("Lock");
 
        default:
        case Splice:
-               return _("Splice Edit");
+               return _("Splice");
        }
 }