FreeBSD/contrib/subversion/subversion/libsvn_fs_x/cached_data.c
/* Open the revision file for the item given by ID in filesystem FS and
   store the newly opened file in FILE.  Seek to the item's location before
   returning.

   Allocate the result in RESULT_POOL and temporaries in SCRATCH_POOL. */
Open the revision file for the item given by ID in filesystem FS and
store the newly opened file in FILE.  Seek to the item's location before
returning.

Allocate the result in RESULT_POOL and temporaries in SCRATCH_POOL.
Open the revision file for the item given by ID in filesystem FS and store the newly opened file in FILE . Seek to the item ' s location before returning . Allocate the result in RESULT_POOL and temporaries in SCRATCH_POOL .
static svn_error_t *
open_and_seek_revision(svn_fs_x__revision_file_t **file,
                       svn_fs_t *fs,
                       const svn_fs_x__id_t *id,
                       apr_pool_t *result_pool,
                       apr_pool_t *scratch_pool)
{
  svn_fs_x__revision_file_t *rev_file;
  apr_off_t offset = -1;
  apr_uint32_t sub_item = 0;
  svn_revnum_t rev = svn_fs_x__get_revnum(id->change_set);
  SVN_ERR(svn_fs_x__ensure_revision_exists(rev, fs, scratch_pool));
  SVN_ERR(svn_fs_x__open_pack_or_rev_file(&rev_file, fs, rev, result_pool,
                                          scratch_pool));
  SVN_ERR(svn_fs_x__item_offset(&offset, &sub_item, fs, rev_file, id,
                                scratch_pool));
  SVN_ERR(aligned_seek(fs, rev_file->file, NULL, offset, scratch_pool));
  *file = rev_file;
  return SVN_NO_ERROR;
}
static svn_error_t * open_and_seek_revision ( svn_fs_x__revision_file_t * * file , svn_fs_t * fs , const svn_fs_x__id_t * id , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { svn_fs_x__revision_file_t * rev_file ; apr_off_t offset = -1 ; apr_uint32_t sub_item = 0 ; svn_revnum_t rev = svn_fs_x__get_revnum ( id -> change_set ) ; SVN_ERR ( svn_fs_x__ensure_revision_exists ( rev , fs , scratch_pool ) ) ; SVN_ERR ( svn_fs_x__open_pack_or_rev_file ( & rev_file , fs , rev , result_pool , scratch_pool ) ) ; SVN_ERR ( svn_fs_x__item_offset ( & offset , & sub_item , fs , rev_file , id , scratch_pool ) ) ; SVN_ERR ( aligned_seek ( fs , rev_file -> file , NULL , offset , scratch_pool ) ) ; * file = rev_file ; return SVN_NO_ERROR ; }
Open the revision file for the item given by ID in filesystem FS and
store the newly opened file in FILE.
Open the revision file for the item given by ID in filesystem FS and store the newly opened file in FILE .