aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKim F. Storm2004-11-16 15:41:54 +0000
committerKim F. Storm2004-11-16 15:41:54 +0000
commit11e04b2ddfb6d1fd214ca9d180fd090623fb72f6 (patch)
treef55aeb8a592c46107885ec58f8dd1ce68d2e6b1a /src
parent94c4db3c609d6c84f8ffe413736819e1af7e1a87 (diff)
downloademacs-11e04b2ddfb6d1fd214ca9d180fd090623fb72f6.tar.gz
emacs-11e04b2ddfb6d1fd214ca9d180fd090623fb72f6.zip
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Diffstat (limited to 'src')
-rw-r--r--src/fringe.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/fringe.c b/src/fringe.c
index 3f1b74a78e8..6ebbb334bbb 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -1204,7 +1204,6 @@ If BITMAP already exists, the existing definition is replaced. */)
1204 (bitmap, bits, height, width, align) 1204 (bitmap, bits, height, width, align)
1205 Lisp_Object bitmap, bits, height, width, align; 1205 Lisp_Object bitmap, bits, height, width, align;
1206{ 1206{
1207 Lisp_Object len;
1208 int n, h, i, j; 1207 int n, h, i, j;
1209 unsigned short *b; 1208 unsigned short *b;
1210 struct fringe_bitmap fb, *xfb; 1209 struct fringe_bitmap fb, *xfb;
@@ -1212,20 +1211,21 @@ If BITMAP already exists, the existing definition is replaced. */)
1212 1211
1213 CHECK_SYMBOL (bitmap); 1212 CHECK_SYMBOL (bitmap);
1214 1213
1215 if (!STRINGP (bits) && !VECTORP (bits)) 1214 if (STRINGP (bits))
1216 bits = wrong_type_argument (Qstringp, bits); 1215 h = SCHARS (bits);
1217 1216 else if (VECTORP (bits))
1218 len = Flength (bits); 1217 h = XVECTOR (bits)->size;
1218 else
1219 bits = wrong_type_argument (Qsequencep, bits);
1219 1220
1220 if (NILP (height)) 1221 if (NILP (height))
1221 h = fb.height = XINT (len); 1222 fb.height = h;
1222 else 1223 else
1223 { 1224 {
1224 CHECK_NUMBER (height); 1225 CHECK_NUMBER (height);
1225 fb.height = min (XINT (height), 255); 1226 fb.height = min (XINT (height), 255);
1226 if (fb.height > XINT (len)) 1227 if (fb.height > h)
1227 { 1228 {
1228 h = XINT (len);
1229 fill1 = (fb.height - h) / 2; 1229 fill1 = (fb.height - h) / 2;
1230 fill2 = fb.height - h - fill1; 1230 fill2 = fb.height - h - fill1;
1231 } 1231 }