Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Jul 2002 08:26:34 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Mark Murray <mark@grondar.za>
Cc:        "M. Warner Losh" <imp@bsdimp.com>, <freebsd-audit@FreeBSD.ORG>
Subject:   Re: bin/ln & WARNS=5 
Message-ID:  <20020717081218.N2535-100000@gamplex.bde.org>
In-Reply-To: <200207161138.g6GBcguH031715@grimreaper.grondar.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 16 Jul 2002, Mark Murray wrote:

> > So would you agree with:
> >
> > Index: style.9
> > ===================================================================
> > RCS file: /cache/ncvs/src/share/man/man9/style.9,v
> > retrieving revision 1.87
> > diff -u -r1.87 style.9
> > --- style.9     2 Jul 2002 01:39:35 -0000       1.87
> > +++ style.9     15 Jul 2002 18:15:58 -0000
> > @@ -520,6 +520,13 @@
> >  Note that
> >  .Xr indent 1
> >  does not understand this rule.
> > +.Ic sizeof Ns 's
> > +are written like function calls always.
>
> "are written like function calls."

Oops, I agreed too fast :-).  sizeof's are NOT written like function calls
always.  "sizeof(struct foo)" is not written like a function call.  The
rule should be something like something like "The argument of a sizeof is
parenthesized whether or not the parentheses are required for syntactical
reasons".

> > +The redundant parenthesis rules do not apply to
> > +.Ic sizeof(var)
> > +instances.
>
> " ... by BSD convention.".

This goes without saying (and doesn't need to be said).  The whole file is
about conventions.

> > +Some code in the tree does not follow the last part of this rule.
> > +Do not change it gratuitously to do so.
>
> Why not?  We gratuitously remove register. The above is a rule with
> no reason.

Because it gives myriads of gratuitous changes.  There should be a rule
about not gratuitously removing register too.  Actually, we already have
one near the end of the file:

% Stylistic changes (including whitespace changes) are hard on the source
% repository and are to be avoided without good reason.

My version of style.9 also has this meta-rule near the start of the file:

% /*
%  * Internal consistency (per-file) has precedence over these rules.
%  */
% .Ed
% .\" Most files are not internally consistent, so these rules usually
% .\" apply :-).

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-audit" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020717081218.N2535-100000>