subversion/libsvn_delta/text_delta.c
/* Compute and return a delta window using the xdelta algorithm on
   DATA, which contains SOURCE_LEN bytes of source data and TARGET_LEN
   bytes of target data.  SOURCE_OFFSET gives the offset of the source
   data, and is simply copied into the window's sview_offset field. */
Compute and return a delta window using the xdelta algorithm on
DATA, which contains SOURCE_LEN bytes of source data and TARGET_LEN
bytes of target data.  SOURCE_OFFSET gives the offset of the source
data, and is simply copied into the window's sview_offset field.
Compute and return a delta window using the xdelta algorithm on DATA which contains SOURCE_LEN bytes of source data and TARGET_LEN bytes of target data . SOURCE_OFFSET gives the offset of the source data and is simply copied into the window ' s sview_offset field .
static svn_txdelta_window_t *
compute_window(const char *data, apr_size_t source_len, apr_size_t target_len,
               svn_filesize_t source_offset, apr_pool_t *pool)
{
  svn_txdelta__ops_baton_t build_baton = { 0 };
  svn_txdelta_window_t *window;
  build_baton.new_data = svn_stringbuf_create_empty(pool);
  if (source_len == 0)
    svn_txdelta__insert_op(&build_baton, svn_txdelta_new, 0, target_len, data,
                           pool);
  else
    svn_txdelta__xdelta(&build_baton, data, source_len, target_len, pool);
  window = svn_txdelta__make_window(&build_baton, pool);
  window->sview_offset = source_offset;
  window->sview_len = source_len;
  window->tview_len = target_len;
  return window;
}
static svn_txdelta_window_t * compute_window ( const char * data , apr_size_t source_len , apr_size_t target_len , svn_filesize_t source_offset , apr_pool_t * pool ) { svn_txdelta__ops_baton_t build_baton = { 0 } ; svn_txdelta_window_t * window ; build_baton . new_data = svn_stringbuf_create_empty ( pool ) ; if ( source_len == 0 ) svn_txdelta__insert_op ( & build_baton , svn_txdelta_new , 0 , target_len , data , pool ) ; else svn_txdelta__xdelta ( & build_baton , data , source_len , target_len , pool ) ; window = svn_txdelta__make_window ( & build_baton , pool ) ; window -> sview_offset = source_offset ; window -> sview_len = source_len ; window -> tview_len = target_len ; return window ; }
Compute and return a delta window using the xdelta algorithm on
DATA, which contains SOURCE_LEN bytes of source data and TARGET_LEN
bytes of target data.
Compute and return a delta window using the xdelta algorithm on DATA which contains SOURCE_LEN bytes of source data and TARGET_LEN bytes of target data .
/* Compute the delta operations. */ /* Create and return the delta window. */