put back Derek's _MSC_VER changes into the lint.h version
This commit is contained in:
@@ -34,19 +34,34 @@ extern unsigned nhUse_dummy;
|
|||||||
*/
|
*/
|
||||||
/* [DEBUG shouldn't be defined unless you know what you're doing...] */
|
/* [DEBUG shouldn't be defined unless you know what you're doing...] */
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0)
|
# define showdebug(file) debugcore(file, TRUE)
|
||||||
|
# define explicitdebug(file) debugcore(file, FALSE)
|
||||||
|
# define ifdebug(stmt) do { if (showdebug(__FILE__)) stmt; } while (0)
|
||||||
|
# ifdef _MSC_VER
|
||||||
|
/* if we have microsoft's C runtime we can use these instead */
|
||||||
|
# include <crtdbg.h>
|
||||||
|
# define crtdebug(stmt) do { if (showdebug(__FILE__)) stmt; \
|
||||||
|
_RPT0(_CRT_WARN,"\n"); } while (0)
|
||||||
|
# define debugpline0(str) crtdebug(_RPT0(_CRT_WARN,str))
|
||||||
|
# define debugpline1(fmt,arg) crtdebug(_RPT1(_CRT_WARN,fmt,arg))
|
||||||
|
# define debugpline2(fmt,a1,a2) crtdebug(_RPT2(_CRT_WARN,fmt,a1,a2))
|
||||||
|
# define debugpline3(fmt,a1,a2,a3) crtdebug(_RPT3(_CRT_WARN,fmt,a1,a2,a3))
|
||||||
|
# define debugpline4(fmt,a1,a2,a3,a4) crtdebug(_RPT4(_CRT_WARN,fmt,a1,a2,a3,a4))
|
||||||
|
# else
|
||||||
/* these don't require compiler support for C99 variadic macros */
|
/* these don't require compiler support for C99 variadic macros */
|
||||||
# define debugpline0(str) ifdebug(pline(str))
|
# define debugpline0(str) ifdebug(pline(str))
|
||||||
# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg))
|
# define debugpline1(fmt,arg) ifdebug(pline(fmt,arg))
|
||||||
# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2))
|
# define debugpline2(fmt,a1,a2) ifdebug(pline(fmt,a1,a2))
|
||||||
# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3))
|
# define debugpline3(fmt,a1,a2,a3) ifdebug(pline(fmt,a1,a2,a3))
|
||||||
# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4))
|
# define debugpline4(fmt,a1,a2,a3,a4) ifdebug(pline(fmt,a1,a2,a3,a4))
|
||||||
|
# endif
|
||||||
#else
|
#else
|
||||||
# define debugpline0(str) /*empty*/
|
# define debugpline0(str) /*empty*/
|
||||||
# define debugpline1(fmt,arg) /*empty*/
|
# define debugpline1(fmt,arg) /*empty*/
|
||||||
# define debugpline2(fmt,a1,a2) /*empty*/
|
# define debugpline2(fmt,a1,a2) /*empty*/
|
||||||
# define debugpline3(fmt,a1,a2,a3) /*empty*/
|
# define debugpline3(fmt,a1,a2,a3) /*empty*/
|
||||||
# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/
|
# define debugpline4(fmt,a1,a2,a3,a4) /*empty*/
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
#endif /* LINT_H */
|
#endif /* LINT_H */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user