Re: [AD] TRACEs in xkeyboard.c |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] TRACEs in xkeyboard.c
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Sat, 24 Sep 2005 18:43:44 -0700
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=lsUkRP76IDY2zSPGmhIugya2CApXecXAC2sDzXzaoWzcW/WEeeorOuL4S39NnKlqYEZWI3xqBYSPWV4DK5BOlJnVuyI6rJUp64hN3mvokeYBoAdF60zkZ8JHhT4Apr4bIHstMDEfbhUjx/Sjg08VyPE7WzaHDYdrrHI94fh0OQI=
On Saturday 24 September 2005 06:24 pm, Peter Wang wrote:
> On 2005-09-24, Elias Pschernig <elias@xxxxxxxxxx> wrote:
> > diff -u -p -r1.3 debug.h
> > --- include/allegro/debug.h 7 Mar 2005 22:55:21 -0000 1.3
> > +++ include/allegro/debug.h 24 Sep 2005 11:09:59 -0000
> > @@ -34,7 +34,8 @@ AL_FUNC(void, register_trace_handler, (A
> >
> > #ifdef DEBUGMODE
> > #define ASSERT(condition) { if (!(condition)) al_assert(__FILE__,
> > __LINE__); } - #define TRACE al_trace
> > + #define TRACE_PREFIX
> > + #define TRACE TRACE_PREFIX al_trace
>
> Umm, what is that?
Yeah, I mentioned in IRC to him that that could break programs. An alternative
would be:
static INLINE void _al_int_dummy()
{
}
#ifdef DEBUGMODE
#define TRACE ((0) ? _al_int_dummy : (al_trace("Allegro:: "),al_trace))
#else
#define TRACE ((1) ? _al_int_dummy : al_trace)