From b7e0ef72d0ac61b5d3ef06a3f565695c75ec2540 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Mon, 28 Oct 2013 14:19:38 -0700 Subject: [PATCH] * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static. * xfaces.c (load_pixmap): Omit last two args, which are always NULL in practice now. All callers changed. --- src/ChangeLog | 6 ++++++ src/dispextern.h | 2 -- src/image.c | 4 ++-- src/xfaces.c | 20 ++++---------------- 4 files changed, 12 insertions(+), 20 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index 43ea7266be..6458b739a5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2013-10-28 Paul Eggert + + * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static. + * xfaces.c (load_pixmap): Omit last two args, which are always NULL + in practice now. All callers changed. + 2013-10-28 Dmitry Antipov * dispextern.h (struct face): Use bitfields for 'underline_type' diff --git a/src/dispextern.h b/src/dispextern.h index c312fab448..e61347ebf9 100644 --- a/src/dispextern.h +++ b/src/dispextern.h @@ -3274,8 +3274,6 @@ extern unsigned row_hash (struct glyph_row *); #ifdef HAVE_WINDOW_SYSTEM -extern int x_bitmap_height (struct frame *, ptrdiff_t); -extern int x_bitmap_width (struct frame *, ptrdiff_t); extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t); extern void x_reference_bitmap (struct frame *, ptrdiff_t); extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *, diff --git a/src/image.c b/src/image.c index 2b07b83b81..6691cfc8a1 100644 --- a/src/image.c +++ b/src/image.c @@ -159,13 +159,13 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel) /* Functions to access the contents of a bitmap, given an id. */ -int +static int x_bitmap_height (struct frame *f, ptrdiff_t id) { return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height; } -int +static int x_bitmap_width (struct frame *f, ptrdiff_t id) { return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; diff --git a/src/xfaces.c b/src/xfaces.c index c0f5c45ec5..313e863411 100644 --- a/src/xfaces.c +++ b/src/xfaces.c @@ -853,12 +853,10 @@ the pixmap. Bits are stored row by row, each row occupies pixmap spec) for use on frame F. Value is the bitmap_id (see xfns.c). If NAME is nil, return with a bitmap id of zero. If bitmap cannot be loaded, display a message saying so, and return - zero. Store the bitmap width in *W_PTR and its height in *H_PTR, - if these pointers are not null. */ + zero. */ static ptrdiff_t -load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr, - unsigned int *h_ptr) +load_pixmap (struct frame *f, Lisp_Object name) { ptrdiff_t bitmap_id; @@ -893,22 +891,12 @@ load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr, { add_to_log ("Invalid or undefined bitmap `%s'", name, Qnil); bitmap_id = 0; - - if (w_ptr) - *w_ptr = 0; - if (h_ptr) - *h_ptr = 0; } else { #ifdef GLYPH_DEBUG ++npixmaps_allocated; #endif - if (w_ptr) - *w_ptr = x_bitmap_width (f, bitmap_id); - - if (h_ptr) - *h_ptr = x_bitmap_height (f, bitmap_id); } return bitmap_id; @@ -1298,7 +1286,7 @@ load_face_colors (struct frame *f, struct face *face, && !NILP (Fbitmap_spec_p (Vface_default_stipple))) { x_destroy_bitmap (f, face->stipple); - face->stipple = load_pixmap (f, Vface_default_stipple, NULL, NULL); + face->stipple = load_pixmap (f, Vface_default_stipple); } face->background = load_color (f, face, bg, LFACE_BACKGROUND_INDEX); @@ -5719,7 +5707,7 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE]) stipple = attrs[LFACE_STIPPLE_INDEX]; if (!NILP (stipple)) - face->stipple = load_pixmap (f, stipple, NULL, NULL); + face->stipple = load_pixmap (f, stipple); #endif /* HAVE_WINDOW_SYSTEM */ return face; -- 2.20.1