Received: (from majordom@localhost) by hyperreal.org (8.8.5/8.8.5) id JAA29624; Wed, 16 Jul 1997 09:52:49 -0700 (PDT) Received: from sierra.zyzzyva.com (ppp0-sierra.zyzzyva.com [208.214.59.46]) by hyperreal.org (8.8.5/8.8.5) with ESMTP id JAA29583 for ; Wed, 16 Jul 1997 09:52:44 -0700 (PDT) Received: from sierra (localhost [127.0.0.1]) by sierra.zyzzyva.com (8.8.5/8.8.2) with ESMTP id LAA10922 for ; Wed, 16 Jul 1997 11:49:44 -0500 (CDT) Message-Id: <199707161649.LAA10922@sierra.zyzzyva.com> X-Mailer: exmh version 2.0delta 6/3/97 To: new-httpd@apache.org Subject: Re: [POLL] Style guide enhancement/clarification In-reply-to: coar's message of Wed, 16 Jul 1997 09:38:58 -0400. <97071609385839@decus.org> X-uri: http://www.zyzzyva.com/ Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 16 Jul 1997 11:49:43 -0500 From: Randy Terbush Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org > Okey, as Ben suggested, let's do this more formally. (Rather along > the lines of the [STATUS] messages.) Current status of opinions: > > 1. Conventions for casting syntax: > > a) "(char *)foo" > +1: Alexei, Dean, Ben +1 for style a > b) "(char*)foo" > +1: > > c) "(char *) foo" > +1: Ken > > 2. Conventions for Boolean negation syntax: > > a) "!expression" > +1: Alexei, Jim > > b) "! expression" > +1: Ken +1 for style b > 3. Conventions for simple if, while, and for blocks: > > a) if (exp) statement; > +1: > > b) if (exp) > statement; > +1: Ben (implicitly from [4]) > > c) if (exp) { > statement; > } > +1: Ken (always) +0 They all have their place IMO. > 4. Conventions for simple else-if blocks: > > a) else if (exp) statement; > +1: > > b) else if (exp) > statement; > +1: Alexei (see [c]), Ben > > c) else if (exp) { > statement; > } > +1: Ken, Alexei (see [b]) +1 for style c > d) else { > if (exp) { > statement; > } > } > +1: > > 5. Conventions for wrapping long (>80 column) routine > definitions/invocations: > > a) foo_func (a, b, > c, d) > +1: > > b) foo_func > (a, b, c, d) > +1: > > c) foo_func > ( > a, > b, > c, > d > ) > +1: > > d) foo_func > ( > a, > b, > c, > d > ) > +1: Ken This one has already been defined by the current .indent.pro and is none of the above (according to my view of this mail). foo_func(a, b, c, d, e, f); > 5. Conventions for wrapping long expressions: > > a) if (a && (b || c) && d) { # i.e., no wrapping) > +1: > > b) if (a && # wrap only when you have to, > (b || c) && d) { # operators wherever > +1: > > c) if (a # wrap only when you have to, > && (b || c) && d) { # operators at bol > +1: Dean (with minor reservations) +1 for style c > > d) if ( # one term per line, operators at end > a && > (b || c) && > d > ) { > +1: Ken (see also [e]) > > e) if ( # one term per line, operators at bol > a > && (b || c) > && d > ) { > +1: Ken (see also [d])