FreeBSD/contrib/subversion/subversion/libsvn_client/blame.c
/* Delete the blame associated with the region from token START to
   START + LENGTH */
Delete the blame associated with the region from token START to
START + LENGTH
Delete the blame associated with the region from token START to START + LENGTH
static svn_error_t *
blame_delete_range(struct blame_chain *chain,
                   apr_off_t start,
                   apr_off_t length)
{
  struct blame *first = blame_find(chain->blame, start);
  struct blame *last = blame_find(chain->blame, start + length);
  struct blame *tail = last->next;
  if (first != last)
    {
      struct blame *walk = first->next;
      while (walk != last)
        {
          struct blame *next = walk->next;
          blame_destroy(chain, walk);
          walk = next;
        }
      first->next = last;
      last->start = start;
      if (first->start == start)
        {
          *first = *last;
          blame_destroy(chain, last);
          last = first;
        }
    }
  if (tail && tail->start == last->start + length)
    {
      *last = *tail;
      blame_destroy(chain, tail);
      tail = last->next;
    }
  blame_adjust(tail, -length);
  return SVN_NO_ERROR;
}
static svn_error_t * blame_delete_range ( struct blame_chain * chain , apr_off_t start , apr_off_t length ) { struct blame * first = blame_find ( chain -> blame , start ) ; struct blame * last = blame_find ( chain -> blame , start + length ) ; struct blame * tail = last -> next ; if ( first != last ) { struct blame * walk = first -> next ; while ( walk != last ) { struct blame * next = walk -> next ; blame_destroy ( chain , walk ) ; walk = next ; } first -> next = last ; last -> start = start ; if ( first -> start == start ) { * first = * last ; blame_destroy ( chain , last ) ; last = first ; } } if ( tail && tail -> start == last -> start + length ) { * last = * tail ; blame_destroy ( chain , tail ) ; tail = last -> next ; } blame_adjust ( tail , - length ) ; return SVN_NO_ERROR ; }
Delete the blame associated with the region from token START to
START + LENGTH
Delete the blame associated with the region from token START to START + LENGTH