svn commit: r232271 - head/sys/kern

Bruce Evans brde at optusnet.com.au
Wed Feb 29 08:15:42 UTC 2012


On Wed, 29 Feb 2012, Dimitry Andric wrote:

> On 2012-02-28 23:11, Giovanni Trematerra wrote:
>> On Tue, Feb 28, 2012 at 10:45 PM, Dimitry Andric <dim at freebsd.org> wrote:
> ...
>> It introduces a style(9) violation, though.
>> I think it should be in this way
>>
>> pipe_chmod(struct file *fp, mode_t mode, struct ucred *active_cred,
>>     struct thread *td)

Indeed.

> Is there any interest in changing the other K&R definitions in this file
> to C99?  Or does that cause too much churn?  I tried to make this change
> as minimal as possible to make it compile.

It is just churn for me.

> Btw, style(9) doesn't say anything about a maximum line width, maybe
> that should be added explicitly...:)

Everything in style(9) is supposed to be implicit if not stated
explicitly, but the examples of the line length limit have been
especially broken by changing it into man page.  Manpage formatting
adds a 5-space left margin which starts by breaking all the literal
examples of indentation by tabs -- e.g., leading tabs become a leading
tab followed by 5 spaces, or 13 spaces if you filter the man page
through col -bx.  Any examples of the limit of 79 columns look like
they are broken since they became non-examples with 84 columns *the
maximum length is actually 5+77, not counting bad examples due to
expansion of verbose VCS ids).

I recently noticed another class of breakage: there were many examples
of vertical whitespace, with none between statements except always 1
blank line before most block comments in groups of statements.  Changing
to a man page destroyed _all_ examples of this by turning all the block
comments before statements into meta-comments in man page text instead
of in C comments, and by adding more meta-comments in man page text;
then to make things look right, there must be blank lines separating
the man page text from the C code, and you can't tell if these blank
lines are part of the literal examples of C code or just mdoc formatting.
4 explicit rules about blank lines remain, and none of these is in C
function.  1 explicit rule about an empty line remains, but it is
about the empty line after null declarations at the beginning of a
function.  It goes without saying that there is a blank line after
non-null declarations at the beginning of a function, but most examples
of this are now indistinguishable from man page paragraph breaks and
the others are hard to see.

Bruce


More information about the svn-src-all mailing list