From owner-svn-src-all@FreeBSD.ORG Sun Jul 10 08:12:37 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBB03106564A; Sun, 10 Jul 2011 08:12:37 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id 7011E8FC14; Sun, 10 Jul 2011 08:12:37 +0000 (UTC) Received: from c122-106-165-191.carlnfd1.nsw.optusnet.com.au (c122-106-165-191.carlnfd1.nsw.optusnet.com.au [122.106.165.191]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id p6A8CXDQ009113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 10 Jul 2011 18:12:35 +1000 Date: Sun, 10 Jul 2011 18:12:33 +1000 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Kevin Lo In-Reply-To: <1310281634.2446.7.camel@srgsec> Message-ID: <20110710175609.Q2019@besplex.bde.org> References: <201107090743.p697huB2086379@svn.freebsd.org> <20110710020439.U2667@besplex.bde.org> <1310281634.2446.7.camel@srgsec> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Bruce Evans Subject: Re: svn commit: r223877 - in head: include/rpc lib/libc/xdr X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jul 2011 08:12:38 -0000 On Sun, 10 Jul 2011, Kevin Lo wrote: > On Sun, 2011-07-10 at 03:45 +1000, Bruce Evans wrote: >> On Sat, 9 Jul 2011, Kevin Lo wrote: >> >>> Log: >>> - Add xdr_sizeof(3) to libc >>> - Document xdr_sizeof(3); from NetBSD >>> >>> Discussed with: kib >> >> Any reason to further break the style of every changed line of the header? > > Does it break style(9)? Of course. I gave the details. style(9) doesn't give any examples of excessive indentation, although its exact rules for indentation became hard to see when it was mangled to become a man page (the mangling gives it the usual 5 space margins of man pages, so a 1 tab indentation becomes 13 space position which is reasonably well rendered as 1 tab followed by 5 spaces, but this destroys the literal tab structure of the source style). >>> Modified: head/include/rpc/xdr.h >>> ============================================================================== >>> --- head/include/rpc/xdr.h Fri Jul 8 20:41:12 2011 (r223876) >>> +++ head/include/rpc/xdr.h Sat Jul 9 07:43:56 2011 (r223877) >>> @@ -285,43 +285,46 @@ struct xdr_discrim { >>> * These are the "generic" xdr routines. >>> */ >>> __BEGIN_DECLS >>> -extern bool_t xdr_void(void); >>> -extern bool_t xdr_int(XDR *, int *); > [...] >> >> Old brokenness: bogus externs (they have no effect, except for some >> pre-K&R compilers, but even support for K&R was dropped long ago). style(9) and even xdr's own man page gives examples of the correct number of externs to use in prototypes (none). Like most of style(9), this rule is not explicitly stated but is only given as an example (by not using it). >> Another man page, rpc.3, says that the xdr's x_inline function pointer >> is for a function that returns `long *'. This is inconsistent with >> the int32_t returns for the xdr x_inline function remarked on above. >> It is also inconsistent with the actual declaration of the x_inline >> function pointer in xdr.h. That uses int32_t too. It was changed to >> use int32_t instead of long in 1996. > > Patches are welcome. Thanks! The patches are trivial except for man pages and type errors. First put almost everything back to where it was so that there is only 1 line of new style bugs... Removing all the externs is optional. I don't like to create large diffs even to remove such style bugs. You created large diffs to add nearby style bugs (the extra tabs). Bruce