FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/recovery.c
/* A stream read handler used by recover_find_max_ids() below.
   Read and return at most BATON->REMAINING bytes from the stream,
   returning nothing after that to indicate EOF. */
A stream read handler used by recover_find_max_ids() below.
Read and return at most BATON->REMAINING bytes from the stream,
returning nothing after that to indicate EOF.
A stream read handler used by recover_find_max_ids () below . Read and return at most BATON - > REMAINING bytes from the stream returning nothing after that to indicate EOF .
static svn_error_t *
read_handler_recover(void *baton, char *buffer, apr_size_t *len)
{
  struct recover_read_from_file_baton *b = baton;
  apr_size_t bytes_to_read = *len;
  if (b->remaining == 0)
    {
      *len = 0;
      return SVN_NO_ERROR;
    }
  if ((apr_int64_t)bytes_to_read > (apr_int64_t)b->remaining)
    bytes_to_read = (apr_size_t)b->remaining;
  b->remaining -= bytes_to_read;
  return svn_stream_read_full(b->stream, buffer, &bytes_to_read);
}
static svn_error_t * read_handler_recover ( void * baton , char * buffer , apr_size_t * len ) { struct recover_read_from_file_baton * b = baton ; apr_size_t bytes_to_read = * len ; if ( b -> remaining == 0 ) { * len = 0 ; return SVN_NO_ERROR ; } if ( ( apr_int64_t ) bytes_to_read > ( apr_int64_t ) b -> remaining ) bytes_to_read = ( apr_size_t ) b -> remaining ; b -> remaining -= bytes_to_read ; return svn_stream_read_full ( b -> stream , buffer , & bytes_to_read ) ; }
A stream read handler used by recover_find_max_ids() below.
A stream read handler used by recover_find_max_ids () below .
/* Return a successful read of zero bytes to signal EOF. */