The following code:
#define DEF3 DEF4
#define DEF2 DEF3
#define DEF1 DEF2
#define STRING(x) #x
#define SHOW(x) puts("#define " #x " " STRING(x))
void main () {
SHOW(DEF1);
SHOW(DEF2);
SHOW(DEF3);
SHOW(DEF4);
}
prints
#define DEF1 DEF4
#define DEF2 DEF4
#define DEF3 DEF4
#define DEF4 DEF4
what I want is to see that DEF1 is originally defined to DEF2.
Is there a way to get
#define DEF1 DEF2
printed, instead of
#define DEF1 DEF4
(i.e., I am getting the behavior of Lisp macroexpand,
while what I want is macroexpand-1 instead,
see http://www.lisp.org/HyperSpec/Body/f...oexpand-1.html)
Thanks!
PS. I also try to post to comp.lang.c.moderated,
but it does not appear there...
--
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.memri.org/> <http://www.mideasttruth.com/> <http://truepeace.org>
<http://ffii.org/> <http://www.honestreporting.com> <http://www.dhimmi.com/>
If you're constantly being mistreated, you're cooperating with the treatment.