Mercurial > hg > xemacs-beta
comparison src/device-x.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 | 0af042a0c116 |
children | 1d1f385c9149 |
comparison
equal
deleted
inserted
replaced
5580:a0e81357194e | 5581:56144c8593a8 |
---|---|
1615 build_extstring (raw_result, codesys), Qresource, | 1615 build_extstring (raw_result, codesys), Qresource, |
1616 errb); | 1616 errb); |
1617 else if (EQ (type, Qnatnum) && i < 0) | 1617 else if (EQ (type, Qnatnum) && i < 0) |
1618 return maybe_signal_continuable_error_2 | 1618 return maybe_signal_continuable_error_2 |
1619 (Qinvalid_argument, "Invalid numerical value for resource", | 1619 (Qinvalid_argument, "Invalid numerical value for resource", |
1620 make_int (i), build_extstring (name_string, Qbinary), | 1620 make_fixnum (i), build_extstring (name_string, Qbinary), |
1621 Qresource, errb); | 1621 Qresource, errb); |
1622 else | 1622 else |
1623 return make_int (i); | 1623 return make_fixnum (i); |
1624 } | 1624 } |
1625 else | 1625 else |
1626 { | 1626 { |
1627 return maybe_signal_continuable_error | 1627 return maybe_signal_continuable_error |
1628 (Qwrong_type_argument, "Should be string, integer, natnum or boolean", | 1628 (Qwrong_type_argument, "Should be string, integer, natnum or boolean", |
1733 DEFUN ("x-display-visual-depth", Fx_display_visual_depth, 0, 1, 0, /* | 1733 DEFUN ("x-display-visual-depth", Fx_display_visual_depth, 0, 1, 0, /* |
1734 Return the bitplane depth of the visual the X display DEVICE is using. | 1734 Return the bitplane depth of the visual the X display DEVICE is using. |
1735 */ | 1735 */ |
1736 (device)) | 1736 (device)) |
1737 { | 1737 { |
1738 return make_int (DEVICE_X_DEPTH (decode_x_device (device))); | 1738 return make_fixnum (DEVICE_X_DEPTH (decode_x_device (device))); |
1739 } | 1739 } |
1740 | 1740 |
1741 static Lisp_Object | 1741 static Lisp_Object |
1742 x_device_system_metrics (struct device *d, | 1742 x_device_system_metrics (struct device *d, |
1743 enum device_metrics m) | 1743 enum device_metrics m) |
1745 Display *dpy = DEVICE_X_DISPLAY (d); | 1745 Display *dpy = DEVICE_X_DISPLAY (d); |
1746 | 1746 |
1747 switch (m) | 1747 switch (m) |
1748 { | 1748 { |
1749 case DM_size_device: | 1749 case DM_size_device: |
1750 return Fcons (make_int (DisplayWidth (dpy, DefaultScreen (dpy))), | 1750 return Fcons (make_fixnum (DisplayWidth (dpy, DefaultScreen (dpy))), |
1751 make_int (DisplayHeight (dpy, DefaultScreen (dpy)))); | 1751 make_fixnum (DisplayHeight (dpy, DefaultScreen (dpy)))); |
1752 case DM_size_device_mm: | 1752 case DM_size_device_mm: |
1753 return Fcons (make_int (DisplayWidthMM (dpy, DefaultScreen (dpy))), | 1753 return Fcons (make_fixnum (DisplayWidthMM (dpy, DefaultScreen (dpy))), |
1754 make_int (DisplayHeightMM (dpy, DefaultScreen (dpy)))); | 1754 make_fixnum (DisplayHeightMM (dpy, DefaultScreen (dpy)))); |
1755 case DM_num_bit_planes: | 1755 case DM_num_bit_planes: |
1756 return make_int (DisplayPlanes (dpy, DefaultScreen (dpy))); | 1756 return make_fixnum (DisplayPlanes (dpy, DefaultScreen (dpy))); |
1757 case DM_num_color_cells: | 1757 case DM_num_color_cells: |
1758 return make_int (DisplayCells (dpy, DefaultScreen (dpy))); | 1758 return make_fixnum (DisplayCells (dpy, DefaultScreen (dpy))); |
1759 case DM_num_screens: | 1759 case DM_num_screens: |
1760 return make_int (ScreenCount (dpy)); | 1760 return make_fixnum (ScreenCount (dpy)); |
1761 case DM_backing_store: | 1761 case DM_backing_store: |
1762 switch (DoesBackingStore (DefaultScreenOfDisplay (dpy))) | 1762 switch (DoesBackingStore (DefaultScreenOfDisplay (dpy))) |
1763 { | 1763 { |
1764 case Always: | 1764 case Always: |
1765 return intern ("always"); | 1765 return intern ("always"); |
1796 */ | 1796 */ |
1797 (device)) | 1797 (device)) |
1798 { | 1798 { |
1799 Display *dpy = get_x_display (device); | 1799 Display *dpy = get_x_display (device); |
1800 | 1800 |
1801 return list3 (make_int (ProtocolVersion (dpy)), | 1801 return list3 (make_fixnum (ProtocolVersion (dpy)), |
1802 make_int (ProtocolRevision (dpy)), | 1802 make_fixnum (ProtocolRevision (dpy)), |
1803 make_int (VendorRelease (dpy))); | 1803 make_fixnum (VendorRelease (dpy))); |
1804 } | 1804 } |
1805 | 1805 |
1806 DEFUN ("x-valid-keysym-name-p", Fx_valid_keysym_name_p, 1, 1, 0, /* | 1806 DEFUN ("x-valid-keysym-name-p", Fx_valid_keysym_name_p, 1, 1, 0, /* |
1807 Return true if KEYSYM names a keysym that the X library knows about. | 1807 Return true if KEYSYM names a keysym that the X library knows about. |
1808 Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in | 1808 Valid keysyms are listed in the files /usr/include/X11/keysymdef.h and in |