From owner-freebsd-arch Sat Sep 29 1:44:18 2001 Delivered-To: freebsd-arch@freebsd.org Received: from InterJet.elischer.org (c421509-a.pinol1.sfba.home.com [24.7.86.9]) by hub.freebsd.org (Postfix) with ESMTP id 790C437B408; Sat, 29 Sep 2001 01:44:14 -0700 (PDT) Received: from elischer.org (InterJet.elischer.org [192.168.1.1]) by InterJet.elischer.org (8.9.1a/8.9.1) with ESMTP id CAA74589; Sat, 29 Sep 2001 02:31:32 -0700 (PDT) Message-ID: <3BB58776.C41A6E56@elischer.org> Date: Sat, 29 Sep 2001 01:33:58 -0700 From: Julian Elischer X-Mailer: Mozilla 4.7 [en] (X11; U; FreeBSD 5.0-CURRENT i386) X-Accept-Language: en, hu MIME-Version: 1.0 To: John Baldwin Cc: Peter Wemm , arch@FreeBSD.ORG, Warner Losh Subject: Re: Style Wars References: Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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. that gets my vote.. note: 2 tabs may be overkill if the structure only contains simple types e.g. int, char, short... probably worth noting in style, that the intent is to try to approximatly align the names for ease of reading.... > > > 1b) > > > > struct foo { > > int f_type; > > struct mtx f_lock; > > const char *f_name; > > volatile int f_int; > > u_int64_t f_64; > > const volatile char f_cv; > > TAILQ_ENTRY(foo) f_link; > > }; > > -- > > 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/ -- +------------------------------------+ ______ _ __ | __--_|\ 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