From owner-cvs-all Wed Sep 5 0:45:20 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 5452D37B40C; Wed, 5 Sep 2001 00:45:01 -0700 (PDT) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f857hDH05110; Wed, 5 Sep 2001 10:43:13 +0300 (EEST) (envelope-from ru) Date: Wed, 5 Sep 2001 10:43:13 +0300 From: Ruslan Ermilov To: Bruce Evans Cc: John Baldwin , "David E. O'Brien" , cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 Message-ID: <20010905104313.F96906@sunbay.com> References: <20010904195711.A16547@sunbay.com> <20010905052114.I18060-100000@alphplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010905052114.I18060-100000@alphplex.bde.org>; from bde@zeta.org.au on Wed, Sep 05, 2001 at 05:31:42AM +1000 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 Wed, Sep 05, 2001 at 05:31:42AM +1000, Bruce Evans wrote: > On Tue, 4 Sep 2001, Ruslan Ermilov wrote: > > > On Tue, Sep 04, 2001 at 09:51:52AM -0700, John Baldwin wrote: > > > > > > On 04-Sep-01 David E. O'Brien wrote: > > > > obrien 2001/09/04 03:00:20 PDT > > > > > > > > Modified files: > > > > share/man/man9 style.9 > > > > Log: > > > > Fix style bug from rev 1.20 in `struct foo' definition example to match the > > > > `struct foo' definition example from rev 1.1. > > > > > > > > (proper CSRG style was also verified with /sys/sys/{bio,file}.h) > > > > > > Erm, according to bruce, the structfoo is the proper style. > > Also according to: style(9): > > Put a tab after the first word, i.e. use > .Ql int^Ix; > and > .Ql struct^Ifoo *x; . > > > This rule only applies when inside the structure declaration. > > This is not clear (see the above rule). > Again, this rule only applies for structure declarations. At least, this is in agreement with the original admin/style/style document: [...] /* * When declaring variables in structures, declare them sorted by use, then * by size, and then by alphabetical order. The first category normally * doesn't apply, but there are exceptions. Each one gets its own line. * Put a tab after the first word, i.e. use "int^Ix;" and "struct^Ifoo *x;". * * Major structures should be declared at the top of the file in which they * are used, or in separate header files, if they are used in multiple * source files. Use of the structures should be by separate declarations * and should be "extern" if they are declared in a header file. */ 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 */ [...] Note how ``foohead'' is declared -- no tab after ``struct''. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message