FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/cached_data.c
/* Fetch the representation data (header, txdelta / plain windows)
 * addressed by ENTRY->ITEM in FS and cache it if caches are enabled.
 * Read the data from the already open FILE and the wrapping
 * STREAM object.  If MAX_OFFSET is not -1, don't read windows that start
 * at or beyond that offset.
 * Use SCRATCH_POOL for temporary allocations.
 */
Fetch the representation data (header, txdelta / plain windows)
addressed by ENTRY->ITEM in FS and cache it if caches are enabled.
Read the data from the already open FILE and the wrapping
STREAM object.  If MAX_OFFSET is not -1, don't read windows that start
at or beyond that offset.
Use SCRATCH_POOL for temporary allocations.
Fetch the representation data ( header txdelta / plain windows ) addressed by ENTRY - > ITEM in FS and cache it if caches are enabled . Read the data from the already open FILE and the wrapping STREAM object . If MAX_OFFSET is not - 1 don ' t read windows that start at or beyond that offset . Use SCRATCH_POOL for temporary allocations .
static svn_error_t *
block_read_contents(svn_fs_t *fs,
                    svn_fs_fs__revision_file_t *rev_file,
                    svn_fs_fs__p2l_entry_t* entry,
                    apr_off_t max_offset,
                    apr_pool_t *result_pool,
                    apr_pool_t *scratch_pool)
{
  pair_cache_key_t header_key = { 0 };
  svn_fs_fs__rep_header_t *rep_header;
  header_key.revision = (apr_int32_t)entry->item.revision;
  header_key.second = entry->item.number;
  SVN_ERR(read_rep_header(&rep_header, fs, rev_file->stream, &header_key,
                          result_pool, scratch_pool));
  SVN_ERR(block_read_windows(rep_header, fs, rev_file, entry, max_offset,
                             result_pool, scratch_pool));
  return SVN_NO_ERROR;
}
static svn_error_t * block_read_contents ( svn_fs_t * fs , svn_fs_fs__revision_file_t * rev_file , svn_fs_fs__p2l_entry_t * entry , apr_off_t max_offset , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { pair_cache_key_t header_key = { 0 } ; svn_fs_fs__rep_header_t * rep_header ; header_key . revision = ( apr_int32_t ) entry -> item . revision ; header_key . second = entry -> item . number ; SVN_ERR ( read_rep_header ( & rep_header , fs , rev_file -> stream , & header_key , result_pool , scratch_pool ) ) ; SVN_ERR ( block_read_windows ( rep_header , fs , rev_file , entry , max_offset , result_pool , scratch_pool ) ) ; return SVN_NO_ERROR ; }
Fetch the representation data (header, txdelta / plain windows)
 addressed by ENTRY->ITEM in FS and cache it if caches are enabled.
Fetch the representation data ( header txdelta / plain windows ) addressed by ENTRY - > ITEM in FS and cache it if caches are enabled .