From owner-cvs-all Tue Sep 4 9:52:22 2001 Delivered-To: cvs-all@freebsd.org Received: from mail.wrs.com (unknown-1-11.windriver.com [147.11.1.11]) by hub.freebsd.org (Postfix) with ESMTP id C4B3737B422; Tue, 4 Sep 2001 09:51:57 -0700 (PDT) Received: from laptop.baldwin.cx (john@[147.11.46.201]) by mail.wrs.com (8.9.3/8.9.1) with ESMTP id JAA05684; Tue, 4 Sep 2001 09:51:56 -0700 (PDT) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <20010904030105.A90988@dragon.nuxi.com> Date: Tue, 04 Sep 2001 09:51:53 -0700 (PDT) From: John Baldwin To: "David O'Brien" Subject: Re: cvs commit: src/sys/sparc64/include frame.h Cc: cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, Jake Burkholder Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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 >> 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 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 structfoo. -- John Baldwin -- 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