[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? (was: Results of: [VOTE] New space-before-parens ...)

From: <kfogel_at_collab.net>
Date: 2006-02-16 05:05:15 CET

Greg Stein <gstein@lyra.org> writes:
> Part of the dev-process with the no-space model is being able to
> search for "dir(" so that you can find calls to the svn_fs_make_dir
> function without picking up "dir" in random places. And without having
> to type the full svn_fs_make_dir. Yup, a user strategy, but an
> incredibly effective/efficient one.

Hmm, I hadn't thought of that.

We haven't been observing this convention in our code very much.
Function calls will put the paren on the same line as the function's
name when the first parameter also fits on that line, but when the
first parameter is on the next line, we usually (but not always) put
the paren on the next line too. Now that you mention it, the most
consistent exception to that is code written by you... I always
wondered what was up with, e.g., this from libsvn_ra_dav/session.c:

      authorities = svn_config_get_server_setting(
            cfg, server_group,
            SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES,
            NULL);
      
Now I know :-). Nice tactic. (It happens even more often in
declarations, where it's less useful I guess, but whatever.)

Anyway, one of the effects of r18471 was to undo a lot of those cases.
Not all of them -- it turns out I missed 28, due to silly reasons not
worth going into here. Now, I could put back the old cases, but
they'd still be a minority and we'd be inconsistent. Or I could apply
the patch below which "fixes" (or breaks, depending on how you look at
it) the 28 remaining instances. I was about to test & commit this
when I read your mail and decided to hold off.

Thoughts? Greg? Anyone? Bueller?

--------------------8-<-------cut-here---------8-<-----------------------
[[[
Follow up to r18471 with some more reformatting:

r18471 missed a few cases where the open paren of a function's
parameter list was on the same line of the function's name while the
first parameter was on the next line.
]]]

Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h
===================================================================
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h (revision 18474)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.h (working copy)
@@ -198,43 +198,43 @@
 
 
 /* auth provider callbacks */
-svn_error_t *svn_swig_rb_auth_simple_prompt_func(
- svn_auth_cred_simple_t **cred,
- void *baton,
- const char *realm,
- const char *username,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_rb_auth_simple_prompt_func
+ (svn_auth_cred_simple_t **cred,
+ void *baton,
+ const char *realm,
+ const char *username,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
-svn_error_t *svn_swig_rb_auth_username_prompt_func(
- svn_auth_cred_username_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_rb_auth_username_prompt_func
+ (svn_auth_cred_username_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
-svn_error_t *svn_swig_rb_auth_ssl_server_trust_prompt_func(
- svn_auth_cred_ssl_server_trust_t **cred,
- void *baton,
- const char *realm,
- apr_uint32_t failures,
- const svn_auth_ssl_server_cert_info_t *cert_info,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_rb_auth_ssl_server_trust_prompt_func
+ (svn_auth_cred_ssl_server_trust_t **cred,
+ void *baton,
+ const char *realm,
+ apr_uint32_t failures,
+ const svn_auth_ssl_server_cert_info_t *cert_info,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
-svn_error_t *svn_swig_rb_auth_ssl_client_cert_prompt_func(
- svn_auth_cred_ssl_client_cert_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_rb_auth_ssl_client_cert_prompt_func
+ (svn_auth_cred_ssl_client_cert_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
-svn_error_t *svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
- svn_auth_cred_ssl_client_cert_pw_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_rb_auth_ssl_client_cert_pw_prompt_func
+ (svn_auth_cred_ssl_client_cert_pw_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 apr_file_t *svn_swig_rb_make_file(VALUE file, apr_pool_t *pool);
 svn_stream_t *svn_swig_rb_make_stream(VALUE io);
Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
===================================================================
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (revision 18474)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (working copy)
@@ -2206,14 +2206,14 @@
 }
 
 svn_error_t *
-svn_swig_rb_auth_ssl_server_trust_prompt_func(
- svn_auth_cred_ssl_server_trust_t **cred,
- void *baton,
- const char *realm,
- apr_uint32_t failures,
- const svn_auth_ssl_server_cert_info_t *cert_info,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_rb_auth_ssl_server_trust_prompt_func
+ (svn_auth_cred_ssl_server_trust_t **cred,
+ void *baton,
+ const char *realm,
+ apr_uint32_t failures,
+ const svn_auth_ssl_server_cert_info_t *cert_info,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   svn_auth_cred_ssl_server_trust_t *new_cred = NULL;
   svn_error_t *err = SVN_NO_ERROR;
@@ -2251,12 +2251,12 @@
 }
 
 svn_error_t *
-svn_swig_rb_auth_ssl_client_cert_prompt_func(
- svn_auth_cred_ssl_client_cert_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_rb_auth_ssl_client_cert_prompt_func
+ (svn_auth_cred_ssl_client_cert_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   svn_auth_cred_ssl_client_cert_t *new_cred = NULL;
   svn_error_t *err = SVN_NO_ERROR;
@@ -2294,12 +2294,12 @@
 }
 
 svn_error_t *
-svn_swig_rb_auth_ssl_client_cert_pw_prompt_func(
- svn_auth_cred_ssl_client_cert_pw_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_rb_auth_ssl_client_cert_pw_prompt_func
+ (svn_auth_cred_ssl_client_cert_pw_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   svn_auth_cred_ssl_client_cert_pw_t *new_cred = NULL;
   svn_error_t *err = SVN_NO_ERROR;
Index: subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
===================================================================
--- subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (revision 18474)
+++ subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (working copy)
@@ -1955,14 +1955,14 @@
 
 
 svn_error_t *
-svn_swig_py_auth_ssl_server_trust_prompt_func(
- svn_auth_cred_ssl_server_trust_t **cred,
- void *baton,
- const char *realm,
- apr_uint32_t failures,
- const svn_auth_ssl_server_cert_info_t *cert_info,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_py_auth_ssl_server_trust_prompt_func
+ (svn_auth_cred_ssl_server_trust_t **cred,
+ void *baton,
+ const char *realm,
+ apr_uint32_t failures,
+ const svn_auth_ssl_server_cert_info_t *cert_info,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   PyObject *function = baton;
   PyObject *result;
@@ -2007,12 +2007,12 @@
 }
 
 svn_error_t *
-svn_swig_py_auth_ssl_client_cert_prompt_func(
- svn_auth_cred_ssl_client_cert_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_py_auth_ssl_client_cert_prompt_func
+ (svn_auth_cred_ssl_client_cert_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   PyObject *function = baton;
   PyObject *result;
@@ -2058,12 +2058,12 @@
 }
 
 svn_error_t *
-svn_swig_py_auth_ssl_client_cert_pw_prompt_func(
- svn_auth_cred_ssl_client_cert_pw_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_swig_py_auth_ssl_client_cert_pw_prompt_func
+ (svn_auth_cred_ssl_client_cert_pw_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
   PyObject *function = baton;
   PyObject *result;
Index: subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h
===================================================================
--- subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (revision 18474)
+++ subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.h (working copy)
@@ -261,47 +261,47 @@
 
 /* auth provider callbacks */
 SVN_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_py_auth_simple_prompt_func(
- svn_auth_cred_simple_t **cred,
- void *baton,
- const char *realm,
- const char *username,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_py_auth_simple_prompt_func
+ (svn_auth_cred_simple_t **cred,
+ void *baton,
+ const char *realm,
+ const char *username,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 SVN_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_py_auth_username_prompt_func(
- svn_auth_cred_username_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_py_auth_username_prompt_func
+ (svn_auth_cred_username_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 SVN_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_py_auth_ssl_server_trust_prompt_func(
- svn_auth_cred_ssl_server_trust_t **cred,
- void *baton,
- const char *realm,
- apr_uint32_t failures,
- const svn_auth_ssl_server_cert_info_t *cert_info,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_py_auth_ssl_server_trust_prompt_func
+ (svn_auth_cred_ssl_server_trust_t **cred,
+ void *baton,
+ const char *realm,
+ apr_uint32_t failures,
+ const svn_auth_ssl_server_cert_info_t *cert_info,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 SVN_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_py_auth_ssl_client_cert_prompt_func(
- svn_auth_cred_ssl_client_cert_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_py_auth_ssl_client_cert_prompt_func
+ (svn_auth_cred_ssl_client_cert_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 SVN_SWIG_SWIGUTIL_EXPORT
-svn_error_t *svn_swig_py_auth_ssl_client_cert_pw_prompt_func(
- svn_auth_cred_ssl_client_cert_pw_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool);
+svn_error_t *svn_swig_py_auth_ssl_client_cert_pw_prompt_func
+ (svn_auth_cred_ssl_client_cert_pw_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool);
 
 #ifdef __cplusplus
 }
Index: subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c
===================================================================
--- subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (revision 18474)
+++ subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c (working copy)
@@ -962,14 +962,14 @@
     return SVN_NO_ERROR;
 }
 
-svn_error_t *svn_swig_pl_thunk_ssl_server_trust_prompt(
- svn_auth_cred_ssl_server_trust_t **cred,
- void *baton,
- const char *realm,
- apr_uint32_t failures,
- const svn_auth_ssl_server_cert_info_t *cert_info,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_error_t *svn_swig_pl_thunk_ssl_server_trust_prompt
+ (svn_auth_cred_ssl_server_trust_t **cred,
+ void *baton,
+ const char *realm,
+ apr_uint32_t failures,
+ const svn_auth_ssl_server_cert_info_t *cert_info,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
     /* Be nice and allocate the memory for the cred structure before passing it
      * off to the perl space */
@@ -996,12 +996,12 @@
     return SVN_NO_ERROR;
 }
 
-svn_error_t *svn_swig_pl_thunk_ssl_client_cert_prompt(
- svn_auth_cred_ssl_client_cert_t **cred,
- void *baton,
- const char * realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_error_t *svn_swig_pl_thunk_ssl_client_cert_prompt
+ (svn_auth_cred_ssl_client_cert_t **cred,
+ void *baton,
+ const char * realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
     /* Be nice and allocate the memory for the cred structure before passing it
      * off to the perl space */
@@ -1017,12 +1017,12 @@
     return SVN_NO_ERROR;
 }
 
-svn_error_t *svn_swig_pl_thunk_ssl_client_cert_pw_prompt(
- svn_auth_cred_ssl_client_cert_pw_t **cred,
- void *baton,
- const char *realm,
- svn_boolean_t may_save,
- apr_pool_t *pool)
+svn_error_t *svn_swig_pl_thunk_ssl_client_cert_pw_prompt
+ (svn_auth_cred_ssl_client_cert_pw_t **cred,
+ void *baton,
+ const char *realm,
+ svn_boolean_t may_save,
+ apr_pool_t *pool)
 {
     /* Be nice and allocate the memory for the cred structure before passing it
      * off to the perl space */
Index: subversion/libsvn_ra_serf/propfind_buckets.c
===================================================================
--- subversion/libsvn_ra_serf/propfind_buckets.c (revision 18474)
+++ subversion/libsvn_ra_serf/propfind_buckets.c (working copy)
@@ -42,13 +42,13 @@
 #define PROPFIND_HEADER "<?xml version=\"1.0\" encoding=\"utf-8\"?><propfind xmlns=\"DAV:\">"
 #define PROPFIND_TRAILER "</propfind>"
 
-serf_bucket_t * serf_bucket_propfind_create(
- const char *host,
- const char *path,
- const char *label,
- const char *depth,
- const dav_props_t *find_props,
- serf_bucket_alloc_t *allocator)
+serf_bucket_t * serf_bucket_propfind_create
+ (const char *host,
+ const char *path,
+ const char *label,
+ const char *depth,
+ const dav_props_t *find_props,
+ serf_bucket_alloc_t *allocator)
 {
     prop_context_t *ctx;
 
Index: subversion/mod_dav_svn/deadprops.c
===================================================================
--- subversion/mod_dav_svn/deadprops.c (revision 18474)
+++ subversion/mod_dav_svn/deadprops.c (working copy)
@@ -323,10 +323,10 @@
   return NULL;
 }
 
-static dav_error *dav_svn_db_map_namespaces(
- dav_db *db,
- const apr_array_header_t *namespaces,
- dav_namespace_map **mapping)
+static dav_error *dav_svn_db_map_namespaces
+ (dav_db *db,
+ const apr_array_header_t *namespaces,
+ dav_namespace_map **mapping)
 {
   /* we don't need a namespace mapping right now. nothing to do */
 
Index: subversion/mod_dav_svn/repos.c
===================================================================
--- subversion/mod_dav_svn/repos.c (revision 18474)
+++ subversion/mod_dav_svn/repos.c (working copy)
@@ -850,9 +850,9 @@
                        "DESIGN FAILURE: unknown resource type");
 }
 
-static dav_resource *dav_svn_create_private_resource(
- const dav_resource *base,
- enum dav_svn_private_restype restype)
+static dav_resource *dav_svn_create_private_resource
+ (const dav_resource *base,
+ enum dav_svn_private_restype restype)
 {
   dav_resource_combined *comb;
   svn_stringbuf_t *path;
Index: subversion/libsvn_ra_dav/merge.c
===================================================================
--- subversion/libsvn_ra_dav/merge.c (revision 18474)
+++ subversion/libsvn_ra_dav/merge.c (working copy)
@@ -660,19 +660,19 @@
 
 
 
-svn_error_t * svn_ra_dav__merge_activity(
- svn_revnum_t *new_rev,
- const char **committed_date,
- const char **committed_author,
- const char **post_commit_err,
- svn_ra_dav__session_t *ras,
- const char *repos_url,
- const char *activity_url,
- apr_hash_t *valid_targets,
- apr_hash_t *lock_tokens,
- svn_boolean_t keep_locks,
- svn_boolean_t disable_merge_response,
- apr_pool_t *pool)
+svn_error_t * svn_ra_dav__merge_activity
+ (svn_revnum_t *new_rev,
+ const char **committed_date,
+ const char **committed_author,
+ const char **post_commit_err,
+ svn_ra_dav__session_t *ras,
+ const char *repos_url,
+ const char *activity_url,
+ apr_hash_t *valid_targets,
+ apr_hash_t *lock_tokens,
+ svn_boolean_t keep_locks,
+ svn_boolean_t disable_merge_response,
+ apr_pool_t *pool)
 {
   merge_ctx_t mc = { 0 };
   const char *body;
Index: subversion/libsvn_ra_dav/session.c
===================================================================
--- subversion/libsvn_ra_dav/session.c (revision 18474)
+++ subversion/libsvn_ra_dav/session.c (working copy)
@@ -781,10 +781,10 @@
   if (is_ssl_session)
     {
       const char *authorities, *trust_default_ca;
- authorities = svn_config_get_server_setting(
- cfg, server_group,
- SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES,
- NULL);
+ authorities = svn_config_get_server_setting
+ (cfg, server_group,
+ SVN_CONFIG_OPTION_SSL_AUTHORITY_FILES,
+ NULL);
       
       if (authorities != NULL)
         {
@@ -820,10 +820,10 @@
       ne_ssl_provide_clicert(sess2, client_ssl_callback, ras);
 
       /* See if the user wants us to trust "default" openssl CAs. */
- trust_default_ca = svn_config_get_server_setting(
- cfg, server_group,
- SVN_CONFIG_OPTION_SSL_TRUST_DEFAULT_CA,
- "true");
+ trust_default_ca = svn_config_get_server_setting
+ (cfg, server_group,
+ SVN_CONFIG_OPTION_SSL_TRUST_DEFAULT_CA,
+ "true");
 
       if (strcasecmp(trust_default_ca, "true") == 0)
         {
Index: subversion/libsvn_ra_dav/options.c
===================================================================
--- subversion/libsvn_ra_dav/options.c (revision 18474)
+++ subversion/libsvn_ra_dav/options.c (working copy)
@@ -97,11 +97,11 @@
   return SVN_RA_DAV__XML_VALID;
 }
 
-svn_error_t * svn_ra_dav__get_activity_collection(
- const svn_string_t **activity_coll,
- svn_ra_dav__session_t *ras,
- const char *url,
- apr_pool_t *pool)
+svn_error_t * svn_ra_dav__get_activity_collection
+ (const svn_string_t **activity_coll,
+ svn_ra_dav__session_t *ras,
+ const char *url,
+ apr_pool_t *pool)
 {
   options_ctx_t oc = { 0 };
 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Feb 16 06:47:37 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.