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

[PATCH] excise useless line continuations

From: Peter Samuelson <peter_at_p12n.org>
Date: 2007-04-11 02:58:00 CEST

I dunno, maybe some people think these extra \ are charming, but to me
they look a bit jarring.

[[[
Remove useless \ line continuations from C code.

* subversion/libsvn_subr/win32_crashrpt.c (svn__unhandled_exception_filter)
* subversion/libsvn_client/merge.c (do_merge, discover_and_merge_children)
* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
  (svn_swig_rb_to_depth, svn_swig_rb_get_commit_log_func,
   svn_swig_rb_auth_simple_prompt_func,
   svn_swig_rb_auth_ssl_client_cert_prompt_func,
   svn_swig_rb_auth_ssl_client_cert_pw_prompt_func)
* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
  (svn_swig_py_auth_simple_prompt_func, svn_swig_py_auth_username_prompt_func,
   svn_swig_py_auth_ssl_client_cert_prompt_func,
   svn_swig_py_auth_ssl_client_cert_pw_prompt_func)
* subversion/mod_dav_svn/reports/update.c (dav_svn__update_report)
* subversion/mod_dav_svn/reports/file-revs.c (dav_svn__file_revs_report):
  Remove unnecessary trailing \ characters.

Patch by: Peter Samuelson <peter@p12n.org>
]]]

Index: subversion/libsvn_subr/win32_crashrpt.c
===================================================================
--- subversion/libsvn_subr/win32_crashrpt.c (revisione 24524)
+++ subversion/libsvn_subr/win32_crashrpt.c (copia locale)
@@ -762,14 +762,14 @@
   cleanup_debughlp();
 
   /* inform the user */
- fprintf(stderr, "This application has halted due to an unexpected error.\n"\
- "A crash report and minidump file were saved to disk, you"\
- " can find them here:\n"\
- "%s\n%s\n"\
- "Please send the log file to %s to help us analyse\nand "\
- "solve this problem.\n\n"\
- "NOTE: The crash report and minidump files can contain some"\
- " sensitive information\n(filenames, partial file content, "\
+ fprintf(stderr, "This application has halted due to an unexpected error.\n"
+ "A crash report and minidump file were saved to disk, you"
+ " can find them here:\n"
+ "%s\n%s\n"
+ "Please send the log file to %s to help us analyse\nand "
+ "solve this problem.\n\n"
+ "NOTE: The crash report and minidump files can contain some"
+ " sensitive information\n(filenames, partial file content, "
                   "usernames and passwords etc.)\n",
                   log_filename,
                   dmp_filename,
Index: subversion/libsvn_client/merge.c
===================================================================
--- subversion/libsvn_client/merge.c (revisione 24524)
+++ subversion/libsvn_client/merge.c (copia locale)
@@ -1597,7 +1597,7 @@
               if (svn_path_is_ancestor(target_wcpath, child_wcpath) &&
                   strcmp(child_wcpath, target_wcpath) != 0)
                 {
- child_repos_path = child_wcpath + \
+ child_repos_path = child_wcpath +
                     (target_wcpath_len ? target_wcpath_len + 1 : 0);
                   SVN_ERR(reporter->set_path(report_baton, child_repos_path,
                                              is_revert ? r->end - 1 : r->end,
@@ -1981,7 +1981,7 @@
         continue;
       SVN_ERR(svn_wc__entry_versioned(&child_entry, child_wcpath, adm_access,
                                       FALSE, pool));
- child_repos_path = child_wcpath + \
+ child_repos_path = child_wcpath +
         (merge_target_len ? merge_target_len + 1 : 0);
       child_url = svn_path_join(parent_wc_url, child_repos_path, pool);
       if (child_entry->kind == svn_node_file)
Index: subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c
===================================================================
--- subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (revisione 24524)
+++ subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c (copia locale)
@@ -782,7 +782,7 @@
     return NUM2INT(value);
   } else {
     rb_raise(rb_eArgError,
- "'%s' must be DEPTH_STRING (e.g. \"infinity\") " \
+ "'%s' must be DEPTH_STRING (e.g. \"infinity\") "
              "or Svn::Core::DEPTH_*",
              r2c_inspect(value));
   }
@@ -2033,7 +2033,7 @@
 
     if (!err) {
       char error_message[] =
- "log_msg_func should return an array not '%s': " \
+ "log_msg_func should return an array not '%s': "
         "[TRUE_IF_IT_IS_MESSAGE, MESSAGE_OR_FILE_AS_STRING]";
 
       if (!RTEST(rb_obj_is_kind_of(result, rb_cArray)))
@@ -2689,9 +2689,9 @@
       r2c_swig_type2(result, "svn_auth_cred_simple_t *", &result_cred);
       tmp_cred = (svn_auth_cred_simple_t *)result_cred;
       new_cred = apr_pcalloc(pool, sizeof(*new_cred));
- new_cred->username = tmp_cred->username ? \
+ new_cred->username = tmp_cred->username ?
         apr_pstrdup(pool, tmp_cred->username) : NULL;
- new_cred->password = tmp_cred->password ? \
+ new_cred->password = tmp_cred->password ?
         apr_pstrdup(pool, tmp_cred->password) : NULL;
       new_cred->may_save = tmp_cred->may_save;
     }
@@ -2732,7 +2732,7 @@
       r2c_swig_type2(result, "svn_auth_cred_username_t *", &result_cred);
       tmp_cred = (svn_auth_cred_username_t *)result_cred;
       new_cred = apr_pcalloc(pool, sizeof(*new_cred));
- new_cred->username = tmp_cred->username ? \
+ new_cred->username = tmp_cred->username ?
         apr_pstrdup(pool, tmp_cred->username) : NULL;
       new_cred->may_save = tmp_cred->may_save;
     }
@@ -2820,7 +2820,7 @@
                      &result_cred);
       tmp_cred = (svn_auth_cred_ssl_client_cert_t *)result_cred;
       new_cred = apr_pcalloc(pool, sizeof(*new_cred));
- new_cred->cert_file = tmp_cred->cert_file ? \
+ new_cred->cert_file = tmp_cred->cert_file ?
         apr_pstrdup(pool, tmp_cred->cert_file) : NULL;
       new_cred->may_save = tmp_cred->may_save;
     }
@@ -2863,7 +2863,7 @@
                      &result_cred);
       tmp_cred = (svn_auth_cred_ssl_client_cert_pw_t *)result_cred;
       new_cred = apr_pcalloc(pool, sizeof(*new_cred));
