summaryrefslogtreecommitdiff
path: root/src/fringe.c
diff options
context:
space:
mode:
authorKim F. Storm <storm@cua.dk>2004-11-16 15:41:54 +0000
committerKim F. Storm <storm@cua.dk>2004-11-16 15:41:54 +0000
commit11e04b2ddfb6d1fd214ca9d180fd090623fb72f6 (patch)
treef55aeb8a592c46107885ec58f8dd1ce68d2e6b1a /src/fringe.c
parent94c4db3c609d6c84f8ffe413736819e1af7e1a87 (diff)
downloademacs-11e04b2ddfb6d1fd214ca9d180fd090623fb72f6.tar.gz
(Fdefine_fringe_bitmap): Always set 'h'. Simplify.
Diffstat (limited to 'src/fringe.c')
-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. */)
(bitmap, bits, height, width, align)
Lisp_Object bitmap, bits, height, width, align;
{
- Lisp_Object len;
int n, h, i, j;
unsigned short *b;
struct fringe_bitmap fb, *xfb;
@@ -1212,20 +1211,21 @@ If BITMAP already exists, the existing definition is replaced. */)
CHECK_SYMBOL (bitmap);
- if (!STRINGP (bits) && !VECTORP (bits))
- bits = wrong_type_argument (Qstringp, bits);
-
- len = Flength (bits);
+ if (STRINGP (bits))
+ h = SCHARS (bits);
+ else if (VECTORP (bits))
+ h = XVECTOR (bits)->size;
+ else
+ bits = wrong_type_argument (Qsequencep, bits);
if (NILP (height))
- h = fb.height = XINT (len);
+ fb.height = h;
else
{
CHECK_NUMBER (height);
fb.height = min (XINT (height), 255);
- if (fb.height > XINT (len))
+ if (fb.height > h)
{
- h = XINT (len);
fill1 = (fb.height - h) / 2;
fill2 = fb.height - h - fill1;
}