HomeFreeBSD

indent(1): improve handling of boxed comments indentation

Description

indent(1): improve handling of boxed comments indentation

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).

Details

Provenance
pstefAuthored on
Parents
rS334562: MFC r333650, r333652, r333682, r334406, r334409-r334410, and r334489.
Branches
Unknown
Tags
Unknown