Date: Fri, 20 Jul 2001 11:33:10 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Bruce Evans <bde@FreeBSD.org> 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> In-Reply-To: <20010719152744.A37403@sneakerz.org>; from bright@sneakerz.org on Thu, Jul 19, 2001 at 03:27:44PM -0500 References: <200107191803.f6JI3he58920@freefall.freebsd.org> <20010719152744.A37403@sneakerz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jul 19, 2001 at 03:27:44PM -0500, Alfred Perlstein wrote: > * David E. O'Brien <obrien@FreeBSD.org> [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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010720113310.C30828>