changeset 36006:a9d75e8a6cb9

(Finternal_set_lisp_face_attribute): The value of :box and :line-width can be negative. (realize_x_face): The value of attrs[LFACE_BOX_INDEX] can be negative.
author Kenichi Handa <handa@m17n.org>
date Fri, 09 Feb 2001 12:34:17 +0000
parents 58a1ada9bf57
children 6be98ede1ec8
files src/xfaces.c
diffstat 1 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/xfaces.c	Fri Feb 09 12:33:58 2001 +0000
+++ b/src/xfaces.c	Fri Feb 09 12:34:17 2001 +0000
@@ -3876,7 +3876,7 @@
       else if (NILP (value))
 	valid_p = 1;
       else if (INTEGERP (value))
-	valid_p = XINT (value) > 0;
+	valid_p = XINT (value) != 0;
       else if (STRINGP (value))
 	valid_p = XSTRING (value)->size > 0;
       else if (CONSP (value))
@@ -3897,7 +3897,7 @@
 
 	      if (EQ (k, QCline_width))
 		{
-		  if (!INTEGERP (v) || XINT (v) <= 0)
+		  if (!INTEGERP (v) || XINT (v) == 0)
 		    break;
 		}
 	      else if (EQ (k, QCcolor))
@@ -6418,9 +6418,9 @@
     {
       /* Simple box of specified line width in foreground color of the
          face.  */
-      xassert (XINT (box) > 0);
+      xassert (XINT (box) != 0);
       face->box = FACE_SIMPLE_BOX;
-      face->box_line_width = XFASTINT (box);
+      face->box_line_width = XINT (box);
       face->box_color = face->foreground;
       face->box_color_defaulted_p = 1;
     }
@@ -6447,8 +6447,8 @@
 
 	  if (EQ (keyword, QCline_width))
 	    {
-	      if (INTEGERP (value) && XINT (value) > 0)
-		face->box_line_width = XFASTINT (value);
+	      if (INTEGERP (value) && XINT (value) != 0)
+		face->box_line_width = XINT (value);
 	    }
 	  else if (EQ (keyword, QCcolor))
 	    {