FreeBSD/contrib/subversion/subversion/libsvn_fs_fs/index.c
/* From HEADER and the list of all OFFSETS, fill BATON with the page info
 * requested by BATON->OFFSET.
 */
From HEADER and the list of all OFFSETS, fill BATON with the page info
requested by BATON->OFFSET.
From HEADER and the list of all OFFSETS fill BATON with the page info requested by BATON - > OFFSET .
static void
p2l_page_info_copy(p2l_page_info_baton_t *baton,
                   const p2l_header_t *header,
                   const apr_off_t *offsets)
{
  if (baton->offset / header->page_size < header->page_count)
    {
      baton->page_no = (apr_size_t)(baton->offset / header->page_size);
      baton->start_offset = offsets[baton->page_no];
      baton->next_offset = offsets[baton->page_no + 1];
      baton->page_size = header->page_size;
    }
  else
    {
      baton->page_no = header->page_count;
      baton->start_offset = offsets[baton->page_no];
      baton->next_offset = offsets[baton->page_no];
      baton->page_size = 0;
    }
  baton->first_revision = header->first_revision;
  baton->page_start = (apr_off_t)(header->page_size * baton->page_no);
  baton->page_count = header->page_count;
}
static void p2l_page_info_copy ( p2l_page_info_baton_t * baton , const p2l_header_t * header , const apr_off_t * offsets ) { if ( baton -> offset / header -> page_size < header -> page_count ) { baton -> page_no = ( apr_size_t ) ( baton -> offset / header -> page_size ) ; baton -> start_offset = offsets [ baton -> page_no ] ; baton -> next_offset = offsets [ baton -> page_no + 1 ] ; baton -> page_size = header -> page_size ; } else { baton -> page_no = header -> page_count ; baton -> start_offset = offsets [ baton -> page_no ] ; baton -> next_offset = offsets [ baton -> page_no ] ; baton -> page_size = 0 ; } baton -> first_revision = header -> first_revision ; baton -> page_start = ( apr_off_t ) ( header -> page_size * baton -> page_no ) ; baton -> page_count = header -> page_count ; }
From HEADER and the list of all OFFSETS, fill BATON with the page info
 requested by BATON->OFFSET.
From HEADER and the list of all OFFSETS fill BATON with the page info requested by BATON - > OFFSET .
/* if the requested offset is out of bounds, return info for
   * a zero-sized empty page right behind the last page.
   */ /* This cast is safe because the value is < header->page_count. */ /* Beyond the last page. */