Lines Matching defs:rb

1591                     struct rep_read_baton *rb)
1596 svn_stringbuf_t *source, *buf = rb->base_window;
1604 window_pool = svn_pool_create(rb->pool);
1606 iterpool = svn_pool_create(rb->pool);
1607 for (i = 0; i < rb->rs_list->nelts; ++i)
1613 rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
1614 SVN_ERR(read_delta_window(&window, rb->chunk_index, rs, window_pool,
1626 pool = svn_pool_create(rb->pool);
1633 rs = APR_ARRAY_IDX(rb->rs_list, i, rep_state_t *);
1643 if (source == NULL && rb->src_state != NULL)
1649 SVN_ERR(read_plain_window(&source, rb->src_state,
1653 SVN_ERR(skip_plain_window(rb->src_state, window->sview_len));
1657 new_pool = svn_pool_create(rb->pool);
1671 if ( (rb->chunk_index == 0) && (rs->current == rs->size)
1704 struct rep_read_baton *rb = baton;
1706 svn_pool_destroy(rb->pool);
1707 svn_pool_destroy(rb->filehandle_pool);
1715 get_contents_from_windows(struct rep_read_baton *rb,
1725 if (rb->rs_list->nelts == 0)
1728 rs = rb->src_state;
1730 if (rb->base_window != NULL)
1736 if (copy_len + offset > rb->base_window->len)
1737 copy_len = offset < rb->base_window->len
1738 ? rb->base_window->len - offset
1741 memcpy (cur, rb->base_window->data + offset, copy_len);
1750 SVN_ERR(auto_set_start_offset(rs, rb->pool));
1753 SVN_ERR(rs_aligned_seek(rs, NULL, offset, rb->pool));
1755 copy_len, NULL, NULL, rb->pool));
1766 if (rb->buf)
1769 copy_len = rb->buf_len - rb->buf_pos;
1774 memcpy(cur, rb->buf + rb->buf_pos, copy_len);
1775 rb->buf_pos += copy_len;
1781 if (rb->buf_pos == rb->buf_len)
1783 svn_pool_clear(rb->pool);
1784 rb->buf = NULL;
1791 rs = APR_ARRAY_IDX(rb->rs_list, 0, rep_state_t *);
1796 SVN_ERR(get_combined_window(&sbuf, rb));
1798 rb->chunk_index++;
1799 rb->buf_len = sbuf->len;
1800 rb->buf = sbuf->data;
1801 rb->buf_pos = 0;
2004 struct rep_read_baton *rb = baton;
2007 if (rb->fulltext_cache)
2010 SVN_ERR(get_contents_from_fulltext(&cached, rb, buf, len));
2016 rb->fulltext_cache = NULL;
2020 if (!rb->rs_list)
2023 SVN_ERR(build_rep_list(&rb->rs_list, &rb->base_window,
2024 &rb->src_state, &rb->len, rb->fs, &rb->rep,
2025 rb->filehandle_pool));
2030 SVN_ERR(skip_contents(rb, rb->fulltext_delivered));
2034 SVN_ERR(get_contents_from_windows(rb, buf, len));
2036 if (rb->current_fulltext)
2037 svn_stringbuf_appendbytes(rb->current_fulltext, buf, *len);
2043 if (!rb->checksum_finalized)
2045 SVN_ERR(svn_checksum_update(rb->md5_checksum_ctx, buf, *len));
2046 rb->off += *len;
2047 if (rb->off == rb->len)
2052 expected.digest = rb->md5_digest;
2054 rb->checksum_finalized = TRUE;
2055 SVN_ERR(svn_checksum_final(&md5_checksum, rb->md5_checksum_ctx,
2056 rb->pool));
2060 rb->pool,
2066 if (rb->off == rb->len && rb->current_fulltext)
2068 fs_fs_data_t *ffd = rb->fs->fsap_data;
2069 SVN_ERR(svn_cache__set(ffd->fulltext_cache, &rb->fulltext_cache_key,
2070 rb->current_fulltext, rb->pool));
2071 rb->current_fulltext = NULL;
2092 struct rep_read_baton *rb;
2100 SVN_ERR(rep_read_get_baton(&rb, fs, rep, fulltext_cache_key, pool));
2109 rb->fulltext_cache = ffd->fulltext_cache;
2115 rb->fulltext_cache_key.revision = SVN_INVALID_REVNUM;
2118 *contents_p = svn_stream_create(rb, pool);