Date: Wed, 5 Sep 2001 10:43:13 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Bruce Evans <bde@zeta.org.au> Cc: John Baldwin <jhb@FreeBSD.org>, "David E. O'Brien" <obrien@FreeBSD.org>, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 Message-ID: <20010905104313.F96906@sunbay.com> In-Reply-To: <20010905052114.I18060-100000@alphplex.bde.org>; from bde@zeta.org.au on Wed, Sep 05, 2001 at 05:31:42AM %2B1000 References: <20010904195711.A16547@sunbay.com> <20010905052114.I18060-100000@alphplex.bde.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 struct<tab>foo 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010905104313.F96906>