svn commit: r331269 - head/share/man/man9

Bruce Evans brde at optusnet.com.au
Wed Mar 21 05:40:47 UTC 2018


On Tue, 20 Mar 2018, Warner Losh wrote:

> Log:
>  Remove reference to lint. We no longer support it, so exceptions for
>  it are no longer relevant.
> ...
> Modified: head/share/man/man9/style.9
> ==============================================================================
> --- head/share/man/man9/style.9	Tue Mar 20 21:36:35 2018	(r331268)
> +++ head/share/man/man9/style.9	Tue Mar 20 21:37:33 2018	(r331269)
> @@ -107,11 +107,7 @@ Only add
> .Dq Li "From: "
> in front of foreign VCS IDs if the file is renamed.
> .Bd -literal
> -#if 0
> -#ifndef lint
> -static char sccsid[] = "@(#)style	1.14 (Berkeley) 4/28/95";
> -#endif /* not lint */
> -#endif
> +/* From: @(#)style	1.14 (Berkeley) 4/28/95 */

This breaks the example for non-lint things in it.

The description still gives the rule for adding '#if 0 ... #endif'.

The example is technically partly correct, though not what is intended.
The original file named 'style' doesn't have "static char sccsid[]
...".  It had the sccsid in a comment, and still has it there, in the
same position in the file.  The char array was added to give an example
of using '#if 0 ... #endif'.

This change adds another copy of the comment, edited this time.  This
gives an example of adding "From: ".  The rule says to add "From: "
only if the file name changed (it should say to add it iff the file
path changed and/or the current VCS doesn't have the file's history
back to the version with the sccsid).  This is not quite right, since
the comment is duplicated, once without the editing suggested by the
rule, and once with it but with the larger editing of moving the
example.

There is a similar self-reference problem for the FreeBSD id.  $FreeBSD$
occurs twice, once in a comment and once just after the above.  Duplicating
it is a style bug, but there is no rule saying this so the meta-rule that
style(9) gives rules by example says the opposite.

Bruce


More information about the svn-src-head mailing list