Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2015 07:42:18 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Bryan Drewery <bdrewery@freebsd.org>
Cc:        Bruce Evans <brde@optusnet.com.au>, Andrew Turner <andrew@fubar.geek.nz>,  "Kenneth D. Merry" <ken@freebsd.org>, src-committers@freebsd.org,  svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r291741 - head/sys/geom
Message-ID:  <20151205064802.B4095@besplex.bde.org>
In-Reply-To: <5661E52D.6050305@FreeBSD.org>
References:  <201512040338.tB43cZY1053263@repo.freebsd.org> <56610B6B.8010708@FreeBSD.org> <20151204233052.J2220@besplex.bde.org> <20151204125355.6712d782@bender> <20151205031713.T3286@besplex.bde.org> <5661E52D.6050305@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 4 Dec 2015, Bryan Drewery wrote:

> On 12/4/2015 10:03 AM, Bruce Evans wrote:
>> This is specified by not giving an example of using it.  style(9) was
>
> I really take issue with this stance. I don't think you really mean what
> this implies. For example, can I even use 'x++' or mtx_lock(9) or
> uintptr_t since they are not shown in an example?

mtx_lock() is just another function, so it doesn't need an example any
more than printf().  printf() also happens to have no example, but there
is a formal rule for it an example for fprintf().

'++' is just a standard operator.  style(9) happens to have an example
of it, though not on a variable named x.  It even has the bad example
of ++p instead of p++ where the result is not used.  ++p is more logical
and I used to prefer it, but only p++ is KNF-normal.

style(9) has even more detailed rules for uintXX_t, but no examples,
and nothing for uintptr_t.  uintptr_t can be considered as just another
typedef.  The rule about uintXX_t is mainly part of deprecating the
old spelling u_intXX_t.

I wouldn't trust style(9) for anything except simple formatting, but
look at the subsystem(s) style.  Just the top level of geom has 11000+
lines which can be considered as giving about 20 times more examples
than style(9).

Bruce



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