comparison src/redisplay-xlike-inc.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 580ef98f2beb
children 444713e89160
comparison
equal deleted inserted replaced
5580:a0e81357194e 5581:56144c8593a8
855 XLIKE_FONT_NUM (FONT_INSTANCE_XLIKE_FONT (XFONT_INSTANCE (font))); 855 XLIKE_FONT_NUM (FONT_INSTANCE_XLIKE_FONT (XFONT_INSTANCE (font)));
856 mask |= XLIKE_GC_FONT; 856 mask |= XLIKE_GC_FONT;
857 } 857 }
858 858
859 /* evil kludge! */ 859 /* evil kludge! */
860 if (!NILP (fg) && !COLOR_INSTANCEP (fg) && !INTP (fg)) 860 if (!NILP (fg) && !COLOR_INSTANCEP (fg) && !FIXNUMP (fg))
861 { 861 {
862 /* #### I fixed one case where this was getting hit. It was a 862 /* #### I fixed one case where this was getting hit. It was a
863 bad macro expansion (compiler bug). */ 863 bad macro expansion (compiler bug). */
864 stderr_out ("Help! x_get_gc got a bogus fg value! fg = "); 864 stderr_out ("Help! x_get_gc got a bogus fg value! fg = ");
865 debug_print (fg); 865 debug_print (fg);
869 if (!NILP (fg)) 869 if (!NILP (fg))
870 { 870 {
871 if (COLOR_INSTANCEP (fg)) 871 if (COLOR_INSTANCEP (fg))
872 XLIKE_SET_GC_COLOR (gcv.foreground, XCOLOR_INSTANCE_XLIKE_COLOR (fg)); 872 XLIKE_SET_GC_COLOR (gcv.foreground, XCOLOR_INSTANCE_XLIKE_COLOR (fg));
873 else 873 else
874 XLIKE_SET_GC_PIXEL (gcv.foreground, XINT (fg)); 874 XLIKE_SET_GC_PIXEL (gcv.foreground, XFIXNUM (fg));
875 mask |= XLIKE_GC_FOREGROUND; 875 mask |= XLIKE_GC_FOREGROUND;
876 } 876 }
877 877
878 if (!NILP (bg)) 878 if (!NILP (bg))
879 { 879 {
880 if (COLOR_INSTANCEP (bg)) 880 if (COLOR_INSTANCEP (bg))
881 XLIKE_SET_GC_COLOR (gcv.background, XCOLOR_INSTANCE_XLIKE_COLOR (bg)); 881 XLIKE_SET_GC_COLOR (gcv.background, XCOLOR_INSTANCE_XLIKE_COLOR (bg));
882 else 882 else
883 XLIKE_SET_GC_PIXEL (gcv.background, XINT (bg)); 883 XLIKE_SET_GC_PIXEL (gcv.background, XFIXNUM (bg));
884 mask |= XLIKE_GC_BACKGROUND; 884 mask |= XLIKE_GC_BACKGROUND;
885 } 885 }
886 886
887 /* This special case comes from a request to draw text with a face which has 887 /* This special case comes from a request to draw text with a face which has
888 the dim property. We'll use a stippled foreground GC. */ 888 the dim property. We'll use a stippled foreground GC. */
925 } 925 }
926 } 926 }
927 927
928 if (!NILP (lwidth)) 928 if (!NILP (lwidth))
929 { 929 {
930 gcv.line_width = XINT (lwidth); 930 gcv.line_width = XFIXNUM (lwidth);
931 mask |= XLIKE_GC_LINE_WIDTH; 931 mask |= XLIKE_GC_LINE_WIDTH;
932 } 932 }
933 933
934 #if 0 934 #if 0
935 debug_out ("\nx_get_gc: calling gc_cache_lookup\n"); 935 debug_out ("\nx_get_gc: calling gc_cache_lookup\n");
1552 1552
1553 if (!NILP (bar_cursor_value)) 1553 if (!NILP (bar_cursor_value))
1554 { 1554 {
1555 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, Qnil, 1555 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, Qnil,
1556 Qnil, Qnil, 1556 Qnil, Qnil,
1557 make_int (bar_width)); 1557 make_fixnum (bar_width));
1558 } 1558 }
1559 else 1559 else
1560 { 1560 {
1561 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, 1561 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background,
1562 Qnil, Qnil, Qnil, Qnil); 1562 Qnil, Qnil, Qnil, Qnil);
1785 int x, ytop, ybottom, width, shadow_thickness, spacing, line_width; 1785 int x, ytop, ybottom, width, shadow_thickness, spacing, line_width;
1786 face_index div_face = 1786 face_index div_face =
1787 get_builtin_face_cache_index (w, Vvertical_divider_face); 1787 get_builtin_face_cache_index (w, Vvertical_divider_face);
1788 1788
1789 width = window_divider_width (w); 1789 width = window_divider_width (w);
1790 shadow_thickness = XINT (w->vertical_divider_shadow_thickness); 1790 shadow_thickness = XFIXNUM (w->vertical_divider_shadow_thickness);
1791 spacing = XINT (w->vertical_divider_spacing); 1791 spacing = XFIXNUM (w->vertical_divider_spacing);
1792 line_width = XINT (w->vertical_divider_line_width); 1792 line_width = XFIXNUM (w->vertical_divider_line_width);
1793 x = WINDOW_RIGHT (w) - width; 1793 x = WINDOW_RIGHT (w) - width;
1794 ytop = WINDOW_TOP (w); 1794 ytop = WINDOW_TOP (w);
1795 ybottom = WINDOW_BOTTOM (w); 1795 ybottom = WINDOW_BOTTOM (w);
1796 1796
1797 memset (&gcv, ~0, sizeof (gcv)); 1797 memset (&gcv, ~0, sizeof (gcv));
1938 { 1938 {
1939 int bar_width = EQ (bar_cursor_value, Qt) ? 1 : 2; 1939 int bar_width = EQ (bar_cursor_value, Qt) ? 1 : 2;
1940 1940
1941 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, 1941 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background,
1942 Qnil, Qnil, Qnil, 1942 Qnil, Qnil, Qnil,
1943 make_int (bar_width)); 1943 make_fixnum (bar_width));
1944 XLIKE_DRAW_LINE (dpy, x_win, gc, cursor_start + bar_width - 1, 1944 XLIKE_DRAW_LINE (dpy, x_win, gc, cursor_start + bar_width - 1,
1945 cursor_y, cursor_start + bar_width - 1, 1945 cursor_y, cursor_start + bar_width - 1,
1946 cursor_y + cursor_height - 1); 1946 cursor_y + cursor_height - 1);
1947 } 1947 }
1948 } 1948 }
2106 { 2106 {
2107 int bar_width = EQ (bar_cursor_value, Qt) ? 1 : 2; 2107 int bar_width = EQ (bar_cursor_value, Qt) ? 1 : 2;
2108 2108
2109 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, Qnil, 2109 gc = XLIKE_get_gc (f, Qnil, cursor_cachel->background, Qnil,
2110 Qnil, Qnil, 2110 Qnil, Qnil,
2111 make_int (bar_width)); 2111 make_fixnum (bar_width));
2112 XLIKE_DRAW_LINE (dpy, x_win, gc, x + bar_width - 1, cursor_y, 2112 XLIKE_DRAW_LINE (dpy, x_win, gc, x + bar_width - 1, cursor_y,
2113 x + bar_width - 1, cursor_y + cursor_height - 1); 2113 x + bar_width - 1, cursor_y + cursor_height - 1);
2114 } 2114 }
2115 } 2115 }
2116 else if (NILP (bar_cursor_value)) 2116 else if (NILP (bar_cursor_value))