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 2014/10/31 00:43:43 UTC

svn commit: r1635643 - in /subversion/trunk/subversion/libsvn_fs_x: low_level.c low_level.h

Author: stefan2
Date: Thu Oct 30 23:43:43 2014
New Revision: 1635643

URL: http://svn.apache.org/r1635643
Log:
Remove unused functions from FSX.

* subversion/libsvn_fs_x/low_level.h
  (svn_fs_x__parse_revision_trailer,
   svn_fs_x__unparse_revision_trailer): Drop as FSX rev / pack files don't
                                        have revision trailers.

* subversion/libsvn_fs_x/low_level.c
  (svn_fs_x__parse_revision_trailer,
   svn_fs_x__unparse_revision_trailer): Ditto.

Modified:
    subversion/trunk/subversion/libsvn_fs_x/low_level.c
    subversion/trunk/subversion/libsvn_fs_x/low_level.h

Modified: subversion/trunk/subversion/libsvn_fs_x/low_level.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/low_level.c?rev=1635643&r1=1635642&r2=1635643&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/low_level.c (original)
+++ subversion/trunk/subversion/libsvn_fs_x/low_level.c Thu Oct 30 23:43:43 2014
@@ -72,95 +72,6 @@
 #define MAX_CHANGE_LINE_LEN FSX_MAX_PATH_LEN + 256
 
 svn_error_t *
-svn_fs_x__parse_revision_trailer(apr_off_t *root_offset,
-                                 apr_off_t *changes_offset,
-                                 svn_stringbuf_t *trailer,
-                                 svn_revnum_t rev)
-{
-  int i, num_bytes;
-  const char *str;
-
-  /* This cast should be safe since the maximum amount read, 64, will
-     never be bigger than the size of an int. */
-  num_bytes = (int) trailer->len;
-
-  /* The last byte should be a newline. */
-  if (trailer->len == 0 || trailer->data[trailer->len - 1] != '\n')
-    {
-      return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                               _("Revision file (r%ld) lacks trailing newline"),
-                               rev);
-    }
-
-  /* Look for the next previous newline. */
-  for (i = num_bytes - 2; i >= 0; i--)
-    {
-      if (trailer->data[i] == '\n')
-        break;
-    }
-
-  if (i < 0)
-    {
-      return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                               _("Final line in revision file (r%ld) longer "
-                                 "than 64 characters"),
-                               rev);
-    }
-
-  i++;
-  str = &trailer->data[i];
-
-  /* find the next space */
-  for ( ; i < (num_bytes - 2) ; i++)
-    if (trailer->data[i] == ' ')
-      break;
-
-  if (i == (num_bytes - 2))
-    return svn_error_createf(SVN_ERR_FS_CORRUPT, NULL,
-                             _("Final line in revision file r%ld missing space"),
-                             rev);
-
-  if (root_offset)
-    {
-      apr_int64_t val;
-
-      trailer->data[i] = '\0';
-      SVN_ERR(svn_cstring_atoi64(&val, str));
-      *root_offset = (apr_off_t)val;
-    }
-
-  i++;
-  str = &trailer->data[i];
-
-  /* find the next newline */
-  for ( ; i < num_bytes; i++)
-    if (trailer->data[i] == '\n')
-      break;
-
-  if (changes_offset)
-    {
-      apr_int64_t val;
-
-      trailer->data[i] = '\0';
-      SVN_ERR(svn_cstring_atoi64(&val, str));
-      *changes_offset = (apr_off_t)val;
-    }
-
-  return SVN_NO_ERROR;
-}
-
-svn_stringbuf_t *
-svn_fs_x__unparse_revision_trailer(apr_off_t root_offset,
-                                   apr_off_t changes_offset,
-                                   apr_pool_t *result_pool)
-{
-  return svn_stringbuf_createf(result_pool,
-                               "%" APR_OFF_T_FMT " %" APR_OFF_T_FMT "\n",
-                               root_offset,
-                               changes_offset);
-}
-
-svn_error_t *
 svn_fs_x__parse_footer(apr_off_t *l2p_offset,
                        apr_off_t *p2l_offset,
                        svn_stringbuf_t *footer,

Modified: subversion/trunk/subversion/libsvn_fs_x/low_level.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_x/low_level.h?rev=1635643&r1=1635642&r2=1635643&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_x/low_level.h (original)
+++ subversion/trunk/subversion/libsvn_fs_x/low_level.h Thu Oct 30 23:43:43 2014
@@ -45,29 +45,6 @@ extern "C" {
  * - changed path list
  */
 
-/* Given the last "few" bytes (should be at least 40) of revision REV in
- * TRAILER,  parse the last line and return the offset of the root noderev
- * in *ROOT_OFFSET and the offset of the changed paths list in
- * *CHANGES_OFFSET.  Offsets are relative to the revision's start offset.
- * ROOT_OFFSET and / or CHANGES_OFFSET may be NULL.
- * 
- * Note that REV is only used to construct nicer error objects.
- */
-svn_error_t *
-svn_fs_x__parse_revision_trailer(apr_off_t *root_offset,
-                                 apr_off_t *changes_offset,
-                                 svn_stringbuf_t *trailer,
-                                 svn_revnum_t rev);
-
-/* Given the offset of the root noderev in ROOT_OFFSET and the offset of
- * the changed paths list in CHANGES_OFFSET,  return the corresponding
- * revision's trailer.  Allocate it in RESULT_POOL.
- */
-svn_stringbuf_t *
-svn_fs_x__unparse_revision_trailer(apr_off_t root_offset,
-                                   apr_off_t changes_offset,
-                                   apr_pool_t *result_pool);
-
 /* Given the FSX revision / pack FOOTER, parse it destructively
  * and return the start offsets of the index data in *L2P_OFFSET and
  * *P2L_OFFSET, respectively.