emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Kim F . Storm
Subject: [Emacs-diffs] Changes to emacs/src/fringe.c
Date: Wed, 29 Sep 2004 10:30:03 -0400

Index: emacs/src/fringe.c
diff -c emacs/src/fringe.c:1.14 emacs/src/fringe.c:1.15
*** emacs/src/fringe.c:1.14     Wed Sep 29 11:57:48 2004
--- emacs/src/fringe.c  Wed Sep 29 14:22:25 2004
***************
*** 445,452 ****
    { FRBITS (zv_bits),                 8, 3, ALIGN_BITMAP_TOP,    0 },
  };
  
! static struct fringe_bitmap *fringe_bitmaps[MAX_FRINGE_BITMAPS];
! static unsigned fringe_faces[MAX_FRINGE_BITMAPS];
  
  static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
  
--- 445,453 ----
    { FRBITS (zv_bits),                 8, 3, ALIGN_BITMAP_TOP,    0 },
  };
  
! static struct fringe_bitmap **fringe_bitmaps;
! static unsigned *fringe_faces;
! static int max_fringe_bitmaps;
  
  static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
  
***************
*** 1192,1199 ****
  
    CHECK_SYMBOL (bitmap);
  
-   n = lookup_fringe_bitmap (bitmap);
- 
    if (!STRINGP (bits) && !VECTORP (bits))
      bits = wrong_type_argument (Qstringp, bits);
  
--- 1193,1198 ----
***************
*** 1245,1263 ****
    else if (!NILP (align) && !EQ (align, Qcenter))
      error ("Bad align argument");
  
    if (!n)
      {
!       if (max_used_fringe_bitmap < MAX_FRINGE_BITMAPS)
        n = max_used_fringe_bitmap++;
        else
        {
          for (n = MAX_STANDARD_FRINGE_BITMAPS;
!              n < MAX_FRINGE_BITMAPS;
               n++)
            if (fringe_bitmaps[n] == NULL)
              break;
!         if (n == MAX_FRINGE_BITMAPS)
!           error ("Cannot define more fringe bitmaps");
        }
  
        Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps);
--- 1244,1281 ----
    else if (!NILP (align) && !EQ (align, Qcenter))
      error ("Bad align argument");
  
+   n = lookup_fringe_bitmap (bitmap);
    if (!n)
      {
!       if (max_used_fringe_bitmap < max_fringe_bitmaps)
        n = max_used_fringe_bitmap++;
        else
        {
          for (n = MAX_STANDARD_FRINGE_BITMAPS;
!              n < max_fringe_bitmaps;
               n++)
            if (fringe_bitmaps[n] == NULL)
              break;
! 
!         if (n == max_fringe_bitmaps)
!           {
!             if ((max_fringe_bitmaps + 20) > MAX_FRINGE_BITMAPS)
!               error ("No free fringe bitmap slots");
! 
!             i = max_fringe_bitmaps;
!             max_fringe_bitmaps += 20;
!             fringe_bitmaps
!               = ((struct fringe_bitmap **)
!                  xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof 
(struct fringe_bitmap *)));
!             fringe_faces
!               = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * 
sizeof (unsigned));
! 
!             for (; i < max_fringe_bitmaps; i++)
!               {
!                 fringe_bitmaps[i] = NULL;
!                 fringe_faces[i] = FRINGE_FACE_ID;
!               }
!           }
        }
  
        Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps);
***************
*** 1405,1413 ****
  {
    int i;
  
!   bzero (fringe_bitmaps, sizeof fringe_bitmaps);
!   for (i = 0; i < MAX_FRINGE_BITMAPS; i++)
!     fringe_faces[i] = FRINGE_FACE_ID;
  }
  
  #ifdef HAVE_NTGUI
--- 1423,1440 ----
  {
    int i;
  
!   max_fringe_bitmaps = MAX_STANDARD_FRINGE_BITMAPS + 20;
! 
!   fringe_bitmaps
!     = (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct 
fringe_bitmap *));
!   fringe_faces
!     = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (unsigned));
! 
!   for (i = 0; i < max_fringe_bitmaps; i++)
!     {
!       fringe_bitmaps[i] = NULL;
!       fringe_faces[i] = FRINGE_FACE_ID;
!     }
  }
  
  #ifdef HAVE_NTGUI




reply via email to

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