[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RP] RATPOISON_DEBUG
From: |
twb |
Subject: |
[RP] RATPOISON_DEBUG |
Date: |
Tue Apr 13 09:22:03 2004 |
Once in a while, as an intellectual exercise (and to remind me why I
love RP so much), I try to compile Rayvtugrazrag 0.17 from CVS.
While trying to resolve a dependency, I noticed this (paraphrased):
Our debug macro:
#define xdebug(fmt) do { printf fmt; fflush(stdout); } while(0)
Their debug macro:
#define xdebug(fmt, args...) do { printf(fmt, ## args; fflush(stdout);
} while(0)
Which allows you to use xdebug("oh no"); instead of xdebug(("oh no"));
giving shorter and logicaler code.
Are there portability issues with this, or is it just so esoteric that
nobody thought of it yet?
-trent
--
I'd miss the BBC, but not if I had time to reload. -- Terry Pratchett
- [RP] RATPOISON_DEBUG,
twb <=