Mercurial > hg > xemacs-beta
diff src/intl-win32.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 |
line wrap: on
line diff
--- a/src/intl-win32.c Sat Oct 08 12:26:09 2011 +0100 +++ b/src/intl-win32.c Sun Oct 09 09:51:57 2011 +0100 @@ -1017,7 +1017,7 @@ (locale)) { LCID lcid = NILP (locale) ? current_locale : locale_to_lcid (locale); - return make_int (mswindows_locale_to_code_page (lcid)); + return make_fixnum (mswindows_locale_to_code_page (lcid)); } DEFUN ("mswindows-locale-oem-code-page", Fmswindows_locale_oem_code_page, @@ -1028,7 +1028,7 @@ (locale)) { LCID lcid = NILP (locale) ? current_locale : locale_to_lcid (locale); - return make_int (mswindows_locale_to_oem_code_page (lcid)); + return make_fixnum (mswindows_locale_to_oem_code_page (lcid)); } static DWORD @@ -1184,7 +1184,7 @@ (charset, code_page)) { charset = Fget_charset (charset); - CHECK_INT (code_page); + CHECK_FIXNUM (code_page); Fputhash (charset, code_page, Vmswindows_charset_code_page_table); return Qnil; } @@ -1200,8 +1200,8 @@ Lisp_Object charset_code_page; charset_code_page = Fmswindows_charset_code_page (XCAR (charset_tail)); - if (INTP (charset_code_page) && - code_page == XINT (charset_code_page)) + if (FIXNUMP (charset_code_page) && + code_page == XFIXNUM (charset_code_page)) { charset = Fget_charset (XCAR (charset_tail)); break; @@ -1289,14 +1289,14 @@ Extbyte abbrev_name[32] = { 0 }; Extbyte full_name[256] = { 0 }; - CHECK_INT (lcid); + CHECK_FIXNUM (lcid); - if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED)) + if (!IsValidLocale (XFIXNUM (lcid), LCID_SUPPORTED)) return Qnil; if (NILP (longform)) { - got_abbrev = qxeGetLocaleInfo (XINT (lcid), + got_abbrev = qxeGetLocaleInfo (XFIXNUM (lcid), LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP, abbrev_name, sizeof (abbrev_name)); @@ -1305,7 +1305,7 @@ } else if (EQ (longform, Qt)) { - got_full = qxeGetLocaleInfo (XINT (lcid), + got_full = qxeGetLocaleInfo (XFIXNUM (lcid), LOCALE_SLANGUAGE | LOCALE_USE_CP_ACP, full_name, sizeof (full_name)); if (got_full) @@ -1313,8 +1313,8 @@ } else if (NUMBERP (longform)) { - got_full = qxeGetLocaleInfo (XINT (lcid), - XINT (longform), + got_full = qxeGetLocaleInfo (XFIXNUM (lcid), + XFIXNUM (longform), full_name, sizeof (full_name)); if (got_full) return build_tstr_string (full_name); @@ -1330,7 +1330,7 @@ BOOL CALLBACK enum_code_page_fn (LPTSTR codepageNum) { DWORD id = atoi (codepageNum); - Vmswindows_valid_code_pages = Fcons (make_int (id), Vmswindows_valid_code_pages); + Vmswindows_valid_code_pages = Fcons (make_fixnum (id), Vmswindows_valid_code_pages); return TRUE; } @@ -1352,7 +1352,7 @@ */ ()) { - return make_int (GetConsoleCP ()); + return make_fixnum (GetConsoleCP ()); } DEFUN ("mswindows-set-console-code-page", Fmswindows_set_console_code_page, 1, 1, 0, /* @@ -1362,15 +1362,15 @@ */ (cp)) { - CHECK_INT (cp); + CHECK_FIXNUM (cp); - if (!IsValidCodePage (XINT (cp))) + if (!IsValidCodePage (XFIXNUM (cp))) return Qnil; - if (!SetConsoleCP (XINT (cp))) + if (!SetConsoleCP (XFIXNUM (cp))) return Qnil; - return make_int (GetConsoleCP ()); + return make_fixnum (GetConsoleCP ()); } DEFUN ("mswindows-get-console-output-code-page", Fmswindows_get_console_output_code_page, 0, 0, 0, /* @@ -1378,7 +1378,7 @@ */ ()) { - return make_int (GetConsoleOutputCP ()); + return make_fixnum (GetConsoleOutputCP ()); } DEFUN ("mswindows-set-console-output-code-page", Fmswindows_set_console_output_code_page, 1, 1, 0, /* @@ -1388,15 +1388,15 @@ */ (cp)) { - CHECK_INT (cp); + CHECK_FIXNUM (cp); - if (!IsValidCodePage (XINT (cp))) + if (!IsValidCodePage (XFIXNUM (cp))) return Qnil; - if (!SetConsoleOutputCP (XINT (cp))) + if (!SetConsoleOutputCP (XFIXNUM (cp))) return Qnil; - return make_int (GetConsoleOutputCP ()); + return make_fixnum (GetConsoleOutputCP ()); } DEFUN ("mswindows-get-code-page-charset", Fmswindows_get_code_page_charset, 1, 1, 0, /* @@ -1407,13 +1407,13 @@ { CHARSETINFO info; - CHECK_INT (cp); + CHECK_FIXNUM (cp); - if (!IsValidCodePage (XINT (cp))) + if (!IsValidCodePage (XFIXNUM (cp))) return Qnil; - if (TranslateCharsetInfo ((DWORD *) XINT (cp), &info, TCI_SRCCODEPAGE)) - return make_int (info.ciCharset); + if (TranslateCharsetInfo ((DWORD *) XFIXNUM (cp), &info, TCI_SRCCODEPAGE)) + return make_fixnum (info.ciCharset); return Qnil; } @@ -1434,8 +1434,8 @@ { DWORD kl = (DWORD) layouts[num_layouts]; - obj = Fcons (Fcons (make_int (kl & 0xffff), - make_int ((kl >> 16) & 0xffff)), + obj = Fcons (Fcons (make_fixnum (kl & 0xffff), + make_fixnum ((kl >> 16) & 0xffff)), obj); } } @@ -1451,8 +1451,8 @@ { DWORD kl = (DWORD) GetKeyboardLayout (dwWindowsThreadId); - return Fcons (make_int (kl & 0xffff), - make_int ((kl >> 16) & 0xffff)); + return Fcons (make_fixnum (kl & 0xffff), + make_fixnum ((kl >> 16) & 0xffff)); } DEFUN ("mswindows-set-keyboard-layout", Fmswindows_set_keyboard_layout, 1, 1, 0, /* @@ -1465,11 +1465,11 @@ DWORD kl; CHECK_CONS (layout); - CHECK_INT (XCAR (layout))); - CHECK_INT (XCDR (layout))); + CHECK_FIXNUM (XCAR (layout))); + CHECK_FIXNUM (XCDR (layout))); - kl = (XINT (XCAR (layout))) & 0xffff) - | (XINT (XCDR (layout))) << 16); + kl = (XFIXNUM (XCAR (layout))) & 0xffff) + | (XFIXNUM (XCDR (layout))) << 16); if (!ActivateKeyboardLayout ((HKL) kl, 0)) return Qnil; @@ -1793,10 +1793,10 @@ data->locale_type = MULTIBYTE_SPECIFIED_CODE_PAGE; #ifdef HAVE_BIGNUM check_integer_range (value, Qzero, make_integer (INT_MAX)); - data->cp = BIGNUMP (value) ? bignum_to_int (XBIGNUM_DATA (value)) : XINT (value); + data->cp = BIGNUMP (value) ? bignum_to_int (XBIGNUM_DATA (value)) : XFIXNUM (value); #else CHECK_NATNUM (value); - data->cp = XINT (value); + data->cp = XFIXNUM (value); #endif } } @@ -1833,7 +1833,7 @@ if (EQ (prop, Qcode_page)) { if (data->locale_type == MULTIBYTE_SPECIFIED_CODE_PAGE) - return make_int (data->cp); + return make_fixnum (data->cp); else switch (data->cp_type) { @@ -1872,7 +1872,7 @@ write_ascstring (printcharfun, "("); if (data->locale_type == MULTIBYTE_SPECIFIED_CODE_PAGE) - print_internal (make_int (data->cp), printcharfun, 1); + print_internal (make_fixnum (data->cp), printcharfun, 1); else { write_fmt_string_lisp (printcharfun, "%s, ", 1, mswindows_multibyte_to_unicode_getprop (cs, Qlocale));