3c51c3cf5f
The trick is to copy everything from the start of the line into the buffer that stores newlines and comments until indent finds a brace or an else. pr_comment() will use that information to calculate the original indentation of the boxed comment. This requires storing two pieces of information: the real start of the buffer (sc_buf) and the start of the comment (save_com). |
||
---|---|---|
.. | ||
binary.0 | ||
binary.0.stdout | ||
comments.0 | ||
comments.0.pro | ||
comments.0.stdout | ||
declarations.0 | ||
declarations.0.stdout | ||
elsecomment.0 | ||
elsecomment.0.pro | ||
elsecomment.0.stdout | ||
float.0 | ||
float.0.stdout | ||
functional_test.sh | ||
label.0 | ||
label.0.pro | ||
label.0.stdout | ||
list_head.0 | ||
list_head.0.stdout | ||
Makefile | ||
Makefile.depend | ||
nsac.0 | ||
nsac.0.pro | ||
nsac.0.stdout | ||
offsetof.0 | ||
offsetof.0.stdout | ||
parens.0 | ||
parens.0.pro | ||
parens.0.stdout | ||
pcs.0 | ||
pcs.0.pro | ||
pcs.0.stdout | ||
sac.0 | ||
sac.0.pro | ||
sac.0.stdout | ||
struct.0 | ||
struct.0.stdout | ||
surplusbad.0 | ||
surplusbad.0.pro | ||
surplusbad.0.stdout | ||
types_from_file.0 | ||
types_from_file.0.list | ||
types_from_file.0.pro | ||
types_from_file.0.stdout | ||
wchar.0 | ||
wchar.0.stdout |