From owner-svn-src-head@freebsd.org Thu Apr 6 10:11:25 2017 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6597CD2FC80; Thu, 6 Apr 2017 10:11:25 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id CE75E941; Thu, 6 Apr 2017 10:11:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from besplex.bde.org (c122-106-153-191.carlnfd1.nsw.optusnet.com.au [122.106.153.191]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id F2E0242C968; Thu, 6 Apr 2017 20:10:55 +1000 (AEST) Date: Thu, 6 Apr 2017 20:10:54 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Ngie Cooper cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r316550 - head/share/man/man9 In-Reply-To: <201704060240.v362eqE5006488@repo.freebsd.org> Message-ID: <20170406195211.K1015@besplex.bde.org> References: <201704060240.v362eqE5006488@repo.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.2 cv=AYLBJzfG c=1 sm=1 tr=0 a=Tj3pCpwHnMupdyZSltBt7Q==:117 a=Tj3pCpwHnMupdyZSltBt7Q==:17 a=kj9zAlcOel0A:10 a=coam41J3Oa70qm_nbYcA:9 a=N0B3mWoZat11TZs3:21 a=LmM8FR45f129gBZ4:21 a=CjuIK1q_8ugA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Apr 2017 10:11:25 -0000 On Thu, 6 Apr 2017, Ngie Cooper wrote: > Log: > sbuf(9): convert SYNOPSIS section from .Fn entries to .Fo/.Fa/.Fc entries > > This shortens the column count on many lines considerably. This adds a lot of style bugs. It increases the macro count and the row count considerably. > While here, add "(void)" to sbuf_new_auto(3) for consistency with style(9) > recommendations. This has nothing to do with style 9. sbuf_new_auto() wasn't even declared with a prototype. Though it may have only been a style bug to not use prototypes in 1990, it is now sually a warning and thus an error if it is in a header file (since the user might enable -Werror and -Wsystem-headers might not be off to break warnings in system headers. > Modified: head/share/man/man9/sbuf.9 > ============================================================================== > --- head/share/man/man9/sbuf.9 Thu Apr 6 02:03:35 2017 (r316549) > +++ head/share/man/man9/sbuf.9 Thu Apr 6 02:40:52 2017 (r316550) > @@ -66,57 +66,135 @@ > .Ft typedef\ int ( sbuf_drain_func ) ( void\ *arg, const\ char\ *data, int\ len ) ; > .Pp > .Ft struct sbuf * > -.Fn sbuf_new "struct sbuf *s" "char *buf" "int length" "int flags" > +.Fo sbuf_new > +.Fa "struct sbuf *s" > +.Fa "char *buf" > +.Fa "int length" > +.Fa "int flags" > +.Fc The .Fn macro exists so that you don't have to write verbose macros for every arg, and so that the syntax resembles a C prototype and not a K&R- style list of args and their types. .Fo/.Fc is unfortunately sometimes necessary for long arg lists, if you want not-too-long lines. It can also be used for complex declarations. Perhaps for prototypes with nested protototypes. The nesting can be arbitrarily deep. Bruce