- new_cred->password = tmp_cred->password ? \
+ new_cred->password = tmp_cred->password ?
         apr_pstrdup(pool, tmp_cred->password) : NULL;
       new_cred->may_save = tmp_cred->may_save;
     }
Index: subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c
===================================================================
--- subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (revisione 24524)
+++ subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c (copia locale)
@@ -2260,9 +2260,9 @@
           else
             {
               creds = apr_pcalloc(pool, sizeof(*creds));
- creds->username = tmp_creds->username ? \
+ creds->username = tmp_creds->username ?
                 apr_pstrdup(pool, tmp_creds->username) : NULL;
- creds->password = tmp_creds->password ? \
+ creds->password = tmp_creds->password ?
                 apr_pstrdup(pool, tmp_creds->password) : NULL;
               creds->may_save = tmp_creds->may_save;
             }
@@ -2311,7 +2311,7 @@
           else
             {
               creds = apr_pcalloc(pool, sizeof(*creds));
- creds->username = tmp_creds->username ? \
+ creds->username = tmp_creds->username ?
                 apr_pstrdup(pool, tmp_creds->username) : NULL;
               creds->may_save = tmp_creds->may_save;
             }
@@ -2415,7 +2415,7 @@
           else
             {
               creds = apr_pcalloc(pool, sizeof(*creds));
- creds->cert_file = tmp_creds->cert_file ? \
+ creds->cert_file = tmp_creds->cert_file ?
                 apr_pstrdup(pool, tmp_creds->cert_file) : NULL;
               creds->may_save = tmp_creds->may_save;
             }
@@ -2467,7 +2467,7 @@
           else
             {
               creds = apr_pcalloc(pool, sizeof(*creds));
- creds->password = tmp_creds->password ? \
+ creds->password = tmp_creds->password ?
                 apr_pstrdup(pool, tmp_creds->password) : NULL;
               creds->may_save = tmp_creds->may_save;
             }
Index: subversion/mod_dav_svn/reports/update.c
===================================================================
--- subversion/mod_dav_svn/reports/update.c (revisione 24524)
+++ subversion/mod_dav_svn/reports/update.c (copia locale)
@@ -1290,14 +1290,14 @@
         /* diff/merge don't ask for inline text-deltas. */
         if (!uc.send_all && strcmp(spath, dst_path) == 0)
           action = apr_psprintf(resource->pool,
- "diff-or-merge '%s' r%" SVN_REVNUM_T_FMT \
+ "diff-or-merge '%s' r%" SVN_REVNUM_T_FMT
                                  ":%" SVN_REVNUM_T_FMT,
                                 svn_path_uri_encode(spath, resource->pool),
                                 from_revnum,
                                 revnum);
         else
           action = apr_psprintf(resource->pool,
- "%s '%s@%" SVN_REVNUM_T_FMT "'" \
+ "%s '%s@%" SVN_REVNUM_T_FMT "'"
                                  " '%s@%" SVN_REVNUM_T_FMT "'",
                                 (uc.send_all ? "switch" : "diff-or-merge"),
                                 svn_path_uri_encode(spath, resource->pool),
Index: subversion/mod_dav_svn/reports/file-revs.c
===================================================================
--- subversion/mod_dav_svn/reports/file-revs.c (revisione 24524)
+++ subversion/mod_dav_svn/reports/file-revs.c (copia locale)
@@ -311,7 +311,7 @@
 
   /* We've detected a 'high level' svn action to log. */
   apr_table_set(resource->info->r->subprocess_env, "SVN-ACTION",
- apr_psprintf(resource->pool, "blame '%s' r%" SVN_REVNUM_T_FMT \
+ apr_psprintf(resource->pool, "blame '%s' r%" SVN_REVNUM_T_FMT
                                              ":%" SVN_REVNUM_T_FMT,
                              svn_path_uri_encode(path, resource->pool),
                              start, end));

Received on Wed Apr 11 02:58:23 2007

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.