mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-24 06:20:43 -08:00
Added diag and diag_writef
Copied from Perforce Change: 162160 ServerID: perforce.ravenbrook.com
This commit is contained in:
parent
6afbabb641
commit
feecde4aaa
1 changed files with 22 additions and 0 deletions
|
|
@ -945,6 +945,28 @@ extern void StackProbe(Size depth);
|
|||
|
||||
#endif
|
||||
|
||||
/* Diagnostics */
|
||||
|
||||
Bool DiagIsOn(void);
|
||||
|
||||
#define DIAG_STREAM (DiagStream())
|
||||
|
||||
#define DIAG(s) BEGIN \
|
||||
s \
|
||||
END
|
||||
|
||||
/*
|
||||
* Note the macro argument args should have parens around it (in the
|
||||
* invocation); it is a variable number of arguments that we pass
|
||||
* to another function.
|
||||
* That makes this macro unclean in all sorts of ways.
|
||||
*/
|
||||
#define DIAG_WRITEF(stream, args) DIAG( \
|
||||
if(DiagIsOn()) { \
|
||||
WriteF a; \
|
||||
} \
|
||||
)
|
||||
|
||||
|
||||
#endif /* mpm_h */
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue