From: Ian Jackson Subject: Re: [PATCH 14/15] libxl: New API for providing OS events to libxl Date: Mon, 12 Dec 2011 14:39:56 +0000 Message-ID: <20198.4668.762538.72762@mariner.uk.xensource.com> References: <1323108621-22654-1-git-send-email-ian.jackson@eu.citrix.com> <1323108621-22654-15-git-send-email-ian.jackson@eu.citrix.com> <20194.13560.873396.700831@mariner.uk.xensource.com> <20194.17095.512495.93972@mariner.uk.xensource.com> <1323699458.20077.227.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1323699458.20077.227.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org Ian Campbell writes ("Re: [Xen-devel] [PATCH 14/15] libxl: New API for providing OS events to libxl"): > One specific pitfall which trips me up is that when one has multiple > commented function prototypes in a block, thus: > > a_function(...) > /* describe function a... > * ... > * at length > */ > b_function(...) > /* describe function b... > * ... > * at length > */ > then figuring out which comment goes with which prototype is non-obvious I find these very confusing. There should be blank lines, like this: a_function(...) /* describe function a... * ... * at length */ b_function(...) /* describe function b... * ... * at length */ > and since I naturally look above the prototype for the comment I > inevitably get the wrong one. This is compounded somewhat because we > tend to document other types of object above rather than below and > function prototypes are therefore something of a special case. > (admittedly the correct solution here is more line breaks whatever the > style of commenting used) Yes :-). > We seem to have a mixture of both styles in libxl headers which is > obviously much worse than either option. If an opinion is needed to tip > the scales then I lean slightly towards commenting above but not > noticeably changing the style of commentary. OK, I will move them. Ian.