Date: Mon, 22 Oct 2001 23:36:58 -0700 From: Julian Elischer <julian@elischer.org> To: Jonathan Lemon <jlemon@flugsvamp.com> Cc: John Baldwin <jhb@FreeBSD.ORG>, Peter Wemm <peter@wemm.org>, arch@FreeBSD.ORG, Warner Losh <imp@harmony.village.org> Subject: Re: Style Wars Message-ID: <3BD5100A.2D09B278@elischer.org> References: <20010928233146.8959B3809@overcee.netplex.com.au> <XFMail.010928165401.jhb@FreeBSD.org> <20010928185913.U9056@prism.flugsvamp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
I hate to bring this up again, but I almost threw up when I went to look at proc.h after david 'style(9)'d it. (It looks like the result of same). (Not David's fault, but style(9)..) I propose that we modify the following prargraph in style(9) from: 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;'. to: 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. Try to make the structure readable by aligning the variable names using either one or two tabs depending upon your judgement. Names following extremely long types should be separated by a simple space. i.e. use int^I^Ix; and struct foo^I*x; and struct verylongtypename *bar; This approximates 1b). If I don't hear a large outcry (it was a loud 'yes' last time but I didn't see an agreement that it should be done) then I'd like to make that change. Jonathan Lemon wrote: > > On Fri, Sep 28, 2001 at 04:54:01PM -0700, John Baldwin wrote: > > > > On 28-Sep-01 Peter Wemm wrote: > > > John Baldwin wrote: > > >> [ moved to -arch ] > > >> > > >> On 28-Sep-01 Julian Elischer wrote: > > >> > well maybe We can come up with a tweek to the standard that we can > > >> > all agree to... > > >> > and commit.. It is after all a 'living' document.. > > >> > > >> Certainly a viable option. I've seen a couple of ideas so far: > > >> > > >> 1) Use two tabs instead of one when types longer than one tab such > > >> as u_int64_t are used. > > >> 1a) Same as 1) but the tabs after after the type, not just the > > >> first word. > > > > > > 1b) Same as 1a), but also with 2) for types longer than two tabs. > > > ie: "struct verylongtypename *foo;" > > > > > >> 2) Use a space instead of a tab after types longer than one tab like > > >> we already do for queue macros. > > > > I'm think 1b) is the one most people have favored so far and it is rather close > > to our existing style, so it's not that big of a change. Does anyone object to > > 1b)? It basically results in the following changes: use 2 tab spaces instead > > of 1 for type names, put the entire type name before the tab(s), and if the > > type is too long, just use a space. > > I prefer 1) (and the 1b variant), but not 1a). (e.g.: <sys/eventvar.h> ) > -- > Jonathan > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-arch" in the body of the message -- +------------------------------------+ ______ _ __ | __--_|\ Julian Elischer | \ U \/ / hard at work in | / \ julian@elischer.org +------>x USA \ a very strange | ( OZ ) \___ ___ | country ! +- X_.---._/ presently in San Francisco \_/ \\ v To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BD5100A.2D09B278>