From owner-cvs-all Fri Jul 20 1:34:21 2001 Delivered-To: cvs-all@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 4FBC237B405; Fri, 20 Jul 2001 01:34:00 -0700 (PDT) (envelope-from ru@whale.sunbay.crimea.ua) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.2/8.11.2) id f6K8XBL50003; Fri, 20 Jul 2001 11:33:11 +0300 (EEST) (envelope-from ru) Date: Fri, 20 Jul 2001 11:33:10 +0300 From: Ruslan Ermilov To: Bruce Evans Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/man/man9 style.9 Message-ID: <20010720113310.C30828@sunbay.com> Mail-Followup-To: Bruce Evans , cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org References: <200107191803.f6JI3he58920@freefall.freebsd.org> <20010719152744.A37403@sneakerz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010719152744.A37403@sneakerz.org>; from bright@sneakerz.org on Thu, Jul 19, 2001 at 03:27:44PM -0500 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, Jul 19, 2001 at 03:27:44PM -0500, Alfred Perlstein wrote: > * David E. O'Brien [010719 13:03] wrote: > > obrien 2001/07/19 11:03:43 PDT > > > > Modified files: > > share/man/man9 style.9 > > Log: > > State explicitly how the manpage "DESCRIPTION" options should be listed. > > This page needs an update to explain how we handle line wrap in > conditional constructs: > > if (fooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo && > bar) { > > > } > What about this block? if (mylevel == SLC_DEFAULT) { slctab[(int)func].current.flag = flag; slctab[(int)func].current.val = val; flag |= SLC_ACK; } else if (hislevel == SLC_CANTCHANGE && mylevel == SLC_CANTCHANGE) { ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ flag &= ~SLC_LEVELBITS; flag |= SLC_NOSUPPORT; slctab[(int)func].current.flag = flag; } This is using style(9)'s second-level of four indents rule. But, strictly speaking, `else if' is not an operator, this is `else' operator followed by the `if' operator. So if we would use the second-level indent of four spaces relatively to the `if' operator, we would get: if (mylevel == SLC_DEFAULT) { slctab[(int)func].current.flag = flag; slctab[(int)func].current.val = val; flag |= SLC_ACK; } else if (hislevel == SLC_CANTCHANGE && mylevel == SLC_CANTCHANGE) { flag &= ~SLC_LEVELBITS; flag |= SLC_NOSUPPORT; slctab[(int)func].current.flag = flag; } Which is much better, no? Hell, but then, I guess, we would need to indent lines within `else if' block relative to `if' as well. Just wanted to clear this point out, preferably with an example in style(9). 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