Skip to content

don't remove the true if-sections lines#7

Open
groleo wants to merge 3 commits intofanf2:masterfrom
groleo:master
Open

don't remove the true if-sections lines#7
groleo wants to merge 3 commits intofanf2:masterfrom
groleo:master

Conversation

@groleo
Copy link
Copy Markdown

@groleo groleo commented Apr 27, 2016

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 added 3 commits April 27, 2016 11:19
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant