Declick before the end of seamless loops, not after the end, so that loops are render...
[ardour.git] / libs / pbd / debug.cc
index 318f85a099770ae1e0024fce36b0e78d1bc69551..6b526c33ad522396e5076b040dd90e63c5070f2d 100644 (file)
@@ -21,6 +21,8 @@
 #include <cstdlib>
 #include <iostream>
 #include <map>
+#include <vector>
+#include <algorithm>
 
 #include "pbd/debug.h"
 
@@ -32,6 +34,10 @@ static std::map<const char*,uint64_t> _debug_bit_map;
 
 uint64_t PBD::DEBUG::Stateful = PBD::new_debug_bit ("stateful");
 uint64_t PBD::DEBUG::Properties = PBD::new_debug_bit ("properties");
+uint64_t PBD::DEBUG::FileManager = PBD::new_debug_bit ("filemanager");
+uint64_t PBD::DEBUG::Pool = PBD::new_debug_bit ("pool");
+uint64_t PBD::DEBUG::EventLoop = PBD::new_debug_bit ("eventloop");
+uint64_t PBD::DEBUG::AbstractUI = PBD::new_debug_bit ("abstractui");
 
 uint64_t PBD::debug_bits = 0x0;
 
@@ -97,10 +103,18 @@ PBD::parse_debug_options (const char* str)
 void
 PBD::list_debug_options ()
 {
-       cout << _("The following debug options are available. Separate multipe options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl;
-       cout << "\tAll" << endl;
+       cout << _("The following debug options are available. Separate multiple options with commas.\nNames are case-insensitive and can be abbreviated.") << endl << endl;
+       cout << '\t' << X_("all") << endl; 
+
+       vector<string> options;
 
         for (map<const char*,uint64_t>::iterator i = _debug_bit_map.begin(); i != _debug_bit_map.end(); ++i) {
-                cout << "\t" << i->first << endl;
+               options.push_back (i->first);
         }
+
+       sort (options.begin(), options.end());
+
+       for (vector<string>::iterator i = options.begin(); i != options.end(); ++i) {
+                cout << "\t" << (*i) << endl;
+       }
 }