Mercurial > emacs
comparison src/xfaces.c @ 9902:32ed712a45a3
(load_pixmap): Handle bitmap_id < 0. F is a FRAME_PTR.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 13 Nov 1994 19:07:26 +0000 |
parents | 5c7a3709e81a |
children | dd9afae74baf |
comparison
equal
deleted
inserted
replaced
9901:9a35aeb4a0db | 9902:32ed712a45a3 |
---|---|
413 | 413 |
414 Store the bitmap width in *W_PTR and height in *H_PTR. */ | 414 Store the bitmap width in *W_PTR and height in *H_PTR. */ |
415 | 415 |
416 static long | 416 static long |
417 load_pixmap (f, name, w_ptr, h_ptr) | 417 load_pixmap (f, name, w_ptr, h_ptr) |
418 FRAME_PTR *f; | 418 FRAME_PTR f; |
419 Lisp_Object name; | 419 Lisp_Object name; |
420 unsigned int *w_ptr, *h_ptr; | 420 unsigned int *w_ptr, *h_ptr; |
421 { | 421 { |
422 int bitmap_id; | 422 int bitmap_id; |
423 Lisp_Object tem; | 423 Lisp_Object tem; |
450 /* It must be a string -- a file name. */ | 450 /* It must be a string -- a file name. */ |
451 bitmap_id = x_create_bitmap_from_file (f, name); | 451 bitmap_id = x_create_bitmap_from_file (f, name); |
452 } | 452 } |
453 UNBLOCK_INPUT; | 453 UNBLOCK_INPUT; |
454 | 454 |
455 if (! bitmap_id) | 455 if (bitmap_id < 0) |
456 Fsignal (Qerror, Fcons (build_string ("undefined bitmap"), | 456 Fsignal (Qerror, Fcons (build_string ("invalid or undefined bitmap"), |
457 Fcons (name, Qnil))); | 457 Fcons (name, Qnil))); |
458 | 458 |
459 *w_ptr = x_bitmap_width (f, bitmap_id); | 459 *w_ptr = x_bitmap_width (f, bitmap_id); |
460 *h_ptr = x_bitmap_height (f, bitmap_id); | 460 *h_ptr = x_bitmap_height (f, bitmap_id); |
461 | 461 |