Date: Fri, 9 Mar 2018 17:54:14 +0000 (UTC) From: Warner Losh <imp@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330699 - head/share/man/man9 Message-ID: <201803091754.w29HsE7Q017605@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: imp Date: Fri Mar 9 17:54:14 2018 New Revision: 330699 URL: https://svnweb.freebsd.org/changeset/base/330699 Log: Remove K&R stuff: never use it in new code. Remove how to format K&R stuff. The project hasn't been using it in new code for a long time. It's so obsolete, we don't need a statement to never use it. Add a statement requesting that comments about parameters be preserved when converting to ASNI style, per Kirk. Differential Revision: https://reviews.freebsd.org/D14051 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Fri Mar 9 16:35:49 2018 (r330698) +++ head/share/man/man9/style.9 Fri Mar 9 17:54:14 2018 (r330699) @@ -763,17 +763,9 @@ do not roll your own. } .Ed .Pp -Old-style function declarations look like this: -.Bd -literal -static char * -function(a1, a2, fl, a4) - int a1, a2; /* Declare ints, too, do not default them. */ - float fl; /* Beware double vs. float prototype differences. */ - int a4; /* List in order declared. */ -{ -.Ed +When converting K&R style declarations to ANSI style, preserve +any comments about parameters. .Pp -Use ANSI function declarations unless you explicitly need K&R compatibility. Long parameter lists are wrapped with a normal four space indent. .Pp Variable numbers of arguments should look like this:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803091754.w29HsE7Q017605>