From owner-cvs-all Thu Aug 22 1:21:41 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6473237B400; Thu, 22 Aug 2002 01:21:32 -0700 (PDT) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0329643E65; Thu, 22 Aug 2002 01:21:31 -0700 (PDT) (envelope-from bde@zeta.org.au) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id IAA27444; Thu, 22 Aug 2002 08:21:27 GMT Date: Thu, 22 Aug 2002 18:27:57 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Mike Barcroft Cc: Garrett Wollman , Warner Losh , , Subject: Re: cvs commit: src/share/man/man9 style.9 In-Reply-To: <20020822014845.D62302@espresso.q9media.com> Message-ID: <20020822181151.S2727-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Thu, 22 Aug 2002, Mike Barcroft wrote: > Bruce Evans writes: > > On Wed, 21 Aug 2002, Garrett Wollman wrote: > > > > > > It should probably suggest that prototypes visible to user programs be > > > first blocked in order of increasing namespace before being > > > alphabetized. It is more readable to have: > > > > > > #if FOO_AND_BAR_VISIBLE > > > int bar(...); > > > int foo(...); > > > #endif > > > > > > #if BAZ_VISIBLE > > > int baz(...); > > > #endif > > > > > > #if FOO_BAR_AND_QUUX_VISIBLE > > > int quux(...); > > > #endif > > > > > > ...rather than: > > > > > > #if FOO_AND_BAR_VISIBLE > > > int bar(...); > > > #endif > > > #if BAZ_VISIBLE > > > int baz(...); > > > #endif > > > #if FOO_AND_BAR_VISIBLE > > > int foo(...); > > > #if FOO_BAR_AND_QUUX_VISIBLE > > > int quux(...); > > > #endif > > > #endif > > > > I mostly disagree. I find the former slightly more readable (except for > > the nested ifdef in the latter). > > Aren't you agreeing then? Oops. I meant "I find the former slightly less readable". > > POSIX.1-200x-draft7 lists things in alphabetical order within headers > > and uses markup like "XSI" (and highlighing in the pdf version?) to > > show extensions. This keeps related things together provided the > > function names are well chosen. > > Without seperate namespace blocks you end up with many duplicate > conditionals which can clutter things. For instance, try rearranging > for alphabetical order. This might be the exception since > most of the function names share the same beginning. It would give about 12 small ifdefed sections instead of 3 larger ones. There's a lot of clutter either way, but I think things are easier to read if things are ordered as they would be in a FreeBSD standard instead of split up according to which standard they are in. It's only when you are writing for a particular non-FreeBSD standard that you mostly don't want to read about what is not in it. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message