emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/src/region-cache.c


From: Juanma Barranquero
Subject: [Emacs-diffs] Changes to emacs/src/region-cache.c
Date: Tue, 04 Feb 2003 09:03:40 -0500

Index: emacs/src/region-cache.c
diff -c emacs/src/region-cache.c:1.4 emacs/src/region-cache.c:1.5
*** emacs/src/region-cache.c:1.4        Tue Apr 16 08:39:25 2002
--- emacs/src/region-cache.c    Tue Feb  4 09:03:13 2003
***************
*** 131,137 ****
  struct region_cache *
  new_region_cache ()
  {
!   struct region_cache *c 
      = (struct region_cache *) xmalloc (sizeof (struct region_cache));
  
    c->gap_start = 0;
--- 131,137 ----
  struct region_cache *
  new_region_cache ()
  {
!   struct region_cache *c
      = (struct region_cache *) xmalloc (sizeof (struct region_cache));
  
    c->gap_start = 0;
***************
*** 385,391 ****
  
    c->cache_len -= len;
  }
!      
  
  
  /* Set the value for a region.  */
--- 385,391 ----
  
    c->cache_len -= len;
  }
! 
  
  
  /* Set the value for a region.  */
***************
*** 407,418 ****
       both the locations of real characters in the buffer.  */
    if (start == end)
      return;
!   
    {
      /* We need to make sure that there are no boundaries in the area
         between start to end; the whole area will have the same value,
         so those boundaries will not be necessary.
!        
         Let start_ix be the cache index of the boundary governing the
         first character of start..end, and let end_ix be the cache
         index of the earliest boundary after the last character in
--- 407,418 ----
       both the locations of real characters in the buffer.  */
    if (start == end)
      return;
! 
    {
      /* We need to make sure that there are no boundaries in the area
         between start to end; the whole area will have the same value,
         so those boundaries will not be necessary.
! 
         Let start_ix be the cache index of the boundary governing the
         first character of start..end, and let end_ix be the cache
         index of the earliest boundary after the last character in
***************
*** 456,462 ****
              start_ix++;
            }
        }
!           
      /* This is equivalent to letting end_ix float (like a buffer
         marker does) with the insertions and deletions we may have
         done.  */
--- 456,462 ----
              start_ix++;
            }
        }
! 
      /* This is equivalent to letting end_ix float (like a buffer
         marker does) with the insertions and deletions we may have
         done.  */
***************
*** 553,559 ****
  }
  
  
! /* Clean out any cache entries applying to the modified region, and 
     make the positions of the remaining entries accurate again.
  
     After calling this function, the mess described in the comment in
--- 553,559 ----
  }
  
  
! /* Clean out any cache entries applying to the modified region, and
     make the positions of the remaining entries accurate again.
  
     After calling this function, the mess described in the comment in
***************
*** 606,612 ****
       (which will give the modified region the same size in the cache
       as it has in the buffer), and then invalidate the modified
       region. */
!   if (c->buffer_beg + c->beg_unchanged 
        == c->buffer_end - c->end_unchanged)
      {
        /* Move the gap so that all the boundaries in the unchanged head
--- 606,612 ----
       (which will give the modified region the same size in the cache
       as it has in the buffer), and then invalidate the modified
       region. */
!   if (c->buffer_beg + c->beg_unchanged
        == c->buffer_end - c->end_unchanged)
      {
        /* Move the gap so that all the boundaries in the unchanged head
***************
*** 721,727 ****
  /* Interface: using the cache.  */
  
  /* Return true if the text immediately after POS in BUF is known, for
!    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest 
     position after POS where the knownness changes.  */
  int
  region_cache_forward (buf, c, pos, next)
--- 721,727 ----
  /* Interface: using the cache.  */
  
  /* Return true if the text immediately after POS in BUF is known, for
!    the purposes of CACHE.  If NEXT is non-zero, set *NEXT to the nearest
     position after POS where the knownness changes.  */
  int
  region_cache_forward (buf, c, pos, next)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]