3 extern bool factor_print_p
;
7 // To chop the directory path of the __FILE__ macro.
8 inline const char* abbrev_path(const char* path
) {
9 const char* p1
= strrchr(path
, '\\');
10 const char* p2
= strrchr(path
, '/');
11 return (p1
> p2
? p1
: p2
) + 1;
14 #define FACTOR_PRINT(x) \
16 if (factor_print_p) { \
18 << std::setw(16) << std::left << abbrev_path(__FILE__) \
19 << " " << std::setw(4) << std::right << __LINE__ \
20 << " " << std::setw(20) << std::left << __FUNCTION__ \
25 #define FACTOR_PRINT_MARK FACTOR_PRINT("")
28 #define FACTOR_PRINT(fmt, ...) ((void)0)
29 #define FACTOR_PRINT_MARK ((void)0)