unifdef icon indicating copy to clipboard operation
unifdef copied to clipboard

don't remove the true if-sections lines

Open groleo opened this issue 9 years ago • 0 comments

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

groleo avatar Apr 27 '16 08:04 groleo