FreeBSD/contrib/subversion/subversion/libsvn_client/blame.c
/* Insert a chunk of blame associated with REV starting
   at token START and continuing for LENGTH tokens */
Insert a chunk of blame associated with REV starting
at token START and continuing for LENGTH tokens
Insert a chunk of blame associated with REV starting at token START and continuing for LENGTH tokens
static svn_error_t *
blame_insert_range(struct blame_chain *chain,
                   const struct rev *rev,
                   apr_off_t start,
                   apr_off_t length)
{
  struct blame *head = chain->blame;
  struct blame *point = blame_find(head, start);
  struct blame *insert;
  if (point->start == start)
    {
      insert = blame_create(chain, point->rev, point->start + length);
      point->rev = rev;
      insert->next = point->next;
      point->next = insert;
    }
  else
    {
      struct blame *middle;
      middle = blame_create(chain, rev, start);
      insert = blame_create(chain, point->rev, start + length);
      middle->next = insert;
      insert->next = point->next;
      point->next = middle;
    }
  blame_adjust(insert->next, length);
  return SVN_NO_ERROR;
}
static svn_error_t * blame_insert_range ( struct blame_chain * chain , const struct rev * rev , apr_off_t start , apr_off_t length ) { struct blame * head = chain -> blame ; struct blame * point = blame_find ( head , start ) ; struct blame * insert ; if ( point -> start == start ) { insert = blame_create ( chain , point -> rev , point -> start + length ) ; point -> rev = rev ; insert -> next = point -> next ; point -> next = insert ; } else { struct blame * middle ; middle = blame_create ( chain , rev , start ) ; insert = blame_create ( chain , point -> rev , start + length ) ; middle -> next = insert ; insert -> next = point -> next ; point -> next = middle ; } blame_adjust ( insert -> next , length ) ; return SVN_NO_ERROR ; }
Insert a chunk of blame associated with REV starting
at token START and continuing for LENGTH tokens
Insert a chunk of blame associated with REV starting at token START and continuing for LENGTH tokens