Date: Mon, 3 Jun 2019 23:57:30 +0000 (UTC) From: Conrad Meyer <cem@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r348594 - head/share/man/man9 Message-ID: <201906032357.x53NvU11044968@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: cem Date: Mon Jun 3 23:57:29 2019 New Revision: 348594 URL: https://svnweb.freebsd.org/changeset/base/348594 Log: style.9: Codify tolerance for eliding blank lines Consensus seems to be that eliding blank lines for functions with no local variables is acceptable. Codify that explicitly in the style document. Reported by: jhb Reviewed by: delphij, imp, vangyzen (earlier version); rgrimes With feedback from: kib Differential Revision: https://reviews.freebsd.org/D20448 Modified: head/share/man/man9/style.9 Modified: head/share/man/man9/style.9 ============================================================================== --- head/share/man/man9/style.9 Mon Jun 3 23:24:07 2019 (r348593) +++ head/share/man/man9/style.9 Mon Jun 3 23:57:29 2019 (r348594) @@ -26,7 +26,7 @@ .\" From: @(#)style 1.14 (Berkeley) 4/28/95 .\" $FreeBSD$ .\" -.Dd May 28, 2019 +.Dd June 3, 2019 .Dt STYLE 9 .Os .Sh NAME @@ -779,8 +779,19 @@ vaf(const char *fmt, ...) static void usage(void) { - /* Insert an empty line if the function has no local variables. */ + /* Optional blank line goes here. */ .Ed +.Pp +Optionally, insert a blank line at the beginning of functions with no local +variables. +Older versions of this +.Nm +document required the blank line convention, so it is widely used in existing +code. +.Pp +Do not insert a blank line at the beginning of functions with local variables. +Instead, these should have local variable declarations first, followed by one +blank line, followed by the first statement. .Pp Use .Xr printf 3 ,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201906032357.x53NvU11044968>