|
33 | 33 |
|
34 | 34 |
|
35 | 35 | #if RCPP_DEBUG_LEVEL > 0 |
36 | | - #define RCPP_DEBUG( MSG ) Rprintf( "%40s:%4d %s\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; |
37 | | - #define RCPP_DEBUG_1( fmt, MSG ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; |
38 | | - #define RCPP_DEBUG_2( fmt, M1, M2 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ; |
39 | | - #define RCPP_DEBUG_3( fmt, M1, M2, M3 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3) ; |
40 | | - #define RCPP_DEBUG_4( fmt, M1, M2, M3, M4 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4) ; |
41 | | - #define RCPP_DEBUG_5( fmt, M1, M2, M3, M4, M5 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5) ; |
| 36 | + #define RCPP_DEBUG( MSG ) Rprintf( "%40s:%4d %s\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; |
| 37 | + #define RCPP_DEBUG_1( fmt, MSG ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; |
| 38 | + #define RCPP_DEBUG_2( fmt, M1, M2 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ; |
| 39 | + #define RCPP_DEBUG_3( fmt, M1, M2, M3 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3) ; |
| 40 | + #define RCPP_DEBUG_4( fmt, M1, M2, M3, M4 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4) ; |
| 41 | + #define RCPP_DEBUG_5( fmt, M1, M2, M3, M4, M5 ) Rprintf( "%40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5) ; |
42 | 42 | #else |
43 | 43 | #define RCPP_DEBUG( MSG ) |
44 | 44 | #define RCPP_DEBUG_1( fmt, MSG ) |
|
52 | 52 | #define RCPP_DEBUG_MODULE( MSG ) { \ |
53 | 53 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
54 | 54 | if( mod__ ){ \ |
55 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d %s\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ;\ |
| 55 | + Rprintf( "[module (%s) <%p> ] %40s:%4d %s\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ;\ |
56 | 56 | } else { \ |
57 | | - Rprintf( "[module () ] %40s:%4d %s\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; \ |
| 57 | + Rprintf( "[module () ] %40s:%4d %s\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; \ |
58 | 58 | } \ |
59 | 59 | } |
60 | 60 | #define RCPP_DEBUG_MODULE_1( fmt, MSG ) { \ |
61 | 61 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
62 | 62 | if( mod__ ){ \ |
63 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ;\ |
| 63 | + Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ;\ |
64 | 64 | } else { \ |
65 | | - Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; \ |
| 65 | + Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, MSG ) ; \ |
66 | 66 | } \ |
67 | 67 | } |
68 | 68 | #define RCPP_DEBUG_MODULE_2( fmt, M1, M2 ) { \ |
69 | 69 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
70 | 70 | if( mod__ ){ \ |
71 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ;\ |
| 71 | + Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ;\ |
72 | 72 | } else { \ |
73 | | - Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ; \ |
| 73 | + Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2 ) ; \ |
74 | 74 | } \ |
75 | 75 | } |
76 | 76 | #define RCPP_DEBUG_MODULE_3( fmt, M1, M2, M3 ) { \ |
77 | 77 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
78 | 78 | if( mod__ ){ \ |
79 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3 ) ;\ |
| 79 | + Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3 ) ;\ |
80 | 80 | } else { \ |
81 | | - Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3 ) ; \ |
| 81 | + Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3 ) ; \ |
82 | 82 | } \ |
83 | 83 | } |
84 | 84 | #define RCPP_DEBUG_MODULE_4( fmt, M1, M2, M3, M4 ) { \ |
85 | 85 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
86 | 86 | if( mod__ ) { \ |
87 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4 ) ;\ |
| 87 | + Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4 ) ;\ |
88 | 88 | } else { \ |
89 | | - Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4 ) ; \ |
| 89 | + Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4 ) ; \ |
90 | 90 | } \ |
91 | 91 | } |
92 | 92 | #define RCPP_DEBUG_MODULE_5( fmt, M1, M2, M3, M4, M5 ) { \ |
93 | 93 | Rcpp::Module * mod__ = getCurrentScope() ; \ |
94 | 94 | if( mod__ ){ \ |
95 | | - Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5 ) ;\ |
| 95 | + Rprintf( "[module (%s) <%p> ] %40s:%4d " fmt "\n" , mod__->name.c_str(), mod__, ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5 ) ;\ |
96 | 96 | } else { \ |
97 | | - Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5 ) ; \ |
| 97 | + Rprintf( "[module () ] %40s:%4d " fmt "\n" , ::Rcpp::internal::debug::short_file_name(__FILE__).c_str(), __LINE__, M1, M2, M3, M4, M5 ) ; \ |
98 | 98 | } \ |
99 | 99 | } |
100 | 100 | #else |
|
0 commit comments