FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/transaction.c
/* Return a stream that calculates a FNV checksum in *CONTEXT
 * over all data written to the stream and passes that data on
 * to INNER_STREAM.  Allocate objects in POOL.
 */
Return a stream that calculates a FNV checksum in *CONTEXT
over all data written to the stream and passes that data on
to INNER_STREAM.  Allocate objects in POOL.
Return a stream that calculates a FNV checksum in * CONTEXT over all data written to the stream and passes that data on to INNER_STREAM . Allocate objects in POOL .
static svn_stream_t *
fnv1a_wrap_stream(svn_checksum_ctx_t **context,
                  svn_stream_t *inner_stream,
                  apr_pool_t *pool)
{
  svn_stream_t *outer_stream;
  fnv1a_stream_baton_t *baton = apr_pcalloc(pool, sizeof(*baton));
  baton->inner_stream = inner_stream;
  baton->context = svn_checksum_ctx_create(svn_checksum_fnv1a_32x4, pool);
  *context = baton->context;
  outer_stream = svn_stream_create(baton, pool);
  svn_stream_set_write(outer_stream, fnv1a_write_handler);
  return outer_stream;
}
static svn_stream_t * fnv1a_wrap_stream ( svn_checksum_ctx_t * * context , svn_stream_t * inner_stream , apr_pool_t * pool ) { svn_stream_t * outer_stream ; fnv1a_stream_baton_t * baton = apr_pcalloc ( pool , sizeof ( * baton ) ) ; baton -> inner_stream = inner_stream ; baton -> context = svn_checksum_ctx_create ( svn_checksum_fnv1a_32x4 , pool ) ; * context = baton -> context ; outer_stream = svn_stream_create ( baton , pool ) ; svn_stream_set_write ( outer_stream , fnv1a_write_handler ) ; return outer_stream ; }
Return a stream that calculates a FNV checksum in *CONTEXT
 over all data written to the stream and passes that data on
 to INNER_STREAM.
Return a stream that calculates a FNV checksum in * CONTEXT over all data written to the stream and passes that data on to INNER_STREAM .