From owner-cvs-src@FreeBSD.ORG Sun Jan 9 18:02:10 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC1F816A4CE; Sun, 9 Jan 2005 18:02:10 +0000 (GMT) Received: from mailout2.pacific.net.au (mailout2.pacific.net.au [61.8.0.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D64343D3F; Sun, 9 Jan 2005 18:02:10 +0000 (GMT) (envelope-from bde@zeta.org.au) Received: from mailproxy2.pacific.net.au (mailproxy2.pacific.net.au [61.8.0.87])j09I28Hn018943; Mon, 10 Jan 2005 05:02:08 +1100 Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) j09I25xH002450; Mon, 10 Jan 2005 05:02:06 +1100 Date: Mon, 10 Jan 2005 05:02:05 +1100 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Warner Losh In-Reply-To: <20050105.141439.74745436.imp@harmony.village.org> Message-ID: <20050110042202.Q29420@delplex.bde.org> References: <200501051916.j05JG1iH029185@repoman.freebsd.org> <20050105.141439.74745436.imp@harmony.village.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@freebsd.org cc: src-committers@freebsd.org cc: imp@freebsd.org cc: cvs-all@freebsd.org cc: jhb@freebsd.org Subject: Re: cvs commit: src/share/man/man9 style.9 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2005 18:02:10 -0000 On Wed, 5 Jan 2005, Warner Losh wrote: [Warner Losh didn't write] > > I thought the reason for the - is that it prevented indent(1) from trying to > > reindent that comment block and thus there might be comment blocks with a > > leading '/*-' that aren't copyrights. > > There might be, yes, and I've added a note to style(9) in my tree > explaining that. In a quick straw poll of the source tree, I found no > comments starting in column 1 that weren't a license statement. Comments starting in column 1 and also in line 1? Indent protection is used for much more than copyrights, so /*- doesn't give a hint that the comment might be a copyright except near line 1. > That's true that's what the /*- is for, but if any come to light, you > can change it to /** just as easily. "/**" also means indent protection. Gnu indent's man page claims to also treat comments beginning with "/*=" and "/*_", and even normal block comments, as being box comments and thus automatically protected from indent. Apart from a better default, gnu indent's handling of block comments seems to be worse than FreeBSD's. gnu indentntly always treats block comments as box comments and thus doesn't reformat them, while FreeBSD defaults to reformatting them but has -fcb and -nfcb options to control their formatting. I added these options because reformatting of block comments is usually not wanted but is sometimes useful. BTW, in at least FreeBSD indent, there are other strange magic characters after "/*". A block comment is defined as a comment with a newline immediately after the "/*-". Whitespace between the "/*" and the newline breaks the blockness of a comment. This causes some intended-as-block comments with trailing whitespace after "/*" to be reformatted despite -nfcb. Bruce