Date: Tue, 04 Sep 2001 09:51:53 -0700 (PDT) From: John Baldwin <jhb@FreeBSD.org> To: "David O'Brien" <obrien@FreeBSD.org> Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jake Burkholder <jake@k7.locore.ca> Subject: Re: cvs commit: src/sys/sparc64/include frame.h Message-ID: <XFMail.010904095153.jhb@FreeBSD.org> In-Reply-To: <20010904030105.A90988@dragon.nuxi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 04-Sep-01 David O'Brien wrote:
> On Tue, Sep 04, 2001 at 05:39:19AM -0400, Jake Burkholder wrote:
>> > obrien 2001/09/04 02:23:23 PDT
>> >
>> > Modified files:
>> > sys/sparc64/include frame.h
>> > Log:
>> > style(9) the structure names
>> >
>> > Revision Changes Path
>> > 1.7 +7 -7 src/sys/sparc64/include/frame.h
>> >
>>
>> This is wrong. Style(9) wants a tab after the struct keyword.
>>
>> #include <sys/queue.h>
>> struct foo {
>> ^^^^^^^^
>
> This is a bug that entered into style.9 in rev 1.20.
> See style.9 rev 1.1, or /sys/sys/*.h.
Yeah, look at proc.h.
struct pgrp {
struct procsig {
struct pargs {
Also, read the paragraph you are quoting:
struct foo {
struct foo *next; /* List of active foo */
struct mumble amumble; /* Comment for mumble */
int bar;
};
struct foo *foohead; /* Head of global foo list */
Use queue(3) macros rather than rolling your own lists, whenever possi-
ble. Thus, the previous example would be better written:
#include <sys/queue.h>
struct foo {
LIST_ENTRY(foo) link; /* Queue macro glue for foo lists */
struct mumble amumble; /* Comment for mumble */
int bar;
};
LIST_HEAD(, foo) foohead; /* Head of global foo list */
I.e., the first example is wrong, and the second one is the more correct
version. I've had Bruce tell me before to use struct<tab>foo.
--
John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010904095153.jhb>
