43 static Option<bool> prefix_enabled;
51 static Option<unsigned int>
verbose;
58 static Option<bool> thread_enabled;
64 static Option<const char*> debugname;
70 static bool is_debugging_enabled(
const char *system,
size_t sz);
72 inline static bool is_debugging_enabled(
const char *system) {
73 return is_debugging_enabled(system, ::std::strlen(system));
89 #define DEBUG_COND_WITH_NAME_N(DBG_NAME,VERBOSE) \
90 ( (cacao::Debug::verbose >= (VERBOSE) ) && \
91 (cacao::Debug::is_debugging_enabled( (DBG_NAME) )) )
94 #define DEBUG_WITH_NAME_N(DBG_NAME, VERBOSE, STMT) \
96 if (DEBUG_COND_WITH_NAME_N( (DBG_NAME) , (VERBOSE) )) { \
105 #define DEBUG_COND_WITH_NAME_N(DBG_NAME,VERBOSE) false
106 #define DEBUG_WITH_NAME_N(DBG_NAME, VERBOSE, STMT) do { } while(0)
108 #endif // end ENABLE_LOGGING
111 #define DEBUG_COND_WITH_NAME(DBG_NAME) DEBUG_COND_WITH_NAME_N(DBG_NAME,0)
112 #define DEBUG_COND_N(VERBOSE) DEBUG_COND_WITH_NAME_N(DEBUG_NAME,VERBOSE)
113 #define DEBUG_COND DEBUG_COND_N(0)
115 #define DEBUG_WITH_NAME(DBG_NAME, STMT) DEBUG_WITH_NAME_N(DBG_NAME,0, STMT)
116 #define DEBUG_N(VERBOSE,STMT) DEBUG_WITH_NAME_N(DEBUG_NAME,VERBOSE, STMT)
125 #define DEBUG(STMT) DEBUG_N(0, STMT)
126 #define DEBUG1(STMT) DEBUG_N(1, STMT)
127 #define DEBUG2(STMT) DEBUG_N(2, STMT)
128 #define DEBUG3(STMT) DEBUG_N(3, STMT)
This file contains the command line option parsing library.