1
Fork 0
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:
David Jones 2007-04-19 11:32:08 +01:00
parent 6afbabb641
commit feecde4aaa

View file

@ -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 */