[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Long argument lines (was: [PATCH] v4. line_transformer callback)

From: Blair Zajac <blair_at_orcaware.com>
Date: Thu, 27 Aug 2009 17:16:15 -0700

Greg Stein wrote:
> On Thu, Aug 27, 2009 at 16:56, Blair Zajac<blair_at_orcaware.com> wrote:
>> Hyrum K. Wright wrote:
>>> On Aug 27, 2009, at 10:00 PM, Blair Zajac wrote:
>>>> void
>>>> svn_stream_set_line_transformer_callback
>>>> (svn_stream_t *stream,
>>>> svn_io_line_transformer_cb_t line_transformer_cb)
>>> I think no-space-before-paren disallows this. One convention I've
>>> seen in other parameter lists is:
>>> void
>>> svn_stream_set_line_transformer_callback(svn_stream_t *stream,
>>> svn_io_line_transformer_cb_t
>>> line_transformer_cb)
>> Is that line wrapped? I can't tell what the mailer did to this line. Do you
>> have a function in mind where you've seen this.
> It wrapped on me, too, so I dunno what he was doing. I suspect something like:
> void foo(int arg1,
> some_long_type_name
> indented_arg_name)
> but ugh. The solution to all this is simply:
> void foo(
> int arg1,
> some_long_type_name some_long_arg_name);
> Look at the typedef declarations in svn_editor.h. This is basically
> what Blair was doing, but keeping the paren next to the function name.
> Note that referring to svn_auth.h is probably not good, since that is
> an old file and most likely contains old whitespace brokenness from
> before our massive conversion. There simply shouldn't be any
> whitespace before an open paren in a typedef or function call or
> function definition.

Beating a dead horse, but even svn_client.h has this style when I searched
through the files alphabetically, and for 1.7 too :)

  * @note If there is no blame information for this line, @a revision will be
  * invalid and @a rev_props will be NULL. In this case @a local_change
  * will be true if the reason there is no blame information is that the line
  * was modified locally, In all other cases @a local_change will be false.
  * @since New in 1.7.
typedef svn_error_t *(*svn_client_blame_receiver3_t)
   (void *baton,

While we're nitpicking style, we don't change macros though?

#define svn_error_quick_wrap \
   (svn_error__locate(__FILE__,__LINE__), (svn_error_quick_wrap))


Received on 2009-08-28 07:56:21 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.