FreeBSD/contrib/subversion/subversion/libsvn_fs_x/cached_data.c
/* Set RS->VER depending on what is found in the already open RS->FILE->FILE
   if the diff version is still unknown.  Use SCRATCH_POOL for temporary
   allocations.
 */
Set RS->VER depending on what is found in the already open RS->FILE->FILE
if the diff version is still unknown.  Use SCRATCH_POOL for temporary
allocations.
Set RS - > VER depending on what is found in the already open RS - > FILE - > FILE if the diff version is still unknown . Use SCRATCH_POOL for temporary allocations .
static svn_error_t*
auto_read_diff_version(rep_state_t *rs,
                       apr_pool_t *scratch_pool)
{
  if (rs->ver == -1)
    {
      char buf[4];
      SVN_ERR(rs_aligned_seek(rs, NULL, rs->start, scratch_pool));
      SVN_ERR(svn_io_file_read_full2(rs->sfile->rfile->file, buf,
                                     sizeof(buf), NULL, NULL, scratch_pool));
      if (! ((buf[0] == 'S') && (buf[1] == 'V') && (buf[2] == 'N')))
        return svn_error_create
          (SVN_ERR_FS_CORRUPT, NULL,
           _("Malformed svndiff data in representation"));
      rs->ver = buf[3];
      rs->chunk_index = 0;
      rs->current = 4;
    }
  return SVN_NO_ERROR;
}
static svn_error_t * auto_read_diff_version ( rep_state_t * rs , apr_pool_t * scratch_pool ) { if ( rs -> ver == -1 ) { char buf [ 4 ] ; SVN_ERR ( rs_aligned_seek ( rs , NULL , rs -> start , scratch_pool ) ) ; SVN_ERR ( svn_io_file_read_full2 ( rs -> sfile -> rfile -> file , buf , sizeof ( buf ) , NULL , NULL , scratch_pool ) ) ; if ( ! ( ( buf [ 0 ] == ' ' ) && ( buf [ 1 ] == ' ' ) && ( buf [ 2 ] == ' ' ) ) ) return svn_error_create ( SVN_ERR_FS_CORRUPT , NULL , _ ( " " ) ) ; rs -> ver = buf [ 3 ] ; rs -> chunk_index = 0 ; rs -> current = 4 ; } return SVN_NO_ERROR ; }
Set RS->VER depending on what is found in the already open RS->FILE->FILE
if the diff version is still unknown.
Set RS - > VER depending on what is found in the already open RS - > FILE - > FILE if the diff version is still unknown .
/* ### Layering violation */