-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathtrace_fprintf.h
More file actions
32 lines (27 loc) · 1003 Bytes
/
trace_fprintf.h
File metadata and controls
32 lines (27 loc) · 1003 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 SC_TRACE_FPRINTF_H
#define SC_TRACE_FPRINTF_H
/** \file 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/exp2cxx/selects.c:1375 * /
* To enable, configure with 'cmake .. -DSC_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 "sc_export.h"
#ifdef __cplusplus
extern "C" {
#endif
/** Used to find where generated c++ originates from in exp2cxx.
* To enable, configure with 'cmake .. -DSC_TRACE_FPRINTF=ON'
*/
void trace_fprintf( char const * sourcefile, int line, FILE * file, const char * format, ... );
#ifdef __cplusplus
}
#endif
#ifdef SC_TRACE_FPRINTF
# define fprintf(...) trace_fprintf(__FILE__, __LINE__, __VA_ARGS__)
#endif /* SC_TRACE_FPRINTF */
#endif /* SC_TRACE_FPRINTF_H */