Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 19 Jul 2001 23:01:05 -0700
From:      Dima Dorfman <dima@unixfreak.org>
To:        Warner Losh <imp@harmony.village.org>
Cc:        Alfred Perlstein <bright@sneakerz.org>, cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/share/man/man9 style.9 
Message-ID:  <20010720060105.68FB33E35@bazooka.unixfreak.org>
In-Reply-To: <200107200250.f6K2olo62361@harmony.village.org>; from imp@harmony.village.org on "Thu, 19 Jul 2001 20:50:47 -0600"

next in thread | previous in thread | raw e-mail | index | archive | help
Warner Losh <imp@harmony.village.org> writes:
> Or are you asking about is it
> 
> 	if (foo &&
> 	    bar)
> vs
> 	if (foo
> 	    && bar)
> 
> in which case, you are correct.  I don't see that documented.  Most of
> the code uses the former, and bde seems to review my code that way.

IIRC bde said the former is `BSD' style, and the latter is `GNU'
style.  Anyway, how about this:

Index: style.9
===================================================================
RCS file: /stl/src/FreeBSD/src/share/man/man9/style.9,v
retrieving revision 1.55
diff -u -r1.55 style.9
--- style.9	2001/07/14 19:41:16	1.55
+++ style.9	2001/07/20 06:00:16
@@ -339,8 +339,11 @@
 .Pp
 Indentation is an 8 character tab.
 Second level indents are four spaces.
+If you have to wrap a long statement, put the operator at the end of the
+line.
 .Bd -literal
-	while (cnt < 20)
+	while (cnt < 20 && this_variable_name_is_too_long_for_its_own_good &&
+	    ep != NULL)
 		z = a + really + long + statement + that + needs +
 		    two lines + gets + indented + four + spaces +
 		    on + the + second + and + subsequent + lines;

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?20010720060105.68FB33E35>