You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2015/01/16 21:40:52 UTC

svn commit: r1652524 - in /subversion/trunk/subversion/libsvn_fs_x: fs_x.c hotcopy.c pack.c recovery.c tree.c

Author: stefan2
Date: Fri Jan 16 20:40:52 2015
New Revision: 1652524

URL: http://svn.apache.org/r1652524
Log:
In FSX, structs shall have a "_t" suffix and a typedef for simplicity.
Fix this for remaining baton structs that violate it in FSX.

* subversion/libsvn_fs_x/fs_x.c
  (change_rev_prop_baton): Rename to ...
  (change_rev_prop_baton_t): ... this and typedef it.
  (change_rev_prop_body,
   svn_fs_x__change_rev_prop): Update references to it.

* subversion/libsvn_fs_x/hotcopy.c
  (hotcopy_body_baton): Rename to ...
  (hotcopy_body_baton_t): ... this and typedef it.
  (hotcopy_body,
   hotcopy_locking_src_body,
   svn_fs_x__hotcopy): Update references to it.

* subversion/libsvn_fs_x/pack.c
  (pack_baton): Rename to ...
  (pack_baton_t): ... this and typedef it.
  (pack_body,
   svn_fs_x__pack): Update references to it.

* subversion/libsvn_fs_x/recovery.c
  (recover_baton): Rename to ...
  (recover_baton_t): ... this and typedef it.
  (recover_body,
   svn_fs_x__recover): Update references to it.

* subversion/libsvn_fs_x/tree.c
  (fdic_baton): Rename to ...
  (fdic_baton_t): ... this and typedef it.
  (find_descendants_in_cache,
   dag_node_cache_invalidate): Update references to it.

  (text_baton_t): Add typedef
  (text_stream_writer,
   text_stream_closer,
   apply_text,
   x_apply_text): Shorten usage.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/fs_x.c
    subversion/trunk/subversion/libsvn_fs_x/hotcopy.c
    subversion/trunk/subversion/libsvn_fs_x/pack.c
    subversion/trunk/subversion/libsvn_fs_x/recovery.c
    subversion/trunk/subversion/libsvn_fs_x/tree.c

