Age | Commit message (Collapse) | Author |
|
This allows the python doctest module to process it correctly
when invoked as:
python -m doctest -v annotate_ifdef_directives.py
|
|
|
|
|
|
This algorithm is not fully general, but it strikes a balance
between efficiency, simplicity, and correctness.
|
|
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.
|
|
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.
|
|
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.
|
|
No functional change in this commit.
|
|
|
|
|
|
|
|
|