aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2013-10-28 14:19:38 -0700
committerPaul Eggert2013-10-28 14:19:38 -0700
commitb7e0ef72d0ac61b5d3ef06a3f565695c75ec2540 (patch)
treee79af5cd4685cc074a535d8454babf650a82e48d /src
parent4efc33f01d0344a52670eb0c0250d5ef40bb7952 (diff)
downloademacs-b7e0ef72d0ac61b5d3ef06a3f565695c75ec2540.tar.gz
emacs-b7e0ef72d0ac61b5d3ef06a3f565695c75ec2540.zip
* 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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog6
-rw-r--r--src/dispextern.h2
-rw-r--r--src/image.c4
-rw-r--r--src/xfaces.c20
4 files changed, 12 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 43ea7266bef..6458b739a52 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
12013-10-28 Paul Eggert <eggert@cs.ucla.edu>
2
3 * dispextern.h, image.c (x_bitmap_height, x_bitmap_width): Now static.
4 * xfaces.c (load_pixmap): Omit last two args, which are always NULL
5 in practice now. All callers changed.
6
12013-10-28 Dmitry Antipov <dmantipov@yandex.ru> 72013-10-28 Dmitry Antipov <dmantipov@yandex.ru>
2 8
3 * dispextern.h (struct face): Use bitfields for 'underline_type' 9 * dispextern.h (struct face): Use bitfields for 'underline_type'
diff --git a/src/dispextern.h b/src/dispextern.h
index c312fab448d..e61347ebf91 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -3274,8 +3274,6 @@ extern unsigned row_hash (struct glyph_row *);
3274 3274
3275#ifdef HAVE_WINDOW_SYSTEM 3275#ifdef HAVE_WINDOW_SYSTEM
3276 3276
3277extern int x_bitmap_height (struct frame *, ptrdiff_t);
3278extern int x_bitmap_width (struct frame *, ptrdiff_t);
3279extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t); 3277extern ptrdiff_t x_bitmap_pixmap (struct frame *, ptrdiff_t);
3280extern void x_reference_bitmap (struct frame *, ptrdiff_t); 3278extern void x_reference_bitmap (struct frame *, ptrdiff_t);
3281extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *, 3279extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *,
diff --git a/src/image.c b/src/image.c
index 2b07b83b816..6691cfc8a10 100644
--- a/src/image.c
+++ b/src/image.c
@@ -159,13 +159,13 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
159 159
160/* Functions to access the contents of a bitmap, given an id. */ 160/* Functions to access the contents of a bitmap, given an id. */
161 161
162int 162static int
163x_bitmap_height (struct frame *f, ptrdiff_t id) 163x_bitmap_height (struct frame *f, ptrdiff_t id)
164{ 164{
165 return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height; 165 return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].height;
166} 166}
167 167
168int 168static int
169x_bitmap_width (struct frame *f, ptrdiff_t id) 169x_bitmap_width (struct frame *f, ptrdiff_t id)
170{ 170{
171 return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width; 171 return FRAME_DISPLAY_INFO (f)->bitmaps[id - 1].width;
diff --git a/src/xfaces.c b/src/xfaces.c
index c0f5c45ec54..313e8634111 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -853,12 +853,10 @@ the pixmap. Bits are stored row by row, each row occupies
853 pixmap spec) for use on frame F. Value is the bitmap_id (see 853 pixmap spec) for use on frame F. Value is the bitmap_id (see
854 xfns.c). If NAME is nil, return with a bitmap id of zero. If 854 xfns.c). If NAME is nil, return with a bitmap id of zero. If
855 bitmap cannot be loaded, display a message saying so, and return 855 bitmap cannot be loaded, display a message saying so, and return
856 zero. Store the bitmap width in *W_PTR and its height in *H_PTR, 856 zero. */
857 if these pointers are not null. */
858 857
859static ptrdiff_t 858static ptrdiff_t
860load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr, 859load_pixmap (struct frame *f, Lisp_Object name)
861 unsigned int *h_ptr)
862{ 860{
863 ptrdiff_t bitmap_id; 861 ptrdiff_t bitmap_id;
864 862
@@ -893,22 +891,12 @@ load_pixmap (struct frame *f, Lisp_Object name, unsigned int *w_ptr,
893 { 891 {
894 add_to_log ("Invalid or undefined bitmap `%s'", name, Qnil); 892 add_to_log ("Invalid or undefined bitmap `%s'", name, Qnil);
895 bitmap_id = 0; 893 bitmap_id = 0;
896
897 if (w_ptr)
898 *w_ptr = 0;
899 if (h_ptr)
900 *h_ptr = 0;
901 } 894 }
902 else 895 else
903 { 896 {
904#ifdef GLYPH_DEBUG 897#ifdef GLYPH_DEBUG
905 ++npixmaps_allocated; 898 ++npixmaps_allocated;
906#endif 899#endif
907 if (w_ptr)
908 *w_ptr = x_bitmap_width (f, bitmap_id);
909
910 if (h_ptr)
911 *h_ptr = x_bitmap_height (f, bitmap_id);
912 } 900 }
913 901
914 return bitmap_id; 902 return bitmap_id;
@@ -1298,7 +1286,7 @@ load_face_colors (struct frame *f, struct face *face,
1298 && !NILP (Fbitmap_spec_p (Vface_default_stipple))) 1286 && !NILP (Fbitmap_spec_p (Vface_default_stipple)))
1299 { 1287 {
1300 x_destroy_bitmap (f, face->stipple); 1288 x_destroy_bitmap (f, face->stipple);
1301 face->stipple = load_pixmap (f, Vface_default_stipple, NULL, NULL); 1289 face->stipple = load_pixmap (f, Vface_default_stipple);
1302 } 1290 }
1303 1291
1304 face->background = load_color (f, face, bg, LFACE_BACKGROUND_INDEX); 1292 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])
5719 5707
5720 stipple = attrs[LFACE_STIPPLE_INDEX]; 5708 stipple = attrs[LFACE_STIPPLE_INDEX];
5721 if (!NILP (stipple)) 5709 if (!NILP (stipple))
5722 face->stipple = load_pixmap (f, stipple, NULL, NULL); 5710 face->stipple = load_pixmap (f, stipple);
5723#endif /* HAVE_WINDOW_SYSTEM */ 5711#endif /* HAVE_WINDOW_SYSTEM */
5724 5712
5725 return face; 5713 return face;