This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH,HURD] hurd: compliance fixes for getgroups


On 04/28/2012 12:21 PM, Pino Toscano wrote:

> Alle venerdà 27 aprile 2012, Roland McGrath ha scritto:
>>> > > 2012-04-27  Pino Toscano  <toscano.pino@tiscali.it>
>>> > > 
>>> > > 	* sysdeps/mach/hurd/getgroups.c (__getgroups): Return -1 and set
>>> > > 	EINVAL for negative `n' or less than `ngids'.
>> > 
>> > The norm is to use all caps and no quotes to mention local variable
>> > names.  You can also drop the (function) when it's the only function
>> > in the file of the same name.
> Ah ok, fixed patch attached.
> Where can I read about these two change log style settings (i.e. 
> variables as all caps, and no (function) when it's the only one in a 
> file)? I don't remember them in the official pages[1], so maybe I missed 
> some documentation...
> [1] http://www.gnu.org/prep/standards/html_node/Change-Logs.html

Pedantically, the norm is to use all caps when talking about
the _value_ of a variable, as opposed to the variable itself,
as in:

"less than NGIDS."

instead of

"less than the value of the `ngids' variable."

See <http://www.gnu.org/prep/standards/standards.html#Comments> :

> The comment on a function is much clearer if you use the argument names to speak about the
> argument values. The variable name itself should be lower case, but write it in
> upper case when you are speaking about the value rather than the variable itself.
> Thus, âthe inode number NODE_NUMâ rather than âan inodeâ.

-- 
Pedro Alves


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]