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

Re: any spaces ever?

From: <kfogel_at_collab.net>
Date: 2006-02-16 17:19:41 CET

Michael Sinz <Michael.Sinz@sinz.org> writes:
> My vote as to the style was based on the concept that the "(" was part of
> the function token (not really, but syntactically) So, I would claim that
> if the opening "(" is on the next line you break that rule and thus if you
> are looking for "function(" you will miss those cases.

Sorry for the misunderstanding. A vote about "space" (as opposed to
"whitespace") can be interpreted differently by reasonable people,
yeah. But there are many places in Subversion that didn't abide by
the convention you describe, even in code that used the no-space style
*before* r18471. For example libsvn_ra_svn/client.c:

   ______________________________________________________________________
  | /* Simplified version check to make sure we can safely use the |
  | VTABLE parameter. The RA loader does a more exhaustive check. */ |
  | if (loader_version->major != SVN_VER_MAJOR) |
  | { |
  | return svn_error_createf |
  | (SVN_ERR_VERSION_MISMATCH, NULL, |
  | _("Unsupported RA loader version (%d) for ra_svn"), |
  | loader_version->major); |
  | } |
  `----------------------------------------------------------------------'

One of the problems with putting the paren on the previous line is
that (at least in a default Emacs setup) it indents badly:

   ______________________________________________________________________
  | /* Simplified version check to make sure we can safely use the |
  | VTABLE parameter. The RA loader does a more exhaustive check. */ |
  | if (loader_version->major != SVN_VER_MAJOR) |
  | { |
  | return svn_error_createf( |
  | SVN_ERR_VERSION_MISMATCH, NULL, |
  | _("Unsupported RA loader vers[...]"), |
  | loader_version->major); |
  | } |
  `----------------------------------------------------------------------'

I'm pretty sure that it was because of that indentation problem that I
first started putting parens on the next line (long before Subversion,
of course).

-Karl

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 16 19:19:36 2006

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.