Modified: subversion/trunk/subversion/libsvn_fs_x/fs_x.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/fs_x.c?rev=1652524&r1=1652523&r2=1652524&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/fs_x.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/fs_x.c Fri Jan 16 20:40:52 2015
@@ -1123,22 +1123,22 @@ svn_fs_x__revision_prop(svn_string_t **v
 
 
 /* Baton used for change_rev_prop_body below. */
-struct change_rev_prop_baton {
+typedef struct change_rev_prop_baton_t {
   svn_fs_t *fs;
   svn_revnum_t rev;
   const char *name;
   const svn_string_t *const *old_value_p;
   const svn_string_t *value;
-};
+} change_rev_prop_baton_t;
 
 /* The work-horse for svn_fs_x__change_rev_prop, called with the FS
    write lock.  This implements the svn_fs_x__with_write_lock()
-   'body' callback type.  BATON is a 'struct change_rev_prop_baton *'. */
+   'body' callback type.  BATON is a 'change_rev_prop_baton_t *'. */
 static svn_error_t *
 change_rev_prop_body(void *baton,
                      apr_pool_t *scratch_pool)
 {
-  struct change_rev_prop_baton *cb = baton;
+  change_rev_prop_baton_t *cb = baton;
   apr_hash_t *table;
 
   SVN_ERR(svn_fs_x__revision_proplist(&table, cb->fs, cb->rev, scratch_pool));
@@ -1173,7 +1173,7 @@ svn_fs_x__change_rev_prop(svn_fs_t *fs,
                           const svn_string_t *value,
                           apr_pool_t *scratch_pool)
 {
-  struct change_rev_prop_baton cb;
+  change_rev_prop_baton_t cb;
 
   SVN_ERR(svn_fs__check_fs(fs, TRUE));
 

Modified: subversion/trunk/subversion/libsvn_fs_x/hotcopy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/hotcopy.c?rev=1652524&r1=1652523&r2=1652524&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/hotcopy.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/hotcopy.c Fri Jan 16 20:40:52 2015
@@ -710,7 +710,7 @@ hotcopy_revisions(svn_fs_t *src_fs,
 }
 
 /* Baton for hotcopy_body(). */
-struct hotcopy_body_baton {
+typedef struct hotcopy_body_baton_t {
   svn_fs_t *src_fs;
   svn_fs_t *dst_fs;
   svn_boolean_t incremental;
@@ -718,7 +718,7 @@ struct hotcopy_body_baton {
   void *notify_baton;
   svn_cancel_func_t cancel_func;
   void *cancel_baton;
-};
+} hotcopy_body_baton_t;
 
 /* Perform a hotcopy, either normal or incremental.
  *
@@ -742,7 +742,7 @@ static svn_error_t *
 hotcopy_body(void *baton,
              apr_pool_t *scratch_pool)
 {
-  struct hotcopy_body_baton *hbb = baton;
+  hotcopy_body_baton_t *hbb = baton;
   svn_fs_t *src_fs = hbb->src_fs;
   svn_fs_t *dst_fs = hbb->dst_fs;
   svn_boolean_t incremental = hbb->incremental;
@@ -881,7 +881,7 @@ static svn_error_t *
 hotcopy_locking_src_body(void *baton,
                          apr_pool_t *scratch_pool)
 {
-  struct hotcopy_body_baton *hbb = baton;
+  hotcopy_body_baton_t *hbb = baton;
 
   return svn_error_trace(svn_fs_x__with_pack_lock(hbb->src_fs, hotcopy_body,
                                                   baton, scratch_pool));
@@ -975,7 +975,7 @@ svn_fs_x__hotcopy(svn_fs_t *src_fs,
                   void *cancel_baton,
                   apr_pool_t *scratch_pool)
 {
-  struct hotcopy_body_baton hbb;
+  hotcopy_body_baton_t hbb;
 
   hbb.src_fs = src_fs;
   hbb.dst_fs = dst_fs;

Modified: subversion/trunk/subversion/libsvn_fs_x/pack.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/pack.c?rev=1652524&r1=1652523&r2=1652524&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/pack.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/pack.c Fri Jan 16 20:40:52 2015
@@ -2229,19 +2229,19 @@ pack_shard(const char *revs_dir,
   return SVN_NO_ERROR;
 }
 
-struct pack_baton
+typedef struct pack_baton_t
 {
   svn_fs_t *fs;
   svn_fs_pack_notify_t notify_func;
   void *notify_baton;
   svn_cancel_func_t cancel_func;
   void *cancel_baton;
-};
+} pack_baton_t;
 
 
 /* The work-horse for svn_fs_x__pack, called with the FS write lock.
    This implements the svn_fs_x__with_write_lock() 'body' callback
-   type.  BATON is a 'struct pack_baton *'.
+   type.  BATON is a 'pack_baton_t *'.
 
    WARNING: if you add a call to this function, please note:
      The code currently assumes that any piece of code running with
@@ -2257,7 +2257,7 @@ static svn_error_t *
 pack_body(void *baton,
           apr_pool_t *scratch_pool)
 {
-  struct pack_baton *pb = baton;
+  pack_baton_t *pb = baton;
   svn_fs_x__data_t *ffd = pb->fs->fsap_data;
   apr_int64_t completed_shards;
   apr_int64_t i;
@@ -2313,7 +2313,7 @@ svn_fs_x__pack(svn_fs_t *fs,
                void *cancel_baton,
                apr_pool_t *scratch_pool)
 {
-  struct pack_baton pb = { 0 };
+  pack_baton_t pb = { 0 };
   pb.fs = fs;
   pb.notify_func = notify_func;
   pb.notify_baton = notify_baton;

Modified: subversion/trunk/subversion/libsvn_fs_x/recovery.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/recovery.c?rev=1652524&r1=1652523&r2=1652524&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/recovery.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/recovery.c Fri Jan 16 20:40:52 2015
@@ -106,20 +106,20 @@ recover_get_largest_revision(svn_fs_t *f
 }
 
 /* Baton used for recover_body below. */
-struct recover_baton {
+typedef struct recover_baton_t {
   svn_fs_t *fs;
   svn_cancel_func_t cancel_func;
   void *cancel_baton;
-};
+} recover_baton_t;
 
 /* The work-horse for svn_fs_x__recover, called with the FS
    write lock.  This implements the svn_fs_x__with_write_lock()
-   'body' callback type.  BATON is a 'struct recover_baton *'. */
+   'body' callback type.  BATON is a 'recover_baton_t *'. */
 static svn_error_t *
 recover_body(void *baton,
              apr_pool_t *scratch_pool)
 {
-  struct recover_baton *b = baton;
+  recover_baton_t *b = baton;
   svn_fs_t *fs = b->fs;
   svn_fs_x__data_t *ffd = fs->fsap_data;
   svn_revnum_t max_rev;
@@ -246,10 +246,11 @@ recover_body(void *baton,
 /* This implements the fs_library_vtable_t.recover() API. */
 svn_error_t *
 svn_fs_x__recover(svn_fs_t *fs,
-                  svn_cancel_func_t cancel_func, void *cancel_baton,
+                  svn_cancel_func_t cancel_func,
+                  void *cancel_baton,
                   apr_pool_t *scratch_pool)
 {
-  struct recover_baton b;
+  recover_baton_t b;
 
   /* We have no way to take out an exclusive lock in FSX, so we're
      restricted as to the types of recovery we can do.  Luckily,

Modified: subversion/trunk/subversion/libsvn_fs_x/tree.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/tree.c?rev=1652524&r1=1652523&r2=1652524&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/tree.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/tree.c Fri Jan 16 20:40:52 2015
@@ -444,11 +444,12 @@ dag_node_cache_set(svn_fs_root_t *root,
 
 
 /* Baton for find_descendants_in_cache. */
-struct fdic_baton {
+typedef struct fdic_baton_t
+{
   const char *path;
   apr_array_header_t *list;
   apr_pool_t *pool;
-};
+} fdic_baton_t;
 
 /* If the given item is a descendant of BATON->PATH, push
  * it onto BATON->LIST (copying into BATON->POOL).  Implements
@@ -460,7 +461,7 @@ find_descendants_in_cache(void *baton,
                           void *val,
                           apr_pool_t *pool)
 {
-  struct fdic_baton *b = baton;
+  fdic_baton_t *b = baton;
   const char *item_path = key;
 
   if (svn_fspath__skip_ancestor(b->path, item_path))
@@ -476,7 +477,7 @@ dag_node_cache_invalidate(svn_fs_root_t
                           const char *path,
                           apr_pool_t *scratch_pool)
 {
-  struct fdic_baton b;
+  fdic_baton_t b;
   svn_cache__t *cache;
   apr_pool_t *iterpool;
   int i;
@@ -3024,7 +3025,7 @@ x_apply_textdelta(svn_txdelta_window_han
 /* --- Machinery for svn_fs_apply_text() ---  */
 
 /* Baton for svn_fs_apply_text(). */
-struct text_baton_t
+typedef struct text_baton_t
 {
   /* The original file info */
   svn_fs_root_t *root;
@@ -3045,7 +3046,7 @@ struct text_baton_t
 
   /* Pool used by db txns */
   apr_pool_t *pool;
-};
+} text_baton_t;
 
 
 /* A wrapper around svn_fs_x__dag_finalize_edits, but for
@@ -3064,7 +3065,7 @@ text_stream_writer(void *baton,
                    const char *data,
                    apr_size_t *len)
 {
-  struct text_baton_t *tb = baton;
+  text_baton_t *tb = baton;
 
   /* Psst, here's some data.  Pass it on to the -real- file stream. */
   return svn_stream_write(tb->file_stream, data, len);
@@ -3074,7 +3075,7 @@ text_stream_writer(void *baton,
 static svn_error_t *
 text_stream_closer(void *baton)
 {
-  struct text_baton_t *tb = baton;
+  text_baton_t *tb = baton;
 
   /* Close the internal-use stream.  ### This used to be inside of
      txn_body_fulltext_finalize_edits(), but that invoked a nested
@@ -3093,7 +3094,7 @@ static svn_error_t *
 apply_text(void *baton,
            apr_pool_t *scratch_pool)
 {
-  struct text_baton_t *tb = baton;
+  text_baton_t *tb = baton;
   parent_path_t *parent_path;
   svn_fs_x__txn_id_t txn_id = root_txn_id(tb->root);
 
@@ -3139,7 +3140,7 @@ x_apply_text(svn_stream_t **contents_p,
              apr_pool_t *pool)
 {
   apr_pool_t *subpool = svn_pool_create(pool);
-  struct text_baton_t *tb = apr_pcalloc(pool, sizeof(*tb));
+  text_baton_t *tb = apr_pcalloc(pool, sizeof(*tb));
 
   tb->root = root;
   tb->path = svn_fs__canonicalize_abspath(path, pool);