aboutsummaryrefslogtreecommitdiff
path: root/scripts/maint/annotate_ifdef_directives
AgeCommit message (Collapse)Author
2019-09-27Rename annotate_ifdef_directives to end with .py.Nick Mathewson
This allows the python doctest module to process it correctly when invoked as: python -m doctest -v annotate_ifdef_directives.py
2019-09-27annotate_ifdef_directives: Allow it to be imported as a module.Nick Mathewson
2019-09-27Use Doctests to test the behavior of annotate_ifdef_directives.Nick Mathewson
2019-09-27annotate_ifdef_directives: generate paren-balanced expressionsNick Mathewson
This algorithm is not fully general, but it strikes a balance between efficiency, simplicity, and correctness.
2019-09-26annotate_ifdef_directives: clarify situation with newlinesNick Mathewson
Our line limit is 80 characters, assuming that there is a single terminating newline character that counts towards the limit. On Windows, this might go as high as 81 characters, if we count CRLF as two characters.
2019-09-26annotate_ifdef_directives: remove some cases of double negationNick Mathewson
This change should reduce the number of cases where we say "/* !(!defined(foo)) */" . This only does cases where we can use a regex to make sure that the simplification is guaranteed to be correct. Full boolean simplification would require this script to parse C, and nobody wants that.
2019-09-23annotate_ifdef_directives: obey an 80-column line-limitNick Mathewson
If we would add a comment making a line longer than 80 columns, instead truncate the variable portion of the comment until it just fits into 80 columns, with an ellipsis.
2019-09-23annotate_ifdef_directives: introduce a function to make commented linesNick Mathewson
No functional change in this commit.
2019-09-23Add comments to annotate_ifdef_directivesNick Mathewson
2019-01-16Bump copyright date to 2019Nick Mathewson
2017-09-15update script to use /* */ commentsNick Mathewson
2017-09-06Add a python script to annotate our #elses and #endifsNick Mathewson