]> code.delx.au - gnu-emacs/blobdiff - src/xfaces.c
(mark_terminals): Typo.
[gnu-emacs] / src / xfaces.c
index 75c8b3c7f4997c3c63fdca10ec4e739c98bb7536..01ac364589fd6fac869019bec62ce5524b2744a0 100644 (file)
@@ -6,7 +6,7 @@ This file is part of GNU Emacs.
 
 GNU Emacs is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
+the Free Software Foundation; either version 3, or (at your option)
 any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
@@ -267,8 +267,6 @@ Boston, MA 02110-1301, USA.  */
 
 #include <ctype.h>
 
-#define abs(X)         ((X) < 0 ? -(X) : (X))
-
 /* Number of pt per inch (from the TeXbook).  */
 
 #define PT_PER_INCH 72.27
@@ -746,10 +744,9 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
+  eassert (interrupt_input_blocked);
   IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_X_DISPLAY (f), gc);
-  UNBLOCK_INPUT;
 }
 
 #endif /* HAVE_X_WINDOWS */
@@ -779,10 +776,8 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
   IF_DEBUG (xassert (--ngcs >= 0));
   xfree (gc);
-  UNBLOCK_INPUT;
 }
 
 #endif  /* WINDOWSNT */
@@ -809,10 +804,9 @@ x_free_gc (f, gc)
      struct frame *f;
      GC gc;
 {
-  BLOCK_INPUT;
+  eassert (interrupt_input_blocked);
   IF_DEBUG (xassert (--ngcs >= 0));
   XFreeGC (FRAME_MAC_DISPLAY (f), gc);
-  UNBLOCK_INPUT;
 }
 
 #endif  /* MAC_OS */
@@ -1259,8 +1253,10 @@ load_face_font (f, face, c)
       face->overstrike = needs_overstrike;
       if (face->gc)
        {
+         BLOCK_INPUT;
          x_free_gc (f, face->gc);
          face->gc = 0;
+         UNBLOCK_INPUT;
        }
     }
   else
@@ -3224,12 +3220,13 @@ push_named_merge_point (struct named_merge_point *new_named_merge_point,
 
 \f
 
+#if 0                          /* Seems to be unused.  */
 static Lisp_Object
 internal_resolve_face_name (nargs, args)
      int nargs;
      Lisp_Object *args;
 {
-  Fget (args[0], args[1]);
+  return Fget (args[0], args[1]);
 }
 
 static Lisp_Object
@@ -3238,6 +3235,7 @@ resolve_face_name_error (ignore)
 {
   return Qnil;
 }
+#endif
 
 /* Resolve face name FACE_NAME.  If FACE_NAME is a string, intern it
    to make it a symbol.  If FACE_NAME is an alias for another face,
@@ -5256,8 +5254,10 @@ free_realized_face (f, face)
            free_face_fontset (f, face);
          if (face->gc)
            {
+             BLOCK_INPUT;
              x_free_gc (f, face->gc);
              face->gc = 0;
+             UNBLOCK_INPUT;
            }
 
          free_face_colors (f, face);
@@ -5421,8 +5421,10 @@ clear_face_gcs (c)
          struct face *face = c->faces_by_id[i];
          if (face && face->gc)
            {
+             BLOCK_INPUT;
              x_free_gc (c->f, face->gc);
              face->gc = 0;
+             UNBLOCK_INPUT;
            }
        }
 #endif /* HAVE_WINDOW_SYSTEM */