unifdef
unifdef copied to clipboard
don't remove the true if-sections lines
Currently, lines like "#if true_condition" are removed; there are cases
in which this is not desired, even though you defined true_condition.
This adds a new command line switch, -z {0,1} through which you can
choose from the two cases above.
For example:
unifdef -z0 -DFOO tests/if1.expout looks like:
int foo() { return 0; }
int bar() { return 0; }
unifdef -z1 -DFOO tests/if1.expout looks like:
#if FOO
int foo() { return 0; }
#endif
#if FOO
int bar() { return 0; }
#endif