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: Thu, 06 Jan 2005 17:23:53 -0500

Index: emacs/src/fringe.c
diff -c emacs/src/fringe.c:1.23 emacs/src/fringe.c:1.24
*** emacs/src/fringe.c:1.23     Fri Nov 26 15:14:16 2004
--- emacs/src/fringe.c  Thu Jan  6 22:03:00 2005
***************
*** 446,452 ****
  };
  
  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;
--- 446,452 ----
  };
  
  static struct fringe_bitmap **fringe_bitmaps;
! static Lisp_Object *fringe_faces;
  static int max_fringe_bitmaps;
  
  static int max_used_fringe_bitmap = MAX_STANDARD_FRINGE_BITMAPS;
***************
*** 547,553 ****
      }
  
    if (face_id == DEFAULT_FACE_ID)
!     face_id = fringe_faces[which];
  
    fb = fringe_bitmaps[which];
    if (fb == NULL)
--- 547,559 ----
      }
  
    if (face_id == DEFAULT_FACE_ID)
!     {
!       Lisp_Object face;
! 
!       if ((face = fringe_faces[which], NILP (face))
!         || (face_id = lookup_named_face (f, face, 'A', 1), face_id < 0))
!       face_id = FRINGE_FACE_ID;
!     }
  
    fb = fringe_bitmaps[which];
    if (fb == NULL)
***************
*** 574,580 ****
  
    if (p.face == NULL)
      {
!       /* Why does this happen?  ++kfs */
        return;
      }
  
--- 580,587 ----
  
    if (p.face == NULL)
      {
!       /* This could happen after clearing face cache.
!        But it shouldn't happen anymore.  ++kfs */
        return;
      }
  
***************
*** 1073,1079 ****
  {
    struct fringe_bitmap **fbp;
  
!   fringe_faces[n] = FRINGE_FACE_ID;
  
    fbp = &fringe_bitmaps[n];
    if (*fbp && (*fbp)->dynamic)
--- 1080,1086 ----
  {
    struct fringe_bitmap **fbp;
  
!   fringe_faces[n] = Qnil;
  
    fbp = &fringe_bitmaps[n];
    if (*fbp && (*fbp)->dynamic)
***************
*** 1294,1305 ****
                = ((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;
                }
            }
        }
--- 1301,1312 ----
                = ((struct fringe_bitmap **)
                   xrealloc (fringe_bitmaps, max_fringe_bitmaps * sizeof 
(struct fringe_bitmap *)));
              fringe_faces
!               = (unsigned *) xrealloc (fringe_faces, max_fringe_bitmaps * 
sizeof (Lisp_Object));
  
              for (; i < max_fringe_bitmaps; i++)
                {
                  fringe_bitmaps[i] = NULL;
!                 fringe_faces[i] = Qnil;
                }
            }
        }
***************
*** 1357,1366 ****
        if (face_id < 0)
        error ("No such face");
      }
-   else
-     face_id = FRINGE_FACE_ID;
  
!   fringe_faces[n] = face_id;
  
    return Qnil;
  }
--- 1364,1371 ----
        if (face_id < 0)
        error ("No such face");
      }
  
!   fringe_faces[n] = face;
  
    return Qnil;
  }
***************
*** 1434,1439 ****
--- 1439,1456 ----
    Vfringe_bitmaps = Qnil;
  }
  
+ /* Garbage collection hook */
+ 
+ void
+ mark_fringe_data ()
+ {
+   int i;
+ 
+   for (i = 0; i < max_fringe_bitmaps; i++)
+     if (!NILP (fringe_faces[i]))
+       mark_object (fringe_faces[i]);
+ }
+ 
  /* Initialize this module when Emacs starts.  */
  
  void
***************
*** 1455,1466 ****
    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;
      }
  }
  
--- 1472,1483 ----
    fringe_bitmaps
      = (struct fringe_bitmap **) xmalloc (max_fringe_bitmaps * sizeof (struct 
fringe_bitmap *));
    fringe_faces
!     = (unsigned *) xmalloc (max_fringe_bitmaps * sizeof (Lisp_Object));
  
    for (i = 0; i < max_fringe_bitmaps; i++)
      {
        fringe_bitmaps[i] = NULL;
!       fringe_faces[i] = Qnil;
      }
  }
  




reply via email to

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