Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

groleo
Copy link

@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

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