Mercurial > hg > xemacs-beta
comparison src/glyphs.c @ 5581:56144c8593a8
Mechanically change INT to FIXNUM in our sources.
src/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT (where it refers to non-bignum Lisp
integers) to FIXNUM in our sources. Done for the following
functions, enums, and macros: Lisp_Type_Int_Even,
Lisp_Type_Int_Odd, INT_GCBITS, INT_VALBITS, make_int(), INTP(),
XINT(), CHECK_INT(), XREALINT(), INT_PLUS(), INT_MINUS(),
EMACS_INT_MAX (to MOST_POSITIVE_FIXNUM), EMACS_INT_MIN (to
MOST_NEGATIVE_FIXNUM), NUMBER_FITS_IN_AN_EMACS_INT() to
NUMBER_FITS_IN_A_FIXNUM(), XFLOATINT, XCHAR_OR_INT, INT_OR_FLOAT.
The EMACS_INT typedef was not changed, it does not describe
non-bignum Lisp integers.
Script that did the change available in
http://mid.gmane.org/20067.17650.181273.12014@parhasard.net .
modules/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
[...]
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers. See the src/ChangeLog entry for more details.
man/ChangeLog addition:
2011-10-09 Aidan Kehoe <kehoea@parhasard.net>
* internals/internals.texi (How Lisp Objects Are Represented in C):
* internals/internals.texi (Integers and Characters):
Mechanically change INT to FIXNUM, where the usage describes non-bignum
Lisp integers.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 09 Oct 2011 09:51:57 +0100 |
parents | 8d29f1c4bb98 |
children | eb41da9b4469 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
343 CHECK_STRING (regexp); | 343 CHECK_STRING (regexp); |
344 CHECK_VECTOR (typevec); | 344 CHECK_VECTOR (typevec); |
345 if (!NILP (XCDR (XCDR (mapping)))) | 345 if (!NILP (XCDR (XCDR (mapping)))) |
346 { | 346 { |
347 pos = XCAR (XCDR (XCDR (mapping))); | 347 pos = XCAR (XCDR (XCDR (mapping))); |
348 CHECK_INT (pos); | 348 CHECK_FIXNUM (pos); |
349 if (XINT (pos) < 0 || | 349 if (XFIXNUM (pos) < 0 || |
350 XINT (pos) >= XVECTOR_LENGTH (typevec)) | 350 XFIXNUM (pos) >= XVECTOR_LENGTH (typevec)) |
351 args_out_of_range_3 | 351 args_out_of_range_3 |
352 (pos, Qzero, make_int (XVECTOR_LENGTH (typevec) - 1)); | 352 (pos, Qzero, make_fixnum (XVECTOR_LENGTH (typevec) - 1)); |
353 } | 353 } |
354 | 354 |
355 newvec = Fcopy_sequence (typevec); | 355 newvec = Fcopy_sequence (typevec); |
356 if (INTP (pos)) | 356 if (FIXNUMP (pos)) |
357 XVECTOR_DATA (newvec)[XINT (pos)] = regexp; | 357 XVECTOR_DATA (newvec)[XFIXNUM (pos)] = regexp; |
358 GCPRO1 (newvec); | 358 GCPRO1 (newvec); |
359 image_validate (newvec); | 359 image_validate (newvec); |
360 UNGCPRO; | 360 UNGCPRO; |
361 } | 361 } |
362 } | 362 } |
403 continue; | 403 continue; |
404 if (fast_string_match (regexp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0) | 404 if (fast_string_match (regexp, 0, data, 0, -1, 0, ERROR_ME, 0) >= 0) |
405 { | 405 { |
406 if (!NILP (XCDR (XCDR (mapping)))) | 406 if (!NILP (XCDR (XCDR (mapping)))) |
407 { | 407 { |
408 int pos = XINT (XCAR (XCDR (XCDR (mapping)))); | 408 int pos = XFIXNUM (XCAR (XCDR (XCDR (mapping)))); |
409 Lisp_Object newvec = Fcopy_sequence (typevec); | 409 Lisp_Object newvec = Fcopy_sequence (typevec); |
410 XVECTOR_DATA (newvec)[pos] = data; | 410 XVECTOR_DATA (newvec)[pos] = data; |
411 return newvec; | 411 return newvec; |
412 } | 412 } |
413 else | 413 else |
550 } | 550 } |
551 | 551 |
552 void | 552 void |
553 check_valid_int (Lisp_Object data) | 553 check_valid_int (Lisp_Object data) |
554 { | 554 { |
555 CHECK_INT (data); | 555 CHECK_FIXNUM (data); |
556 } | 556 } |
557 | 557 |
558 void | 558 void |
559 file_or_data_must_be_present (Lisp_Object instantiator) | 559 file_or_data_must_be_present (Lisp_Object instantiator) |
560 { | 560 { |
629 } | 629 } |
630 | 630 |
631 Lisp_Object | 631 Lisp_Object |
632 alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist) | 632 alist_to_tagged_vector (Lisp_Object tag, Lisp_Object alist) |
633 { | 633 { |
634 int len = 1 + 2 * XINT (Flength (alist)); | 634 int len = 1 + 2 * XFIXNUM (Flength (alist)); |
635 Lisp_Object *elt = alloca_array (Lisp_Object, len); | 635 Lisp_Object *elt = alloca_array (Lisp_Object, len); |
636 int i; | 636 int i; |
637 Lisp_Object rest; | 637 Lisp_Object rest; |
638 | 638 |
639 i = 0; | 639 i = 0; |
740 if (IMAGE_INSTANCEP (instantiator)) | 740 if (IMAGE_INSTANCEP (instantiator)) |
741 return instantiator; | 741 return instantiator; |
742 | 742 |
743 if (STRINGP (instantiator)) | 743 if (STRINGP (instantiator)) |
744 instantiator = process_image_string_instantiator (instantiator, contype, | 744 instantiator = process_image_string_instantiator (instantiator, contype, |
745 XINT (dest_mask)); | 745 XFIXNUM (dest_mask)); |
746 /* Subsequent validation will pick this up. */ | 746 /* Subsequent validation will pick this up. */ |
747 if (!VECTORP (instantiator)) | 747 if (!VECTORP (instantiator)) |
748 return instantiator; | 748 return instantiator; |
749 /* We have to always store the actual pixmap data and not the | 749 /* We have to always store the actual pixmap data and not the |
750 filename even though this is a potential memory pig. We have to | 750 filename even though this is a potential memory pig. We have to |
1032 !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))) | 1032 !NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))) |
1033 { | 1033 { |
1034 write_ascstring (printcharfun, " @"); | 1034 write_ascstring (printcharfun, " @"); |
1035 if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii))) | 1035 if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii))) |
1036 write_fmt_string (printcharfun, "%ld", | 1036 write_fmt_string (printcharfun, "%ld", |
1037 XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii))); | 1037 XFIXNUM (IMAGE_INSTANCE_PIXMAP_HOTSPOT_X (ii))); |
1038 else | 1038 else |
1039 write_ascstring (printcharfun, "??"); | 1039 write_ascstring (printcharfun, "??"); |
1040 write_ascstring (printcharfun, ","); | 1040 write_ascstring (printcharfun, ","); |
1041 if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))) | 1041 if (!NILP (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))) |
1042 write_fmt_string (printcharfun, "%ld", | 1042 write_fmt_string (printcharfun, "%ld", |
1043 XINT (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))); | 1043 XFIXNUM (IMAGE_INSTANCE_PIXMAP_HOTSPOT_Y (ii))); |
1044 else | 1044 else |
1045 write_ascstring (printcharfun, "??"); | 1045 write_ascstring (printcharfun, "??"); |
1046 } | 1046 } |
1047 if (!NILP (IMAGE_INSTANCE_PIXMAP_FG (ii)) || | 1047 if (!NILP (IMAGE_INSTANCE_PIXMAP_FG (ii)) || |
1048 !NILP (IMAGE_INSTANCE_PIXMAP_BG (ii))) | 1048 !NILP (IMAGE_INSTANCE_PIXMAP_BG (ii))) |
1531 /* instantiate_image_instantiator() will abort if given an | 1531 /* instantiate_image_instantiator() will abort if given an |
1532 image instance ... */ | 1532 image instance ... */ |
1533 dest_mask = decode_image_instance_type_list (dest_types); | 1533 dest_mask = decode_image_instance_type_list (dest_types); |
1534 data = normalize_image_instantiator (data, | 1534 data = normalize_image_instantiator (data, |
1535 DEVICE_TYPE (DOMAIN_XDEVICE (domain)), | 1535 DEVICE_TYPE (DOMAIN_XDEVICE (domain)), |
1536 make_int (dest_mask)); | 1536 make_fixnum (dest_mask)); |
1537 GCPRO1 (data); | 1537 GCPRO1 (data); |
1538 /* After normalizing the data, it's always either an image instance (which | 1538 /* After normalizing the data, it's always either an image instance (which |
1539 we filtered out above) or a vector. */ | 1539 we filtered out above) or a vector. */ |
1540 if (EQ (INSTANTIATOR_TYPE (data), Qinherit)) | 1540 if (EQ (INSTANTIATOR_TYPE (data), Qinherit)) |
1541 invalid_argument ("Inheritance not allowed here", data); | 1541 invalid_argument ("Inheritance not allowed here", data); |
1806 switch (XIMAGE_INSTANCE_TYPE (image_instance)) | 1806 switch (XIMAGE_INSTANCE_TYPE (image_instance)) |
1807 { | 1807 { |
1808 case IMAGE_MONO_PIXMAP: | 1808 case IMAGE_MONO_PIXMAP: |
1809 case IMAGE_COLOR_PIXMAP: | 1809 case IMAGE_COLOR_PIXMAP: |
1810 case IMAGE_POINTER: | 1810 case IMAGE_POINTER: |
1811 return make_int (XIMAGE_INSTANCE_PIXMAP_DEPTH (image_instance)); | 1811 return make_fixnum (XIMAGE_INSTANCE_PIXMAP_DEPTH (image_instance)); |
1812 | 1812 |
1813 default: | 1813 default: |
1814 return Qnil; | 1814 return Qnil; |
1815 } | 1815 } |
1816 } | 1816 } |
1828 case IMAGE_MONO_PIXMAP: | 1828 case IMAGE_MONO_PIXMAP: |
1829 case IMAGE_COLOR_PIXMAP: | 1829 case IMAGE_COLOR_PIXMAP: |
1830 case IMAGE_POINTER: | 1830 case IMAGE_POINTER: |
1831 case IMAGE_SUBWINDOW: | 1831 case IMAGE_SUBWINDOW: |
1832 case IMAGE_WIDGET: | 1832 case IMAGE_WIDGET: |
1833 return make_int (XIMAGE_INSTANCE_HEIGHT (image_instance)); | 1833 return make_fixnum (XIMAGE_INSTANCE_HEIGHT (image_instance)); |
1834 | 1834 |
1835 default: | 1835 default: |
1836 return Qnil; | 1836 return Qnil; |
1837 } | 1837 } |
1838 } | 1838 } |
1850 case IMAGE_MONO_PIXMAP: | 1850 case IMAGE_MONO_PIXMAP: |
1851 case IMAGE_COLOR_PIXMAP: | 1851 case IMAGE_COLOR_PIXMAP: |
1852 case IMAGE_POINTER: | 1852 case IMAGE_POINTER: |
1853 case IMAGE_SUBWINDOW: | 1853 case IMAGE_SUBWINDOW: |
1854 case IMAGE_WIDGET: | 1854 case IMAGE_WIDGET: |
1855 return make_int (XIMAGE_INSTANCE_WIDTH (image_instance)); | 1855 return make_fixnum (XIMAGE_INSTANCE_WIDTH (image_instance)); |
1856 | 1856 |
1857 default: | 1857 default: |
1858 return Qnil; | 1858 return Qnil; |
1859 } | 1859 } |
1860 } | 1860 } |
2701 if (result == BitmapSuccess) | 2701 if (result == BitmapSuccess) |
2702 { | 2702 { |
2703 Lisp_Object retval; | 2703 Lisp_Object retval; |
2704 int len = (w + 7) / 8 * h; | 2704 int len = (w + 7) / 8 * h; |
2705 | 2705 |
2706 retval = list3 (make_int (w), make_int (h), | 2706 retval = list3 (make_fixnum (w), make_fixnum (h), |
2707 make_extstring ((Extbyte *) data, len, Qbinary)); | 2707 make_extstring ((Extbyte *) data, len, Qbinary)); |
2708 XFree (data); | 2708 XFree (data); |
2709 return retval; | 2709 return retval; |
2710 } | 2710 } |
2711 | 2711 |
2734 } | 2734 } |
2735 default: | 2735 default: |
2736 { | 2736 { |
2737 signal_double_image_error_2 ("Reading bitmap file", | 2737 signal_double_image_error_2 ("Reading bitmap file", |
2738 "unknown error code", | 2738 "unknown error code", |
2739 make_int (result), name); | 2739 make_fixnum (result), name); |
2740 } | 2740 } |
2741 } | 2741 } |
2742 | 2742 |
2743 return Qnil; /* not reached */ | 2743 return Qnil; /* not reached */ |
2744 } | 2744 } |
2836 /* there can't be a :data at this point. */ | 2836 /* there can't be a :data at this point. */ |
2837 alist = Fcons (Fcons (Q_file, file), | 2837 alist = Fcons (Fcons (Q_file, file), |
2838 Fcons (Fcons (Q_data, data), alist)); | 2838 Fcons (Fcons (Q_data, data), alist)); |
2839 | 2839 |
2840 if (xhot != -1 && NILP (assq_no_quit (Q_hotspot_x, alist))) | 2840 if (xhot != -1 && NILP (assq_no_quit (Q_hotspot_x, alist))) |
2841 alist = Fcons (Fcons (Q_hotspot_x, make_int (xhot)), | 2841 alist = Fcons (Fcons (Q_hotspot_x, make_fixnum (xhot)), |
2842 alist); | 2842 alist); |
2843 if (yhot != -1 && NILP (assq_no_quit (Q_hotspot_y, alist))) | 2843 if (yhot != -1 && NILP (assq_no_quit (Q_hotspot_y, alist))) |
2844 alist = Fcons (Fcons (Q_hotspot_y, make_int (yhot)), | 2844 alist = Fcons (Fcons (Q_hotspot_y, make_fixnum (yhot)), |
2845 alist); | 2845 alist); |
2846 } | 2846 } |
2847 | 2847 |
2848 alist = xbm_mask_file_munging (alist, file, mask_file, console_type); | 2848 alist = xbm_mask_file_munging (alist, file, mask_file, console_type); |
2849 | 2849 |
3039 } | 3039 } |
3040 default: | 3040 default: |
3041 { | 3041 { |
3042 signal_double_image_error_2 ("Parsing pixmap file", | 3042 signal_double_image_error_2 ("Parsing pixmap file", |
3043 "unknown error code", | 3043 "unknown error code", |
3044 make_int (result), name); | 3044 make_fixnum (result), name); |
3045 break; | 3045 break; |
3046 } | 3046 } |
3047 } | 3047 } |
3048 | 3048 |
3049 return Qnil; /* not reached */ | 3049 return Qnil; /* not reached */ |
3347 hash_key = list2 (glyph, INSTANTIATOR_TYPE (instantiator)); | 3347 hash_key = list2 (glyph, INSTANTIATOR_TYPE (instantiator)); |
3348 | 3348 |
3349 /* First look in the device cache. */ | 3349 /* First look in the device cache. */ |
3350 if (DEVICEP (governing_domain)) | 3350 if (DEVICEP (governing_domain)) |
3351 { | 3351 { |
3352 subtable = Fgethash (make_int (dest_mask), | 3352 subtable = Fgethash (make_fixnum (dest_mask), |
3353 XDEVICE (governing_domain)-> | 3353 XDEVICE (governing_domain)-> |
3354 image_instance_cache, | 3354 image_instance_cache, |
3355 Qunbound); | 3355 Qunbound); |
3356 if (UNBOUNDP (subtable)) | 3356 if (UNBOUNDP (subtable)) |
3357 { | 3357 { |
3371 have to use EQUAL because we massaged the | 3371 have to use EQUAL because we massaged the |
3372 instantiator into a cons3 also containing the | 3372 instantiator into a cons3 also containing the |
3373 foreground and background of the pointer face. */ | 3373 foreground and background of the pointer face. */ |
3374 subtable = make_image_instance_cache_hash_table (); | 3374 subtable = make_image_instance_cache_hash_table (); |
3375 | 3375 |
3376 Fputhash (make_int (dest_mask), subtable, | 3376 Fputhash (make_fixnum (dest_mask), subtable, |
3377 XDEVICE (governing_domain)->image_instance_cache); | 3377 XDEVICE (governing_domain)->image_instance_cache); |
3378 instance = Qunbound; | 3378 instance = Qunbound; |
3379 } | 3379 } |
3380 else | 3380 else |
3381 { | 3381 { |
3577 Lisp_Object contype = XCAR (rest); | 3577 Lisp_Object contype = XCAR (rest); |
3578 if (!NILP (memq_no_quit (contype, tag_set))) | 3578 if (!NILP (memq_no_quit (contype, tag_set))) |
3579 possible_console_types = Fcons (contype, possible_console_types); | 3579 possible_console_types = Fcons (contype, possible_console_types); |
3580 } | 3580 } |
3581 | 3581 |
3582 if (XINT (Flength (possible_console_types)) > 1) | 3582 if (XFIXNUM (Flength (possible_console_types)) > 1) |
3583 /* two conflicting console types specified */ | 3583 /* two conflicting console types specified */ |
3584 return Qnil; | 3584 return Qnil; |
3585 | 3585 |
3586 if (NILP (possible_console_types)) | 3586 if (NILP (possible_console_types)) |
3587 possible_console_types = Vconsole_type_list; | 3587 possible_console_types = Vconsole_type_list; |
3592 { | 3592 { |
3593 Lisp_Object contype = XCAR (rest); | 3593 Lisp_Object contype = XCAR (rest); |
3594 Lisp_Object newinst = call_with_suspended_errors | 3594 Lisp_Object newinst = call_with_suspended_errors |
3595 ((lisp_fn_t) normalize_image_instantiator, | 3595 ((lisp_fn_t) normalize_image_instantiator, |
3596 Qnil, Qimage, ERROR_ME_DEBUG_WARN, 3, instantiator, contype, | 3596 Qnil, Qimage, ERROR_ME_DEBUG_WARN, 3, instantiator, contype, |
3597 make_int (XIMAGE_SPECIFIER_ALLOWED (specifier))); | 3597 make_fixnum (XIMAGE_SPECIFIER_ALLOWED (specifier))); |
3598 | 3598 |
3599 if (!NILP (newinst)) | 3599 if (!NILP (newinst)) |
3600 { | 3600 { |
3601 Lisp_Object newtag; | 3601 Lisp_Object newtag; |
3602 if (NILP (memq_no_quit (contype, tag_set))) | 3602 if (NILP (memq_no_quit (contype, tag_set))) |
4071 (glyph, window)) | 4071 (glyph, window)) |
4072 { | 4072 { |
4073 window = wrap_window (decode_window (window)); | 4073 window = wrap_window (decode_window (window)); |
4074 CHECK_GLYPH (glyph); | 4074 CHECK_GLYPH (glyph); |
4075 | 4075 |
4076 return make_int (glyph_width (glyph, window)); | 4076 return make_fixnum (glyph_width (glyph, window)); |
4077 } | 4077 } |
4078 | 4078 |
4079 unsigned short | 4079 unsigned short |
4080 glyph_ascent (Lisp_Object glyph_or_image, Lisp_Object domain) | 4080 glyph_ascent (Lisp_Object glyph_or_image, Lisp_Object domain) |
4081 { | 4081 { |
4143 (glyph, window)) | 4143 (glyph, window)) |
4144 { | 4144 { |
4145 window = wrap_window (decode_window (window)); | 4145 window = wrap_window (decode_window (window)); |
4146 CHECK_GLYPH (glyph); | 4146 CHECK_GLYPH (glyph); |
4147 | 4147 |
4148 return make_int (glyph_ascent (glyph, window)); | 4148 return make_fixnum (glyph_ascent (glyph, window)); |
4149 } | 4149 } |
4150 | 4150 |
4151 DEFUN ("glyph-descent", Fglyph_descent, 1, 2, 0, /* | 4151 DEFUN ("glyph-descent", Fglyph_descent, 1, 2, 0, /* |
4152 Return the descent value of GLYPH on WINDOW. | 4152 Return the descent value of GLYPH on WINDOW. |
4153 This may not be exact as it does not take into account all of the context | 4153 This may not be exact as it does not take into account all of the context |
4156 (glyph, window)) | 4156 (glyph, window)) |
4157 { | 4157 { |
4158 window = wrap_window (decode_window (window)); | 4158 window = wrap_window (decode_window (window)); |
4159 CHECK_GLYPH (glyph); | 4159 CHECK_GLYPH (glyph); |
4160 | 4160 |
4161 return make_int (glyph_descent (glyph, window)); | 4161 return make_fixnum (glyph_descent (glyph, window)); |
4162 } | 4162 } |
4163 | 4163 |
4164 /* This is redundant but I bet a lot of people expect it to exist. */ | 4164 /* This is redundant but I bet a lot of people expect it to exist. */ |
4165 DEFUN ("glyph-height", Fglyph_height, 1, 2, 0, /* | 4165 DEFUN ("glyph-height", Fglyph_height, 1, 2, 0, /* |
4166 Return the height of GLYPH on WINDOW. | 4166 Return the height of GLYPH on WINDOW. |
4170 (glyph, window)) | 4170 (glyph, window)) |
4171 { | 4171 { |
4172 window = wrap_window (decode_window (window)); | 4172 window = wrap_window (decode_window (window)); |
4173 CHECK_GLYPH (glyph); | 4173 CHECK_GLYPH (glyph); |
4174 | 4174 |
4175 return make_int (glyph_height (glyph, window)); | 4175 return make_fixnum (glyph_height (glyph, window)); |
4176 } | 4176 } |
4177 | 4177 |
4178 static void | 4178 static void |
4179 set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty) | 4179 set_glyph_dirty_p (Lisp_Object glyph_or_image, Lisp_Object window, int dirty) |
4180 { | 4180 { |
4224 Lisp_Object retval = | 4224 Lisp_Object retval = |
4225 specifier_instance_no_quit (GLYPH_BASELINE (XGLYPH (glyph)), | 4225 specifier_instance_no_quit (GLYPH_BASELINE (XGLYPH (glyph)), |
4226 /* #### look into error flag */ | 4226 /* #### look into error flag */ |
4227 Qunbound, domain, ERROR_ME_DEBUG_WARN, | 4227 Qunbound, domain, ERROR_ME_DEBUG_WARN, |
4228 0, Qzero); | 4228 0, Qzero); |
4229 if (!NILP (retval) && !INTP (retval)) | 4229 if (!NILP (retval) && !FIXNUMP (retval)) |
4230 retval = Qnil; | 4230 retval = Qnil; |
4231 else if (INTP (retval)) | 4231 else if (FIXNUMP (retval)) |
4232 { | 4232 { |
4233 if (XINT (retval) < 0) | 4233 if (XFIXNUM (retval) < 0) |
4234 retval = Qzero; | 4234 retval = Qzero; |
4235 if (XINT (retval) > 100) | 4235 if (XFIXNUM (retval) > 100) |
4236 retval = make_int (100); | 4236 retval = make_fixnum (100); |
4237 } | 4237 } |
4238 return retval; | 4238 return retval; |
4239 } | 4239 } |
4240 } | 4240 } |
4241 | 4241 |
4937 | 4937 |
4938 ii->data = 0; | 4938 ii->data = 0; |
4939 IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0; | 4939 IMAGE_INSTANCE_SUBWINDOW_ID (ii) = 0; |
4940 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; | 4940 IMAGE_INSTANCE_SUBWINDOW_DISPLAYEDP (ii) = 0; |
4941 | 4941 |
4942 if (INTP (width)) | 4942 if (FIXNUMP (width)) |
4943 { | 4943 { |
4944 int w = 1; | 4944 int w = 1; |
4945 if (XINT (width) > 1) | 4945 if (XFIXNUM (width) > 1) |
4946 w = XINT (width); | 4946 w = XFIXNUM (width); |
4947 IMAGE_INSTANCE_WIDTH (ii) = w; | 4947 IMAGE_INSTANCE_WIDTH (ii) = w; |
4948 IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; | 4948 IMAGE_INSTANCE_SUBWINDOW_H_RESIZEP (ii) = 0; |
4949 } | 4949 } |
4950 | 4950 |
4951 if (INTP (height)) | 4951 if (FIXNUMP (height)) |
4952 { | 4952 { |
4953 int h = 1; | 4953 int h = 1; |
4954 if (XINT (height) > 1) | 4954 if (XFIXNUM (height) > 1) |
4955 h = XINT (height); | 4955 h = XFIXNUM (height); |
4956 IMAGE_INSTANCE_HEIGHT (ii) = h; | 4956 IMAGE_INSTANCE_HEIGHT (ii) = h; |
4957 IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0; | 4957 IMAGE_INSTANCE_SUBWINDOW_V_RESIZEP (ii) = 0; |
4958 } | 4958 } |
4959 } | 4959 } |
4960 | 4960 |
4983 Return the window id of SUBWINDOW as a number. | 4983 Return the window id of SUBWINDOW as a number. |
4984 */ | 4984 */ |
4985 (subwindow)) | 4985 (subwindow)) |
4986 { | 4986 { |
4987 CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow); | 4987 CHECK_SUBWINDOW_IMAGE_INSTANCE (subwindow); |
4988 return make_int ((EMACS_INT) XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow)); | 4988 return make_fixnum ((EMACS_INT) XIMAGE_INSTANCE_SUBWINDOW_ID (subwindow)); |
4989 } | 4989 } |
4990 | 4990 |
4991 DEFUN ("resize-subwindow", Fresize_subwindow, 1, 3, 0, /* | 4991 DEFUN ("resize-subwindow", Fresize_subwindow, 1, 3, 0, /* |
4992 Resize SUBWINDOW to WIDTH x HEIGHT. | 4992 Resize SUBWINDOW to WIDTH x HEIGHT. |
4993 If a value is nil that parameter is not changed. | 4993 If a value is nil that parameter is not changed. |
5001 ii = XIMAGE_INSTANCE (subwindow); | 5001 ii = XIMAGE_INSTANCE (subwindow); |
5002 | 5002 |
5003 if (NILP (width)) | 5003 if (NILP (width)) |
5004 neww = IMAGE_INSTANCE_WIDTH (ii); | 5004 neww = IMAGE_INSTANCE_WIDTH (ii); |
5005 else | 5005 else |
5006 neww = XINT (width); | 5006 neww = XFIXNUM (width); |
5007 | 5007 |
5008 if (NILP (height)) | 5008 if (NILP (height)) |
5009 newh = IMAGE_INSTANCE_HEIGHT (ii); | 5009 newh = IMAGE_INSTANCE_HEIGHT (ii); |
5010 else | 5010 else |
5011 newh = XINT (height); | 5011 newh = XFIXNUM (height); |
5012 | 5012 |
5013 /* The actual resizing gets done asynchronously by | 5013 /* The actual resizing gets done asynchronously by |
5014 update_subwindow. */ | 5014 update_subwindow. */ |
5015 IMAGE_INSTANCE_HEIGHT (ii) = newh; | 5015 IMAGE_INSTANCE_HEIGHT (ii) = newh; |
5016 IMAGE_INSTANCE_WIDTH (ii) = neww; | 5016 IMAGE_INSTANCE_WIDTH (ii) = neww; |
5183 } | 5183 } |
5184 | 5184 |
5185 void | 5185 void |
5186 disable_glyph_animated_timeout (int i) | 5186 disable_glyph_animated_timeout (int i) |
5187 { | 5187 { |
5188 Fdisable_timeout (make_int (i)); | 5188 Fdisable_timeout (make_fixnum (i)); |
5189 } | 5189 } |
5190 | 5190 |
5191 | 5191 |
5192 /***************************************************************************** | 5192 /***************************************************************************** |
5193 * initialization * | 5193 * initialization * |