emacs-diffs
[Top][All Lists]
Advanced

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

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


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

Index: emacs/src/w32term.c
diff -c emacs/src/w32term.c:1.213 emacs/src/w32term.c:1.214
*** emacs/src/w32term.c:1.213   Fri Aug 20 10:34:12 2004
--- emacs/src/w32term.c Wed Sep 29 14:23:21 2004
***************
*** 62,68 ****
  
  /* Fringe bitmaps.  */
  
! static HBITMAP fringe_bmp[MAX_FRINGE_BITMAPS];
  
  /* Non-nil means Emacs uses toolkit scroll bars.  */
  
--- 62,69 ----
  
  /* Fringe bitmaps.  */
  
! static int max_fringe_bmp = 0;
! static HBITMAP *fringe_bmp = 0;
  
  /* Non-nil means Emacs uses toolkit scroll bars.  */
  
***************
*** 704,710 ****
                     p->bx, p->by, p->nx, p->ny);
      }
  
!   if (p->which)
      {
        HBITMAP pixmap = fringe_bmp[p->which];
        HDC compat_hdc;
--- 705,711 ----
                     p->bx, p->by, p->nx, p->ny);
      }
  
!   if (p->which && p->which < max_fringe_bmp)
      {
        HBITMAP pixmap = fringe_bmp[p->which];
        HDC compat_hdc;
***************
*** 767,772 ****
--- 768,782 ----
       unsigned short *bits;
       int h, wd;
  {
+   if (which >= max_fringe_bmp)
+     {
+       int i = max_fringe_bmp;
+       max_fringe_bmp = which + 20;
+       fringe_bmp = (HBITMAP *) xrealloc (fringe_bmp, max_fringe_bmp * sizeof 
(HBITMAP));
+       while (i < max_fringe_bmp)
+       fringe_bmp[i++] = 0;
+     }
+ 
    fringe_bmp[which] = CreateBitmap (wd, h, 1, 1, bits);
  }
  
***************
*** 774,779 ****
--- 784,792 ----
  w32_destroy_fringe_bitmap (which)
       int which;
  {
+   if (which >= max_fringe_bmp)
+     return;
+ 
    if (fringe_bmp[which])
      DeleteObject (fringe_bmp[which]);
    fringe_bmp[which] = 0;




reply via email to

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