FreeBSD/contrib/subversion/subversion/libsvn_subr/stream.c
/* Skip data from any stream by reading and simply discarding it. */
Skip data from any stream by reading and simply discarding it.
Skip data from any stream by reading and simply discarding it .
static svn_error_t *
skip_default_handler(void *baton, apr_size_t len, svn_read_fn_t read_full_fn)
{
  apr_size_t bytes_read = 1;
  char buffer[4096];
  apr_size_t to_read = len;
  while ((to_read > 0) && (bytes_read > 0))
    {
      bytes_read = sizeof(buffer) < to_read ? sizeof(buffer) : to_read;
      SVN_ERR(read_full_fn(baton, buffer, &bytes_read));
      to_read -= bytes_read;
    }
  return SVN_NO_ERROR;
}
static svn_error_t * skip_default_handler ( void * baton , apr_size_t len , svn_read_fn_t read_full_fn ) { apr_size_t bytes_read = 1 ; char buffer [ 4096 ] ; apr_size_t to_read = len ; while ( ( to_read > 0 ) && ( bytes_read > 0 ) ) { bytes_read = sizeof ( buffer ) < to_read ? sizeof ( buffer ) : to_read ; SVN_ERR ( read_full_fn ( baton , buffer , & bytes_read ) ) ; to_read -= bytes_read ; } return SVN_NO_ERROR ; }
Skip data from any stream by reading and simply discarding it.
Skip data from any stream by reading and simply discarding it .