bengardner/uncrustify — pull request #47 by meyering (2011-11-25 20:11:23+00:00)
Title: do not elide UTF-8 characters from multi-line comments

Before this change, uncrustify would remove UTF-8 characters from
multi-line comments. E.g., here, uncrustify would remove an a-acute
from a 2-line comment:

$ printf '/*\303\241\n*/\n' > utf8.c
$ src/uncrustify -q utf8.c; wc -c utf8.c utf8.c.unc*
8 utf8.c
6 utf8.c.uncrustify

This fixes it and adds a test to exercise the fix.

* src/output.cpp (output_comment_multi_simple): Correct the type of
"ch": use "int", not char, to avoid sign-extension with signed char.
* tests/c.test: New file.
* tests/input/c/cmt_multi_utf8.c: New file.
* tests/output/c/02423-cmt_multi_utf8.c: New file.