Subject: Re: Bluetooth protocol code
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 12/20/2005 05:11:35
> Anyway, by always using ANSI style you can just totally ignore all
> those issues form 10+ years ago. ;)

> On the readability side however, I encoutered few issues in our
> kernel code like e.g:

> int
> foo(bar, dfg, fwd, ffg, nitems, nsize, alignment)
> 	int bar;
> 	int dfg;
> 	int ffg;
> 	int nsize;
> 	int nitems;
> 	int alignment;

Just a note - this is *not* ANSI style.  The ANSI way would be (to
more-or-less preserve the visual layout)

int
foo(
	int bar,
	int dfg,
	int ffg,
	int nsize,
	int nitems,
	int alignment	)

gcc has an unforunate misfeature that silently rewrites the former to
the latter if a suitable prototype declaration is in scope, thus
encouraging the writing of such code, but it's gcc, not C.

/~\ The ASCII				der Mouse
\ / Ribbon Campaign
 X  Against HTML	       mouse@rodents.montreal.qc.ca
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B