forked from stepcode/stepcode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscl_trace_fprintf.h
More file actions
32 lines (27 loc) · 1018 Bytes
/
Copy pathscl_trace_fprintf.h
File metadata and controls
32 lines (27 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef SCL_TRACE_FPRINTF_H
#define SCL_TRACE_FPRINTF_H
/** \file scl_trace_fprintf.h
* Used to track the source file and line where generated code is printed from
* When enabled, comments are printed into the generated files for every 'fprintf':
* / * source: scl/src/fedex_plus/selects.c:1375 * /
* To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON'
*
* This header must be included *after* all other headers, otherwise the compiler will
* report errors in system headers.
* \sa trace_fprintf
**/
#include "scl_export.h"
/** used to find where generated c++ originates from in fedex_plus
* To enable, configure with 'cmake .. -DSCL_TRACE_FPRINTF=ON'
*/
#ifdef __cplusplus
extern "C" {
#endif
SCL_BASE_EXPORT void trace_fprintf (char const *sourcefile, int line, FILE* file, const char *format, ...);
#ifdef __cplusplus
}
#endif
#ifdef SCL_TRACE_FPRINTF
# define fprintf(...) trace_fprintf(__FILE__, __LINE__, __VA_ARGS__)
#endif /* SCL_TRACE_FPRINTF */
#endif /* SCL_TRACE_FPRINTF_H */