lkml.org 
[lkml]   [2003]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] 2.5 Documentation/CodingStyle ANSI C function declarations.
Em Fri, May 30, 2003 at 06:55:18PM -0600, Steven Cole escreveu:
> On Fri, 2003-05-30 at 15:17, Linus Torvalds wrote:
> > On Fri, 30 May 2003, Russell King wrote:
> > >
> > > On Fri, May 30, 2003 at 01:57:13PM -0600, Steven Cole wrote:
> > > > +int foo(
> > > > + long bar,
> > > > + long day,
> > > > + struct magic *xyzzy
> > > > +)
> > >
> > > Is this really part of the kernel coding style?
> >
> > No, but it's better than what it used to be.
> >
> > Also, while I don't think we should try to maintain 1:1 behaviour with
> > the _worst_ offenses of zlib, I do think we should maintain comments etc,
> > and a lot of the zlib function declarations used to look like
> >
> > int foo(bar, baz)
> > long bar; /* number of frobnicators */
> > long baz; /* self-larting on or off */
> > {
> > ....
> >
> > and the ANSI-fication changes this to
> >
> > int foo(
> > long bar, /* number of frobnicators */
> > long baz /* self-larting on or off */
> > )
> > {
> > ...
> >
> > which while not according to the coding-standard is at least a reasonable
> > compromize between having proper C function definitions and keeping the
> > code _looking_ more like the original.
> >
> > Linus
> >
> >
> OK, here is a modified version of the patch to CodingStyle which
> explicitly notes the reason for this secondary style.

In the cases where there are documentation for the paramenters isn't it better
to just bite the bullet and use the kerneldoc style?

Documentation/kernel-doc-nano-HOWTO.txt

- Arnaldo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:35    [W:0.107 / U:28.392 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site