"George Aslanis" <[EMAIL PROTECTED]> wrote in message
news:46983@palm-dev-forum...
>
> Hello fellow coders,
>
> I have a message trace function OVLogger(Char* format,...) which only
want
> compiled in debug mode. I was trying to emulate how VC++ preprocessed
the
> ASSERT macro or something like....
>
> #ifdef DEBUGMODE
> #define OVLOGMSG OVLogger
> #else
> #define OVMSGLOG (void(0))
> #endif
>
> I know!!!I know!!!Obviously this is not correct. Its just an example
of
> what I am looking for. I inherited (was dumped on) several projects
with
> lots of room for improvement, but not the luxury of rewrite. Any
> suggestions?
CodeWarrior supports ISO C (1999) style variable argument lists, so you
could do
#ifdef DEBUGMODE
#define OVLOGMSG(...) OVLogger(__VA_ARGS__)
#else
#define OVLOGMSG(...)
#endif
To set DEBUGMODE to different targets on your project, look at using a
prefix file for each target. (See CW docs for more details)
--
Ben Combee, [EMAIL PROTECTED]
Techwood Broadcasting Foundation, Austin Bureau
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/