Tony Whitley
-
2011-10-10
- labels: --> help
We too would like to see this. We want to clean up a set of redundant #ifdefs in our code. Coan works well but we want it to remove only macros we explicitly specify and ignore ones it finds in the code. I hacked Coan to do this (in symbol.c)
if (!INSOURCE) {
//replacing is_unconditional_line() || !INSOURCE) {
But it would be neater to have a command line switch.
Another example is
#undef DEBUG_THIS_FILE
...
#ifdef DEBUG_THIS_FILE
printf(“Hello world”);
#endif
Even though DEBUG_THIS_FILE is explicitly undef’d we want to keep it.