Preprocessing #ifdef but not #define
Bruce Dumes
bad at atrain.sw.stratus.com
Thu Nov 22 00:31:15 AEST 1990
In article <4769 at dogie.macc.wisc.edu> thomson at vms.macc.wisc.edu (Don Thomson, MACC) writes:
>I'm sorting through C code loaded with #ifdef statements for portability. I'd
>like to strip the code down to a version that applies to my operating system
>and configuration so that I can read through it but don't want to preprocess
>all the #define statements, as I'd like to see the #define mnemonics in the
>stripped down code. I don't see any options for the C preprocessor that will
>allow me to preprocess #ifdef's but not #define's. Is there an easy way to do
>this?
>
If you have Gnu emacs, you can use the hide-ifdefs command. It's
pretty handy. You can define whatever you want, and all the undefined
"#ifdef"s will look something like:
#ifdef FOOBAR ...
#else
printf("I am not a foobar\n");
#endif
--
Bruce Dumes | "You don't see many of *these* nowdays, |
bad at zen.cac.stratus.com | do you?" |
More information about the Comp.lang.c
mailing list