aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert2011-06-21 23:16:16 -0700
committerPaul Eggert2011-06-21 23:16:16 -0700
commit0766b489e1b34964bb43db221fe967d54ac5ec5e (patch)
tree1de7cf403512dcf52d8d14dd3f05cc8065b8ad4a /src
parent21514da7b21e248fa5046ab27834fa431a34204c (diff)
downloademacs-0766b489e1b34964bb43db221fe967d54ac5ec5e.tar.gz
emacs-0766b489e1b34964bb43db221fe967d54ac5ec5e.zip
* dispextern.h (struct face.stipple):
* image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap) (x_bitmap_mask, x_allocate_bitmap_record) (x_create_bitmap_from_data, x_create_bitmap_from_file) (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask) (x_create_bitmap_from_xpm_data): * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last): * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size) (.bitmaps_last): * xfaces.c (load_pixmap): * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap): * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size) (.bitmaps_last, struct x_output.icon_bitmap): Use ptrdiff_t, not int, for bitmap indexes. (x_allocate_bitmap_record): Check for size overflow. * dispextern.h, lisp.h: Adjust to API changes elsewhere.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog19
-rw-r--r--src/dispextern.h22
-rw-r--r--src/image.c37
-rw-r--r--src/lisp.h2
-rw-r--r--src/nsterm.h5
-rw-r--r--src/w32term.h6
-rw-r--r--src/xfaces.c7
-rw-r--r--src/xterm.c8
-rw-r--r--src/xterm.h8
9 files changed, 69 insertions, 45 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 12439754e7c..72f6b437af2 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,22 @@
12011-06-22 Paul Eggert <eggert@cs.ucla.edu>
2
3 * dispextern.h (struct face.stipple):
4 * image.c (x_bitmap_height, x_bitmap_width, x_bitmap_pixmap)
5 (x_bitmap_mask, x_allocate_bitmap_record)
6 (x_create_bitmap_from_data, x_create_bitmap_from_file)
7 (x_destroy_bitmap, x_destroy_all_bitmaps, x_create_bitmap_mask)
8 (x_create_bitmap_from_xpm_data):
9 * nsterm.h (struct ns_display_info.bitmaps_size, .bitmaps_last):
10 * w32term.h (struct w32_display_info.icon_bitmap_id, .bitmaps_size)
11 (.bitmaps_last):
12 * xfaces.c (load_pixmap):
13 * xterm.c (x_bitmap_icon, x_wm_set_icon_pixmap):
14 * xterm.h (struct x_display_info.icon_bitmap_id, .bitmaps_size)
15 (.bitmaps_last, struct x_output.icon_bitmap):
16 Use ptrdiff_t, not int, for bitmap indexes.
17 (x_allocate_bitmap_record): Check for size overflow.
18 * dispextern.h, lisp.h: Adjust to API changes elsewhere.
19
12011-06-21 Paul Eggert <eggert@cs.ucla.edu> 202011-06-21 Paul Eggert <eggert@cs.ucla.edu>
2 21
3 Use ptrdiff_t, not int, for overlay counts. 22 Use ptrdiff_t, not int, for overlay counts.
diff --git a/src/dispextern.h b/src/dispextern.h
index 227d5ed58e3..02f1e5314aa 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -1532,12 +1532,12 @@ struct face
1532 1532
1533 /* Background stipple or bitmap used for this face. This is 1533 /* Background stipple or bitmap used for this face. This is
1534 an id as returned from load_pixmap. */ 1534 an id as returned from load_pixmap. */
1535 int stipple; 1535 ptrdiff_t stipple;
1536 1536
1537#else /* not HAVE_WINDOW_SYSTEM */ 1537#else /* not HAVE_WINDOW_SYSTEM */
1538 1538
1539 /* Dummy. */ 1539 /* Dummy. */
1540 int stipple; 1540 ptrdiff_t stipple;
1541 1541
1542#endif /* not HAVE_WINDOW_SYSTEM */ 1542#endif /* not HAVE_WINDOW_SYSTEM */
1543 1543
@@ -3082,21 +3082,21 @@ void w32_reset_fringes (void);
3082 3082
3083#ifdef HAVE_WINDOW_SYSTEM 3083#ifdef HAVE_WINDOW_SYSTEM
3084 3084
3085extern int x_bitmap_height (struct frame *, int); 3085extern int x_bitmap_height (struct frame *, ptrdiff_t);
3086extern int x_bitmap_width (struct frame *, int); 3086extern int x_bitmap_width (struct frame *, ptrdiff_t);
3087extern int x_bitmap_pixmap (struct frame *, int); 3087extern int x_bitmap_pixmap (struct frame *, ptrdiff_t);
3088extern void x_reference_bitmap (struct frame *, int); 3088extern void x_reference_bitmap (struct frame *, int);
3089extern int x_create_bitmap_from_data (struct frame *, char *, 3089extern ptrdiff_t x_create_bitmap_from_data (struct frame *, char *,
3090 unsigned int, unsigned int); 3090 unsigned int, unsigned int);
3091extern int x_create_bitmap_from_file (struct frame *, Lisp_Object); 3091extern ptrdiff_t x_create_bitmap_from_file (struct frame *, Lisp_Object);
3092#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK 3092#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK
3093extern int x_create_bitmap_from_xpm_data (struct frame *f, const char **bits); 3093extern ptrdiff_t x_create_bitmap_from_xpm_data (struct frame *, const char **);
3094#endif 3094#endif
3095#ifndef x_destroy_bitmap 3095#ifndef x_destroy_bitmap
3096extern void x_destroy_bitmap (struct frame *, int); 3096extern void x_destroy_bitmap (struct frame *, ptrdiff_t);
3097#endif 3097#endif
3098extern void x_destroy_all_bitmaps (Display_Info *); 3098extern void x_destroy_all_bitmaps (Display_Info *);
3099extern int x_create_bitmap_mask (struct frame * , int); 3099extern int x_create_bitmap_mask (struct frame *, ptrdiff_t);
3100extern Lisp_Object x_find_image_file (Lisp_Object); 3100extern Lisp_Object x_find_image_file (Lisp_Object);
3101 3101
3102void x_kill_gs_process (Pixmap, struct frame *); 3102void x_kill_gs_process (Pixmap, struct frame *);
diff --git a/src/image.c b/src/image.c
index b5b93cb5b69..01cc95f7b38 100644
--- a/src/image.c
+++ b/src/image.c
@@ -182,20 +182,20 @@ XPutPixel (XImagePtr ximage, int x, int y, unsigned long pixel)
182/* Functions to access the contents of a bitmap, given an id. */ 182/* Functions to access the contents of a bitmap, given an id. */
183 183
184int 184int
185x_bitmap_height (FRAME_PTR f, int id) 185x_bitmap_height (FRAME_PTR f, ptrdiff_t id)
186{ 186{
187 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height; 187 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].height;
188} 188}
189 189
190int 190int
191x_bitmap_width (FRAME_PTR f, int id) 191x_bitmap_width (FRAME_PTR f, ptrdiff_t id)
192{ 192{
193 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width; 193 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].width;
194} 194}
195 195
196#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI) 196#if defined (HAVE_X_WINDOWS) || defined (HAVE_NTGUI)
197int 197int
198x_bitmap_pixmap (FRAME_PTR f, int id) 198x_bitmap_pixmap (FRAME_PTR f, ptrdiff_t id)
199{ 199{
200 return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap; 200 return (int) FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].pixmap;
201} 201}
@@ -203,7 +203,7 @@ x_bitmap_pixmap (FRAME_PTR f, int id)
203 203
204#ifdef HAVE_X_WINDOWS 204#ifdef HAVE_X_WINDOWS
205int 205int
206x_bitmap_mask (FRAME_PTR f, int id) 206x_bitmap_mask (FRAME_PTR f, ptrdiff_t id)
207{ 207{
208 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask; 208 return FRAME_X_DISPLAY_INFO (f)->bitmaps[id - 1].mask;
209} 209}
@@ -211,11 +211,11 @@ x_bitmap_mask (FRAME_PTR f, int id)
211 211
212/* Allocate a new bitmap record. Returns index of new record. */ 212/* Allocate a new bitmap record. Returns index of new record. */
213 213
214static int 214static ptrdiff_t
215x_allocate_bitmap_record (FRAME_PTR f) 215x_allocate_bitmap_record (FRAME_PTR f)
216{ 216{
217 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 217 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
218 int i; 218 ptrdiff_t i;
219 219
220 if (dpyinfo->bitmaps == NULL) 220 if (dpyinfo->bitmaps == NULL)
221 { 221 {
@@ -233,6 +233,9 @@ x_allocate_bitmap_record (FRAME_PTR f)
233 if (dpyinfo->bitmaps[i].refcount == 0) 233 if (dpyinfo->bitmaps[i].refcount == 0)
234 return i + 1; 234 return i + 1;
235 235
236 if (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (Bitmap_Record) / 2
237 < dpyinfo->bitmaps_size)
238 memory_full (SIZE_MAX);
236 dpyinfo->bitmaps_size *= 2; 239 dpyinfo->bitmaps_size *= 2;
237 dpyinfo->bitmaps 240 dpyinfo->bitmaps
238 = (Bitmap_Record *) xrealloc (dpyinfo->bitmaps, 241 = (Bitmap_Record *) xrealloc (dpyinfo->bitmaps,
@@ -250,11 +253,11 @@ x_reference_bitmap (FRAME_PTR f, int id)
250 253
251/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */ 254/* Create a bitmap for frame F from a HEIGHT x WIDTH array of bits at BITS. */
252 255
253int 256ptrdiff_t
254x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height) 257x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsigned int height)
255{ 258{
256 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 259 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
257 int id; 260 ptrdiff_t id;
258 261
259#ifdef HAVE_X_WINDOWS 262#ifdef HAVE_X_WINDOWS
260 Pixmap bitmap; 263 Pixmap bitmap;
@@ -309,7 +312,7 @@ x_create_bitmap_from_data (struct frame *f, char *bits, unsigned int width, unsi
309 312
310/* Create bitmap from file FILE for frame F. */ 313/* Create bitmap from file FILE for frame F. */
311 314
312int 315ptrdiff_t
313x_create_bitmap_from_file (struct frame *f, Lisp_Object file) 316x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
314{ 317{
315 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 318 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
@@ -319,7 +322,7 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
319#endif /* HAVE_NTGUI */ 322#endif /* HAVE_NTGUI */
320 323
321#ifdef HAVE_NS 324#ifdef HAVE_NS
322 int id; 325 ptrdiff_t id;
323 void *bitmap = ns_image_from_file (file); 326 void *bitmap = ns_image_from_file (file);
324 327
325 if (!bitmap) 328 if (!bitmap)
@@ -340,7 +343,8 @@ x_create_bitmap_from_file (struct frame *f, Lisp_Object file)
340#ifdef HAVE_X_WINDOWS 343#ifdef HAVE_X_WINDOWS
341 unsigned int width, height; 344 unsigned int width, height;
342 Pixmap bitmap; 345 Pixmap bitmap;
343 int xhot, yhot, result, id; 346 int xhot, yhot, result;
347 ptrdiff_t id;
344 Lisp_Object found; 348 Lisp_Object found;
345 int fd; 349 int fd;
346 char *filename; 350 char *filename;
@@ -413,7 +417,7 @@ free_bitmap_record (Display_Info *dpyinfo, Bitmap_Record *bm)
413/* Remove reference to bitmap with id number ID. */ 417/* Remove reference to bitmap with id number ID. */
414 418
415void 419void
416x_destroy_bitmap (FRAME_PTR f, int id) 420x_destroy_bitmap (FRAME_PTR f, ptrdiff_t id)
417{ 421{
418 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 422 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
419 423
@@ -435,7 +439,7 @@ x_destroy_bitmap (FRAME_PTR f, int id)
435void 439void
436x_destroy_all_bitmaps (Display_Info *dpyinfo) 440x_destroy_all_bitmaps (Display_Info *dpyinfo)
437{ 441{
438 int i; 442 ptrdiff_t i;
439 Bitmap_Record *bm = dpyinfo->bitmaps; 443 Bitmap_Record *bm = dpyinfo->bitmaps;
440 444
441 for (i = 0; i < dpyinfo->bitmaps_last; i++, bm++) 445 for (i = 0; i < dpyinfo->bitmaps_last; i++, bm++)
@@ -467,7 +471,7 @@ static void x_destroy_x_image (XImagePtr ximg);
467 It's nicer with some borders in this context */ 471 It's nicer with some borders in this context */
468 472
469int 473int
470x_create_bitmap_mask (struct frame *f, int id) 474x_create_bitmap_mask (struct frame *f, ptrdiff_t id)
471{ 475{
472 Pixmap pixmap, mask; 476 Pixmap pixmap, mask;
473 XImagePtr ximg, mask_img; 477 XImagePtr ximg, mask_img;
@@ -3281,11 +3285,12 @@ xpm_image_p (Lisp_Object object)
3281#endif /* HAVE_XPM || HAVE_NS */ 3285#endif /* HAVE_XPM || HAVE_NS */
3282 3286
3283#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK 3287#if defined HAVE_XPM && defined HAVE_X_WINDOWS && !defined USE_GTK
3284int 3288ptrdiff_t
3285x_create_bitmap_from_xpm_data (struct frame *f, const char **bits) 3289x_create_bitmap_from_xpm_data (struct frame *f, const char **bits)
3286{ 3290{
3287 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f); 3291 Display_Info *dpyinfo = FRAME_X_DISPLAY_INFO (f);
3288 int id, rc; 3292 ptrdiff_t id;
3293 int rc;
3289 XpmAttributes attrs; 3294 XpmAttributes attrs;
3290 Pixmap bitmap, mask; 3295 Pixmap bitmap, mask;
3291 3296
diff --git a/src/lisp.h b/src/lisp.h
index 99a276c805c..4c9543bdfe8 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2628,7 +2628,7 @@ extern void init_fringe_once (void);
2628/* Defined in image.c */ 2628/* Defined in image.c */
2629extern Lisp_Object QCascent, QCmargin, QCrelief; 2629extern Lisp_Object QCascent, QCmargin, QCrelief;
2630extern Lisp_Object QCconversion; 2630extern Lisp_Object QCconversion;
2631extern int x_bitmap_mask (struct frame *, int); 2631extern int x_bitmap_mask (struct frame *, ptrdiff_t);
2632extern void syms_of_image (void); 2632extern void syms_of_image (void);
2633extern void init_image (void); 2633extern void init_image (void);
2634 2634
diff --git a/src/nsterm.h b/src/nsterm.h
index 09ec8c19b1a..7459087c988 100644
--- a/src/nsterm.h
+++ b/src/nsterm.h
@@ -468,8 +468,8 @@ struct ns_display_info
468 int smallest_font_height; 468 int smallest_font_height;
469 469
470 struct ns_bitmap_record *bitmaps; 470 struct ns_bitmap_record *bitmaps;
471 int bitmaps_size; 471 ptrdiff_t bitmaps_size;
472 int bitmaps_last; 472 ptrdiff_t bitmaps_last;
473 473
474 struct image_cache *image_cache; 474 struct image_cache *image_cache;
475 475
@@ -818,4 +818,3 @@ extern char gnustep_base_version[]; /* version tracking */
818 818
819 819
820#endif /* HAVE_NS */ 820#endif /* HAVE_NS */
821
diff --git a/src/w32term.h b/src/w32term.h
index cf6751b7d63..24a2be7dca9 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -103,7 +103,7 @@ struct w32_display_info
103 103
104 /* Emacs bitmap-id of the default icon bitmap for this frame. 104 /* Emacs bitmap-id of the default icon bitmap for this frame.
105 Or -1 if none has been allocated yet. */ 105 Or -1 if none has been allocated yet. */
106 int icon_bitmap_id; 106 ptrdiff_t icon_bitmap_id;
107 107
108 /* The root window of this screen. */ 108 /* The root window of this screen. */
109 Window root_window; 109 Window root_window;
@@ -151,10 +151,10 @@ struct w32_display_info
151 struct w32_bitmap_record *bitmaps; 151 struct w32_bitmap_record *bitmaps;
152 152
153 /* Allocated size of bitmaps field. */ 153 /* Allocated size of bitmaps field. */
154 int bitmaps_size; 154 ptrdiff_t bitmaps_size;
155 155
156 /* Last used bitmap index. */ 156 /* Last used bitmap index. */
157 int bitmaps_last; 157 ptrdiff_t bitmaps_last;
158 158
159 /* The frame (if any) which has the window that has keyboard focus. 159 /* The frame (if any) which has the window that has keyboard focus.
160 Zero if none. This is examined by Ffocus_frame in w32fns.c. Note 160 Zero if none. This is examined by Ffocus_frame in w32fns.c. Note
diff --git a/src/xfaces.c b/src/xfaces.c
index 951cf69a4cb..99c35fbb120 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -463,7 +463,8 @@ static Lisp_Object resolve_face_name (Lisp_Object, int);
463static void set_font_frame_param (Lisp_Object, Lisp_Object); 463static void set_font_frame_param (Lisp_Object, Lisp_Object);
464static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *, 464static int get_lface_attributes (struct frame *, Lisp_Object, Lisp_Object *,
465 int, struct named_merge_point *); 465 int, struct named_merge_point *);
466static int load_pixmap (struct frame *, Lisp_Object, unsigned *, unsigned *); 466static ptrdiff_t load_pixmap (struct frame *, Lisp_Object,
467 unsigned *, unsigned *);
467static struct frame *frame_or_selected_frame (Lisp_Object, int); 468static struct frame *frame_or_selected_frame (Lisp_Object, int);
468static void load_face_colors (struct frame *, struct face *, Lisp_Object *); 469static void load_face_colors (struct frame *, struct face *, Lisp_Object *);
469static void free_face_colors (struct frame *, struct face *); 470static void free_face_colors (struct frame *, struct face *);
@@ -963,10 +964,10 @@ the pixmap. Bits are stored row by row, each row occupies
963 zero. Store the bitmap width in *W_PTR and its height in *H_PTR, 964 zero. Store the bitmap width in *W_PTR and its height in *H_PTR,
964 if these pointers are not null. */ 965 if these pointers are not null. */
965 966
966static int 967static ptrdiff_t
967load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr) 968load_pixmap (FRAME_PTR f, Lisp_Object name, unsigned int *w_ptr, unsigned int *h_ptr)
968{ 969{
969 int bitmap_id; 970 ptrdiff_t bitmap_id;
970 971
971 if (NILP (name)) 972 if (NILP (name))
972 return 0; 973 return 0;
diff --git a/src/xterm.c b/src/xterm.c
index c1134521c71..32fbab55008 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -356,7 +356,7 @@ static int x_dispatch_event (XEvent *, Display *);
356 interference with debugging failing X calls. */ 356 interference with debugging failing X calls. */
357static void x_connection_closed (Display *, const char *); 357static void x_connection_closed (Display *, const char *);
358static void x_wm_set_window_state (struct frame *, int); 358static void x_wm_set_window_state (struct frame *, int);
359static void x_wm_set_icon_pixmap (struct frame *, int); 359static void x_wm_set_icon_pixmap (struct frame *, ptrdiff_t);
360static void x_initialize (void); 360static void x_initialize (void);
361 361
362 362
@@ -7427,7 +7427,7 @@ x_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, int x, int
7427int 7427int
7428x_bitmap_icon (struct frame *f, Lisp_Object file) 7428x_bitmap_icon (struct frame *f, Lisp_Object file)
7429{ 7429{
7430 int bitmap_id; 7430 ptrdiff_t bitmap_id;
7431 7431
7432 if (FRAME_X_WINDOW (f) == 0) 7432 if (FRAME_X_WINDOW (f) == 0)
7433 return 1; 7433 return 1;
@@ -7453,7 +7453,7 @@ x_bitmap_icon (struct frame *f, Lisp_Object file)
7453 /* Create the GNU bitmap and mask if necessary. */ 7453 /* Create the GNU bitmap and mask if necessary. */
7454 if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0) 7454 if (FRAME_X_DISPLAY_INFO (f)->icon_bitmap_id < 0)
7455 { 7455 {
7456 int rc = -1; 7456 ptrdiff_t rc = -1;
7457 7457
7458#ifdef USE_GTK 7458#ifdef USE_GTK
7459 7459
@@ -9601,7 +9601,7 @@ x_wm_set_window_state (struct frame *f, int state)
9601} 9601}
9602 9602
9603static void 9603static void
9604x_wm_set_icon_pixmap (struct frame *f, int pixmap_id) 9604x_wm_set_icon_pixmap (struct frame *f, ptrdiff_t pixmap_id)
9605{ 9605{
9606 Pixmap icon_pixmap, icon_mask; 9606 Pixmap icon_pixmap, icon_mask;
9607 9607
diff --git a/src/xterm.h b/src/xterm.h
index 47d7e533769..a4767361bb3 100644
--- a/src/xterm.h
+++ b/src/xterm.h
@@ -158,7 +158,7 @@ struct x_display_info
158 158
159 /* Emacs bitmap-id of the default icon bitmap for this frame. 159 /* Emacs bitmap-id of the default icon bitmap for this frame.
160 Or -1 if none has been allocated yet. */ 160 Or -1 if none has been allocated yet. */
161 int icon_bitmap_id; 161 ptrdiff_t icon_bitmap_id;
162 162
163 /* The root window of this screen. */ 163 /* The root window of this screen. */
164 Window root_window; 164 Window root_window;
@@ -202,10 +202,10 @@ struct x_display_info
202 struct x_bitmap_record *bitmaps; 202 struct x_bitmap_record *bitmaps;
203 203
204 /* Allocated size of bitmaps field. */ 204 /* Allocated size of bitmaps field. */
205 int bitmaps_size; 205 ptrdiff_t bitmaps_size;
206 206
207 /* Last used bitmap index. */ 207 /* Last used bitmap index. */
208 int bitmaps_last; 208 ptrdiff_t bitmaps_last;
209 209
210 /* Which modifier keys are on which modifier bits? 210 /* Which modifier keys are on which modifier bits?
211 211
@@ -490,7 +490,7 @@ struct x_output
490 490
491 /* If >=0, a bitmap index. The indicated bitmap is used for the 491 /* If >=0, a bitmap index. The indicated bitmap is used for the
492 icon. */ 492 icon. */
493 int icon_bitmap; 493 ptrdiff_t icon_bitmap;
494 494
495 /* Default ASCII font of this frame. */ 495 /* Default ASCII font of this frame. */
496 struct font *font; 496 struct font *font;