aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTom Tromey2018-08-07 18:08:53 -0600
committerTom Tromey2018-08-07 18:08:53 -0600
commitd1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8 (patch)
tree04c920acf142f686d3cac11080b17a2fb0dfc9af /src
parent68ebff23f7057090da260830500cb278f7b886a5 (diff)
downloademacs-d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8.tar.gz
emacs-d1ec3a0a8e4d7d56ebc1e4fa743130b9974ac6a8.zip
More macro renamings for bignum
* src/alloc.c, src/bidi.c, src/buffer.c, src/buffer.h, src/bytecode.c, src/callint.c, src/callproc.c, src/casefiddle.c, src/casetab.c, src/category.c, src/ccl.c, src/character.c, src/character.h, src/charset.c, src/charset.h, src/chartab.c, src/cmds.c, src/coding.c, src/composite.c, src/composite.h, src/data.c, src/dbusbind.c, src/decompress.c, src/dired.c, src/dispextern.h, src/dispnew.c, src/disptab.h, src/doc.c, src/dosfns.c, src/editfns.c, src/emacs-module.c, src/emacs.c, src/eval.c, src/fileio.c, src/floatfns.c, src/fns.c, src/font.c, src/font.h, src/fontset.c, src/frame.c, src/frame.h, src/fringe.c, src/ftcrfont.c, src/ftfont.c, src/gfilenotify.c, src/gnutls.c, src/gtkutil.c, src/image.c, src/indent.c, src/insdel.c, src/intervals.c, src/json.c, src/keyboard.c, src/keymap.c, src/kqueue.c, src/lcms.c, src/lisp.h, src/lread.c, src/macros.c, src/marker.c, src/menu.c, src/minibuf.c, src/msdos.c, src/print.c, src/process.c, src/profiler.c, src/search.c, src/sound.c, src/syntax.c, src/syntax.h, src/sysdep.c, src/term.c, src/termhooks.h, src/textprop.c, src/undo.c, src/w32.c, src/w32console.c, src/w32fns.c, src/w32font.c, src/w32inevt.c, src/w32proc.c, src/w32select.c, src/w32term.c, src/w32term.h, src/w32uniscribe.c, src/window.c, src/xdisp.c, src/xfaces.c, src/xfns.c, src/xfont.c, src/xftfont.c, src/xmenu.c, src/xml.c, src/xrdb.c, src/xselect.c, src/xsettings.c, src/xterm.c, src/xwidget.c Rename XINT->XFIXNUM, XFASTINT->XFIXNAT, XUINT->XUFIXNUM.
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c22
-rw-r--r--src/bidi.c10
-rw-r--r--src/buffer.c58
-rw-r--r--src/buffer.h6
-rw-r--r--src/bytecode.c38
-rw-r--r--src/callint.c6
-rw-r--r--src/callproc.c2
-rw-r--r--src/casefiddle.c12
-rw-r--r--src/casetab.c12
-rw-r--r--src/category.c36
-rw-r--r--src/ccl.c118
-rw-r--r--src/character.c34
-rw-r--r--src/character.h8
-rw-r--r--src/charset.c158
-rw-r--r--src/charset.h6
-rw-r--r--src/chartab.c44
-rw-r--r--src/cmds.c36
-rw-r--r--src/coding.c234
-rw-r--r--src/composite.c60
-rw-r--r--src/composite.h32
-rw-r--r--src/data.c170
-rw-r--r--src/dbusbind.c18
-rw-r--r--src/decompress.c4
-rw-r--r--src/dired.c2
-rw-r--r--src/dispextern.h12
-rw-r--r--src/dispnew.c4
-rw-r--r--src/disptab.h2
-rw-r--r--src/doc.c2
-rw-r--r--src/dosfns.c28
-rw-r--r--src/editfns.c202
-rw-r--r--src/emacs-module.c6
-rw-r--r--src/emacs.c6
-rw-r--r--src/eval.c24
-rw-r--r--src/fileio.c48
-rw-r--r--src/floatfns.c30
-rw-r--r--src/fns.c106
-rw-r--r--src/font.c168
-rw-r--r--src/font.h6
-rw-r--r--src/fontset.c48
-rw-r--r--src/frame.c166
-rw-r--r--src/frame.h4
-rw-r--r--src/fringe.c16
-rw-r--r--src/ftcrfont.c2
-rw-r--r--src/ftfont.c30
-rw-r--r--src/gfilenotify.c6
-rw-r--r--src/gnutls.c24
-rw-r--r--src/gtkutil.c10
-rw-r--r--src/image.c64
-rw-r--r--src/indent.c72
-rw-r--r--src/insdel.c6
-rw-r--r--src/intervals.c24
-rw-r--r--src/json.c2
-rw-r--r--src/keyboard.c152
-rw-r--r--src/keymap.c110
-rw-r--r--src/kqueue.c6
-rw-r--r--src/lcms.c2
-rw-r--r--src/lisp.h60
-rw-r--r--src/lread.c44
-rw-r--r--src/macros.c14
-rw-r--r--src/marker.c4
-rw-r--r--src/menu.c20
-rw-r--r--src/minibuf.c20
-rw-r--r--src/msdos.c12
-rw-r--r--src/print.c30
-rw-r--r--src/process.c64
-rw-r--r--src/profiler.c12
-rw-r--r--src/search.c32
-rw-r--r--src/sound.c6
-rw-r--r--src/syntax.c90
-rw-r--r--src/syntax.h2
-rw-r--r--src/sysdep.c18
-rw-r--r--src/term.c12
-rw-r--r--src/termhooks.h2
-rw-r--r--src/textprop.c182
-rw-r--r--src/undo.c4
-rw-r--r--src/w32.c18
-rw-r--r--src/w32console.c4
-rw-r--r--src/w32fns.c118
-rw-r--r--src/w32font.c14
-rw-r--r--src/w32inevt.c4
-rw-r--r--src/w32proc.c36
-rw-r--r--src/w32select.c2
-rw-r--r--src/w32term.c22
-rw-r--r--src/w32term.h4
-rw-r--r--src/w32uniscribe.c2
-rw-r--r--src/window.c136
-rw-r--r--src/xdisp.c188
-rw-r--r--src/xfaces.c60
-rw-r--r--src/xfns.c68
-rw-r--r--src/xfont.c16
-rw-r--r--src/xftfont.c20
-rw-r--r--src/xmenu.c8
-rw-r--r--src/xml.c4
-rw-r--r--src/xrdb.c6
-rw-r--r--src/xselect.c20
-rw-r--r--src/xsettings.c2
-rw-r--r--src/xterm.c42
-rw-r--r--src/xwidget.c8
98 files changed, 1972 insertions, 1972 deletions
diff --git a/src/alloc.c b/src/alloc.c
index 367bb73fc15..512fdadfb2e 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -2324,10 +2324,10 @@ a multibyte string even if INIT is an ASCII character. */)
2324 CHECK_FIXNAT (length); 2324 CHECK_FIXNAT (length);
2325 CHECK_CHARACTER (init); 2325 CHECK_CHARACTER (init);
2326 2326
2327 c = XFASTINT (init); 2327 c = XFIXNAT (init);
2328 if (ASCII_CHAR_P (c) && NILP (multibyte)) 2328 if (ASCII_CHAR_P (c) && NILP (multibyte))
2329 { 2329 {
2330 nbytes = XINT (length); 2330 nbytes = XFIXNUM (length);
2331 val = make_uninit_string (nbytes); 2331 val = make_uninit_string (nbytes);
2332 if (nbytes) 2332 if (nbytes)
2333 { 2333 {
@@ -2339,7 +2339,7 @@ a multibyte string even if INIT is an ASCII character. */)
2339 { 2339 {
2340 unsigned char str[MAX_MULTIBYTE_LENGTH]; 2340 unsigned char str[MAX_MULTIBYTE_LENGTH];
2341 ptrdiff_t len = CHAR_STRING (c, str); 2341 ptrdiff_t len = CHAR_STRING (c, str);
2342 EMACS_INT string_len = XINT (length); 2342 EMACS_INT string_len = XFIXNUM (length);
2343 unsigned char *p, *beg, *end; 2343 unsigned char *p, *beg, *end;
2344 2344
2345 if (INT_MULTIPLY_WRAPV (len, string_len, &nbytes)) 2345 if (INT_MULTIPLY_WRAPV (len, string_len, &nbytes))
@@ -2416,7 +2416,7 @@ LENGTH must be a number. INIT matters only in whether it is t or nil. */)
2416 Lisp_Object val; 2416 Lisp_Object val;
2417 2417
2418 CHECK_FIXNAT (length); 2418 CHECK_FIXNAT (length);
2419 val = make_uninit_bool_vector (XFASTINT (length)); 2419 val = make_uninit_bool_vector (XFIXNAT (length));
2420 return bool_vector_fill (val, init); 2420 return bool_vector_fill (val, init);
2421} 2421}
2422 2422
@@ -2896,7 +2896,7 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0,
2896 Lisp_Object val = Qnil; 2896 Lisp_Object val = Qnil;
2897 CHECK_FIXNAT (length); 2897 CHECK_FIXNAT (length);
2898 2898
2899 for (EMACS_INT size = XFASTINT (length); 0 < size; size--) 2899 for (EMACS_INT size = XFIXNAT (length); 0 < size; size--)
2900 { 2900 {
2901 val = Fcons (init, val); 2901 val = Fcons (init, val);
2902 rarely_quit (size); 2902 rarely_quit (size);
@@ -3440,7 +3440,7 @@ each initialized to INIT. */)
3440 (Lisp_Object type, Lisp_Object slots, Lisp_Object init) 3440 (Lisp_Object type, Lisp_Object slots, Lisp_Object init)
3441{ 3441{
3442 CHECK_FIXNAT (slots); 3442 CHECK_FIXNAT (slots);
3443 EMACS_INT size = XFASTINT (slots) + 1; 3443 EMACS_INT size = XFIXNAT (slots) + 1;
3444 struct Lisp_Vector *p = allocate_record (size); 3444 struct Lisp_Vector *p = allocate_record (size);
3445 p->contents[0] = type; 3445 p->contents[0] = type;
3446 for (ptrdiff_t i = 1; i < size; i++) 3446 for (ptrdiff_t i = 1; i < size; i++)
@@ -3469,8 +3469,8 @@ See also the function `vector'. */)
3469 (Lisp_Object length, Lisp_Object init) 3469 (Lisp_Object length, Lisp_Object init)
3470{ 3470{
3471 CHECK_FIXNAT (length); 3471 CHECK_FIXNAT (length);
3472 struct Lisp_Vector *p = allocate_vector (XFASTINT (length)); 3472 struct Lisp_Vector *p = allocate_vector (XFIXNAT (length));
3473 for (ptrdiff_t i = 0; i < XFASTINT (length); i++) 3473 for (ptrdiff_t i = 0; i < XFIXNAT (length); i++)
3474 p->contents[i] = init; 3474 p->contents[i] = init;
3475 return make_lisp_ptr (p, Lisp_Vectorlike); 3475 return make_lisp_ptr (p, Lisp_Vectorlike);
3476} 3476}
@@ -3899,7 +3899,7 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args)
3899 are characters that are in 0...127, 3899 are characters that are in 0...127,
3900 after discarding the meta bit and all the bits above it. */ 3900 after discarding the meta bit and all the bits above it. */
3901 if (!FIXNUMP (args[i]) 3901 if (!FIXNUMP (args[i])
3902 || (XINT (args[i]) & ~(-CHAR_META)) >= 0200) 3902 || (XFIXNUM (args[i]) & ~(-CHAR_META)) >= 0200)
3903 return Fvector (nargs, args); 3903 return Fvector (nargs, args);
3904 3904
3905 /* Since the loop exited, we know that all the things in it are 3905 /* Since the loop exited, we know that all the things in it are
@@ -3910,9 +3910,9 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args)
3910 result = Fmake_string (make_fixnum (nargs), make_fixnum (0), Qnil); 3910 result = Fmake_string (make_fixnum (nargs), make_fixnum (0), Qnil);
3911 for (i = 0; i < nargs; i++) 3911 for (i = 0; i < nargs; i++)
3912 { 3912 {
3913 SSET (result, i, XINT (args[i])); 3913 SSET (result, i, XFIXNUM (args[i]));
3914 /* Move the meta bit to the right place for a string char. */ 3914 /* Move the meta bit to the right place for a string char. */
3915 if (XINT (args[i]) & CHAR_META) 3915 if (XFIXNUM (args[i]) & CHAR_META)
3916 SSET (result, i, SREF (result, i) | 0x80); 3916 SSET (result, i, SREF (result, i) | 0x80);
3917 } 3917 }
3918 3918
diff --git a/src/bidi.c b/src/bidi.c
index 30a7d6673ea..a53a2295c09 100644
--- a/src/bidi.c
+++ b/src/bidi.c
@@ -280,7 +280,7 @@ bidi_get_type (int ch, bidi_dir_t override)
280 if (ch < 0 || ch > MAX_CHAR) 280 if (ch < 0 || ch > MAX_CHAR)
281 emacs_abort (); 281 emacs_abort ();
282 282
283 default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); 283 default_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch));
284 /* Every valid character code, even those that are unassigned by the 284 /* Every valid character code, even those that are unassigned by the
285 UCD, have some bidi-class property, according to 285 UCD, have some bidi-class property, according to
286 DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT 286 DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT
@@ -385,9 +385,9 @@ bidi_mirror_char (int c)
385 385
386 /* When debugging, check before assigning to V, so that the check 386 /* When debugging, check before assigning to V, so that the check
387 isn't broken by undefined behavior due to int overflow. */ 387 isn't broken by undefined behavior due to int overflow. */
388 eassert (CHAR_VALID_P (XINT (val))); 388 eassert (CHAR_VALID_P (XFIXNUM (val)));
389 389
390 v = XINT (val); 390 v = XFIXNUM (val);
391 391
392 /* Minimal test we must do in optimized builds, to prevent weird 392 /* Minimal test we must do in optimized builds, to prevent weird
393 crashes further down the road. */ 393 crashes further down the road. */
@@ -409,7 +409,7 @@ bidi_paired_bracket_type (int c)
409 if (c < 0 || c > MAX_CHAR) 409 if (c < 0 || c > MAX_CHAR)
410 emacs_abort (); 410 emacs_abort ();
411 411
412 return (bidi_bracket_type_t) XINT (CHAR_TABLE_REF (bidi_brackets_table, c)); 412 return (bidi_bracket_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_brackets_table, c));
413} 413}
414 414
415/* Determine the start-of-sequence (sos) directional type given the two 415/* Determine the start-of-sequence (sos) directional type given the two
@@ -1805,7 +1805,7 @@ bidi_explicit_dir_char (int ch)
1805 eassert (ch == BIDI_EOB); 1805 eassert (ch == BIDI_EOB);
1806 return false; 1806 return false;
1807 } 1807 }
1808 ch_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch)); 1808 ch_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch));
1809 return (ch_type == LRE || ch_type == LRO 1809 return (ch_type == LRE || ch_type == LRO
1810 || ch_type == RLE || ch_type == RLO 1810 || ch_type == RLE || ch_type == RLO
1811 || ch_type == PDF); 1811 || ch_type == PDF);
diff --git a/src/buffer.c b/src/buffer.c
index 2a165c5f547..ec6f4647119 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -1102,8 +1102,8 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
1102 { 1102 {
1103 char number[sizeof "-999999"]; 1103 char number[sizeof "-999999"];
1104 1104
1105 /* Use XINT instead of XFASTINT to work around GCC bug 80776. */ 1105 /* Use XFIXNUM instead of XFIXNAT to work around GCC bug 80776. */
1106 int i = XINT (Frandom (make_fixnum (1000000))); 1106 int i = XFIXNUM (Frandom (make_fixnum (1000000)));
1107 eassume (0 <= i && i < 1000000); 1107 eassume (0 <= i && i < 1000000);
1108 1108
1109 AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i)); 1109 AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
@@ -2236,13 +2236,13 @@ validate_region (register Lisp_Object *b, register Lisp_Object *e)
2236 CHECK_FIXNUM_COERCE_MARKER (*b); 2236 CHECK_FIXNUM_COERCE_MARKER (*b);
2237 CHECK_FIXNUM_COERCE_MARKER (*e); 2237 CHECK_FIXNUM_COERCE_MARKER (*e);
2238 2238
2239 if (XINT (*b) > XINT (*e)) 2239 if (XFIXNUM (*b) > XFIXNUM (*e))
2240 { 2240 {
2241 Lisp_Object tem; 2241 Lisp_Object tem;
2242 tem = *b; *b = *e; *e = tem; 2242 tem = *b; *b = *e; *e = tem;
2243 } 2243 }
2244 2244
2245 if (! (BEGV <= XINT (*b) && XINT (*e) <= ZV)) 2245 if (! (BEGV <= XFIXNUM (*b) && XFIXNUM (*e) <= ZV))
2246 args_out_of_range_3 (Fcurrent_buffer (), *b, *e); 2246 args_out_of_range_3 (Fcurrent_buffer (), *b, *e);
2247} 2247}
2248 2248
@@ -3214,15 +3214,15 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
3214 } 3214 }
3215 else if (FIXNUMP (tem)) 3215 else if (FIXNUMP (tem))
3216 { 3216 {
3217 sortvec[j].priority = XINT (tem); 3217 sortvec[j].priority = XFIXNUM (tem);
3218 sortvec[j].spriority = 0; 3218 sortvec[j].spriority = 0;
3219 } 3219 }
3220 else if (CONSP (tem)) 3220 else if (CONSP (tem))
3221 { 3221 {
3222 Lisp_Object car = XCAR (tem); 3222 Lisp_Object car = XCAR (tem);
3223 Lisp_Object cdr = XCDR (tem); 3223 Lisp_Object cdr = XCDR (tem);
3224 sortvec[j].priority = FIXNUMP (car) ? XINT (car) : 0; 3224 sortvec[j].priority = FIXNUMP (car) ? XFIXNUM (car) : 0;
3225 sortvec[j].spriority = FIXNUMP (cdr) ? XINT (cdr) : 0; 3225 sortvec[j].spriority = FIXNUMP (cdr) ? XFIXNUM (cdr) : 0;
3226 } 3226 }
3227 j++; 3227 j++;
3228 } 3228 }
@@ -3290,7 +3290,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str,
3290 ssl->buf[ssl->used].string = str; 3290 ssl->buf[ssl->used].string = str;
3291 ssl->buf[ssl->used].string2 = str2; 3291 ssl->buf[ssl->used].string2 = str2;
3292 ssl->buf[ssl->used].size = size; 3292 ssl->buf[ssl->used].size = size;
3293 ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XINT (pri) : 0); 3293 ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XFIXNUM (pri) : 0);
3294 ssl->used++; 3294 ssl->used++;
3295 3295
3296 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 3296 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
@@ -3870,7 +3870,7 @@ for the rear of the overlay advance when text is inserted there
3870 CHECK_FIXNUM_COERCE_MARKER (beg); 3870 CHECK_FIXNUM_COERCE_MARKER (beg);
3871 CHECK_FIXNUM_COERCE_MARKER (end); 3871 CHECK_FIXNUM_COERCE_MARKER (end);
3872 3872
3873 if (XINT (beg) > XINT (end)) 3873 if (XFIXNUM (beg) > XFIXNUM (end))
3874 { 3874 {
3875 Lisp_Object temp; 3875 Lisp_Object temp;
3876 temp = beg; beg = end; end = temp; 3876 temp = beg; beg = end; end = temp;
@@ -3990,7 +3990,7 @@ buffer. */)
3990 CHECK_FIXNUM_COERCE_MARKER (beg); 3990 CHECK_FIXNUM_COERCE_MARKER (beg);
3991 CHECK_FIXNUM_COERCE_MARKER (end); 3991 CHECK_FIXNUM_COERCE_MARKER (end);
3992 3992
3993 if (XINT (beg) > XINT (end)) 3993 if (XFIXNUM (beg) > XFIXNUM (end))
3994 { 3994 {
3995 Lisp_Object temp; 3995 Lisp_Object temp;
3996 temp = beg; beg = end; end = temp; 3996 temp = beg; beg = end; end = temp;
@@ -4167,7 +4167,7 @@ If SORTED is non-nil, then sort them by decreasing priority. */)
4167 4167
4168 /* Put all the overlays we want in a vector in overlay_vec. 4168 /* Put all the overlays we want in a vector in overlay_vec.
4169 Store the length in len. */ 4169 Store the length in len. */
4170 noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, 4170 noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
4171 NULL, NULL, 0); 4171 NULL, NULL, 0);
4172 4172
4173 if (!NILP (sorted)) 4173 if (!NILP (sorted))
@@ -4211,7 +4211,7 @@ end of the buffer. */)
4211 4211
4212 /* Put all the overlays we want in a vector in overlay_vec. 4212 /* Put all the overlays we want in a vector in overlay_vec.
4213 Store the length in len. */ 4213 Store the length in len. */
4214 noverlays = overlays_in (XINT (beg), XINT (end), 1, &overlay_vec, &len, 4214 noverlays = overlays_in (XFIXNUM (beg), XFIXNUM (end), 1, &overlay_vec, &len,
4215 NULL, NULL); 4215 NULL, NULL);
4216 4216
4217 /* Make a list of them all. */ 4217 /* Make a list of them all. */
@@ -4243,7 +4243,7 @@ the value is (point-max). */)
4243 /* Put all the overlays we want in a vector in overlay_vec. 4243 /* Put all the overlays we want in a vector in overlay_vec.
4244 Store the length in len. 4244 Store the length in len.
4245 endpos gets the position where the next overlay starts. */ 4245 endpos gets the position where the next overlay starts. */
4246 noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len, 4246 noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
4247 &endpos, 0, 1); 4247 &endpos, 0, 1);
4248 4248
4249 /* If any of these overlays ends before endpos, 4249 /* If any of these overlays ends before endpos,
@@ -4281,7 +4281,7 @@ the value is (point-min). */)
4281 4281
4282 /* At beginning of buffer, we know the answer; 4282 /* At beginning of buffer, we know the answer;
4283 avoid bug subtracting 1 below. */ 4283 avoid bug subtracting 1 below. */
4284 if (XINT (pos) == BEGV) 4284 if (XFIXNUM (pos) == BEGV)
4285 return pos; 4285 return pos;
4286 4286
4287 len = 10; 4287 len = 10;
@@ -4290,7 +4290,7 @@ the value is (point-min). */)
4290 /* Put all the overlays we want in a vector in overlay_vec. 4290 /* Put all the overlays we want in a vector in overlay_vec.
4291 Store the length in len. 4291 Store the length in len.
4292 prevpos gets the position of the previous change. */ 4292 prevpos gets the position of the previous change. */
4293 overlays_at (XINT (pos), 1, &overlay_vec, &len, 4293 overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
4294 0, &prevpos, 1); 4294 0, &prevpos, 1);
4295 4295
4296 xfree (overlay_vec); 4296 xfree (overlay_vec);
@@ -4334,7 +4334,7 @@ for positions far away from POS). */)
4334 ptrdiff_t p; 4334 ptrdiff_t p;
4335 CHECK_FIXNUM_COERCE_MARKER (pos); 4335 CHECK_FIXNUM_COERCE_MARKER (pos);
4336 4336
4337 p = clip_to_bounds (PTRDIFF_MIN, XINT (pos), PTRDIFF_MAX); 4337 p = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (pos), PTRDIFF_MAX);
4338 recenter_overlay_lists (current_buffer, p); 4338 recenter_overlay_lists (current_buffer, p);
4339 return Qnil; 4339 return Qnil;
4340} 4340}
@@ -4442,7 +4442,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4442 Lisp_Object prop, overlay; 4442 Lisp_Object prop, overlay;
4443 struct Lisp_Overlay *tail; 4443 struct Lisp_Overlay *tail;
4444 /* True if this change is an insertion. */ 4444 /* True if this change is an insertion. */
4445 bool insertion = (after ? XFASTINT (arg3) == 0 : EQ (start, end)); 4445 bool insertion = (after ? XFIXNAT (arg3) == 0 : EQ (start, end));
4446 4446
4447 overlay = Qnil; 4447 overlay = Qnil;
4448 tail = NULL; 4448 tail = NULL;
@@ -4470,18 +4470,18 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4470 ostart = OVERLAY_START (overlay); 4470 ostart = OVERLAY_START (overlay);
4471 oend = OVERLAY_END (overlay); 4471 oend = OVERLAY_END (overlay);
4472 endpos = OVERLAY_POSITION (oend); 4472 endpos = OVERLAY_POSITION (oend);
4473 if (XFASTINT (start) > endpos) 4473 if (XFIXNAT (start) > endpos)
4474 break; 4474 break;
4475 startpos = OVERLAY_POSITION (ostart); 4475 startpos = OVERLAY_POSITION (ostart);
4476 if (insertion && (XFASTINT (start) == startpos 4476 if (insertion && (XFIXNAT (start) == startpos
4477 || XFASTINT (end) == startpos)) 4477 || XFIXNAT (end) == startpos))
4478 { 4478 {
4479 prop = Foverlay_get (overlay, Qinsert_in_front_hooks); 4479 prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
4480 if (!NILP (prop)) 4480 if (!NILP (prop))
4481 add_overlay_mod_hooklist (prop, overlay); 4481 add_overlay_mod_hooklist (prop, overlay);
4482 } 4482 }
4483 if (insertion && (XFASTINT (start) == endpos 4483 if (insertion && (XFIXNAT (start) == endpos
4484 || XFASTINT (end) == endpos)) 4484 || XFIXNAT (end) == endpos))
4485 { 4485 {
4486 prop = Foverlay_get (overlay, Qinsert_behind_hooks); 4486 prop = Foverlay_get (overlay, Qinsert_behind_hooks);
4487 if (!NILP (prop)) 4487 if (!NILP (prop))
@@ -4489,7 +4489,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4489 } 4489 }
4490 /* Test for intersecting intervals. This does the right thing 4490 /* Test for intersecting intervals. This does the right thing
4491 for both insertion and deletion. */ 4491 for both insertion and deletion. */
4492 if (XFASTINT (end) > startpos && XFASTINT (start) < endpos) 4492 if (XFIXNAT (end) > startpos && XFIXNAT (start) < endpos)
4493 { 4493 {
4494 prop = Foverlay_get (overlay, Qmodification_hooks); 4494 prop = Foverlay_get (overlay, Qmodification_hooks);
4495 if (!NILP (prop)) 4495 if (!NILP (prop))
@@ -4508,17 +4508,17 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4508 oend = OVERLAY_END (overlay); 4508 oend = OVERLAY_END (overlay);
4509 startpos = OVERLAY_POSITION (ostart); 4509 startpos = OVERLAY_POSITION (ostart);
4510 endpos = OVERLAY_POSITION (oend); 4510 endpos = OVERLAY_POSITION (oend);
4511 if (XFASTINT (end) < startpos) 4511 if (XFIXNAT (end) < startpos)
4512 break; 4512 break;
4513 if (insertion && (XFASTINT (start) == startpos 4513 if (insertion && (XFIXNAT (start) == startpos
4514 || XFASTINT (end) == startpos)) 4514 || XFIXNAT (end) == startpos))
4515 { 4515 {
4516 prop = Foverlay_get (overlay, Qinsert_in_front_hooks); 4516 prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
4517 if (!NILP (prop)) 4517 if (!NILP (prop))
4518 add_overlay_mod_hooklist (prop, overlay); 4518 add_overlay_mod_hooklist (prop, overlay);
4519 } 4519 }
4520 if (insertion && (XFASTINT (start) == endpos 4520 if (insertion && (XFIXNAT (start) == endpos
4521 || XFASTINT (end) == endpos)) 4521 || XFIXNAT (end) == endpos))
4522 { 4522 {
4523 prop = Foverlay_get (overlay, Qinsert_behind_hooks); 4523 prop = Foverlay_get (overlay, Qinsert_behind_hooks);
4524 if (!NILP (prop)) 4524 if (!NILP (prop))
@@ -4526,7 +4526,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4526 } 4526 }
4527 /* Test for intersecting intervals. This does the right thing 4527 /* Test for intersecting intervals. This does the right thing
4528 for both insertion and deletion. */ 4528 for both insertion and deletion. */
4529 if (XFASTINT (end) > startpos && XFASTINT (start) < endpos) 4529 if (XFIXNAT (end) > startpos && XFIXNAT (start) < endpos)
4530 { 4530 {
4531 prop = Foverlay_get (overlay, Qmodification_hooks); 4531 prop = Foverlay_get (overlay, Qmodification_hooks);
4532 if (!NILP (prop)) 4532 if (!NILP (prop))
diff --git a/src/buffer.h b/src/buffer.h
index c97e3d8fa51..c6247506d7a 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -1349,7 +1349,7 @@ extern int last_per_buffer_idx;
1349 1349
1350 1350
1351#define PER_BUFFER_IDX(OFFSET) \ 1351#define PER_BUFFER_IDX(OFFSET) \
1352 XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags)) 1352 XFIXNUM (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags))
1353 1353
1354/* Functions to get and set default value of the per-buffer 1354/* Functions to get and set default value of the per-buffer
1355 variable at offset OFFSET in the buffer structure. */ 1355 variable at offset OFFSET in the buffer structure. */
@@ -1387,7 +1387,7 @@ downcase (int c)
1387{ 1387{
1388 Lisp_Object downcase_table = BVAR (current_buffer, downcase_table); 1388 Lisp_Object downcase_table = BVAR (current_buffer, downcase_table);
1389 Lisp_Object down = CHAR_TABLE_REF (downcase_table, c); 1389 Lisp_Object down = CHAR_TABLE_REF (downcase_table, c);
1390 return FIXNATP (down) ? XFASTINT (down) : c; 1390 return FIXNATP (down) ? XFIXNAT (down) : c;
1391} 1391}
1392 1392
1393/* Upcase a character C, or make no change if that cannot be done. */ 1393/* Upcase a character C, or make no change if that cannot be done. */
@@ -1396,7 +1396,7 @@ upcase (int c)
1396{ 1396{
1397 Lisp_Object upcase_table = BVAR (current_buffer, upcase_table); 1397 Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
1398 Lisp_Object up = CHAR_TABLE_REF (upcase_table, c); 1398 Lisp_Object up = CHAR_TABLE_REF (upcase_table, c);
1399 return FIXNATP (up) ? XFASTINT (up) : c; 1399 return FIXNATP (up) ? XFIXNAT (up) : c;
1400} 1400}
1401 1401
1402/* True if C is upper case. */ 1402/* True if C is upper case. */
diff --git a/src/bytecode.c b/src/bytecode.c
index f87983a59c0..b27fa7c5c68 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -63,14 +63,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
63{ \ 63{ \
64 if (byte_metering_on) \ 64 if (byte_metering_on) \
65 { \ 65 { \
66 if (XFASTINT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \ 66 if (XFIXNAT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \
67 XSETFASTINT (METER_1 (this_code), \ 67 XSETFASTINT (METER_1 (this_code), \
68 XFASTINT (METER_1 (this_code)) + 1); \ 68 XFIXNAT (METER_1 (this_code)) + 1); \
69 if (last_code \ 69 if (last_code \
70 && (XFASTINT (METER_2 (last_code, this_code)) \ 70 && (XFIXNAT (METER_2 (last_code, this_code)) \
71 < MOST_POSITIVE_FIXNUM)) \ 71 < MOST_POSITIVE_FIXNUM)) \
72 XSETFASTINT (METER_2 (last_code, this_code), \ 72 XSETFASTINT (METER_2 (last_code, this_code), \
73 XFASTINT (METER_2 (last_code, this_code)) + 1); \ 73 XFIXNAT (METER_2 (last_code, this_code)) + 1); \
74 } \ 74 } \
75} 75}
76 76
@@ -362,7 +362,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
362 Lisp_Object *vectorp = XVECTOR (vector)->contents; 362 Lisp_Object *vectorp = XVECTOR (vector)->contents;
363 363
364 unsigned char quitcounter = 1; 364 unsigned char quitcounter = 1;
365 EMACS_INT stack_items = XFASTINT (maxdepth) + 1; 365 EMACS_INT stack_items = XFIXNAT (maxdepth) + 1;
366 USE_SAFE_ALLOCA; 366 USE_SAFE_ALLOCA;
367 void *alloc; 367 void *alloc;
368 SAFE_ALLOCA_LISP_EXTRA (alloc, stack_items, bytestr_length); 368 SAFE_ALLOCA_LISP_EXTRA (alloc, stack_items, bytestr_length);
@@ -379,7 +379,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
379 if (!NILP (args_template)) 379 if (!NILP (args_template))
380 { 380 {
381 eassert (FIXNUMP (args_template)); 381 eassert (FIXNUMP (args_template));
382 ptrdiff_t at = XINT (args_template); 382 ptrdiff_t at = XFIXNUM (args_template);
383 bool rest = (at & 128) != 0; 383 bool rest = (at & 128) != 0;
384 int mandatory = at & 127; 384 int mandatory = at & 127;
385 ptrdiff_t nonrest = at >> 8; 385 ptrdiff_t nonrest = at >> 8;
@@ -622,9 +622,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
622 Lisp_Object v1 = TOP; 622 Lisp_Object v1 = TOP;
623 Lisp_Object v2 = Fget (v1, Qbyte_code_meter); 623 Lisp_Object v2 = Fget (v1, Qbyte_code_meter);
624 if (FIXNUMP (v2) 624 if (FIXNUMP (v2)
625 && XINT (v2) < MOST_POSITIVE_FIXNUM) 625 && XFIXNUM (v2) < MOST_POSITIVE_FIXNUM)
626 { 626 {
627 XSETINT (v2, XINT (v2) + 1); 627 XSETINT (v2, XFIXNUM (v2) + 1);
628 Fput (v1, Qbyte_code_meter, v2); 628 Fput (v1, Qbyte_code_meter, v2);
629 } 629 }
630 } 630 }
@@ -833,7 +833,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
833 { 833 {
834 Lisp_Object v2 = POP, v1 = TOP; 834 Lisp_Object v2 = POP, v1 = TOP;
835 CHECK_FIXNUM (v1); 835 CHECK_FIXNUM (v1);
836 for (EMACS_INT n = XINT (v1); 0 < n && CONSP (v2); n--) 836 for (EMACS_INT n = XFIXNUM (v1); 0 < n && CONSP (v2); n--)
837 { 837 {
838 v2 = XCDR (v2); 838 v2 = XCDR (v2);
839 rarely_quit (n); 839 rarely_quit (n);
@@ -972,14 +972,14 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
972 NEXT; 972 NEXT;
973 973
974 CASE (Bsub1): 974 CASE (Bsub1):
975 TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_NEGATIVE_FIXNUM 975 TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_NEGATIVE_FIXNUM
976 ? make_fixnum (XINT (TOP) - 1) 976 ? make_fixnum (XFIXNUM (TOP) - 1)
977 : Fsub1 (TOP)); 977 : Fsub1 (TOP));
978 NEXT; 978 NEXT;
979 979
980 CASE (Badd1): 980 CASE (Badd1):
981 TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_POSITIVE_FIXNUM 981 TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_POSITIVE_FIXNUM
982 ? make_fixnum (XINT (TOP) + 1) 982 ? make_fixnum (XFIXNUM (TOP) + 1)
983 : Fadd1 (TOP)); 983 : Fadd1 (TOP));
984 NEXT; 984 NEXT;
985 985
@@ -1031,8 +1031,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1031 NEXT; 1031 NEXT;
1032 1032
1033 CASE (Bnegate): 1033 CASE (Bnegate):
1034 TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_NEGATIVE_FIXNUM 1034 TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_NEGATIVE_FIXNUM
1035 ? make_fixnum (- XINT (TOP)) 1035 ? make_fixnum (- XFIXNUM (TOP))
1036 : Fminus (1, &TOP)); 1036 : Fminus (1, &TOP));
1037 NEXT; 1037 NEXT;
1038 1038
@@ -1175,7 +1175,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1175 CASE (Bchar_syntax): 1175 CASE (Bchar_syntax):
1176 { 1176 {
1177 CHECK_CHARACTER (TOP); 1177 CHECK_CHARACTER (TOP);
1178 int c = XFASTINT (TOP); 1178 int c = XFIXNAT (TOP);
1179 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 1179 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
1180 MAKE_CHAR_MULTIBYTE (c); 1180 MAKE_CHAR_MULTIBYTE (c);
1181 XSETFASTINT (TOP, syntax_code_spec[SYNTAX (c)]); 1181 XSETFASTINT (TOP, syntax_code_spec[SYNTAX (c)]);
@@ -1269,7 +1269,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1269 /* Exchange args and then do nth. */ 1269 /* Exchange args and then do nth. */
1270 Lisp_Object v2 = POP, v1 = TOP; 1270 Lisp_Object v2 = POP, v1 = TOP;
1271 CHECK_FIXNUM (v2); 1271 CHECK_FIXNUM (v2);
1272 for (EMACS_INT n = XINT (v2); 0 < n && CONSP (v1); n--) 1272 for (EMACS_INT n = XFIXNUM (v2); 0 < n && CONSP (v1); n--)
1273 { 1273 {
1274 v1 = XCDR (v1); 1274 v1 = XCDR (v1);
1275 rarely_quit (n); 1275 rarely_quit (n);
@@ -1439,7 +1439,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
1439 Lisp_Object val = HASH_VALUE (h, i); 1439 Lisp_Object val = HASH_VALUE (h, i);
1440 if (BYTE_CODE_SAFE && !FIXNUMP (val)) 1440 if (BYTE_CODE_SAFE && !FIXNUMP (val))
1441 emacs_abort (); 1441 emacs_abort ();
1442 op = XINT (val); 1442 op = XFIXNUM (val);
1443 goto op_branch; 1443 goto op_branch;
1444 } 1444 }
1445 } 1445 }
@@ -1475,7 +1475,7 @@ Lisp_Object
1475get_byte_code_arity (Lisp_Object args_template) 1475get_byte_code_arity (Lisp_Object args_template)
1476{ 1476{
1477 eassert (FIXNATP (args_template)); 1477 eassert (FIXNATP (args_template));
1478 EMACS_INT at = XINT (args_template); 1478 EMACS_INT at = XFIXNUM (args_template);
1479 bool rest = (at & 128) != 0; 1479 bool rest = (at & 128) != 0;
1480 int mandatory = at & 127; 1480 int mandatory = at & 127;
1481 EMACS_INT nonrest = at >> 8; 1481 EMACS_INT nonrest = at >> 8;
diff --git a/src/callint.c b/src/callint.c
index c18eab488d4..c8b75859e60 100644
--- a/src/callint.c
+++ b/src/callint.c
@@ -542,7 +542,7 @@ invoke it. If KEYS is omitted or nil, the return value of
542 /* If the key sequence ends with a down-event, 542 /* If the key sequence ends with a down-event,
543 discard the following up-event. */ 543 discard the following up-event. */
544 Lisp_Object teml 544 Lisp_Object teml
545 = Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1)); 545 = Faref (args[i], make_fixnum (XFIXNUM (Flength (args[i])) - 1));
546 if (CONSP (teml)) 546 if (CONSP (teml))
547 teml = XCAR (teml); 547 teml = XCAR (teml);
548 if (SYMBOLP (teml)) 548 if (SYMBOLP (teml))
@@ -572,7 +572,7 @@ invoke it. If KEYS is omitted or nil, the return value of
572 /* If the key sequence ends with a down-event, 572 /* If the key sequence ends with a down-event,
573 discard the following up-event. */ 573 discard the following up-event. */
574 Lisp_Object teml 574 Lisp_Object teml
575 = Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1)); 575 = Faref (args[i], make_fixnum (XFIXNUM (Flength (args[i])) - 1));
576 if (CONSP (teml)) 576 if (CONSP (teml))
577 teml = XCAR (teml); 577 teml = XCAR (teml);
578 if (SYMBOLP (teml)) 578 if (SYMBOLP (teml))
@@ -796,7 +796,7 @@ Its numeric meaning is what you would get from `(interactive "p")'. */)
796 else if (EQ (raw, Qminus)) 796 else if (EQ (raw, Qminus))
797 XSETINT (val, -1); 797 XSETINT (val, -1);
798 else if (CONSP (raw) && FIXNUMP (XCAR (raw))) 798 else if (CONSP (raw) && FIXNUMP (XCAR (raw)))
799 XSETINT (val, XINT (XCAR (raw))); 799 XSETINT (val, XFIXNUM (XCAR (raw)));
800 else if (FIXNUMP (raw)) 800 else if (FIXNUMP (raw))
801 val = raw; 801 val = raw;
802 else 802 else
diff --git a/src/callproc.c b/src/callproc.c
index f959927d37a..e6a81802936 100644
--- a/src/callproc.c
+++ b/src/callproc.c
@@ -1066,7 +1066,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
1066 validate_region (&args[0], &args[1]); 1066 validate_region (&args[0], &args[1]);
1067 start = args[0]; 1067 start = args[0];
1068 end = args[1]; 1068 end = args[1];
1069 empty_input = XINT (start) == XINT (end); 1069 empty_input = XFIXNUM (start) == XFIXNUM (end);
1070 } 1070 }
1071 1071
1072 if (!empty_input) 1072 if (!empty_input)
diff --git a/src/casefiddle.c b/src/casefiddle.c
index a6656b1e683..95857d6f361 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -152,7 +152,7 @@ case_character_impl (struct casing_str_buf *buf,
152 prop = CHAR_TABLE_REF (ctx->titlecase_char_table, ch); 152 prop = CHAR_TABLE_REF (ctx->titlecase_char_table, ch);
153 if (CHARACTERP (prop)) 153 if (CHARACTERP (prop))
154 { 154 {
155 cased = XFASTINT (prop); 155 cased = XFIXNAT (prop);
156 cased_is_set = true; 156 cased_is_set = true;
157 } 157 }
158 } 158 }
@@ -225,7 +225,7 @@ do_casify_natnum (struct casing_context *ctx, Lisp_Object obj)
225{ 225{
226 int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER 226 int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
227 | CHAR_SHIFT | CHAR_CTL | CHAR_META); 227 | CHAR_SHIFT | CHAR_CTL | CHAR_META);
228 int ch = XFASTINT (obj); 228 int ch = XFIXNAT (obj);
229 229
230 /* If the character has higher bits set above the flags, return it unchanged. 230 /* If the character has higher bits set above the flags, return it unchanged.
231 It is not a real character. */ 231 It is not a real character. */
@@ -485,8 +485,8 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
485 struct casing_context ctx; 485 struct casing_context ctx;
486 486
487 validate_region (&b, &e); 487 validate_region (&b, &e);
488 ptrdiff_t start = XFASTINT (b); 488 ptrdiff_t start = XFIXNAT (b);
489 ptrdiff_t end = XFASTINT (e); 489 ptrdiff_t end = XFIXNAT (e);
490 if (start == end) 490 if (start == end)
491 /* Not modifying because nothing marked. */ 491 /* Not modifying because nothing marked. */
492 return end; 492 return end;
@@ -602,9 +602,9 @@ static Lisp_Object
602casify_word (enum case_action flag, Lisp_Object arg) 602casify_word (enum case_action flag, Lisp_Object arg)
603{ 603{
604 CHECK_FIXNUM (arg); 604 CHECK_FIXNUM (arg);
605 ptrdiff_t farend = scan_words (PT, XINT (arg)); 605 ptrdiff_t farend = scan_words (PT, XFIXNUM (arg));
606 if (!farend) 606 if (!farend)
607 farend = XINT (arg) <= 0 ? BEGV : ZV; 607 farend = XFIXNUM (arg) <= 0 ? BEGV : ZV;
608 SET_PT (casify_region (flag, make_fixnum (PT), make_fixnum (farend))); 608 SET_PT (casify_region (flag, make_fixnum (PT), make_fixnum (farend)));
609 return Qnil; 609 return Qnil;
610} 610}
diff --git a/src/casetab.c b/src/casetab.c
index 58847fc330a..6b1c64f89e4 100644
--- a/src/casetab.c
+++ b/src/casetab.c
@@ -196,11 +196,11 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
196 196
197 if (CONSP (c)) 197 if (CONSP (c))
198 { 198 {
199 from = XINT (XCAR (c)); 199 from = XFIXNUM (XCAR (c));
200 to = XINT (XCDR (c)); 200 to = XFIXNUM (XCDR (c));
201 } 201 }
202 else 202 else
203 from = to = XINT (c); 203 from = to = XFIXNUM (c);
204 204
205 to++; 205 to++;
206 for (; from < to; from++) 206 for (; from < to; from++)
@@ -222,11 +222,11 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
222 222
223 if (CONSP (c)) 223 if (CONSP (c))
224 { 224 {
225 from = XINT (XCAR (c)); 225 from = XFIXNUM (XCAR (c));
226 to = XINT (XCDR (c)); 226 to = XFIXNUM (XCDR (c));
227 } 227 }
228 else 228 else
229 from = to = XINT (c); 229 from = to = XFIXNUM (c);
230 230
231 to++; 231 to++;
232 for (; from < to; from++) 232 for (; from < to; from++)
diff --git a/src/category.c b/src/category.c
index 72b589c7902..d6ccde5369b 100644
--- a/src/category.c
+++ b/src/category.c
@@ -130,11 +130,11 @@ the current buffer's category table. */)
130 CHECK_STRING (docstring); 130 CHECK_STRING (docstring);
131 table = check_category_table (table); 131 table = check_category_table (table);
132 132
133 if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category)))) 133 if (!NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
134 error ("Category `%c' is already defined", (int) XFASTINT (category)); 134 error ("Category `%c' is already defined", (int) XFIXNAT (category));
135 if (!NILP (Vpurify_flag)) 135 if (!NILP (Vpurify_flag))
136 docstring = Fpurecopy (docstring); 136 docstring = Fpurecopy (docstring);
137 SET_CATEGORY_DOCSTRING (table, XFASTINT (category), docstring); 137 SET_CATEGORY_DOCSTRING (table, XFIXNAT (category), docstring);
138 138
139 return Qnil; 139 return Qnil;
140} 140}
@@ -148,7 +148,7 @@ category table. */)
148 CHECK_CATEGORY (category); 148 CHECK_CATEGORY (category);
149 table = check_category_table (table); 149 table = check_category_table (table);
150 150
151 return CATEGORY_DOCSTRING (table, XFASTINT (category)); 151 return CATEGORY_DOCSTRING (table, XFIXNAT (category));
152} 152}
153 153
154DEFUN ("get-unused-category", Fget_unused_category, Sget_unused_category, 154DEFUN ("get-unused-category", Fget_unused_category, Sget_unused_category,
@@ -220,9 +220,9 @@ copy_category_entry (Lisp_Object table, Lisp_Object c, Lisp_Object val)
220{ 220{
221 val = Fcopy_sequence (val); 221 val = Fcopy_sequence (val);
222 if (CONSP (c)) 222 if (CONSP (c))
223 char_table_set_range (table, XINT (XCAR (c)), XINT (XCDR (c)), val); 223 char_table_set_range (table, XFIXNUM (XCAR (c)), XFIXNUM (XCDR (c)), val);
224 else 224 else
225 char_table_set (table, XINT (c), val); 225 char_table_set (table, XFIXNUM (c), val);
226} 226}
227 227
228/* Return a copy of category table TABLE. We can't simply use the 228/* Return a copy of category table TABLE. We can't simply use the
@@ -303,7 +303,7 @@ usage: (char-category-set CHAR) */)
303 (Lisp_Object ch) 303 (Lisp_Object ch)
304{ 304{
305 CHECK_CHARACTER (ch); 305 CHECK_CHARACTER (ch);
306 return CATEGORY_SET (XFASTINT (ch)); 306 return CATEGORY_SET (XFIXNAT (ch));
307} 307}
308 308
309DEFUN ("category-set-mnemonics", Fcategory_set_mnemonics, 309DEFUN ("category-set-mnemonics", Fcategory_set_mnemonics,
@@ -349,22 +349,22 @@ then delete CATEGORY from the category set instead of adding it. */)
349 if (FIXNUMP (character)) 349 if (FIXNUMP (character))
350 { 350 {
351 CHECK_CHARACTER (character); 351 CHECK_CHARACTER (character);
352 start = end = XFASTINT (character); 352 start = end = XFIXNAT (character);
353 } 353 }
354 else 354 else
355 { 355 {
356 CHECK_CONS (character); 356 CHECK_CONS (character);
357 CHECK_CHARACTER_CAR (character); 357 CHECK_CHARACTER_CAR (character);
358 CHECK_CHARACTER_CDR (character); 358 CHECK_CHARACTER_CDR (character);
359 start = XFASTINT (XCAR (character)); 359 start = XFIXNAT (XCAR (character));
360 end = XFASTINT (XCDR (character)); 360 end = XFIXNAT (XCDR (character));
361 } 361 }
362 362
363 CHECK_CATEGORY (category); 363 CHECK_CATEGORY (category);
364 table = check_category_table (table); 364 table = check_category_table (table);
365 365
366 if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category)))) 366 if (NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
367 error ("Undefined category: %c", (int) XFASTINT (category)); 367 error ("Undefined category: %c", (int) XFIXNAT (category));
368 368
369 set_value = NILP (reset); 369 set_value = NILP (reset);
370 370
@@ -372,10 +372,10 @@ then delete CATEGORY from the category set instead of adding it. */)
372 { 372 {
373 from = start, to = end; 373 from = start, to = end;
374 category_set = char_table_ref_and_range (table, start, &from, &to); 374 category_set = char_table_ref_and_range (table, start, &from, &to);
375 if (CATEGORY_MEMBER (XFASTINT (category), category_set) != NILP (reset)) 375 if (CATEGORY_MEMBER (XFIXNAT (category), category_set) != NILP (reset))
376 { 376 {
377 category_set = Fcopy_sequence (category_set); 377 category_set = Fcopy_sequence (category_set);
378 set_category_set (category_set, XFASTINT (category), set_value); 378 set_category_set (category_set, XFIXNAT (category), set_value);
379 category_set = hash_get_category_set (table, category_set); 379 category_set = hash_get_category_set (table, category_set);
380 char_table_set_range (table, start, to, category_set); 380 char_table_set_range (table, start, to, category_set);
381 } 381 }
@@ -423,12 +423,12 @@ word_boundary_p (int c1, int c2)
423 if (CONSP (elt) 423 if (CONSP (elt)
424 && (NILP (XCAR (elt)) 424 && (NILP (XCAR (elt))
425 || (CATEGORYP (XCAR (elt)) 425 || (CATEGORYP (XCAR (elt))
426 && CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set1) 426 && CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set1)
427 && ! CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set2))) 427 && ! CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set2)))
428 && (NILP (XCDR (elt)) 428 && (NILP (XCDR (elt))
429 || (CATEGORYP (XCDR (elt)) 429 || (CATEGORYP (XCDR (elt))
430 && ! CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set1) 430 && ! CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set1)
431 && CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set2)))) 431 && CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set2))))
432 return !default_result; 432 return !default_result;
433 } 433 }
434 return default_result; 434 return default_result;
diff --git a/src/ccl.c b/src/ccl.c
index 529b302ed98..31d0a28c5aa 100644
--- a/src/ccl.c
+++ b/src/ccl.c
@@ -629,7 +629,7 @@ do \
629 stack_idx++; \ 629 stack_idx++; \
630 ccl_prog = called_ccl.prog; \ 630 ccl_prog = called_ccl.prog; \
631 ic = CCL_HEADER_MAIN; \ 631 ic = CCL_HEADER_MAIN; \
632 eof_ic = XFASTINT (ccl_prog[CCL_HEADER_EOF]); \ 632 eof_ic = XFIXNAT (ccl_prog[CCL_HEADER_EOF]); \
633 goto ccl_repeat; \ 633 goto ccl_repeat; \
634 } \ 634 } \
635while (0) 635while (0)
@@ -736,7 +736,7 @@ while (0)
736#define GET_CCL_RANGE(var, ccl_prog, ic, lo, hi) \ 736#define GET_CCL_RANGE(var, ccl_prog, ic, lo, hi) \
737 do \ 737 do \
738 { \ 738 { \
739 EMACS_INT prog_word = XINT ((ccl_prog)[ic]); \ 739 EMACS_INT prog_word = XFIXNUM ((ccl_prog)[ic]); \
740 if (! ASCENDING_ORDER (lo, prog_word, hi)) \ 740 if (! ASCENDING_ORDER (lo, prog_word, hi)) \
741 CCL_INVALID_CMD; \ 741 CCL_INVALID_CMD; \
742 (var) = prog_word; \ 742 (var) = prog_word; \
@@ -769,12 +769,12 @@ while (0)
769 CCL_INVALID_CMD; \ 769 CCL_INVALID_CMD; \
770 else if (dst + len <= dst_end) \ 770 else if (dst + len <= dst_end) \
771 { \ 771 { \
772 if (XFASTINT (ccl_prog[ic]) & 0x1000000) \ 772 if (XFIXNAT (ccl_prog[ic]) & 0x1000000) \
773 for (ccli = 0; ccli < len; ccli++) \ 773 for (ccli = 0; ccli < len; ccli++) \
774 *dst++ = XFASTINT (ccl_prog[ic + ccli]) & 0xFFFFFF; \ 774 *dst++ = XFIXNAT (ccl_prog[ic + ccli]) & 0xFFFFFF; \
775 else \ 775 else \
776 for (ccli = 0; ccli < len; ccli++) \ 776 for (ccli = 0; ccli < len; ccli++) \
777 *dst++ = ((XFASTINT (ccl_prog[ic + (ccli / 3)])) \ 777 *dst++ = ((XFIXNAT (ccl_prog[ic + (ccli / 3)])) \
778 >> ((2 - (ccli % 3)) * 8)) & 0xFF; \ 778 >> ((2 - (ccli % 3)) * 8)) & 0xFF; \
779 } \ 779 } \
780 else \ 780 else \
@@ -926,14 +926,14 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
926 break; 926 break;
927 927
928 case CCL_SetConst: /* 00000000000000000000rrrXXXXX */ 928 case CCL_SetConst: /* 00000000000000000000rrrXXXXX */
929 reg[rrr] = XINT (ccl_prog[ic++]); 929 reg[rrr] = XFIXNUM (ccl_prog[ic++]);
930 break; 930 break;
931 931
932 case CCL_SetArray: /* CCCCCCCCCCCCCCCCCCCCRRRrrrXXXXX */ 932 case CCL_SetArray: /* CCCCCCCCCCCCCCCCCCCCRRRrrrXXXXX */
933 i = reg[RRR]; 933 i = reg[RRR];
934 j = field1 >> 3; 934 j = field1 >> 3;
935 if (0 <= i && i < j) 935 if (0 <= i && i < j)
936 reg[rrr] = XINT (ccl_prog[ic + i]); 936 reg[rrr] = XFIXNUM (ccl_prog[ic + i]);
937 ic += j; 937 ic += j;
938 break; 938 break;
939 939
@@ -961,13 +961,13 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
961 break; 961 break;
962 962
963 case CCL_WriteConstJump: /* A--D--D--R--E--S--S-000XXXXX */ 963 case CCL_WriteConstJump: /* A--D--D--R--E--S--S-000XXXXX */
964 i = XINT (ccl_prog[ic]); 964 i = XFIXNUM (ccl_prog[ic]);
965 CCL_WRITE_CHAR (i); 965 CCL_WRITE_CHAR (i);
966 ic += ADDR; 966 ic += ADDR;
967 break; 967 break;
968 968
969 case CCL_WriteConstReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ 969 case CCL_WriteConstReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
970 i = XINT (ccl_prog[ic]); 970 i = XFIXNUM (ccl_prog[ic]);
971 CCL_WRITE_CHAR (i); 971 CCL_WRITE_CHAR (i);
972 ic++; 972 ic++;
973 CCL_READ_CHAR (reg[rrr]); 973 CCL_READ_CHAR (reg[rrr]);
@@ -975,17 +975,17 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
975 break; 975 break;
976 976
977 case CCL_WriteStringJump: /* A--D--D--R--E--S--S-000XXXXX */ 977 case CCL_WriteStringJump: /* A--D--D--R--E--S--S-000XXXXX */
978 j = XINT (ccl_prog[ic++]); 978 j = XFIXNUM (ccl_prog[ic++]);
979 CCL_WRITE_STRING (j); 979 CCL_WRITE_STRING (j);
980 ic += ADDR - 1; 980 ic += ADDR - 1;
981 break; 981 break;
982 982
983 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */ 983 case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
984 i = reg[rrr]; 984 i = reg[rrr];
985 j = XINT (ccl_prog[ic]); 985 j = XFIXNUM (ccl_prog[ic]);
986 if (0 <= i && i < j) 986 if (0 <= i && i < j)
987 { 987 {
988 i = XINT (ccl_prog[ic + 1 + i]); 988 i = XFIXNUM (ccl_prog[ic + 1 + i]);
989 CCL_WRITE_CHAR (i); 989 CCL_WRITE_CHAR (i);
990 } 990 }
991 ic += j + 2; 991 ic += j + 2;
@@ -1004,7 +1004,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1004 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */ 1004 case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */
1005 { 1005 {
1006 int ioff = 0 <= reg[rrr] && reg[rrr] < field1 ? reg[rrr] : field1; 1006 int ioff = 0 <= reg[rrr] && reg[rrr] < field1 ? reg[rrr] : field1;
1007 int incr = XINT (ccl_prog[ic + ioff]); 1007 int incr = XFIXNUM (ccl_prog[ic + ioff]);
1008 ic += incr; 1008 ic += incr;
1009 } 1009 }
1010 break; 1010 break;
@@ -1023,7 +1023,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1023 case CCL_WriteExprConst: /* 1:00000OPERATION000RRR000XXXXX */ 1023 case CCL_WriteExprConst: /* 1:00000OPERATION000RRR000XXXXX */
1024 rrr = 7; 1024 rrr = 7;
1025 i = reg[RRR]; 1025 i = reg[RRR];
1026 j = XINT (ccl_prog[ic]); 1026 j = XFIXNUM (ccl_prog[ic]);
1027 op = field1 >> 6; 1027 op = field1 >> 6;
1028 jump_address = ic + 1; 1028 jump_address = ic + 1;
1029 goto ccl_set_expr; 1029 goto ccl_set_expr;
@@ -1056,7 +1056,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1056 /* If FFF is nonzero, the CCL program ID is in the 1056 /* If FFF is nonzero, the CCL program ID is in the
1057 following code. */ 1057 following code. */
1058 if (rrr) 1058 if (rrr)
1059 prog_id = XINT (ccl_prog[ic++]); 1059 prog_id = XFIXNUM (ccl_prog[ic++]);
1060 else 1060 else
1061 prog_id = field1; 1061 prog_id = field1;
1062 1062
@@ -1081,7 +1081,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1081 stack_idx++; 1081 stack_idx++;
1082 ccl_prog = XVECTOR (AREF (slot, 1))->contents; 1082 ccl_prog = XVECTOR (AREF (slot, 1))->contents;
1083 ic = CCL_HEADER_MAIN; 1083 ic = CCL_HEADER_MAIN;
1084 eof_ic = XFASTINT (ccl_prog[CCL_HEADER_EOF]); 1084 eof_ic = XFIXNAT (ccl_prog[CCL_HEADER_EOF]);
1085 } 1085 }
1086 break; 1086 break;
1087 1087
@@ -1099,7 +1099,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1099 i = reg[rrr]; 1099 i = reg[rrr];
1100 if (0 <= i && i < field1) 1100 if (0 <= i && i < field1)
1101 { 1101 {
1102 j = XINT (ccl_prog[ic + i]); 1102 j = XFIXNUM (ccl_prog[ic + i]);
1103 CCL_WRITE_CHAR (j); 1103 CCL_WRITE_CHAR (j);
1104 } 1104 }
1105 ic += field1; 1105 ic += field1;
@@ -1124,7 +1124,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1124 CCL_SUCCESS; 1124 CCL_SUCCESS;
1125 1125
1126 case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */ 1126 case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */
1127 i = XINT (ccl_prog[ic++]); 1127 i = XFIXNUM (ccl_prog[ic++]);
1128 op = field1 >> 6; 1128 op = field1 >> 6;
1129 goto ccl_expr_self; 1129 goto ccl_expr_self;
1130 1130
@@ -1160,7 +1160,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1160 1160
1161 case CCL_SetExprConst: /* 00000OPERATION000RRRrrrXXXXX */ 1161 case CCL_SetExprConst: /* 00000OPERATION000RRRrrrXXXXX */
1162 i = reg[RRR]; 1162 i = reg[RRR];
1163 j = XINT (ccl_prog[ic++]); 1163 j = XFIXNUM (ccl_prog[ic++]);
1164 op = field1 >> 6; 1164 op = field1 >> 6;
1165 jump_address = ic; 1165 jump_address = ic;
1166 goto ccl_set_expr; 1166 goto ccl_set_expr;
@@ -1178,8 +1178,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1178 case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */ 1178 case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */
1179 i = reg[rrr]; 1179 i = reg[rrr];
1180 jump_address = ic + ADDR; 1180 jump_address = ic + ADDR;
1181 op = XINT (ccl_prog[ic++]); 1181 op = XFIXNUM (ccl_prog[ic++]);
1182 j = XINT (ccl_prog[ic++]); 1182 j = XFIXNUM (ccl_prog[ic++]);
1183 rrr = 7; 1183 rrr = 7;
1184 goto ccl_set_expr; 1184 goto ccl_set_expr;
1185 1185
@@ -1189,7 +1189,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1189 case CCL_JumpCondExprReg: 1189 case CCL_JumpCondExprReg:
1190 i = reg[rrr]; 1190 i = reg[rrr];
1191 jump_address = ic + ADDR; 1191 jump_address = ic + ADDR;
1192 op = XINT (ccl_prog[ic++]); 1192 op = XFIXNUM (ccl_prog[ic++]);
1193 GET_CCL_RANGE (j, ccl_prog, ic++, 0, 7); 1193 GET_CCL_RANGE (j, ccl_prog, ic++, 0, 7);
1194 j = reg[j]; 1194 j = reg[j];
1195 rrr = 7; 1195 rrr = 7;
@@ -1323,9 +1323,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1323 { 1323 {
1324 Lisp_Object opl; 1324 Lisp_Object opl;
1325 opl = HASH_VALUE (h, eop); 1325 opl = HASH_VALUE (h, eop);
1326 if (! (FIXNUMP (opl) && IN_INT_RANGE (XINT (opl)))) 1326 if (! (FIXNUMP (opl) && IN_INT_RANGE (XFIXNUM (opl))))
1327 CCL_INVALID_CMD; 1327 CCL_INVALID_CMD;
1328 reg[RRR] = XINT (opl); 1328 reg[RRR] = XFIXNUM (opl);
1329 reg[7] = 1; /* r7 true for success */ 1329 reg[7] = 1; /* r7 true for success */
1330 } 1330 }
1331 else 1331 else
@@ -1340,7 +1340,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1340 ptrdiff_t size; 1340 ptrdiff_t size;
1341 int fin_ic; 1341 int fin_ic;
1342 1342
1343 j = XINT (ccl_prog[ic++]); /* number of maps. */ 1343 j = XFIXNUM (ccl_prog[ic++]); /* number of maps. */
1344 fin_ic = ic + j; 1344 fin_ic = ic + j;
1345 op = reg[rrr]; 1345 op = reg[rrr];
1346 if ((j > reg[RRR]) && (j >= 0)) 1346 if ((j > reg[RRR]) && (j >= 0))
@@ -1359,7 +1359,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1359 { 1359 {
1360 if (!VECTORP (Vcode_conversion_map_vector)) continue; 1360 if (!VECTORP (Vcode_conversion_map_vector)) continue;
1361 size = ASIZE (Vcode_conversion_map_vector); 1361 size = ASIZE (Vcode_conversion_map_vector);
1362 point = XINT (ccl_prog[ic++]); 1362 point = XFIXNUM (ccl_prog[ic++]);
1363 if (! (0 <= point && point < size)) continue; 1363 if (! (0 <= point && point < size)) continue;
1364 map = AREF (Vcode_conversion_map_vector, point); 1364 map = AREF (Vcode_conversion_map_vector, point);
1365 1365
@@ -1377,7 +1377,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1377 [t ELEMENT STARTPOINT ENDPOINT] */ 1377 [t ELEMENT STARTPOINT ENDPOINT] */
1378 if (FIXNUMP (content)) 1378 if (FIXNUMP (content))
1379 { 1379 {
1380 point = XINT (content); 1380 point = XFIXNUM (content);
1381 if (!(point <= op && op - point + 1 < size)) continue; 1381 if (!(point <= op && op - point + 1 < size)) continue;
1382 content = AREF (map, op - point + 1); 1382 content = AREF (map, op - point + 1);
1383 } 1383 }
@@ -1385,9 +1385,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1385 { 1385 {
1386 if (size != 4) continue; 1386 if (size != 4) continue;
1387 if (FIXNUMP (AREF (map, 2)) 1387 if (FIXNUMP (AREF (map, 2))
1388 && XINT (AREF (map, 2)) <= op 1388 && XFIXNUM (AREF (map, 2)) <= op
1389 && FIXNUMP (AREF (map, 3)) 1389 && FIXNUMP (AREF (map, 3))
1390 && op < XINT (AREF (map, 3))) 1390 && op < XFIXNUM (AREF (map, 3)))
1391 content = AREF (map, 1); 1391 content = AREF (map, 1);
1392 else 1392 else
1393 continue; 1393 continue;
@@ -1397,10 +1397,10 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1397 1397
1398 if (NILP (content)) 1398 if (NILP (content))
1399 continue; 1399 continue;
1400 else if (FIXNUMP (content) && IN_INT_RANGE (XINT (content))) 1400 else if (FIXNUMP (content) && IN_INT_RANGE (XFIXNUM (content)))
1401 { 1401 {
1402 reg[RRR] = i; 1402 reg[RRR] = i;
1403 reg[rrr] = XINT (content); 1403 reg[rrr] = XFIXNUM (content);
1404 break; 1404 break;
1405 } 1405 }
1406 else if (EQ (content, Qt) || EQ (content, Qlambda)) 1406 else if (EQ (content, Qt) || EQ (content, Qlambda))
@@ -1413,10 +1413,10 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1413 attrib = XCAR (content); 1413 attrib = XCAR (content);
1414 value = XCDR (content); 1414 value = XCDR (content);
1415 if (! (FIXNUMP (attrib) && FIXNUMP (value) 1415 if (! (FIXNUMP (attrib) && FIXNUMP (value)
1416 && IN_INT_RANGE (XINT (value)))) 1416 && IN_INT_RANGE (XFIXNUM (value))))
1417 continue; 1417 continue;
1418 reg[RRR] = i; 1418 reg[RRR] = i;
1419 reg[rrr] = XINT (value); 1419 reg[rrr] = XFIXNUM (value);
1420 break; 1420 break;
1421 } 1421 }
1422 else if (SYMBOLP (content)) 1422 else if (SYMBOLP (content))
@@ -1453,7 +1453,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1453 stack_idx_of_map_multiple = 0; 1453 stack_idx_of_map_multiple = 0;
1454 1454
1455 /* Get number of maps and separators. */ 1455 /* Get number of maps and separators. */
1456 map_set_rest_length = XINT (ccl_prog[ic++]); 1456 map_set_rest_length = XFIXNUM (ccl_prog[ic++]);
1457 1457
1458 fin_ic = ic + map_set_rest_length; 1458 fin_ic = ic + map_set_rest_length;
1459 op = reg[rrr]; 1459 op = reg[rrr];
@@ -1524,7 +1524,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1524 do { 1524 do {
1525 for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--) 1525 for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--)
1526 { 1526 {
1527 point = XINT (ccl_prog[ic]); 1527 point = XFIXNUM (ccl_prog[ic]);
1528 if (point < 0) 1528 if (point < 0)
1529 { 1529 {
1530 /* +1 is for including separator. */ 1530 /* +1 is for including separator. */
@@ -1556,7 +1556,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1556 [t ELEMENT STARTPOINT ENDPOINT] */ 1556 [t ELEMENT STARTPOINT ENDPOINT] */
1557 if (FIXNUMP (content)) 1557 if (FIXNUMP (content))
1558 { 1558 {
1559 point = XINT (content); 1559 point = XFIXNUM (content);
1560 if (!(point <= op && op - point + 1 < size)) continue; 1560 if (!(point <= op && op - point + 1 < size)) continue;
1561 content = AREF (map, op - point + 1); 1561 content = AREF (map, op - point + 1);
1562 } 1562 }
@@ -1564,9 +1564,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1564 { 1564 {
1565 if (size != 4) continue; 1565 if (size != 4) continue;
1566 if (FIXNUMP (AREF (map, 2)) 1566 if (FIXNUMP (AREF (map, 2))
1567 && XINT (AREF (map, 2)) <= op 1567 && XFIXNUM (AREF (map, 2)) <= op
1568 && FIXNUMP (AREF (map, 3)) 1568 && FIXNUMP (AREF (map, 3))
1569 && op < XINT (AREF (map, 3))) 1569 && op < XFIXNUM (AREF (map, 3)))
1570 content = AREF (map, 1); 1570 content = AREF (map, 1);
1571 else 1571 else
1572 continue; 1572 continue;
@@ -1578,9 +1578,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1578 continue; 1578 continue;
1579 1579
1580 reg[RRR] = i; 1580 reg[RRR] = i;
1581 if (FIXNUMP (content) && IN_INT_RANGE (XINT (content))) 1581 if (FIXNUMP (content) && IN_INT_RANGE (XFIXNUM (content)))
1582 { 1582 {
1583 op = XINT (content); 1583 op = XFIXNUM (content);
1584 i += map_set_rest_length - 1; 1584 i += map_set_rest_length - 1;
1585 ic += map_set_rest_length - 1; 1585 ic += map_set_rest_length - 1;
1586 POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); 1586 POP_MAPPING_STACK (map_set_rest_length, reg[rrr]);
@@ -1591,9 +1591,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1591 attrib = XCAR (content); 1591 attrib = XCAR (content);
1592 value = XCDR (content); 1592 value = XCDR (content);
1593 if (! (FIXNUMP (attrib) && FIXNUMP (value) 1593 if (! (FIXNUMP (attrib) && FIXNUMP (value)
1594 && IN_INT_RANGE (XINT (value)))) 1594 && IN_INT_RANGE (XFIXNUM (value))))
1595 continue; 1595 continue;
1596 op = XINT (value); 1596 op = XFIXNUM (value);
1597 i += map_set_rest_length - 1; 1597 i += map_set_rest_length - 1;
1598 ic += map_set_rest_length - 1; 1598 ic += map_set_rest_length - 1;
1599 POP_MAPPING_STACK (map_set_rest_length, reg[rrr]); 1599 POP_MAPPING_STACK (map_set_rest_length, reg[rrr]);
@@ -1639,7 +1639,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1639 { 1639 {
1640 Lisp_Object map, attrib, value, content; 1640 Lisp_Object map, attrib, value, content;
1641 int point; 1641 int point;
1642 j = XINT (ccl_prog[ic++]); /* map_id */ 1642 j = XFIXNUM (ccl_prog[ic++]); /* map_id */
1643 op = reg[rrr]; 1643 op = reg[rrr];
1644 if (! (VECTORP (Vcode_conversion_map_vector) 1644 if (! (VECTORP (Vcode_conversion_map_vector)
1645 && j < ASIZE (Vcode_conversion_map_vector))) 1645 && j < ASIZE (Vcode_conversion_map_vector)))
@@ -1657,19 +1657,19 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1657 if (! (VECTORP (map) 1657 if (! (VECTORP (map)
1658 && 0 < ASIZE (map) 1658 && 0 < ASIZE (map)
1659 && FIXNUMP (AREF (map, 0)) 1659 && FIXNUMP (AREF (map, 0))
1660 && XINT (AREF (map, 0)) <= op 1660 && XFIXNUM (AREF (map, 0)) <= op
1661 && op - XINT (AREF (map, 0)) + 1 < ASIZE (map))) 1661 && op - XFIXNUM (AREF (map, 0)) + 1 < ASIZE (map)))
1662 { 1662 {
1663 reg[RRR] = -1; 1663 reg[RRR] = -1;
1664 break; 1664 break;
1665 } 1665 }
1666 point = op - XINT (AREF (map, 0)) + 1; 1666 point = op - XFIXNUM (AREF (map, 0)) + 1;
1667 reg[RRR] = 0; 1667 reg[RRR] = 0;
1668 content = AREF (map, point); 1668 content = AREF (map, point);
1669 if (NILP (content)) 1669 if (NILP (content))
1670 reg[RRR] = -1; 1670 reg[RRR] = -1;
1671 else if (TYPE_RANGED_FIXNUMP (int, content)) 1671 else if (TYPE_RANGED_FIXNUMP (int, content))
1672 reg[rrr] = XINT (content); 1672 reg[rrr] = XFIXNUM (content);
1673 else if (EQ (content, Qt)); 1673 else if (EQ (content, Qt));
1674 else if (CONSP (content)) 1674 else if (CONSP (content))
1675 { 1675 {
@@ -1678,7 +1678,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
1678 if (!FIXNUMP (attrib) 1678 if (!FIXNUMP (attrib)
1679 || !TYPE_RANGED_FIXNUMP (int, value)) 1679 || !TYPE_RANGED_FIXNUMP (int, value))
1680 continue; 1680 continue;
1681 reg[rrr] = XINT (value); 1681 reg[rrr] = XFIXNUM (value);
1682 break; 1682 break;
1683 } 1683 }
1684 else if (SYMBOLP (content)) 1684 else if (SYMBOLP (content))
@@ -1852,8 +1852,8 @@ resolve_symbol_ccl_program (Lisp_Object ccl)
1852 return Qnil; 1852 return Qnil;
1853 } 1853 }
1854 1854
1855 if (! (0 <= XINT (AREF (result, CCL_HEADER_BUF_MAG)) 1855 if (! (0 <= XFIXNUM (AREF (result, CCL_HEADER_BUF_MAG))
1856 && ASCENDING_ORDER (0, XINT (AREF (result, CCL_HEADER_EOF)), 1856 && ASCENDING_ORDER (0, XFIXNUM (AREF (result, CCL_HEADER_EOF)),
1857 ASIZE (ccl)))) 1857 ASIZE (ccl))))
1858 return Qnil; 1858 return Qnil;
1859 1859
@@ -1882,14 +1882,14 @@ ccl_get_compiled_code (Lisp_Object ccl_prog, ptrdiff_t *idx)
1882 1882
1883 val = Fget (ccl_prog, Qccl_program_idx); 1883 val = Fget (ccl_prog, Qccl_program_idx);
1884 if (! FIXNATP (val) 1884 if (! FIXNATP (val)
1885 || XINT (val) >= ASIZE (Vccl_program_table)) 1885 || XFIXNUM (val) >= ASIZE (Vccl_program_table))
1886 return Qnil; 1886 return Qnil;
1887 slot = AREF (Vccl_program_table, XINT (val)); 1887 slot = AREF (Vccl_program_table, XFIXNUM (val));
1888 if (! VECTORP (slot) 1888 if (! VECTORP (slot)
1889 || ASIZE (slot) != 4 1889 || ASIZE (slot) != 4
1890 || ! VECTORP (AREF (slot, 1))) 1890 || ! VECTORP (AREF (slot, 1)))
1891 return Qnil; 1891 return Qnil;
1892 *idx = XINT (val); 1892 *idx = XFIXNUM (val);
1893 if (NILP (AREF (slot, 2))) 1893 if (NILP (AREF (slot, 2)))
1894 { 1894 {
1895 val = resolve_symbol_ccl_program (AREF (slot, 1)); 1895 val = resolve_symbol_ccl_program (AREF (slot, 1));
@@ -1920,8 +1920,8 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog)
1920 vp = XVECTOR (ccl_prog); 1920 vp = XVECTOR (ccl_prog);
1921 ccl->size = vp->header.size; 1921 ccl->size = vp->header.size;
1922 ccl->prog = vp->contents; 1922 ccl->prog = vp->contents;
1923 ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]); 1923 ccl->eof_ic = XFIXNUM (vp->contents[CCL_HEADER_EOF]);
1924 ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]); 1924 ccl->buf_magnification = XFIXNUM (vp->contents[CCL_HEADER_BUF_MAG]);
1925 if (ccl->idx >= 0) 1925 if (ccl->idx >= 0)
1926 { 1926 {
1927 Lisp_Object slot; 1927 Lisp_Object slot;
@@ -1957,7 +1957,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */
1957 1957
1958 val = Fget (object, Qccl_program_idx); 1958 val = Fget (object, Qccl_program_idx);
1959 return ((! FIXNATP (val) 1959 return ((! FIXNATP (val)
1960 || XINT (val) >= ASIZE (Vccl_program_table)) 1960 || XFIXNUM (val) >= ASIZE (Vccl_program_table))
1961 ? Qnil : Qt); 1961 ? Qnil : Qt);
1962} 1962}
1963 1963
@@ -1991,7 +1991,7 @@ programs. */)
1991 1991
1992 for (i = 0; i < 8; i++) 1992 for (i = 0; i < 8; i++)
1993 ccl.reg[i] = (TYPE_RANGED_FIXNUMP (int, AREF (reg, i)) 1993 ccl.reg[i] = (TYPE_RANGED_FIXNUMP (int, AREF (reg, i))
1994 ? XINT (AREF (reg, i)) 1994 ? XFIXNUM (AREF (reg, i))
1995 : 0); 1995 : 0);
1996 1996
1997 ccl_driver (&ccl, NULL, NULL, 0, 0, Qnil); 1997 ccl_driver (&ccl, NULL, NULL, 0, 0, Qnil);
@@ -2060,11 +2060,11 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY
2060 if (NILP (AREF (status, i))) 2060 if (NILP (AREF (status, i)))
2061 ASET (status, i, make_fixnum (0)); 2061 ASET (status, i, make_fixnum (0));
2062 if (TYPE_RANGED_FIXNUMP (int, AREF (status, i))) 2062 if (TYPE_RANGED_FIXNUMP (int, AREF (status, i)))
2063 ccl.reg[i] = XINT (AREF (status, i)); 2063 ccl.reg[i] = XFIXNUM (AREF (status, i));
2064 } 2064 }
2065 if (FIXNUMP (AREF (status, i))) 2065 if (FIXNUMP (AREF (status, i)))
2066 { 2066 {
2067 i = XFASTINT (AREF (status, 8)); 2067 i = XFIXNAT (AREF (status, 8));
2068 if (ccl.ic < i && i < ccl.size) 2068 if (ccl.ic < i && i < ccl.size)
2069 ccl.ic = i; 2069 ccl.ic = i;
2070 } 2070 }
diff --git a/src/character.c b/src/character.c
index f9b32e7a5b2..97698d77890 100644
--- a/src/character.c
+++ b/src/character.c
@@ -206,7 +206,7 @@ translate_char (Lisp_Object table, int c)
206 206
207 ch = CHAR_TABLE_REF (table, c); 207 ch = CHAR_TABLE_REF (table, c);
208 if (CHARACTERP (ch)) 208 if (CHARACTERP (ch))
209 c = XINT (ch); 209 c = XFIXNUM (ch);
210 } 210 }
211 else 211 else
212 { 212 {
@@ -244,7 +244,7 @@ DEFUN ("unibyte-char-to-multibyte", Funibyte_char_to_multibyte,
244 int c; 244 int c;
245 245
246 CHECK_CHARACTER (ch); 246 CHECK_CHARACTER (ch);
247 c = XFASTINT (ch); 247 c = XFIXNAT (ch);
248 if (c >= 0x100) 248 if (c >= 0x100)
249 error ("Not a unibyte character: %d", c); 249 error ("Not a unibyte character: %d", c);
250 MAKE_CHAR_MULTIBYTE (c); 250 MAKE_CHAR_MULTIBYTE (c);
@@ -260,7 +260,7 @@ If the multibyte character does not represent a byte, return -1. */)
260 int cm; 260 int cm;
261 261
262 CHECK_CHARACTER (ch); 262 CHECK_CHARACTER (ch);
263 cm = XFASTINT (ch); 263 cm = XFIXNAT (ch);
264 if (cm < 256) 264 if (cm < 256)
265 /* Can't distinguish a byte read from a unibyte buffer from 265 /* Can't distinguish a byte read from a unibyte buffer from
266 a latin1 char, so let's let it slide. */ 266 a latin1 char, so let's let it slide. */
@@ -291,7 +291,7 @@ char_width (int c, struct Lisp_Char_Table *dp)
291 ch = AREF (disp, i); 291 ch = AREF (disp, i);
292 if (CHARACTERP (ch)) 292 if (CHARACTERP (ch))
293 { 293 {
294 int w = CHARACTER_WIDTH (XFASTINT (ch)); 294 int w = CHARACTER_WIDTH (XFIXNAT (ch));
295 if (INT_ADD_WRAPV (width, w, &width)) 295 if (INT_ADD_WRAPV (width, w, &width))
296 string_overflow (); 296 string_overflow ();
297 } 297 }
@@ -312,7 +312,7 @@ usage: (char-width CHAR) */)
312 ptrdiff_t width; 312 ptrdiff_t width;
313 313
314 CHECK_CHARACTER (ch); 314 CHECK_CHARACTER (ch);
315 c = XINT (ch); 315 c = XFIXNUM (ch);
316 width = char_width (c, buffer_display_table ()); 316 width = char_width (c, buffer_display_table ());
317 return make_fixnum (width); 317 return make_fixnum (width);
318} 318}
@@ -855,7 +855,7 @@ usage: (string &rest CHARACTERS) */)
855 for (i = 0; i < n; i++) 855 for (i = 0; i < n; i++)
856 { 856 {
857 CHECK_CHARACTER (args[i]); 857 CHECK_CHARACTER (args[i]);
858 c = XINT (args[i]); 858 c = XFIXNUM (args[i]);
859 p += CHAR_STRING (c, p); 859 p += CHAR_STRING (c, p);
860 } 860 }
861 861
@@ -878,7 +878,7 @@ usage: (unibyte-string &rest BYTES) */)
878 for (i = 0; i < n; i++) 878 for (i = 0; i < n; i++)
879 { 879 {
880 CHECK_RANGED_INTEGER (args[i], 0, 255); 880 CHECK_RANGED_INTEGER (args[i], 0, 255);
881 *p++ = XINT (args[i]); 881 *p++ = XFIXNUM (args[i]);
882 } 882 }
883 883
884 str = make_string_from_bytes ((char *) buf, n, p - buf); 884 str = make_string_from_bytes ((char *) buf, n, p - buf);
@@ -897,7 +897,7 @@ usage: (char-resolve-modifiers CHAR) */)
897 EMACS_INT c; 897 EMACS_INT c;
898 898
899 CHECK_FIXNUM (character); 899 CHECK_FIXNUM (character);
900 c = XINT (character); 900 c = XFIXNUM (character);
901 return make_fixnum (char_resolve_modifier_mask (c)); 901 return make_fixnum (char_resolve_modifier_mask (c));
902} 902}
903 903
@@ -926,9 +926,9 @@ character is not ASCII nor 8-bit character, an error is signaled. */)
926 else 926 else
927 { 927 {
928 CHECK_FIXNUM_COERCE_MARKER (position); 928 CHECK_FIXNUM_COERCE_MARKER (position);
929 if (XINT (position) < BEGV || XINT (position) >= ZV) 929 if (XFIXNUM (position) < BEGV || XFIXNUM (position) >= ZV)
930 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV)); 930 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
931 pos = XFASTINT (position); 931 pos = XFIXNAT (position);
932 p = CHAR_POS_ADDR (pos); 932 p = CHAR_POS_ADDR (pos);
933 } 933 }
934 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 934 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
@@ -944,9 +944,9 @@ character is not ASCII nor 8-bit character, an error is signaled. */)
944 else 944 else
945 { 945 {
946 CHECK_FIXNAT (position); 946 CHECK_FIXNAT (position);
947 if (XINT (position) >= SCHARS (string)) 947 if (XFIXNUM (position) >= SCHARS (string))
948 args_out_of_range (string, position); 948 args_out_of_range (string, position);
949 pos = XFASTINT (position); 949 pos = XFIXNAT (position);
950 p = SDATA (string) + string_char_to_byte (string, pos); 950 p = SDATA (string) + string_char_to_byte (string, pos);
951 } 951 }
952 if (! STRING_MULTIBYTE (string)) 952 if (! STRING_MULTIBYTE (string))
@@ -967,7 +967,7 @@ alphabeticp (int c)
967 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c); 967 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
968 if (! FIXNUMP (category)) 968 if (! FIXNUMP (category))
969 return false; 969 return false;
970 EMACS_INT gen_cat = XINT (category); 970 EMACS_INT gen_cat = XFIXNUM (category);
971 971
972 /* See UTS #18. There are additional characters that should be 972 /* See UTS #18. There are additional characters that should be
973 here, those designated as Other_uppercase, Other_lowercase, 973 here, those designated as Other_uppercase, Other_lowercase,
@@ -990,7 +990,7 @@ alphanumericp (int c)
990 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c); 990 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
991 if (! FIXNUMP (category)) 991 if (! FIXNUMP (category))
992 return false; 992 return false;
993 EMACS_INT gen_cat = XINT (category); 993 EMACS_INT gen_cat = XFIXNUM (category);
994 994
995 /* See UTS #18. Same comment as for alphabeticp applies. FIXME. */ 995 /* See UTS #18. Same comment as for alphabeticp applies. FIXME. */
996 return (gen_cat == UNICODE_CATEGORY_Lu 996 return (gen_cat == UNICODE_CATEGORY_Lu
@@ -1012,7 +1012,7 @@ graphicp (int c)
1012 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c); 1012 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
1013 if (! FIXNUMP (category)) 1013 if (! FIXNUMP (category))
1014 return false; 1014 return false;
1015 EMACS_INT gen_cat = XINT (category); 1015 EMACS_INT gen_cat = XFIXNUM (category);
1016 1016
1017 /* See UTS #18. */ 1017 /* See UTS #18. */
1018 return (!(gen_cat == UNICODE_CATEGORY_Zs /* space separator */ 1018 return (!(gen_cat == UNICODE_CATEGORY_Zs /* space separator */
@@ -1030,7 +1030,7 @@ printablep (int c)
1030 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c); 1030 Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
1031 if (! FIXNUMP (category)) 1031 if (! FIXNUMP (category))
1032 return false; 1032 return false;
1033 EMACS_INT gen_cat = XINT (category); 1033 EMACS_INT gen_cat = XFIXNUM (category);
1034 1034
1035 /* See UTS #18. */ 1035 /* See UTS #18. */
1036 return (!(gen_cat == UNICODE_CATEGORY_Cc /* control */ 1036 return (!(gen_cat == UNICODE_CATEGORY_Cc /* control */
@@ -1047,7 +1047,7 @@ blankp (int c)
1047 if (! FIXNUMP (category)) 1047 if (! FIXNUMP (category))
1048 return false; 1048 return false;
1049 1049
1050 return XINT (category) == UNICODE_CATEGORY_Zs; /* separator, space */ 1050 return XFIXNUM (category) == UNICODE_CATEGORY_Zs; /* separator, space */
1051} 1051}
1052 1052
1053 1053
diff --git a/src/character.h b/src/character.h
index 78b84870f52..5dff85aed47 100644
--- a/src/character.h
+++ b/src/character.h
@@ -123,7 +123,7 @@ enum
123#define MAX_MULTIBYTE_LENGTH 5 123#define MAX_MULTIBYTE_LENGTH 5
124 124
125/* Nonzero iff X is a character. */ 125/* Nonzero iff X is a character. */
126#define CHARACTERP(x) (FIXNATP (x) && XFASTINT (x) <= MAX_CHAR) 126#define CHARACTERP(x) (FIXNATP (x) && XFIXNAT (x) <= MAX_CHAR)
127 127
128/* Nonzero iff C is valid as a character code. */ 128/* Nonzero iff C is valid as a character code. */
129#define CHAR_VALID_P(c) UNSIGNED_CMP (c, <=, MAX_CHAR) 129#define CHAR_VALID_P(c) UNSIGNED_CMP (c, <=, MAX_CHAR)
@@ -559,7 +559,7 @@ enum
559/* Return a non-outlandish value for the tab width. */ 559/* Return a non-outlandish value for the tab width. */
560 560
561#define SANE_TAB_WIDTH(buf) \ 561#define SANE_TAB_WIDTH(buf) \
562 sanitize_tab_width (XFASTINT (BVAR (buf, tab_width))) 562 sanitize_tab_width (XFIXNAT (BVAR (buf, tab_width)))
563INLINE int 563INLINE int
564sanitize_tab_width (EMACS_INT width) 564sanitize_tab_width (EMACS_INT width)
565{ 565{
@@ -595,7 +595,7 @@ sanitize_char_width (EMACS_INT width)
595#define CHARACTER_WIDTH(c) \ 595#define CHARACTER_WIDTH(c) \
596 (ASCII_CHAR_P (c) \ 596 (ASCII_CHAR_P (c) \
597 ? ASCII_CHAR_WIDTH (c) \ 597 ? ASCII_CHAR_WIDTH (c) \
598 : sanitize_char_width (XINT (CHAR_TABLE_REF (Vchar_width_table, c)))) 598 : sanitize_char_width (XFIXNUM (CHAR_TABLE_REF (Vchar_width_table, c))))
599 599
600/* If C is a variation selector, return the index of the 600/* If C is a variation selector, return the index of the
601 variation selector (1..256). Otherwise, return 0. */ 601 variation selector (1..256). Otherwise, return 0. */
@@ -700,7 +700,7 @@ char_table_translate (Lisp_Object obj, int ch)
700 eassert (CHAR_VALID_P (ch)); 700 eassert (CHAR_VALID_P (ch));
701 eassert (CHAR_TABLE_P (obj)); 701 eassert (CHAR_TABLE_P (obj));
702 obj = CHAR_TABLE_REF (obj, ch); 702 obj = CHAR_TABLE_REF (obj, ch);
703 return CHARACTERP (obj) ? XINT (obj) : ch; 703 return CHARACTERP (obj) ? XFIXNUM (obj) : ch;
704} 704}
705 705
706#if defined __GNUC__ && !defined __STRICT_ANSI__ 706#if defined __GNUC__ && !defined __STRICT_ANSI__
diff --git a/src/charset.c b/src/charset.c
index 8d957abeb54..e77a3900b8b 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -587,14 +587,14 @@ load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int cont
587 { 587 {
588 val2 = XCDR (val); 588 val2 = XCDR (val);
589 val = XCAR (val); 589 val = XCAR (val);
590 from = XFASTINT (val); 590 from = XFIXNAT (val);
591 to = XFASTINT (val2); 591 to = XFIXNAT (val2);
592 } 592 }
593 else 593 else
594 from = to = XFASTINT (val); 594 from = to = XFIXNAT (val);
595 val = AREF (vec, i + 1); 595 val = AREF (vec, i + 1);
596 CHECK_FIXNAT (val); 596 CHECK_FIXNAT (val);
597 c = XFASTINT (val); 597 c = XFIXNAT (val);
598 598
599 if (from < min_code || to > max_code || from > to || c > MAX_CHAR) 599 if (from < min_code || to > max_code || from > to || c > MAX_CHAR)
600 continue; 600 continue;
@@ -757,14 +757,14 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun
757 int offset; 757 int offset;
758 758
759 subset_info = CHARSET_SUBSET (charset); 759 subset_info = CHARSET_SUBSET (charset);
760 charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0))); 760 charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
761 offset = XINT (AREF (subset_info, 3)); 761 offset = XFIXNUM (AREF (subset_info, 3));
762 from -= offset; 762 from -= offset;
763 if (from < XFASTINT (AREF (subset_info, 1))) 763 if (from < XFIXNAT (AREF (subset_info, 1)))
764 from = XFASTINT (AREF (subset_info, 1)); 764 from = XFIXNAT (AREF (subset_info, 1));
765 to -= offset; 765 to -= offset;
766 if (to > XFASTINT (AREF (subset_info, 2))) 766 if (to > XFIXNAT (AREF (subset_info, 2)))
767 to = XFASTINT (AREF (subset_info, 2)); 767 to = XFIXNAT (AREF (subset_info, 2));
768 map_charset_chars (c_function, function, arg, charset, from, to); 768 map_charset_chars (c_function, function, arg, charset, from, to);
769 } 769 }
770 else /* i.e. CHARSET_METHOD_SUPERSET */ 770 else /* i.e. CHARSET_METHOD_SUPERSET */
@@ -777,8 +777,8 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun
777 int offset; 777 int offset;
778 unsigned this_from, this_to; 778 unsigned this_from, this_to;
779 779
780 charset = CHARSET_FROM_ID (XFASTINT (XCAR (XCAR (parents)))); 780 charset = CHARSET_FROM_ID (XFIXNAT (XCAR (XCAR (parents))));
781 offset = XINT (XCDR (XCAR (parents))); 781 offset = XFIXNUM (XCDR (XCAR (parents)));
782 this_from = from > offset ? from - offset : 0; 782 this_from = from > offset ? from - offset : 0;
783 this_to = to > offset ? to - offset : 0; 783 this_to = to > offset ? to - offset : 0;
784 if (this_from < CHARSET_MIN_CODE (charset)) 784 if (this_from < CHARSET_MIN_CODE (charset))
@@ -811,7 +811,7 @@ range of code points (in CHARSET) of target characters. */)
811 from = CHARSET_MIN_CODE (cs); 811 from = CHARSET_MIN_CODE (cs);
812 else 812 else
813 { 813 {
814 from = XINT (from_code); 814 from = XFIXNUM (from_code);
815 if (from < CHARSET_MIN_CODE (cs)) 815 if (from < CHARSET_MIN_CODE (cs))
816 from = CHARSET_MIN_CODE (cs); 816 from = CHARSET_MIN_CODE (cs);
817 } 817 }
@@ -819,7 +819,7 @@ range of code points (in CHARSET) of target characters. */)
819 to = CHARSET_MAX_CODE (cs); 819 to = CHARSET_MAX_CODE (cs);
820 else 820 else
821 { 821 {
822 to = XINT (to_code); 822 to = XFIXNUM (to_code);
823 if (to > CHARSET_MAX_CODE (cs)) 823 if (to > CHARSET_MAX_CODE (cs))
824 to = CHARSET_MAX_CODE (cs); 824 to = CHARSET_MAX_CODE (cs);
825 } 825 }
@@ -870,9 +870,9 @@ usage: (define-charset-internal ...) */)
870 min_byte_obj = Faref (val, make_fixnum (i * 2)); 870 min_byte_obj = Faref (val, make_fixnum (i * 2));
871 max_byte_obj = Faref (val, make_fixnum (i * 2 + 1)); 871 max_byte_obj = Faref (val, make_fixnum (i * 2 + 1));
872 CHECK_RANGED_INTEGER (min_byte_obj, 0, 255); 872 CHECK_RANGED_INTEGER (min_byte_obj, 0, 255);
873 min_byte = XINT (min_byte_obj); 873 min_byte = XFIXNUM (min_byte_obj);
874 CHECK_RANGED_INTEGER (max_byte_obj, min_byte, 255); 874 CHECK_RANGED_INTEGER (max_byte_obj, min_byte, 255);
875 max_byte = XINT (max_byte_obj); 875 max_byte = XFIXNUM (max_byte_obj);
876 charset.code_space[i * 4] = min_byte; 876 charset.code_space[i * 4] = min_byte;
877 charset.code_space[i * 4 + 1] = max_byte; 877 charset.code_space[i * 4 + 1] = max_byte;
878 charset.code_space[i * 4 + 2] = max_byte - min_byte + 1; 878 charset.code_space[i * 4 + 2] = max_byte - min_byte + 1;
@@ -890,7 +890,7 @@ usage: (define-charset-internal ...) */)
890 else 890 else
891 { 891 {
892 CHECK_RANGED_INTEGER (val, 1, 4); 892 CHECK_RANGED_INTEGER (val, 1, 4);
893 charset.dimension = XINT (val); 893 charset.dimension = XFIXNUM (val);
894 } 894 }
895 895
896 charset.code_linear_p 896 charset.code_linear_p
@@ -971,9 +971,9 @@ usage: (define-charset-internal ...) */)
971 else 971 else
972 { 972 {
973 CHECK_FIXNUM (val); 973 CHECK_FIXNUM (val);
974 if (XINT (val) < '0' || XINT (val) > 127) 974 if (XFIXNUM (val) < '0' || XFIXNUM (val) > 127)
975 error ("Invalid iso-final-char: %"pI"d", XINT (val)); 975 error ("Invalid iso-final-char: %"pI"d", XFIXNUM (val));
976 charset.iso_final = XINT (val); 976 charset.iso_final = XFIXNUM (val);
977 } 977 }
978 978
979 val = args[charset_arg_iso_revision]; 979 val = args[charset_arg_iso_revision];
@@ -982,7 +982,7 @@ usage: (define-charset-internal ...) */)
982 else 982 else
983 { 983 {
984 CHECK_RANGED_INTEGER (val, -1, 63); 984 CHECK_RANGED_INTEGER (val, -1, 63);
985 charset.iso_revision = XINT (val); 985 charset.iso_revision = XFIXNUM (val);
986 } 986 }
987 987
988 val = args[charset_arg_emacs_mule_id]; 988 val = args[charset_arg_emacs_mule_id];
@@ -991,9 +991,9 @@ usage: (define-charset-internal ...) */)
991 else 991 else
992 { 992 {
993 CHECK_FIXNAT (val); 993 CHECK_FIXNAT (val);
994 if ((XINT (val) > 0 && XINT (val) <= 128) || XINT (val) >= 256) 994 if ((XFIXNUM (val) > 0 && XFIXNUM (val) <= 128) || XFIXNUM (val) >= 256)
995 error ("Invalid emacs-mule-id: %"pI"d", XINT (val)); 995 error ("Invalid emacs-mule-id: %"pI"d", XFIXNUM (val));
996 charset.emacs_mule_id = XINT (val); 996 charset.emacs_mule_id = XFIXNUM (val);
997 } 997 }
998 998
999 charset.ascii_compatible_p = ! NILP (args[charset_arg_ascii_compatible_p]); 999 charset.ascii_compatible_p = ! NILP (args[charset_arg_ascii_compatible_p]);
@@ -1010,7 +1010,7 @@ usage: (define-charset-internal ...) */)
1010 CHECK_CHARACTER (val); 1010 CHECK_CHARACTER (val);
1011 1011
1012 charset.method = CHARSET_METHOD_OFFSET; 1012 charset.method = CHARSET_METHOD_OFFSET;
1013 charset.code_offset = XINT (val); 1013 charset.code_offset = XFIXNUM (val);
1014 1014
1015 i = CODE_POINT_TO_INDEX (&charset, charset.max_code); 1015 i = CODE_POINT_TO_INDEX (&charset, charset.max_code);
1016 if (MAX_CHAR - charset.code_offset < i) 1016 if (MAX_CHAR - charset.code_offset < i)
@@ -1089,7 +1089,7 @@ usage: (define-charset-internal ...) */)
1089 cdr_part = XCDR (elt); 1089 cdr_part = XCDR (elt);
1090 CHECK_CHARSET_GET_ID (car_part, this_id); 1090 CHECK_CHARSET_GET_ID (car_part, this_id);
1091 CHECK_TYPE_RANGED_INTEGER (int, cdr_part); 1091 CHECK_TYPE_RANGED_INTEGER (int, cdr_part);
1092 offset = XINT (cdr_part); 1092 offset = XFIXNUM (cdr_part);
1093 } 1093 }
1094 else 1094 else
1095 { 1095 {
@@ -1123,7 +1123,7 @@ usage: (define-charset-internal ...) */)
1123 if (charset.hash_index >= 0) 1123 if (charset.hash_index >= 0)
1124 { 1124 {
1125 new_definition_p = 0; 1125 new_definition_p = 0;
1126 id = XFASTINT (CHARSET_SYMBOL_ID (args[charset_arg_name])); 1126 id = XFIXNAT (CHARSET_SYMBOL_ID (args[charset_arg_name]));
1127 set_hash_value_slot (hash_table, charset.hash_index, attrs); 1127 set_hash_value_slot (hash_table, charset.hash_index, attrs);
1128 } 1128 }
1129 else 1129 else
@@ -1209,7 +1209,7 @@ usage: (define-charset-internal ...) */)
1209 1209
1210 for (tail = Vcharset_ordered_list; CONSP (tail); tail = XCDR (tail)) 1210 for (tail = Vcharset_ordered_list; CONSP (tail); tail = XCDR (tail))
1211 { 1211 {
1212 struct charset *cs = CHARSET_FROM_ID (XINT (XCAR (tail))); 1212 struct charset *cs = CHARSET_FROM_ID (XFIXNUM (XCAR (tail)));
1213 1213
1214 if (cs->supplementary_p) 1214 if (cs->supplementary_p)
1215 break; 1215 break;
@@ -1293,7 +1293,7 @@ define_charset_internal (Lisp_Object name,
1293 args[charset_arg_code_offset]); 1293 args[charset_arg_code_offset]);
1294 Fdefine_charset_internal (charset_arg_max, args); 1294 Fdefine_charset_internal (charset_arg_max, args);
1295 1295
1296 return XINT (CHARSET_SYMBOL_ID (name)); 1296 return XFIXNUM (CHARSET_SYMBOL_ID (name));
1297} 1297}
1298 1298
1299 1299
@@ -1400,15 +1400,15 @@ check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars,
1400 CHECK_FIXNUM (chars); 1400 CHECK_FIXNUM (chars);
1401 CHECK_CHARACTER (final_char); 1401 CHECK_CHARACTER (final_char);
1402 1402
1403 if (! (1 <= XINT (dimension) && XINT (dimension) <= 3)) 1403 if (! (1 <= XFIXNUM (dimension) && XFIXNUM (dimension) <= 3))
1404 error ("Invalid DIMENSION %"pI"d, it should be 1, 2, or 3", 1404 error ("Invalid DIMENSION %"pI"d, it should be 1, 2, or 3",
1405 XINT (dimension)); 1405 XFIXNUM (dimension));
1406 1406
1407 bool chars_flag = XINT (chars) == 96; 1407 bool chars_flag = XFIXNUM (chars) == 96;
1408 if (! (chars_flag || XINT (chars) == 94)) 1408 if (! (chars_flag || XFIXNUM (chars) == 94))
1409 error ("Invalid CHARS %"pI"d, it should be 94 or 96", XINT (chars)); 1409 error ("Invalid CHARS %"pI"d, it should be 94 or 96", XFIXNUM (chars));
1410 1410
1411 int final_ch = XFASTINT (final_char); 1411 int final_ch = XFIXNAT (final_char);
1412 if (! ('0' <= final_ch && final_ch <= '~')) 1412 if (! ('0' <= final_ch && final_ch <= '~'))
1413 error ("Invalid FINAL-CHAR `%c', it should be `0'..`~'", final_ch); 1413 error ("Invalid FINAL-CHAR `%c', it should be `0'..`~'", final_ch);
1414 1414
@@ -1430,7 +1430,7 @@ return nil. */)
1430 bool chars_flag = check_iso_charset_parameter (dimension, chars, 1430 bool chars_flag = check_iso_charset_parameter (dimension, chars,
1431 make_fixnum ('0')); 1431 make_fixnum ('0'));
1432 for (int final_char = '0'; final_char <= '?'; final_char++) 1432 for (int final_char = '0'; final_char <= '?'; final_char++)
1433 if (ISO_CHARSET_TABLE (XINT (dimension), chars_flag, final_char) < 0) 1433 if (ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag, final_char) < 0)
1434 return make_fixnum (final_char); 1434 return make_fixnum (final_char);
1435 return Qnil; 1435 return Qnil;
1436} 1436}
@@ -1449,7 +1449,7 @@ if CHARSET is designated instead. */)
1449 1449
1450 CHECK_CHARSET_GET_ID (charset, id); 1450 CHECK_CHARSET_GET_ID (charset, id);
1451 bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char); 1451 bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
1452 ISO_CHARSET_TABLE (XINT (dimension), chars_flag, XFASTINT (final_char)) = id; 1452 ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag, XFIXNAT (final_char)) = id;
1453 return Qnil; 1453 return Qnil;
1454} 1454}
1455 1455
@@ -1550,8 +1550,8 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
1550 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters)); 1550 bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
1551 1551
1552 validate_region (&beg, &end); 1552 validate_region (&beg, &end);
1553 from = XFASTINT (beg); 1553 from = XFIXNAT (beg);
1554 stop = to = XFASTINT (end); 1554 stop = to = XFIXNAT (end);
1555 1555
1556 if (from < GPT && GPT < to) 1556 if (from < GPT && GPT < to)
1557 { 1557 {
@@ -1622,7 +1622,7 @@ maybe_unify_char (int c, Lisp_Object val)
1622 struct charset *charset; 1622 struct charset *charset;
1623 1623
1624 if (FIXNUMP (val)) 1624 if (FIXNUMP (val))
1625 return XFASTINT (val); 1625 return XFIXNAT (val);
1626 if (NILP (val)) 1626 if (NILP (val))
1627 return c; 1627 return c;
1628 1628
@@ -1638,7 +1638,7 @@ maybe_unify_char (int c, Lisp_Object val)
1638 { 1638 {
1639 val = CHAR_TABLE_REF (Vchar_unify_table, c); 1639 val = CHAR_TABLE_REF (Vchar_unify_table, c);
1640 if (! NILP (val)) 1640 if (! NILP (val))
1641 c = XFASTINT (val); 1641 c = XFIXNAT (val);
1642 } 1642 }
1643 else 1643 else
1644 { 1644 {
@@ -1672,10 +1672,10 @@ decode_char (struct charset *charset, unsigned int code)
1672 Lisp_Object subset_info; 1672 Lisp_Object subset_info;
1673 1673
1674 subset_info = CHARSET_SUBSET (charset); 1674 subset_info = CHARSET_SUBSET (charset);
1675 charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0))); 1675 charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
1676 code -= XINT (AREF (subset_info, 3)); 1676 code -= XFIXNUM (AREF (subset_info, 3));
1677 if (code < XFASTINT (AREF (subset_info, 1)) 1677 if (code < XFIXNAT (AREF (subset_info, 1))
1678 || code > XFASTINT (AREF (subset_info, 2))) 1678 || code > XFIXNAT (AREF (subset_info, 2)))
1679 c = -1; 1679 c = -1;
1680 else 1680 else
1681 c = DECODE_CHAR (charset, code); 1681 c = DECODE_CHAR (charset, code);
@@ -1688,8 +1688,8 @@ decode_char (struct charset *charset, unsigned int code)
1688 c = -1; 1688 c = -1;
1689 for (; CONSP (parents); parents = XCDR (parents)) 1689 for (; CONSP (parents); parents = XCDR (parents))
1690 { 1690 {
1691 int id = XINT (XCAR (XCAR (parents))); 1691 int id = XFIXNUM (XCAR (XCAR (parents)));
1692 int code_offset = XINT (XCDR (XCAR (parents))); 1692 int code_offset = XFIXNUM (XCDR (XCAR (parents)));
1693 unsigned this_code = code - code_offset; 1693 unsigned this_code = code - code_offset;
1694 1694
1695 charset = CHARSET_FROM_ID (id); 1695 charset = CHARSET_FROM_ID (id);
@@ -1714,7 +1714,7 @@ decode_char (struct charset *charset, unsigned int code)
1714 decoder = CHARSET_DECODER (charset); 1714 decoder = CHARSET_DECODER (charset);
1715 } 1715 }
1716 if (VECTORP (decoder)) 1716 if (VECTORP (decoder))
1717 c = XINT (AREF (decoder, char_index)); 1717 c = XFIXNUM (AREF (decoder, char_index));
1718 else 1718 else
1719 c = GET_TEMP_CHARSET_WORK_DECODER (char_index); 1719 c = GET_TEMP_CHARSET_WORK_DECODER (char_index);
1720 } 1720 }
@@ -1763,7 +1763,7 @@ encode_char (struct charset *charset, int c)
1763 Lisp_Object deunified = CHAR_TABLE_REF (deunifier, c); 1763 Lisp_Object deunified = CHAR_TABLE_REF (deunifier, c);
1764 1764
1765 if (FIXNUMP (deunified)) 1765 if (FIXNUMP (deunified))
1766 code_index = XINT (deunified); 1766 code_index = XFIXNUM (deunified);
1767 } 1767 }
1768 else 1768 else
1769 { 1769 {
@@ -1779,13 +1779,13 @@ encode_char (struct charset *charset, int c)
1779 struct charset *this_charset; 1779 struct charset *this_charset;
1780 1780
1781 subset_info = CHARSET_SUBSET (charset); 1781 subset_info = CHARSET_SUBSET (charset);
1782 this_charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0))); 1782 this_charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
1783 code = ENCODE_CHAR (this_charset, c); 1783 code = ENCODE_CHAR (this_charset, c);
1784 if (code == CHARSET_INVALID_CODE (this_charset) 1784 if (code == CHARSET_INVALID_CODE (this_charset)
1785 || code < XFASTINT (AREF (subset_info, 1)) 1785 || code < XFIXNAT (AREF (subset_info, 1))
1786 || code > XFASTINT (AREF (subset_info, 2))) 1786 || code > XFIXNAT (AREF (subset_info, 2)))
1787 return CHARSET_INVALID_CODE (charset); 1787 return CHARSET_INVALID_CODE (charset);
1788 code += XINT (AREF (subset_info, 3)); 1788 code += XFIXNUM (AREF (subset_info, 3));
1789 return code; 1789 return code;
1790 } 1790 }
1791 1791
@@ -1796,8 +1796,8 @@ encode_char (struct charset *charset, int c)
1796 parents = CHARSET_SUPERSET (charset); 1796 parents = CHARSET_SUPERSET (charset);
1797 for (; CONSP (parents); parents = XCDR (parents)) 1797 for (; CONSP (parents); parents = XCDR (parents))
1798 { 1798 {
1799 int id = XINT (XCAR (XCAR (parents))); 1799 int id = XFIXNUM (XCAR (XCAR (parents)));
1800 int code_offset = XINT (XCDR (XCAR (parents))); 1800 int code_offset = XFIXNUM (XCDR (XCAR (parents)));
1801 struct charset *this_charset = CHARSET_FROM_ID (id); 1801 struct charset *this_charset = CHARSET_FROM_ID (id);
1802 1802
1803 code = ENCODE_CHAR (this_charset, c); 1803 code = ENCODE_CHAR (this_charset, c);
@@ -1827,7 +1827,7 @@ encode_char (struct charset *charset, int c)
1827 val = CHAR_TABLE_REF (encoder, c); 1827 val = CHAR_TABLE_REF (encoder, c);
1828 if (NILP (val)) 1828 if (NILP (val))
1829 return CHARSET_INVALID_CODE (charset); 1829 return CHARSET_INVALID_CODE (charset);
1830 code = XINT (val); 1830 code = XFIXNUM (val);
1831 if (! CHARSET_COMPACT_CODES_P (charset)) 1831 if (! CHARSET_COMPACT_CODES_P (charset))
1832 code = INDEX_TO_CODE_POINT (charset, code); 1832 code = INDEX_TO_CODE_POINT (charset, code);
1833 } 1833 }
@@ -1878,7 +1878,7 @@ Return nil if CHARSET doesn't include CH. */)
1878 1878
1879 CHECK_CHARSET_GET_ID (charset, id); 1879 CHECK_CHARSET_GET_ID (charset, id);
1880 CHECK_CHARACTER (ch); 1880 CHECK_CHARACTER (ch);
1881 c = XFASTINT (ch); 1881 c = XFIXNAT (ch);
1882 charsetp = CHARSET_FROM_ID (id); 1882 charsetp = CHARSET_FROM_ID (id);
1883 code = ENCODE_CHAR (charsetp, c); 1883 code = ENCODE_CHAR (charsetp, c);
1884 if (code == CHARSET_INVALID_CODE (charsetp)) 1884 if (code == CHARSET_INVALID_CODE (charsetp))
@@ -1911,9 +1911,9 @@ is specified. */)
1911 else 1911 else
1912 { 1912 {
1913 CHECK_FIXNAT (code1); 1913 CHECK_FIXNAT (code1);
1914 if (XFASTINT (code1) >= 0x100) 1914 if (XFIXNAT (code1) >= 0x100)
1915 args_out_of_range (make_fixnum (0xFF), code1); 1915 args_out_of_range (make_fixnum (0xFF), code1);
1916 code = XFASTINT (code1); 1916 code = XFIXNAT (code1);
1917 1917
1918 if (dimension > 1) 1918 if (dimension > 1)
1919 { 1919 {
@@ -1923,9 +1923,9 @@ is specified. */)
1923 else 1923 else
1924 { 1924 {
1925 CHECK_FIXNAT (code2); 1925 CHECK_FIXNAT (code2);
1926 if (XFASTINT (code2) >= 0x100) 1926 if (XFIXNAT (code2) >= 0x100)
1927 args_out_of_range (make_fixnum (0xFF), code2); 1927 args_out_of_range (make_fixnum (0xFF), code2);
1928 code |= XFASTINT (code2); 1928 code |= XFIXNAT (code2);
1929 } 1929 }
1930 1930
1931 if (dimension > 2) 1931 if (dimension > 2)
@@ -1936,9 +1936,9 @@ is specified. */)
1936 else 1936 else
1937 { 1937 {
1938 CHECK_FIXNAT (code3); 1938 CHECK_FIXNAT (code3);
1939 if (XFASTINT (code3) >= 0x100) 1939 if (XFIXNAT (code3) >= 0x100)
1940 args_out_of_range (make_fixnum (0xFF), code3); 1940 args_out_of_range (make_fixnum (0xFF), code3);
1941 code |= XFASTINT (code3); 1941 code |= XFIXNAT (code3);
1942 } 1942 }
1943 1943
1944 if (dimension > 3) 1944 if (dimension > 3)
@@ -1949,9 +1949,9 @@ is specified. */)
1949 else 1949 else
1950 { 1950 {
1951 CHECK_FIXNAT (code4); 1951 CHECK_FIXNAT (code4);
1952 if (XFASTINT (code4) >= 0x100) 1952 if (XFIXNAT (code4) >= 0x100)
1953 args_out_of_range (make_fixnum (0xFF), code4); 1953 args_out_of_range (make_fixnum (0xFF), code4);
1954 code |= XFASTINT (code4); 1954 code |= XFIXNAT (code4);
1955 } 1955 }
1956 } 1956 }
1957 } 1957 }
@@ -1983,7 +1983,7 @@ char_charset (int c, Lisp_Object charset_list, unsigned int *code_return)
1983 1983
1984 while (CONSP (charset_list)) 1984 while (CONSP (charset_list))
1985 { 1985 {
1986 struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 1986 struct charset *charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
1987 unsigned code = ENCODE_CHAR (charset, c); 1987 unsigned code = ENCODE_CHAR (charset, c);
1988 1988
1989 if (code != CHARSET_INVALID_CODE (charset)) 1989 if (code != CHARSET_INVALID_CODE (charset))
@@ -2018,7 +2018,7 @@ CH in the charset. */)
2018 Lisp_Object val; 2018 Lisp_Object val;
2019 2019
2020 CHECK_CHARACTER (ch); 2020 CHECK_CHARACTER (ch);
2021 c = XFASTINT (ch); 2021 c = XFIXNAT (ch);
2022 charset = CHAR_CHARSET (c); 2022 charset = CHAR_CHARSET (c);
2023 if (! charset) 2023 if (! charset)
2024 emacs_abort (); 2024 emacs_abort ();
@@ -2048,12 +2048,12 @@ that case, find the charset from what supported by that coding system. */)
2048 2048
2049 CHECK_CHARACTER (ch); 2049 CHECK_CHARACTER (ch);
2050 if (NILP (restriction)) 2050 if (NILP (restriction))
2051 charset = CHAR_CHARSET (XINT (ch)); 2051 charset = CHAR_CHARSET (XFIXNUM (ch));
2052 else 2052 else
2053 { 2053 {
2054 if (CONSP (restriction)) 2054 if (CONSP (restriction))
2055 { 2055 {
2056 int c = XFASTINT (ch); 2056 int c = XFIXNAT (ch);
2057 2057
2058 for (; CONSP (restriction); restriction = XCDR (restriction)) 2058 for (; CONSP (restriction); restriction = XCDR (restriction))
2059 { 2059 {
@@ -2066,7 +2066,7 @@ that case, find the charset from what supported by that coding system. */)
2066 return Qnil; 2066 return Qnil;
2067 } 2067 }
2068 restriction = coding_system_charset_list (restriction); 2068 restriction = coding_system_charset_list (restriction);
2069 charset = char_charset (XINT (ch), restriction, NULL); 2069 charset = char_charset (XFIXNUM (ch), restriction, NULL);
2070 if (! charset) 2070 if (! charset)
2071 return Qnil; 2071 return Qnil;
2072 } 2072 }
@@ -2087,7 +2087,7 @@ If POS is out of range, the value is nil. */)
2087 ch = Fchar_after (pos); 2087 ch = Fchar_after (pos);
2088 if (! FIXNUMP (ch)) 2088 if (! FIXNUMP (ch))
2089 return ch; 2089 return ch;
2090 charset = CHAR_CHARSET (XINT (ch)); 2090 charset = CHAR_CHARSET (XFIXNUM (ch));
2091 return (CHARSET_NAME (charset)); 2091 return (CHARSET_NAME (charset));
2092} 2092}
2093 2093
@@ -2104,8 +2104,8 @@ DIMENSION, CHARS, and FINAL-CHAR. */)
2104 (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char) 2104 (Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char)
2105{ 2105{
2106 bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char); 2106 bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
2107 int id = ISO_CHARSET_TABLE (XINT (dimension), chars_flag, 2107 int id = ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag,
2108 XFASTINT (final_char)); 2108 XFIXNAT (final_char));
2109 return (id >= 0 ? CHARSET_NAME (CHARSET_FROM_ID (id)) : Qnil); 2109 return (id >= 0 ? CHARSET_NAME (CHARSET_FROM_ID (id)) : Qnil);
2110} 2110}
2111 2111
@@ -2139,11 +2139,11 @@ HIGHESTP non-nil means just return the highest priority one. */)
2139 Lisp_Object val = Qnil, list = Vcharset_ordered_list; 2139 Lisp_Object val = Qnil, list = Vcharset_ordered_list;
2140 2140
2141 if (!NILP (highestp)) 2141 if (!NILP (highestp))
2142 return CHARSET_NAME (CHARSET_FROM_ID (XINT (Fcar (list)))); 2142 return CHARSET_NAME (CHARSET_FROM_ID (XFIXNUM (Fcar (list))));
2143 2143
2144 while (!NILP (list)) 2144 while (!NILP (list))
2145 { 2145 {
2146 val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XINT (XCAR (list)))), val); 2146 val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XFIXNUM (XCAR (list)))), val);
2147 list = XCDR (list); 2147 list = XCDR (list);
2148 } 2148 }
2149 return Fnreverse (val); 2149 return Fnreverse (val);
@@ -2186,7 +2186,7 @@ usage: (set-charset-priority &rest charsets) */)
2186 list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule); 2186 list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule);
2187 if (charset_unibyte < 0) 2187 if (charset_unibyte < 0)
2188 { 2188 {
2189 struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (old_list))); 2189 struct charset *charset = CHARSET_FROM_ID (XFIXNUM (XCAR (old_list)));
2190 2190
2191 if (CHARSET_DIMENSION (charset) == 1 2191 if (CHARSET_DIMENSION (charset) == 1
2192 && CHARSET_ASCII_COMPATIBLE_P (charset) 2192 && CHARSET_ASCII_COMPATIBLE_P (charset)
@@ -2237,7 +2237,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
2237 (Lisp_Object charsets) 2237 (Lisp_Object charsets)
2238{ 2238{
2239 Lisp_Object len = Flength (charsets); 2239 Lisp_Object len = Flength (charsets);
2240 ptrdiff_t n = XFASTINT (len), i, j; 2240 ptrdiff_t n = XFIXNAT (len), i, j;
2241 int done; 2241 int done;
2242 Lisp_Object tail, elt, attrs; 2242 Lisp_Object tail, elt, attrs;
2243 struct charset_sort_data *sort_data; 2243 struct charset_sort_data *sort_data;
@@ -2252,7 +2252,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
2252 elt = XCAR (tail); 2252 elt = XCAR (tail);
2253 CHECK_CHARSET_GET_ATTR (elt, attrs); 2253 CHECK_CHARSET_GET_ATTR (elt, attrs);
2254 sort_data[i].charset = elt; 2254 sort_data[i].charset = elt;
2255 sort_data[i].id = id = XINT (CHARSET_ATTR_ID (attrs)); 2255 sort_data[i].id = id = XFIXNUM (CHARSET_ATTR_ID (attrs));
2256 if (id < min_id) 2256 if (id < min_id)
2257 min_id = id; 2257 min_id = id;
2258 if (id > max_id) 2258 if (id > max_id)
@@ -2262,7 +2262,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
2262 done < n && CONSP (tail); tail = XCDR (tail), i++) 2262 done < n && CONSP (tail); tail = XCDR (tail), i++)
2263 { 2263 {
2264 elt = XCAR (tail); 2264 elt = XCAR (tail);
2265 id = XFASTINT (elt); 2265 id = XFIXNAT (elt);
2266 if (id >= min_id && id <= max_id) 2266 if (id >= min_id && id <= max_id)
2267 for (j = 0; j < n; j++) 2267 for (j = 0; j < n; j++)
2268 if (sort_data[j].id == id) 2268 if (sort_data[j].id == id)
diff --git a/src/charset.h b/src/charset.h
index 8832af40d4f..7b85a1a4e31 100644
--- a/src/charset.h
+++ b/src/charset.h
@@ -355,7 +355,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
355 \ 355 \
356 if (! SYMBOLP (x) || (idx = CHARSET_SYMBOL_HASH_INDEX (x)) < 0) \ 356 if (! SYMBOLP (x) || (idx = CHARSET_SYMBOL_HASH_INDEX (x)) < 0) \
357 wrong_type_argument (Qcharsetp, (x)); \ 357 wrong_type_argument (Qcharsetp, (x)); \
358 id = XINT (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \ 358 id = XFIXNUM (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
359 charset_id)); \ 359 charset_id)); \
360 } while (false) 360 } while (false)
361 361
@@ -416,7 +416,7 @@ extern Lisp_Object Vchar_charset_set;
416 : (charset)->method == CHARSET_METHOD_MAP \ 416 : (charset)->method == CHARSET_METHOD_MAP \
417 ? (((charset)->code_linear_p \ 417 ? (((charset)->code_linear_p \
418 && VECTORP (CHARSET_DECODER (charset))) \ 418 && VECTORP (CHARSET_DECODER (charset))) \
419 ? XINT (AREF (CHARSET_DECODER (charset), \ 419 ? XFIXNUM (AREF (CHARSET_DECODER (charset), \
420 (code) - (charset)->min_code)) \ 420 (code) - (charset)->min_code)) \
421 : decode_char ((charset), (code))) \ 421 : decode_char ((charset), (code))) \
422 : decode_char ((charset), (code))) 422 : decode_char ((charset), (code)))
@@ -447,7 +447,7 @@ extern Lisp_Object charset_work;
447 ? (charset_work = CHAR_TABLE_REF (CHARSET_ENCODER (charset), c), \ 447 ? (charset_work = CHAR_TABLE_REF (CHARSET_ENCODER (charset), c), \
448 (NILP (charset_work) \ 448 (NILP (charset_work) \
449 ? (charset)->invalid_code \ 449 ? (charset)->invalid_code \
450 : (unsigned) XFASTINT (charset_work))) \ 450 : (unsigned) XFIXNAT (charset_work))) \
451 : encode_char (charset, c)) \ 451 : encode_char (charset, c)) \
452 : encode_char (charset, c)))) 452 : encode_char (charset, c))))
453 453
diff --git a/src/chartab.c b/src/chartab.c
index f09e9738a5d..0383a84a04d 100644
--- a/src/chartab.c
+++ b/src/chartab.c
@@ -119,9 +119,9 @@ the char-table has no extra slot. */)
119 else 119 else
120 { 120 {
121 CHECK_FIXNAT (n); 121 CHECK_FIXNAT (n);
122 if (XINT (n) > 10) 122 if (XFIXNUM (n) > 10)
123 args_out_of_range (n, Qnil); 123 args_out_of_range (n, Qnil);
124 n_extras = XINT (n); 124 n_extras = XFIXNUM (n);
125 } 125 }
126 126
127 size = CHAR_TABLE_STANDARD_SLOTS + n_extras; 127 size = CHAR_TABLE_STANDARD_SLOTS + n_extras;
@@ -572,11 +572,11 @@ DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot,
572{ 572{
573 CHECK_CHAR_TABLE (char_table); 573 CHECK_CHAR_TABLE (char_table);
574 CHECK_FIXNUM (n); 574 CHECK_FIXNUM (n);
575 if (XINT (n) < 0 575 if (XFIXNUM (n) < 0
576 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) 576 || XFIXNUM (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
577 args_out_of_range (char_table, n); 577 args_out_of_range (char_table, n);
578 578
579 return XCHAR_TABLE (char_table)->extras[XINT (n)]; 579 return XCHAR_TABLE (char_table)->extras[XFIXNUM (n)];
580} 580}
581 581
582DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot, 582DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot,
@@ -587,11 +587,11 @@ DEFUN ("set-char-table-extra-slot", Fset_char_table_extra_slot,
587{ 587{
588 CHECK_CHAR_TABLE (char_table); 588 CHECK_CHAR_TABLE (char_table);
589 CHECK_FIXNUM (n); 589 CHECK_FIXNUM (n);
590 if (XINT (n) < 0 590 if (XFIXNUM (n) < 0
591 || XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table))) 591 || XFIXNUM (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
592 args_out_of_range (char_table, n); 592 args_out_of_range (char_table, n);
593 593
594 set_char_table_extras (char_table, XINT (n), value); 594 set_char_table_extras (char_table, XFIXNUM (n), value);
595 return value; 595 return value;
596} 596}
597 597
@@ -608,15 +608,15 @@ a cons of character codes (for characters in the range), or a character code. *
608 if (EQ (range, Qnil)) 608 if (EQ (range, Qnil))
609 val = XCHAR_TABLE (char_table)->defalt; 609 val = XCHAR_TABLE (char_table)->defalt;
610 else if (CHARACTERP (range)) 610 else if (CHARACTERP (range))
611 val = CHAR_TABLE_REF (char_table, XFASTINT (range)); 611 val = CHAR_TABLE_REF (char_table, XFIXNAT (range));
612 else if (CONSP (range)) 612 else if (CONSP (range))
613 { 613 {
614 int from, to; 614 int from, to;
615 615
616 CHECK_CHARACTER_CAR (range); 616 CHECK_CHARACTER_CAR (range);
617 CHECK_CHARACTER_CDR (range); 617 CHECK_CHARACTER_CDR (range);
618 from = XFASTINT (XCAR (range)); 618 from = XFIXNAT (XCAR (range));
619 to = XFASTINT (XCDR (range)); 619 to = XFIXNAT (XCDR (range));
620 val = char_table_ref_and_range (char_table, from, &from, &to); 620 val = char_table_ref_and_range (char_table, from, &from, &to);
621 /* Not yet implemented. */ 621 /* Not yet implemented. */
622 } 622 }
@@ -645,13 +645,13 @@ or a character code. Return VALUE. */)
645 else if (EQ (range, Qnil)) 645 else if (EQ (range, Qnil))
646 set_char_table_defalt (char_table, value); 646 set_char_table_defalt (char_table, value);
647 else if (CHARACTERP (range)) 647 else if (CHARACTERP (range))
648 char_table_set (char_table, XINT (range), value); 648 char_table_set (char_table, XFIXNUM (range), value);
649 else if (CONSP (range)) 649 else if (CONSP (range))
650 { 650 {
651 CHECK_CHARACTER_CAR (range); 651 CHECK_CHARACTER_CAR (range);
652 CHECK_CHARACTER_CDR (range); 652 CHECK_CHARACTER_CDR (range);
653 char_table_set_range (char_table, 653 char_table_set_range (char_table,
654 XINT (XCAR (range)), XINT (XCDR (range)), value); 654 XFIXNUM (XCAR (range)), XFIXNUM (XCDR (range)), value);
655 } 655 }
656 else 656 else
657 error ("Invalid RANGE argument to `set-char-table-range'"); 657 error ("Invalid RANGE argument to `set-char-table-range'");
@@ -742,7 +742,7 @@ map_sub_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
742 int min_char, max_char; 742 int min_char, max_char;
743 /* Number of characters covered by one element of TABLE. */ 743 /* Number of characters covered by one element of TABLE. */
744 int chars_in_block; 744 int chars_in_block;
745 int from = XINT (XCAR (range)), to = XINT (XCDR (range)); 745 int from = XFIXNUM (XCAR (range)), to = XFIXNUM (XCDR (range));
746 int i, c; 746 int i, c;
747 bool is_uniprop = UNIPROP_TABLE_P (top); 747 bool is_uniprop = UNIPROP_TABLE_P (top);
748 uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top); 748 uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top);
@@ -878,7 +878,7 @@ map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
878 while (NILP (val) && ! NILP (XCHAR_TABLE (table)->parent)) 878 while (NILP (val) && ! NILP (XCHAR_TABLE (table)->parent))
879 { 879 {
880 Lisp_Object temp; 880 Lisp_Object temp;
881 int from = XINT (XCAR (range)); 881 int from = XFIXNUM (XCAR (range));
882 882
883 parent = XCHAR_TABLE (table)->parent; 883 parent = XCHAR_TABLE (table)->parent;
884 temp = XCHAR_TABLE (parent)->parent; 884 temp = XCHAR_TABLE (parent)->parent;
@@ -1174,8 +1174,8 @@ uniprop_decode_value_run_length (Lisp_Object table, Lisp_Object value)
1174 { 1174 {
1175 Lisp_Object valvec = XCHAR_TABLE (table)->extras[4]; 1175 Lisp_Object valvec = XCHAR_TABLE (table)->extras[4];
1176 1176
1177 if (XINT (value) >= 0 && XINT (value) < ASIZE (valvec)) 1177 if (XFIXNUM (value) >= 0 && XFIXNUM (value) < ASIZE (valvec))
1178 value = AREF (valvec, XINT (value)); 1178 value = AREF (valvec, XFIXNUM (value));
1179 } 1179 }
1180 return value; 1180 return value;
1181} 1181}
@@ -1194,7 +1194,7 @@ uniprop_get_decoder (Lisp_Object table)
1194 1194
1195 if (! FIXNUMP (XCHAR_TABLE (table)->extras[1])) 1195 if (! FIXNUMP (XCHAR_TABLE (table)->extras[1]))
1196 return NULL; 1196 return NULL;
1197 i = XINT (XCHAR_TABLE (table)->extras[1]); 1197 i = XFIXNUM (XCHAR_TABLE (table)->extras[1]);
1198 if (i < 0 || i >= uniprop_decoder_count) 1198 if (i < 0 || i >= uniprop_decoder_count)
1199 return NULL; 1199 return NULL;
1200 return uniprop_decoder[i]; 1200 return uniprop_decoder[i];
@@ -1269,7 +1269,7 @@ uniprop_get_encoder (Lisp_Object table)
1269 1269
1270 if (! FIXNUMP (XCHAR_TABLE (table)->extras[2])) 1270 if (! FIXNUMP (XCHAR_TABLE (table)->extras[2]))
1271 return NULL; 1271 return NULL;
1272 i = XINT (XCHAR_TABLE (table)->extras[2]); 1272 i = XFIXNUM (XCHAR_TABLE (table)->extras[2]);
1273 if (i < 0 || i >= uniprop_encoder_count) 1273 if (i < 0 || i >= uniprop_encoder_count)
1274 return NULL; 1274 return NULL;
1275 return uniprop_encoder[i]; 1275 return uniprop_encoder[i];
@@ -1301,7 +1301,7 @@ uniprop_table (Lisp_Object prop)
1301 return Qnil; 1301 return Qnil;
1302 val = XCHAR_TABLE (table)->extras[1]; 1302 val = XCHAR_TABLE (table)->extras[1];
1303 if (FIXNUMP (val) 1303 if (FIXNUMP (val)
1304 ? (XINT (val) < 0 || XINT (val) >= uniprop_decoder_count) 1304 ? (XFIXNUM (val) < 0 || XFIXNUM (val) >= uniprop_decoder_count)
1305 : ! NILP (val)) 1305 : ! NILP (val))
1306 return Qnil; 1306 return Qnil;
1307 /* Prepare ASCII values in advance for CHAR_TABLE_REF. */ 1307 /* Prepare ASCII values in advance for CHAR_TABLE_REF. */
@@ -1337,7 +1337,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
1337 CHECK_CHARACTER (ch); 1337 CHECK_CHARACTER (ch);
1338 if (! UNIPROP_TABLE_P (char_table)) 1338 if (! UNIPROP_TABLE_P (char_table))
1339 error ("Invalid Unicode property table"); 1339 error ("Invalid Unicode property table");
1340 val = CHAR_TABLE_REF (char_table, XINT (ch)); 1340 val = CHAR_TABLE_REF (char_table, XFIXNUM (ch));
1341 decoder = uniprop_get_decoder (char_table); 1341 decoder = uniprop_get_decoder (char_table);
1342 return (decoder ? decoder (char_table, val) : val); 1342 return (decoder ? decoder (char_table, val) : val);
1343} 1343}
@@ -1357,7 +1357,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
1357 encoder = uniprop_get_encoder (char_table); 1357 encoder = uniprop_get_encoder (char_table);
1358 if (encoder) 1358 if (encoder)
1359 value = encoder (char_table, value); 1359 value = encoder (char_table, value);
1360 CHAR_TABLE_SET (char_table, XINT (ch), value); 1360 CHAR_TABLE_SET (char_table, XFIXNUM (ch), value);
1361 return Qnil; 1361 return Qnil;
1362} 1362}
1363 1363
diff --git a/src/cmds.c b/src/cmds.c
index 857197cf9b1..1616efbb446 100644
--- a/src/cmds.c
+++ b/src/cmds.c
@@ -37,7 +37,7 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
37{ 37{
38 CHECK_FIXNUM (n); 38 CHECK_FIXNUM (n);
39 39
40 return make_fixnum (PT + XINT (n)); 40 return make_fixnum (PT + XFIXNUM (n));
41} 41}
42 42
43/* Add N to point; or subtract N if FORWARD is false. N defaults to 1. 43/* Add N to point; or subtract N if FORWARD is false. N defaults to 1.
@@ -45,7 +45,7 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
45static Lisp_Object 45static Lisp_Object
46move_point (Lisp_Object n, bool forward) 46move_point (Lisp_Object n, bool forward)
47{ 47{
48 /* This used to just set point to point + XINT (n), and then check 48 /* This used to just set point to point + XFIXNUM (n), and then check
49 to see if it was within boundaries. But now that SET_PT can 49 to see if it was within boundaries. But now that SET_PT can
50 potentially do a lot of stuff (calling entering and exiting 50 potentially do a lot of stuff (calling entering and exiting
51 hooks, etcetera), that's not a good approach. So we validate the 51 hooks, etcetera), that's not a good approach. So we validate the
@@ -58,7 +58,7 @@ move_point (Lisp_Object n, bool forward)
58 else 58 else
59 CHECK_FIXNUM (n); 59 CHECK_FIXNUM (n);
60 60
61 new_point = PT + (forward ? XINT (n) : - XINT (n)); 61 new_point = PT + (forward ? XFIXNUM (n) : - XFIXNUM (n));
62 62
63 if (new_point < BEGV) 63 if (new_point < BEGV)
64 { 64 {
@@ -128,7 +128,7 @@ go to its beginning. */)
128 else 128 else
129 { 129 {
130 CHECK_FIXNUM (n); 130 CHECK_FIXNUM (n);
131 count = XINT (n); 131 count = XFIXNUM (n);
132 } 132 }
133 133
134 shortage = scan_newline_from_point (count, &pos, &pos_byte); 134 shortage = scan_newline_from_point (count, &pos, &pos_byte);
@@ -164,7 +164,7 @@ instead. For instance, `(forward-line 0)' does the same thing as
164 else 164 else
165 CHECK_FIXNUM (n); 165 CHECK_FIXNUM (n);
166 166
167 SET_PT (XINT (Fline_beginning_position (n))); 167 SET_PT (XFIXNUM (Fline_beginning_position (n)));
168 168
169 return Qnil; 169 return Qnil;
170} 170}
@@ -191,7 +191,7 @@ to t. */)
191 191
192 while (1) 192 while (1)
193 { 193 {
194 newpos = XINT (Fline_end_position (n)); 194 newpos = XFIXNUM (Fline_end_position (n));
195 SET_PT (newpos); 195 SET_PT (newpos);
196 196
197 if (PT > newpos 197 if (PT > newpos
@@ -232,13 +232,13 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */)
232 232
233 CHECK_FIXNUM (n); 233 CHECK_FIXNUM (n);
234 234
235 if (eabs (XINT (n)) < 2) 235 if (eabs (XFIXNUM (n)) < 2)
236 call0 (Qundo_auto_amalgamate); 236 call0 (Qundo_auto_amalgamate);
237 237
238 pos = PT + XINT (n); 238 pos = PT + XFIXNUM (n);
239 if (NILP (killflag)) 239 if (NILP (killflag))
240 { 240 {
241 if (XINT (n) < 0) 241 if (XFIXNUM (n) < 0)
242 { 242 {
243 if (pos < BEGV) 243 if (pos < BEGV)
244 xsignal0 (Qbeginning_of_buffer); 244 xsignal0 (Qbeginning_of_buffer);
@@ -276,10 +276,10 @@ a non-nil value for the inserted character. At the end, it runs
276{ 276{
277 CHECK_FIXNUM (n); 277 CHECK_FIXNUM (n);
278 278
279 if (XINT (n) < 0) 279 if (XFIXNUM (n) < 0)
280 error ("Negative repetition argument %"pI"d", XINT (n)); 280 error ("Negative repetition argument %"pI"d", XFIXNUM (n));
281 281
282 if (XFASTINT (n) < 2) 282 if (XFIXNAT (n) < 2)
283 call0 (Qundo_auto_amalgamate); 283 call0 (Qundo_auto_amalgamate);
284 284
285 /* Barf if the key that invoked this was not a character. */ 285 /* Barf if the key that invoked this was not a character. */
@@ -287,8 +287,8 @@ a non-nil value for the inserted character. At the end, it runs
287 bitch_at_user (); 287 bitch_at_user ();
288 else { 288 else {
289 int character = translate_char (Vtranslation_table_for_input, 289 int character = translate_char (Vtranslation_table_for_input,
290 XINT (last_command_event)); 290 XFIXNUM (last_command_event));
291 int val = internal_self_insert (character, XFASTINT (n)); 291 int val = internal_self_insert (character, XFIXNAT (n));
292 if (val == 2) 292 if (val == 2)
293 Fset (Qundo_auto__this_command_amalgamating, Qnil); 293 Fset (Qundo_auto__this_command_amalgamating, Qnil);
294 frame_make_pointer_invisible (SELECTED_FRAME ()); 294 frame_make_pointer_invisible (SELECTED_FRAME ());
@@ -360,7 +360,7 @@ internal_self_insert (int c, EMACS_INT n)
360 if (EQ (overwrite, Qoverwrite_mode_binary)) 360 if (EQ (overwrite, Qoverwrite_mode_binary))
361 chars_to_delete = min (n, PTRDIFF_MAX); 361 chars_to_delete = min (n, PTRDIFF_MAX);
362 else if (c != '\n' && c2 != '\n' 362 else if (c != '\n' && c2 != '\n'
363 && (cwidth = XFASTINT (Fchar_width (make_fixnum (c)))) != 0) 363 && (cwidth = XFIXNAT (Fchar_width (make_fixnum (c)))) != 0)
364 { 364 {
365 ptrdiff_t pos = PT; 365 ptrdiff_t pos = PT;
366 ptrdiff_t pos_byte = PT_BYTE; 366 ptrdiff_t pos_byte = PT_BYTE;
@@ -378,7 +378,7 @@ internal_self_insert (int c, EMACS_INT n)
378 character. In that case, the new point is set after 378 character. In that case, the new point is set after
379 that character. */ 379 that character. */
380 ptrdiff_t actual_clm 380 ptrdiff_t actual_clm
381 = XFASTINT (Fmove_to_column (make_fixnum (target_clm), Qnil)); 381 = XFIXNAT (Fmove_to_column (make_fixnum (target_clm), Qnil));
382 382
383 chars_to_delete = PT - pos; 383 chars_to_delete = PT - pos;
384 384
@@ -408,8 +408,8 @@ internal_self_insert (int c, EMACS_INT n)
408 && NILP (BVAR (current_buffer, read_only)) 408 && NILP (BVAR (current_buffer, read_only))
409 && PT > BEGV 409 && PT > BEGV
410 && (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters)) 410 && (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters))
411 ? XFASTINT (Fprevious_char ()) 411 ? XFIXNAT (Fprevious_char ())
412 : UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ()))) 412 : UNIBYTE_TO_CHAR (XFIXNAT (Fprevious_char ())))
413 == Sword)) 413 == Sword))
414 { 414 {
415 EMACS_INT modiff = MODIFF; 415 EMACS_INT modiff = MODIFF;
diff --git a/src/coding.c b/src/coding.c
index a4bb45f350c..53e98f89811 100644
--- a/src/coding.c
+++ b/src/coding.c
@@ -324,7 +324,7 @@ static Lisp_Object Vbig5_coding_system;
324/* ISO2022 section */ 324/* ISO2022 section */
325 325
326#define CODING_ISO_INITIAL(coding, reg) \ 326#define CODING_ISO_INITIAL(coding, reg) \
327 (XINT (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \ 327 (XFIXNUM (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \
328 coding_attr_iso_initial), \ 328 coding_attr_iso_initial), \
329 reg))) 329 reg)))
330 330
@@ -2888,7 +2888,7 @@ setup_iso_safe_charsets (Lisp_Object attrs)
2888 Lisp_Object reg_usage; 2888 Lisp_Object reg_usage;
2889 Lisp_Object tail; 2889 Lisp_Object tail;
2890 EMACS_INT reg94, reg96; 2890 EMACS_INT reg94, reg96;
2891 int flags = XINT (AREF (attrs, coding_attr_iso_flags)); 2891 int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
2892 int max_charset_id; 2892 int max_charset_id;
2893 2893
2894 charset_list = CODING_ATTR_CHARSET_LIST (attrs); 2894 charset_list = CODING_ATTR_CHARSET_LIST (attrs);
@@ -2906,7 +2906,7 @@ setup_iso_safe_charsets (Lisp_Object attrs)
2906 max_charset_id = 0; 2906 max_charset_id = 0;
2907 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 2907 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
2908 { 2908 {
2909 int id = XINT (XCAR (tail)); 2909 int id = XFIXNUM (XCAR (tail));
2910 if (max_charset_id < id) 2910 if (max_charset_id < id)
2911 max_charset_id = id; 2911 max_charset_id = id;
2912 } 2912 }
@@ -2915,8 +2915,8 @@ setup_iso_safe_charsets (Lisp_Object attrs)
2915 memset (SDATA (safe_charsets), 255, max_charset_id + 1); 2915 memset (SDATA (safe_charsets), 255, max_charset_id + 1);
2916 request = AREF (attrs, coding_attr_iso_request); 2916 request = AREF (attrs, coding_attr_iso_request);
2917 reg_usage = AREF (attrs, coding_attr_iso_usage); 2917 reg_usage = AREF (attrs, coding_attr_iso_usage);
2918 reg94 = XINT (XCAR (reg_usage)); 2918 reg94 = XFIXNUM (XCAR (reg_usage));
2919 reg96 = XINT (XCDR (reg_usage)); 2919 reg96 = XFIXNUM (XCDR (reg_usage));
2920 2920
2921 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 2921 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
2922 { 2922 {
@@ -2925,19 +2925,19 @@ setup_iso_safe_charsets (Lisp_Object attrs)
2925 struct charset *charset; 2925 struct charset *charset;
2926 2926
2927 id = XCAR (tail); 2927 id = XCAR (tail);
2928 charset = CHARSET_FROM_ID (XINT (id)); 2928 charset = CHARSET_FROM_ID (XFIXNUM (id));
2929 reg = Fcdr (Fassq (id, request)); 2929 reg = Fcdr (Fassq (id, request));
2930 if (! NILP (reg)) 2930 if (! NILP (reg))
2931 SSET (safe_charsets, XINT (id), XINT (reg)); 2931 SSET (safe_charsets, XFIXNUM (id), XFIXNUM (reg));
2932 else if (charset->iso_chars_96) 2932 else if (charset->iso_chars_96)
2933 { 2933 {
2934 if (reg96 < 4) 2934 if (reg96 < 4)
2935 SSET (safe_charsets, XINT (id), reg96); 2935 SSET (safe_charsets, XFIXNUM (id), reg96);
2936 } 2936 }
2937 else 2937 else
2938 { 2938 {
2939 if (reg94 < 4) 2939 if (reg94 < 4)
2940 SSET (safe_charsets, XINT (id), reg94); 2940 SSET (safe_charsets, XFIXNUM (id), reg94);
2941 } 2941 }
2942 } 2942 }
2943 ASET (attrs, coding_attr_safe_charsets, safe_charsets); 2943 ASET (attrs, coding_attr_safe_charsets, safe_charsets);
@@ -4612,7 +4612,7 @@ detect_coding_sjis (struct coding_system *coding,
4612 4612
4613 CODING_GET_INFO (coding, attrs, charset_list); 4613 CODING_GET_INFO (coding, attrs, charset_list);
4614 max_first_byte_of_2_byte_code 4614 max_first_byte_of_2_byte_code
4615 = (XINT (Flength (charset_list)) > 3 ? 0xFC : 0xEF); 4615 = (XFIXNUM (Flength (charset_list)) > 3 ? 0xFC : 0xEF);
4616 4616
4617 detect_info->checked |= CATEGORY_MASK_SJIS; 4617 detect_info->checked |= CATEGORY_MASK_SJIS;
4618 /* A coding system of this category is always ASCII compatible. */ 4618 /* A coding system of this category is always ASCII compatible. */
@@ -4725,10 +4725,10 @@ decode_coding_sjis (struct coding_system *coding)
4725 CODING_GET_INFO (coding, attrs, charset_list); 4725 CODING_GET_INFO (coding, attrs, charset_list);
4726 4726
4727 val = charset_list; 4727 val = charset_list;
4728 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4728 charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4729 charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4729 charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4730 charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4730 charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4731 charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XINT (XCAR (val))); 4731 charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
4732 4732
4733 while (1) 4733 while (1)
4734 { 4734 {
@@ -4840,8 +4840,8 @@ decode_coding_big5 (struct coding_system *coding)
4840 4840
4841 CODING_GET_INFO (coding, attrs, charset_list); 4841 CODING_GET_INFO (coding, attrs, charset_list);
4842 val = charset_list; 4842 val = charset_list;
4843 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4843 charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4844 charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val))); 4844 charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
4845 4845
4846 while (1) 4846 while (1)
4847 { 4847 {
@@ -4936,9 +4936,9 @@ encode_coding_sjis (struct coding_system *coding)
4936 4936
4937 CODING_GET_INFO (coding, attrs, charset_list); 4937 CODING_GET_INFO (coding, attrs, charset_list);
4938 val = XCDR (charset_list); 4938 val = XCDR (charset_list);
4939 charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4939 charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4940 charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 4940 charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
4941 charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XINT (XCAR (val))); 4941 charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
4942 4942
4943 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)); 4943 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs));
4944 4944
@@ -5029,7 +5029,7 @@ encode_coding_big5 (struct coding_system *coding)
5029 5029
5030 CODING_GET_INFO (coding, attrs, charset_list); 5030 CODING_GET_INFO (coding, attrs, charset_list);
5031 val = XCDR (charset_list); 5031 val = XCDR (charset_list);
5032 charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val))); 5032 charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
5033 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs)); 5033 ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs));
5034 5034
5035 while (charbuf < charbuf_end) 5035 while (charbuf < charbuf_end)
@@ -5442,7 +5442,7 @@ detect_coding_charset (struct coding_system *coding,
5442 } 5442 }
5443 if (FIXNUMP (val)) 5443 if (FIXNUMP (val))
5444 { 5444 {
5445 charset = CHARSET_FROM_ID (XFASTINT (val)); 5445 charset = CHARSET_FROM_ID (XFIXNAT (val));
5446 dim = CHARSET_DIMENSION (charset); 5446 dim = CHARSET_DIMENSION (charset);
5447 for (idx = 1; idx < dim; idx++) 5447 for (idx = 1; idx < dim; idx++)
5448 { 5448 {
@@ -5461,7 +5461,7 @@ detect_coding_charset (struct coding_system *coding,
5461 idx = 1; 5461 idx = 1;
5462 for (; CONSP (val); val = XCDR (val)) 5462 for (; CONSP (val); val = XCDR (val))
5463 { 5463 {
5464 charset = CHARSET_FROM_ID (XFASTINT (XCAR (val))); 5464 charset = CHARSET_FROM_ID (XFIXNAT (XCAR (val)));
5465 dim = CHARSET_DIMENSION (charset); 5465 dim = CHARSET_DIMENSION (charset);
5466 while (idx < dim) 5466 while (idx < dim)
5467 { 5467 {
@@ -5555,7 +5555,7 @@ decode_coding_charset (struct coding_system *coding)
5555 goto invalid_code; 5555 goto invalid_code;
5556 if (FIXNUMP (val)) 5556 if (FIXNUMP (val))
5557 { 5557 {
5558 charset = CHARSET_FROM_ID (XFASTINT (val)); 5558 charset = CHARSET_FROM_ID (XFIXNAT (val));
5559 dim = CHARSET_DIMENSION (charset); 5559 dim = CHARSET_DIMENSION (charset);
5560 while (len < dim) 5560 while (len < dim)
5561 { 5561 {
@@ -5573,7 +5573,7 @@ decode_coding_charset (struct coding_system *coding)
5573 comes first). */ 5573 comes first). */
5574 while (CONSP (val)) 5574 while (CONSP (val))
5575 { 5575 {
5576 charset = CHARSET_FROM_ID (XFASTINT (XCAR (val))); 5576 charset = CHARSET_FROM_ID (XFIXNAT (XCAR (val)));
5577 dim = CHARSET_DIMENSION (charset); 5577 dim = CHARSET_DIMENSION (charset);
5578 while (len < dim) 5578 while (len < dim)
5579 { 5579 {
@@ -5726,7 +5726,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
5726 val = CODING_ATTR_SAFE_CHARSETS (attrs); 5726 val = CODING_ATTR_SAFE_CHARSETS (attrs);
5727 coding->max_charset_id = SCHARS (val) - 1; 5727 coding->max_charset_id = SCHARS (val) - 1;
5728 coding->safe_charsets = SDATA (val); 5728 coding->safe_charsets = SDATA (val);
5729 coding->default_char = XINT (CODING_ATTR_DEFAULT_CHAR (attrs)); 5729 coding->default_char = XFIXNUM (CODING_ATTR_DEFAULT_CHAR (attrs));
5730 coding->carryover_bytes = 0; 5730 coding->carryover_bytes = 0;
5731 coding->raw_destination = 0; 5731 coding->raw_destination = 0;
5732 5732
@@ -5749,7 +5749,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
5749 else if (EQ (coding_type, Qiso_2022)) 5749 else if (EQ (coding_type, Qiso_2022))
5750 { 5750 {
5751 int i; 5751 int i;
5752 int flags = XINT (AREF (attrs, coding_attr_iso_flags)); 5752 int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
5753 5753
5754 /* Invoke graphic register 0 to plane 0. */ 5754 /* Invoke graphic register 0 to plane 0. */
5755 CODING_ISO_INVOCATION (coding, 0) = 0; 5755 CODING_ISO_INVOCATION (coding, 0) = 0;
@@ -5852,13 +5852,13 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
5852 5852
5853 for (tail = Vemacs_mule_charset_list; CONSP (tail); 5853 for (tail = Vemacs_mule_charset_list; CONSP (tail);
5854 tail = XCDR (tail)) 5854 tail = XCDR (tail))
5855 if (max_charset_id < XFASTINT (XCAR (tail))) 5855 if (max_charset_id < XFIXNAT (XCAR (tail)))
5856 max_charset_id = XFASTINT (XCAR (tail)); 5856 max_charset_id = XFIXNAT (XCAR (tail));
5857 safe_charsets = make_uninit_string (max_charset_id + 1); 5857 safe_charsets = make_uninit_string (max_charset_id + 1);
5858 memset (SDATA (safe_charsets), 255, max_charset_id + 1); 5858 memset (SDATA (safe_charsets), 255, max_charset_id + 1);
5859 for (tail = Vemacs_mule_charset_list; CONSP (tail); 5859 for (tail = Vemacs_mule_charset_list; CONSP (tail);
5860 tail = XCDR (tail)) 5860 tail = XCDR (tail))
5861 SSET (safe_charsets, XFASTINT (XCAR (tail)), 0); 5861 SSET (safe_charsets, XFIXNAT (XCAR (tail)), 0);
5862 coding->max_charset_id = max_charset_id; 5862 coding->max_charset_id = max_charset_id;
5863 coding->safe_charsets = SDATA (safe_charsets); 5863 coding->safe_charsets = SDATA (safe_charsets);
5864 } 5864 }
@@ -5908,7 +5908,7 @@ coding_charset_list (struct coding_system *coding)
5908 CODING_GET_INFO (coding, attrs, charset_list); 5908 CODING_GET_INFO (coding, attrs, charset_list);
5909 if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022)) 5909 if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022))
5910 { 5910 {
5911 int flags = XINT (AREF (attrs, coding_attr_iso_flags)); 5911 int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
5912 5912
5913 if (flags & CODING_ISO_FLAG_FULL_SUPPORT) 5913 if (flags & CODING_ISO_FLAG_FULL_SUPPORT)
5914 charset_list = Viso_2022_charset_list; 5914 charset_list = Viso_2022_charset_list;
@@ -5934,7 +5934,7 @@ coding_system_charset_list (Lisp_Object coding_system)
5934 5934
5935 if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022)) 5935 if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022))
5936 { 5936 {
5937 int flags = XINT (AREF (attrs, coding_attr_iso_flags)); 5937 int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
5938 5938
5939 if (flags & CODING_ISO_FLAG_FULL_SUPPORT) 5939 if (flags & CODING_ISO_FLAG_FULL_SUPPORT)
5940 charset_list = Viso_2022_charset_list; 5940 charset_list = Viso_2022_charset_list;
@@ -6714,7 +6714,7 @@ detect_coding (struct coding_system *coding)
6714 } 6714 }
6715 } 6715 }
6716 } 6716 }
6717 else if (XINT (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id))) 6717 else if (XFIXNUM (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
6718 == coding_category_utf_8_auto) 6718 == coding_category_utf_8_auto)
6719 { 6719 {
6720 Lisp_Object coding_systems; 6720 Lisp_Object coding_systems;
@@ -6740,7 +6740,7 @@ detect_coding (struct coding_system *coding)
6740 } 6740 }
6741 } 6741 }
6742 } 6742 }
6743 else if (XINT (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id))) 6743 else if (XFIXNUM (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
6744 == coding_category_utf_16_auto) 6744 == coding_category_utf_16_auto)
6745 { 6745 {
6746 Lisp_Object coding_systems; 6746 Lisp_Object coding_systems;
@@ -6924,8 +6924,8 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
6924 && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (translation_table)) > 1) 6924 && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (translation_table)) > 1)
6925 { 6925 {
6926 val = XCHAR_TABLE (translation_table)->extras[1]; 6926 val = XCHAR_TABLE (translation_table)->extras[1];
6927 if (FIXNATP (val) && *max_lookup < XFASTINT (val)) 6927 if (FIXNATP (val) && *max_lookup < XFIXNAT (val))
6928 *max_lookup = min (XFASTINT (val), MAX_LOOKUP_MAX); 6928 *max_lookup = min (XFIXNAT (val), MAX_LOOKUP_MAX);
6929 } 6929 }
6930 else if (CONSP (translation_table)) 6930 else if (CONSP (translation_table))
6931 { 6931 {
@@ -6936,8 +6936,8 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
6936 && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1) 6936 && CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1)
6937 { 6937 {
6938 Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1]; 6938 Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1];
6939 if (FIXNATP (tailval) && *max_lookup < XFASTINT (tailval)) 6939 if (FIXNATP (tailval) && *max_lookup < XFIXNAT (tailval))
6940 *max_lookup = min (XFASTINT (tailval), MAX_LOOKUP_MAX); 6940 *max_lookup = min (XFIXNAT (tailval), MAX_LOOKUP_MAX);
6941 } 6941 }
6942 } 6942 }
6943 } 6943 }
@@ -6951,7 +6951,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
6951 { \ 6951 { \
6952 trans = CHAR_TABLE_REF (table, c); \ 6952 trans = CHAR_TABLE_REF (table, c); \
6953 if (CHARACTERP (trans)) \ 6953 if (CHARACTERP (trans)) \
6954 c = XFASTINT (trans), trans = Qnil; \ 6954 c = XFIXNAT (trans), trans = Qnil; \
6955 } \ 6955 } \
6956 else if (CONSP (table)) \ 6956 else if (CONSP (table)) \
6957 { \ 6957 { \
@@ -6962,7 +6962,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
6962 { \ 6962 { \
6963 trans = CHAR_TABLE_REF (XCAR (tail), c); \ 6963 trans = CHAR_TABLE_REF (XCAR (tail), c); \
6964 if (CHARACTERP (trans)) \ 6964 if (CHARACTERP (trans)) \
6965 c = XFASTINT (trans), trans = Qnil; \ 6965 c = XFIXNAT (trans), trans = Qnil; \
6966 else if (! NILP (trans)) \ 6966 else if (! NILP (trans)) \
6967 break; \ 6967 break; \
6968 } \ 6968 } \
@@ -6997,7 +6997,7 @@ get_translation (Lisp_Object trans, int *buf, int *buf_end, ptrdiff_t *nchars)
6997 { 6997 {
6998 if (buf + i == buf_end) 6998 if (buf + i == buf_end)
6999 return Qt; 6999 return Qt;
7000 if (XINT (AREF (from, i)) != buf[i]) 7000 if (XFIXNUM (AREF (from, i)) != buf[i])
7001 break; 7001 break;
7002 } 7002 }
7003 if (i == len) 7003 if (i == len)
@@ -7049,11 +7049,11 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
7049 { 7049 {
7050 trans = get_translation (trans, buf, buf_end, &from_nchars); 7050 trans = get_translation (trans, buf, buf_end, &from_nchars);
7051 if (FIXNUMP (trans)) 7051 if (FIXNUMP (trans))
7052 c = XINT (trans); 7052 c = XFIXNUM (trans);
7053 else if (VECTORP (trans)) 7053 else if (VECTORP (trans))
7054 { 7054 {
7055 to_nchars = ASIZE (trans); 7055 to_nchars = ASIZE (trans);
7056 c = XINT (AREF (trans, 0)); 7056 c = XFIXNUM (AREF (trans, 0));
7057 } 7057 }
7058 else if (EQ (trans, Qt) && ! last_block) 7058 else if (EQ (trans, Qt) && ! last_block)
7059 break; 7059 break;
@@ -7081,7 +7081,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
7081 for (i = 0; i < to_nchars; i++) 7081 for (i = 0; i < to_nchars; i++)
7082 { 7082 {
7083 if (i > 0) 7083 if (i > 0)
7084 c = XINT (AREF (trans, i)); 7084 c = XFIXNUM (AREF (trans, i));
7085 if (coding->dst_multibyte 7085 if (coding->dst_multibyte
7086 || ! CHAR_BYTE8_P (c)) 7086 || ! CHAR_BYTE8_P (c))
7087 CHAR_STRING_ADVANCE_NO_UNIFY (c, dst); 7087 CHAR_STRING_ADVANCE_NO_UNIFY (c, dst);
@@ -7534,7 +7534,7 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit,
7534 { 7534 {
7535 len = ASIZE (components); 7535 len = ASIZE (components);
7536 for (i = 0; i < len; i++) 7536 for (i = 0; i < len; i++)
7537 *buf++ = XINT (AREF (components, i)); 7537 *buf++ = XFIXNUM (AREF (components, i));
7538 } 7538 }
7539 else if (STRINGP (components)) 7539 else if (STRINGP (components))
7540 { 7540 {
@@ -7549,13 +7549,13 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit,
7549 else if (FIXNUMP (components)) 7549 else if (FIXNUMP (components))
7550 { 7550 {
7551 len = 1; 7551 len = 1;
7552 *buf++ = XINT (components); 7552 *buf++ = XFIXNUM (components);
7553 } 7553 }
7554 else if (CONSP (components)) 7554 else if (CONSP (components))
7555 { 7555 {
7556 for (len = 0; CONSP (components); 7556 for (len = 0; CONSP (components);
7557 len++, components = XCDR (components)) 7557 len++, components = XCDR (components))
7558 *buf++ = XINT (XCAR (components)); 7558 *buf++ = XFIXNUM (XCAR (components));
7559 } 7559 }
7560 else 7560 else
7561 emacs_abort (); 7561 emacs_abort ();
@@ -7593,14 +7593,14 @@ handle_charset_annotation (ptrdiff_t pos, ptrdiff_t limit,
7593 7593
7594 val = Fget_text_property (make_fixnum (pos), Qcharset, coding->src_object); 7594 val = Fget_text_property (make_fixnum (pos), Qcharset, coding->src_object);
7595 if (! NILP (val) && CHARSETP (val)) 7595 if (! NILP (val) && CHARSETP (val))
7596 id = XINT (CHARSET_SYMBOL_ID (val)); 7596 id = XFIXNUM (CHARSET_SYMBOL_ID (val));
7597 else 7597 else
7598 id = -1; 7598 id = -1;
7599 ADD_CHARSET_DATA (buf, 0, id); 7599 ADD_CHARSET_DATA (buf, 0, id);
7600 next = Fnext_single_property_change (make_fixnum (pos), Qcharset, 7600 next = Fnext_single_property_change (make_fixnum (pos), Qcharset,
7601 coding->src_object, 7601 coding->src_object,
7602 make_fixnum (limit)); 7602 make_fixnum (limit));
7603 *stop = XINT (next); 7603 *stop = XFIXNUM (next);
7604 return buf; 7604 return buf;
7605} 7605}
7606 7606
@@ -7710,19 +7710,19 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table,
7710 trans = get_translation (trans, lookup_buf, lookup_buf_end, 7710 trans = get_translation (trans, lookup_buf, lookup_buf_end,
7711 &from_nchars); 7711 &from_nchars);
7712 if (FIXNUMP (trans)) 7712 if (FIXNUMP (trans))
7713 c = XINT (trans); 7713 c = XFIXNUM (trans);
7714 else if (VECTORP (trans)) 7714 else if (VECTORP (trans))
7715 { 7715 {
7716 to_nchars = ASIZE (trans); 7716 to_nchars = ASIZE (trans);
7717 if (buf_end - buf < to_nchars) 7717 if (buf_end - buf < to_nchars)
7718 break; 7718 break;
7719 c = XINT (AREF (trans, 0)); 7719 c = XFIXNUM (AREF (trans, 0));
7720 } 7720 }
7721 else 7721 else
7722 break; 7722 break;
7723 *buf++ = c; 7723 *buf++ = c;
7724 for (i = 1; i < to_nchars; i++) 7724 for (i = 1; i < to_nchars; i++)
7725 *buf++ = XINT (AREF (trans, i)); 7725 *buf++ = XFIXNUM (AREF (trans, i));
7726 for (i = 1; i < from_nchars; i++, pos++) 7726 for (i = 1; i < from_nchars; i++, pos++)
7727 src += MULTIBYTE_LENGTH_NO_CHECK (src); 7727 src += MULTIBYTE_LENGTH_NO_CHECK (src);
7728 } 7728 }
@@ -8618,7 +8618,7 @@ detect_coding_system (const unsigned char *src,
8618 detect_info.checked = detect_info.found = detect_info.rejected = 0; 8618 detect_info.checked = detect_info.found = detect_info.rejected = 0;
8619 8619
8620 /* At first, detect text-format if necessary. */ 8620 /* At first, detect text-format if necessary. */
8621 base_category = XINT (CODING_ATTR_CATEGORY (attrs)); 8621 base_category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
8622 if (base_category == coding_category_undecided) 8622 if (base_category == coding_category_undecided)
8623 { 8623 {
8624 enum coding_category category UNINIT; 8624 enum coding_category category UNINIT;
@@ -8826,7 +8826,7 @@ detect_coding_system (const unsigned char *src,
8826 } 8826 }
8827 else 8827 else
8828 { 8828 {
8829 detect_info.found = 1 << XINT (CODING_ATTR_CATEGORY (attrs)); 8829 detect_info.found = 1 << XFIXNUM (CODING_ATTR_CATEGORY (attrs));
8830 val = list1 (make_fixnum (coding.id)); 8830 val = list1 (make_fixnum (coding.id));
8831 } 8831 }
8832 8832
@@ -8869,9 +8869,9 @@ detect_coding_system (const unsigned char *src,
8869 enum coding_category category; 8869 enum coding_category category;
8870 int this_eol; 8870 int this_eol;
8871 8871
8872 id = XINT (XCAR (tail)); 8872 id = XFIXNUM (XCAR (tail));
8873 attrs = CODING_ID_ATTRS (id); 8873 attrs = CODING_ID_ATTRS (id);
8874 category = XINT (CODING_ATTR_CATEGORY (attrs)); 8874 category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
8875 eol_type = CODING_ID_EOL_TYPE (id); 8875 eol_type = CODING_ID_EOL_TYPE (id);
8876 if (VECTORP (eol_type)) 8876 if (VECTORP (eol_type))
8877 { 8877 {
@@ -8922,7 +8922,7 @@ highest priority. */)
8922 ptrdiff_t from_byte, to_byte; 8922 ptrdiff_t from_byte, to_byte;
8923 8923
8924 validate_region (&start, &end); 8924 validate_region (&start, &end);
8925 from = XINT (start), to = XINT (end); 8925 from = XFIXNUM (start), to = XFIXNUM (end);
8926 from_byte = CHAR_TO_BYTE (from); 8926 from_byte = CHAR_TO_BYTE (from);
8927 to_byte = CHAR_TO_BYTE (to); 8927 to_byte = CHAR_TO_BYTE (to);
8928 8928
@@ -8975,7 +8975,7 @@ char_encodable_p (int c, Lisp_Object attrs)
8975 for (tail = CODING_ATTR_CHARSET_LIST (attrs); 8975 for (tail = CODING_ATTR_CHARSET_LIST (attrs);
8976 CONSP (tail); tail = XCDR (tail)) 8976 CONSP (tail); tail = XCDR (tail))
8977 { 8977 {
8978 charset = CHARSET_FROM_ID (XINT (XCAR (tail))); 8978 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (tail)));
8979 if (CHAR_CHARSET_P (c, charset)) 8979 if (CHAR_CHARSET_P (c, charset))
8980 break; 8980 break;
8981 } 8981 }
@@ -9013,21 +9013,21 @@ DEFUN ("find-coding-systems-region-internal",
9013 { 9013 {
9014 CHECK_FIXNUM_COERCE_MARKER (start); 9014 CHECK_FIXNUM_COERCE_MARKER (start);
9015 CHECK_FIXNUM_COERCE_MARKER (end); 9015 CHECK_FIXNUM_COERCE_MARKER (end);
9016 if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end)) 9016 if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end))
9017 args_out_of_range (start, end); 9017 args_out_of_range (start, end);
9018 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 9018 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
9019 return Qt; 9019 return Qt;
9020 start_byte = CHAR_TO_BYTE (XINT (start)); 9020 start_byte = CHAR_TO_BYTE (XFIXNUM (start));
9021 end_byte = CHAR_TO_BYTE (XINT (end)); 9021 end_byte = CHAR_TO_BYTE (XFIXNUM (end));
9022 if (XINT (end) - XINT (start) == end_byte - start_byte) 9022 if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte)
9023 return Qt; 9023 return Qt;
9024 9024
9025 if (XINT (start) < GPT && XINT (end) > GPT) 9025 if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
9026 { 9026 {
9027 if ((GPT - XINT (start)) < (XINT (end) - GPT)) 9027 if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT))
9028 move_gap_both (XINT (start), start_byte); 9028 move_gap_both (XFIXNUM (start), start_byte);
9029 else 9029 else
9030 move_gap_both (XINT (end), end_byte); 9030 move_gap_both (XFIXNUM (end), end_byte);
9031 } 9031 }
9032 } 9032 }
9033 9033
@@ -9146,8 +9146,8 @@ to the string and treated as in `substring'. */)
9146 if (NILP (string)) 9146 if (NILP (string))
9147 { 9147 {
9148 validate_region (&start, &end); 9148 validate_region (&start, &end);
9149 from = XINT (start); 9149 from = XFIXNUM (start);
9150 to = XINT (end); 9150 to = XFIXNUM (end);
9151 if (NILP (BVAR (current_buffer, enable_multibyte_characters)) 9151 if (NILP (BVAR (current_buffer, enable_multibyte_characters))
9152 || (ascii_compatible 9152 || (ascii_compatible
9153 && (to - from) == (CHAR_TO_BYTE (to) - (CHAR_TO_BYTE (from))))) 9153 && (to - from) == (CHAR_TO_BYTE (to) - (CHAR_TO_BYTE (from)))))
@@ -9176,7 +9176,7 @@ to the string and treated as in `substring'. */)
9176 else 9176 else
9177 { 9177 {
9178 CHECK_FIXNAT (count); 9178 CHECK_FIXNAT (count);
9179 n = XINT (count); 9179 n = XFIXNUM (count);
9180 } 9180 }
9181 9181
9182 positions = Qnil; 9182 positions = Qnil;
@@ -9267,23 +9267,23 @@ is nil. */)
9267 { 9267 {
9268 CHECK_FIXNUM_COERCE_MARKER (start); 9268 CHECK_FIXNUM_COERCE_MARKER (start);
9269 CHECK_FIXNUM_COERCE_MARKER (end); 9269 CHECK_FIXNUM_COERCE_MARKER (end);
9270 if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end)) 9270 if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end))
9271 args_out_of_range (start, end); 9271 args_out_of_range (start, end);
9272 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 9272 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
9273 return Qnil; 9273 return Qnil;
9274 start_byte = CHAR_TO_BYTE (XINT (start)); 9274 start_byte = CHAR_TO_BYTE (XFIXNUM (start));
9275 end_byte = CHAR_TO_BYTE (XINT (end)); 9275 end_byte = CHAR_TO_BYTE (XFIXNUM (end));
9276 if (XINT (end) - XINT (start) == end_byte - start_byte) 9276 if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte)
9277 return Qnil; 9277 return Qnil;
9278 9278
9279 if (XINT (start) < GPT && XINT (end) > GPT) 9279 if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
9280 { 9280 {
9281 if ((GPT - XINT (start)) < (XINT (end) - GPT)) 9281 if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT))
9282 move_gap_both (XINT (start), start_byte); 9282 move_gap_both (XFIXNUM (start), start_byte);
9283 else 9283 else
9284 move_gap_both (XINT (end), end_byte); 9284 move_gap_both (XFIXNUM (end), end_byte);
9285 } 9285 }
9286 pos = XINT (start); 9286 pos = XFIXNUM (start);
9287 } 9287 }
9288 9288
9289 list = Qnil; 9289 list = Qnil;
@@ -9369,9 +9369,9 @@ code_convert_region (Lisp_Object start, Lisp_Object end,
9369 CHECK_BUFFER (dst_object); 9369 CHECK_BUFFER (dst_object);
9370 9370
9371 validate_region (&start, &end); 9371 validate_region (&start, &end);
9372 from = XFASTINT (start); 9372 from = XFIXNAT (start);
9373 from_byte = CHAR_TO_BYTE (from); 9373 from_byte = CHAR_TO_BYTE (from);
9374 to = XFASTINT (end); 9374 to = XFIXNAT (end);
9375 to_byte = CHAR_TO_BYTE (to); 9375 to_byte = CHAR_TO_BYTE (to);
9376 9376
9377 setup_coding_system (coding_system, &coding); 9377 setup_coding_system (coding_system, &coding);
@@ -9611,7 +9611,7 @@ Return the corresponding character. */)
9611 int c; 9611 int c;
9612 9612
9613 CHECK_FIXNAT (code); 9613 CHECK_FIXNAT (code);
9614 ch = XFASTINT (code); 9614 ch = XFIXNAT (code);
9615 CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec); 9615 CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
9616 attrs = AREF (spec, 0); 9616 attrs = AREF (spec, 0);
9617 9617
@@ -9620,9 +9620,9 @@ Return the corresponding character. */)
9620 return code; 9620 return code;
9621 9621
9622 val = CODING_ATTR_CHARSET_LIST (attrs); 9622 val = CODING_ATTR_CHARSET_LIST (attrs);
9623 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 9623 charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
9624 charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 9624 charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
9625 charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))); 9625 charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
9626 9626
9627 if (ch <= 0x7F) 9627 if (ch <= 0x7F)
9628 { 9628 {
@@ -9664,7 +9664,7 @@ Return the corresponding code in SJIS. */)
9664 unsigned code; 9664 unsigned code;
9665 9665
9666 CHECK_CHARACTER (ch); 9666 CHECK_CHARACTER (ch);
9667 c = XFASTINT (ch); 9667 c = XFIXNAT (ch);
9668 CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec); 9668 CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
9669 attrs = AREF (spec, 0); 9669 attrs = AREF (spec, 0);
9670 9670
@@ -9692,7 +9692,7 @@ Return the corresponding character. */)
9692 int c; 9692 int c;
9693 9693
9694 CHECK_FIXNAT (code); 9694 CHECK_FIXNAT (code);
9695 ch = XFASTINT (code); 9695 ch = XFIXNAT (code);
9696 CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec); 9696 CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
9697 attrs = AREF (spec, 0); 9697 attrs = AREF (spec, 0);
9698 9698
@@ -9701,8 +9701,8 @@ Return the corresponding character. */)
9701 return code; 9701 return code;
9702 9702
9703 val = CODING_ATTR_CHARSET_LIST (attrs); 9703 val = CODING_ATTR_CHARSET_LIST (attrs);
9704 charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val); 9704 charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
9705 charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val))); 9705 charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
9706 9706
9707 if (ch <= 0x7F) 9707 if (ch <= 0x7F)
9708 { 9708 {
@@ -9736,7 +9736,7 @@ Return the corresponding character code in Big5. */)
9736 unsigned code; 9736 unsigned code;
9737 9737
9738 CHECK_CHARACTER (ch); 9738 CHECK_CHARACTER (ch);
9739 c = XFASTINT (ch); 9739 c = XFIXNAT (ch);
9740 CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec); 9740 CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
9741 attrs = AREF (spec, 0); 9741 attrs = AREF (spec, 0);
9742 if (ASCII_CHAR_P (c) 9742 if (ASCII_CHAR_P (c)
@@ -9885,17 +9885,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
9885 if (!SYMBOLP (operation) 9885 if (!SYMBOLP (operation)
9886 || (target_idx = Fget (operation, Qtarget_idx), !FIXNATP (target_idx))) 9886 || (target_idx = Fget (operation, Qtarget_idx), !FIXNATP (target_idx)))
9887 error ("Invalid first argument"); 9887 error ("Invalid first argument");
9888 if (nargs <= 1 + XFASTINT (target_idx)) 9888 if (nargs <= 1 + XFIXNAT (target_idx))
9889 error ("Too few arguments for operation `%s'", 9889 error ("Too few arguments for operation `%s'",
9890 SDATA (SYMBOL_NAME (operation))); 9890 SDATA (SYMBOL_NAME (operation)));
9891 target = args[XFASTINT (target_idx) + 1]; 9891 target = args[XFIXNAT (target_idx) + 1];
9892 if (!(STRINGP (target) 9892 if (!(STRINGP (target)
9893 || (EQ (operation, Qinsert_file_contents) && CONSP (target) 9893 || (EQ (operation, Qinsert_file_contents) && CONSP (target)
9894 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target))) 9894 && STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
9895 || (EQ (operation, Qopen_network_stream) 9895 || (EQ (operation, Qopen_network_stream)
9896 && (FIXNUMP (target) || EQ (target, Qt))))) 9896 && (FIXNUMP (target) || EQ (target, Qt)))))
9897 error ("Invalid argument %"pI"d of operation `%s'", 9897 error ("Invalid argument %"pI"d of operation `%s'",
9898 XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation))); 9898 XFIXNAT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
9899 if (CONSP (target)) 9899 if (CONSP (target))
9900 target = XCAR (target); 9900 target = XCAR (target);
9901 9901
@@ -9967,7 +9967,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
9967 9967
9968 CHECK_CODING_SYSTEM_GET_SPEC (args[i], spec); 9968 CHECK_CODING_SYSTEM_GET_SPEC (args[i], spec);
9969 attrs = AREF (spec, 0); 9969 attrs = AREF (spec, 0);
9970 category = XINT (CODING_ATTR_CATEGORY (attrs)); 9970 category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
9971 if (changed[category]) 9971 if (changed[category])
9972 /* Ignore this coding system because a coding system of the 9972 /* Ignore this coding system because a coding system of the
9973 same category already had a higher priority. */ 9973 same category already had a higher priority. */
@@ -10110,8 +10110,8 @@ usage: (define-coding-system-internal ...) */)
10110 { 10110 {
10111 if (! RANGED_FIXNUMP (0, XCAR (tail), INT_MAX - 1)) 10111 if (! RANGED_FIXNUMP (0, XCAR (tail), INT_MAX - 1))
10112 error ("Invalid charset-list"); 10112 error ("Invalid charset-list");
10113 if (max_charset_id < XFASTINT (XCAR (tail))) 10113 if (max_charset_id < XFIXNAT (XCAR (tail)))
10114 max_charset_id = XFASTINT (XCAR (tail)); 10114 max_charset_id = XFIXNAT (XCAR (tail));
10115 } 10115 }
10116 } 10116 }
10117 else 10117 else
@@ -10141,7 +10141,7 @@ usage: (define-coding-system-internal ...) */)
10141 safe_charsets = make_uninit_string (max_charset_id + 1); 10141 safe_charsets = make_uninit_string (max_charset_id + 1);
10142 memset (SDATA (safe_charsets), 255, max_charset_id + 1); 10142 memset (SDATA (safe_charsets), 255, max_charset_id + 1);
10143 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 10143 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
10144 SSET (safe_charsets, XFASTINT (XCAR (tail)), 0); 10144 SSET (safe_charsets, XFIXNAT (XCAR (tail)), 0);
10145 ASET (attrs, coding_attr_safe_charsets, safe_charsets); 10145 ASET (attrs, coding_attr_safe_charsets, safe_charsets);
10146 10146
10147 ASET (attrs, coding_attr_ascii_compat, args[coding_arg_ascii_compatible_p]); 10147 ASET (attrs, coding_attr_ascii_compat, args[coding_arg_ascii_compatible_p]);
@@ -10198,7 +10198,7 @@ usage: (define-coding-system-internal ...) */)
10198 10198
10199 for (tail = charset_list; CONSP (tail); tail = XCDR (tail)) 10199 for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
10200 { 10200 {
10201 struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail))); 10201 struct charset *charset = CHARSET_FROM_ID (XFIXNAT (XCAR (tail)));
10202 int dim = CHARSET_DIMENSION (charset); 10202 int dim = CHARSET_DIMENSION (charset);
10203 int idx = (dim - 1) * 4; 10203 int idx = (dim - 1) * 4;
10204 10204
@@ -10216,7 +10216,7 @@ usage: (define-coding-system-internal ...) */)
10216 tmp = XCAR (tail); 10216 tmp = XCAR (tail);
10217 else if (FIXED_OR_FLOATP (tmp)) 10217 else if (FIXED_OR_FLOATP (tmp))
10218 { 10218 {
10219 dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp))); 10219 dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFIXNAT (tmp)));
10220 if (dim < dim2) 10220 if (dim < dim2)
10221 tmp = list2 (XCAR (tail), tmp); 10221 tmp = list2 (XCAR (tail), tmp);
10222 else 10222 else
@@ -10226,7 +10226,7 @@ usage: (define-coding-system-internal ...) */)
10226 { 10226 {
10227 for (tmp2 = tmp; CONSP (tmp2); tmp2 = XCDR (tmp2)) 10227 for (tmp2 = tmp; CONSP (tmp2); tmp2 = XCDR (tmp2))
10228 { 10228 {
10229 dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (XCAR (tmp2)))); 10229 dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFIXNAT (XCAR (tmp2))));
10230 if (dim < dim2) 10230 if (dim < dim2)
10231 break; 10231 break;
10232 } 10232 }
@@ -10272,23 +10272,23 @@ usage: (define-coding-system-internal ...) */)
10272 val = XCAR (tail); 10272 val = XCAR (tail);
10273 if (FIXNUMP (val)) 10273 if (FIXNUMP (val))
10274 { 10274 {
10275 if (! (0 <= XINT (val) && XINT (val) <= 255)) 10275 if (! (0 <= XFIXNUM (val) && XFIXNUM (val) <= 255))
10276 args_out_of_range_3 (val, make_fixnum (0), make_fixnum (255)); 10276 args_out_of_range_3 (val, make_fixnum (0), make_fixnum (255));
10277 from = to = XINT (val); 10277 from = to = XFIXNUM (val);
10278 } 10278 }
10279 else 10279 else
10280 { 10280 {
10281 CHECK_CONS (val); 10281 CHECK_CONS (val);
10282 CHECK_FIXNAT_CAR (val); 10282 CHECK_FIXNAT_CAR (val);
10283 CHECK_FIXNUM_CDR (val); 10283 CHECK_FIXNUM_CDR (val);
10284 if (XINT (XCAR (val)) > 255) 10284 if (XFIXNUM (XCAR (val)) > 255)
10285 args_out_of_range_3 (XCAR (val), 10285 args_out_of_range_3 (XCAR (val),
10286 make_fixnum (0), make_fixnum (255)); 10286 make_fixnum (0), make_fixnum (255));
10287 from = XINT (XCAR (val)); 10287 from = XFIXNUM (XCAR (val));
10288 if (! (from <= XINT (XCDR (val)) && XINT (XCDR (val)) <= 255)) 10288 if (! (from <= XFIXNUM (XCDR (val)) && XFIXNUM (XCDR (val)) <= 255))
10289 args_out_of_range_3 (XCDR (val), 10289 args_out_of_range_3 (XCDR (val),
10290 XCAR (val), make_fixnum (255)); 10290 XCAR (val), make_fixnum (255));
10291 to = XINT (XCDR (val)); 10291 to = XFIXNUM (XCDR (val));
10292 } 10292 }
10293 for (i = from; i <= to; i++) 10293 for (i = from; i <= to; i++)
10294 SSET (valids, i, 1); 10294 SSET (valids, i, 1);
@@ -10376,14 +10376,14 @@ usage: (define-coding-system-internal ...) */)
10376 tmp1 = XCAR (val); 10376 tmp1 = XCAR (val);
10377 CHECK_CHARSET_GET_ID (tmp1, id); 10377 CHECK_CHARSET_GET_ID (tmp1, id);
10378 CHECK_FIXNAT_CDR (val); 10378 CHECK_FIXNAT_CDR (val);
10379 if (XINT (XCDR (val)) >= 4) 10379 if (XFIXNUM (XCDR (val)) >= 4)
10380 error ("Invalid graphic register number: %"pI"d", XINT (XCDR (val))); 10380 error ("Invalid graphic register number: %"pI"d", XFIXNUM (XCDR (val)));
10381 XSETCAR (val, make_fixnum (id)); 10381 XSETCAR (val, make_fixnum (id));
10382 } 10382 }
10383 10383
10384 flags = args[coding_arg_iso2022_flags]; 10384 flags = args[coding_arg_iso2022_flags];
10385 CHECK_FIXNAT (flags); 10385 CHECK_FIXNAT (flags);
10386 i = XINT (flags) & INT_MAX; 10386 i = XFIXNUM (flags) & INT_MAX;
10387 if (EQ (args[coding_arg_charset_list], Qiso_2022)) 10387 if (EQ (args[coding_arg_charset_list], Qiso_2022))
10388 i |= CODING_ISO_FLAG_FULL_SUPPORT; 10388 i |= CODING_ISO_FLAG_FULL_SUPPORT;
10389 flags = make_fixnum (i); 10389 flags = make_fixnum (i);
@@ -10403,7 +10403,7 @@ usage: (define-coding-system-internal ...) */)
10403 : coding_category_iso_7_tight); 10403 : coding_category_iso_7_tight);
10404 else 10404 else
10405 { 10405 {
10406 int id = XINT (AREF (initial, 1)); 10406 int id = XFIXNUM (AREF (initial, 1));
10407 10407
10408 category = (((i & CODING_ISO_FLAG_LOCKING_SHIFT) 10408 category = (((i & CODING_ISO_FLAG_LOCKING_SHIFT)
10409 || EQ (args[coding_arg_charset_list], Qiso_2022) 10409 || EQ (args[coding_arg_charset_list], Qiso_2022)
@@ -10429,11 +10429,11 @@ usage: (define-coding-system-internal ...) */)
10429 10429
10430 struct charset *charset; 10430 struct charset *charset;
10431 10431
10432 if (XINT (Flength (charset_list)) != 3 10432 if (XFIXNUM (Flength (charset_list)) != 3
10433 && XINT (Flength (charset_list)) != 4) 10433 && XFIXNUM (Flength (charset_list)) != 4)
10434 error ("There should be three or four charsets"); 10434 error ("There should be three or four charsets");
10435 10435
10436 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10436 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10437 if (CHARSET_DIMENSION (charset) != 1) 10437 if (CHARSET_DIMENSION (charset) != 1)
10438 error ("Dimension of charset %s is not one", 10438 error ("Dimension of charset %s is not one",
10439 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10439 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
@@ -10441,13 +10441,13 @@ usage: (define-coding-system-internal ...) */)
10441 ASET (attrs, coding_attr_ascii_compat, Qt); 10441 ASET (attrs, coding_attr_ascii_compat, Qt);
10442 10442
10443 charset_list = XCDR (charset_list); 10443 charset_list = XCDR (charset_list);
10444 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10444 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10445 if (CHARSET_DIMENSION (charset) != 1) 10445 if (CHARSET_DIMENSION (charset) != 1)
10446 error ("Dimension of charset %s is not one", 10446 error ("Dimension of charset %s is not one",
10447 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10447 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
10448 10448
10449 charset_list = XCDR (charset_list); 10449 charset_list = XCDR (charset_list);
10450 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10450 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10451 if (CHARSET_DIMENSION (charset) != 2) 10451 if (CHARSET_DIMENSION (charset) != 2)
10452 error ("Dimension of charset %s is not two", 10452 error ("Dimension of charset %s is not two",
10453 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10453 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
@@ -10455,7 +10455,7 @@ usage: (define-coding-system-internal ...) */)
10455 charset_list = XCDR (charset_list); 10455 charset_list = XCDR (charset_list);
10456 if (! NILP (charset_list)) 10456 if (! NILP (charset_list))
10457 { 10457 {
10458 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10458 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10459 if (CHARSET_DIMENSION (charset) != 2) 10459 if (CHARSET_DIMENSION (charset) != 2)
10460 error ("Dimension of charset %s is not two", 10460 error ("Dimension of charset %s is not two",
10461 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10461 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
@@ -10468,10 +10468,10 @@ usage: (define-coding-system-internal ...) */)
10468 { 10468 {
10469 struct charset *charset; 10469 struct charset *charset;
10470 10470
10471 if (XINT (Flength (charset_list)) != 2) 10471 if (XFIXNUM (Flength (charset_list)) != 2)
10472 error ("There should be just two charsets"); 10472 error ("There should be just two charsets");
10473 10473
10474 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10474 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10475 if (CHARSET_DIMENSION (charset) != 1) 10475 if (CHARSET_DIMENSION (charset) != 1)
10476 error ("Dimension of charset %s is not one", 10476 error ("Dimension of charset %s is not one",
10477 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10477 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
@@ -10479,7 +10479,7 @@ usage: (define-coding-system-internal ...) */)
10479 ASET (attrs, coding_attr_ascii_compat, Qt); 10479 ASET (attrs, coding_attr_ascii_compat, Qt);
10480 10480
10481 charset_list = XCDR (charset_list); 10481 charset_list = XCDR (charset_list);
10482 charset = CHARSET_FROM_ID (XINT (XCAR (charset_list))); 10482 charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
10483 if (CHARSET_DIMENSION (charset) != 2) 10483 if (CHARSET_DIMENSION (charset) != 2)
10484 error ("Dimension of charset %s is not two", 10484 error ("Dimension of charset %s is not two",
10485 SDATA (SYMBOL_NAME (CHARSET_NAME (charset)))); 10485 SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
diff --git a/src/composite.c b/src/composite.c
index f5e05d68755..39c54fcfab3 100644
--- a/src/composite.c
+++ b/src/composite.c
@@ -196,9 +196,9 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
196 if (FIXNUMP (id)) 196 if (FIXNUMP (id))
197 { 197 {
198 /* PROP should be Form-B. */ 198 /* PROP should be Form-B. */
199 if (XINT (id) < 0 || XINT (id) >= n_compositions) 199 if (XFIXNUM (id) < 0 || XFIXNUM (id) >= n_compositions)
200 goto invalid_composition; 200 goto invalid_composition;
201 return XINT (id); 201 return XFIXNUM (id);
202 } 202 }
203 203
204 /* PROP should be Form-A. 204 /* PROP should be Form-A.
@@ -206,7 +206,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
206 if (!CONSP (id)) 206 if (!CONSP (id))
207 goto invalid_composition; 207 goto invalid_composition;
208 length = XCAR (id); 208 length = XCAR (id);
209 if (!FIXNUMP (length) || XINT (length) != nchars) 209 if (!FIXNUMP (length) || XFIXNUM (length) != nchars)
210 goto invalid_composition; 210 goto invalid_composition;
211 211
212 components = XCDR (id); 212 components = XCDR (id);
@@ -251,7 +251,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
251 id = HASH_VALUE (hash_table, hash_index); 251 id = HASH_VALUE (hash_table, hash_index);
252 XSETCAR (prop, id); 252 XSETCAR (prop, id);
253 XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop)))); 253 XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop))));
254 return XINT (id); 254 return XFIXNUM (id);
255 } 255 }
256 256
257 /* This composition is a new one. We must register it. */ 257 /* This composition is a new one. We must register it. */
@@ -332,7 +332,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
332 for (i = 0; i < glyph_len; i++) 332 for (i = 0; i < glyph_len; i++)
333 { 333 {
334 int this_width; 334 int this_width;
335 ch = XINT (key_contents[i]); 335 ch = XFIXNUM (key_contents[i]);
336 /* TAB in a composition means display glyphs with padding 336 /* TAB in a composition means display glyphs with padding
337 space on the left or right. */ 337 space on the left or right. */
338 this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch)); 338 this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch));
@@ -345,7 +345,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
345 /* Rule-base composition. */ 345 /* Rule-base composition. */
346 double leftmost = 0.0, rightmost; 346 double leftmost = 0.0, rightmost;
347 347
348 ch = XINT (key_contents[0]); 348 ch = XFIXNUM (key_contents[0]);
349 rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; 349 rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1;
350 350
351 for (i = 1; i < glyph_len; i += 2) 351 for (i = 1; i < glyph_len; i += 2)
@@ -354,8 +354,8 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
354 int this_width; 354 int this_width;
355 double this_left; 355 double this_left;
356 356
357 rule = XINT (key_contents[i]); 357 rule = XFIXNUM (key_contents[i]);
358 ch = XINT (key_contents[i + 1]); 358 ch = XFIXNUM (key_contents[i + 1]);
359 this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1; 359 this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1;
360 360
361 /* A composition rule is specified by an integer value 361 /* A composition rule is specified by an integer value
@@ -433,7 +433,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit,
433 { 433 {
434 val = Fnext_single_property_change (make_fixnum (pos), Qcomposition, 434 val = Fnext_single_property_change (make_fixnum (pos), Qcomposition,
435 object, make_fixnum (limit)); 435 object, make_fixnum (limit));
436 pos = XINT (val); 436 pos = XFIXNUM (val);
437 if (pos == limit) 437 if (pos == limit)
438 return 0; 438 return 0;
439 } 439 }
@@ -444,7 +444,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit,
444 return 1; 444 return 1;
445 val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition, 445 val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition,
446 object, make_fixnum (limit)); 446 object, make_fixnum (limit));
447 pos = XINT (val); 447 pos = XFIXNUM (val);
448 if (pos == limit) 448 if (pos == limit)
449 return 0; 449 return 0;
450 pos--; 450 pos--;
@@ -836,7 +836,7 @@ fill_gstring_body (Lisp_Object gstring)
836 for (i = 0; i < len; i++) 836 for (i = 0; i < len; i++)
837 { 837 {
838 Lisp_Object g = LGSTRING_GLYPH (gstring, i); 838 Lisp_Object g = LGSTRING_GLYPH (gstring, i);
839 int c = XFASTINT (AREF (header, i + 1)); 839 int c = XFIXNAT (AREF (header, i + 1));
840 840
841 if (NILP (g)) 841 if (NILP (g))
842 { 842 {
@@ -852,7 +852,7 @@ fill_gstring_body (Lisp_Object gstring)
852 } 852 }
853 else 853 else
854 { 854 {
855 int width = XFASTINT (CHAR_TABLE_REF (Vchar_width_table, c)); 855 int width = XFIXNAT (CHAR_TABLE_REF (Vchar_width_table, c));
856 856
857 LGLYPH_SET_CODE (g, c); 857 LGLYPH_SET_CODE (g, c);
858 LGLYPH_SET_LBEARING (g, 0); 858 LGLYPH_SET_LBEARING (g, 0);
@@ -941,7 +941,7 @@ char_composable_p (int c)
941 return (c > ' ' 941 return (c > ' '
942 && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER 942 && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
943 || (val = CHAR_TABLE_REF (Vunicode_category_table, c), 943 || (val = CHAR_TABLE_REF (Vunicode_category_table, c),
944 (FIXNUMP (val) && (XINT (val) <= UNICODE_CATEGORY_So))))); 944 (FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_So)))));
945} 945}
946 946
947/* Update cmp_it->stop_pos to the next position after CHARPOS (and 947/* Update cmp_it->stop_pos to the next position after CHARPOS (and
@@ -1031,10 +1031,10 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
1031 Lisp_Object elt = XCAR (val); 1031 Lisp_Object elt = XCAR (val);
1032 if (VECTORP (elt) && ASIZE (elt) == 3 1032 if (VECTORP (elt) && ASIZE (elt) == 3
1033 && FIXNATP (AREF (elt, 1)) 1033 && FIXNATP (AREF (elt, 1))
1034 && charpos - 1 - XFASTINT (AREF (elt, 1)) >= start) 1034 && charpos - 1 - XFIXNAT (AREF (elt, 1)) >= start)
1035 { 1035 {
1036 cmp_it->rule_idx = ridx; 1036 cmp_it->rule_idx = ridx;
1037 cmp_it->lookback = XFASTINT (AREF (elt, 1)); 1037 cmp_it->lookback = XFIXNAT (AREF (elt, 1));
1038 cmp_it->stop_pos = charpos - 1 - cmp_it->lookback; 1038 cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
1039 cmp_it->ch = c; 1039 cmp_it->ch = c;
1040 return; 1040 return;
@@ -1082,9 +1082,9 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
1082 Lisp_Object elt = XCAR (val); 1082 Lisp_Object elt = XCAR (val);
1083 if (VECTORP (elt) && ASIZE (elt) == 3 1083 if (VECTORP (elt) && ASIZE (elt) == 3
1084 && FIXNATP (AREF (elt, 1)) 1084 && FIXNATP (AREF (elt, 1))
1085 && charpos - XFASTINT (AREF (elt, 1)) > endpos) 1085 && charpos - XFIXNAT (AREF (elt, 1)) > endpos)
1086 { 1086 {
1087 ptrdiff_t back = XFASTINT (AREF (elt, 1)); 1087 ptrdiff_t back = XFIXNAT (AREF (elt, 1));
1088 ptrdiff_t cpos = charpos - back, bpos; 1088 ptrdiff_t cpos = charpos - back, bpos;
1089 1089
1090 if (back == 0) 1090 if (back == 0)
@@ -1223,7 +1223,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
1223 if (! VECTORP (elt) || ASIZE (elt) != 3 1223 if (! VECTORP (elt) || ASIZE (elt) != 3
1224 || ! FIXNUMP (AREF (elt, 1))) 1224 || ! FIXNUMP (AREF (elt, 1)))
1225 continue; 1225 continue;
1226 if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback) 1226 if (XFIXNAT (AREF (elt, 1)) != cmp_it->lookback)
1227 goto no_composition; 1227 goto no_composition;
1228 lgstring = autocmp_chars (elt, charpos, bytepos, endpos, 1228 lgstring = autocmp_chars (elt, charpos, bytepos, endpos,
1229 w, face, string); 1229 w, face, string);
@@ -1262,7 +1262,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
1262 goto no_composition; 1262 goto no_composition;
1263 if (NILP (LGSTRING_ID (lgstring))) 1263 if (NILP (LGSTRING_ID (lgstring)))
1264 lgstring = composition_gstring_put_cache (lgstring, -1); 1264 lgstring = composition_gstring_put_cache (lgstring, -1);
1265 cmp_it->id = XINT (LGSTRING_ID (lgstring)); 1265 cmp_it->id = XFIXNUM (LGSTRING_ID (lgstring));
1266 int i; 1266 int i;
1267 for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++) 1267 for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++)
1268 if (NILP (LGSTRING_GLYPH (lgstring, i))) 1268 if (NILP (LGSTRING_GLYPH (lgstring, i)))
@@ -1391,7 +1391,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff
1391 cmp_it->width = 0; 1391 cmp_it->width = 0;
1392 for (i = cmp_it->nchars - 1; i >= 0; i--) 1392 for (i = cmp_it->nchars - 1; i >= 0; i--)
1393 { 1393 {
1394 c = XINT (LGSTRING_CHAR (gstring, from + i)); 1394 c = XFIXNUM (LGSTRING_CHAR (gstring, from + i));
1395 cmp_it->nbytes += CHAR_BYTES (c); 1395 cmp_it->nbytes += CHAR_BYTES (c);
1396 cmp_it->width += CHARACTER_WIDTH (c); 1396 cmp_it->width += CHARACTER_WIDTH (c);
1397 } 1397 }
@@ -1561,7 +1561,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
1561 1561
1562 if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1))) 1562 if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1)))
1563 { 1563 {
1564 EMACS_INT check_pos = cur.pos - XFASTINT (AREF (elt, 1)); 1564 EMACS_INT check_pos = cur.pos - XFIXNAT (AREF (elt, 1));
1565 struct position_record check; 1565 struct position_record check;
1566 1566
1567 if (check_pos < head 1567 if (check_pos < head
@@ -1739,8 +1739,8 @@ should be ignored. */)
1739 if (NILP (BVAR (current_buffer, enable_multibyte_characters))) 1739 if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
1740 error ("Attempt to shape unibyte text"); 1740 error ("Attempt to shape unibyte text");
1741 validate_region (&from, &to); 1741 validate_region (&from, &to);
1742 frompos = XFASTINT (from); 1742 frompos = XFIXNAT (from);
1743 topos = XFASTINT (to); 1743 topos = XFIXNAT (to);
1744 frombyte = CHAR_TO_BYTE (frompos); 1744 frombyte = CHAR_TO_BYTE (frompos);
1745 } 1745 }
1746 else 1746 else
@@ -1785,7 +1785,7 @@ for the composition. See `compose-region' for more details. */)
1785 && !STRINGP (components)) 1785 && !STRINGP (components))
1786 CHECK_VECTOR (components); 1786 CHECK_VECTOR (components);
1787 1787
1788 compose_text (XINT (start), XINT (end), components, modification_func, Qnil); 1788 compose_text (XFIXNUM (start), XFIXNUM (end), components, modification_func, Qnil);
1789 return Qnil; 1789 return Qnil;
1790} 1790}
1791 1791
@@ -1824,7 +1824,7 @@ See `find-composition' for more details. */)
1824 if (!NILP (limit)) 1824 if (!NILP (limit))
1825 { 1825 {
1826 CHECK_FIXNUM_COERCE_MARKER (limit); 1826 CHECK_FIXNUM_COERCE_MARKER (limit);
1827 to = min (XINT (limit), ZV); 1827 to = min (XFIXNUM (limit), ZV);
1828 } 1828 }
1829 else 1829 else
1830 to = -1; 1830 to = -1;
@@ -1832,15 +1832,15 @@ See `find-composition' for more details. */)
1832 if (!NILP (string)) 1832 if (!NILP (string))
1833 { 1833 {
1834 CHECK_STRING (string); 1834 CHECK_STRING (string);
1835 if (XINT (pos) < 0 || XINT (pos) > SCHARS (string)) 1835 if (XFIXNUM (pos) < 0 || XFIXNUM (pos) > SCHARS (string))
1836 args_out_of_range (string, pos); 1836 args_out_of_range (string, pos);
1837 } 1837 }
1838 else 1838 else
1839 { 1839 {
1840 if (XINT (pos) < BEGV || XINT (pos) > ZV) 1840 if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) > ZV)
1841 args_out_of_range (Fcurrent_buffer (), pos); 1841 args_out_of_range (Fcurrent_buffer (), pos);
1842 } 1842 }
1843 from = XINT (pos); 1843 from = XFIXNUM (pos);
1844 1844
1845 if (!find_composition (from, to, &start, &end, &prop, string)) 1845 if (!find_composition (from, to, &start, &end, &prop, string))
1846 { 1846 {
@@ -1851,12 +1851,12 @@ See `find-composition' for more details. */)
1851 return list3 (make_fixnum (start), make_fixnum (end), gstring); 1851 return list3 (make_fixnum (start), make_fixnum (end), gstring);
1852 return Qnil; 1852 return Qnil;
1853 } 1853 }
1854 if ((end <= XINT (pos) || start > XINT (pos))) 1854 if ((end <= XFIXNUM (pos) || start > XFIXNUM (pos)))
1855 { 1855 {
1856 ptrdiff_t s, e; 1856 ptrdiff_t s, e;
1857 1857
1858 if (find_automatic_composition (from, to, &s, &e, &gstring, string) 1858 if (find_automatic_composition (from, to, &s, &e, &gstring, string)
1859 && (e <= XINT (pos) ? e > end : s < start)) 1859 && (e <= XFIXNUM (pos) ? e > end : s < start))
1860 return list3 (make_fixnum (s), make_fixnum (e), gstring); 1860 return list3 (make_fixnum (s), make_fixnum (e), gstring);
1861 } 1861 }
1862 if (!composition_valid_p (start, end, prop)) 1862 if (!composition_valid_p (start, end, prop))
diff --git a/src/composite.h b/src/composite.h
index 175381fad00..2d03e48ecc5 100644
--- a/src/composite.h
+++ b/src/composite.h
@@ -63,13 +63,13 @@ composition_registered_p (Lisp_Object prop)
63} 63}
64 64
65/* Return ID number of the already registered composition. */ 65/* Return ID number of the already registered composition. */
66#define COMPOSITION_ID(prop) XINT (XCAR (prop)) 66#define COMPOSITION_ID(prop) XFIXNUM (XCAR (prop))
67 67
68/* Return length of the composition. */ 68/* Return length of the composition. */
69#define COMPOSITION_LENGTH(prop) \ 69#define COMPOSITION_LENGTH(prop) \
70 (composition_registered_p (prop) \ 70 (composition_registered_p (prop) \
71 ? XINT (XCAR (XCDR (prop))) \ 71 ? XFIXNUM (XCAR (XCDR (prop))) \
72 : XINT (XCAR (XCAR (prop)))) 72 : XFIXNUM (XCAR (XCAR (prop))))
73 73
74/* Return components of the composition. */ 74/* Return components of the composition. */
75#define COMPOSITION_COMPONENTS(prop) \ 75#define COMPOSITION_COMPONENTS(prop) \
@@ -86,7 +86,7 @@ composition_registered_p (Lisp_Object prop)
86/* Return the Nth glyph of composition specified by CMP. CMP is a 86/* Return the Nth glyph of composition specified by CMP. CMP is a
87 pointer to `struct composition'. */ 87 pointer to `struct composition'. */
88#define COMPOSITION_GLYPH(cmp, n) \ 88#define COMPOSITION_GLYPH(cmp, n) \
89 XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \ 89 XFIXNUM (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
90 ->key_and_value) \ 90 ->key_and_value) \
91 ->contents[cmp->hash_index * 2]) \ 91 ->contents[cmp->hash_index * 2]) \
92 ->contents[cmp->method == COMPOSITION_WITH_RULE_ALTCHARS \ 92 ->contents[cmp->method == COMPOSITION_WITH_RULE_ALTCHARS \
@@ -96,7 +96,7 @@ composition_registered_p (Lisp_Object prop)
96 rule-base composition specified by CMP. CMP is a pointer to 96 rule-base composition specified by CMP. CMP is a pointer to
97 `struct composition'. */ 97 `struct composition'. */
98#define COMPOSITION_RULE(cmp, n) \ 98#define COMPOSITION_RULE(cmp, n) \
99 XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \ 99 XFIXNUM (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
100 ->key_and_value) \ 100 ->key_and_value) \
101 ->contents[cmp->hash_index * 2]) \ 101 ->contents[cmp->hash_index * 2]) \
102 ->contents[(n) * 2 - 1]) 102 ->contents[(n) * 2 - 1])
@@ -275,18 +275,18 @@ enum lglyph_indices
275 }; 275 };
276 276
277#define LGLYPH_NEW() Fmake_vector (make_fixnum (LGLYPH_SIZE), Qnil) 277#define LGLYPH_NEW() Fmake_vector (make_fixnum (LGLYPH_SIZE), Qnil)
278#define LGLYPH_FROM(g) XINT (AREF ((g), LGLYPH_IX_FROM)) 278#define LGLYPH_FROM(g) XFIXNUM (AREF ((g), LGLYPH_IX_FROM))
279#define LGLYPH_TO(g) XINT (AREF ((g), LGLYPH_IX_TO)) 279#define LGLYPH_TO(g) XFIXNUM (AREF ((g), LGLYPH_IX_TO))
280#define LGLYPH_CHAR(g) XINT (AREF ((g), LGLYPH_IX_CHAR)) 280#define LGLYPH_CHAR(g) XFIXNUM (AREF ((g), LGLYPH_IX_CHAR))
281#define LGLYPH_CODE(g) \ 281#define LGLYPH_CODE(g) \
282 (NILP (AREF ((g), LGLYPH_IX_CODE)) \ 282 (NILP (AREF ((g), LGLYPH_IX_CODE)) \
283 ? FONT_INVALID_CODE \ 283 ? FONT_INVALID_CODE \
284 : cons_to_unsigned (AREF (g, LGLYPH_IX_CODE), TYPE_MAXIMUM (unsigned))) 284 : cons_to_unsigned (AREF (g, LGLYPH_IX_CODE), TYPE_MAXIMUM (unsigned)))
285#define LGLYPH_WIDTH(g) XINT (AREF ((g), LGLYPH_IX_WIDTH)) 285#define LGLYPH_WIDTH(g) XFIXNUM (AREF ((g), LGLYPH_IX_WIDTH))
286#define LGLYPH_LBEARING(g) XINT (AREF ((g), LGLYPH_IX_LBEARING)) 286#define LGLYPH_LBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_LBEARING))
287#define LGLYPH_RBEARING(g) XINT (AREF ((g), LGLYPH_IX_RBEARING)) 287#define LGLYPH_RBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_RBEARING))
288#define LGLYPH_ASCENT(g) XINT (AREF ((g), LGLYPH_IX_ASCENT)) 288#define LGLYPH_ASCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_ASCENT))
289#define LGLYPH_DESCENT(g) XINT (AREF ((g), LGLYPH_IX_DESCENT)) 289#define LGLYPH_DESCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_DESCENT))
290#define LGLYPH_ADJUSTMENT(g) AREF ((g), LGLYPH_IX_ADJUSTMENT) 290#define LGLYPH_ADJUSTMENT(g) AREF ((g), LGLYPH_IX_ADJUSTMENT)
291#define LGLYPH_SET_FROM(g, val) ASET ((g), LGLYPH_IX_FROM, make_fixnum (val)) 291#define LGLYPH_SET_FROM(g, val) ASET ((g), LGLYPH_IX_FROM, make_fixnum (val))
292#define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_fixnum (val)) 292#define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_fixnum (val))
@@ -304,11 +304,11 @@ enum lglyph_indices
304#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val)) 304#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val))
305 305
306#define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ 306#define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
307 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0) 307 ? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0)
308#define LGLYPH_YOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ 308#define LGLYPH_YOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
309 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0) 309 ? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0)
310#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \ 310#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
311 ? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0) 311 ? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
312 312
313extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t); 313extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
314extern Lisp_Object composition_gstring_from_id (ptrdiff_t); 314extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
diff --git a/src/data.c b/src/data.c
index 4388a2b0ffc..6512e7e6706 100644
--- a/src/data.c
+++ b/src/data.c
@@ -74,7 +74,7 @@ XKBOARD_OBJFWD (union Lisp_Fwd *a)
74 return &a->u_kboard_objfwd; 74 return &a->u_kboard_objfwd;
75} 75}
76static struct Lisp_Intfwd * 76static struct Lisp_Intfwd *
77XINTFWD (union Lisp_Fwd *a) 77XFIXNUMFWD (union Lisp_Fwd *a)
78{ 78{
79 eassert (INTFWDP (a)); 79 eassert (INTFWDP (a));
80 return &a->u_intfwd; 80 return &a->u_intfwd;
@@ -1013,7 +1013,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
1013 switch (XFWDTYPE (valcontents)) 1013 switch (XFWDTYPE (valcontents))
1014 { 1014 {
1015 case Lisp_Fwd_Int: 1015 case Lisp_Fwd_Int:
1016 XSETINT (val, *XINTFWD (valcontents)->intvar); 1016 XSETINT (val, *XFIXNUMFWD (valcontents)->intvar);
1017 return val; 1017 return val;
1018 1018
1019 case Lisp_Fwd_Bool: 1019 case Lisp_Fwd_Bool:
@@ -1050,7 +1050,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
1050void 1050void
1051wrong_choice (Lisp_Object choice, Lisp_Object wrong) 1051wrong_choice (Lisp_Object choice, Lisp_Object wrong)
1052{ 1052{
1053 ptrdiff_t i = 0, len = XINT (Flength (choice)); 1053 ptrdiff_t i = 0, len = XFIXNUM (Flength (choice));
1054 Lisp_Object obj, *args; 1054 Lisp_Object obj, *args;
1055 AUTO_STRING (one_of, "One of "); 1055 AUTO_STRING (one_of, "One of ");
1056 AUTO_STRING (comma, ", "); 1056 AUTO_STRING (comma, ", ");
@@ -1106,7 +1106,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
1106 { 1106 {
1107 case Lisp_Fwd_Int: 1107 case Lisp_Fwd_Int:
1108 CHECK_FIXNUM (newval); 1108 CHECK_FIXNUM (newval);
1109 *XINTFWD (valcontents)->intvar = XINT (newval); 1109 *XFIXNUMFWD (valcontents)->intvar = XFIXNUM (newval);
1110 break; 1110 break;
1111 1111
1112 case Lisp_Fwd_Bool: 1112 case Lisp_Fwd_Bool:
@@ -2254,7 +2254,7 @@ or a byte-code object. IDX starts at 0. */)
2254 register EMACS_INT idxval; 2254 register EMACS_INT idxval;
2255 2255
2256 CHECK_FIXNUM (idx); 2256 CHECK_FIXNUM (idx);
2257 idxval = XINT (idx); 2257 idxval = XFIXNUM (idx);
2258 if (STRINGP (array)) 2258 if (STRINGP (array))
2259 { 2259 {
2260 int c; 2260 int c;
@@ -2305,7 +2305,7 @@ bool-vector. IDX starts at 0. */)
2305 register EMACS_INT idxval; 2305 register EMACS_INT idxval;
2306 2306
2307 CHECK_FIXNUM (idx); 2307 CHECK_FIXNUM (idx);
2308 idxval = XINT (idx); 2308 idxval = XFIXNUM (idx);
2309 if (! RECORDP (array)) 2309 if (! RECORDP (array))
2310 CHECK_ARRAY (array, Qarrayp); 2310 CHECK_ARRAY (array, Qarrayp);
2311 2311
@@ -2341,7 +2341,7 @@ bool-vector. IDX starts at 0. */)
2341 if (idxval < 0 || idxval >= SCHARS (array)) 2341 if (idxval < 0 || idxval >= SCHARS (array))
2342 args_out_of_range (array, idx); 2342 args_out_of_range (array, idx);
2343 CHECK_CHARACTER (newelt); 2343 CHECK_CHARACTER (newelt);
2344 c = XFASTINT (newelt); 2344 c = XFIXNAT (newelt);
2345 2345
2346 if (STRING_MULTIBYTE (array)) 2346 if (STRING_MULTIBYTE (array))
2347 { 2347 {
@@ -2420,16 +2420,16 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
2420 } 2420 }
2421 else if (FIXNUMP (num2)) 2421 else if (FIXNUMP (num2))
2422 { 2422 {
2423 if (sizeof (EMACS_INT) > sizeof (long) && XINT (num2) > LONG_MAX) 2423 if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num2) > LONG_MAX)
2424 { 2424 {
2425 mpz_t tem; 2425 mpz_t tem;
2426 mpz_init (tem); 2426 mpz_init (tem);
2427 mpz_set_intmax (tem, XINT (num2)); 2427 mpz_set_intmax (tem, XFIXNUM (num2));
2428 cmp = mpz_cmp (XBIGNUM (num1)->value, tem); 2428 cmp = mpz_cmp (XBIGNUM (num1)->value, tem);
2429 mpz_clear (tem); 2429 mpz_clear (tem);
2430 } 2430 }
2431 else 2431 else
2432 cmp = mpz_cmp_si (XBIGNUM (num1)->value, XINT (num2)); 2432 cmp = mpz_cmp_si (XBIGNUM (num1)->value, XFIXNUM (num2));
2433 } 2433 }
2434 else 2434 else
2435 { 2435 {
@@ -2451,16 +2451,16 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
2451 else 2451 else
2452 { 2452 {
2453 eassume (FIXNUMP (num1)); 2453 eassume (FIXNUMP (num1));
2454 if (sizeof (EMACS_INT) > sizeof (long) && XINT (num1) > LONG_MAX) 2454 if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num1) > LONG_MAX)
2455 { 2455 {
2456 mpz_t tem; 2456 mpz_t tem;
2457 mpz_init (tem); 2457 mpz_init (tem);
2458 mpz_set_intmax (tem, XINT (num1)); 2458 mpz_set_intmax (tem, XFIXNUM (num1));
2459 cmp = - mpz_cmp (XBIGNUM (num2)->value, tem); 2459 cmp = - mpz_cmp (XBIGNUM (num2)->value, tem);
2460 mpz_clear (tem); 2460 mpz_clear (tem);
2461 } 2461 }
2462 else 2462 else
2463 cmp = - mpz_cmp_si (XBIGNUM (num2)->value, XINT (num1)); 2463 cmp = - mpz_cmp_si (XBIGNUM (num2)->value, XFIXNUM (num1));
2464 } 2464 }
2465 } 2465 }
2466 2466
@@ -2537,13 +2537,13 @@ arithcompare (Lisp_Object num1, Lisp_Object num2,
2537 floating-point comparison reports a tie, NUM1 = F1 = F2 = I1 2537 floating-point comparison reports a tie, NUM1 = F1 = F2 = I1
2538 (exactly) so I1 - I2 = NUM1 - NUM2 (exactly), so comparing I1 2538 (exactly) so I1 - I2 = NUM1 - NUM2 (exactly), so comparing I1
2539 to I2 will break the tie correctly. */ 2539 to I2 will break the tie correctly. */
2540 i1 = f2 = i2 = XINT (num2); 2540 i1 = f2 = i2 = XFIXNUM (num2);
2541 } 2541 }
2542 fneq = f1 != f2; 2542 fneq = f1 != f2;
2543 } 2543 }
2544 else 2544 else
2545 { 2545 {
2546 i1 = XINT (num1); 2546 i1 = XFIXNUM (num1);
2547 if (FLOATP (num2)) 2547 if (FLOATP (num2))
2548 { 2548 {
2549 /* Compare an integer NUM1 to a float NUM2. This is the 2549 /* Compare an integer NUM1 to a float NUM2. This is the
@@ -2554,7 +2554,7 @@ arithcompare (Lisp_Object num1, Lisp_Object num2,
2554 } 2554 }
2555 else 2555 else
2556 { 2556 {
2557 i2 = XINT (num2); 2557 i2 = XFIXNUM (num2);
2558 fneq = false; 2558 fneq = false;
2559 } 2559 }
2560 } 2560 }
@@ -2687,8 +2687,8 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
2687 uintmax_t val UNINIT; 2687 uintmax_t val UNINIT;
2688 if (FIXNUMP (c)) 2688 if (FIXNUMP (c))
2689 { 2689 {
2690 valid = XINT (c) >= 0; 2690 valid = XFIXNUM (c) >= 0;
2691 val = XINT (c); 2691 val = XFIXNUM (c);
2692 } 2692 }
2693 else if (FLOATP (c)) 2693 else if (FLOATP (c))
2694 { 2694 {
@@ -2701,24 +2701,24 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
2701 } 2701 }
2702 else if (CONSP (c) && FIXNATP (XCAR (c))) 2702 else if (CONSP (c) && FIXNATP (XCAR (c)))
2703 { 2703 {
2704 uintmax_t top = XFASTINT (XCAR (c)); 2704 uintmax_t top = XFIXNAT (XCAR (c));
2705 Lisp_Object rest = XCDR (c); 2705 Lisp_Object rest = XCDR (c);
2706 if (top <= UINTMAX_MAX >> 24 >> 16 2706 if (top <= UINTMAX_MAX >> 24 >> 16
2707 && CONSP (rest) 2707 && CONSP (rest)
2708 && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 2708 && FIXNATP (XCAR (rest)) && XFIXNAT (XCAR (rest)) < 1 << 24
2709 && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) 2709 && FIXNATP (XCDR (rest)) && XFIXNAT (XCDR (rest)) < 1 << 16)
2710 { 2710 {
2711 uintmax_t mid = XFASTINT (XCAR (rest)); 2711 uintmax_t mid = XFIXNAT (XCAR (rest));
2712 val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); 2712 val = top << 24 << 16 | mid << 16 | XFIXNAT (XCDR (rest));
2713 valid = true; 2713 valid = true;
2714 } 2714 }
2715 else if (top <= UINTMAX_MAX >> 16) 2715 else if (top <= UINTMAX_MAX >> 16)
2716 { 2716 {
2717 if (CONSP (rest)) 2717 if (CONSP (rest))
2718 rest = XCAR (rest); 2718 rest = XCAR (rest);
2719 if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16) 2719 if (FIXNATP (rest) && XFIXNAT (rest) < 1 << 16)
2720 { 2720 {
2721 val = top << 16 | XFASTINT (rest); 2721 val = top << 16 | XFIXNAT (rest);
2722 valid = true; 2722 valid = true;
2723 } 2723 }
2724 } 2724 }
@@ -2741,7 +2741,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
2741 intmax_t val UNINIT; 2741 intmax_t val UNINIT;
2742 if (FIXNUMP (c)) 2742 if (FIXNUMP (c))
2743 { 2743 {
2744 val = XINT (c); 2744 val = XFIXNUM (c);
2745 valid = true; 2745 valid = true;
2746 } 2746 }
2747 else if (FLOATP (c)) 2747 else if (FLOATP (c))
@@ -2755,24 +2755,24 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
2755 } 2755 }
2756 else if (CONSP (c) && FIXNUMP (XCAR (c))) 2756 else if (CONSP (c) && FIXNUMP (XCAR (c)))
2757 { 2757 {
2758 intmax_t top = XINT (XCAR (c)); 2758 intmax_t top = XFIXNUM (XCAR (c));
2759 Lisp_Object rest = XCDR (c); 2759 Lisp_Object rest = XCDR (c);
2760 if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16 2760 if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16
2761 && CONSP (rest) 2761 && CONSP (rest)
2762 && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24 2762 && FIXNATP (XCAR (rest)) && XFIXNAT (XCAR (rest)) < 1 << 24
2763 && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16) 2763 && FIXNATP (XCDR (rest)) && XFIXNAT (XCDR (rest)) < 1 << 16)
2764 { 2764 {
2765 intmax_t mid = XFASTINT (XCAR (rest)); 2765 intmax_t mid = XFIXNAT (XCAR (rest));
2766 val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest)); 2766 val = top << 24 << 16 | mid << 16 | XFIXNAT (XCDR (rest));
2767 valid = true; 2767 valid = true;
2768 } 2768 }
2769 else if (top >= INTMAX_MIN >> 16 && top <= INTMAX_MAX >> 16) 2769 else if (top >= INTMAX_MIN >> 16 && top <= INTMAX_MAX >> 16)
2770 { 2770 {
2771 if (CONSP (rest)) 2771 if (CONSP (rest))
2772 rest = XCAR (rest); 2772 rest = XCAR (rest);
2773 if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16) 2773 if (FIXNATP (rest) && XFIXNAT (rest) < 1 << 16)
2774 { 2774 {
2775 val = top << 16 | XFASTINT (rest); 2775 val = top << 16 | XFIXNAT (rest);
2776 valid = true; 2776 valid = true;
2777 } 2777 }
2778 } 2778 }
@@ -2805,7 +2805,7 @@ NUMBER may be an integer or a floating point number. */)
2805 if (FLOATP (number)) 2805 if (FLOATP (number))
2806 len = float_to_string (buffer, XFLOAT_DATA (number)); 2806 len = float_to_string (buffer, XFLOAT_DATA (number));
2807 else 2807 else
2808 len = sprintf (buffer, "%"pI"d", XINT (number)); 2808 len = sprintf (buffer, "%"pI"d", XFIXNUM (number));
2809 2809
2810 return make_unibyte_string (buffer, len); 2810 return make_unibyte_string (buffer, len);
2811} 2811}
@@ -2829,9 +2829,9 @@ If the base used is not 10, STRING is always parsed as an integer. */)
2829 else 2829 else
2830 { 2830 {
2831 CHECK_FIXNUM (base); 2831 CHECK_FIXNUM (base);
2832 if (! (XINT (base) >= 2 && XINT (base) <= 16)) 2832 if (! (XFIXNUM (base) >= 2 && XFIXNUM (base) <= 16))
2833 xsignal1 (Qargs_out_of_range, base); 2833 xsignal1 (Qargs_out_of_range, base);
2834 b = XINT (base); 2834 b = XFIXNUM (base);
2835 } 2835 }
2836 2836
2837 char *p = SSDATA (string); 2837 char *p = SSDATA (string);
@@ -2911,14 +2911,14 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2911 { 2911 {
2912 mpz_t tem; 2912 mpz_t tem;
2913 mpz_init (tem); 2913 mpz_init (tem);
2914 mpz_set_intmax (tem, XINT (val)); 2914 mpz_set_intmax (tem, XFIXNUM (val));
2915 mpz_add (accum, accum, tem); 2915 mpz_add (accum, accum, tem);
2916 mpz_clear (tem); 2916 mpz_clear (tem);
2917 } 2917 }
2918 else if (XINT (val) < 0) 2918 else if (XFIXNUM (val) < 0)
2919 mpz_sub_ui (accum, accum, - XINT (val)); 2919 mpz_sub_ui (accum, accum, - XFIXNUM (val));
2920 else 2920 else
2921 mpz_add_ui (accum, accum, XINT (val)); 2921 mpz_add_ui (accum, accum, XFIXNUM (val));
2922 break; 2922 break;
2923 case Asub: 2923 case Asub:
2924 if (! argnum) 2924 if (! argnum)
@@ -2926,7 +2926,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2926 if (BIGNUMP (val)) 2926 if (BIGNUMP (val))
2927 mpz_set (accum, XBIGNUM (val)->value); 2927 mpz_set (accum, XBIGNUM (val)->value);
2928 else 2928 else
2929 mpz_set_intmax (accum, XINT (val)); 2929 mpz_set_intmax (accum, XFIXNUM (val));
2930 if (nargs == 1) 2930 if (nargs == 1)
2931 mpz_neg (accum, accum); 2931 mpz_neg (accum, accum);
2932 } 2932 }
@@ -2936,14 +2936,14 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2936 { 2936 {
2937 mpz_t tem; 2937 mpz_t tem;
2938 mpz_init (tem); 2938 mpz_init (tem);
2939 mpz_set_intmax (tem, XINT (val)); 2939 mpz_set_intmax (tem, XFIXNUM (val));
2940 mpz_sub (accum, accum, tem); 2940 mpz_sub (accum, accum, tem);
2941 mpz_clear (tem); 2941 mpz_clear (tem);
2942 } 2942 }
2943 else if (XINT (val) < 0) 2943 else if (XFIXNUM (val) < 0)
2944 mpz_add_ui (accum, accum, - XINT (val)); 2944 mpz_add_ui (accum, accum, - XFIXNUM (val));
2945 else 2945 else
2946 mpz_sub_ui (accum, accum, XINT (val)); 2946 mpz_sub_ui (accum, accum, XFIXNUM (val));
2947 break; 2947 break;
2948 case Amult: 2948 case Amult:
2949 if (BIGNUMP (val)) 2949 if (BIGNUMP (val))
@@ -2952,12 +2952,12 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2952 { 2952 {
2953 mpz_t tem; 2953 mpz_t tem;
2954 mpz_init (tem); 2954 mpz_init (tem);
2955 mpz_set_intmax (tem, XINT (val)); 2955 mpz_set_intmax (tem, XFIXNUM (val));
2956 mpz_mul (accum, accum, tem); 2956 mpz_mul (accum, accum, tem);
2957 mpz_clear (tem); 2957 mpz_clear (tem);
2958 } 2958 }
2959 else 2959 else
2960 mpz_mul_si (accum, accum, XINT (val)); 2960 mpz_mul_si (accum, accum, XFIXNUM (val));
2961 break; 2961 break;
2962 case Adiv: 2962 case Adiv:
2963 if (! (argnum || nargs == 1)) 2963 if (! (argnum || nargs == 1))
@@ -2965,13 +2965,13 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2965 if (BIGNUMP (val)) 2965 if (BIGNUMP (val))
2966 mpz_set (accum, XBIGNUM (val)->value); 2966 mpz_set (accum, XBIGNUM (val)->value);
2967 else 2967 else
2968 mpz_set_intmax (accum, XINT (val)); 2968 mpz_set_intmax (accum, XFIXNUM (val));
2969 } 2969 }
2970 else 2970 else
2971 { 2971 {
2972 /* Note that a bignum can never be 0, so we don't need 2972 /* Note that a bignum can never be 0, so we don't need
2973 to check that case. */ 2973 to check that case. */
2974 if (FIXNUMP (val) && XINT (val) == 0) 2974 if (FIXNUMP (val) && XFIXNUM (val) == 0)
2975 xsignal0 (Qarith_error); 2975 xsignal0 (Qarith_error);
2976 if (BIGNUMP (val)) 2976 if (BIGNUMP (val))
2977 mpz_tdiv_q (accum, accum, XBIGNUM (val)->value); 2977 mpz_tdiv_q (accum, accum, XBIGNUM (val)->value);
@@ -2979,13 +2979,13 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
2979 { 2979 {
2980 mpz_t tem; 2980 mpz_t tem;
2981 mpz_init (tem); 2981 mpz_init (tem);
2982 mpz_set_intmax (tem, XINT (val)); 2982 mpz_set_intmax (tem, XFIXNUM (val));
2983 mpz_tdiv_q (accum, accum, tem); 2983 mpz_tdiv_q (accum, accum, tem);
2984 mpz_clear (tem); 2984 mpz_clear (tem);
2985 } 2985 }
2986 else 2986 else
2987 { 2987 {
2988 EMACS_INT value = XINT (val); 2988 EMACS_INT value = XFIXNUM (val);
2989 bool negate = value < 0; 2989 bool negate = value < 0;
2990 if (negate) 2990 if (negate)
2991 value = -value; 2991 value = -value;
@@ -3002,7 +3002,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
3002 { 3002 {
3003 mpz_t tem; 3003 mpz_t tem;
3004 mpz_init (tem); 3004 mpz_init (tem);
3005 mpz_set_uintmax (tem, XUINT (val)); 3005 mpz_set_uintmax (tem, XUFIXNUM (val));
3006 mpz_and (accum, accum, tem); 3006 mpz_and (accum, accum, tem);
3007 mpz_clear (tem); 3007 mpz_clear (tem);
3008 } 3008 }
@@ -3014,7 +3014,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
3014 { 3014 {
3015 mpz_t tem; 3015 mpz_t tem;
3016 mpz_init (tem); 3016 mpz_init (tem);
3017 mpz_set_uintmax (tem, XUINT (val)); 3017 mpz_set_uintmax (tem, XUFIXNUM (val));
3018 mpz_ior (accum, accum, tem); 3018 mpz_ior (accum, accum, tem);
3019 mpz_clear (tem); 3019 mpz_clear (tem);
3020 } 3020 }
@@ -3026,7 +3026,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
3026 { 3026 {
3027 mpz_t tem; 3027 mpz_t tem;
3028 mpz_init (tem); 3028 mpz_init (tem);
3029 mpz_set_uintmax (tem, XUINT (val)); 3029 mpz_set_uintmax (tem, XUFIXNUM (val));
3030 mpz_xor (accum, accum, tem); 3030 mpz_xor (accum, accum, tem);
3031 mpz_clear (tem); 3031 mpz_clear (tem);
3032 } 3032 }
@@ -3059,7 +3059,7 @@ float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code,
3059 else 3059 else
3060 { 3060 {
3061 args[argnum] = val; /* runs into a compiler bug. */ 3061 args[argnum] = val; /* runs into a compiler bug. */
3062 next = XINT (args[argnum]); 3062 next = XFIXNUM (args[argnum]);
3063 } 3063 }
3064 switch (code) 3064 switch (code)
3065 { 3065 {
@@ -3146,11 +3146,11 @@ Both must be integers or markers. */)
3146 3146
3147 /* Note that a bignum can never be 0, so we don't need to check that 3147 /* Note that a bignum can never be 0, so we don't need to check that
3148 case. */ 3148 case. */
3149 if (FIXNUMP (y) && XINT (y) == 0) 3149 if (FIXNUMP (y) && XFIXNUM (y) == 0)
3150 xsignal0 (Qarith_error); 3150 xsignal0 (Qarith_error);
3151 3151
3152 if (FIXNUMP (x) && FIXNUMP (y)) 3152 if (FIXNUMP (x) && FIXNUMP (y))
3153 XSETINT (val, XINT (x) % XINT (y)); 3153 XSETINT (val, XFIXNUM (x) % XFIXNUM (y));
3154 else 3154 else
3155 { 3155 {
3156 mpz_t xm, ym, *xmp, *ymp; 3156 mpz_t xm, ym, *xmp, *ymp;
@@ -3161,7 +3161,7 @@ Both must be integers or markers. */)
3161 else 3161 else
3162 { 3162 {
3163 mpz_init (xm); 3163 mpz_init (xm);
3164 mpz_set_intmax (xm, XINT (x)); 3164 mpz_set_intmax (xm, XFIXNUM (x));
3165 xmp = &xm; 3165 xmp = &xm;
3166 } 3166 }
3167 3167
@@ -3170,7 +3170,7 @@ Both must be integers or markers. */)
3170 else 3170 else
3171 { 3171 {
3172 mpz_init (ym); 3172 mpz_init (ym);
3173 mpz_set_intmax (ym, XINT (y)); 3173 mpz_set_intmax (ym, XFIXNUM (y));
3174 ymp = &ym; 3174 ymp = &ym;
3175 } 3175 }
3176 3176
@@ -3201,7 +3201,7 @@ Both X and Y must be numbers or markers. */)
3201 3201
3202 /* Note that a bignum can never be 0, so we don't need to check that 3202 /* Note that a bignum can never be 0, so we don't need to check that
3203 case. */ 3203 case. */
3204 if (FIXNUMP (y) && XINT (y) == 0) 3204 if (FIXNUMP (y) && XFIXNUM (y) == 0)
3205 xsignal0 (Qarith_error); 3205 xsignal0 (Qarith_error);
3206 3206
3207 if (FLOATP (x) || FLOATP (y)) 3207 if (FLOATP (x) || FLOATP (y))
@@ -3209,8 +3209,8 @@ Both X and Y must be numbers or markers. */)
3209 3209
3210 if (FIXNUMP (x) && FIXNUMP (y)) 3210 if (FIXNUMP (x) && FIXNUMP (y))
3211 { 3211 {
3212 i1 = XINT (x); 3212 i1 = XFIXNUM (x);
3213 i2 = XINT (y); 3213 i2 = XFIXNUM (y);
3214 3214
3215 if (i2 == 0) 3215 if (i2 == 0)
3216 xsignal0 (Qarith_error); 3216 xsignal0 (Qarith_error);
@@ -3234,7 +3234,7 @@ Both X and Y must be numbers or markers. */)
3234 else 3234 else
3235 { 3235 {
3236 mpz_init (xm); 3236 mpz_init (xm);
3237 mpz_set_intmax (xm, XINT (x)); 3237 mpz_set_intmax (xm, XFIXNUM (x));
3238 xmp = &xm; 3238 xmp = &xm;
3239 } 3239 }
3240 3240
@@ -3243,7 +3243,7 @@ Both X and Y must be numbers or markers. */)
3243 else 3243 else
3244 { 3244 {
3245 mpz_init (ym); 3245 mpz_init (ym);
3246 mpz_set_intmax (ym, XINT (y)); 3246 mpz_set_intmax (ym, XFIXNUM (y));
3247 ymp = &ym; 3247 ymp = &ym;
3248 } 3248 }
3249 3249
@@ -3354,7 +3354,7 @@ representation. */)
3354 } 3354 }
3355 3355
3356 eassume (FIXNUMP (value)); 3356 eassume (FIXNUMP (value));
3357 EMACS_INT v = XINT (value) < 0 ? -1 - XINT (value) : XINT (value); 3357 EMACS_INT v = XFIXNUM (value) < 0 ? -1 - XFIXNUM (value) : XFIXNUM (value);
3358 return make_fixnum (EMACS_UINT_WIDTH <= UINT_WIDTH 3358 return make_fixnum (EMACS_UINT_WIDTH <= UINT_WIDTH
3359 ? count_one_bits (v) 3359 ? count_one_bits (v)
3360 : EMACS_UINT_WIDTH <= ULONG_WIDTH 3360 : EMACS_UINT_WIDTH <= ULONG_WIDTH
@@ -3377,12 +3377,12 @@ ash_lsh_impl (Lisp_Object value, Lisp_Object count, bool lsh)
3377 { 3377 {
3378 mpz_t result; 3378 mpz_t result;
3379 mpz_init (result); 3379 mpz_init (result);
3380 if (XINT (count) >= 0) 3380 if (XFIXNUM (count) >= 0)
3381 mpz_mul_2exp (result, XBIGNUM (value)->value, XINT (count)); 3381 mpz_mul_2exp (result, XBIGNUM (value)->value, XFIXNUM (count));
3382 else if (lsh) 3382 else if (lsh)
3383 mpz_tdiv_q_2exp (result, XBIGNUM (value)->value, - XINT (count)); 3383 mpz_tdiv_q_2exp (result, XBIGNUM (value)->value, - XFIXNUM (count));
3384 else 3384 else
3385 mpz_fdiv_q_2exp (result, XBIGNUM (value)->value, - XINT (count)); 3385 mpz_fdiv_q_2exp (result, XBIGNUM (value)->value, - XFIXNUM (count));
3386 val = make_number (result); 3386 val = make_number (result);
3387 mpz_clear (result); 3387 mpz_clear (result);
3388 } 3388 }
@@ -3393,19 +3393,19 @@ ash_lsh_impl (Lisp_Object value, Lisp_Object count, bool lsh)
3393 eassume (FIXNUMP (value)); 3393 eassume (FIXNUMP (value));
3394 mpz_init (result); 3394 mpz_init (result);
3395 3395
3396 mpz_set_intmax (result, XINT (value)); 3396 mpz_set_intmax (result, XFIXNUM (value));
3397 3397
3398 if (XINT (count) >= 0) 3398 if (XFIXNUM (count) >= 0)
3399 mpz_mul_2exp (result, result, XINT (count)); 3399 mpz_mul_2exp (result, result, XFIXNUM (count));
3400 else if (lsh) 3400 else if (lsh)
3401 { 3401 {
3402 if (mpz_sgn (result) > 0) 3402 if (mpz_sgn (result) > 0)
3403 mpz_fdiv_q_2exp (result, result, - XINT (count)); 3403 mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
3404 else 3404 else
3405 mpz_fdiv_q_2exp (result, result, - XINT (count)); 3405 mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
3406 } 3406 }
3407 else /* ash */ 3407 else /* ash */
3408 mpz_fdiv_q_2exp (result, result, - XINT (count)); 3408 mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
3409 3409
3410 val = make_number (result); 3410 val = make_number (result);
3411 mpz_clear (result); 3411 mpz_clear (result);
@@ -3453,13 +3453,13 @@ Markers are converted to integers. */)
3453 else 3453 else
3454 { 3454 {
3455 eassume (FIXNUMP (number)); 3455 eassume (FIXNUMP (number));
3456 if (XINT (number) < MOST_POSITIVE_FIXNUM) 3456 if (XFIXNUM (number) < MOST_POSITIVE_FIXNUM)
3457 XSETINT (number, XINT (number) + 1); 3457 XSETINT (number, XFIXNUM (number) + 1);
3458 else 3458 else
3459 { 3459 {
3460 mpz_t num; 3460 mpz_t num;
3461 mpz_init (num); 3461 mpz_init (num);
3462 mpz_set_intmax (num, XINT (number) + 1); 3462 mpz_set_intmax (num, XFIXNUM (number) + 1);
3463 number = make_number (num); 3463 number = make_number (num);
3464 mpz_clear (num); 3464 mpz_clear (num);
3465 } 3465 }
@@ -3488,13 +3488,13 @@ Markers are converted to integers. */)
3488 else 3488 else
3489 { 3489 {
3490 eassume (FIXNUMP (number)); 3490 eassume (FIXNUMP (number));
3491 if (XINT (number) > MOST_NEGATIVE_FIXNUM) 3491 if (XFIXNUM (number) > MOST_NEGATIVE_FIXNUM)
3492 XSETINT (number, XINT (number) - 1); 3492 XSETINT (number, XFIXNUM (number) - 1);
3493 else 3493 else
3494 { 3494 {
3495 mpz_t num; 3495 mpz_t num;
3496 mpz_init (num); 3496 mpz_init (num);
3497 mpz_set_intmax (num, XINT (number) - 1); 3497 mpz_set_intmax (num, XFIXNUM (number) - 1);
3498 number = make_number (num); 3498 number = make_number (num);
3499 mpz_clear (num); 3499 mpz_clear (num);
3500 } 3500 }
@@ -3518,7 +3518,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,
3518 else 3518 else
3519 { 3519 {
3520 eassume (FIXNUMP (number)); 3520 eassume (FIXNUMP (number));
3521 XSETINT (number, ~XINT (number)); 3521 XSETINT (number, ~XFIXNUM (number));
3522 } 3522 }
3523 return number; 3523 return number;
3524} 3524}
@@ -3908,13 +3908,13 @@ A is a bool vector, B is t or nil, and I is an index into A. */)
3908 CHECK_FIXNAT (i); 3908 CHECK_FIXNAT (i);
3909 3909
3910 nr_bits = bool_vector_size (a); 3910 nr_bits = bool_vector_size (a);
3911 if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */ 3911 if (XFIXNAT (i) > nr_bits) /* Allow one past the end for convenience */
3912 args_out_of_range (a, i); 3912 args_out_of_range (a, i);
3913 3913
3914 adata = bool_vector_data (a); 3914 adata = bool_vector_data (a);
3915 nr_words = bool_vector_words (nr_bits); 3915 nr_words = bool_vector_words (nr_bits);
3916 pos = XFASTINT (i) / BITS_PER_BITS_WORD; 3916 pos = XFIXNAT (i) / BITS_PER_BITS_WORD;
3917 offset = XFASTINT (i) % BITS_PER_BITS_WORD; 3917 offset = XFIXNAT (i) % BITS_PER_BITS_WORD;
3918 count = 0; 3918 count = 0;
3919 3919
3920 /* By XORing with twiddle, we transform the problem of "count 3920 /* By XORing with twiddle, we transform the problem of "count
diff --git a/src/dbusbind.c b/src/dbusbind.c
index ac3e0626000..4cf5604d745 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -522,8 +522,8 @@ xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi)
522 CHECK_FIXNUM_OR_FLOAT (x); 522 CHECK_FIXNUM_OR_FLOAT (x);
523 if (FIXNUMP (x)) 523 if (FIXNUMP (x))
524 { 524 {
525 if (lo <= XINT (x) && XINT (x) <= hi) 525 if (lo <= XFIXNUM (x) && XFIXNUM (x) <= hi)
526 return XINT (x); 526 return XFIXNUM (x);
527 } 527 }
528 else 528 else
529 { 529 {
@@ -550,8 +550,8 @@ xd_extract_unsigned (Lisp_Object x, uintmax_t hi)
550 CHECK_FIXNUM_OR_FLOAT (x); 550 CHECK_FIXNUM_OR_FLOAT (x);
551 if (FIXNUMP (x)) 551 if (FIXNUMP (x))
552 { 552 {
553 if (0 <= XINT (x) && XINT (x) <= hi) 553 if (0 <= XFIXNUM (x) && XFIXNUM (x) <= hi)
554 return XINT (x); 554 return XFIXNUM (x);
555 } 555 }
556 else 556 else
557 { 557 {
@@ -586,7 +586,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
586 case DBUS_TYPE_BYTE: 586 case DBUS_TYPE_BYTE:
587 CHECK_FIXNAT (object); 587 CHECK_FIXNAT (object);
588 { 588 {
589 unsigned char val = XFASTINT (object) & 0xFF; 589 unsigned char val = XFIXNAT (object) & 0xFF;
590 XD_DEBUG_MESSAGE ("%c %u", dtype, val); 590 XD_DEBUG_MESSAGE ("%c %u", dtype, val);
591 if (!dbus_message_iter_append_basic (iter, dtype, &val)) 591 if (!dbus_message_iter_append_basic (iter, dtype, &val))
592 XD_SIGNAL2 (build_string ("Unable to append argument"), object); 592 XD_SIGNAL2 (build_string ("Unable to append argument"), object);
@@ -1276,10 +1276,10 @@ usage: (dbus-message-internal &rest REST) */)
1276 handler = Qnil; 1276 handler = Qnil;
1277 1277
1278 CHECK_FIXNAT (message_type); 1278 CHECK_FIXNAT (message_type);
1279 if (! (DBUS_MESSAGE_TYPE_INVALID < XFASTINT (message_type) 1279 if (! (DBUS_MESSAGE_TYPE_INVALID < XFIXNAT (message_type)
1280 && XFASTINT (message_type) < DBUS_NUM_MESSAGE_TYPES)) 1280 && XFIXNAT (message_type) < DBUS_NUM_MESSAGE_TYPES))
1281 XD_SIGNAL2 (build_string ("Invalid message type"), message_type); 1281 XD_SIGNAL2 (build_string ("Invalid message type"), message_type);
1282 mtype = XFASTINT (message_type); 1282 mtype = XFIXNAT (message_type);
1283 1283
1284 if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL) 1284 if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
1285 || (mtype == DBUS_MESSAGE_TYPE_SIGNAL)) 1285 || (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
@@ -1410,7 +1410,7 @@ usage: (dbus-message-internal &rest REST) */)
1410 if ((count + 2 <= nargs) && EQ (args[count], QCtimeout)) 1410 if ((count + 2 <= nargs) && EQ (args[count], QCtimeout))
1411 { 1411 {
1412 CHECK_FIXNAT (args[count+1]); 1412 CHECK_FIXNAT (args[count+1]);
1413 timeout = min (XFASTINT (args[count+1]), INT_MAX); 1413 timeout = min (XFIXNAT (args[count+1]), INT_MAX);
1414 count = count+2; 1414 count = count+2;
1415 } 1415 }
1416 1416
diff --git a/src/decompress.c b/src/decompress.c
index 6f75f821c40..9f7fbe41952 100644
--- a/src/decompress.c
+++ b/src/decompress.c
@@ -149,8 +149,8 @@ This function can be called only in unibyte buffers. */)
149 149
150 /* This is a unibyte buffer, so character positions and bytes are 150 /* This is a unibyte buffer, so character positions and bytes are
151 the same. */ 151 the same. */
152 istart = XINT (start); 152 istart = XFIXNUM (start);
153 iend = XINT (end); 153 iend = XFIXNUM (end);
154 154
155 /* Do the following before manipulating the gap. */ 155 /* Do the following before manipulating the gap. */
156 modify_text (istart, iend); 156 modify_text (istart, iend);
diff --git a/src/dired.c b/src/dired.c
index a0b10d070ec..3bb5997bd69 100644
--- a/src/dired.c
+++ b/src/dired.c
@@ -704,7 +704,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
704 = Fcompare_strings (bestmatch, zero, make_fixnum (compare), 704 = Fcompare_strings (bestmatch, zero, make_fixnum (compare),
705 name, zero, make_fixnum (compare), 705 name, zero, make_fixnum (compare),
706 completion_ignore_case ? Qt : Qnil); 706 completion_ignore_case ? Qt : Qnil);
707 ptrdiff_t matchsize = EQ (cmp, Qt) ? compare : eabs (XINT (cmp)) - 1; 707 ptrdiff_t matchsize = EQ (cmp, Qt) ? compare : eabs (XFIXNUM (cmp)) - 1;
708 708
709 if (completion_ignore_case) 709 if (completion_ignore_case)
710 { 710 {
diff --git a/src/dispextern.h b/src/dispextern.h
index 0e70b3f7247..944a37d4889 100644
--- a/src/dispextern.h
+++ b/src/dispextern.h
@@ -306,24 +306,24 @@ INLINE int
306GLYPH_CODE_CHAR (Lisp_Object gc) 306GLYPH_CODE_CHAR (Lisp_Object gc)
307{ 307{
308 return (CONSP (gc) 308 return (CONSP (gc)
309 ? XINT (XCAR (gc)) 309 ? XFIXNUM (XCAR (gc))
310 : XINT (gc) & MAX_CHAR); 310 : XFIXNUM (gc) & MAX_CHAR);
311} 311}
312 312
313INLINE int 313INLINE int
314GLYPH_CODE_FACE (Lisp_Object gc) 314GLYPH_CODE_FACE (Lisp_Object gc)
315{ 315{
316 return CONSP (gc) ? XINT (XCDR (gc)) : XINT (gc) >> CHARACTERBITS; 316 return CONSP (gc) ? XFIXNUM (XCDR (gc)) : XFIXNUM (gc) >> CHARACTERBITS;
317} 317}
318 318
319#define SET_GLYPH_FROM_GLYPH_CODE(glyph, gc) \ 319#define SET_GLYPH_FROM_GLYPH_CODE(glyph, gc) \
320 do \ 320 do \
321 { \ 321 { \
322 if (CONSP (gc)) \ 322 if (CONSP (gc)) \
323 SET_GLYPH (glyph, XINT (XCAR (gc)), XINT (XCDR (gc))); \ 323 SET_GLYPH (glyph, XFIXNUM (XCAR (gc)), XFIXNUM (XCDR (gc))); \
324 else \ 324 else \
325 SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \ 325 SET_GLYPH (glyph, (XFIXNUM (gc) & ((1 << CHARACTERBITS)-1)), \
326 (XINT (gc) >> CHARACTERBITS)); \ 326 (XFIXNUM (gc) >> CHARACTERBITS)); \
327 } \ 327 } \
328 while (false) 328 while (false)
329 329
diff --git a/src/dispnew.c b/src/dispnew.c
index 0daa23e700d..b54ae883649 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5718,7 +5718,7 @@ additional wait period, in milliseconds; this is for backwards compatibility.
5718 if (!NILP (milliseconds)) 5718 if (!NILP (milliseconds))
5719 { 5719 {
5720 CHECK_FIXNUM (milliseconds); 5720 CHECK_FIXNUM (milliseconds);
5721 duration += XINT (milliseconds) / 1000.0; 5721 duration += XFIXNUM (milliseconds) / 1000.0;
5722 } 5722 }
5723 5723
5724 if (duration > 0) 5724 if (duration > 0)
@@ -5768,7 +5768,7 @@ sit_for (Lisp_Object timeout, bool reading, int display_option)
5768 5768
5769 if (FIXNUMP (timeout)) 5769 if (FIXNUMP (timeout))
5770 { 5770 {
5771 sec = XINT (timeout); 5771 sec = XFIXNUM (timeout);
5772 if (sec <= 0) 5772 if (sec <= 0)
5773 return Qt; 5773 return Qt;
5774 nsec = 0; 5774 nsec = 0;
diff --git a/src/disptab.h b/src/disptab.h
index 3911efcf4f6..c8de011f7d6 100644
--- a/src/disptab.h
+++ b/src/disptab.h
@@ -79,7 +79,7 @@ extern struct Lisp_Char_Table *buffer_display_table (void);
79#define GLYPH_FOLLOW_ALIASES(base, length, g) \ 79#define GLYPH_FOLLOW_ALIASES(base, length, g) \
80 do { \ 80 do { \
81 while (GLYPH_ALIAS_P ((base), (length), (g))) \ 81 while (GLYPH_ALIAS_P ((base), (length), (g))) \
82 SET_GLYPH_CHAR ((g), XINT ((base)[GLYPH_CHAR (g)])); \ 82 SET_GLYPH_CHAR ((g), XFIXNUM ((base)[GLYPH_CHAR (g)])); \
83 if (!GLYPH_CHAR_VALID_P (g)) \ 83 if (!GLYPH_CHAR_VALID_P (g)) \
84 SET_GLYPH_CHAR (g, ' '); \ 84 SET_GLYPH_CHAR (g, ' '); \
85 } while (false) 85 } while (false)
diff --git a/src/doc.c b/src/doc.c
index a71c81b4e96..343734637fc 100644
--- a/src/doc.c
+++ b/src/doc.c
@@ -102,7 +102,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
102 else 102 else
103 return Qnil; 103 return Qnil;
104 104
105 position = eabs (XINT (pos)); 105 position = eabs (XFIXNUM (pos));
106 106
107 if (!STRINGP (Vdoc_directory)) 107 if (!STRINGP (Vdoc_directory))
108 return Qnil; 108 return Qnil;
diff --git a/src/dosfns.c b/src/dosfns.c
index e68c1a71354..25932ff1e1c 100644
--- a/src/dosfns.c
+++ b/src/dosfns.c
@@ -67,21 +67,21 @@ REGISTERS should be a vector produced by `make-register' and
67 union REGS inregs, outregs; 67 union REGS inregs, outregs;
68 68
69 CHECK_FIXNUM (interrupt); 69 CHECK_FIXNUM (interrupt);
70 no = (unsigned long) XINT (interrupt); 70 no = (unsigned long) XFIXNUM (interrupt);
71 CHECK_VECTOR (registers); 71 CHECK_VECTOR (registers);
72 if (no < 0 || no > 0xff || ASIZE (registers) != 8) 72 if (no < 0 || no > 0xff || ASIZE (registers) != 8)
73 return Qnil; 73 return Qnil;
74 for (i = 0; i < 8; i++) 74 for (i = 0; i < 8; i++)
75 CHECK_FIXNUM (AREF (registers, i)); 75 CHECK_FIXNUM (AREF (registers, i));
76 76
77 inregs.x.ax = (unsigned long) XFASTINT (AREF (registers, 0)); 77 inregs.x.ax = (unsigned long) XFIXNAT (AREF (registers, 0));
78 inregs.x.bx = (unsigned long) XFASTINT (AREF (registers, 1)); 78 inregs.x.bx = (unsigned long) XFIXNAT (AREF (registers, 1));
79 inregs.x.cx = (unsigned long) XFASTINT (AREF (registers, 2)); 79 inregs.x.cx = (unsigned long) XFIXNAT (AREF (registers, 2));
80 inregs.x.dx = (unsigned long) XFASTINT (AREF (registers, 3)); 80 inregs.x.dx = (unsigned long) XFIXNAT (AREF (registers, 3));
81 inregs.x.si = (unsigned long) XFASTINT (AREF (registers, 4)); 81 inregs.x.si = (unsigned long) XFIXNAT (AREF (registers, 4));
82 inregs.x.di = (unsigned long) XFASTINT (AREF (registers, 5)); 82 inregs.x.di = (unsigned long) XFIXNAT (AREF (registers, 5));
83 inregs.x.cflag = (unsigned long) XFASTINT (AREF (registers, 6)); 83 inregs.x.cflag = (unsigned long) XFIXNAT (AREF (registers, 6));
84 inregs.x.flags = (unsigned long) XFASTINT (AREF (registers, 7)); 84 inregs.x.flags = (unsigned long) XFIXNAT (AREF (registers, 7));
85 85
86 int86 (no, &inregs, &outregs); 86 int86 (no, &inregs, &outregs);
87 87
@@ -107,7 +107,7 @@ Return the updated VECTOR. */)
107 char *buf; 107 char *buf;
108 108
109 CHECK_FIXNUM (address); 109 CHECK_FIXNUM (address);
110 offs = (unsigned long) XINT (address); 110 offs = (unsigned long) XFIXNUM (address);
111 CHECK_VECTOR (vector); 111 CHECK_VECTOR (vector);
112 len = ASIZE (vector); 112 len = ASIZE (vector);
113 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) 113 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
@@ -130,7 +130,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
130 char *buf; 130 char *buf;
131 131
132 CHECK_FIXNUM (address); 132 CHECK_FIXNUM (address);
133 offs = (unsigned long) XINT (address); 133 offs = (unsigned long) XFIXNUM (address);
134 CHECK_VECTOR (vector); 134 CHECK_VECTOR (vector);
135 len = ASIZE (vector); 135 len = ASIZE (vector);
136 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len) 136 if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
@@ -140,7 +140,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
140 for (i = 0; i < len; i++) 140 for (i = 0; i < len; i++)
141 { 141 {
142 CHECK_FIXNUM (AREF (vector, i)); 142 CHECK_FIXNUM (AREF (vector, i));
143 buf[i] = (unsigned char) XFASTINT (AREF (vector, i)) & 0xFF; 143 buf[i] = (unsigned char) XFIXNAT (AREF (vector, i)) & 0xFF;
144 } 144 }
145 145
146 dosmemput (buf, len, offs); 146 dosmemput (buf, len, offs);
@@ -155,7 +155,7 @@ The current keyboard layout is available in dos-keyboard-code. */)
155 (Lisp_Object country_code, Lisp_Object allkeys) 155 (Lisp_Object country_code, Lisp_Object allkeys)
156{ 156{
157 CHECK_FIXNUM (country_code); 157 CHECK_FIXNUM (country_code);
158 if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys))) 158 if (!dos_set_keyboard (XFIXNUM (country_code), !NILP (allkeys)))
159 return Qnil; 159 return Qnil;
160 return Qt; 160 return Qt;
161} 161}
@@ -521,7 +521,7 @@ system_process_attributes (Lisp_Object pid)
521 Lisp_Object attrs = Qnil; 521 Lisp_Object attrs = Qnil;
522 522
523 CHECK_FIXNUM_OR_FLOAT (pid); 523 CHECK_FIXNUM_OR_FLOAT (pid);
524 proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid); 524 proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XFIXNUM (pid);
525 525
526 if (proc_id == getpid ()) 526 if (proc_id == getpid ())
527 { 527 {
diff --git a/src/editfns.c b/src/editfns.c
index 09c17cbd926..f9157cd8449 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -181,7 +181,7 @@ tzlookup (Lisp_Object zone, bool settz)
181 zone = XCAR (zone); 181 zone = XCAR (zone);
182 } 182 }
183 183
184 EMACS_INT abszone = eabs (XINT (zone)), hour = abszone / (60 * 60); 184 EMACS_INT abszone = eabs (XFIXNUM (zone)), hour = abszone / (60 * 60);
185 int hour_remainder = abszone % (60 * 60); 185 int hour_remainder = abszone % (60 * 60);
186 int min = hour_remainder / 60, sec = hour_remainder % 60; 186 int min = hour_remainder / 60, sec = hour_remainder % 60;
187 187
@@ -196,8 +196,8 @@ tzlookup (Lisp_Object zone, bool settz)
196 prec += 2, numzone = 100 * numzone + sec; 196 prec += 2, numzone = 100 * numzone + sec;
197 } 197 }
198 sprintf (tzbuf, tzbuf_format, prec, 198 sprintf (tzbuf, tzbuf_format, prec,
199 XINT (zone) < 0 ? -numzone : numzone, 199 XFIXNUM (zone) < 0 ? -numzone : numzone,
200 &"-"[XINT (zone) < 0], hour, min, sec); 200 &"-"[XFIXNUM (zone) < 0], hour, min, sec);
201 zone_string = tzbuf; 201 zone_string = tzbuf;
202 } 202 }
203 else 203 else
@@ -205,7 +205,7 @@ tzlookup (Lisp_Object zone, bool settz)
205 AUTO_STRING (leading, "<"); 205 AUTO_STRING (leading, "<");
206 AUTO_STRING_WITH_LEN (trailing, tzbuf, 206 AUTO_STRING_WITH_LEN (trailing, tzbuf,
207 sprintf (tzbuf, trailing_tzbuf_format, 207 sprintf (tzbuf, trailing_tzbuf_format,
208 &"-"[XINT (zone) < 0], 208 &"-"[XFIXNUM (zone) < 0],
209 hour, min, sec)); 209 hour, min, sec));
210 zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr), 210 zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr),
211 trailing)); 211 trailing));
@@ -217,11 +217,11 @@ tzlookup (Lisp_Object zone, bool settz)
217 new_tz = tzalloc (zone_string); 217 new_tz = tzalloc (zone_string);
218 218
219 if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer 219 if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer
220 && XINT (zone) % (60 * 60) == 0) 220 && XFIXNUM (zone) % (60 * 60) == 0)
221 { 221 {
222 /* tzalloc mishandles POSIX strings; fall back on tzdb if 222 /* tzalloc mishandles POSIX strings; fall back on tzdb if
223 possible (Bug#30738). */ 223 possible (Bug#30738). */
224 sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60))); 224 sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XFIXNUM (zone) / (60 * 60)));
225 new_tz = tzalloc (zone_string); 225 new_tz = tzalloc (zone_string);
226 } 226 }
227 227
@@ -359,7 +359,7 @@ usage: (char-to-string CHAR) */)
359 unsigned char str[MAX_MULTIBYTE_LENGTH]; 359 unsigned char str[MAX_MULTIBYTE_LENGTH];
360 360
361 CHECK_CHARACTER (character); 361 CHECK_CHARACTER (character);
362 c = XFASTINT (character); 362 c = XFIXNAT (character);
363 363
364 len = CHAR_STRING (c, str); 364 len = CHAR_STRING (c, str);
365 return make_string_from_bytes ((char *) str, 1, len); 365 return make_string_from_bytes ((char *) str, 1, len);
@@ -371,9 +371,9 @@ DEFUN ("byte-to-string", Fbyte_to_string, Sbyte_to_string, 1, 1, 0,
371{ 371{
372 unsigned char b; 372 unsigned char b;
373 CHECK_FIXNUM (byte); 373 CHECK_FIXNUM (byte);
374 if (XINT (byte) < 0 || XINT (byte) > 255) 374 if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255)
375 error ("Invalid byte"); 375 error ("Invalid byte");
376 b = XINT (byte); 376 b = XFIXNUM (byte);
377 return make_string_from_bytes ((char *) &b, 1, 1); 377 return make_string_from_bytes ((char *) &b, 1, 1);
378} 378}
379 379
@@ -422,7 +422,7 @@ The return value is POSITION. */)
422 if (MARKERP (position)) 422 if (MARKERP (position))
423 set_point_from_marker (position); 423 set_point_from_marker (position);
424 else if (FIXNUMP (position)) 424 else if (FIXNUMP (position))
425 SET_PT (clip_to_bounds (BEGV, XINT (position), ZV)); 425 SET_PT (clip_to_bounds (BEGV, XFIXNUM (position), ZV));
426 else 426 else
427 wrong_type_argument (Qinteger_or_marker_p, position); 427 wrong_type_argument (Qinteger_or_marker_p, position);
428 return position; 428 return position;
@@ -448,9 +448,9 @@ region_limit (bool beginningp)
448 error ("The mark is not set now, so there is no region"); 448 error ("The mark is not set now, so there is no region");
449 449
450 /* Clip to the current narrowing (bug#11770). */ 450 /* Clip to the current narrowing (bug#11770). */
451 return make_fixnum ((PT < XFASTINT (m)) == beginningp 451 return make_fixnum ((PT < XFIXNAT (m)) == beginningp
452 ? PT 452 ? PT
453 : clip_to_bounds (BEGV, XFASTINT (m), ZV)); 453 : clip_to_bounds (BEGV, XFIXNAT (m), ZV));
454} 454}
455 455
456DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0, 456DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,
@@ -553,7 +553,7 @@ at POSITION. */)
553 return Fget_text_property (position, prop, object); 553 return Fget_text_property (position, prop, object);
554 else 554 else
555 { 555 {
556 EMACS_INT posn = XINT (position); 556 EMACS_INT posn = XFIXNUM (position);
557 ptrdiff_t noverlays; 557 ptrdiff_t noverlays;
558 Lisp_Object *overlay_vec, tem; 558 Lisp_Object *overlay_vec, tem;
559 struct buffer *obuf = current_buffer; 559 struct buffer *obuf = current_buffer;
@@ -606,8 +606,8 @@ at POSITION. */)
606 if (stickiness > 0) 606 if (stickiness > 0)
607 return Fget_text_property (position, prop, object); 607 return Fget_text_property (position, prop, object);
608 else if (stickiness < 0 608 else if (stickiness < 0
609 && XINT (position) > BUF_BEGV (XBUFFER (object))) 609 && XFIXNUM (position) > BUF_BEGV (XBUFFER (object)))
610 return Fget_text_property (make_fixnum (XINT (position) - 1), 610 return Fget_text_property (make_fixnum (XFIXNUM (position) - 1),
611 prop, object); 611 prop, object);
612 else 612 else
613 return Qnil; 613 return Qnil;
@@ -655,8 +655,8 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
655 after_field 655 after_field
656 = get_char_property_and_overlay (pos, Qfield, Qnil, NULL); 656 = get_char_property_and_overlay (pos, Qfield, Qnil, NULL);
657 before_field 657 before_field
658 = (XFASTINT (pos) > BEGV 658 = (XFIXNAT (pos) > BEGV
659 ? get_char_property_and_overlay (make_fixnum (XINT (pos) - 1), 659 ? get_char_property_and_overlay (make_fixnum (XFIXNUM (pos) - 1),
660 Qfield, Qnil, NULL) 660 Qfield, Qnil, NULL)
661 /* Using nil here would be a more obvious choice, but it would 661 /* Using nil here would be a more obvious choice, but it would
662 fail when the buffer starts with a non-sticky field. */ 662 fail when the buffer starts with a non-sticky field. */
@@ -710,7 +710,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
710 if (at_field_start) 710 if (at_field_start)
711 /* POS is at the edge of a field, and we should consider it as 711 /* POS is at the edge of a field, and we should consider it as
712 the beginning of the following field. */ 712 the beginning of the following field. */
713 *beg = XFASTINT (pos); 713 *beg = XFIXNAT (pos);
714 else 714 else
715 /* Find the previous field boundary. */ 715 /* Find the previous field boundary. */
716 { 716 {
@@ -722,7 +722,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
722 722
723 p = Fprevious_single_char_property_change (p, Qfield, Qnil, 723 p = Fprevious_single_char_property_change (p, Qfield, Qnil,
724 beg_limit); 724 beg_limit);
725 *beg = NILP (p) ? BEGV : XFASTINT (p); 725 *beg = NILP (p) ? BEGV : XFIXNAT (p);
726 } 726 }
727 } 727 }
728 728
@@ -731,7 +731,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
731 if (at_field_end) 731 if (at_field_end)
732 /* POS is at the edge of a field, and we should consider it as 732 /* POS is at the edge of a field, and we should consider it as
733 the end of the previous field. */ 733 the end of the previous field. */
734 *end = XFASTINT (pos); 734 *end = XFIXNAT (pos);
735 else 735 else
736 /* Find the next field boundary. */ 736 /* Find the next field boundary. */
737 { 737 {
@@ -742,7 +742,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
742 742
743 pos = Fnext_single_char_property_change (pos, Qfield, Qnil, 743 pos = Fnext_single_char_property_change (pos, Qfield, Qnil,
744 end_limit); 744 end_limit);
745 *end = NILP (pos) ? ZV : XFASTINT (pos); 745 *end = NILP (pos) ? ZV : XFIXNAT (pos);
746 } 746 }
747 } 747 }
748} 748}
@@ -859,10 +859,10 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
859 CHECK_FIXNUM_COERCE_MARKER (new_pos); 859 CHECK_FIXNUM_COERCE_MARKER (new_pos);
860 CHECK_FIXNUM_COERCE_MARKER (old_pos); 860 CHECK_FIXNUM_COERCE_MARKER (old_pos);
861 861
862 fwd = (XINT (new_pos) > XINT (old_pos)); 862 fwd = (XFIXNUM (new_pos) > XFIXNUM (old_pos));
863 863
864 prev_old = make_fixnum (XINT (old_pos) - 1); 864 prev_old = make_fixnum (XFIXNUM (old_pos) - 1);
865 prev_new = make_fixnum (XINT (new_pos) - 1); 865 prev_new = make_fixnum (XFIXNUM (new_pos) - 1);
866 866
867 if (NILP (Vinhibit_field_text_motion) 867 if (NILP (Vinhibit_field_text_motion)
868 && !EQ (new_pos, old_pos) 868 && !EQ (new_pos, old_pos)
@@ -872,16 +872,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
872 previous positions; we could use `Fget_pos_property' 872 previous positions; we could use `Fget_pos_property'
873 instead, but in itself that would fail inside non-sticky 873 instead, but in itself that would fail inside non-sticky
874 fields (like comint prompts). */ 874 fields (like comint prompts). */
875 || (XFASTINT (new_pos) > BEGV 875 || (XFIXNAT (new_pos) > BEGV
876 && !NILP (Fget_char_property (prev_new, Qfield, Qnil))) 876 && !NILP (Fget_char_property (prev_new, Qfield, Qnil)))
877 || (XFASTINT (old_pos) > BEGV 877 || (XFIXNAT (old_pos) > BEGV
878 && !NILP (Fget_char_property (prev_old, Qfield, Qnil)))) 878 && !NILP (Fget_char_property (prev_old, Qfield, Qnil))))
879 && (NILP (inhibit_capture_property) 879 && (NILP (inhibit_capture_property)
880 /* Field boundaries are again a problem; but now we must 880 /* Field boundaries are again a problem; but now we must
881 decide the case exactly, so we need to call 881 decide the case exactly, so we need to call
882 `get_pos_property' as well. */ 882 `get_pos_property' as well. */
883 || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil)) 883 || (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil))
884 && (XFASTINT (old_pos) <= BEGV 884 && (XFIXNAT (old_pos) <= BEGV
885 || NILP (Fget_char_property 885 || NILP (Fget_char_property
886 (old_pos, inhibit_capture_property, Qnil)) 886 (old_pos, inhibit_capture_property, Qnil))
887 || NILP (Fget_char_property 887 || NILP (Fget_char_property
@@ -901,7 +901,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
901 other side of NEW_POS, which would mean that NEW_POS is 901 other side of NEW_POS, which would mean that NEW_POS is
902 already acceptable, and it's not necessary to constrain it 902 already acceptable, and it's not necessary to constrain it
903 to FIELD_BOUND. */ 903 to FIELD_BOUND. */
904 ((XFASTINT (field_bound) < XFASTINT (new_pos)) ? fwd : !fwd) 904 ((XFIXNAT (field_bound) < XFIXNAT (new_pos)) ? fwd : !fwd)
905 /* NEW_POS should be constrained, but only if either 905 /* NEW_POS should be constrained, but only if either
906 ONLY_IN_LINE is nil (in which case any constraint is OK), 906 ONLY_IN_LINE is nil (in which case any constraint is OK),
907 or NEW_POS and FIELD_BOUND are on the same line (in which 907 or NEW_POS and FIELD_BOUND are on the same line (in which
@@ -910,16 +910,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
910 /* This is the ONLY_IN_LINE case, check that NEW_POS and 910 /* This is the ONLY_IN_LINE case, check that NEW_POS and
911 FIELD_BOUND are on the same line by seeing whether 911 FIELD_BOUND are on the same line by seeing whether
912 there's an intervening newline or not. */ 912 there's an intervening newline or not. */
913 || (find_newline (XFASTINT (new_pos), -1, 913 || (find_newline (XFIXNAT (new_pos), -1,
914 XFASTINT (field_bound), -1, 914 XFIXNAT (field_bound), -1,
915 fwd ? -1 : 1, &shortage, NULL, 1), 915 fwd ? -1 : 1, &shortage, NULL, 1),
916 shortage != 0))) 916 shortage != 0)))
917 /* Constrain NEW_POS to FIELD_BOUND. */ 917 /* Constrain NEW_POS to FIELD_BOUND. */
918 new_pos = field_bound; 918 new_pos = field_bound;
919 919
920 if (orig_point && XFASTINT (new_pos) != orig_point) 920 if (orig_point && XFIXNAT (new_pos) != orig_point)
921 /* The NEW_POS argument was originally nil, so automatically set PT. */ 921 /* The NEW_POS argument was originally nil, so automatically set PT. */
922 SET_PT (XFASTINT (new_pos)); 922 SET_PT (XFIXNAT (new_pos));
923 } 923 }
924 924
925 return new_pos; 925 return new_pos;
@@ -952,11 +952,11 @@ This function does not move point. */)
952 else 952 else
953 CHECK_FIXNUM (n); 953 CHECK_FIXNUM (n);
954 954
955 scan_newline_from_point (XINT (n) - 1, &charpos, &bytepos); 955 scan_newline_from_point (XFIXNUM (n) - 1, &charpos, &bytepos);
956 956
957 /* Return END constrained to the current input field. */ 957 /* Return END constrained to the current input field. */
958 return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT), 958 return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT),
959 XINT (n) != 1 ? Qt : Qnil, 959 XFIXNUM (n) != 1 ? Qt : Qnil,
960 Qt, Qnil); 960 Qt, Qnil);
961} 961}
962 962
@@ -987,7 +987,7 @@ This function does not move point. */)
987 else 987 else
988 CHECK_FIXNUM (n); 988 CHECK_FIXNUM (n);
989 989
990 clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX); 990 clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XFIXNUM (n), PTRDIFF_MAX);
991 end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0), 991 end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0),
992 NULL); 992 NULL);
993 993
@@ -1161,9 +1161,9 @@ If POSITION is out of range, the value is nil. */)
1161 (Lisp_Object position) 1161 (Lisp_Object position)
1162{ 1162{
1163 CHECK_FIXNUM_COERCE_MARKER (position); 1163 CHECK_FIXNUM_COERCE_MARKER (position);
1164 if (XINT (position) < BEG || XINT (position) > Z) 1164 if (XFIXNUM (position) < BEG || XFIXNUM (position) > Z)
1165 return Qnil; 1165 return Qnil;
1166 return make_fixnum (CHAR_TO_BYTE (XINT (position))); 1166 return make_fixnum (CHAR_TO_BYTE (XFIXNUM (position)));
1167} 1167}
1168 1168
1169DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0, 1169DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0,
@@ -1174,7 +1174,7 @@ If BYTEPOS is out of range, the value is nil. */)
1174 ptrdiff_t pos_byte; 1174 ptrdiff_t pos_byte;
1175 1175
1176 CHECK_FIXNUM (bytepos); 1176 CHECK_FIXNUM (bytepos);
1177 pos_byte = XINT (bytepos); 1177 pos_byte = XFIXNUM (bytepos);
1178 if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE) 1178 if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE)
1179 return Qnil; 1179 return Qnil;
1180 if (Z != Z_BYTE) 1180 if (Z != Z_BYTE)
@@ -1281,10 +1281,10 @@ If POS is out of range, the value is nil. */)
1281 else 1281 else
1282 { 1282 {
1283 CHECK_FIXNUM_COERCE_MARKER (pos); 1283 CHECK_FIXNUM_COERCE_MARKER (pos);
1284 if (XINT (pos) < BEGV || XINT (pos) >= ZV) 1284 if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) >= ZV)
1285 return Qnil; 1285 return Qnil;
1286 1286
1287 pos_byte = CHAR_TO_BYTE (XINT (pos)); 1287 pos_byte = CHAR_TO_BYTE (XFIXNUM (pos));
1288 } 1288 }
1289 1289
1290 return make_fixnum (FETCH_CHAR (pos_byte)); 1290 return make_fixnum (FETCH_CHAR (pos_byte));
@@ -1316,10 +1316,10 @@ If POS is out of range, the value is nil. */)
1316 { 1316 {
1317 CHECK_FIXNUM_COERCE_MARKER (pos); 1317 CHECK_FIXNUM_COERCE_MARKER (pos);
1318 1318
1319 if (XINT (pos) <= BEGV || XINT (pos) > ZV) 1319 if (XFIXNUM (pos) <= BEGV || XFIXNUM (pos) > ZV)
1320 return Qnil; 1320 return Qnil;
1321 1321
1322 pos_byte = CHAR_TO_BYTE (XINT (pos)); 1322 pos_byte = CHAR_TO_BYTE (XFIXNUM (pos));
1323 } 1323 }
1324 1324
1325 if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) 1325 if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
@@ -1847,10 +1847,10 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec,
1847 return 0; 1847 return 0;
1848 } 1848 }
1849 1849
1850 hi = XINT (high); 1850 hi = XFIXNUM (high);
1851 lo = XINT (low); 1851 lo = XFIXNUM (low);
1852 us = XINT (usec); 1852 us = XFIXNUM (usec);
1853 ps = XINT (psec); 1853 ps = XFIXNUM (psec);
1854 1854
1855 /* Normalize out-of-range lower-order components by carrying 1855 /* Normalize out-of-range lower-order components by carrying
1856 each overflow into the next higher-order component. */ 1856 each overflow into the next higher-order component. */
@@ -2207,7 +2207,7 @@ static int
2207check_tm_member (Lisp_Object obj, int offset) 2207check_tm_member (Lisp_Object obj, int offset)
2208{ 2208{
2209 CHECK_FIXNUM (obj); 2209 CHECK_FIXNUM (obj);
2210 EMACS_INT n = XINT (obj); 2210 EMACS_INT n = XFIXNUM (obj);
2211 int result; 2211 int result;
2212 if (INT_SUBTRACT_WRAPV (n, offset, &result)) 2212 if (INT_SUBTRACT_WRAPV (n, offset, &result))
2213 time_overflow (); 2213 time_overflow ();
@@ -2532,7 +2532,7 @@ general_insert_function (void (*insert_func)
2532 val = args[argnum]; 2532 val = args[argnum];
2533 if (CHARACTERP (val)) 2533 if (CHARACTERP (val))
2534 { 2534 {
2535 int c = XFASTINT (val); 2535 int c = XFIXNAT (val);
2536 unsigned char str[MAX_MULTIBYTE_LENGTH]; 2536 unsigned char str[MAX_MULTIBYTE_LENGTH];
2537 int len; 2537 int len;
2538 2538
@@ -2689,17 +2689,17 @@ called interactively, INHERIT is t. */)
2689 if (NILP (count)) 2689 if (NILP (count))
2690 XSETFASTINT (count, 1); 2690 XSETFASTINT (count, 1);
2691 CHECK_FIXNUM (count); 2691 CHECK_FIXNUM (count);
2692 c = XFASTINT (character); 2692 c = XFIXNAT (character);
2693 2693
2694 if (!NILP (BVAR (current_buffer, enable_multibyte_characters))) 2694 if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
2695 len = CHAR_STRING (c, str); 2695 len = CHAR_STRING (c, str);
2696 else 2696 else
2697 str[0] = c, len = 1; 2697 str[0] = c, len = 1;
2698 if (XINT (count) <= 0) 2698 if (XFIXNUM (count) <= 0)
2699 return Qnil; 2699 return Qnil;
2700 if (BUF_BYTES_MAX / len < XINT (count)) 2700 if (BUF_BYTES_MAX / len < XFIXNUM (count))
2701 buffer_overflow (); 2701 buffer_overflow ();
2702 n = XINT (count) * len; 2702 n = XFIXNUM (count) * len;
2703 stringlen = min (n, sizeof string - sizeof string % len); 2703 stringlen = min (n, sizeof string - sizeof string % len);
2704 for (i = 0; i < stringlen; i++) 2704 for (i = 0; i < stringlen; i++)
2705 string[i] = str[i % len]; 2705 string[i] = str[i % len];
@@ -2733,11 +2733,11 @@ from adjoining text, if those properties are sticky. */)
2733 (Lisp_Object byte, Lisp_Object count, Lisp_Object inherit) 2733 (Lisp_Object byte, Lisp_Object count, Lisp_Object inherit)
2734{ 2734{
2735 CHECK_FIXNUM (byte); 2735 CHECK_FIXNUM (byte);
2736 if (XINT (byte) < 0 || XINT (byte) > 255) 2736 if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255)
2737 args_out_of_range_3 (byte, make_fixnum (0), make_fixnum (255)); 2737 args_out_of_range_3 (byte, make_fixnum (0), make_fixnum (255));
2738 if (XINT (byte) >= 128 2738 if (XFIXNUM (byte) >= 128
2739 && ! NILP (BVAR (current_buffer, enable_multibyte_characters))) 2739 && ! NILP (BVAR (current_buffer, enable_multibyte_characters)))
2740 XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte))); 2740 XSETFASTINT (byte, BYTE8_TO_CHAR (XFIXNUM (byte)));
2741 return Finsert_char (byte, count, inherit); 2741 return Finsert_char (byte, count, inherit);
2742} 2742}
2743 2743
@@ -2823,7 +2823,7 @@ make_buffer_string_both (ptrdiff_t start, ptrdiff_t start_byte,
2823 tem = Fnext_property_change (make_fixnum (start), Qnil, make_fixnum (end)); 2823 tem = Fnext_property_change (make_fixnum (start), Qnil, make_fixnum (end));
2824 tem1 = Ftext_properties_at (make_fixnum (start), Qnil); 2824 tem1 = Ftext_properties_at (make_fixnum (start), Qnil);
2825 2825
2826 if (XINT (tem) != end || !NILP (tem1)) 2826 if (XFIXNUM (tem) != end || !NILP (tem1))
2827 copy_intervals_to_string (result, current_buffer, start, 2827 copy_intervals_to_string (result, current_buffer, start,
2828 end - start); 2828 end - start);
2829 } 2829 }
@@ -2872,8 +2872,8 @@ use `buffer-substring-no-properties' instead. */)
2872 register ptrdiff_t b, e; 2872 register ptrdiff_t b, e;
2873 2873
2874 validate_region (&start, &end); 2874 validate_region (&start, &end);
2875 b = XINT (start); 2875 b = XFIXNUM (start);
2876 e = XINT (end); 2876 e = XFIXNUM (end);
2877 2877
2878 return make_buffer_string (b, e, 1); 2878 return make_buffer_string (b, e, 1);
2879} 2879}
@@ -2888,8 +2888,8 @@ they can be in either order. */)
2888 register ptrdiff_t b, e; 2888 register ptrdiff_t b, e;
2889 2889
2890 validate_region (&start, &end); 2890 validate_region (&start, &end);
2891 b = XINT (start); 2891 b = XFIXNUM (start);
2892 e = XINT (end); 2892 e = XFIXNUM (end);
2893 2893
2894 return make_buffer_string (b, e, 0); 2894 return make_buffer_string (b, e, 0);
2895} 2895}
@@ -2935,14 +2935,14 @@ using `string-make-multibyte' or `string-make-unibyte', which see. */)
2935 else 2935 else
2936 { 2936 {
2937 CHECK_FIXNUM_COERCE_MARKER (start); 2937 CHECK_FIXNUM_COERCE_MARKER (start);
2938 b = XINT (start); 2938 b = XFIXNUM (start);
2939 } 2939 }
2940 if (NILP (end)) 2940 if (NILP (end))
2941 e = BUF_ZV (bp); 2941 e = BUF_ZV (bp);
2942 else 2942 else
2943 { 2943 {
2944 CHECK_FIXNUM_COERCE_MARKER (end); 2944 CHECK_FIXNUM_COERCE_MARKER (end);
2945 e = XINT (end); 2945 e = XFIXNUM (end);
2946 } 2946 }
2947 2947
2948 if (b > e) 2948 if (b > e)
@@ -3003,14 +3003,14 @@ determines whether case is significant or ignored. */)
3003 else 3003 else
3004 { 3004 {
3005 CHECK_FIXNUM_COERCE_MARKER (start1); 3005 CHECK_FIXNUM_COERCE_MARKER (start1);
3006 begp1 = XINT (start1); 3006 begp1 = XFIXNUM (start1);
3007 } 3007 }
3008 if (NILP (end1)) 3008 if (NILP (end1))
3009 endp1 = BUF_ZV (bp1); 3009 endp1 = BUF_ZV (bp1);
3010 else 3010 else
3011 { 3011 {
3012 CHECK_FIXNUM_COERCE_MARKER (end1); 3012 CHECK_FIXNUM_COERCE_MARKER (end1);
3013 endp1 = XINT (end1); 3013 endp1 = XFIXNUM (end1);
3014 } 3014 }
3015 3015
3016 if (begp1 > endp1) 3016 if (begp1 > endp1)
@@ -3041,14 +3041,14 @@ determines whether case is significant or ignored. */)
3041 else 3041 else
3042 { 3042 {
3043 CHECK_FIXNUM_COERCE_MARKER (start2); 3043 CHECK_FIXNUM_COERCE_MARKER (start2);
3044 begp2 = XINT (start2); 3044 begp2 = XFIXNUM (start2);
3045 } 3045 }
3046 if (NILP (end2)) 3046 if (NILP (end2))
3047 endp2 = BUF_ZV (bp2); 3047 endp2 = BUF_ZV (bp2);
3048 else 3048 else
3049 { 3049 {
3050 CHECK_FIXNUM_COERCE_MARKER (end2); 3050 CHECK_FIXNUM_COERCE_MARKER (end2);
3051 endp2 = XINT (end2); 3051 endp2 = XFIXNUM (end2);
3052 } 3052 }
3053 3053
3054 if (begp2 > endp2) 3054 if (begp2 > endp2)
@@ -3439,8 +3439,8 @@ Both characters must have the same length of multi-byte form. */)
3439 validate_region (&start, &end); 3439 validate_region (&start, &end);
3440 CHECK_CHARACTER (fromchar); 3440 CHECK_CHARACTER (fromchar);
3441 CHECK_CHARACTER (tochar); 3441 CHECK_CHARACTER (tochar);
3442 fromc = XFASTINT (fromchar); 3442 fromc = XFIXNAT (fromchar);
3443 toc = XFASTINT (tochar); 3443 toc = XFIXNAT (tochar);
3444 3444
3445 if (multibyte_p) 3445 if (multibyte_p)
3446 { 3446 {
@@ -3466,9 +3466,9 @@ Both characters must have the same length of multi-byte form. */)
3466 tostr[0] = toc; 3466 tostr[0] = toc;
3467 } 3467 }
3468 3468
3469 pos = XINT (start); 3469 pos = XFIXNUM (start);
3470 pos_byte = CHAR_TO_BYTE (pos); 3470 pos_byte = CHAR_TO_BYTE (pos);
3471 stop = CHAR_TO_BYTE (XINT (end)); 3471 stop = CHAR_TO_BYTE (XFIXNUM (end));
3472 end_byte = stop; 3472 end_byte = stop;
3473 3473
3474 /* If we don't want undo, turn off putting stuff on the list. 3474 /* If we don't want undo, turn off putting stuff on the list.
@@ -3516,7 +3516,7 @@ Both characters must have the same length of multi-byte form. */)
3516 else if (!changed) 3516 else if (!changed)
3517 { 3517 {
3518 changed = -1; 3518 changed = -1;
3519 modify_text (pos, XINT (end)); 3519 modify_text (pos, XFIXNUM (end));
3520 3520
3521 if (! NILP (noundo)) 3521 if (! NILP (noundo))
3522 { 3522 {
@@ -3639,7 +3639,7 @@ check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end,
3639 buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1); 3639 buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1);
3640 pos_byte += len1; 3640 pos_byte += len1;
3641 } 3641 }
3642 if (XINT (AREF (elt, i)) != buf[i]) 3642 if (XFIXNUM (AREF (elt, i)) != buf[i])
3643 break; 3643 break;
3644 } 3644 }
3645 if (i == len) 3645 if (i == len)
@@ -3691,9 +3691,9 @@ It returns the number of characters changed. */)
3691 tt = SDATA (table); 3691 tt = SDATA (table);
3692 } 3692 }
3693 3693
3694 pos = XINT (start); 3694 pos = XFIXNUM (start);
3695 pos_byte = CHAR_TO_BYTE (pos); 3695 pos_byte = CHAR_TO_BYTE (pos);
3696 end_pos = XINT (end); 3696 end_pos = XFIXNUM (end);
3697 modify_text (pos, end_pos); 3697 modify_text (pos, end_pos);
3698 3698
3699 cnt = 0; 3699 cnt = 0;
@@ -3742,7 +3742,7 @@ It returns the number of characters changed. */)
3742 val = CHAR_TABLE_REF (table, oc); 3742 val = CHAR_TABLE_REF (table, oc);
3743 if (CHARACTERP (val)) 3743 if (CHARACTERP (val))
3744 { 3744 {
3745 nc = XFASTINT (val); 3745 nc = XFIXNAT (val);
3746 str_len = CHAR_STRING (nc, buf); 3746 str_len = CHAR_STRING (nc, buf);
3747 str = buf; 3747 str = buf;
3748 } 3748 }
@@ -3827,7 +3827,7 @@ This command deletes buffer text without modifying the kill ring. */)
3827 (Lisp_Object start, Lisp_Object end) 3827 (Lisp_Object start, Lisp_Object end)
3828{ 3828{
3829 validate_region (&start, &end); 3829 validate_region (&start, &end);
3830 del_range (XINT (start), XINT (end)); 3830 del_range (XFIXNUM (start), XFIXNUM (end));
3831 return Qnil; 3831 return Qnil;
3832} 3832}
3833 3833
@@ -3837,9 +3837,9 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region,
3837 (Lisp_Object start, Lisp_Object end) 3837 (Lisp_Object start, Lisp_Object end)
3838{ 3838{
3839 validate_region (&start, &end); 3839 validate_region (&start, &end);
3840 if (XINT (start) == XINT (end)) 3840 if (XFIXNUM (start) == XFIXNUM (end))
3841 return empty_unibyte_string; 3841 return empty_unibyte_string;
3842 return del_range_1 (XINT (start), XINT (end), 1, 1); 3842 return del_range_1 (XFIXNUM (start), XFIXNUM (end), 1, 1);
3843} 3843}
3844 3844
3845DEFUN ("widen", Fwiden, Swiden, 0, 0, "", 3845DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
@@ -3871,24 +3871,24 @@ or markers) bounding the text that should remain visible. */)
3871 CHECK_FIXNUM_COERCE_MARKER (start); 3871 CHECK_FIXNUM_COERCE_MARKER (start);
3872 CHECK_FIXNUM_COERCE_MARKER (end); 3872 CHECK_FIXNUM_COERCE_MARKER (end);
3873 3873
3874 if (XINT (start) > XINT (end)) 3874 if (XFIXNUM (start) > XFIXNUM (end))
3875 { 3875 {
3876 Lisp_Object tem; 3876 Lisp_Object tem;
3877 tem = start; start = end; end = tem; 3877 tem = start; start = end; end = tem;
3878 } 3878 }
3879 3879
3880 if (!(BEG <= XINT (start) && XINT (start) <= XINT (end) && XINT (end) <= Z)) 3880 if (!(BEG <= XFIXNUM (start) && XFIXNUM (start) <= XFIXNUM (end) && XFIXNUM (end) <= Z))
3881 args_out_of_range (start, end); 3881 args_out_of_range (start, end);
3882 3882
3883 if (BEGV != XFASTINT (start) || ZV != XFASTINT (end)) 3883 if (BEGV != XFIXNAT (start) || ZV != XFIXNAT (end))
3884 current_buffer->clip_changed = 1; 3884 current_buffer->clip_changed = 1;
3885 3885
3886 SET_BUF_BEGV (current_buffer, XFASTINT (start)); 3886 SET_BUF_BEGV (current_buffer, XFIXNAT (start));
3887 SET_BUF_ZV (current_buffer, XFASTINT (end)); 3887 SET_BUF_ZV (current_buffer, XFIXNAT (end));
3888 if (PT < XFASTINT (start)) 3888 if (PT < XFIXNAT (start))
3889 SET_PT (XFASTINT (start)); 3889 SET_PT (XFIXNAT (start));
3890 if (PT > XFASTINT (end)) 3890 if (PT > XFIXNAT (end))
3891 SET_PT (XFASTINT (end)); 3891 SET_PT (XFIXNAT (end));
3892 /* Changing the buffer bounds invalidates any recorded current column. */ 3892 /* Changing the buffer bounds invalidates any recorded current column. */
3893 invalidate_current_column (); 3893 invalidate_current_column ();
3894 return Qnil; 3894 return Qnil;
@@ -4475,7 +4475,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4475 } 4475 }
4476 else if (conversion == 'c') 4476 else if (conversion == 'c')
4477 { 4477 {
4478 if (FIXNUMP (arg) && ! ASCII_CHAR_P (XINT (arg))) 4478 if (FIXNUMP (arg) && ! ASCII_CHAR_P (XFIXNUM (arg)))
4479 { 4479 {
4480 if (!multibyte) 4480 if (!multibyte)
4481 { 4481 {
@@ -4717,7 +4717,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4717 /* Although long double may have a rounding error if 4717 /* Although long double may have a rounding error if
4718 DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1, 4718 DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1,
4719 it is more accurate than plain 'double'. */ 4719 it is more accurate than plain 'double'. */
4720 long double x = XINT (arg); 4720 long double x = XFIXNUM (arg);
4721 sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); 4721 sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x);
4722 } 4722 }
4723 else 4723 else
@@ -4727,7 +4727,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4727 else if (conversion == 'c') 4727 else if (conversion == 'c')
4728 { 4728 {
4729 /* Don't use sprintf here, as it might mishandle prec. */ 4729 /* Don't use sprintf here, as it might mishandle prec. */
4730 sprintf_buf[0] = XINT (arg); 4730 sprintf_buf[0] = XFIXNUM (arg);
4731 sprintf_bytes = prec != 0; 4731 sprintf_bytes = prec != 0;
4732 sprintf_buf[sprintf_bytes] = '\0'; 4732 sprintf_buf[sprintf_bytes] = '\0';
4733 } 4733 }
@@ -4735,7 +4735,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4735 { 4735 {
4736 if (FIXNUMP (arg)) 4736 if (FIXNUMP (arg))
4737 { 4737 {
4738 printmax_t x = XINT (arg); 4738 printmax_t x = XFIXNUM (arg);
4739 sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x); 4739 sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x);
4740 } 4740 }
4741 else 4741 else
@@ -4759,7 +4759,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
4759 /* Don't sign-extend for octal or hex printing. */ 4759 /* Don't sign-extend for octal or hex printing. */
4760 uprintmax_t x; 4760 uprintmax_t x;
4761 if (FIXNUMP (arg)) 4761 if (FIXNUMP (arg))
4762 x = XUINT (arg); 4762 x = XUFIXNUM (arg);
4763 else 4763 else
4764 { 4764 {
4765 double d = XFLOAT_DATA (arg); 4765 double d = XFLOAT_DATA (arg);
@@ -5016,7 +5016,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
5016 Lisp_Object item = XCAR (list); 5016 Lisp_Object item = XCAR (list);
5017 5017
5018 /* First adjust the property start position. */ 5018 /* First adjust the property start position. */
5019 ptrdiff_t pos = XINT (XCAR (item)); 5019 ptrdiff_t pos = XFIXNUM (XCAR (item));
5020 5020
5021 /* Advance BYTEPOS, POSITION, TRANSLATED and ARGN 5021 /* Advance BYTEPOS, POSITION, TRANSLATED and ARGN
5022 up to this position. */ 5022 up to this position. */
@@ -5038,7 +5038,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
5038 XSETCAR (item, make_fixnum (translated)); 5038 XSETCAR (item, make_fixnum (translated));
5039 5039
5040 /* Likewise adjust the property end position. */ 5040 /* Likewise adjust the property end position. */
5041 pos = XINT (XCAR (XCDR (item))); 5041 pos = XFIXNUM (XCAR (XCDR (item)));
5042 5042
5043 for (; position < pos; bytepos++) 5043 for (; position < pos; bytepos++)
5044 { 5044 {
@@ -5099,13 +5099,13 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
5099 CHECK_CHARACTER (c1); 5099 CHECK_CHARACTER (c1);
5100 CHECK_CHARACTER (c2); 5100 CHECK_CHARACTER (c2);
5101 5101
5102 if (XINT (c1) == XINT (c2)) 5102 if (XFIXNUM (c1) == XFIXNUM (c2))
5103 return Qt; 5103 return Qt;
5104 if (NILP (BVAR (current_buffer, case_fold_search))) 5104 if (NILP (BVAR (current_buffer, case_fold_search)))
5105 return Qnil; 5105 return Qnil;
5106 5106
5107 i1 = XFASTINT (c1); 5107 i1 = XFIXNAT (c1);
5108 i2 = XFASTINT (c2); 5108 i2 = XFIXNAT (c2);
5109 5109
5110 /* FIXME: It is possible to compare multibyte characters even when 5110 /* FIXME: It is possible to compare multibyte characters even when
5111 the current buffer is unibyte. Unfortunately this is ambiguous 5111 the current buffer is unibyte. Unfortunately this is ambiguous
@@ -5249,10 +5249,10 @@ ring. */)
5249 validate_region (&startr1, &endr1); 5249 validate_region (&startr1, &endr1);
5250 validate_region (&startr2, &endr2); 5250 validate_region (&startr2, &endr2);
5251 5251
5252 start1 = XFASTINT (startr1); 5252 start1 = XFIXNAT (startr1);
5253 end1 = XFASTINT (endr1); 5253 end1 = XFIXNAT (endr1);
5254 start2 = XFASTINT (startr2); 5254 start2 = XFIXNAT (startr2);
5255 end2 = XFASTINT (endr2); 5255 end2 = XFIXNAT (endr2);
5256 gap = GPT; 5256 gap = GPT;
5257 5257
5258 /* Swap the regions if they're reversed. */ 5258 /* Swap the regions if they're reversed. */
diff --git a/src/emacs-module.c b/src/emacs-module.c
index 39150f6f67b..e7ba17426bf 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -302,7 +302,7 @@ module_make_global_ref (emacs_env *env, emacs_value ref)
302 if (i >= 0) 302 if (i >= 0)
303 { 303 {
304 Lisp_Object value = HASH_VALUE (h, i); 304 Lisp_Object value = HASH_VALUE (h, i);
305 EMACS_INT refcount = XFASTINT (value) + 1; 305 EMACS_INT refcount = XFIXNAT (value) + 1;
306 if (MOST_POSITIVE_FIXNUM < refcount) 306 if (MOST_POSITIVE_FIXNUM < refcount)
307 xsignal0 (Qoverflow_error); 307 xsignal0 (Qoverflow_error);
308 value = make_fixed_natnum (refcount); 308 value = make_fixed_natnum (refcount);
@@ -329,7 +329,7 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
329 329
330 if (i >= 0) 330 if (i >= 0)
331 { 331 {
332 EMACS_INT refcount = XFASTINT (HASH_VALUE (h, i)) - 1; 332 EMACS_INT refcount = XFIXNAT (HASH_VALUE (h, i)) - 1;
333 if (refcount > 0) 333 if (refcount > 0)
334 set_hash_value_slot (h, i, make_fixed_natnum (refcount)); 334 set_hash_value_slot (h, i, make_fixed_natnum (refcount));
335 else 335 else
@@ -525,7 +525,7 @@ module_extract_integer (emacs_env *env, emacs_value n)
525 xsignal1 (Qoverflow_error, l); 525 xsignal1 (Qoverflow_error, l);
526 return mpz_get_si (XBIGNUM (l)->value); 526 return mpz_get_si (XBIGNUM (l)->value);
527 } 527 }
528 return XINT (l); 528 return XFIXNUM (l);
529} 529}
530 530
531static emacs_value 531static emacs_value
diff --git a/src/emacs.c b/src/emacs.c
index aef4f93d02b..dc62ce80667 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -2065,9 +2065,9 @@ all of which are called before Emacs is actually killed. */
2065 } 2065 }
2066 2066
2067 if (FIXNUMP (arg)) 2067 if (FIXNUMP (arg))
2068 exit_code = (XINT (arg) < 0 2068 exit_code = (XFIXNUM (arg) < 0
2069 ? XINT (arg) | INT_MIN 2069 ? XFIXNUM (arg) | INT_MIN
2070 : XINT (arg) & INT_MAX); 2070 : XFIXNUM (arg) & INT_MAX);
2071 else 2071 else
2072 exit_code = EXIT_SUCCESS; 2072 exit_code = EXIT_SUCCESS;
2073 exit (exit_code); 2073 exit (exit_code);
diff --git a/src/eval.c b/src/eval.c
index 800d7f2afb8..f7d4d5be2aa 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -264,8 +264,8 @@ init_eval (void)
264static void 264static void
265restore_stack_limits (Lisp_Object data) 265restore_stack_limits (Lisp_Object data)
266{ 266{
267 max_specpdl_size = XINT (XCAR (data)); 267 max_specpdl_size = XFIXNUM (XCAR (data));
268 max_lisp_eval_depth = XINT (XCDR (data)); 268 max_lisp_eval_depth = XFIXNUM (XCDR (data));
269} 269}
270 270
271static void grow_specpdl (void); 271static void grow_specpdl (void);
@@ -938,7 +938,7 @@ usage: (let VARLIST BODY...) */)
938 CHECK_LIST (varlist); 938 CHECK_LIST (varlist);
939 939
940 /* Make space to hold the values to give the bound variables. */ 940 /* Make space to hold the values to give the bound variables. */
941 EMACS_INT varlist_len = XFASTINT (Flength (varlist)); 941 EMACS_INT varlist_len = XFIXNAT (Flength (varlist));
942 SAFE_ALLOCA_LISP (temps, varlist_len); 942 SAFE_ALLOCA_LISP (temps, varlist_len);
943 ptrdiff_t nvars = varlist_len; 943 ptrdiff_t nvars = varlist_len;
944 944
@@ -2246,9 +2246,9 @@ eval_sub (Lisp_Object form)
2246 2246
2247 check_cons_list (); 2247 check_cons_list ();
2248 2248
2249 if (XINT (numargs) < XSUBR (fun)->min_args 2249 if (XFIXNUM (numargs) < XSUBR (fun)->min_args
2250 || (XSUBR (fun)->max_args >= 0 2250 || (XSUBR (fun)->max_args >= 0
2251 && XSUBR (fun)->max_args < XINT (numargs))) 2251 && XSUBR (fun)->max_args < XFIXNUM (numargs)))
2252 xsignal2 (Qwrong_number_of_arguments, original_fun, numargs); 2252 xsignal2 (Qwrong_number_of_arguments, original_fun, numargs);
2253 2253
2254 else if (XSUBR (fun)->max_args == UNEVALLED) 2254 else if (XSUBR (fun)->max_args == UNEVALLED)
@@ -2260,9 +2260,9 @@ eval_sub (Lisp_Object form)
2260 ptrdiff_t argnum = 0; 2260 ptrdiff_t argnum = 0;
2261 USE_SAFE_ALLOCA; 2261 USE_SAFE_ALLOCA;
2262 2262
2263 SAFE_ALLOCA_LISP (vals, XINT (numargs)); 2263 SAFE_ALLOCA_LISP (vals, XFIXNUM (numargs));
2264 2264
2265 while (CONSP (args_left) && argnum < XINT (numargs)) 2265 while (CONSP (args_left) && argnum < XFIXNUM (numargs))
2266 { 2266 {
2267 Lisp_Object arg = XCAR (args_left); 2267 Lisp_Object arg = XCAR (args_left);
2268 args_left = XCDR (args_left); 2268 args_left = XCDR (args_left);
@@ -2292,7 +2292,7 @@ eval_sub (Lisp_Object form)
2292 args_left = Fcdr (args_left); 2292 args_left = Fcdr (args_left);
2293 } 2293 }
2294 2294
2295 set_backtrace_args (specpdl + count, argvals, XINT (numargs)); 2295 set_backtrace_args (specpdl + count, argvals, XFIXNUM (numargs));
2296 2296
2297 switch (i) 2297 switch (i)
2298 { 2298 {
@@ -2405,7 +2405,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
2405 2405
2406 CHECK_LIST (spread_arg); 2406 CHECK_LIST (spread_arg);
2407 2407
2408 numargs = XINT (Flength (spread_arg)); 2408 numargs = XFIXNUM (Flength (spread_arg));
2409 2409
2410 if (numargs == 0) 2410 if (numargs == 0)
2411 return Ffuncall (nargs - 1, args); 2411 return Ffuncall (nargs - 1, args);
@@ -2960,7 +2960,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count)
2960 Lisp_Object tem; 2960 Lisp_Object tem;
2961 USE_SAFE_ALLOCA; 2961 USE_SAFE_ALLOCA;
2962 2962
2963 numargs = XFASTINT (Flength (args)); 2963 numargs = XFIXNAT (Flength (args));
2964 SAFE_ALLOCA_LISP (arg_vector, numargs); 2964 SAFE_ALLOCA_LISP (arg_vector, numargs);
2965 args_left = args; 2965 args_left = args;
2966 2966
@@ -3667,7 +3667,7 @@ get_backtrace_frame (Lisp_Object nframes, Lisp_Object base)
3667 union specbinding *pdl = get_backtrace_starting_at (base); 3667 union specbinding *pdl = get_backtrace_starting_at (base);
3668 3668
3669 /* Find the frame requested. */ 3669 /* Find the frame requested. */
3670 for (i = XFASTINT (nframes); i > 0 && backtrace_p (pdl); i--) 3670 for (i = XFIXNAT (nframes); i > 0 && backtrace_p (pdl); i--)
3671 pdl = backtrace_next (pdl); 3671 pdl = backtrace_next (pdl);
3672 3672
3673 return pdl; 3673 return pdl;
@@ -3868,7 +3868,7 @@ NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'.
3868{ 3868{
3869 union specbinding *frame = get_backtrace_frame (nframes, base); 3869 union specbinding *frame = get_backtrace_frame (nframes, base);
3870 union specbinding *prevframe 3870 union specbinding *prevframe
3871 = get_backtrace_frame (make_fixnum (XFASTINT (nframes) - 1), base); 3871 = get_backtrace_frame (make_fixnum (XFIXNAT (nframes) - 1), base);
3872 ptrdiff_t distance = specpdl_ptr - frame; 3872 ptrdiff_t distance = specpdl_ptr - frame;
3873 Lisp_Object result = Qnil; 3873 Lisp_Object result = Qnil;
3874 eassert (distance >= 0); 3874 eassert (distance >= 0);
diff --git a/src/fileio.c b/src/fileio.c
index b8809853e00..14089dcf49a 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -3195,7 +3195,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */)
3195 3195
3196 encoded_absname = ENCODE_FILE (absname); 3196 encoded_absname = ENCODE_FILE (absname);
3197 3197
3198 if (chmod (SSDATA (encoded_absname), XINT (mode) & 07777) < 0) 3198 if (chmod (SSDATA (encoded_absname), XFIXNUM (mode) & 07777) < 0)
3199 report_file_error ("Doing chmod", absname); 3199 report_file_error ("Doing chmod", absname);
3200 3200
3201 return Qnil; 3201 return Qnil;
@@ -3218,7 +3218,7 @@ by having the corresponding bit in the mask reset. */)
3218 mode_t oldrealmask, oldumask, newumask; 3218 mode_t oldrealmask, oldumask, newumask;
3219 CHECK_FIXNUM (mode); 3219 CHECK_FIXNUM (mode);
3220 oldrealmask = realmask; 3220 oldrealmask = realmask;
3221 newumask = ~ XINT (mode) & 0777; 3221 newumask = ~ XFIXNUM (mode) & 0777;
3222 3222
3223 block_input (); 3223 block_input ();
3224 realmask = newumask; 3224 realmask = newumask;
@@ -3378,7 +3378,7 @@ verify (alignof (union read_non_regular) % GCALIGNMENT == 0);
3378static Lisp_Object 3378static Lisp_Object
3379read_non_regular (Lisp_Object state) 3379read_non_regular (Lisp_Object state)
3380{ 3380{
3381 union read_non_regular *data = XINTPTR (state); 3381 union read_non_regular *data = XFIXNUMPTR (state);
3382 int nbytes = emacs_read_quit (data->s.fd, 3382 int nbytes = emacs_read_quit (data->s.fd,
3383 ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE 3383 ((char *) BEG_ADDR + PT_BYTE - BEG_BYTE
3384 + data->s.inserted), 3384 + data->s.inserted),
@@ -3402,7 +3402,7 @@ static off_t
3402file_offset (Lisp_Object val) 3402file_offset (Lisp_Object val)
3403{ 3403{
3404 if (RANGED_FIXNUMP (0, val, TYPE_MAXIMUM (off_t))) 3404 if (RANGED_FIXNUMP (0, val, TYPE_MAXIMUM (off_t)))
3405 return XINT (val); 3405 return XFIXNUM (val);
3406 3406
3407 if (FLOATP (val)) 3407 if (FLOATP (val))
3408 { 3408 {
@@ -3462,14 +3462,14 @@ restore_window_points (Lisp_Object window_markers, ptrdiff_t inserted,
3462 Lisp_Object marker = XCAR (car); 3462 Lisp_Object marker = XCAR (car);
3463 Lisp_Object oldpos = XCDR (car); 3463 Lisp_Object oldpos = XCDR (car);
3464 if (MARKERP (marker) && FIXNUMP (oldpos) 3464 if (MARKERP (marker) && FIXNUMP (oldpos)
3465 && XINT (oldpos) > same_at_start 3465 && XFIXNUM (oldpos) > same_at_start
3466 && XINT (oldpos) < same_at_end) 3466 && XFIXNUM (oldpos) < same_at_end)
3467 { 3467 {
3468 ptrdiff_t oldsize = same_at_end - same_at_start; 3468 ptrdiff_t oldsize = same_at_end - same_at_start;
3469 ptrdiff_t newsize = inserted; 3469 ptrdiff_t newsize = inserted;
3470 double growth = newsize / (double)oldsize; 3470 double growth = newsize / (double)oldsize;
3471 ptrdiff_t newpos 3471 ptrdiff_t newpos
3472 = same_at_start + growth * (XINT (oldpos) - same_at_start); 3472 = same_at_start + growth * (XFIXNUM (oldpos) - same_at_start);
3473 Fset_marker (marker, make_fixnum (newpos), Qnil); 3473 Fset_marker (marker, make_fixnum (newpos), Qnil);
3474 } 3474 }
3475 } 3475 }
@@ -3584,7 +3584,7 @@ by calling `format-decode', which see. */)
3584 visit, beg, end, replace); 3584 visit, beg, end, replace);
3585 if (CONSP (val) && CONSP (XCDR (val)) 3585 if (CONSP (val) && CONSP (XCDR (val))
3586 && RANGED_FIXNUMP (0, XCAR (XCDR (val)), ZV - PT)) 3586 && RANGED_FIXNUMP (0, XCAR (XCDR (val)), ZV - PT))
3587 inserted = XINT (XCAR (XCDR (val))); 3587 inserted = XFIXNUM (XCAR (XCDR (val)));
3588 goto handled; 3588 goto handled;
3589 } 3589 }
3590 3590
@@ -4248,7 +4248,7 @@ by calling `format-decode', which see. */)
4248 break; 4248 break;
4249 } 4249 }
4250 4250
4251 this = XINT (nbytes); 4251 this = XFIXNUM (nbytes);
4252 } 4252 }
4253 else 4253 else
4254 { 4254 {
@@ -4469,7 +4469,7 @@ by calling `format-decode', which see. */)
4469 { 4469 {
4470 if (! RANGED_FIXNUMP (0, insval, ZV - PT)) 4470 if (! RANGED_FIXNUMP (0, insval, ZV - PT))
4471 wrong_type_argument (intern ("inserted-chars"), insval); 4471 wrong_type_argument (intern ("inserted-chars"), insval);
4472 inserted = XFASTINT (insval); 4472 inserted = XFIXNAT (insval);
4473 } 4473 }
4474 } 4474 }
4475 4475
@@ -4492,7 +4492,7 @@ by calling `format-decode', which see. */)
4492 Qnil, make_fixnum (inserted), visit); 4492 Qnil, make_fixnum (inserted), visit);
4493 if (! RANGED_FIXNUMP (0, insval, ZV - PT)) 4493 if (! RANGED_FIXNUMP (0, insval, ZV - PT))
4494 wrong_type_argument (intern ("inserted-chars"), insval); 4494 wrong_type_argument (intern ("inserted-chars"), insval);
4495 inserted = XFASTINT (insval); 4495 inserted = XFIXNAT (insval);
4496 } 4496 }
4497 else 4497 else
4498 { 4498 {
@@ -4523,7 +4523,7 @@ by calling `format-decode', which see. */)
4523 else 4523 else
4524 /* format_decode modified buffer's characters => consider 4524 /* format_decode modified buffer's characters => consider
4525 entire buffer changed and leave point at point-min. */ 4525 entire buffer changed and leave point at point-min. */
4526 inserted = XFASTINT (insval); 4526 inserted = XFIXNAT (insval);
4527 } 4527 }
4528 4528
4529 /* For consistency with format-decode call these now iff inserted > 0 4529 /* For consistency with format-decode call these now iff inserted > 0
@@ -4538,7 +4538,7 @@ by calling `format-decode', which see. */)
4538 { 4538 {
4539 if (! RANGED_FIXNUMP (0, insval, ZV - PT)) 4539 if (! RANGED_FIXNUMP (0, insval, ZV - PT))
4540 wrong_type_argument (intern ("inserted-chars"), insval); 4540 wrong_type_argument (intern ("inserted-chars"), insval);
4541 inserted = XFASTINT (insval); 4541 inserted = XFIXNAT (insval);
4542 } 4542 }
4543 } 4543 }
4544 else 4544 else
@@ -4566,7 +4566,7 @@ by calling `format-decode', which see. */)
4566 /* after_insert_file_functions did modify buffer's 4566 /* after_insert_file_functions did modify buffer's
4567 characters => consider entire buffer changed and 4567 characters => consider entire buffer changed and
4568 leave point at point-min. */ 4568 leave point at point-min. */
4569 inserted = XFASTINT (insval); 4569 inserted = XFIXNAT (insval);
4570 } 4570 }
4571 } 4571 }
4572 4572
@@ -4584,7 +4584,7 @@ by calling `format-decode', which see. */)
4584 Lisp_Object tem = XCAR (old_undo); 4584 Lisp_Object tem = XCAR (old_undo);
4585 if (CONSP (tem) && FIXNUMP (XCAR (tem)) 4585 if (CONSP (tem) && FIXNUMP (XCAR (tem))
4586 && FIXNUMP (XCDR (tem)) 4586 && FIXNUMP (XCDR (tem))
4587 && XFASTINT (XCDR (tem)) == PT + old_inserted) 4587 && XFIXNAT (XCDR (tem)) == PT + old_inserted)
4588 XSETCDR (tem, make_fixnum (PT + inserted)); 4588 XSETCDR (tem, make_fixnum (PT + inserted));
4589 } 4589 }
4590 } 4590 }
@@ -4962,14 +4962,14 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
4962 4962
4963 if (STRINGP (start)) 4963 if (STRINGP (start))
4964 ok = a_write (desc, start, 0, SCHARS (start), &annotations, &coding); 4964 ok = a_write (desc, start, 0, SCHARS (start), &annotations, &coding);
4965 else if (XINT (start) != XINT (end)) 4965 else if (XFIXNUM (start) != XFIXNUM (end))
4966 ok = a_write (desc, Qnil, XINT (start), XINT (end) - XINT (start), 4966 ok = a_write (desc, Qnil, XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
4967 &annotations, &coding); 4967 &annotations, &coding);
4968 else 4968 else
4969 { 4969 {
4970 /* If file was empty, still need to write the annotations. */ 4970 /* If file was empty, still need to write the annotations. */
4971 coding.mode |= CODING_MODE_LAST_BLOCK; 4971 coding.mode |= CODING_MODE_LAST_BLOCK;
4972 ok = a_write (desc, Qnil, XINT (end), 0, &annotations, &coding); 4972 ok = a_write (desc, Qnil, XFIXNUM (end), 0, &annotations, &coding);
4973 } 4973 }
4974 save_errno = errno; 4974 save_errno = errno;
4975 4975
@@ -5256,7 +5256,7 @@ a_write (int desc, Lisp_Object string, ptrdiff_t pos,
5256 tem = Fcar_safe (Fcar (*annot)); 5256 tem = Fcar_safe (Fcar (*annot));
5257 nextpos = pos - 1; 5257 nextpos = pos - 1;
5258 if (FIXNUMP (tem)) 5258 if (FIXNUMP (tem))
5259 nextpos = XFASTINT (tem); 5259 nextpos = XFIXNAT (tem);
5260 5260
5261 /* If there are no more annotations in this range, 5261 /* If there are no more annotations in this range,
5262 output the rest of the range all at once. */ 5262 output the rest of the range all at once. */
@@ -5458,7 +5458,7 @@ An argument specifies the modification time value to use
5458 if (FIXNUMP (time_flag)) 5458 if (FIXNUMP (time_flag))
5459 { 5459 {
5460 CHECK_RANGED_INTEGER (time_flag, -1, 0); 5460 CHECK_RANGED_INTEGER (time_flag, -1, 0);
5461 mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XINT (time_flag)); 5461 mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XFIXNUM (time_flag));
5462 } 5462 }
5463 else 5463 else
5464 mtime = lisp_time_argument (time_flag); 5464 mtime = lisp_time_argument (time_flag);
@@ -5526,7 +5526,7 @@ auto_save_1 (void)
5526 else if (modes = Ffile_modes (BVAR (current_buffer, filename)), 5526 else if (modes = Ffile_modes (BVAR (current_buffer, filename)),
5527 FIXNUMP (modes)) 5527 FIXNUMP (modes))
5528 /* Remote files don't cooperate with stat. */ 5528 /* Remote files don't cooperate with stat. */
5529 auto_save_mode_bits = (XINT (modes) | 0600) & 0777; 5529 auto_save_mode_bits = (XFIXNUM (modes) | 0600) & 0777;
5530 } 5530 }
5531 5531
5532 return 5532 return
@@ -5693,7 +5693,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5693 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b) 5693 && BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
5694 && BUF_AUTOSAVE_MODIFF (b) < BUF_MODIFF (b) 5694 && BUF_AUTOSAVE_MODIFF (b) < BUF_MODIFF (b)
5695 /* -1 means we've turned off autosaving for a while--see below. */ 5695 /* -1 means we've turned off autosaving for a while--see below. */
5696 && XINT (BVAR (b, save_length)) >= 0 5696 && XFIXNUM (BVAR (b, save_length)) >= 0
5697 && (do_handled_files 5697 && (do_handled_files
5698 || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name), 5698 || NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name),
5699 Qwrite_region)))) 5699 Qwrite_region))))
@@ -5708,11 +5708,11 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
5708 5708
5709 set_buffer_internal (b); 5709 set_buffer_internal (b);
5710 if (NILP (Vauto_save_include_big_deletions) 5710 if (NILP (Vauto_save_include_big_deletions)
5711 && (XFASTINT (BVAR (b, save_length)) * 10 5711 && (XFIXNAT (BVAR (b, save_length)) * 10
5712 > (BUF_Z (b) - BUF_BEG (b)) * 13) 5712 > (BUF_Z (b) - BUF_BEG (b)) * 13)
5713 /* A short file is likely to change a large fraction; 5713 /* A short file is likely to change a large fraction;
5714 spare the user annoying messages. */ 5714 spare the user annoying messages. */
5715 && XFASTINT (BVAR (b, save_length)) > 5000 5715 && XFIXNAT (BVAR (b, save_length)) > 5000
5716 /* These messages are frequent and annoying for `*mail*'. */ 5716 /* These messages are frequent and annoying for `*mail*'. */
5717 && !EQ (BVAR (b, filename), Qnil) 5717 && !EQ (BVAR (b, filename), Qnil)
5718 && NILP (no_message)) 5718 && NILP (no_message))
diff --git a/src/floatfns.c b/src/floatfns.c
index 563c65f827a..f8463f32445 100644
--- a/src/floatfns.c
+++ b/src/floatfns.c
@@ -194,7 +194,7 @@ EXPONENT must be an integer. */)
194 (Lisp_Object sgnfcand, Lisp_Object exponent) 194 (Lisp_Object sgnfcand, Lisp_Object exponent)
195{ 195{
196 CHECK_FIXNUM (exponent); 196 CHECK_FIXNUM (exponent);
197 int e = min (max (INT_MIN, XINT (exponent)), INT_MAX); 197 int e = min (max (INT_MIN, XFIXNUM (exponent)), INT_MAX);
198 return make_float (ldexp (extract_float (sgnfcand), e)); 198 return make_float (ldexp (extract_float (sgnfcand), e));
199} 199}
200 200
@@ -215,14 +215,14 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
215 CHECK_FIXNUM_OR_FLOAT (arg2); 215 CHECK_FIXNUM_OR_FLOAT (arg2);
216 if (FIXNUMP (arg1) /* common lisp spec */ 216 if (FIXNUMP (arg1) /* common lisp spec */
217 && FIXNUMP (arg2) /* don't promote, if both are ints, and */ 217 && FIXNUMP (arg2) /* don't promote, if both are ints, and */
218 && XINT (arg2) >= 0) /* we are sure the result is not fractional */ 218 && XFIXNUM (arg2) >= 0) /* we are sure the result is not fractional */
219 { /* this can be improved by pre-calculating */ 219 { /* this can be improved by pre-calculating */
220 EMACS_INT y; /* some binary powers of x then accumulating */ 220 EMACS_INT y; /* some binary powers of x then accumulating */
221 EMACS_UINT acc, x; /* Unsigned so that overflow is well defined. */ 221 EMACS_UINT acc, x; /* Unsigned so that overflow is well defined. */
222 Lisp_Object val; 222 Lisp_Object val;
223 223
224 x = XINT (arg1); 224 x = XFIXNUM (arg1);
225 y = XINT (arg2); 225 y = XFIXNUM (arg2);
226 acc = (y & 1 ? x : 1); 226 acc = (y & 1 ? x : 1);
227 227
228 while ((y >>= 1) != 0) 228 while ((y >>= 1) != 0)
@@ -285,7 +285,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
285 arg = make_number (val); 285 arg = make_number (val);
286 mpz_clear (val); 286 mpz_clear (val);
287 } 287 }
288 else if (FIXNUMP (arg) && XINT (arg) == MOST_NEGATIVE_FIXNUM) 288 else if (FIXNUMP (arg) && XFIXNUM (arg) == MOST_NEGATIVE_FIXNUM)
289 { 289 {
290 mpz_t val; 290 mpz_t val;
291 mpz_init (val); 291 mpz_init (val);
@@ -295,8 +295,8 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
295 } 295 }
296 else if (FLOATP (arg)) 296 else if (FLOATP (arg))
297 arg = make_float (fabs (XFLOAT_DATA (arg))); 297 arg = make_float (fabs (XFLOAT_DATA (arg)));
298 else if (XINT (arg) < 0) 298 else if (XFIXNUM (arg) < 0)
299 XSETINT (arg, - XINT (arg)); 299 XSETINT (arg, - XFIXNUM (arg));
300 300
301 return arg; 301 return arg;
302} 302}
@@ -310,7 +310,7 @@ DEFUN ("float", Ffloat, Sfloat, 1, 1, 0,
310 if (BIGNUMP (arg)) 310 if (BIGNUMP (arg))
311 return make_float (mpz_get_d (XBIGNUM (arg)->value)); 311 return make_float (mpz_get_d (XBIGNUM (arg)->value));
312 if (FIXNUMP (arg)) 312 if (FIXNUMP (arg))
313 return make_float ((double) XINT (arg)); 313 return make_float ((double) XFIXNUM (arg));
314 else /* give 'em the same float back */ 314 else /* give 'em the same float back */
315 return arg; 315 return arg;
316} 316}
@@ -351,7 +351,7 @@ This is the same as the exponent of a float. */)
351 else 351 else
352 { 352 {
353 eassert (FIXNUMP (arg)); 353 eassert (FIXNUMP (arg));
354 EMACS_INT i = eabs (XINT (arg)); 354 EMACS_INT i = eabs (XFIXNUM (arg));
355 value = (i == 0 355 value = (i == 0
356 ? MOST_NEGATIVE_FIXNUM 356 ? MOST_NEGATIVE_FIXNUM
357 : EMACS_UINT_WIDTH - 1 - ecount_leading_zeros (i)); 357 : EMACS_UINT_WIDTH - 1 - ecount_leading_zeros (i));
@@ -383,13 +383,13 @@ rounding_driver (Lisp_Object arg, Lisp_Object divisor,
383 CHECK_FIXNUM_OR_FLOAT (divisor); 383 CHECK_FIXNUM_OR_FLOAT (divisor);
384 if (!FLOATP (arg) && !FLOATP (divisor)) 384 if (!FLOATP (arg) && !FLOATP (divisor))
385 { 385 {
386 if (XINT (divisor) == 0) 386 if (XFIXNUM (divisor) == 0)
387 xsignal0 (Qarith_error); 387 xsignal0 (Qarith_error);
388 return make_fixnum (int_round2 (XINT (arg), XINT (divisor))); 388 return make_fixnum (int_round2 (XFIXNUM (arg), XFIXNUM (divisor)));
389 } 389 }
390 390
391 double f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XINT (arg); 391 double f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XFIXNUM (arg);
392 double f2 = FLOATP (divisor) ? XFLOAT_DATA (divisor) : XINT (divisor); 392 double f2 = FLOATP (divisor) ? XFLOAT_DATA (divisor) : XFIXNUM (divisor);
393 if (! IEEE_FLOATING_POINT && f2 == 0) 393 if (! IEEE_FLOATING_POINT && f2 == 0)
394 xsignal0 (Qarith_error); 394 xsignal0 (Qarith_error);
395 d = f1 / f2; 395 d = f1 / f2;
@@ -510,8 +510,8 @@ fmod_float (Lisp_Object x, Lisp_Object y)
510{ 510{
511 double f1, f2; 511 double f1, f2;
512 512
513 f1 = FLOATP (x) ? XFLOAT_DATA (x) : XINT (x); 513 f1 = FLOATP (x) ? XFLOAT_DATA (x) : XFIXNUM (x);
514 f2 = FLOATP (y) ? XFLOAT_DATA (y) : XINT (y); 514 f2 = FLOATP (y) ? XFLOAT_DATA (y) : XFIXNUM (y);
515 515
516 f1 = fmod (f1, f2); 516 f1 = fmod (f1, f2);
517 517
diff --git a/src/fns.c b/src/fns.c
index ac93a2f6d81..92a853e1755 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -77,14 +77,14 @@ See Info node `(elisp)Random Numbers' for more details. */)
77 seed_random (SSDATA (limit), SBYTES (limit)); 77 seed_random (SSDATA (limit), SBYTES (limit));
78 78
79 val = get_random (); 79 val = get_random ();
80 if (FIXNUMP (limit) && 0 < XINT (limit)) 80 if (FIXNUMP (limit) && 0 < XFIXNUM (limit))
81 while (true) 81 while (true)
82 { 82 {
83 /* Return the remainder, except reject the rare case where 83 /* Return the remainder, except reject the rare case where
84 get_random returns a number so close to INTMASK that the 84 get_random returns a number so close to INTMASK that the
85 remainder isn't random. */ 85 remainder isn't random. */
86 EMACS_INT remainder = val % XINT (limit); 86 EMACS_INT remainder = val % XFIXNUM (limit);
87 if (val - remainder <= INTMASK - XINT (limit) + 1) 87 if (val - remainder <= INTMASK - XFIXNUM (limit) + 1)
88 return make_fixnum (remainder); 88 return make_fixnum (remainder);
89 val = get_random (); 89 val = get_random ();
90 } 90 }
@@ -270,9 +270,9 @@ If string STR1 is greater, the value is a positive number N;
270 270
271 /* For backward compatibility, silently bring too-large positive end 271 /* For backward compatibility, silently bring too-large positive end
272 values into range. */ 272 values into range. */
273 if (FIXNUMP (end1) && SCHARS (str1) < XINT (end1)) 273 if (FIXNUMP (end1) && SCHARS (str1) < XFIXNUM (end1))
274 end1 = make_fixnum (SCHARS (str1)); 274 end1 = make_fixnum (SCHARS (str1));
275 if (FIXNUMP (end2) && SCHARS (str2) < XINT (end2)) 275 if (FIXNUMP (end2) && SCHARS (str2) < XFIXNUM (end2))
276 end2 = make_fixnum (SCHARS (str2)); 276 end2 = make_fixnum (SCHARS (str2));
277 277
278 validate_subarray (str1, start1, end1, SCHARS (str1), &from1, &to1); 278 validate_subarray (str1, start1, end1, SCHARS (str1), &from1, &to1);
@@ -298,8 +298,8 @@ If string STR1 is greater, the value is a positive number N;
298 298
299 if (! NILP (ignore_case)) 299 if (! NILP (ignore_case))
300 { 300 {
301 c1 = XINT (Fupcase (make_fixnum (c1))); 301 c1 = XFIXNUM (Fupcase (make_fixnum (c1)));
302 c2 = XINT (Fupcase (make_fixnum (c2))); 302 c2 = XFIXNUM (Fupcase (make_fixnum (c2)));
303 } 303 }
304 304
305 if (c1 == c2) 305 if (c1 == c2)
@@ -645,7 +645,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
645 { 645 {
646 EMACS_INT len; 646 EMACS_INT len;
647 this = args[argnum]; 647 this = args[argnum];
648 len = XFASTINT (Flength (this)); 648 len = XFIXNAT (Flength (this));
649 if (target_type == Lisp_String) 649 if (target_type == Lisp_String)
650 { 650 {
651 /* We must count the number of bytes needed in the string 651 /* We must count the number of bytes needed in the string
@@ -660,7 +660,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
660 { 660 {
661 ch = AREF (this, i); 661 ch = AREF (this, i);
662 CHECK_CHARACTER (ch); 662 CHECK_CHARACTER (ch);
663 c = XFASTINT (ch); 663 c = XFIXNAT (ch);
664 this_len_byte = CHAR_BYTES (c); 664 this_len_byte = CHAR_BYTES (c);
665 if (STRING_BYTES_BOUND - result_len_byte < this_len_byte) 665 if (STRING_BYTES_BOUND - result_len_byte < this_len_byte)
666 string_overflow (); 666 string_overflow ();
@@ -675,7 +675,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
675 { 675 {
676 ch = XCAR (this); 676 ch = XCAR (this);
677 CHECK_CHARACTER (ch); 677 CHECK_CHARACTER (ch);
678 c = XFASTINT (ch); 678 c = XFIXNAT (ch);
679 this_len_byte = CHAR_BYTES (c); 679 this_len_byte = CHAR_BYTES (c);
680 if (STRING_BYTES_BOUND - result_len_byte < this_len_byte) 680 if (STRING_BYTES_BOUND - result_len_byte < this_len_byte)
681 string_overflow (); 681 string_overflow ();
@@ -740,7 +740,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
740 740
741 this = args[argnum]; 741 this = args[argnum];
742 if (!CONSP (this)) 742 if (!CONSP (this))
743 thislen = Flength (this), thisleni = XINT (thislen); 743 thislen = Flength (this), thisleni = XFIXNUM (thislen);
744 744
745 /* Between strings of the same kind, copy fast. */ 745 /* Between strings of the same kind, copy fast. */
746 if (STRINGP (this) && STRINGP (val) 746 if (STRINGP (this) && STRINGP (val)
@@ -827,7 +827,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
827 { 827 {
828 int c; 828 int c;
829 CHECK_CHARACTER (elt); 829 CHECK_CHARACTER (elt);
830 c = XFASTINT (elt); 830 c = XFIXNAT (elt);
831 if (some_multibyte) 831 if (some_multibyte)
832 toindex_byte += CHAR_STRING (c, SDATA (val) + toindex_byte); 832 toindex_byte += CHAR_STRING (c, SDATA (val) + toindex_byte);
833 else 833 else
@@ -1260,7 +1260,7 @@ validate_subarray (Lisp_Object array, Lisp_Object from, Lisp_Object to,
1260 1260
1261 if (FIXNUMP (from)) 1261 if (FIXNUMP (from))
1262 { 1262 {
1263 f = XINT (from); 1263 f = XFIXNUM (from);
1264 if (f < 0) 1264 if (f < 0)
1265 f += size; 1265 f += size;
1266 } 1266 }
@@ -1271,7 +1271,7 @@ validate_subarray (Lisp_Object array, Lisp_Object from, Lisp_Object to,
1271 1271
1272 if (FIXNUMP (to)) 1272 if (FIXNUMP (to))
1273 { 1273 {
1274 t = XINT (to); 1274 t = XFIXNUM (to);
1275 if (t < 0) 1275 if (t < 0)
1276 t += size; 1276 t += size;
1277 } 1277 }
@@ -1385,7 +1385,7 @@ DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0,
1385{ 1385{
1386 CHECK_FIXNUM (n); 1386 CHECK_FIXNUM (n);
1387 Lisp_Object tail = list; 1387 Lisp_Object tail = list;
1388 for (EMACS_INT num = XINT (n); 0 < num; num--) 1388 for (EMACS_INT num = XFIXNUM (n); 0 < num; num--)
1389 { 1389 {
1390 if (! CONSP (tail)) 1390 if (! CONSP (tail))
1391 { 1391 {
@@ -1645,7 +1645,7 @@ changing the value of a sequence `foo'. */)
1645 cbytes = 1; 1645 cbytes = 1;
1646 } 1646 }
1647 1647
1648 if (!FIXNUMP (elt) || c != XINT (elt)) 1648 if (!FIXNUMP (elt) || c != XFIXNUM (elt))
1649 { 1649 {
1650 ++nchars; 1650 ++nchars;
1651 nbytes += cbytes; 1651 nbytes += cbytes;
@@ -1675,7 +1675,7 @@ changing the value of a sequence `foo'. */)
1675 cbytes = 1; 1675 cbytes = 1;
1676 } 1676 }
1677 1677
1678 if (!FIXNUMP (elt) || c != XINT (elt)) 1678 if (!FIXNUMP (elt) || c != XFIXNUM (elt))
1679 { 1679 {
1680 unsigned char *from = SDATA (seq) + ibyte; 1680 unsigned char *from = SDATA (seq) + ibyte;
1681 unsigned char *to = SDATA (tem) + nbytes; 1681 unsigned char *to = SDATA (tem) + nbytes;
@@ -1846,7 +1846,7 @@ sort_list (Lisp_Object list, Lisp_Object predicate)
1846 1846
1847 front = list; 1847 front = list;
1848 len = Flength (list); 1848 len = Flength (list);
1849 length = XINT (len); 1849 length = XFIXNUM (len);
1850 if (length < 2) 1850 if (length < 2)
1851 return list; 1851 return list;
1852 1852
@@ -2417,7 +2417,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
2417 register unsigned char *p = SDATA (array); 2417 register unsigned char *p = SDATA (array);
2418 int charval; 2418 int charval;
2419 CHECK_CHARACTER (item); 2419 CHECK_CHARACTER (item);
2420 charval = XFASTINT (item); 2420 charval = XFIXNAT (item);
2421 size = SCHARS (array); 2421 size = SCHARS (array);
2422 if (STRING_MULTIBYTE (array)) 2422 if (STRING_MULTIBYTE (array))
2423 { 2423 {
@@ -2569,7 +2569,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
2569 (Lisp_Object function, Lisp_Object sequence, Lisp_Object separator) 2569 (Lisp_Object function, Lisp_Object sequence, Lisp_Object separator)
2570{ 2570{
2571 USE_SAFE_ALLOCA; 2571 USE_SAFE_ALLOCA;
2572 EMACS_INT leni = XFASTINT (Flength (sequence)); 2572 EMACS_INT leni = XFIXNAT (Flength (sequence));
2573 if (CHAR_TABLE_P (sequence)) 2573 if (CHAR_TABLE_P (sequence))
2574 wrong_type_argument (Qlistp, sequence); 2574 wrong_type_argument (Qlistp, sequence);
2575 EMACS_INT args_alloc = 2 * leni - 1; 2575 EMACS_INT args_alloc = 2 * leni - 1;
@@ -2598,7 +2598,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
2598 (Lisp_Object function, Lisp_Object sequence) 2598 (Lisp_Object function, Lisp_Object sequence)
2599{ 2599{
2600 USE_SAFE_ALLOCA; 2600 USE_SAFE_ALLOCA;
2601 EMACS_INT leni = XFASTINT (Flength (sequence)); 2601 EMACS_INT leni = XFIXNAT (Flength (sequence));
2602 if (CHAR_TABLE_P (sequence)) 2602 if (CHAR_TABLE_P (sequence))
2603 wrong_type_argument (Qlistp, sequence); 2603 wrong_type_argument (Qlistp, sequence);
2604 Lisp_Object *args; 2604 Lisp_Object *args;
@@ -2617,7 +2617,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
2617{ 2617{
2618 register EMACS_INT leni; 2618 register EMACS_INT leni;
2619 2619
2620 leni = XFASTINT (Flength (sequence)); 2620 leni = XFIXNAT (Flength (sequence));
2621 if (CHAR_TABLE_P (sequence)) 2621 if (CHAR_TABLE_P (sequence))
2622 wrong_type_argument (Qlistp, sequence); 2622 wrong_type_argument (Qlistp, sequence);
2623 mapcar1 (leni, 0, function, sequence); 2623 mapcar1 (leni, 0, function, sequence);
@@ -2632,7 +2632,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
2632 (Lisp_Object function, Lisp_Object sequence) 2632 (Lisp_Object function, Lisp_Object sequence)
2633{ 2633{
2634 USE_SAFE_ALLOCA; 2634 USE_SAFE_ALLOCA;
2635 EMACS_INT leni = XFASTINT (Flength (sequence)); 2635 EMACS_INT leni = XFIXNAT (Flength (sequence));
2636 if (CHAR_TABLE_P (sequence)) 2636 if (CHAR_TABLE_P (sequence))
2637 wrong_type_argument (Qlistp, sequence); 2637 wrong_type_argument (Qlistp, sequence);
2638 Lisp_Object *args; 2638 Lisp_Object *args;
@@ -3159,9 +3159,9 @@ into shorter lines. */)
3159 3159
3160 validate_region (&beg, &end); 3160 validate_region (&beg, &end);
3161 3161
3162 ibeg = CHAR_TO_BYTE (XFASTINT (beg)); 3162 ibeg = CHAR_TO_BYTE (XFIXNAT (beg));
3163 iend = CHAR_TO_BYTE (XFASTINT (end)); 3163 iend = CHAR_TO_BYTE (XFIXNAT (end));
3164 move_gap_both (XFASTINT (beg), ibeg); 3164 move_gap_both (XFIXNAT (beg), ibeg);
3165 3165
3166 /* We need to allocate enough room for encoding the text. 3166 /* We need to allocate enough room for encoding the text.
3167 We need 33 1/3% more space, plus a newline every 76 3167 We need 33 1/3% more space, plus a newline every 76
@@ -3186,17 +3186,17 @@ into shorter lines. */)
3186 3186
3187 /* Now we have encoded the region, so we insert the new contents 3187 /* Now we have encoded the region, so we insert the new contents
3188 and delete the old. (Insert first in order to preserve markers.) */ 3188 and delete the old. (Insert first in order to preserve markers.) */
3189 SET_PT_BOTH (XFASTINT (beg), ibeg); 3189 SET_PT_BOTH (XFIXNAT (beg), ibeg);
3190 insert (encoded, encoded_length); 3190 insert (encoded, encoded_length);
3191 SAFE_FREE (); 3191 SAFE_FREE ();
3192 del_range_byte (ibeg + encoded_length, iend + encoded_length); 3192 del_range_byte (ibeg + encoded_length, iend + encoded_length);
3193 3193
3194 /* If point was outside of the region, restore it exactly; else just 3194 /* If point was outside of the region, restore it exactly; else just
3195 move to the beginning of the region. */ 3195 move to the beginning of the region. */
3196 if (old_pos >= XFASTINT (end)) 3196 if (old_pos >= XFIXNAT (end))
3197 old_pos += encoded_length - (XFASTINT (end) - XFASTINT (beg)); 3197 old_pos += encoded_length - (XFIXNAT (end) - XFIXNAT (beg));
3198 else if (old_pos > XFASTINT (beg)) 3198 else if (old_pos > XFIXNAT (beg))
3199 old_pos = XFASTINT (beg); 3199 old_pos = XFIXNAT (beg);
3200 SET_PT (old_pos); 3200 SET_PT (old_pos);
3201 3201
3202 /* We return the length of the encoded text. */ 3202 /* We return the length of the encoded text. */
@@ -3359,8 +3359,8 @@ If the region can't be decoded, signal an error and don't modify the buffer. */
3359 3359
3360 validate_region (&beg, &end); 3360 validate_region (&beg, &end);
3361 3361
3362 ibeg = CHAR_TO_BYTE (XFASTINT (beg)); 3362 ibeg = CHAR_TO_BYTE (XFIXNAT (beg));
3363 iend = CHAR_TO_BYTE (XFASTINT (end)); 3363 iend = CHAR_TO_BYTE (XFIXNAT (end));
3364 3364
3365 length = iend - ibeg; 3365 length = iend - ibeg;
3366 3366
@@ -3370,7 +3370,7 @@ If the region can't be decoded, signal an error and don't modify the buffer. */
3370 allength = multibyte ? length * 2 : length; 3370 allength = multibyte ? length * 2 : length;
3371 decoded = SAFE_ALLOCA (allength); 3371 decoded = SAFE_ALLOCA (allength);
3372 3372
3373 move_gap_both (XFASTINT (beg), ibeg); 3373 move_gap_both (XFIXNAT (beg), ibeg);
3374 decoded_length = base64_decode_1 ((char *) BYTE_POS_ADDR (ibeg), 3374 decoded_length = base64_decode_1 ((char *) BYTE_POS_ADDR (ibeg),
3375 decoded, length, 3375 decoded, length,
3376 multibyte, &inserted_chars); 3376 multibyte, &inserted_chars);
@@ -3385,21 +3385,21 @@ If the region can't be decoded, signal an error and don't modify the buffer. */
3385 3385
3386 /* Now we have decoded the region, so we insert the new contents 3386 /* Now we have decoded the region, so we insert the new contents
3387 and delete the old. (Insert first in order to preserve markers.) */ 3387 and delete the old. (Insert first in order to preserve markers.) */
3388 TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg); 3388 TEMP_SET_PT_BOTH (XFIXNAT (beg), ibeg);
3389 insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0); 3389 insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0);
3390 signal_after_change (XFASTINT (beg), 0, inserted_chars); 3390 signal_after_change (XFIXNAT (beg), 0, inserted_chars);
3391 SAFE_FREE (); 3391 SAFE_FREE ();
3392 3392
3393 /* Delete the original text. */ 3393 /* Delete the original text. */
3394 del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars, 3394 del_range_both (PT, PT_BYTE, XFIXNAT (end) + inserted_chars,
3395 iend + decoded_length, 1); 3395 iend + decoded_length, 1);
3396 3396
3397 /* If point was outside of the region, restore it exactly; else just 3397 /* If point was outside of the region, restore it exactly; else just
3398 move to the beginning of the region. */ 3398 move to the beginning of the region. */
3399 if (old_pos >= XFASTINT (end)) 3399 if (old_pos >= XFIXNAT (end))
3400 old_pos += inserted_chars - (XFASTINT (end) - XFASTINT (beg)); 3400 old_pos += inserted_chars - (XFIXNAT (end) - XFIXNAT (beg));
3401 else if (old_pos > XFASTINT (beg)) 3401 else if (old_pos > XFIXNAT (beg))
3402 old_pos = XFASTINT (beg); 3402 old_pos = XFIXNAT (beg);
3403 SET_PT (old_pos > ZV ? ZV : old_pos); 3403 SET_PT (old_pos > ZV ? ZV : old_pos);
3404 3404
3405 return make_fixnum (inserted_chars); 3405 return make_fixnum (inserted_chars);
@@ -3696,7 +3696,7 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max)
3696static ptrdiff_t 3696static ptrdiff_t
3697HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx) 3697HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx)
3698{ 3698{
3699 return XINT (AREF (h->next, idx)); 3699 return XFIXNUM (AREF (h->next, idx));
3700} 3700}
3701 3701
3702/* Return the index of the element in hash table H that is the start 3702/* Return the index of the element in hash table H that is the start
@@ -3705,7 +3705,7 @@ HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx)
3705static ptrdiff_t 3705static ptrdiff_t
3706HASH_INDEX (struct Lisp_Hash_Table *h, ptrdiff_t idx) 3706HASH_INDEX (struct Lisp_Hash_Table *h, ptrdiff_t idx)
3707{ 3707{
3708 return XINT (AREF (h->index, idx)); 3708 return XFIXNUM (AREF (h->index, idx));
3709} 3709}
3710 3710
3711/* Compare KEY1 which has hash code HASH1 and KEY2 with hash code 3711/* Compare KEY1 which has hash code HASH1 and KEY2 with hash code
@@ -4008,7 +4008,7 @@ maybe_resize_hash_table (struct Lisp_Hash_Table *h)
4008 for (i = 0; i < old_size; ++i) 4008 for (i = 0; i < old_size; ++i)
4009 if (!NILP (HASH_HASH (h, i))) 4009 if (!NILP (HASH_HASH (h, i)))
4010 { 4010 {
4011 EMACS_UINT hash_code = XUINT (HASH_HASH (h, i)); 4011 EMACS_UINT hash_code = XUFIXNUM (HASH_HASH (h, i));
4012 ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index); 4012 ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index);
4013 set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket)); 4013 set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket));
4014 set_hash_index_slot (h, start_of_bucket, i); 4014 set_hash_index_slot (h, start_of_bucket, i);
@@ -4037,7 +4037,7 @@ hash_lookup (struct Lisp_Hash_Table *h, Lisp_Object key, EMACS_UINT *hash)
4037 for (i = HASH_INDEX (h, start_of_bucket); 0 <= i; i = HASH_NEXT (h, i)) 4037 for (i = HASH_INDEX (h, start_of_bucket); 0 <= i; i = HASH_NEXT (h, i))
4038 if (EQ (key, HASH_KEY (h, i)) 4038 if (EQ (key, HASH_KEY (h, i))
4039 || (h->test.cmpfn 4039 || (h->test.cmpfn
4040 && hash_code == XUINT (HASH_HASH (h, i)) 4040 && hash_code == XUFIXNUM (HASH_HASH (h, i))
4041 && h->test.cmpfn (&h->test, key, HASH_KEY (h, i)))) 4041 && h->test.cmpfn (&h->test, key, HASH_KEY (h, i))))
4042 break; 4042 break;
4043 4043
@@ -4094,7 +4094,7 @@ hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
4094 { 4094 {
4095 if (EQ (key, HASH_KEY (h, i)) 4095 if (EQ (key, HASH_KEY (h, i))
4096 || (h->test.cmpfn 4096 || (h->test.cmpfn
4097 && hash_code == XUINT (HASH_HASH (h, i)) 4097 && hash_code == XUFIXNUM (HASH_HASH (h, i))
4098 && h->test.cmpfn (&h->test, key, HASH_KEY (h, i)))) 4098 && h->test.cmpfn (&h->test, key, HASH_KEY (h, i))))
4099 { 4099 {
4100 /* Take entry out of collision chain. */ 4100 /* Take entry out of collision chain. */
@@ -4444,7 +4444,7 @@ sxhash (Lisp_Object obj, int depth)
4444 switch (XTYPE (obj)) 4444 switch (XTYPE (obj))
4445 { 4445 {
4446 case_Lisp_Int: 4446 case_Lisp_Int:
4447 hash = XUINT (obj); 4447 hash = XUFIXNUM (obj);
4448 break; 4448 break;
4449 4449
4450 case Lisp_Misc: 4450 case Lisp_Misc:
@@ -4607,7 +4607,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
4607 if (NILP (size_arg)) 4607 if (NILP (size_arg))
4608 size = DEFAULT_HASH_SIZE; 4608 size = DEFAULT_HASH_SIZE;
4609 else if (FIXNATP (size_arg)) 4609 else if (FIXNATP (size_arg))
4610 size = XFASTINT (size_arg); 4610 size = XFIXNAT (size_arg);
4611 else 4611 else
4612 signal_error ("Invalid hash table size", size_arg); 4612 signal_error ("Invalid hash table size", size_arg);
4613 4613
@@ -4616,8 +4616,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
4616 i = get_key_arg (QCrehash_size, nargs, args, used); 4616 i = get_key_arg (QCrehash_size, nargs, args, used);
4617 if (!i) 4617 if (!i)
4618 rehash_size = DEFAULT_REHASH_SIZE; 4618 rehash_size = DEFAULT_REHASH_SIZE;
4619 else if (FIXNUMP (args[i]) && 0 < XINT (args[i])) 4619 else if (FIXNUMP (args[i]) && 0 < XFIXNUM (args[i]))
4620 rehash_size = - XINT (args[i]); 4620 rehash_size = - XFIXNUM (args[i]);
4621 else if (FLOATP (args[i]) && 0 < (float) (XFLOAT_DATA (args[i]) - 1)) 4621 else if (FLOATP (args[i]) && 0 < (float) (XFLOAT_DATA (args[i]) - 1))
4622 rehash_size = (float) (XFLOAT_DATA (args[i]) - 1); 4622 rehash_size = (float) (XFLOAT_DATA (args[i]) - 1);
4623 else 4623 else
@@ -4932,7 +4932,7 @@ extract_data_from_object (Lisp_Object spec,
4932 else 4932 else
4933 { 4933 {
4934 CHECK_FIXNUM_COERCE_MARKER (start); 4934 CHECK_FIXNUM_COERCE_MARKER (start);
4935 b = XINT (start); 4935 b = XFIXNUM (start);
4936 } 4936 }
4937 4937
4938 if (NILP (end)) 4938 if (NILP (end))
@@ -4940,7 +4940,7 @@ extract_data_from_object (Lisp_Object spec,
4940 else 4940 else
4941 { 4941 {
4942 CHECK_FIXNUM_COERCE_MARKER (end); 4942 CHECK_FIXNUM_COERCE_MARKER (end);
4943 e = XINT (end); 4943 e = XFIXNUM (end);
4944 } 4944 }
4945 4945
4946 if (b > e) 4946 if (b > e)
@@ -5033,7 +5033,7 @@ extract_data_from_object (Lisp_Object spec,
5033 error ("Without a length, `iv-auto' can't be used; see ELisp manual"); 5033 error ("Without a length, `iv-auto' can't be used; see ELisp manual");
5034 else 5034 else
5035 { 5035 {
5036 EMACS_INT start_hold = XFASTINT (start); 5036 EMACS_INT start_hold = XFIXNAT (start);
5037 object = make_uninit_string (start_hold); 5037 object = make_uninit_string (start_hold);
5038 gnutls_rnd (GNUTLS_RND_NONCE, SSDATA (object), start_hold); 5038 gnutls_rnd (GNUTLS_RND_NONCE, SSDATA (object), start_hold);
5039 5039
diff --git a/src/font.c b/src/font.c
index 382cd78a230..f31d9c21e71 100644
--- a/src/font.c
+++ b/src/font.c
@@ -303,7 +303,7 @@ font_pixel_size (struct frame *f, Lisp_Object spec)
303 Lisp_Object val; 303 Lisp_Object val;
304 304
305 if (FIXNUMP (size)) 305 if (FIXNUMP (size))
306 return XINT (size); 306 return XFIXNUM (size);
307 if (NILP (size)) 307 if (NILP (size))
308 return 0; 308 return 0;
309 if (FRAME_WINDOW_P (f)) 309 if (FRAME_WINDOW_P (f))
@@ -312,7 +312,7 @@ font_pixel_size (struct frame *f, Lisp_Object spec)
312 point_size = XFLOAT_DATA (size); 312 point_size = XFLOAT_DATA (size);
313 val = AREF (spec, FONT_DPI_INDEX); 313 val = AREF (spec, FONT_DPI_INDEX);
314 if (FIXNUMP (val)) 314 if (FIXNUMP (val))
315 dpi = XINT (val); 315 dpi = XFIXNUM (val);
316 else 316 else
317 dpi = FRAME_RES_Y (f); 317 dpi = FRAME_RES_Y (f);
318 pixel_size = POINT_TO_PIXEL (point_size, dpi); 318 pixel_size = POINT_TO_PIXEL (point_size, dpi);
@@ -354,7 +354,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
354 if (EQ (val, AREF (AREF (table, i), j))) 354 if (EQ (val, AREF (AREF (table, i), j)))
355 { 355 {
356 CHECK_FIXNUM (AREF (AREF (table, i), 0)); 356 CHECK_FIXNUM (AREF (AREF (table, i), 0));
357 return ((XINT (AREF (AREF (table, i), 0)) << 8) 357 return ((XFIXNUM (AREF (AREF (table, i), 0)) << 8)
358 | (i << 4) | (j - 1)); 358 | (i << 4) | (j - 1));
359 } 359 }
360 } 360 }
@@ -367,7 +367,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
367 if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0) 367 if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0)
368 { 368 {
369 CHECK_FIXNUM (AREF (AREF (table, i), 0)); 369 CHECK_FIXNUM (AREF (AREF (table, i), 0));
370 return ((XINT (AREF (AREF (table, i), 0)) << 8) 370 return ((XFIXNUM (AREF (AREF (table, i), 0)) << 8)
371 | (i << 4) | (j - 1)); 371 | (i << 4) | (j - 1));
372 } 372 }
373 } 373 }
@@ -383,7 +383,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
383 else 383 else
384 { 384 {
385 int i, last_n; 385 int i, last_n;
386 EMACS_INT numeric = XINT (val); 386 EMACS_INT numeric = XFIXNUM (val);
387 387
388 for (i = 0, last_n = -1; i < len; i++) 388 for (i = 0, last_n = -1; i < len; i++)
389 { 389 {
@@ -391,7 +391,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
391 391
392 CHECK_VECTOR (AREF (table, i)); 392 CHECK_VECTOR (AREF (table, i));
393 CHECK_FIXNUM (AREF (AREF (table, i), 0)); 393 CHECK_FIXNUM (AREF (AREF (table, i), 0));
394 n = XINT (AREF (AREF (table, i), 0)); 394 n = XFIXNUM (AREF (AREF (table, i), 0));
395 if (numeric == n) 395 if (numeric == n)
396 return (n << 8) | (i << 4); 396 return (n << 8) | (i << 4);
397 if (numeric < n) 397 if (numeric < n)
@@ -421,7 +421,7 @@ font_style_symbolic (Lisp_Object font, enum font_property_index prop,
421 return Qnil; 421 return Qnil;
422 table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX); 422 table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX);
423 CHECK_VECTOR (table); 423 CHECK_VECTOR (table);
424 i = XINT (val) & 0xFF; 424 i = XFIXNUM (val) & 0xFF;
425 eassert (((i >> 4) & 0xF) < ASIZE (table)); 425 eassert (((i >> 4) & 0xF) < ASIZE (table));
426 elt = AREF (table, ((i >> 4) & 0xF)); 426 elt = AREF (table, ((i >> 4) & 0xF));
427 CHECK_VECTOR (elt); 427 CHECK_VECTOR (elt);
@@ -470,28 +470,28 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct
470 val = XCDR (val); 470 val = XCDR (val);
471 if (NILP (val)) 471 if (NILP (val))
472 return -1; 472 return -1;
473 encoding_id = XINT (XCAR (val)); 473 encoding_id = XFIXNUM (XCAR (val));
474 repertory_id = XINT (XCDR (val)); 474 repertory_id = XFIXNUM (XCDR (val));
475 } 475 }
476 else 476 else
477 { 477 {
478 val = find_font_encoding (SYMBOL_NAME (registry)); 478 val = find_font_encoding (SYMBOL_NAME (registry));
479 if (SYMBOLP (val) && CHARSETP (val)) 479 if (SYMBOLP (val) && CHARSETP (val))
480 { 480 {
481 encoding_id = repertory_id = XINT (CHARSET_SYMBOL_ID (val)); 481 encoding_id = repertory_id = XFIXNUM (CHARSET_SYMBOL_ID (val));
482 } 482 }
483 else if (CONSP (val)) 483 else if (CONSP (val))
484 { 484 {
485 if (! CHARSETP (XCAR (val))) 485 if (! CHARSETP (XCAR (val)))
486 goto invalid_entry; 486 goto invalid_entry;
487 encoding_id = XINT (CHARSET_SYMBOL_ID (XCAR (val))); 487 encoding_id = XFIXNUM (CHARSET_SYMBOL_ID (XCAR (val)));
488 if (NILP (XCDR (val))) 488 if (NILP (XCDR (val)))
489 repertory_id = -1; 489 repertory_id = -1;
490 else 490 else
491 { 491 {
492 if (! CHARSETP (XCDR (val))) 492 if (! CHARSETP (XCDR (val)))
493 goto invalid_entry; 493 goto invalid_entry;
494 repertory_id = XINT (CHARSET_SYMBOL_ID (XCDR (val))); 494 repertory_id = XFIXNUM (CHARSET_SYMBOL_ID (XCDR (val)));
495 } 495 }
496 } 496 }
497 else 497 else
@@ -545,7 +545,7 @@ font_prop_validate_style (Lisp_Object style, Lisp_Object val)
545 : FONT_WIDTH_INDEX); 545 : FONT_WIDTH_INDEX);
546 if (FIXNUMP (val)) 546 if (FIXNUMP (val))
547 { 547 {
548 EMACS_INT n = XINT (val); 548 EMACS_INT n = XFIXNUM (val);
549 CHECK_VECTOR (AREF (font_style_table, prop - FONT_WEIGHT_INDEX)); 549 CHECK_VECTOR (AREF (font_style_table, prop - FONT_WEIGHT_INDEX));
550 if (((n >> 4) & 0xF) 550 if (((n >> 4) & 0xF)
551 >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX))) 551 >= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX)))
@@ -560,7 +560,7 @@ font_prop_validate_style (Lisp_Object style, Lisp_Object val)
560 else 560 else
561 { 561 {
562 CHECK_FIXNUM (AREF (elt, 0)); 562 CHECK_FIXNUM (AREF (elt, 0));
563 if (XINT (AREF (elt, 0)) != (n >> 8)) 563 if (XFIXNUM (AREF (elt, 0)) != (n >> 8))
564 val = Qerror; 564 val = Qerror;
565 } 565 }
566 } 566 }
@@ -586,7 +586,7 @@ font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val)
586static Lisp_Object 586static Lisp_Object
587font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val) 587font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val)
588{ 588{
589 if (NILP (val) || (FIXNATP (val) && XINT (val) <= FONT_SPACING_CHARCELL)) 589 if (NILP (val) || (FIXNATP (val) && XFIXNUM (val) <= FONT_SPACING_CHARCELL))
590 return val; 590 return val;
591 if (SYMBOLP (val) && SBYTES (SYMBOL_NAME (val)) == 1) 591 if (SYMBOLP (val) && SBYTES (SYMBOL_NAME (val)) == 1)
592 { 592 {
@@ -877,7 +877,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
877 877
878 if (FIXNUMP (val)) 878 if (FIXNUMP (val))
879 { 879 {
880 EMACS_INT numeric = XINT (val); 880 EMACS_INT numeric = XFIXNUM (val);
881 881
882 if (i + 1 == n) 882 if (i + 1 == n)
883 from = to = XLFD_ENCODING_INDEX, 883 from = to = XLFD_ENCODING_INDEX,
@@ -1185,7 +1185,7 @@ font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font)
1185 ASET (font, FONT_SIZE_INDEX, prop[XLFD_PIXEL_INDEX]); 1185 ASET (font, FONT_SIZE_INDEX, prop[XLFD_PIXEL_INDEX]);
1186 else if (FIXNUMP (prop[XLFD_POINT_INDEX])) 1186 else if (FIXNUMP (prop[XLFD_POINT_INDEX]))
1187 { 1187 {
1188 double point_size = XINT (prop[XLFD_POINT_INDEX]); 1188 double point_size = XFIXNUM (prop[XLFD_POINT_INDEX]);
1189 1189
1190 ASET (font, FONT_SIZE_INDEX, make_float (point_size / 10)); 1190 ASET (font, FONT_SIZE_INDEX, make_float (point_size / 10));
1191 } 1191 }
@@ -1289,7 +1289,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1289 1 + DBL_MAX_10_EXP + 1)]; 1289 1 + DBL_MAX_10_EXP + 1)];
1290 if (FIXNUMP (val)) 1290 if (FIXNUMP (val))
1291 { 1291 {
1292 EMACS_INT v = XINT (val); 1292 EMACS_INT v = XFIXNUM (val);
1293 if (v <= 0) 1293 if (v <= 0)
1294 v = pixel_size; 1294 v = pixel_size;
1295 if (v > 0) 1295 if (v > 0)
@@ -1312,7 +1312,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1312 char dpi_index_buf[sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT)]; 1312 char dpi_index_buf[sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT)];
1313 if (FIXNUMP (AREF (font, FONT_DPI_INDEX))) 1313 if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
1314 { 1314 {
1315 EMACS_INT v = XINT (AREF (font, FONT_DPI_INDEX)); 1315 EMACS_INT v = XFIXNUM (AREF (font, FONT_DPI_INDEX));
1316 f[XLFD_RESX_INDEX] = p = dpi_index_buf; 1316 f[XLFD_RESX_INDEX] = p = dpi_index_buf;
1317 sprintf (p, "%"pI"d-%"pI"d", v, v); 1317 sprintf (p, "%"pI"d-%"pI"d", v, v);
1318 } 1318 }
@@ -1321,7 +1321,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1321 1321
1322 if (FIXNUMP (AREF (font, FONT_SPACING_INDEX))) 1322 if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
1323 { 1323 {
1324 EMACS_INT spacing = XINT (AREF (font, FONT_SPACING_INDEX)); 1324 EMACS_INT spacing = XFIXNUM (AREF (font, FONT_SPACING_INDEX));
1325 1325
1326 f[XLFD_SPACING_INDEX] = (spacing <= FONT_SPACING_PROPORTIONAL ? "p" 1326 f[XLFD_SPACING_INDEX] = (spacing <= FONT_SPACING_PROPORTIONAL ? "p"
1327 : spacing <= FONT_SPACING_DUAL ? "d" 1327 : spacing <= FONT_SPACING_DUAL ? "d"
@@ -1335,7 +1335,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
1335 if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX))) 1335 if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX)))
1336 { 1336 {
1337 f[XLFD_AVGWIDTH_INDEX] = p = avgwidth_index_buf; 1337 f[XLFD_AVGWIDTH_INDEX] = p = avgwidth_index_buf;
1338 sprintf (p, "%"pI"d", XINT (AREF (font, FONT_AVGWIDTH_INDEX))); 1338 sprintf (p, "%"pI"d", XFIXNUM (AREF (font, FONT_AVGWIDTH_INDEX)));
1339 } 1339 }
1340 else 1340 else
1341 f[XLFD_AVGWIDTH_INDEX] = "*"; 1341 f[XLFD_AVGWIDTH_INDEX] = "*";
@@ -1623,8 +1623,8 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1623 val = AREF (font, FONT_SIZE_INDEX); 1623 val = AREF (font, FONT_SIZE_INDEX);
1624 if (FIXNUMP (val)) 1624 if (FIXNUMP (val))
1625 { 1625 {
1626 if (XINT (val) != 0) 1626 if (XFIXNUM (val) != 0)
1627 pixel_size = XINT (val); 1627 pixel_size = XFIXNUM (val);
1628 point_size = -1; 1628 point_size = -1;
1629 } 1629 }
1630 else 1630 else
@@ -1691,7 +1691,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1691 if (FIXNUMP (AREF (font, FONT_DPI_INDEX))) 1691 if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
1692 { 1692 {
1693 int len = snprintf (p, lim - p, ":dpi=%"pI"d", 1693 int len = snprintf (p, lim - p, ":dpi=%"pI"d",
1694 XINT (AREF (font, FONT_DPI_INDEX))); 1694 XFIXNUM (AREF (font, FONT_DPI_INDEX)));
1695 if (! (0 <= len && len < lim - p)) 1695 if (! (0 <= len && len < lim - p))
1696 return -1; 1696 return -1;
1697 p += len; 1697 p += len;
@@ -1700,7 +1700,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1700 if (FIXNUMP (AREF (font, FONT_SPACING_INDEX))) 1700 if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
1701 { 1701 {
1702 int len = snprintf (p, lim - p, ":spacing=%"pI"d", 1702 int len = snprintf (p, lim - p, ":spacing=%"pI"d",
1703 XINT (AREF (font, FONT_SPACING_INDEX))); 1703 XFIXNUM (AREF (font, FONT_SPACING_INDEX)));
1704 if (! (0 <= len && len < lim - p)) 1704 if (! (0 <= len && len < lim - p))
1705 return -1; 1705 return -1;
1706 p += len; 1706 p += len;
@@ -1709,7 +1709,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
1709 if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX))) 1709 if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX)))
1710 { 1710 {
1711 int len = snprintf (p, lim - p, 1711 int len = snprintf (p, lim - p,
1712 (XINT (AREF (font, FONT_AVGWIDTH_INDEX)) == 0 1712 (XFIXNUM (AREF (font, FONT_AVGWIDTH_INDEX)) == 0
1713 ? ":scalable=true" 1713 ? ":scalable=true"
1714 : ":scalable=false")); 1714 : ":scalable=false"));
1715 if (! (0 <= len && len < lim - p)) 1715 if (! (0 <= len && len < lim - p))
@@ -2134,20 +2134,20 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
2134 for (i = FONT_WEIGHT_INDEX; i <= FONT_WIDTH_INDEX; i++) 2134 for (i = FONT_WEIGHT_INDEX; i <= FONT_WIDTH_INDEX; i++)
2135 if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i])) 2135 if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i]))
2136 { 2136 {
2137 EMACS_INT diff = ((XINT (AREF (entity, i)) >> 8) 2137 EMACS_INT diff = ((XFIXNUM (AREF (entity, i)) >> 8)
2138 - (XINT (spec_prop[i]) >> 8)); 2138 - (XFIXNUM (spec_prop[i]) >> 8));
2139 score |= min (eabs (diff), 127) << sort_shift_bits[i]; 2139 score |= min (eabs (diff), 127) << sort_shift_bits[i];
2140 } 2140 }
2141 2141
2142 /* Score the size. Maximum difference is 127. */ 2142 /* Score the size. Maximum difference is 127. */
2143 if (! NILP (spec_prop[FONT_SIZE_INDEX]) 2143 if (! NILP (spec_prop[FONT_SIZE_INDEX])
2144 && XINT (AREF (entity, FONT_SIZE_INDEX)) > 0) 2144 && XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
2145 { 2145 {
2146 /* We use the higher 6-bit for the actual size difference. The 2146 /* We use the higher 6-bit for the actual size difference. The
2147 lowest bit is set if the DPI is different. */ 2147 lowest bit is set if the DPI is different. */
2148 EMACS_INT diff; 2148 EMACS_INT diff;
2149 EMACS_INT pixel_size = XINT (spec_prop[FONT_SIZE_INDEX]); 2149 EMACS_INT pixel_size = XFIXNUM (spec_prop[FONT_SIZE_INDEX]);
2150 EMACS_INT entity_size = XINT (AREF (entity, FONT_SIZE_INDEX)); 2150 EMACS_INT entity_size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
2151 2151
2152 if (CONSP (Vface_font_rescale_alist)) 2152 if (CONSP (Vface_font_rescale_alist))
2153 pixel_size *= font_rescale_ratio (entity); 2153 pixel_size *= font_rescale_ratio (entity);
@@ -2174,7 +2174,7 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
2174static Lisp_Object 2174static Lisp_Object
2175font_vconcat_entity_vectors (Lisp_Object list) 2175font_vconcat_entity_vectors (Lisp_Object list)
2176{ 2176{
2177 EMACS_INT nargs = XFASTINT (Flength (list)); 2177 EMACS_INT nargs = XFIXNAT (Flength (list));
2178 Lisp_Object *args; 2178 Lisp_Object *args;
2179 USE_SAFE_ALLOCA; 2179 USE_SAFE_ALLOCA;
2180 SAFE_ALLOCA_LISP (args, nargs); 2180 SAFE_ALLOCA_LISP (args, nargs);
@@ -2492,7 +2492,7 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
2492 { 2492 {
2493 if (! CHARACTERP (XCAR (val2))) 2493 if (! CHARACTERP (XCAR (val2)))
2494 continue; 2494 continue;
2495 if (font_encode_char (font, XFASTINT (XCAR (val2))) 2495 if (font_encode_char (font, XFIXNAT (XCAR (val2)))
2496 == FONT_INVALID_CODE) 2496 == FONT_INVALID_CODE)
2497 return 0; 2497 return 0;
2498 } 2498 }
@@ -2504,7 +2504,7 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
2504 { 2504 {
2505 if (! CHARACTERP (AREF (val2, i))) 2505 if (! CHARACTERP (AREF (val2, i)))
2506 continue; 2506 continue;
2507 if (font_encode_char (font, XFASTINT (AREF (val2, i))) 2507 if (font_encode_char (font, XFIXNAT (AREF (val2, i)))
2508 != FONT_INVALID_CODE) 2508 != FONT_INVALID_CODE)
2509 break; 2509 break;
2510 } 2510 }
@@ -2565,7 +2565,7 @@ font_prepare_cache (struct frame *f, struct font_driver const *driver)
2565 else 2565 else
2566 { 2566 {
2567 val = XCDR (XCAR (val)); 2567 val = XCDR (XCAR (val));
2568 XSETCAR (val, make_fixnum (XINT (XCAR (val)) + 1)); 2568 XSETCAR (val, make_fixnum (XFIXNUM (XCAR (val)) + 1));
2569 } 2569 }
2570} 2570}
2571 2571
@@ -2582,8 +2582,8 @@ font_finish_cache (struct frame *f, struct font_driver const *driver)
2582 cache = val, val = XCDR (val); 2582 cache = val, val = XCDR (val);
2583 eassert (! NILP (val)); 2583 eassert (! NILP (val));
2584 tmp = XCDR (XCAR (val)); 2584 tmp = XCDR (XCAR (val));
2585 XSETCAR (tmp, make_fixnum (XINT (XCAR (tmp)) - 1)); 2585 XSETCAR (tmp, make_fixnum (XFIXNUM (XCAR (tmp)) - 1));
2586 if (XINT (XCAR (tmp)) == 0) 2586 if (XFIXNUM (XCAR (tmp)) == 0)
2587 { 2587 {
2588 font_clear_cache (f, XCAR (val), driver); 2588 font_clear_cache (f, XCAR (val), driver);
2589 XSETCDR (cache, XCDR (val)); 2589 XSETCDR (cache, XCDR (val));
@@ -2699,14 +2699,14 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
2699 } 2699 }
2700 for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++) 2700 for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++)
2701 if (FIXNUMP (AREF (spec, prop)) 2701 if (FIXNUMP (AREF (spec, prop))
2702 && ((XINT (AREF (spec, prop)) >> 8) 2702 && ((XFIXNUM (AREF (spec, prop)) >> 8)
2703 != (XINT (AREF (entity, prop)) >> 8))) 2703 != (XFIXNUM (AREF (entity, prop)) >> 8)))
2704 prop = FONT_SPEC_MAX; 2704 prop = FONT_SPEC_MAX;
2705 if (prop < FONT_SPEC_MAX 2705 if (prop < FONT_SPEC_MAX
2706 && size 2706 && size
2707 && XINT (AREF (entity, FONT_SIZE_INDEX)) > 0) 2707 && XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
2708 { 2708 {
2709 int diff = XINT (AREF (entity, FONT_SIZE_INDEX)) - size; 2709 int diff = XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) - size;
2710 2710
2711 if (eabs (diff) > FONT_PIXEL_SIZE_QUANTUM) 2711 if (eabs (diff) > FONT_PIXEL_SIZE_QUANTUM)
2712 prop = FONT_SPEC_MAX; 2712 prop = FONT_SPEC_MAX;
@@ -2714,13 +2714,13 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
2714 if (prop < FONT_SPEC_MAX 2714 if (prop < FONT_SPEC_MAX
2715 && FIXNUMP (AREF (spec, FONT_DPI_INDEX)) 2715 && FIXNUMP (AREF (spec, FONT_DPI_INDEX))
2716 && FIXNUMP (AREF (entity, FONT_DPI_INDEX)) 2716 && FIXNUMP (AREF (entity, FONT_DPI_INDEX))
2717 && XINT (AREF (entity, FONT_DPI_INDEX)) != 0 2717 && XFIXNUM (AREF (entity, FONT_DPI_INDEX)) != 0
2718 && ! EQ (AREF (spec, FONT_DPI_INDEX), AREF (entity, FONT_DPI_INDEX))) 2718 && ! EQ (AREF (spec, FONT_DPI_INDEX), AREF (entity, FONT_DPI_INDEX)))
2719 prop = FONT_SPEC_MAX; 2719 prop = FONT_SPEC_MAX;
2720 if (prop < FONT_SPEC_MAX 2720 if (prop < FONT_SPEC_MAX
2721 && FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX)) 2721 && FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
2722 && FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX)) 2722 && FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
2723 && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0 2723 && XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0
2724 && ! EQ (AREF (spec, FONT_AVGWIDTH_INDEX), 2724 && ! EQ (AREF (spec, FONT_AVGWIDTH_INDEX),
2725 AREF (entity, FONT_AVGWIDTH_INDEX))) 2725 AREF (entity, FONT_AVGWIDTH_INDEX)))
2726 prop = FONT_SPEC_MAX; 2726 prop = FONT_SPEC_MAX;
@@ -2748,7 +2748,7 @@ font_list_entities (struct frame *f, Lisp_Object spec)
2748 eassert (FONT_SPEC_P (spec)); 2748 eassert (FONT_SPEC_P (spec));
2749 2749
2750 if (FIXNUMP (AREF (spec, FONT_SIZE_INDEX))) 2750 if (FIXNUMP (AREF (spec, FONT_SIZE_INDEX)))
2751 size = XINT (AREF (spec, FONT_SIZE_INDEX)); 2751 size = XFIXNUM (AREF (spec, FONT_SIZE_INDEX));
2752 else if (FLOATP (AREF (spec, FONT_SIZE_INDEX))) 2752 else if (FLOATP (AREF (spec, FONT_SIZE_INDEX)))
2753 size = font_pixel_size (f, spec); 2753 size = font_pixel_size (f, spec);
2754 else 2754 else
@@ -2873,8 +2873,8 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
2873 2873
2874 eassert (FONT_ENTITY_P (entity)); 2874 eassert (FONT_ENTITY_P (entity));
2875 size = AREF (entity, FONT_SIZE_INDEX); 2875 size = AREF (entity, FONT_SIZE_INDEX);
2876 if (XINT (size) != 0) 2876 if (XFIXNUM (size) != 0)
2877 pixel_size = XINT (size); 2877 pixel_size = XFIXNUM (size);
2878 2878
2879 val = AREF (entity, FONT_TYPE_INDEX); 2879 val = AREF (entity, FONT_TYPE_INDEX);
2880 for (driver_list = f->font_driver_list; 2880 for (driver_list = f->font_driver_list;
@@ -3181,7 +3181,7 @@ font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int
3181 pixel_size = font_pixel_size (f, spec); 3181 pixel_size = font_pixel_size (f, spec);
3182 if (pixel_size == 0 && FIXNUMP (attrs[LFACE_HEIGHT_INDEX])) 3182 if (pixel_size == 0 && FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
3183 { 3183 {
3184 double pt = XINT (attrs[LFACE_HEIGHT_INDEX]); 3184 double pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
3185 3185
3186 pixel_size = POINT_TO_PIXEL (pt / 10, FRAME_RES_Y (f)); 3186 pixel_size = POINT_TO_PIXEL (pt / 10, FRAME_RES_Y (f));
3187 if (pixel_size < 1) 3187 if (pixel_size < 1)
@@ -3241,7 +3241,7 @@ font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int
3241 3241
3242 if (! NILP (alters)) 3242 if (! NILP (alters))
3243 { 3243 {
3244 EMACS_INT alterslen = XFASTINT (Flength (alters)); 3244 EMACS_INT alterslen = XFIXNAT (Flength (alters));
3245 SAFE_ALLOCA_LISP (family, alterslen + 2); 3245 SAFE_ALLOCA_LISP (family, alterslen + 2);
3246 for (i = 0; CONSP (alters); i++, alters = XCDR (alters)) 3246 for (i = 0; CONSP (alters); i++, alters = XCDR (alters))
3247 family[i] = XCAR (alters); 3247 family[i] = XCAR (alters);
@@ -3299,8 +3299,8 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
3299 int size; 3299 int size;
3300 3300
3301 if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX)) 3301 if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX))
3302 && XINT (AREF (entity, FONT_SIZE_INDEX)) > 0) 3302 && XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
3303 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 3303 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
3304 else 3304 else
3305 { 3305 {
3306 if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX))) 3306 if (FONT_SPEC_P (spec) && ! NILP (AREF (spec, FONT_SIZE_INDEX)))
@@ -3309,13 +3309,13 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
3309 { 3309 {
3310 double pt; 3310 double pt;
3311 if (FIXNUMP (attrs[LFACE_HEIGHT_INDEX])) 3311 if (FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
3312 pt = XINT (attrs[LFACE_HEIGHT_INDEX]); 3312 pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
3313 else 3313 else
3314 { 3314 {
3315 struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID); 3315 struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
3316 Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX]; 3316 Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
3317 eassert (FIXNUMP (height)); 3317 eassert (FIXNUMP (height));
3318 pt = XINT (height); 3318 pt = XFIXNUM (height);
3319 } 3319 }
3320 3320
3321 pt /= 10; 3321 pt /= 10;
@@ -3325,7 +3325,7 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
3325 { 3325 {
3326 Lisp_Object ffsize = get_frame_param (f, Qfontsize); 3326 Lisp_Object ffsize = get_frame_param (f, Qfontsize);
3327 size = (FIXED_OR_FLOATP (ffsize) 3327 size = (FIXED_OR_FLOATP (ffsize)
3328 ? POINT_TO_PIXEL (XINT (ffsize), FRAME_RES_Y (f)) : 0); 3328 ? POINT_TO_PIXEL (XFIXNUM (ffsize), FRAME_RES_Y (f)) : 0);
3329 } 3329 }
3330#endif 3330#endif
3331 } 3331 }
@@ -3372,7 +3372,7 @@ font_load_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec)
3372 Lisp_Object lsize = Ffont_get (spec, QCsize); 3372 Lisp_Object lsize = Ffont_get (spec, QCsize);
3373 3373
3374 if ((FLOATP (lsize) && XFLOAT_DATA (lsize) == font_size) 3374 if ((FLOATP (lsize) && XFLOAT_DATA (lsize) == font_size)
3375 || (FIXNUMP (lsize) && XINT (lsize) == font_size)) 3375 || (FIXNUMP (lsize) && XFIXNUM (lsize) == font_size))
3376 { 3376 {
3377 ASET (spec, FONT_FAMILY_INDEX, 3377 ASET (spec, FONT_FAMILY_INDEX,
3378 font_intern_prop (p, tail - p, 1)); 3378 font_intern_prop (p, tail - p, 1));
@@ -3673,7 +3673,7 @@ font_filter_properties (Lisp_Object font,
3673 3673
3674 if (strcmp (boolean_properties[i], keystr) == 0) 3674 if (strcmp (boolean_properties[i], keystr) == 0)
3675 { 3675 {
3676 const char *str = FIXNUMP (val) ? (XINT (val) ? "true" : "false") 3676 const char *str = FIXNUMP (val) ? (XFIXNUM (val) ? "true" : "false")
3677 : SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val)) 3677 : SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val))
3678 : "true"; 3678 : "true";
3679 3679
@@ -3828,7 +3828,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
3828 FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte); 3828 FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte);
3829 category = CHAR_TABLE_REF (Vunicode_category_table, c); 3829 category = CHAR_TABLE_REF (Vunicode_category_table, c);
3830 if (FIXNUMP (category) 3830 if (FIXNUMP (category)
3831 && (XINT (category) == UNICODE_CATEGORY_Cf 3831 && (XFIXNUM (category) == UNICODE_CATEGORY_Cf
3832 || CHAR_VARIATION_SELECTOR_P (c))) 3832 || CHAR_VARIATION_SELECTOR_P (c)))
3833 continue; 3833 continue;
3834 if (NILP (font_object)) 3834 if (NILP (font_object))
@@ -4145,9 +4145,9 @@ are to be displayed on. If omitted, the selected frame is used. */)
4145 if (FIXNUMP (val)) 4145 if (FIXNUMP (val))
4146 { 4146 {
4147 Lisp_Object font_dpi = AREF (font, FONT_DPI_INDEX); 4147 Lisp_Object font_dpi = AREF (font, FONT_DPI_INDEX);
4148 int dpi = FIXNUMP (font_dpi) ? XINT (font_dpi) : FRAME_RES_Y (f); 4148 int dpi = FIXNUMP (font_dpi) ? XFIXNUM (font_dpi) : FRAME_RES_Y (f);
4149 plist[n++] = QCheight; 4149 plist[n++] = QCheight;
4150 plist[n++] = make_fixnum (PIXEL_TO_POINT (XINT (val) * 10, dpi)); 4150 plist[n++] = make_fixnum (PIXEL_TO_POINT (XFIXNUM (val) * 10, dpi));
4151 } 4151 }
4152 else if (FLOATP (val)) 4152 else if (FLOATP (val))
4153 { 4153 {
@@ -4232,7 +4232,7 @@ how close they are to PREFER. */)
4232 if (! NILP (num)) 4232 if (! NILP (num))
4233 { 4233 {
4234 CHECK_FIXNUM (num); 4234 CHECK_FIXNUM (num);
4235 n = XINT (num); 4235 n = XFIXNUM (num);
4236 if (n <= 0) 4236 if (n <= 0)
4237 return Qnil; 4237 return Qnil;
4238 } 4238 }
@@ -4358,7 +4358,7 @@ clear_font_cache (struct frame *f)
4358 ! EQ (XCAR (XCAR (val)), driver_list->driver->type)) 4358 ! EQ (XCAR (XCAR (val)), driver_list->driver->type))
4359 val = XCDR (val); 4359 val = XCDR (val);
4360 tmp = XCDR (XCAR (val)); 4360 tmp = XCDR (XCAR (val));
4361 if (XINT (XCAR (tmp)) == 0) 4361 if (XFIXNUM (XCAR (tmp)) == 0)
4362 { 4362 {
4363 font_clear_cache (f, XCAR (val), driver_list->driver); 4363 font_clear_cache (f, XCAR (val), driver_list->driver);
4364 XSETCDR (cache, XCDR (val)); 4364 XSETCDR (cache, XCDR (val));
@@ -4432,10 +4432,10 @@ GSTRING. */)
4432 gstring = larger_vector (gstring, 4432 gstring = larger_vector (gstring,
4433 LGSTRING_GLYPH_LEN (gstring), -1); 4433 LGSTRING_GLYPH_LEN (gstring), -1);
4434 } 4434 }
4435 if (i == 3 || XINT (n) == 0) 4435 if (i == 3 || XFIXNUM (n) == 0)
4436 return Qnil; 4436 return Qnil;
4437 if (XINT (n) < LGSTRING_GLYPH_LEN (gstring)) 4437 if (XFIXNUM (n) < LGSTRING_GLYPH_LEN (gstring))
4438 LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil); 4438 LGSTRING_SET_GLYPH (gstring, XFIXNUM (n), Qnil);
4439 4439
4440 /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that 4440 /* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that
4441 GLYPHS covers all characters (except for the last few ones) in 4441 GLYPHS covers all characters (except for the last few ones) in
@@ -4469,7 +4469,7 @@ GSTRING. */)
4469 from = LGLYPH_FROM (glyph); 4469 from = LGLYPH_FROM (glyph);
4470 to = LGLYPH_TO (glyph); 4470 to = LGLYPH_TO (glyph);
4471 } 4471 }
4472 return composition_gstring_put_cache (gstring, XINT (n)); 4472 return composition_gstring_put_cache (gstring, XFIXNUM (n));
4473 4473
4474 shaper_error: 4474 shaper_error:
4475 return Qnil; 4475 return Qnil;
@@ -4495,7 +4495,7 @@ where
4495 font = XFONT_OBJECT (font_object); 4495 font = XFONT_OBJECT (font_object);
4496 if (! font->driver->get_variation_glyphs) 4496 if (! font->driver->get_variation_glyphs)
4497 return Qnil; 4497 return Qnil;
4498 n = font->driver->get_variation_glyphs (font, XINT (character), variations); 4498 n = font->driver->get_variation_glyphs (font, XFIXNUM (character), variations);
4499 if (! n) 4499 if (! n)
4500 return Qnil; 4500 return Qnil;
4501 val = Qnil; 4501 val = Qnil;
@@ -4556,7 +4556,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
4556 if (NILP (position)) 4556 if (NILP (position))
4557 { 4557 {
4558 CHECK_CHARACTER (ch); 4558 CHECK_CHARACTER (ch);
4559 c = XINT (ch); 4559 c = XFIXNUM (ch);
4560 f = XFRAME (selected_frame); 4560 f = XFRAME (selected_frame);
4561 face_id = lookup_basic_face (NULL, f, DEFAULT_FACE_ID); 4561 face_id = lookup_basic_face (NULL, f, DEFAULT_FACE_ID);
4562 pos = -1; 4562 pos = -1;
@@ -4567,16 +4567,16 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
4567 struct window *w; 4567 struct window *w;
4568 4568
4569 CHECK_FIXNUM_COERCE_MARKER (position); 4569 CHECK_FIXNUM_COERCE_MARKER (position);
4570 if (! (BEGV <= XINT (position) && XINT (position) < ZV)) 4570 if (! (BEGV <= XFIXNUM (position) && XFIXNUM (position) < ZV))
4571 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV)); 4571 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
4572 pos = XINT (position); 4572 pos = XFIXNUM (position);
4573 pos_byte = CHAR_TO_BYTE (pos); 4573 pos_byte = CHAR_TO_BYTE (pos);
4574 if (NILP (ch)) 4574 if (NILP (ch))
4575 c = FETCH_CHAR (pos_byte); 4575 c = FETCH_CHAR (pos_byte);
4576 else 4576 else
4577 { 4577 {
4578 CHECK_FIXNAT (ch); 4578 CHECK_FIXNAT (ch);
4579 c = XINT (ch); 4579 c = XFIXNUM (ch);
4580 } 4580 }
4581 window = Fget_buffer_window (Fcurrent_buffer (), Qnil); 4581 window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
4582 if (NILP (window)) 4582 if (NILP (window))
@@ -4669,13 +4669,13 @@ glyph-string. */)
4669 CHECK_FIXNAT (to); 4669 CHECK_FIXNAT (to);
4670 CHECK_FIXNAT (index); 4670 CHECK_FIXNAT (index);
4671 4671
4672 if (XINT (from) >= XINT (to) || XINT (to) > len) 4672 if (XFIXNUM (from) >= XFIXNUM (to) || XFIXNUM (to) > len)
4673 args_out_of_range_3 (from, to, make_fixnum (len)); 4673 args_out_of_range_3 (from, to, make_fixnum (len));
4674 if (XINT (index) >= ASIZE (gstring_out)) 4674 if (XFIXNUM (index) >= ASIZE (gstring_out))
4675 args_out_of_range (index, make_fixnum (ASIZE (gstring_out))); 4675 args_out_of_range (index, make_fixnum (ASIZE (gstring_out)));
4676 num = font->driver->otf_drive (font, otf_features, 4676 num = font->driver->otf_drive (font, otf_features,
4677 gstring_in, XINT (from), XINT (to), 4677 gstring_in, XFIXNUM (from), XFIXNUM (to),
4678 gstring_out, XINT (index), 0); 4678 gstring_out, XFIXNUM (index), 0);
4679 if (num < 0) 4679 if (num < 0)
4680 return Qnil; 4680 return Qnil;
4681 return make_fixnum (num); 4681 return make_fixnum (num);
@@ -4708,7 +4708,7 @@ corresponding character. */)
4708 4708
4709 gstring_in = Ffont_make_gstring (font_object, make_fixnum (1)); 4709 gstring_in = Ffont_make_gstring (font_object, make_fixnum (1));
4710 g = LGSTRING_GLYPH (gstring_in, 0); 4710 g = LGSTRING_GLYPH (gstring_in, 0);
4711 LGLYPH_SET_CHAR (g, XINT (character)); 4711 LGLYPH_SET_CHAR (g, XFIXNUM (character));
4712 gstring_out = Ffont_make_gstring (font_object, make_fixnum (10)); 4712 gstring_out = Ffont_make_gstring (font_object, make_fixnum (10));
4713 while ((num = font->driver->otf_drive (font, otf_features, gstring_in, 0, 1, 4713 while ((num = font->driver->otf_drive (font, otf_features, gstring_in, 0, 1,
4714 gstring_out, 0, 1)) < 0) 4714 gstring_out, 0, 1)) < 0)
@@ -4741,14 +4741,14 @@ DEFUN ("open-font", Fopen_font, Sopen_font, 1, 3, 0,
4741 CHECK_FONT_ENTITY (font_entity); 4741 CHECK_FONT_ENTITY (font_entity);
4742 4742
4743 if (NILP (size)) 4743 if (NILP (size))
4744 isize = XINT (AREF (font_entity, FONT_SIZE_INDEX)); 4744 isize = XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX));
4745 else 4745 else
4746 { 4746 {
4747 CHECK_FIXNUM_OR_FLOAT (size); 4747 CHECK_FIXNUM_OR_FLOAT (size);
4748 if (FLOATP (size)) 4748 if (FLOATP (size))
4749 isize = POINT_TO_PIXEL (XFLOAT_DATA (size), FRAME_RES_Y (f)); 4749 isize = POINT_TO_PIXEL (XFLOAT_DATA (size), FRAME_RES_Y (f));
4750 else 4750 else
4751 isize = XINT (size); 4751 isize = XFIXNUM (size);
4752 if (! (INT_MIN <= isize && isize <= INT_MAX)) 4752 if (! (INT_MIN <= isize && isize <= INT_MAX))
4753 args_out_of_range (font_entity, size); 4753 args_out_of_range (font_entity, size);
4754 if (isize == 0) 4754 if (isize == 0)
@@ -4862,11 +4862,11 @@ the corresponding element is nil. */)
4862 validate_region (&from, &to); 4862 validate_region (&from, &to);
4863 if (EQ (from, to)) 4863 if (EQ (from, to))
4864 return Qnil; 4864 return Qnil;
4865 len = XFASTINT (to) - XFASTINT (from); 4865 len = XFIXNAT (to) - XFIXNAT (from);
4866 SAFE_ALLOCA_LISP (chars, len); 4866 SAFE_ALLOCA_LISP (chars, len);
4867 charpos = XFASTINT (from); 4867 charpos = XFIXNAT (from);
4868 bytepos = CHAR_TO_BYTE (charpos); 4868 bytepos = CHAR_TO_BYTE (charpos);
4869 for (i = 0; charpos < XFASTINT (to); i++) 4869 for (i = 0; charpos < XFIXNAT (to); i++)
4870 { 4870 {
4871 int c; 4871 int c;
4872 FETCH_CHAR_ADVANCE (c, charpos, bytepos); 4872 FETCH_CHAR_ADVANCE (c, charpos, bytepos);
@@ -4925,7 +4925,7 @@ the corresponding element is nil. */)
4925 for (i = 0; i < len; i++) 4925 for (i = 0; i < len; i++)
4926 { 4926 {
4927 Lisp_Object g; 4927 Lisp_Object g;
4928 int c = XFASTINT (chars[i]); 4928 int c = XFIXNAT (chars[i]);
4929 unsigned code; 4929 unsigned code;
4930 struct font_metrics metrics; 4930 struct font_metrics metrics;
4931 4931
@@ -4979,18 +4979,18 @@ character at index specified by POSITION. */)
4979 if (XBUFFER (w->contents) != current_buffer) 4979 if (XBUFFER (w->contents) != current_buffer)
4980 error ("Specified window is not displaying the current buffer"); 4980 error ("Specified window is not displaying the current buffer");
4981 CHECK_FIXNUM_COERCE_MARKER (position); 4981 CHECK_FIXNUM_COERCE_MARKER (position);
4982 if (! (BEGV <= XINT (position) && XINT (position) < ZV)) 4982 if (! (BEGV <= XFIXNUM (position) && XFIXNUM (position) < ZV))
4983 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV)); 4983 args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
4984 } 4984 }
4985 else 4985 else
4986 { 4986 {
4987 CHECK_FIXNUM (position); 4987 CHECK_FIXNUM (position);
4988 CHECK_STRING (string); 4988 CHECK_STRING (string);
4989 if (! (0 <= XINT (position) && XINT (position) < SCHARS (string))) 4989 if (! (0 <= XFIXNUM (position) && XFIXNUM (position) < SCHARS (string)))
4990 args_out_of_range (string, position); 4990 args_out_of_range (string, position);
4991 } 4991 }
4992 4992
4993 return font_at (-1, XINT (position), NULL, w, string); 4993 return font_at (-1, XFIXNUM (position), NULL, w, string);
4994} 4994}
4995 4995
4996#if 0 4996#if 0
@@ -5015,7 +5015,7 @@ Type C-l to recover what previously shown. */)
5015 { 5015 {
5016 Lisp_Object ch = Faref (string, make_fixnum (i)); 5016 Lisp_Object ch = Faref (string, make_fixnum (i));
5017 Lisp_Object val; 5017 Lisp_Object val;
5018 int c = XINT (ch); 5018 int c = XFIXNUM (ch);
5019 5019
5020 code[i] = font->driver->encode_char (font, c); 5020 code[i] = font->driver->encode_char (font, c);
5021 if (code[i] == FONT_INVALID_CODE) 5021 if (code[i] == FONT_INVALID_CODE)
diff --git a/src/font.h b/src/font.h
index 62a9920e597..1741b3f3964 100644
--- a/src/font.h
+++ b/src/font.h
@@ -186,15 +186,15 @@ enum font_property_index
186/* Return the numeric weight value of FONT. */ 186/* Return the numeric weight value of FONT. */
187#define FONT_WEIGHT_NUMERIC(font) \ 187#define FONT_WEIGHT_NUMERIC(font) \
188 (FIXNUMP (AREF ((font), FONT_WEIGHT_INDEX)) \ 188 (FIXNUMP (AREF ((font), FONT_WEIGHT_INDEX)) \
189 ? (XINT (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1) 189 ? (XFIXNUM (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1)
190/* Return the numeric slant value of FONT. */ 190/* Return the numeric slant value of FONT. */
191#define FONT_SLANT_NUMERIC(font) \ 191#define FONT_SLANT_NUMERIC(font) \
192 (FIXNUMP (AREF ((font), FONT_SLANT_INDEX)) \ 192 (FIXNUMP (AREF ((font), FONT_SLANT_INDEX)) \
193 ? (XINT (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1) 193 ? (XFIXNUM (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1)
194/* Return the numeric width value of FONT. */ 194/* Return the numeric width value of FONT. */
195#define FONT_WIDTH_NUMERIC(font) \ 195#define FONT_WIDTH_NUMERIC(font) \
196 (FIXNUMP (AREF ((font), FONT_WIDTH_INDEX)) \ 196 (FIXNUMP (AREF ((font), FONT_WIDTH_INDEX)) \
197 ? (XINT (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1) 197 ? (XFIXNUM (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
198/* Return the symbolic weight value of FONT. */ 198/* Return the symbolic weight value of FONT. */
199#define FONT_WEIGHT_SYMBOLIC(font) \ 199#define FONT_WEIGHT_SYMBOLIC(font) \
200 font_style_symbolic (font, FONT_WEIGHT_INDEX, false) 200 font_style_symbolic (font, FONT_WEIGHT_INDEX, false)
diff --git a/src/fontset.c b/src/fontset.c
index d4a2e4ea5b8..0dbc54efd08 100644
--- a/src/fontset.c
+++ b/src/fontset.c
@@ -276,7 +276,7 @@ set_fontset_fallback (Lisp_Object fontset, Lisp_Object fallback)
276 the order of listing by font backends, the higher bits represents 276 the order of listing by font backends, the higher bits represents
277 the order given by charset priority list. The smaller value is 277 the order given by charset priority list. The smaller value is
278 preferable. */ 278 preferable. */
279#define RFONT_DEF_SCORE(rfont_def) XINT (AREF (rfont_def, 3)) 279#define RFONT_DEF_SCORE(rfont_def) XFIXNUM (AREF (rfont_def, 3))
280#define RFONT_DEF_SET_SCORE(rfont_def, score) \ 280#define RFONT_DEF_SET_SCORE(rfont_def, score) \
281 ASET ((rfont_def), 3, make_fixnum (score)) 281 ASET ((rfont_def), 3, make_fixnum (score))
282#define RFONT_DEF_NEW(rfont_def, font_def) \ 282#define RFONT_DEF_NEW(rfont_def, font_def) \
@@ -344,8 +344,8 @@ fontset_add (Lisp_Object fontset, Lisp_Object range, Lisp_Object elt, Lisp_Objec
344 344
345 if (CONSP (range)) 345 if (CONSP (range))
346 { 346 {
347 int from = XINT (XCAR (range)); 347 int from = XFIXNUM (XCAR (range));
348 int to = XINT (XCDR (range)); 348 int to = XFIXNUM (XCDR (range));
349 int from1, to1; 349 int from1, to1;
350 350
351 do { 351 do {
@@ -561,7 +561,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
561 561
562 if (ASIZE (vec) > 1) 562 if (ASIZE (vec) > 1)
563 { 563 {
564 if (XINT (XCAR (font_group)) != charset_ordered_list_tick) 564 if (XFIXNUM (XCAR (font_group)) != charset_ordered_list_tick)
565 /* We have just created the font-group, 565 /* We have just created the font-group,
566 or the charset priorities were changed. */ 566 or the charset priorities were changed. */
567 reorder_font_vector (font_group, face->ascii_face->font); 567 reorder_font_vector (font_group, face->ascii_face->font);
@@ -577,7 +577,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
577 break; 577 break;
578 repertory = FONT_DEF_REPERTORY (RFONT_DEF_FONT_DEF (rfont_def)); 578 repertory = FONT_DEF_REPERTORY (RFONT_DEF_FONT_DEF (rfont_def));
579 579
580 if (XINT (repertory) == charset_id) 580 if (XFIXNUM (repertory) == charset_id)
581 { 581 {
582 charset_matched = i; 582 charset_matched = i;
583 break; 583 break;
@@ -634,7 +634,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
634 return Qt; 634 return Qt;
635 } 635 }
636 if (FIXNUMP (RFONT_DEF_FACE (rfont_def)) 636 if (FIXNUMP (RFONT_DEF_FACE (rfont_def))
637 && XINT (RFONT_DEF_FACE (rfont_def)) < 0) 637 && XFIXNUM (RFONT_DEF_FACE (rfont_def)) < 0)
638 /* We couldn't open this font last time. */ 638 /* We couldn't open this font last time. */
639 continue; 639 continue;
640 640
@@ -892,7 +892,7 @@ free_face_fontset (struct frame *f, struct face *face)
892 next_fontset_id = face->fontset; 892 next_fontset_id = face->fontset;
893 if (! NILP (FONTSET_DEFAULT (fontset))) 893 if (! NILP (FONTSET_DEFAULT (fontset)))
894 { 894 {
895 int id = XINT (FONTSET_ID (FONTSET_DEFAULT (fontset))); 895 int id = XFIXNUM (FONTSET_ID (FONTSET_DEFAULT (fontset)));
896 896
897 fontset = AREF (Vfontset_table, id); 897 fontset = AREF (Vfontset_table, id);
898 eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset)); 898 eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
@@ -981,7 +981,7 @@ face_for_char (struct frame *f, struct face *face, int c,
981 val = assq_no_quit (charset, Vfont_encoding_charset_alist); 981 val = assq_no_quit (charset, Vfont_encoding_charset_alist);
982 if (CONSP (val) && CHARSETP (XCDR (val))) 982 if (CONSP (val) && CHARSETP (XCDR (val)))
983 charset = XCDR (val); 983 charset = XCDR (val);
984 id = XINT (CHARSET_SYMBOL_ID (charset)); 984 id = XFIXNUM (CHARSET_SYMBOL_ID (charset));
985 } 985 }
986 else 986 else
987 id = -1; 987 id = -1;
@@ -991,7 +991,7 @@ face_for_char (struct frame *f, struct face *face, int c,
991 if (VECTORP (rfont_def)) 991 if (VECTORP (rfont_def))
992 { 992 {
993 if (FIXNUMP (RFONT_DEF_FACE (rfont_def))) 993 if (FIXNUMP (RFONT_DEF_FACE (rfont_def)))
994 face_id = XINT (RFONT_DEF_FACE (rfont_def)); 994 face_id = XFIXNUM (RFONT_DEF_FACE (rfont_def));
995 else 995 else
996 { 996 {
997 Lisp_Object font_object; 997 Lisp_Object font_object;
@@ -1004,7 +1004,7 @@ face_for_char (struct frame *f, struct face *face, int c,
1004 else 1004 else
1005 { 1005 {
1006 if (FIXNUMP (FONTSET_NOFONT_FACE (fontset))) 1006 if (FIXNUMP (FONTSET_NOFONT_FACE (fontset)))
1007 face_id = XINT (FONTSET_NOFONT_FACE (fontset)); 1007 face_id = XFIXNUM (FONTSET_NOFONT_FACE (fontset));
1008 else 1008 else
1009 { 1009 {
1010 face_id = face_for_font (f, Qnil, face); 1010 face_id = face_for_font (f, Qnil, face);
@@ -1048,7 +1048,7 @@ font_for_char (struct face *face, int c, ptrdiff_t pos, Lisp_Object object)
1048 val = assq_no_quit (charset, Vfont_encoding_charset_alist); 1048 val = assq_no_quit (charset, Vfont_encoding_charset_alist);
1049 if (CONSP (val) && CHARSETP (XCDR (val))) 1049 if (CONSP (val) && CHARSETP (XCDR (val)))
1050 charset = XCDR (val); 1050 charset = XCDR (val);
1051 id = XINT (CHARSET_SYMBOL_ID (charset)); 1051 id = XFIXNUM (CHARSET_SYMBOL_ID (charset));
1052 } 1052 }
1053 else 1053 else
1054 id = -1; 1054 id = -1;
@@ -1083,7 +1083,7 @@ make_fontset_for_ascii_face (struct frame *f, int base_fontset_id, struct face *
1083 base_fontset = Vdefault_fontset; 1083 base_fontset = Vdefault_fontset;
1084 1084
1085 fontset = make_fontset (frame, Qnil, base_fontset); 1085 fontset = make_fontset (frame, Qnil, base_fontset);
1086 return XINT (FONTSET_ID (fontset)); 1086 return XFIXNUM (FONTSET_ID (fontset));
1087} 1087}
1088 1088
1089 1089
@@ -1306,7 +1306,7 @@ free_realized_fontsets (Lisp_Object base)
1306 tail = XCDR (tail)) 1306 tail = XCDR (tail))
1307 { 1307 {
1308 struct frame *f = XFRAME (FONTSET_FRAME (this)); 1308 struct frame *f = XFRAME (FONTSET_FRAME (this));
1309 int face_id = XINT (XCDR (XCAR (tail))); 1309 int face_id = XFIXNUM (XCDR (XCAR (tail)));
1310 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id); 1310 struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
1311 1311
1312 /* Face THIS itself is also freed by the following call. */ 1312 /* Face THIS itself is also freed by the following call. */
@@ -1399,7 +1399,7 @@ static void
1399set_fontset_font (Lisp_Object arg, Lisp_Object range) 1399set_fontset_font (Lisp_Object arg, Lisp_Object range)
1400{ 1400{
1401 Lisp_Object fontset, font_def, add, ascii, script_range_list; 1401 Lisp_Object fontset, font_def, add, ascii, script_range_list;
1402 int from = XINT (XCAR (range)), to = XINT (XCDR (range)); 1402 int from = XFIXNUM (XCAR (range)), to = XFIXNUM (XCDR (range));
1403 1403
1404 fontset = AREF (arg, 0); 1404 fontset = AREF (arg, 0);
1405 font_def = AREF (arg, 1); 1405 font_def = AREF (arg, 1);
@@ -1415,8 +1415,8 @@ set_fontset_font (Lisp_Object arg, Lisp_Object range)
1415 range = Fcons (make_fixnum (0x80), XCDR (range)); 1415 range = Fcons (make_fixnum (0x80), XCDR (range));
1416 } 1416 }
1417 1417
1418#define SCRIPT_FROM XINT (XCAR (XCAR (script_range_list))) 1418#define SCRIPT_FROM XFIXNUM (XCAR (XCAR (script_range_list)))
1419#define SCRIPT_TO XINT (XCDR (XCAR (script_range_list))) 1419#define SCRIPT_TO XFIXNUM (XCDR (XCAR (script_range_list)))
1420#define POP_SCRIPT_RANGE() script_range_list = XCDR (script_range_list) 1420#define POP_SCRIPT_RANGE() script_range_list = XCDR (script_range_list)
1421 1421
1422 for (; CONSP (script_range_list) && SCRIPT_TO < from; POP_SCRIPT_RANGE ()) 1422 for (; CONSP (script_range_list) && SCRIPT_TO < from; POP_SCRIPT_RANGE ())
@@ -1544,7 +1544,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
1544 1544
1545 if (CHARACTERP (target)) 1545 if (CHARACTERP (target))
1546 { 1546 {
1547 if (XFASTINT (target) < 0x80) 1547 if (XFIXNAT (target) < 0x80)
1548 error ("Can't set a font for partial ASCII range"); 1548 error ("Can't set a font for partial ASCII range");
1549 range_list = list1 (Fcons (target, target)); 1549 range_list = list1 (Fcons (target, target));
1550 } 1550 }
@@ -1556,9 +1556,9 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
1556 to = Fcdr (target); 1556 to = Fcdr (target);
1557 CHECK_CHARACTER (from); 1557 CHECK_CHARACTER (from);
1558 CHECK_CHARACTER (to); 1558 CHECK_CHARACTER (to);
1559 if (XFASTINT (from) < 0x80) 1559 if (XFIXNAT (from) < 0x80)
1560 { 1560 {
1561 if (XFASTINT (from) != 0 || XFASTINT (to) < 0x7F) 1561 if (XFIXNAT (from) != 0 || XFIXNAT (to) < 0x7F)
1562 error ("Can't set a font for partial ASCII range"); 1562 error ("Can't set a font for partial ASCII range");
1563 ascii_changed = 1; 1563 ascii_changed = 1;
1564 } 1564 }
@@ -1629,7 +1629,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
1629 if (ascii_changed) 1629 if (ascii_changed)
1630 { 1630 {
1631 Lisp_Object tail, fr; 1631 Lisp_Object tail, fr;
1632 int fontset_id = XINT (FONTSET_ID (fontset)); 1632 int fontset_id = XFIXNUM (FONTSET_ID (fontset));
1633 1633
1634 set_fontset_ascii (fontset, fontname); 1634 set_fontset_ascii (fontset, fontname);
1635 name = FONTSET_NAME (fontset); 1635 name = FONTSET_NAME (fontset);
@@ -1762,7 +1762,7 @@ fontset_from_font (Lisp_Object font_object)
1762 1762
1763 val = assoc_no_quit (font_spec, auto_fontset_alist); 1763 val = assoc_no_quit (font_spec, auto_fontset_alist);
1764 if (CONSP (val)) 1764 if (CONSP (val))
1765 return XINT (FONTSET_ID (XCDR (val))); 1765 return XFIXNUM (FONTSET_ID (XCDR (val)));
1766 if (num_auto_fontsets++ == 0) 1766 if (num_auto_fontsets++ == 0)
1767 alias = intern ("fontset-startup"); 1767 alias = intern ("fontset-startup");
1768 else 1768 else
@@ -1797,7 +1797,7 @@ fontset_from_font (Lisp_Object font_object)
1797 1797
1798 set_fontset_ascii (fontset, font_name); 1798 set_fontset_ascii (fontset, font_name);
1799 1799
1800 return XINT (FONTSET_ID (fontset)); 1800 return XFIXNUM (FONTSET_ID (fontset));
1801} 1801}
1802 1802
1803 1803
@@ -1985,7 +1985,7 @@ patterns. */)
1985 fontset = check_fontset_name (name, &frame); 1985 fontset = check_fontset_name (name, &frame);
1986 1986
1987 CHECK_CHARACTER (ch); 1987 CHECK_CHARACTER (ch);
1988 c = XINT (ch); 1988 c = XFIXNUM (ch);
1989 list = Qnil; 1989 list = Qnil;
1990 while (1) 1990 while (1)
1991 { 1991 {
@@ -2002,7 +2002,7 @@ patterns. */)
2002 repertory = AREF (val, 1); 2002 repertory = AREF (val, 1);
2003 if (FIXNUMP (repertory)) 2003 if (FIXNUMP (repertory))
2004 { 2004 {
2005 struct charset *charset = CHARSET_FROM_ID (XINT (repertory)); 2005 struct charset *charset = CHARSET_FROM_ID (XFIXNUM (repertory));
2006 2006
2007 if (! CHAR_CHARSET_P (c, charset)) 2007 if (! CHAR_CHARSET_P (c, charset))
2008 continue; 2008 continue;
diff --git a/src/frame.c b/src/frame.c
index e13b392eca6..c2e3d4b6190 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -159,9 +159,9 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
159 XSETFRAME (frame, f); 159 XSETFRAME (frame, f);
160 if (CONSP (frame_size_history) 160 if (CONSP (frame_size_history)
161 && FIXNUMP (XCAR (frame_size_history)) 161 && FIXNUMP (XCAR (frame_size_history))
162 && 0 < XINT (XCAR (frame_size_history))) 162 && 0 < XFIXNUM (XCAR (frame_size_history)))
163 frame_size_history = 163 frame_size_history =
164 Fcons (make_fixnum (XINT (XCAR (frame_size_history)) - 1), 164 Fcons (make_fixnum (XFIXNUM (XCAR (frame_size_history)) - 1),
165 Fcons (list4 165 Fcons (list4
166 (frame, fun_symbol, 166 (frame, fun_symbol,
167 ((width > 0) 167 ((width > 0)
@@ -220,7 +220,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
220 return; 220 return;
221 221
222 if (TYPE_RANGED_FIXNUMP (int, value)) 222 if (TYPE_RANGED_FIXNUMP (int, value))
223 nlines = XINT (value); 223 nlines = XFIXNUM (value);
224 else 224 else
225 nlines = 0; 225 nlines = 0;
226 226
@@ -359,7 +359,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
359 || (NILP (horizontal) 359 || (NILP (horizontal)
360 && FIXED_OR_FLOATP (par_size = get_frame_param (f, Qmin_height)))) 360 && FIXED_OR_FLOATP (par_size = get_frame_param (f, Qmin_height))))
361 { 361 {
362 int min_size = XINT (par_size); 362 int min_size = XFIXNUM (par_size);
363 363
364 /* Don't allow phantom frames. */ 364 /* Don't allow phantom frames. */
365 if (min_size < 1) 365 if (min_size < 1)
@@ -372,7 +372,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
372 : FRAME_COLUMN_WIDTH (f))); 372 : FRAME_COLUMN_WIDTH (f)));
373 } 373 }
374 else 374 else
375 retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal, 375 retval = XFIXNUM (call4 (Qframe_windows_min_size, frame, horizontal,
376 ignore, pixelwise)); 376 ignore, pixelwise));
377 /* Don't allow too small height of text-mode frames, or else cm.c 377 /* Don't allow too small height of text-mode frames, or else cm.c
378 might abort in cmcheckmagic. */ 378 might abort in cmcheckmagic. */
@@ -1598,7 +1598,7 @@ candidate_frame (Lisp_Object candidate, Lisp_Object frame, Lisp_Object minibuf)
1598 FRAME_FOCUS_FRAME (c))) 1598 FRAME_FOCUS_FRAME (c)))
1599 return candidate; 1599 return candidate;
1600 } 1600 }
1601 else if (FIXNUMP (minibuf) && XINT (minibuf) == 0) 1601 else if (FIXNUMP (minibuf) && XFIXNUM (minibuf) == 0)
1602 { 1602 {
1603 if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c)) 1603 if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c))
1604 return candidate; 1604 return candidate;
@@ -2320,8 +2320,8 @@ and returns whatever that function returns. */)
2320 2320
2321 if (! NILP (x)) 2321 if (! NILP (x))
2322 { 2322 {
2323 int col = XINT (x); 2323 int col = XFIXNUM (x);
2324 int row = XINT (y); 2324 int row = XFIXNUM (y);
2325 pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1); 2325 pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1);
2326 XSETINT (x, col); 2326 XSETINT (x, col);
2327 XSETINT (y, row); 2327 XSETINT (y, row);
@@ -2430,19 +2430,19 @@ before calling this function on it, like this.
2430#ifdef HAVE_WINDOW_SYSTEM 2430#ifdef HAVE_WINDOW_SYSTEM
2431 if (FRAME_WINDOW_P (XFRAME (frame))) 2431 if (FRAME_WINDOW_P (XFRAME (frame)))
2432 /* Warping the mouse will cause enternotify and focus events. */ 2432 /* Warping the mouse will cause enternotify and focus events. */
2433 frame_set_mouse_position (XFRAME (frame), XINT (x), XINT (y)); 2433 frame_set_mouse_position (XFRAME (frame), XFIXNUM (x), XFIXNUM (y));
2434#else 2434#else
2435#if defined (MSDOS) 2435#if defined (MSDOS)
2436 if (FRAME_MSDOS_P (XFRAME (frame))) 2436 if (FRAME_MSDOS_P (XFRAME (frame)))
2437 { 2437 {
2438 Fselect_frame (frame, Qnil); 2438 Fselect_frame (frame, Qnil);
2439 mouse_moveto (XINT (x), XINT (y)); 2439 mouse_moveto (XFIXNUM (x), XFIXNUM (y));
2440 } 2440 }
2441#else 2441#else
2442#ifdef HAVE_GPM 2442#ifdef HAVE_GPM
2443 { 2443 {
2444 Fselect_frame (frame, Qnil); 2444 Fselect_frame (frame, Qnil);
2445 term_mouse_moveto (XINT (x), XINT (y)); 2445 term_mouse_moveto (XFIXNUM (x), XFIXNUM (y));
2446 } 2446 }
2447#endif 2447#endif
2448#endif 2448#endif
@@ -2471,19 +2471,19 @@ before calling this function on it, like this.
2471#ifdef HAVE_WINDOW_SYSTEM 2471#ifdef HAVE_WINDOW_SYSTEM
2472 if (FRAME_WINDOW_P (XFRAME (frame))) 2472 if (FRAME_WINDOW_P (XFRAME (frame)))
2473 /* Warping the mouse will cause enternotify and focus events. */ 2473 /* Warping the mouse will cause enternotify and focus events. */
2474 frame_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y)); 2474 frame_set_mouse_pixel_position (XFRAME (frame), XFIXNUM (x), XFIXNUM (y));
2475#else 2475#else
2476#if defined (MSDOS) 2476#if defined (MSDOS)
2477 if (FRAME_MSDOS_P (XFRAME (frame))) 2477 if (FRAME_MSDOS_P (XFRAME (frame)))
2478 { 2478 {
2479 Fselect_frame (frame, Qnil); 2479 Fselect_frame (frame, Qnil);
2480 mouse_moveto (XINT (x), XINT (y)); 2480 mouse_moveto (XFIXNUM (x), XFIXNUM (y));
2481 } 2481 }
2482#else 2482#else
2483#ifdef HAVE_GPM 2483#ifdef HAVE_GPM
2484 { 2484 {
2485 Fselect_frame (frame, Qnil); 2485 Fselect_frame (frame, Qnil);
2486 term_mouse_moveto (XINT (x), XINT (y)); 2486 term_mouse_moveto (XFIXNUM (x), XFIXNUM (y));
2487 } 2487 }
2488#endif 2488#endif
2489#endif 2489#endif
@@ -3193,7 +3193,7 @@ list, but are otherwise ignored. */)
3193#endif 3193#endif
3194 3194
3195 { 3195 {
3196 EMACS_INT length = XFASTINT (Flength (alist)); 3196 EMACS_INT length = XFIXNAT (Flength (alist));
3197 ptrdiff_t i; 3197 ptrdiff_t i;
3198 Lisp_Object *parms; 3198 Lisp_Object *parms;
3199 Lisp_Object *values; 3199 Lisp_Object *values;
@@ -3428,8 +3428,8 @@ multiple of the default frame font height. */)
3428 CHECK_TYPE_RANGED_INTEGER (int, height); 3428 CHECK_TYPE_RANGED_INTEGER (int, height);
3429 3429
3430 pixel_height = (!NILP (pixelwise) 3430 pixel_height = (!NILP (pixelwise)
3431 ? XINT (height) 3431 ? XFIXNUM (height)
3432 : XINT (height) * FRAME_LINE_HEIGHT (f)); 3432 : XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
3433 adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend), Qheight); 3433 adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend), Qheight);
3434 3434
3435 return Qnil; 3435 return Qnil;
@@ -3453,8 +3453,8 @@ multiple of the default frame font width. */)
3453 CHECK_TYPE_RANGED_INTEGER (int, width); 3453 CHECK_TYPE_RANGED_INTEGER (int, width);
3454 3454
3455 pixel_width = (!NILP (pixelwise) 3455 pixel_width = (!NILP (pixelwise)
3456 ? XINT (width) 3456 ? XFIXNUM (width)
3457 : XINT (width) * FRAME_COLUMN_WIDTH (f)); 3457 : XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
3458 adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend), Qwidth); 3458 adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend), Qwidth);
3459 3459
3460 return Qnil; 3460 return Qnil;
@@ -3476,11 +3476,11 @@ font height. */)
3476 CHECK_TYPE_RANGED_INTEGER (int, height); 3476 CHECK_TYPE_RANGED_INTEGER (int, height);
3477 3477
3478 pixel_width = (!NILP (pixelwise) 3478 pixel_width = (!NILP (pixelwise)
3479 ? XINT (width) 3479 ? XFIXNUM (width)
3480 : XINT (width) * FRAME_COLUMN_WIDTH (f)); 3480 : XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
3481 pixel_height = (!NILP (pixelwise) 3481 pixel_height = (!NILP (pixelwise)
3482 ? XINT (height) 3482 ? XFIXNUM (height)
3483 : XINT (height) * FRAME_LINE_HEIGHT (f)); 3483 : XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
3484 adjust_frame_size (f, pixel_width, pixel_height, 1, 0, Qsize); 3484 adjust_frame_size (f, pixel_width, pixel_height, 1, 0, Qsize);
3485 3485
3486 return Qnil; 3486 return Qnil;
@@ -3520,7 +3520,7 @@ bottom edge of FRAME's display. */)
3520 if (FRAME_WINDOW_P (f)) 3520 if (FRAME_WINDOW_P (f))
3521 { 3521 {
3522#ifdef HAVE_WINDOW_SYSTEM 3522#ifdef HAVE_WINDOW_SYSTEM
3523 x_set_offset (f, XINT (x), XINT (y), 1); 3523 x_set_offset (f, XFIXNUM (x), XFIXNUM (y), 1);
3524#endif 3524#endif
3525 } 3525 }
3526 3526
@@ -3689,10 +3689,10 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what,
3689 } 3689 }
3690 3690
3691 /* Workarea available. */ 3691 /* Workarea available. */
3692 parent_left = XINT (Fnth (make_fixnum (0), workarea)); 3692 parent_left = XFIXNUM (Fnth (make_fixnum (0), workarea));
3693 parent_top = XINT (Fnth (make_fixnum (1), workarea)); 3693 parent_top = XFIXNUM (Fnth (make_fixnum (1), workarea));
3694 parent_width = XINT (Fnth (make_fixnum (2), workarea)); 3694 parent_width = XFIXNUM (Fnth (make_fixnum (2), workarea));
3695 parent_height = XINT (Fnth (make_fixnum (3), workarea)); 3695 parent_height = XFIXNUM (Fnth (make_fixnum (3), workarea));
3696 *parent_done = 1; 3696 *parent_done = 1;
3697 } 3697 }
3698 } 3698 }
@@ -3720,12 +3720,12 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what,
3720 if (!NILP (outer_edges)) 3720 if (!NILP (outer_edges))
3721 { 3721 {
3722 outer_minus_text_width 3722 outer_minus_text_width
3723 = (XINT (Fnth (make_fixnum (2), outer_edges)) 3723 = (XFIXNUM (Fnth (make_fixnum (2), outer_edges))
3724 - XINT (Fnth (make_fixnum (0), outer_edges)) 3724 - XFIXNUM (Fnth (make_fixnum (0), outer_edges))
3725 - FRAME_TEXT_WIDTH (f)); 3725 - FRAME_TEXT_WIDTH (f));
3726 outer_minus_text_height 3726 outer_minus_text_height
3727 = (XINT (Fnth (make_fixnum (3), outer_edges)) 3727 = (XFIXNUM (Fnth (make_fixnum (3), outer_edges))
3728 - XINT (Fnth (make_fixnum (1), outer_edges)) 3728 - XFIXNUM (Fnth (make_fixnum (1), outer_edges))
3729 - FRAME_TEXT_HEIGHT (f)); 3729 - FRAME_TEXT_HEIGHT (f));
3730 } 3730 }
3731 else 3731 else
@@ -3875,10 +3875,10 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
3875 if (EQ (prop, Qwidth)) 3875 if (EQ (prop, Qwidth))
3876 { 3876 {
3877 if (RANGED_FIXNUMP (0, val, INT_MAX)) 3877 if (RANGED_FIXNUMP (0, val, INT_MAX))
3878 width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ; 3878 width = XFIXNAT (val) * FRAME_COLUMN_WIDTH (f) ;
3879 else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels) 3879 else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
3880 && RANGED_FIXNUMP (0, XCDR (val), INT_MAX)) 3880 && RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
3881 width = XFASTINT (XCDR (val)); 3881 width = XFIXNAT (XCDR (val));
3882 else if (FLOATP (val)) 3882 else if (FLOATP (val))
3883 width = frame_float (f, val, FRAME_FLOAT_WIDTH, &parent_done, 3883 width = frame_float (f, val, FRAME_FLOAT_WIDTH, &parent_done,
3884 &outer_done, -1); 3884 &outer_done, -1);
@@ -3886,10 +3886,10 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
3886 else if (EQ (prop, Qheight)) 3886 else if (EQ (prop, Qheight))
3887 { 3887 {
3888 if (RANGED_FIXNUMP (0, val, INT_MAX)) 3888 if (RANGED_FIXNUMP (0, val, INT_MAX))
3889 height = XFASTINT (val) * FRAME_LINE_HEIGHT (f); 3889 height = XFIXNAT (val) * FRAME_LINE_HEIGHT (f);
3890 else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels) 3890 else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
3891 && RANGED_FIXNUMP (0, XCDR (val), INT_MAX)) 3891 && RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
3892 height = XFASTINT (XCDR (val)); 3892 height = XFIXNAT (XCDR (val));
3893 else if (FLOATP (val)) 3893 else if (FLOATP (val))
3894 height = frame_float (f, val, FRAME_FLOAT_HEIGHT, &parent_done, 3894 height = frame_float (f, val, FRAME_FLOAT_HEIGHT, &parent_done,
3895 &outer_done, -1); 3895 &outer_done, -1);
@@ -3917,9 +3917,9 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
3917 3917
3918 param_index = Fget (prop, Qx_frame_parameter); 3918 param_index = Fget (prop, Qx_frame_parameter);
3919 if (FIXNATP (param_index) 3919 if (FIXNATP (param_index)
3920 && XFASTINT (param_index) < ARRAYELTS (frame_parms) 3920 && XFIXNAT (param_index) < ARRAYELTS (frame_parms)
3921 && FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)]) 3921 && FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])
3922 (*(FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])) (f, val, old_value); 3922 (*(FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])) (f, val, old_value);
3923 } 3923 }
3924 } 3924 }
3925 3925
@@ -3981,8 +3981,8 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
3981 3981
3982 if ((!NILP (left) || !NILP (top)) 3982 if ((!NILP (left) || !NILP (top))
3983 && ! (left_no_change && top_no_change) 3983 && ! (left_no_change && top_no_change)
3984 && ! (FIXED_OR_FLOATP (left) && XINT (left) == f->left_pos 3984 && ! (FIXED_OR_FLOATP (left) && XFIXNUM (left) == f->left_pos
3985 && FIXED_OR_FLOATP (top) && XINT (top) == f->top_pos)) 3985 && FIXED_OR_FLOATP (top) && XFIXNUM (top) == f->top_pos))
3986 { 3986 {
3987 int leftpos = 0; 3987 int leftpos = 0;
3988 int toppos = 0; 3988 int toppos = 0;
@@ -3993,7 +3993,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
3993 f->size_hint_flags |= XNegative; 3993 f->size_hint_flags |= XNegative;
3994 else if (TYPE_RANGED_FIXNUMP (int, left)) 3994 else if (TYPE_RANGED_FIXNUMP (int, left))
3995 { 3995 {
3996 leftpos = XINT (left); 3996 leftpos = XFIXNUM (left);
3997 if (leftpos < 0) 3997 if (leftpos < 0)
3998 f->size_hint_flags |= XNegative; 3998 f->size_hint_flags |= XNegative;
3999 } 3999 }
@@ -4001,13 +4001,13 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
4001 && CONSP (XCDR (left)) 4001 && CONSP (XCDR (left))
4002 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX)) 4002 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
4003 { 4003 {
4004 leftpos = - XINT (XCAR (XCDR (left))); 4004 leftpos = - XFIXNUM (XCAR (XCDR (left)));
4005 f->size_hint_flags |= XNegative; 4005 f->size_hint_flags |= XNegative;
4006 } 4006 }
4007 else if (CONSP (left) && EQ (XCAR (left), Qplus) 4007 else if (CONSP (left) && EQ (XCAR (left), Qplus)
4008 && CONSP (XCDR (left)) 4008 && CONSP (XCDR (left))
4009 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left)))) 4009 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
4010 leftpos = XINT (XCAR (XCDR (left))); 4010 leftpos = XFIXNUM (XCAR (XCDR (left)));
4011 else if (FLOATP (left)) 4011 else if (FLOATP (left))
4012 leftpos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done, 4012 leftpos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done,
4013 &outer_done, 0); 4013 &outer_done, 0);
@@ -4016,7 +4016,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
4016 f->size_hint_flags |= YNegative; 4016 f->size_hint_flags |= YNegative;
4017 else if (TYPE_RANGED_FIXNUMP (int, top)) 4017 else if (TYPE_RANGED_FIXNUMP (int, top))
4018 { 4018 {
4019 toppos = XINT (top); 4019 toppos = XFIXNUM (top);
4020 if (toppos < 0) 4020 if (toppos < 0)
4021 f->size_hint_flags |= YNegative; 4021 f->size_hint_flags |= YNegative;
4022 } 4022 }
@@ -4024,13 +4024,13 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
4024 && CONSP (XCDR (top)) 4024 && CONSP (XCDR (top))
4025 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX)) 4025 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
4026 { 4026 {
4027 toppos = - XINT (XCAR (XCDR (top))); 4027 toppos = - XFIXNUM (XCAR (XCDR (top)));
4028 f->size_hint_flags |= YNegative; 4028 f->size_hint_flags |= YNegative;
4029 } 4029 }
4030 else if (CONSP (top) && EQ (XCAR (top), Qplus) 4030 else if (CONSP (top) && EQ (XCAR (top), Qplus)
4031 && CONSP (XCDR (top)) 4031 && CONSP (XCDR (top))
4032 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top)))) 4032 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
4033 toppos = XINT (XCAR (XCDR (top))); 4033 toppos = XFIXNUM (XCAR (XCDR (top)));
4034 else if (FLOATP (top)) 4034 else if (FLOATP (top))
4035 toppos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done, 4035 toppos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done,
4036 &outer_done, 0); 4036 &outer_done, 0);
@@ -4061,7 +4061,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
4061#ifdef HAVE_X_WINDOWS 4061#ifdef HAVE_X_WINDOWS
4062 if ((!NILP (icon_left) || !NILP (icon_top)) 4062 if ((!NILP (icon_left) || !NILP (icon_top))
4063 && ! (icon_left_no_change && icon_top_no_change)) 4063 && ! (icon_left_no_change && icon_top_no_change))
4064 x_wm_set_icon_position (f, XINT (icon_left), XINT (icon_top)); 4064 x_wm_set_icon_position (f, XFIXNUM (icon_left), XFIXNUM (icon_top));
4065#endif /* HAVE_X_WINDOWS */ 4065#endif /* HAVE_X_WINDOWS */
4066 4066
4067 SAFE_FREE (); 4067 SAFE_FREE ();
@@ -4188,7 +4188,7 @@ x_set_line_spacing (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
4188 if (NILP (new_value)) 4188 if (NILP (new_value))
4189 f->extra_line_spacing = 0; 4189 f->extra_line_spacing = 0;
4190 else if (RANGED_FIXNUMP (0, new_value, INT_MAX)) 4190 else if (RANGED_FIXNUMP (0, new_value, INT_MAX))
4191 f->extra_line_spacing = XFASTINT (new_value); 4191 f->extra_line_spacing = XFIXNAT (new_value);
4192 else if (FLOATP (new_value)) 4192 else if (FLOATP (new_value))
4193 { 4193 {
4194 int new_spacing = XFLOAT_DATA (new_value) * FRAME_LINE_HEIGHT (f) + 0.5; 4194 int new_spacing = XFLOAT_DATA (new_value) * FRAME_LINE_HEIGHT (f) + 0.5;
@@ -4227,9 +4227,9 @@ x_set_screen_gamma (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
4227 { 4227 {
4228 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter); 4228 Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
4229 if (FIXNATP (parm_index) 4229 if (FIXNATP (parm_index)
4230 && XFASTINT (parm_index) < ARRAYELTS (frame_parms) 4230 && XFIXNAT (parm_index) < ARRAYELTS (frame_parms)
4231 && FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) 4231 && FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
4232 (*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)]) 4232 (*FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
4233 (f, bgcolor, Qnil); 4233 (f, bgcolor, Qnil);
4234 } 4234 }
4235 4235
@@ -4415,7 +4415,7 @@ x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
4415 int new_width; 4415 int new_width;
4416 4416
4417 new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX) 4417 new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
4418 ? eabs (XINT (new_value)) : 8); 4418 ? eabs (XFIXNUM (new_value)) : 8);
4419 4419
4420 if (new_width != old_width) 4420 if (new_width != old_width)
4421 { 4421 {
@@ -4439,7 +4439,7 @@ x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
4439 int new_width; 4439 int new_width;
4440 4440
4441 new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX) 4441 new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
4442 ? eabs (XINT (new_value)) : 8); 4442 ? eabs (XFIXNUM (new_value)) : 8);
4443 4443
4444 if (new_width != old_width) 4444 if (new_width != old_width)
4445 { 4445 {
@@ -4460,13 +4460,13 @@ x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
4460{ 4460{
4461 CHECK_TYPE_RANGED_INTEGER (int, arg); 4461 CHECK_TYPE_RANGED_INTEGER (int, arg);
4462 4462
4463 if (XINT (arg) == f->border_width) 4463 if (XFIXNUM (arg) == f->border_width)
4464 return; 4464 return;
4465 4465
4466 if (FRAME_X_WINDOW (f) != 0) 4466 if (FRAME_X_WINDOW (f) != 0)
4467 error ("Cannot change the border width of a frame"); 4467 error ("Cannot change the border width of a frame");
4468 4468
4469 f->border_width = XINT (arg); 4469 f->border_width = XFIXNUM (arg);
4470} 4470}
4471 4471
4472void 4472void
@@ -4474,7 +4474,7 @@ x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
4474{ 4474{
4475 int old = FRAME_RIGHT_DIVIDER_WIDTH (f); 4475 int old = FRAME_RIGHT_DIVIDER_WIDTH (f);
4476 CHECK_TYPE_RANGED_INTEGER (int, arg); 4476 CHECK_TYPE_RANGED_INTEGER (int, arg);
4477 int new = max (0, XINT (arg)); 4477 int new = max (0, XFIXNUM (arg));
4478 if (new != old) 4478 if (new != old)
4479 { 4479 {
4480 f->right_divider_width = new; 4480 f->right_divider_width = new;
@@ -4489,7 +4489,7 @@ x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval
4489{ 4489{
4490 int old = FRAME_BOTTOM_DIVIDER_WIDTH (f); 4490 int old = FRAME_BOTTOM_DIVIDER_WIDTH (f);
4491 CHECK_TYPE_RANGED_INTEGER (int, arg); 4491 CHECK_TYPE_RANGED_INTEGER (int, arg);
4492 int new = max (0, XINT (arg)); 4492 int new = max (0, XFIXNUM (arg));
4493 if (new != old) 4493 if (new != old)
4494 { 4494 {
4495 f->bottom_divider_width = new; 4495 f->bottom_divider_width = new;
@@ -4599,10 +4599,10 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
4599 SET_FRAME_GARBAGED (f); 4599 SET_FRAME_GARBAGED (f);
4600 } 4600 }
4601 else if (RANGED_FIXNUMP (1, arg, INT_MAX) 4601 else if (RANGED_FIXNUMP (1, arg, INT_MAX)
4602 && XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f)) 4602 && XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
4603 { 4603 {
4604 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFASTINT (arg); 4604 FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFIXNAT (arg);
4605 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + unit - 1) / unit; 4605 FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFIXNAT (arg) + unit - 1) / unit;
4606 if (FRAME_X_WINDOW (f)) 4606 if (FRAME_X_WINDOW (f))
4607 adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_width); 4607 adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_width);
4608 4608
@@ -4629,10 +4629,10 @@ x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
4629 SET_FRAME_GARBAGED (f); 4629 SET_FRAME_GARBAGED (f);
4630 } 4630 }
4631 else if (RANGED_FIXNUMP (1, arg, INT_MAX) 4631 else if (RANGED_FIXNUMP (1, arg, INT_MAX)
4632 && XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f)) 4632 && XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
4633 { 4633 {
4634 FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFASTINT (arg); 4634 FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFIXNAT (arg);
4635 FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFASTINT (arg) + unit - 1) / unit; 4635 FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFIXNAT (arg) + unit - 1) / unit;
4636 if (FRAME_X_WINDOW (f)) 4636 if (FRAME_X_WINDOW (f))
4637 adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_height); 4637 adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_height);
4638 4638
@@ -4673,7 +4673,7 @@ x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
4673 } 4673 }
4674 else if (FIXNUMP (item)) 4674 else if (FIXNUMP (item))
4675 { 4675 {
4676 EMACS_INT ialpha = XINT (item); 4676 EMACS_INT ialpha = XFIXNUM (item);
4677 if (! (0 <= ialpha && ialpha <= 100)) 4677 if (! (0 <= ialpha && ialpha <= 100))
4678 args_out_of_range (make_fixnum (0), make_fixnum (100)); 4678 args_out_of_range (make_fixnum (0), make_fixnum (100));
4679 alpha = ialpha / 100.0; 4679 alpha = ialpha / 100.0;
@@ -5303,10 +5303,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5303 : DEFAULT_TOOL_BAR_BUTTON_RELIEF); 5303 : DEFAULT_TOOL_BAR_BUTTON_RELIEF);
5304 5304
5305 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX)) 5305 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
5306 margin = XFASTINT (Vtool_bar_button_margin); 5306 margin = XFIXNAT (Vtool_bar_button_margin);
5307 else if (CONSP (Vtool_bar_button_margin) 5307 else if (CONSP (Vtool_bar_button_margin)
5308 && RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX)) 5308 && RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
5309 margin = XFASTINT (XCDR (Vtool_bar_button_margin)); 5309 margin = XFIXNAT (XCDR (Vtool_bar_button_margin));
5310 else 5310 else
5311 margin = 0; 5311 margin = 0;
5312 5312
@@ -5328,12 +5328,12 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5328 if (CONSP (width) && EQ (XCAR (width), Qtext_pixels)) 5328 if (CONSP (width) && EQ (XCAR (width), Qtext_pixels))
5329 { 5329 {
5330 CHECK_FIXNUM (XCDR (width)); 5330 CHECK_FIXNUM (XCDR (width));
5331 if ((XINT (XCDR (width)) < 0 || XINT (XCDR (width)) > INT_MAX)) 5331 if ((XFIXNUM (XCDR (width)) < 0 || XFIXNUM (XCDR (width)) > INT_MAX))
5332 xsignal1 (Qargs_out_of_range, XCDR (width)); 5332 xsignal1 (Qargs_out_of_range, XCDR (width));
5333 5333
5334 SET_FRAME_WIDTH (f, XINT (XCDR (width))); 5334 SET_FRAME_WIDTH (f, XFIXNUM (XCDR (width)));
5335 f->inhibit_horizontal_resize = true; 5335 f->inhibit_horizontal_resize = true;
5336 *x_width = XINT (XCDR (width)); 5336 *x_width = XFIXNUM (XCDR (width));
5337 } 5337 }
5338 else if (FLOATP (width)) 5338 else if (FLOATP (width))
5339 { 5339 {
@@ -5353,10 +5353,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5353 else 5353 else
5354 { 5354 {
5355 CHECK_FIXNUM (width); 5355 CHECK_FIXNUM (width);
5356 if ((XINT (width) < 0 || XINT (width) > INT_MAX)) 5356 if ((XFIXNUM (width) < 0 || XFIXNUM (width) > INT_MAX))
5357 xsignal1 (Qargs_out_of_range, width); 5357 xsignal1 (Qargs_out_of_range, width);
5358 5358
5359 SET_FRAME_WIDTH (f, XINT (width) * FRAME_COLUMN_WIDTH (f)); 5359 SET_FRAME_WIDTH (f, XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
5360 } 5360 }
5361 } 5361 }
5362 5362
@@ -5365,12 +5365,12 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5365 if (CONSP (height) && EQ (XCAR (height), Qtext_pixels)) 5365 if (CONSP (height) && EQ (XCAR (height), Qtext_pixels))
5366 { 5366 {
5367 CHECK_FIXNUM (XCDR (height)); 5367 CHECK_FIXNUM (XCDR (height));
5368 if ((XINT (XCDR (height)) < 0 || XINT (XCDR (height)) > INT_MAX)) 5368 if ((XFIXNUM (XCDR (height)) < 0 || XFIXNUM (XCDR (height)) > INT_MAX))
5369 xsignal1 (Qargs_out_of_range, XCDR (height)); 5369 xsignal1 (Qargs_out_of_range, XCDR (height));
5370 5370
5371 SET_FRAME_HEIGHT (f, XINT (XCDR (height))); 5371 SET_FRAME_HEIGHT (f, XFIXNUM (XCDR (height)));
5372 f->inhibit_vertical_resize = true; 5372 f->inhibit_vertical_resize = true;
5373 *x_height = XINT (XCDR (height)); 5373 *x_height = XFIXNUM (XCDR (height));
5374 } 5374 }
5375 else if (FLOATP (height)) 5375 else if (FLOATP (height))
5376 { 5376 {
@@ -5390,10 +5390,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5390 else 5390 else
5391 { 5391 {
5392 CHECK_FIXNUM (height); 5392 CHECK_FIXNUM (height);
5393 if ((XINT (height) < 0) || (XINT (height) > INT_MAX)) 5393 if ((XFIXNUM (height) < 0) || (XFIXNUM (height) > INT_MAX))
5394 xsignal1 (Qargs_out_of_range, height); 5394 xsignal1 (Qargs_out_of_range, height);
5395 5395
5396 SET_FRAME_HEIGHT (f, XINT (height) * FRAME_LINE_HEIGHT (f)); 5396 SET_FRAME_HEIGHT (f, XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
5397 } 5397 }
5398 } 5398 }
5399 5399
@@ -5418,14 +5418,14 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5418 && CONSP (XCDR (top)) 5418 && CONSP (XCDR (top))
5419 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX)) 5419 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
5420 { 5420 {
5421 f->top_pos = - XINT (XCAR (XCDR (top))); 5421 f->top_pos = - XFIXNUM (XCAR (XCDR (top)));
5422 window_prompting |= YNegative; 5422 window_prompting |= YNegative;
5423 } 5423 }
5424 else if (CONSP (top) && EQ (XCAR (top), Qplus) 5424 else if (CONSP (top) && EQ (XCAR (top), Qplus)
5425 && CONSP (XCDR (top)) 5425 && CONSP (XCDR (top))
5426 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top)))) 5426 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
5427 { 5427 {
5428 f->top_pos = XINT (XCAR (XCDR (top))); 5428 f->top_pos = XFIXNUM (XCAR (XCDR (top)));
5429 } 5429 }
5430 else if (FLOATP (top)) 5430 else if (FLOATP (top))
5431 f->top_pos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done, 5431 f->top_pos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done,
@@ -5435,7 +5435,7 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5435 else 5435 else
5436 { 5436 {
5437 CHECK_TYPE_RANGED_INTEGER (int, top); 5437 CHECK_TYPE_RANGED_INTEGER (int, top);
5438 f->top_pos = XINT (top); 5438 f->top_pos = XFIXNUM (top);
5439 if (f->top_pos < 0) 5439 if (f->top_pos < 0)
5440 window_prompting |= YNegative; 5440 window_prompting |= YNegative;
5441 } 5441 }
@@ -5449,14 +5449,14 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5449 && CONSP (XCDR (left)) 5449 && CONSP (XCDR (left))
5450 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX)) 5450 && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
5451 { 5451 {
5452 f->left_pos = - XINT (XCAR (XCDR (left))); 5452 f->left_pos = - XFIXNUM (XCAR (XCDR (left)));
5453 window_prompting |= XNegative; 5453 window_prompting |= XNegative;
5454 } 5454 }
5455 else if (CONSP (left) && EQ (XCAR (left), Qplus) 5455 else if (CONSP (left) && EQ (XCAR (left), Qplus)
5456 && CONSP (XCDR (left)) 5456 && CONSP (XCDR (left))
5457 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left)))) 5457 && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
5458 { 5458 {
5459 f->left_pos = XINT (XCAR (XCDR (left))); 5459 f->left_pos = XFIXNUM (XCAR (XCDR (left)));
5460 } 5460 }
5461 else if (FLOATP (left)) 5461 else if (FLOATP (left))
5462 f->left_pos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done, 5462 f->left_pos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done,
@@ -5466,7 +5466,7 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
5466 else 5466 else
5467 { 5467 {
5468 CHECK_TYPE_RANGED_INTEGER (int, left); 5468 CHECK_TYPE_RANGED_INTEGER (int, left);
5469 f->left_pos = XINT (left); 5469 f->left_pos = XFIXNUM (left);
5470 if (f->left_pos < 0) 5470 if (f->left_pos < 0)
5471 window_prompting |= XNegative; 5471 window_prompting |= XNegative;
5472 } 5472 }
diff --git a/src/frame.h b/src/frame.h
index 03e23027ece..87d0d5a3411 100644
--- a/src/frame.h
+++ b/src/frame.h
@@ -1361,7 +1361,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
1361 float. Value is a C integer. */ 1361 float. Value is a C integer. */
1362#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \ 1362#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \
1363 (FIXNUMP (X) \ 1363 (FIXNUMP (X) \
1364 ? XINT (X) * FRAME_COLUMN_WIDTH (F) \ 1364 ? XFIXNUM (X) * FRAME_COLUMN_WIDTH (F) \
1365 : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F))) 1365 : (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))
1366 1366
1367/* Convert canonical value Y to pixels. F is the frame whose 1367/* Convert canonical value Y to pixels. F is the frame whose
@@ -1369,7 +1369,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
1369 or float. Value is a C integer. */ 1369 or float. Value is a C integer. */
1370#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \ 1370#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \
1371 (FIXNUMP (Y) \ 1371 (FIXNUMP (Y) \
1372 ? XINT (Y) * FRAME_LINE_HEIGHT (F) \ 1372 ? XFIXNUM (Y) * FRAME_LINE_HEIGHT (F) \
1373 : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F))) 1373 : (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))
1374 1374
1375/* Convert pixel-value X to canonical units. F is the frame whose 1375/* Convert pixel-value X to canonical units. F is the frame whose
diff --git a/src/fringe.c b/src/fringe.c
index c1784c01b9e..583bba4e510 100644
--- a/src/fringe.c
+++ b/src/fringe.c
@@ -491,7 +491,7 @@ lookup_fringe_bitmap (Lisp_Object bitmap)
491 if (!FIXNUMP (bitmap)) 491 if (!FIXNUMP (bitmap))
492 return 0; 492 return 0;
493 493
494 bn = XINT (bitmap); 494 bn = XFIXNUM (bitmap);
495 if (bn > NO_FRINGE_BITMAP 495 if (bn > NO_FRINGE_BITMAP
496 && bn < max_used_fringe_bitmap 496 && bn < max_used_fringe_bitmap
497 && (bn < MAX_STANDARD_FRINGE_BITMAPS 497 && (bn < MAX_STANDARD_FRINGE_BITMAPS
@@ -743,7 +743,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
743 return NO_FRINGE_BITMAP; 743 return NO_FRINGE_BITMAP;
744 if (CONSP (bm1)) 744 if (CONSP (bm1))
745 { 745 {
746 ln1 = XINT (Flength (bm1)); 746 ln1 = XFIXNUM (Flength (bm1));
747 if (partial_p) 747 if (partial_p)
748 { 748 {
749 if (ln1 > ix2) 749 if (ln1 > ix2)
@@ -778,7 +778,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
778 { 778 {
779 if (CONSP (bm2)) 779 if (CONSP (bm2))
780 { 780 {
781 ln2 = XINT (Flength (bm2)); 781 ln2 = XFIXNUM (Flength (bm2));
782 if (partial_p) 782 if (partial_p)
783 { 783 {
784 if (ln2 > ix2) 784 if (ln2 > ix2)
@@ -1510,7 +1510,7 @@ If BITMAP already exists, the existing definition is replaced. */)
1510 else 1510 else
1511 { 1511 {
1512 CHECK_FIXNUM (height); 1512 CHECK_FIXNUM (height);
1513 fb.height = max (0, min (XINT (height), 255)); 1513 fb.height = max (0, min (XFIXNUM (height), 255));
1514 if (fb.height > h) 1514 if (fb.height > h)
1515 { 1515 {
1516 fill1 = (fb.height - h) / 2; 1516 fill1 = (fb.height - h) / 2;
@@ -1523,7 +1523,7 @@ If BITMAP already exists, the existing definition is replaced. */)
1523 else 1523 else
1524 { 1524 {
1525 CHECK_FIXNUM (width); 1525 CHECK_FIXNUM (width);
1526 fb.width = max (0, min (XINT (width), 255)); 1526 fb.width = max (0, min (XFIXNUM (width), 255));
1527 } 1527 }
1528 1528
1529 fb.period = 0; 1529 fb.period = 0;
@@ -1605,7 +1605,7 @@ If BITMAP already exists, the existing definition is replaced. */)
1605 for (i = 0; i < h && j < fb.height; i++) 1605 for (i = 0; i < h && j < fb.height; i++)
1606 { 1606 {
1607 Lisp_Object elt = Faref (bits, make_fixnum (i)); 1607 Lisp_Object elt = Faref (bits, make_fixnum (i));
1608 b[j++] = FIXED_OR_FLOATP (elt) ? XINT (elt) : 0; 1608 b[j++] = FIXED_OR_FLOATP (elt) ? XFIXNUM (elt) : 0;
1609 } 1609 }
1610 for (i = 0; i < fill2 && j < fb.height; i++) 1610 for (i = 0; i < fill2 && j < fb.height; i++)
1611 b[j++] = 0; 1611 b[j++] = 0;
@@ -1662,9 +1662,9 @@ Return nil if POS is not visible in WINDOW. */)
1662 if (!NILP (pos)) 1662 if (!NILP (pos))
1663 { 1663 {
1664 CHECK_FIXNUM_COERCE_MARKER (pos); 1664 CHECK_FIXNUM_COERCE_MARKER (pos);
1665 if (! (BEGV <= XINT (pos) && XINT (pos) <= ZV)) 1665 if (! (BEGV <= XFIXNUM (pos) && XFIXNUM (pos) <= ZV))
1666 args_out_of_range (window, pos); 1666 args_out_of_range (window, pos);
1667 textpos = XINT (pos); 1667 textpos = XFIXNUM (pos);
1668 } 1668 }
1669 else if (w == XWINDOW (selected_window)) 1669 else if (w == XWINDOW (selected_window))
1670 textpos = PT; 1670 textpos = PT;
diff --git a/src/ftcrfont.c b/src/ftcrfont.c
index 425250e2297..dc1a389c607 100644
--- a/src/ftcrfont.c
+++ b/src/ftcrfont.c
@@ -137,7 +137,7 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
137 FT_UInt size; 137 FT_UInt size;
138 138
139 block_input (); 139 block_input ();
140 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 140 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
141 if (size == 0) 141 if (size == 0)
142 size = pixel_size; 142 size = pixel_size;
143 font_object = font_build_object (VECSIZE (struct ftcrfont_info), 143 font_object = font_build_object (VECSIZE (struct ftcrfont_info),
diff --git a/src/ftfont.c b/src/ftfont.c
index 741a592c0b1..e83eff3ad08 100644
--- a/src/ftfont.c
+++ b/src/ftfont.c
@@ -390,7 +390,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
390 ? ! cache_data->ft_face : ! cache_data->fc_charset) 390 ? ! cache_data->ft_face : ! cache_data->fc_charset)
391 { 391 {
392 char *filename = SSDATA (XCAR (key)); 392 char *filename = SSDATA (XCAR (key));
393 int idx = XINT (XCDR (key)); 393 int idx = XFIXNUM (XCDR (key));
394 394
395 if (cache_for == FTFONT_CACHE_FOR_FACE) 395 if (cache_for == FTFONT_CACHE_FOR_FACE)
396 { 396 {
@@ -600,9 +600,9 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec)
600 continue; 600 continue;
601 len = Flength (val); 601 len = Flength (val);
602 spec->features[i] = 602 spec->features[i] =
603 (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XINT (len) 603 (min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XFIXNUM (len)
604 ? 0 604 ? 0
605 : malloc (XINT (len) * sizeof *spec->features[i])); 605 : malloc (XFIXNUM (len) * sizeof *spec->features[i]));
606 if (! spec->features[i]) 606 if (! spec->features[i])
607 { 607 {
608 if (i > 0 && spec->features[0]) 608 if (i > 0 && spec->features[0])
@@ -647,9 +647,9 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
647 return NULL; 647 return NULL;
648 648
649 if (FIXNUMP (AREF (spec, FONT_DPI_INDEX))) 649 if (FIXNUMP (AREF (spec, FONT_DPI_INDEX)))
650 dpi = XINT (AREF (spec, FONT_DPI_INDEX)); 650 dpi = XFIXNUM (AREF (spec, FONT_DPI_INDEX));
651 if (FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX)) 651 if (FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
652 && XINT (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0) 652 && XFIXNUM (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0)
653 scalable = 1; 653 scalable = 1;
654 654
655 registry = AREF (spec, FONT_REGISTRY_INDEX); 655 registry = AREF (spec, FONT_REGISTRY_INDEX);
@@ -687,7 +687,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
687 if (EQ (key, QCdpi)) 687 if (EQ (key, QCdpi))
688 { 688 {
689 if (FIXNUMP (val)) 689 if (FIXNUMP (val))
690 dpi = XINT (val); 690 dpi = XFIXNUM (val);
691 } 691 }
692 else if (EQ (key, QClang)) 692 else if (EQ (key, QClang))
693 { 693 {
@@ -735,7 +735,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
735 goto err; 735 goto err;
736 for (chars = XCDR (chars); CONSP (chars); chars = XCDR (chars)) 736 for (chars = XCDR (chars); CONSP (chars); chars = XCDR (chars))
737 if (CHARACTERP (XCAR (chars)) 737 if (CHARACTERP (XCAR (chars))
738 && ! FcCharSetAddChar (charset, XFASTINT (XCAR (chars)))) 738 && ! FcCharSetAddChar (charset, XFIXNAT (XCAR (chars))))
739 goto err; 739 goto err;
740 } 740 }
741 } 741 }
@@ -833,7 +833,7 @@ ftfont_list (struct frame *f, Lisp_Object spec)
833 val = Qnil; 833 val = Qnil;
834 } 834 }
835 if (FIXNUMP (AREF (spec, FONT_SPACING_INDEX))) 835 if (FIXNUMP (AREF (spec, FONT_SPACING_INDEX)))
836 spacing = XINT (AREF (spec, FONT_SPACING_INDEX)); 836 spacing = XFIXNUM (AREF (spec, FONT_SPACING_INDEX));
837 family = AREF (spec, FONT_FAMILY_INDEX); 837 family = AREF (spec, FONT_FAMILY_INDEX);
838 if (! NILP (family)) 838 if (! NILP (family))
839 { 839 {
@@ -956,7 +956,7 @@ ftfont_list (struct frame *f, Lisp_Object spec)
956 continue; 956 continue;
957 for (j = 0; j < ASIZE (chars); j++) 957 for (j = 0; j < ASIZE (chars); j++)
958 if (TYPE_RANGED_FIXNUMP (FcChar32, AREF (chars, j)) 958 if (TYPE_RANGED_FIXNUMP (FcChar32, AREF (chars, j))
959 && FcCharSetHasChar (charset, XFASTINT (AREF (chars, j)))) 959 && FcCharSetHasChar (charset, XFIXNAT (AREF (chars, j))))
960 break; 960 break;
961 if (j == ASIZE (chars)) 961 if (j == ASIZE (chars))
962 continue; 962 continue;
@@ -1021,7 +1021,7 @@ ftfont_match (struct frame *f, Lisp_Object spec)
1021 FcValue value; 1021 FcValue value;
1022 1022
1023 value.type = FcTypeDouble; 1023 value.type = FcTypeDouble;
1024 value.u.d = XINT (AREF (spec, FONT_SIZE_INDEX)); 1024 value.u.d = XFIXNUM (AREF (spec, FONT_SIZE_INDEX));
1025 FcPatternAdd (pattern, FC_PIXEL_SIZE, value, FcFalse); 1025 FcPatternAdd (pattern, FC_PIXEL_SIZE, value, FcFalse);
1026 } 1026 }
1027 if (FcConfigSubstitute (NULL, pattern, FcMatchPattern) == FcTrue) 1027 if (FcConfigSubstitute (NULL, pattern, FcMatchPattern) == FcTrue)
@@ -1130,7 +1130,7 @@ ftfont_open2 (struct frame *f,
1130 return Qnil; 1130 return Qnil;
1131 } 1131 }
1132 } 1132 }
1133 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 1133 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
1134 if (size == 0) 1134 if (size == 0)
1135 size = pixel_size; 1135 size = pixel_size;
1136 if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0) 1136 if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0)
@@ -1148,7 +1148,7 @@ ftfont_open2 (struct frame *f,
1148 font = XFONT_OBJECT (font_object); 1148 font = XFONT_OBJECT (font_object);
1149 ftfont_info = (struct ftfont_info *) font; 1149 ftfont_info = (struct ftfont_info *) font;
1150 ftfont_info->ft_size = ft_face->size; 1150 ftfont_info->ft_size = ft_face->size;
1151 ftfont_info->index = XINT (idx); 1151 ftfont_info->index = XFIXNUM (idx);
1152#ifdef HAVE_LIBOTF 1152#ifdef HAVE_LIBOTF
1153 ftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0; 1153 ftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0;
1154 ftfont_info->otf = NULL; 1154 ftfont_info->otf = NULL;
@@ -1161,7 +1161,7 @@ ftfont_open2 (struct frame *f,
1161 1161
1162 upEM = ft_face->units_per_EM; 1162 upEM = ft_face->units_per_EM;
1163 scalable = (FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX)) 1163 scalable = (FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
1164 && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0); 1164 && XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0);
1165 if (scalable) 1165 if (scalable)
1166 { 1166 {
1167 font->ascent = ft_face->ascender * size / upEM + 0.5; 1167 font->ascent = ft_face->ascender * size / upEM + 0.5;
@@ -1175,7 +1175,7 @@ ftfont_open2 (struct frame *f,
1175 font->height = ft_face->size->metrics.height >> 6; 1175 font->height = ft_face->size->metrics.height >> 6;
1176 } 1176 }
1177 if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX))) 1177 if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
1178 spacing = XINT (AREF (entity, FONT_SPACING_INDEX)); 1178 spacing = XFIXNUM (AREF (entity, FONT_SPACING_INDEX));
1179 else 1179 else
1180 spacing = FC_PROPORTIONAL; 1180 spacing = FC_PROPORTIONAL;
1181 if (spacing != FC_PROPORTIONAL 1181 if (spacing != FC_PROPORTIONAL
@@ -1233,7 +1233,7 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
1233{ 1233{
1234 Lisp_Object font_object; 1234 Lisp_Object font_object;
1235 FT_UInt size; 1235 FT_UInt size;
1236 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 1236 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
1237 if (size == 0) 1237 if (size == 0)
1238 size = pixel_size; 1238 size = pixel_size;
1239 font_object = font_build_object (VECSIZE (struct ftfont_info), 1239 font_object = font_build_object (VECSIZE (struct ftfont_info),
diff --git a/src/gfilenotify.c b/src/gfilenotify.c
index 674ae069f6e..7eea2cfac1c 100644
--- a/src/gfilenotify.c
+++ b/src/gfilenotify.c
@@ -240,7 +240,7 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */)
240 watch_descriptor); 240 watch_descriptor);
241 241
242 eassert (FIXNUMP (watch_descriptor)); 242 eassert (FIXNUMP (watch_descriptor));
243 GFileMonitor *monitor = XINTPTR (watch_descriptor); 243 GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
244 if (!g_file_monitor_is_cancelled (monitor) && 244 if (!g_file_monitor_is_cancelled (monitor) &&
245 !g_file_monitor_cancel (monitor)) 245 !g_file_monitor_cancel (monitor))
246 xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"), 246 xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"),
@@ -271,7 +271,7 @@ invalid. */)
271 return Qnil; 271 return Qnil;
272 else 272 else
273 { 273 {
274 GFileMonitor *monitor = XINTPTR (watch_descriptor); 274 GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
275 return g_file_monitor_is_cancelled (monitor) ? Qnil : Qt; 275 return g_file_monitor_is_cancelled (monitor) ? Qnil : Qt;
276 } 276 }
277} 277}
@@ -290,7 +290,7 @@ If WATCH-DESCRIPTOR is not valid, nil is returned. */)
290 return Qnil; 290 return Qnil;
291 else 291 else
292 { 292 {
293 GFileMonitor *monitor = XINTPTR (watch_descriptor); 293 GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
294 return intern (G_OBJECT_TYPE_NAME (monitor)); 294 return intern (G_OBJECT_TYPE_NAME (monitor));
295 } 295 }
296} 296}
diff --git a/src/gnutls.c b/src/gnutls.c
index 337b3d65cec..111dc612483 100644
--- a/src/gnutls.c
+++ b/src/gnutls.c
@@ -936,7 +936,7 @@ Usage: (gnutls-error-fatalp ERROR) */)
936 if (! TYPE_RANGED_FIXNUMP (int, err)) 936 if (! TYPE_RANGED_FIXNUMP (int, err))
937 error ("Not an error symbol or code"); 937 error ("Not an error symbol or code");
938 938
939 if (0 == gnutls_error_is_fatal (XINT (err))) 939 if (0 == gnutls_error_is_fatal (XFIXNUM (err)))
940 return Qnil; 940 return Qnil;
941 941
942 return Qt; 942 return Qt;
@@ -968,7 +968,7 @@ usage: (gnutls-error-string ERROR) */)
968 if (! TYPE_RANGED_FIXNUMP (int, err)) 968 if (! TYPE_RANGED_FIXNUMP (int, err))
969 return build_string ("Not an error symbol or code"); 969 return build_string ("Not an error symbol or code");
970 970
971 return build_string (emacs_gnutls_strerror (XINT (err))); 971 return build_string (emacs_gnutls_strerror (XFIXNUM (err)));
972} 972}
973 973
974DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0, 974DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
@@ -1656,8 +1656,8 @@ one trustfile (usually a CA bundle). */)
1656# ifdef HAVE_GNUTLS3 1656# ifdef HAVE_GNUTLS3
1657 gnutls_global_set_audit_log_function (gnutls_audit_log_function); 1657 gnutls_global_set_audit_log_function (gnutls_audit_log_function);
1658# endif 1658# endif
1659 gnutls_global_set_log_level (XINT (loglevel)); 1659 gnutls_global_set_log_level (XFIXNUM (loglevel));
1660 max_log_level = XINT (loglevel); 1660 max_log_level = XFIXNUM (loglevel);
1661 XPROCESS (proc)->gnutls_log_level = max_log_level; 1661 XPROCESS (proc)->gnutls_log_level = max_log_level;
1662 } 1662 }
1663 1663
@@ -1692,7 +1692,7 @@ one trustfile (usually a CA bundle). */)
1692 verify_flags = Fplist_get (proplist, QCverify_flags); 1692 verify_flags = Fplist_get (proplist, QCverify_flags);
1693 if (TYPE_RANGED_FIXNUMP (unsigned int, verify_flags)) 1693 if (TYPE_RANGED_FIXNUMP (unsigned int, verify_flags))
1694 { 1694 {
1695 gnutls_verify_flags = XFASTINT (verify_flags); 1695 gnutls_verify_flags = XFIXNAT (verify_flags);
1696 GNUTLS_LOG (2, max_log_level, "setting verification flags"); 1696 GNUTLS_LOG (2, max_log_level, "setting verification flags");
1697 } 1697 }
1698 else if (NILP (verify_flags)) 1698 else if (NILP (verify_flags))
@@ -1852,7 +1852,7 @@ one trustfile (usually a CA bundle). */)
1852 GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY; 1852 GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
1853 1853
1854 if (FIXNUMP (prime_bits)) 1854 if (FIXNUMP (prime_bits))
1855 gnutls_dh_set_prime_bits (state, XUINT (prime_bits)); 1855 gnutls_dh_set_prime_bits (state, XUFIXNUM (prime_bits));
1856 1856
1857 ret = EQ (type, Qgnutls_x509pki) 1857 ret = EQ (type, Qgnutls_x509pki)
1858 ? gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred) 1858 ? gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred)
@@ -2073,7 +2073,7 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher,
2073 if (SYMBOLP (cipher)) 2073 if (SYMBOLP (cipher))
2074 info = XCDR (Fassq (cipher, Fgnutls_ciphers ())); 2074 info = XCDR (Fassq (cipher, Fgnutls_ciphers ()));
2075 else if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, cipher)) 2075 else if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, cipher))
2076 gca = XINT (cipher); 2076 gca = XFIXNUM (cipher);
2077 else 2077 else
2078 info = cipher; 2078 info = cipher;
2079 2079
@@ -2081,7 +2081,7 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher,
2081 { 2081 {
2082 Lisp_Object v = Fplist_get (info, QCcipher_id); 2082 Lisp_Object v = Fplist_get (info, QCcipher_id);
2083 if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, v)) 2083 if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, v))
2084 gca = XINT (v); 2084 gca = XFIXNUM (v);
2085 } 2085 }
2086 2086
2087 ptrdiff_t key_size = gnutls_cipher_get_key_size (gca); 2087 ptrdiff_t key_size = gnutls_cipher_get_key_size (gca);
@@ -2344,7 +2344,7 @@ itself. */)
2344 if (SYMBOLP (hash_method)) 2344 if (SYMBOLP (hash_method))
2345 info = XCDR (Fassq (hash_method, Fgnutls_macs ())); 2345 info = XCDR (Fassq (hash_method, Fgnutls_macs ()));
2346 else if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, hash_method)) 2346 else if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, hash_method))
2347 gma = XINT (hash_method); 2347 gma = XFIXNUM (hash_method);
2348 else 2348 else
2349 info = hash_method; 2349 info = hash_method;
2350 2350
@@ -2352,7 +2352,7 @@ itself. */)
2352 { 2352 {
2353 Lisp_Object v = Fplist_get (info, QCmac_algorithm_id); 2353 Lisp_Object v = Fplist_get (info, QCmac_algorithm_id);
2354 if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, v)) 2354 if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, v))
2355 gma = XINT (v); 2355 gma = XFIXNUM (v);
2356 } 2356 }
2357 2357
2358 ptrdiff_t digest_length = gnutls_hmac_get_len (gma); 2358 ptrdiff_t digest_length = gnutls_hmac_get_len (gma);
@@ -2425,7 +2425,7 @@ the number itself. */)
2425 if (SYMBOLP (digest_method)) 2425 if (SYMBOLP (digest_method))
2426 info = XCDR (Fassq (digest_method, Fgnutls_digests ())); 2426 info = XCDR (Fassq (digest_method, Fgnutls_digests ()));
2427 else if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, digest_method)) 2427 else if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, digest_method))
2428 gda = XINT (digest_method); 2428 gda = XFIXNUM (digest_method);
2429 else 2429 else
2430 info = digest_method; 2430 info = digest_method;
2431 2431
@@ -2433,7 +2433,7 @@ the number itself. */)
2433 { 2433 {
2434 Lisp_Object v = Fplist_get (info, QCdigest_algorithm_id); 2434 Lisp_Object v = Fplist_get (info, QCdigest_algorithm_id);
2435 if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, v)) 2435 if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, v))
2436 gda = XINT (v); 2436 gda = XFIXNUM (v);
2437 } 2437 }
2438 2438
2439 ptrdiff_t digest_length = gnutls_hash_get_len (gda); 2439 ptrdiff_t digest_length = gnutls_hash_get_len (gda);
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 79b453d2a53..4250355a2f6 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -4296,7 +4296,7 @@ xg_print_frames_dialog (Lisp_Object frames)
4296 gtk_print_operation_set_print_settings (print, print_settings); 4296 gtk_print_operation_set_print_settings (print, print_settings);
4297 if (page_setup != NULL) 4297 if (page_setup != NULL)
4298 gtk_print_operation_set_default_page_setup (print, page_setup); 4298 gtk_print_operation_set_default_page_setup (print, page_setup);
4299 gtk_print_operation_set_n_pages (print, XINT (Flength (frames))); 4299 gtk_print_operation_set_n_pages (print, XFIXNUM (Flength (frames)));
4300 g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &frames); 4300 g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &frames);
4301 res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG, 4301 res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
4302 NULL, NULL); 4302 NULL, NULL);
@@ -4891,16 +4891,16 @@ update_frame_tool_bar (struct frame *f)
4891 4891
4892 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX)) 4892 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
4893 { 4893 {
4894 hmargin = XFASTINT (Vtool_bar_button_margin); 4894 hmargin = XFIXNAT (Vtool_bar_button_margin);
4895 vmargin = XFASTINT (Vtool_bar_button_margin); 4895 vmargin = XFIXNAT (Vtool_bar_button_margin);
4896 } 4896 }
4897 else if (CONSP (Vtool_bar_button_margin)) 4897 else if (CONSP (Vtool_bar_button_margin))
4898 { 4898 {
4899 if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin), INT_MAX)) 4899 if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin), INT_MAX))
4900 hmargin = XFASTINT (XCAR (Vtool_bar_button_margin)); 4900 hmargin = XFIXNAT (XCAR (Vtool_bar_button_margin));
4901 4901
4902 if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX)) 4902 if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
4903 vmargin = XFASTINT (XCDR (Vtool_bar_button_margin)); 4903 vmargin = XFIXNAT (XCDR (Vtool_bar_button_margin));
4904 } 4904 }
4905 4905
4906 /* The natural size (i.e. when GTK uses 0 as margin) looks best, 4906 /* The natural size (i.e. when GTK uses 0 as margin) looks best,
diff --git a/src/image.c b/src/image.c
index 980911e0d16..78eaf8a7598 100644
--- a/src/image.c
+++ b/src/image.c
@@ -785,7 +785,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
785 /* Unlike the other integer-related cases, this one does not 785 /* Unlike the other integer-related cases, this one does not
786 verify that VALUE fits in 'int'. This is because callers 786 verify that VALUE fits in 'int'. This is because callers
787 want EMACS_INT. */ 787 want EMACS_INT. */
788 if (!FIXNUMP (value) || XINT (value) < 0) 788 if (!FIXNUMP (value) || XFIXNUM (value) < 0)
789 return 0; 789 return 0;
790 break; 790 break;
791 791
@@ -1005,8 +1005,8 @@ check_image_size (struct frame *f, int width, int height)
1005 return 0; 1005 return 0;
1006 1006
1007 if (FIXNUMP (Vmax_image_size)) 1007 if (FIXNUMP (Vmax_image_size))
1008 return (width <= XINT (Vmax_image_size) 1008 return (width <= XFIXNUM (Vmax_image_size)
1009 && height <= XINT (Vmax_image_size)); 1009 && height <= XFIXNUM (Vmax_image_size));
1010 else if (FLOATP (Vmax_image_size)) 1010 else if (FLOATP (Vmax_image_size))
1011 { 1011 {
1012 if (f != NULL) 1012 if (f != NULL)
@@ -1547,7 +1547,7 @@ clear_image_cache (struct frame *f, Lisp_Object filter)
1547 1547
1548 /* If the number of cached images has grown unusually large, 1548 /* If the number of cached images has grown unusually large,
1549 decrease the cache eviction delay (Bug#6230). */ 1549 decrease the cache eviction delay (Bug#6230). */
1550 delay = XINT (Vimage_cache_eviction_delay); 1550 delay = XFIXNUM (Vimage_cache_eviction_delay);
1551 if (nimages > 40) 1551 if (nimages > 40)
1552 delay = 1600 * delay / nimages / nimages; 1552 delay = 1600 * delay / nimages / nimages;
1553 delay = max (delay, 1); 1553 delay = max (delay, 1);
@@ -1762,10 +1762,10 @@ lookup_image (struct frame *f, Lisp_Object spec)
1762 1762
1763 value = image_spec_value (spec, QCwidth, NULL); 1763 value = image_spec_value (spec, QCwidth, NULL);
1764 img->width = (FIXNUMP (value) 1764 img->width = (FIXNUMP (value)
1765 ? XFASTINT (value) : DEFAULT_IMAGE_WIDTH); 1765 ? XFIXNAT (value) : DEFAULT_IMAGE_WIDTH);
1766 value = image_spec_value (spec, QCheight, NULL); 1766 value = image_spec_value (spec, QCheight, NULL);
1767 img->height = (FIXNUMP (value) 1767 img->height = (FIXNUMP (value)
1768 ? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT); 1768 ? XFIXNAT (value) : DEFAULT_IMAGE_HEIGHT);
1769 } 1769 }
1770 else 1770 else
1771 { 1771 {
@@ -1777,24 +1777,24 @@ lookup_image (struct frame *f, Lisp_Object spec)
1777 1777
1778 ascent = image_spec_value (spec, QCascent, NULL); 1778 ascent = image_spec_value (spec, QCascent, NULL);
1779 if (FIXNUMP (ascent)) 1779 if (FIXNUMP (ascent))
1780 img->ascent = XFASTINT (ascent); 1780 img->ascent = XFIXNAT (ascent);
1781 else if (EQ (ascent, Qcenter)) 1781 else if (EQ (ascent, Qcenter))
1782 img->ascent = CENTERED_IMAGE_ASCENT; 1782 img->ascent = CENTERED_IMAGE_ASCENT;
1783 1783
1784 margin = image_spec_value (spec, QCmargin, NULL); 1784 margin = image_spec_value (spec, QCmargin, NULL);
1785 if (FIXNUMP (margin)) 1785 if (FIXNUMP (margin))
1786 img->vmargin = img->hmargin = XFASTINT (margin); 1786 img->vmargin = img->hmargin = XFIXNAT (margin);
1787 else if (CONSP (margin)) 1787 else if (CONSP (margin))
1788 { 1788 {
1789 img->hmargin = XFASTINT (XCAR (margin)); 1789 img->hmargin = XFIXNAT (XCAR (margin));
1790 img->vmargin = XFASTINT (XCDR (margin)); 1790 img->vmargin = XFIXNAT (XCDR (margin));
1791 } 1791 }
1792 1792
1793 relief = image_spec_value (spec, QCrelief, NULL); 1793 relief = image_spec_value (spec, QCrelief, NULL);
1794 relief_bound = INT_MAX - max (img->hmargin, img->vmargin); 1794 relief_bound = INT_MAX - max (img->hmargin, img->vmargin);
1795 if (RANGED_FIXNUMP (- relief_bound, relief, relief_bound)) 1795 if (RANGED_FIXNUMP (- relief_bound, relief, relief_bound))
1796 { 1796 {
1797 img->relief = XINT (relief); 1797 img->relief = XFIXNUM (relief);
1798 img->hmargin += eabs (img->relief); 1798 img->hmargin += eabs (img->relief);
1799 img->vmargin += eabs (img->relief); 1799 img->vmargin += eabs (img->relief);
1800 } 1800 }
@@ -2512,8 +2512,8 @@ xbm_image_p (Lisp_Object object)
2512 return 0; 2512 return 0;
2513 2513
2514 data = kw[XBM_DATA].value; 2514 data = kw[XBM_DATA].value;
2515 width = XFASTINT (kw[XBM_WIDTH].value); 2515 width = XFIXNAT (kw[XBM_WIDTH].value);
2516 height = XFASTINT (kw[XBM_HEIGHT].value); 2516 height = XFIXNAT (kw[XBM_HEIGHT].value);
2517 2517
2518 /* Check type of data, and width and height against contents of 2518 /* Check type of data, and width and height against contents of
2519 data. */ 2519 data. */
@@ -3061,8 +3061,8 @@ xbm_load (struct frame *f, struct image *img)
3061 /* Get specified width, and height. */ 3061 /* Get specified width, and height. */
3062 if (!in_memory_file_p) 3062 if (!in_memory_file_p)
3063 { 3063 {
3064 img->width = XFASTINT (fmt[XBM_WIDTH].value); 3064 img->width = XFIXNAT (fmt[XBM_WIDTH].value);
3065 img->height = XFASTINT (fmt[XBM_HEIGHT].value); 3065 img->height = XFIXNAT (fmt[XBM_HEIGHT].value);
3066 eassert (img->width > 0 && img->height > 0); 3066 eassert (img->width > 0 && img->height > 0);
3067 if (!check_image_size (f, img->width, img->height)) 3067 if (!check_image_size (f, img->width, img->height))
3068 { 3068 {
@@ -4168,7 +4168,7 @@ xpm_load_image (struct frame *f,
4168 if (!NILP (Fxw_display_color_p (frame))) 4168 if (!NILP (Fxw_display_color_p (frame)))
4169 best_key = XPM_COLOR_KEY_C; 4169 best_key = XPM_COLOR_KEY_C;
4170 else if (!NILP (Fx_display_grayscale_p (frame))) 4170 else if (!NILP (Fx_display_grayscale_p (frame)))
4171 best_key = (XFASTINT (Fx_display_planes (frame)) > 2 4171 best_key = (XFIXNAT (Fx_display_planes (frame)) > 2
4172 ? XPM_COLOR_KEY_G : XPM_COLOR_KEY_G4); 4172 ? XPM_COLOR_KEY_G : XPM_COLOR_KEY_G4);
4173 else 4173 else
4174 best_key = XPM_COLOR_KEY_M; 4174 best_key = XPM_COLOR_KEY_M;
@@ -4267,7 +4267,7 @@ xpm_load_image (struct frame *f,
4267 (*get_color_table) (color_table, str, chars_per_pixel); 4267 (*get_color_table) (color_table, str, chars_per_pixel);
4268 4268
4269 XPutPixel (ximg, x, y, 4269 XPutPixel (ximg, x, y,
4270 (FIXNUMP (color_val) ? XINT (color_val) 4270 (FIXNUMP (color_val) ? XFIXNUM (color_val)
4271 : FRAME_FOREGROUND_PIXEL (f))); 4271 : FRAME_FOREGROUND_PIXEL (f)));
4272#ifndef HAVE_NS 4272#ifndef HAVE_NS
4273 XPutPixel (mask_img, x, y, 4273 XPutPixel (mask_img, x, y,
@@ -5095,7 +5095,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
5095 5095
5096 for (i = 0; i < 3 && CONSP (how) && FIXNATP (XCAR (how)); ++i) 5096 for (i = 0; i < 3 && CONSP (how) && FIXNATP (XCAR (how)); ++i)
5097 { 5097 {
5098 rgb[i] = XFASTINT (XCAR (how)) & 0xffff; 5098 rgb[i] = XFIXNAT (XCAR (how)) & 0xffff;
5099 how = XCDR (how); 5099 how = XCDR (how);
5100 } 5100 }
5101 5101
@@ -7282,7 +7282,7 @@ tiff_load (struct frame *f, struct image *img)
7282 image = image_spec_value (img->spec, QCindex, NULL); 7282 image = image_spec_value (img->spec, QCindex, NULL);
7283 if (FIXNUMP (image)) 7283 if (FIXNUMP (image))
7284 { 7284 {
7285 EMACS_INT ino = XFASTINT (image); 7285 EMACS_INT ino = XFIXNAT (image);
7286 if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t) 7286 if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t)
7287 && TIFFSetDirectory (tiff, ino))) 7287 && TIFFSetDirectory (tiff, ino)))
7288 { 7288 {
@@ -7746,7 +7746,7 @@ gif_load (struct frame *f, struct image *img)
7746 /* Which sub-image are we to display? */ 7746 /* Which sub-image are we to display? */
7747 { 7747 {
7748 Lisp_Object image_number = image_spec_value (img->spec, QCindex, NULL); 7748 Lisp_Object image_number = image_spec_value (img->spec, QCindex, NULL);
7749 idx = FIXNUMP (image_number) ? XFASTINT (image_number) : 0; 7749 idx = FIXNUMP (image_number) ? XFIXNAT (image_number) : 0;
7750 if (idx < 0 || idx >= gif->ImageCount) 7750 if (idx < 0 || idx >= gif->ImageCount)
7751 { 7751 {
7752 image_error ("Invalid image number `%s' in image `%s'", 7752 image_error ("Invalid image number `%s' in image `%s'",
@@ -8107,11 +8107,11 @@ compute_image_size (size_t width, size_t height,
8107 8107
8108 value = image_spec_value (spec, QCmax_width, NULL); 8108 value = image_spec_value (spec, QCmax_width, NULL);
8109 if (FIXNATP (value)) 8109 if (FIXNATP (value))
8110 max_width = min (XFASTINT (value), INT_MAX); 8110 max_width = min (XFIXNAT (value), INT_MAX);
8111 8111
8112 value = image_spec_value (spec, QCmax_height, NULL); 8112 value = image_spec_value (spec, QCmax_height, NULL);
8113 if (FIXNATP (value)) 8113 if (FIXNATP (value))
8114 max_height = min (XFASTINT (value), INT_MAX); 8114 max_height = min (XFIXNAT (value), INT_MAX);
8115 8115
8116 /* If width and/or height is set in the display spec assume we want 8116 /* If width and/or height is set in the display spec assume we want
8117 to scale to those values. If either h or w is unspecified, the 8117 to scale to those values. If either h or w is unspecified, the
@@ -8120,7 +8120,7 @@ compute_image_size (size_t width, size_t height,
8120 value = image_spec_value (spec, QCwidth, NULL); 8120 value = image_spec_value (spec, QCwidth, NULL);
8121 if (FIXNATP (value)) 8121 if (FIXNATP (value))
8122 { 8122 {
8123 desired_width = min (XFASTINT (value) * scale, INT_MAX); 8123 desired_width = min (XFIXNAT (value) * scale, INT_MAX);
8124 /* :width overrides :max-width. */ 8124 /* :width overrides :max-width. */
8125 max_width = -1; 8125 max_width = -1;
8126 } 8126 }
@@ -8128,7 +8128,7 @@ compute_image_size (size_t width, size_t height,
8128 value = image_spec_value (spec, QCheight, NULL); 8128 value = image_spec_value (spec, QCheight, NULL);
8129 if (FIXNATP (value)) 8129 if (FIXNATP (value))
8130 { 8130 {
8131 desired_height = min (XFASTINT (value) * scale, INT_MAX); 8131 desired_height = min (XFIXNAT (value) * scale, INT_MAX);
8132 /* :height overrides :max-height. */ 8132 /* :height overrides :max-height. */
8133 max_height = -1; 8133 max_height = -1;
8134 } 8134 }
@@ -8573,7 +8573,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
8573 find out things about it. */ 8573 find out things about it. */
8574 8574
8575 image = image_spec_value (img->spec, QCindex, NULL); 8575 image = image_spec_value (img->spec, QCindex, NULL);
8576 ino = FIXNUMP (image) ? XFASTINT (image) : 0; 8576 ino = FIXNUMP (image) ? XFIXNAT (image) : 0;
8577 image_wand = NewMagickWand (); 8577 image_wand = NewMagickWand ();
8578 8578
8579 if (filename) 8579 if (filename)
@@ -8585,7 +8585,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
8585 8585
8586 if (FIXNATP (lwidth) && FIXNATP (lheight)) 8586 if (FIXNATP (lwidth) && FIXNATP (lheight))
8587 { 8587 {
8588 MagickSetSize (image_wand, XFASTINT (lwidth), XFASTINT (lheight)); 8588 MagickSetSize (image_wand, XFIXNAT (lwidth), XFIXNAT (lheight));
8589 MagickSetDepth (image_wand, 8); 8589 MagickSetDepth (image_wand, 8);
8590 } 8590 }
8591 filename_hint = imagemagick_filename_hint (img->spec, hint_buffer); 8591 filename_hint = imagemagick_filename_hint (img->spec, hint_buffer);
@@ -8685,19 +8685,19 @@ imagemagick_load_image (struct frame *f, struct image *img,
8685 than the alternatives, but it still reads the entire image into memory 8685 than the alternatives, but it still reads the entire image into memory
8686 before cropping, which is apparently difficult to avoid when using 8686 before cropping, which is apparently difficult to avoid when using
8687 imagemagick. */ 8687 imagemagick. */
8688 size_t crop_width = XINT (XCAR (crop)); 8688 size_t crop_width = XFIXNUM (XCAR (crop));
8689 crop = XCDR (crop); 8689 crop = XCDR (crop);
8690 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (size_t, XCAR (crop))) 8690 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (size_t, XCAR (crop)))
8691 { 8691 {
8692 size_t crop_height = XINT (XCAR (crop)); 8692 size_t crop_height = XFIXNUM (XCAR (crop));
8693 crop = XCDR (crop); 8693 crop = XCDR (crop);
8694 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop))) 8694 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
8695 { 8695 {
8696 ssize_t crop_x = XINT (XCAR (crop)); 8696 ssize_t crop_x = XFIXNUM (XCAR (crop));
8697 crop = XCDR (crop); 8697 crop = XCDR (crop);
8698 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop))) 8698 if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
8699 { 8699 {
8700 ssize_t crop_y = XINT (XCAR (crop)); 8700 ssize_t crop_y = XFIXNUM (XCAR (crop));
8701 MagickCropImage (image_wand, crop_width, crop_height, 8701 MagickCropImage (image_wand, crop_width, crop_height,
8702 crop_x, crop_y); 8702 crop_x, crop_y);
8703 } 8703 }
@@ -9589,10 +9589,10 @@ gs_load (struct frame *f, struct image *img)
9589 = 1/72 in, xdpi and ydpi are stored in the frame's X display 9589 = 1/72 in, xdpi and ydpi are stored in the frame's X display
9590 info. */ 9590 info. */
9591 pt_width = image_spec_value (img->spec, QCpt_width, NULL); 9591 pt_width = image_spec_value (img->spec, QCpt_width, NULL);
9592 in_width = FIXNUMP (pt_width) ? XFASTINT (pt_width) / 72.0 : 0; 9592 in_width = FIXNUMP (pt_width) ? XFIXNAT (pt_width) / 72.0 : 0;
9593 in_width *= FRAME_RES_X (f); 9593 in_width *= FRAME_RES_X (f);
9594 pt_height = image_spec_value (img->spec, QCpt_height, NULL); 9594 pt_height = image_spec_value (img->spec, QCpt_height, NULL);
9595 in_height = FIXNUMP (pt_height) ? XFASTINT (pt_height) / 72.0 : 0; 9595 in_height = FIXNUMP (pt_height) ? XFIXNAT (pt_height) / 72.0 : 0;
9596 in_height *= FRAME_RES_Y (f); 9596 in_height *= FRAME_RES_Y (f);
9597 9597
9598 if (! (in_width <= INT_MAX && in_height <= INT_MAX 9598 if (! (in_width <= INT_MAX && in_height <= INT_MAX
diff --git a/src/indent.c b/src/indent.c
index fd505bceebc..18855768d37 100644
--- a/src/indent.c
+++ b/src/indent.c
@@ -116,7 +116,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w
116 116
117 for (i = 0; i < 256; i++) 117 for (i = 0; i < 256; i++)
118 if (character_width (i, disptab) 118 if (character_width (i, disptab)
119 != XFASTINT (widthtab->contents[i])) 119 != XFIXNAT (widthtab->contents[i]))
120 return 0; 120 return 0;
121 121
122 return 1; 122 return 1;
@@ -235,24 +235,24 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob
235 /* As for text properties, this gives a lower bound 235 /* As for text properties, this gives a lower bound
236 for where the invisible text property could change. */ 236 for where the invisible text property could change. */
237 proplimit = Fnext_property_change (position, buffer, Qt); 237 proplimit = Fnext_property_change (position, buffer, Qt);
238 if (XFASTINT (overlay_limit) < XFASTINT (proplimit)) 238 if (XFIXNAT (overlay_limit) < XFIXNAT (proplimit))
239 proplimit = overlay_limit; 239 proplimit = overlay_limit;
240 /* PROPLIMIT is now a lower bound for the next change 240 /* PROPLIMIT is now a lower bound for the next change
241 in invisible status. If that is plenty far away, 241 in invisible status. If that is plenty far away,
242 use that lower bound. */ 242 use that lower bound. */
243 if (XFASTINT (proplimit) > pos + 100 || XFASTINT (proplimit) >= to) 243 if (XFIXNAT (proplimit) > pos + 100 || XFIXNAT (proplimit) >= to)
244 *next_boundary_p = XFASTINT (proplimit); 244 *next_boundary_p = XFIXNAT (proplimit);
245 /* Otherwise, scan for the next `invisible' property change. */ 245 /* Otherwise, scan for the next `invisible' property change. */
246 else 246 else
247 { 247 {
248 /* Don't scan terribly far. */ 248 /* Don't scan terribly far. */
249 XSETFASTINT (proplimit, min (pos + 100, to)); 249 XSETFASTINT (proplimit, min (pos + 100, to));
250 /* No matter what, don't go past next overlay change. */ 250 /* No matter what, don't go past next overlay change. */
251 if (XFASTINT (overlay_limit) < XFASTINT (proplimit)) 251 if (XFIXNAT (overlay_limit) < XFIXNAT (proplimit))
252 proplimit = overlay_limit; 252 proplimit = overlay_limit;
253 tmp = Fnext_single_property_change (position, Qinvisible, 253 tmp = Fnext_single_property_change (position, Qinvisible,
254 buffer, proplimit); 254 buffer, proplimit);
255 end = XFASTINT (tmp); 255 end = XFIXNAT (tmp);
256#if 0 256#if 0
257 /* Don't put the boundary in the middle of multibyte form if 257 /* Don't put the boundary in the middle of multibyte form if
258 there is no actual property change. */ 258 there is no actual property change. */
@@ -486,13 +486,13 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos)
486 RANGED_FIXNUMP (0, prop, INT_MAX)) 486 RANGED_FIXNUMP (0, prop, INT_MAX))
487 || (prop = Fplist_get (plist, QCrelative_width), 487 || (prop = Fplist_get (plist, QCrelative_width),
488 RANGED_FIXNUMP (0, prop, INT_MAX))) 488 RANGED_FIXNUMP (0, prop, INT_MAX)))
489 width = XINT (prop); 489 width = XFIXNUM (prop);
490 else if (FLOATP (prop) && 0 <= XFLOAT_DATA (prop) 490 else if (FLOATP (prop) && 0 <= XFLOAT_DATA (prop)
491 && XFLOAT_DATA (prop) <= INT_MAX) 491 && XFLOAT_DATA (prop) <= INT_MAX)
492 width = (int)(XFLOAT_DATA (prop) + 0.5); 492 width = (int)(XFLOAT_DATA (prop) + 0.5);
493 else if ((prop = Fplist_get (plist, QCalign_to), 493 else if ((prop = Fplist_get (plist, QCalign_to),
494 RANGED_FIXNUMP (col, prop, align_to_max))) 494 RANGED_FIXNUMP (col, prop, align_to_max)))
495 width = XINT (prop) - col; 495 width = XFIXNUM (prop) - col;
496 else if (FLOATP (prop) && col <= XFLOAT_DATA (prop) 496 else if (FLOATP (prop) && col <= XFLOAT_DATA (prop)
497 && (XFLOAT_DATA (prop) <= align_to_max)) 497 && (XFLOAT_DATA (prop) <= align_to_max))
498 width = (int)(XFLOAT_DATA (prop) + 0.5) - col; 498 width = (int)(XFLOAT_DATA (prop) + 0.5) - col;
@@ -752,7 +752,7 @@ string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end)
752 else 752 else
753 { 753 {
754 CHECK_FIXNUM (end); 754 CHECK_FIXNUM (end);
755 e = XINT (end); 755 e = XFIXNUM (end);
756 } 756 }
757 757
758 if (NILP (beg)) 758 if (NILP (beg))
@@ -760,7 +760,7 @@ string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end)
760 else 760 else
761 { 761 {
762 CHECK_FIXNUM (beg); 762 CHECK_FIXNUM (beg);
763 b = XINT (beg); 763 b = XFIXNUM (beg);
764 } 764 }
765 765
766 /* Make a pointer for decrementing through the chars before point. */ 766 /* Make a pointer for decrementing through the chars before point. */
@@ -826,8 +826,8 @@ The return value is the column where the insertion ends. */)
826 CHECK_FIXNUM (minimum); 826 CHECK_FIXNUM (minimum);
827 827
828 fromcol = current_column (); 828 fromcol = current_column ();
829 mincol = fromcol + XINT (minimum); 829 mincol = fromcol + XFIXNUM (minimum);
830 if (mincol < XINT (column)) mincol = XINT (column); 830 if (mincol < XFIXNUM (column)) mincol = XFIXNUM (column);
831 831
832 if (fromcol == mincol) 832 if (fromcol == mincol)
833 return make_fixnum (mincol); 833 return make_fixnum (mincol);
@@ -836,7 +836,7 @@ The return value is the column where the insertion ends. */)
836 { 836 {
837 Lisp_Object n; 837 Lisp_Object n;
838 XSETFASTINT (n, mincol / tab_width - fromcol / tab_width); 838 XSETFASTINT (n, mincol / tab_width - fromcol / tab_width);
839 if (XFASTINT (n) != 0) 839 if (XFIXNAT (n) != 0)
840 { 840 {
841 Finsert_char (make_fixnum ('\t'), n, Qt); 841 Finsert_char (make_fixnum ('\t'), n, Qt);
842 842
@@ -995,7 +995,7 @@ The return value is the current column. */)
995 EMACS_INT goal; 995 EMACS_INT goal;
996 996
997 CHECK_FIXNAT (column); 997 CHECK_FIXNAT (column);
998 goal = XINT (column); 998 goal = XFIXNUM (column);
999 999
1000 col = goal; 1000 col = goal;
1001 pos = ZV; 1001 pos = ZV;
@@ -1129,7 +1129,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1129 struct Lisp_Char_Table *dp = window_display_table (win); 1129 struct Lisp_Char_Table *dp = window_display_table (win);
1130 EMACS_INT selective 1130 EMACS_INT selective
1131 = (FIXNUMP (BVAR (current_buffer, selective_display)) 1131 = (FIXNUMP (BVAR (current_buffer, selective_display))
1132 ? XINT (BVAR (current_buffer, selective_display)) 1132 ? XFIXNUM (BVAR (current_buffer, selective_display))
1133 : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); 1133 : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
1134 ptrdiff_t selective_rlen 1134 ptrdiff_t selective_rlen
1135 = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp)) 1135 = (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp))
@@ -1340,7 +1340,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1340 { 1340 {
1341 if (FIXNUMP (Vtruncate_partial_width_windows)) 1341 if (FIXNUMP (Vtruncate_partial_width_windows))
1342 truncate 1342 truncate
1343 = total_width < XFASTINT (Vtruncate_partial_width_windows); 1343 = total_width < XFIXNAT (Vtruncate_partial_width_windows);
1344 else 1344 else
1345 truncate = 1; 1345 truncate = 1;
1346 } 1346 }
@@ -1533,7 +1533,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1533 /* Is this character part of the current run? If so, extend 1533 /* Is this character part of the current run? If so, extend
1534 the run. */ 1534 the run. */
1535 if (pos - 1 == width_run_end 1535 if (pos - 1 == width_run_end
1536 && XFASTINT (width_table[c]) == width_run_width) 1536 && XFIXNAT (width_table[c]) == width_run_width)
1537 width_run_end = pos; 1537 width_run_end = pos;
1538 1538
1539 /* The previous run is over, since this is a character at a 1539 /* The previous run is over, since this is a character at a
@@ -1548,7 +1548,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
1548 width_run_start, width_run_end); 1548 width_run_start, width_run_end);
1549 1549
1550 /* Start recording a new width run. */ 1550 /* Start recording a new width run. */
1551 width_run_width = XFASTINT (width_table[c]); 1551 width_run_width = XFIXNAT (width_table[c]);
1552 width_run_start = pos - 1; 1552 width_run_start = pos - 1;
1553 width_run_end = pos; 1553 width_run_end = pos;
1554 } 1554 }
@@ -1773,29 +1773,29 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1773 CHECK_CONS (offsets); 1773 CHECK_CONS (offsets);
1774 CHECK_FIXNUM_CAR (offsets); 1774 CHECK_FIXNUM_CAR (offsets);
1775 CHECK_FIXNUM_CDR (offsets); 1775 CHECK_FIXNUM_CDR (offsets);
1776 if (! (0 <= XINT (XCAR (offsets)) && XINT (XCAR (offsets)) <= PTRDIFF_MAX 1776 if (! (0 <= XFIXNUM (XCAR (offsets)) && XFIXNUM (XCAR (offsets)) <= PTRDIFF_MAX
1777 && 0 <= XINT (XCDR (offsets)) && XINT (XCDR (offsets)) <= INT_MAX)) 1777 && 0 <= XFIXNUM (XCDR (offsets)) && XFIXNUM (XCDR (offsets)) <= INT_MAX))
1778 args_out_of_range (XCAR (offsets), XCDR (offsets)); 1778 args_out_of_range (XCAR (offsets), XCDR (offsets));
1779 hscroll = XINT (XCAR (offsets)); 1779 hscroll = XFIXNUM (XCAR (offsets));
1780 tab_offset = XINT (XCDR (offsets)); 1780 tab_offset = XFIXNUM (XCDR (offsets));
1781 } 1781 }
1782 else 1782 else
1783 hscroll = tab_offset = 0; 1783 hscroll = tab_offset = 0;
1784 1784
1785 w = decode_live_window (window); 1785 w = decode_live_window (window);
1786 1786
1787 if (XINT (from) < BEGV || XINT (from) > ZV) 1787 if (XFIXNUM (from) < BEGV || XFIXNUM (from) > ZV)
1788 args_out_of_range_3 (from, make_fixnum (BEGV), make_fixnum (ZV)); 1788 args_out_of_range_3 (from, make_fixnum (BEGV), make_fixnum (ZV));
1789 if (XINT (to) < BEGV || XINT (to) > ZV) 1789 if (XFIXNUM (to) < BEGV || XFIXNUM (to) > ZV)
1790 args_out_of_range_3 (to, make_fixnum (BEGV), make_fixnum (ZV)); 1790 args_out_of_range_3 (to, make_fixnum (BEGV), make_fixnum (ZV));
1791 1791
1792 pos = compute_motion (XINT (from), CHAR_TO_BYTE (XINT (from)), 1792 pos = compute_motion (XFIXNUM (from), CHAR_TO_BYTE (XFIXNUM (from)),
1793 XINT (XCDR (frompos)), 1793 XFIXNUM (XCDR (frompos)),
1794 XINT (XCAR (frompos)), 0, 1794 XFIXNUM (XCAR (frompos)), 0,
1795 XINT (to), 1795 XFIXNUM (to),
1796 (NILP (topos) 1796 (NILP (topos)
1797 ? window_internal_height (w) 1797 ? window_internal_height (w)
1798 : XINT (XCDR (topos))), 1798 : XFIXNUM (XCDR (topos))),
1799 (NILP (topos) 1799 (NILP (topos)
1800 ? (window_body_width (w, 0) 1800 ? (window_body_width (w, 0)
1801 - ( 1801 - (
@@ -1803,8 +1803,8 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
1803 FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 : 1803 FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
1804#endif 1804#endif
1805 1)) 1805 1))
1806 : XINT (XCAR (topos))), 1806 : XFIXNUM (XCAR (topos))),
1807 (NILP (width) ? -1 : XINT (width)), 1807 (NILP (width) ? -1 : XFIXNUM (width)),
1808 hscroll, tab_offset, w); 1808 hscroll, tab_offset, w);
1809 1809
1810 XSETFASTINT (bufpos, pos->bufpos); 1810 XSETFASTINT (bufpos, pos->bufpos);
@@ -1832,7 +1832,7 @@ vmotion (register ptrdiff_t from, register ptrdiff_t from_byte,
1832 ptrdiff_t lmargin = hscroll > 0 ? 1 - hscroll : 0; 1832 ptrdiff_t lmargin = hscroll > 0 ? 1 - hscroll : 0;
1833 ptrdiff_t selective 1833 ptrdiff_t selective
1834 = (FIXNUMP (BVAR (current_buffer, selective_display)) 1834 = (FIXNUMP (BVAR (current_buffer, selective_display))
1835 ? clip_to_bounds (-1, XINT (BVAR (current_buffer, selective_display)), 1835 ? clip_to_bounds (-1, XFIXNUM (BVAR (current_buffer, selective_display)),
1836 PTRDIFF_MAX) 1836 PTRDIFF_MAX)
1837 : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0); 1837 : !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
1838 Lisp_Object window; 1838 Lisp_Object window;
@@ -2045,8 +2045,8 @@ restore_window_buffer (Lisp_Object list)
2045 wset_buffer (w, XCAR (list)); 2045 wset_buffer (w, XCAR (list));
2046 list = XCDR (list); 2046 list = XCDR (list);
2047 set_marker_both (w->pointm, w->contents, 2047 set_marker_both (w->pointm, w->contents,
2048 XFASTINT (XCAR (list)), 2048 XFIXNAT (XCAR (list)),
2049 XFASTINT (XCAR (XCDR (list)))); 2049 XFIXNAT (XCAR (XCDR (list))));
2050} 2050}
2051 2051
2052DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 3, 0, 2052DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 3, 0,
@@ -2118,7 +2118,7 @@ whether or not it is currently displayed in some window. */)
2118 if (noninteractive) 2118 if (noninteractive)
2119 { 2119 {
2120 struct position pos; 2120 struct position pos;
2121 pos = *vmotion (PT, PT_BYTE, XINT (lines), w); 2121 pos = *vmotion (PT, PT_BYTE, XFIXNUM (lines), w);
2122 SET_PT_BOTH (pos.bufpos, pos.bytepos); 2122 SET_PT_BOTH (pos.bufpos, pos.bytepos);
2123 it.vpos = pos.vpos; 2123 it.vpos = pos.vpos;
2124 } 2124 }
@@ -2128,7 +2128,7 @@ whether or not it is currently displayed in some window. */)
2128 int first_x; 2128 int first_x;
2129 bool overshoot_handled = 0; 2129 bool overshoot_handled = 0;
2130 bool disp_string_at_start_p = 0; 2130 bool disp_string_at_start_p = 0;
2131 ptrdiff_t nlines = XINT (lines); 2131 ptrdiff_t nlines = XFIXNUM (lines);
2132 int vpos_init = 0; 2132 int vpos_init = 0;
2133 double start_col UNINIT; 2133 double start_col UNINIT;
2134 int start_x UNINIT; 2134 int start_x UNINIT;
diff --git a/src/insdel.c b/src/insdel.c
index a365b95fc18..70cebc0d2cc 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -2287,17 +2287,17 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute,
2287 elt = XCAR (tail); 2287 elt = XCAR (tail);
2288 if (! CONSP (elt)) 2288 if (! CONSP (elt))
2289 continue; 2289 continue;
2290 thisbeg = XINT (XCAR (elt)); 2290 thisbeg = XFIXNUM (XCAR (elt));
2291 2291
2292 elt = XCDR (elt); 2292 elt = XCDR (elt);
2293 if (! CONSP (elt)) 2293 if (! CONSP (elt))
2294 continue; 2294 continue;
2295 thisend = XINT (XCAR (elt)); 2295 thisend = XFIXNUM (XCAR (elt));
2296 2296
2297 elt = XCDR (elt); 2297 elt = XCDR (elt);
2298 if (! CONSP (elt)) 2298 if (! CONSP (elt))
2299 continue; 2299 continue;
2300 thischange = XINT (XCAR (elt)); 2300 thischange = XFIXNUM (XCAR (elt));
2301 2301
2302 /* Merge this range into the accumulated range. */ 2302 /* Merge this range into the accumulated range. */
2303 change += thischange; 2303 change += thischange;
diff --git a/src/intervals.c b/src/intervals.c
index 90ec4bd0537..af27afea0dc 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1926,8 +1926,8 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
1926 1926
1927 if (! NILP (intangible_propval)) 1927 if (! NILP (intangible_propval))
1928 { 1928 {
1929 while (XINT (pos) > BEGV 1929 while (XFIXNUM (pos) > BEGV
1930 && EQ (Fget_char_property (make_fixnum (XINT (pos) - 1), 1930 && EQ (Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
1931 Qintangible, Qnil), 1931 Qintangible, Qnil),
1932 intangible_propval)) 1932 intangible_propval))
1933 pos = Fprevious_char_property_change (pos, Qnil); 1933 pos = Fprevious_char_property_change (pos, Qnil);
@@ -1937,7 +1937,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
1937 property is `front-sticky', perturb it to be one character 1937 property is `front-sticky', perturb it to be one character
1938 earlier -- this ensures that point can never move to the 1938 earlier -- this ensures that point can never move to the
1939 beginning of an invisible/intangible/front-sticky region. */ 1939 beginning of an invisible/intangible/front-sticky region. */
1940 charpos = adjust_for_invis_intang (XINT (pos), 0, -1, 0); 1940 charpos = adjust_for_invis_intang (XFIXNUM (pos), 0, -1, 0);
1941 } 1941 }
1942 } 1942 }
1943 else 1943 else
@@ -1959,7 +1959,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
1959 1959
1960 if (! NILP (intangible_propval)) 1960 if (! NILP (intangible_propval))
1961 { 1961 {
1962 while (XINT (pos) < ZV 1962 while (XFIXNUM (pos) < ZV
1963 && EQ (Fget_char_property (pos, Qintangible, Qnil), 1963 && EQ (Fget_char_property (pos, Qintangible, Qnil),
1964 intangible_propval)) 1964 intangible_propval))
1965 pos = Fnext_char_property_change (pos, Qnil); 1965 pos = Fnext_char_property_change (pos, Qnil);
@@ -1969,7 +1969,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
1969 property is `rear-sticky', perturb it to be one character 1969 property is `rear-sticky', perturb it to be one character
1970 later -- this ensures that point can never move to the 1970 later -- this ensures that point can never move to the
1971 end of an invisible/intangible/rear-sticky region. */ 1971 end of an invisible/intangible/rear-sticky region. */
1972 charpos = adjust_for_invis_intang (XINT (pos), -1, 1, 0); 1972 charpos = adjust_for_invis_intang (XFIXNUM (pos), -1, 1, 0);
1973 } 1973 }
1974 } 1974 }
1975 1975
@@ -2055,7 +2055,7 @@ move_if_not_intangible (ptrdiff_t position)
2055 if (! NILP (Vinhibit_point_motion_hooks)) 2055 if (! NILP (Vinhibit_point_motion_hooks))
2056 /* If intangible is inhibited, always move point to POSITION. */ 2056 /* If intangible is inhibited, always move point to POSITION. */
2057 ; 2057 ;
2058 else if (PT < position && XINT (pos) < ZV) 2058 else if (PT < position && XFIXNUM (pos) < ZV)
2059 { 2059 {
2060 /* We want to move forward, so check the text before POSITION. */ 2060 /* We want to move forward, so check the text before POSITION. */
2061 2061
@@ -2065,23 +2065,23 @@ move_if_not_intangible (ptrdiff_t position)
2065 /* If following char is intangible, 2065 /* If following char is intangible,
2066 skip back over all chars with matching intangible property. */ 2066 skip back over all chars with matching intangible property. */
2067 if (! NILP (intangible_propval)) 2067 if (! NILP (intangible_propval))
2068 while (XINT (pos) > BEGV 2068 while (XFIXNUM (pos) > BEGV
2069 && EQ (Fget_char_property (make_fixnum (XINT (pos) - 1), 2069 && EQ (Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
2070 Qintangible, Qnil), 2070 Qintangible, Qnil),
2071 intangible_propval)) 2071 intangible_propval))
2072 pos = Fprevious_char_property_change (pos, Qnil); 2072 pos = Fprevious_char_property_change (pos, Qnil);
2073 } 2073 }
2074 else if (XINT (pos) > BEGV) 2074 else if (XFIXNUM (pos) > BEGV)
2075 { 2075 {
2076 /* We want to move backward, so check the text after POSITION. */ 2076 /* We want to move backward, so check the text after POSITION. */
2077 2077
2078 intangible_propval = Fget_char_property (make_fixnum (XINT (pos) - 1), 2078 intangible_propval = Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
2079 Qintangible, Qnil); 2079 Qintangible, Qnil);
2080 2080
2081 /* If following char is intangible, 2081 /* If following char is intangible,
2082 skip forward over all chars with matching intangible property. */ 2082 skip forward over all chars with matching intangible property. */
2083 if (! NILP (intangible_propval)) 2083 if (! NILP (intangible_propval))
2084 while (XINT (pos) < ZV 2084 while (XFIXNUM (pos) < ZV
2085 && EQ (Fget_char_property (pos, Qintangible, Qnil), 2085 && EQ (Fget_char_property (pos, Qintangible, Qnil),
2086 intangible_propval)) 2086 intangible_propval))
2087 pos = Fnext_char_property_change (pos, Qnil); 2087 pos = Fnext_char_property_change (pos, Qnil);
@@ -2096,7 +2096,7 @@ move_if_not_intangible (ptrdiff_t position)
2096 try moving to POSITION (which means we actually move farther 2096 try moving to POSITION (which means we actually move farther
2097 if POSITION is inside of intangible text). */ 2097 if POSITION is inside of intangible text). */
2098 2098
2099 if (XINT (pos) != PT) 2099 if (XFIXNUM (pos) != PT)
2100 SET_PT (position); 2100 SET_PT (position);
2101} 2101}
2102 2102
diff --git a/src/json.c b/src/json.c
index da6e34d89c1..17edb4140e0 100644
--- a/src/json.c
+++ b/src/json.c
@@ -485,7 +485,7 @@ lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
485 else if (FIXNUMP (lisp)) 485 else if (FIXNUMP (lisp))
486 { 486 {
487 CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp); 487 CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp);
488 return json_check (json_integer (XINT (lisp))); 488 return json_check (json_integer (XFIXNUM (lisp)));
489 } 489 }
490 else if (FLOATP (lisp)) 490 else if (FLOATP (lisp))
491 return json_check (json_real (XFLOAT_DATA (lisp))); 491 return json_check (json_real (XFLOAT_DATA (lisp)));
diff --git a/src/keyboard.c b/src/keyboard.c
index 25864b5b5f5..4c8807d6801 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -441,7 +441,7 @@ static bool
441echo_keystrokes_p (void) 441echo_keystrokes_p (void)
442{ 442{
443 return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0 443 return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
444 : FIXNUMP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0 444 : FIXNUMP (Vecho_keystrokes) ? XFIXNUM (Vecho_keystrokes) > 0
445 : false); 445 : false);
446} 446}
447 447
@@ -467,7 +467,7 @@ echo_add_key (Lisp_Object c)
467 c = EVENT_HEAD (c); 467 c = EVENT_HEAD (c);
468 468
469 if (FIXNUMP (c)) 469 if (FIXNUMP (c))
470 ptr = push_key_description (XINT (c), ptr); 470 ptr = push_key_description (XFIXNUM (c), ptr);
471 else if (SYMBOLP (c)) 471 else if (SYMBOLP (c))
472 { 472 {
473 Lisp_Object name = SYMBOL_NAME (c); 473 Lisp_Object name = SYMBOL_NAME (c);
@@ -541,7 +541,7 @@ echo_dash (void)
541 idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 1); 541 idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 1);
542 last_char = Faref (KVAR (current_kboard, echo_string), idx); 542 last_char = Faref (KVAR (current_kboard, echo_string), idx);
543 543
544 if (XINT (last_char) == '-' && XINT (prev_char) != ' ') 544 if (XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ')
545 return; 545 return;
546 } 546 }
547 547
@@ -1525,7 +1525,7 @@ command_loop_1 (void)
1525 { 1525 {
1526 Lisp_Object txt 1526 Lisp_Object txt
1527 = call1 (Fsymbol_value (Qregion_extract_function), Qnil); 1527 = call1 (Fsymbol_value (Qregion_extract_function), Qnil);
1528 if (XINT (Flength (txt)) > 0) 1528 if (XFIXNUM (Flength (txt)) > 0)
1529 /* Don't set empty selections. */ 1529 /* Don't set empty selections. */
1530 call2 (Qgui_set_selection, QPRIMARY, txt); 1530 call2 (Qgui_set_selection, QPRIMARY, txt);
1531 } 1531 }
@@ -1677,7 +1677,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
1677 || !NILP (Foverlay_get (overlay, Qbefore_string)))); 1677 || !NILP (Foverlay_get (overlay, Qbefore_string))));
1678 tmp = Fnext_single_char_property_change 1678 tmp = Fnext_single_char_property_change
1679 (make_fixnum (end), Qinvisible, Qnil, Qnil); 1679 (make_fixnum (end), Qinvisible, Qnil, Qnil);
1680 end = FIXNATP (tmp) ? XFASTINT (tmp) : ZV; 1680 end = FIXNATP (tmp) ? XFIXNAT (tmp) : ZV;
1681 } 1681 }
1682 while (beg > BEGV 1682 while (beg > BEGV
1683#if 0 1683#if 0
@@ -1695,7 +1695,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
1695 || !NILP (Foverlay_get (overlay, Qbefore_string)))); 1695 || !NILP (Foverlay_get (overlay, Qbefore_string))));
1696 tmp = Fprevious_single_char_property_change 1696 tmp = Fprevious_single_char_property_change
1697 (make_fixnum (beg), Qinvisible, Qnil, Qnil); 1697 (make_fixnum (beg), Qinvisible, Qnil, Qnil);
1698 beg = FIXNATP (tmp) ? XFASTINT (tmp) : BEGV; 1698 beg = FIXNATP (tmp) ? XFIXNAT (tmp) : BEGV;
1699 } 1699 }
1700 1700
1701 /* Move away from the inside area. */ 1701 /* Move away from the inside area. */
@@ -2145,7 +2145,7 @@ read_event_from_main_queue (struct timespec *end_time,
2145 } 2145 }
2146 2146
2147 /* Terminate Emacs in batch mode if at eof. */ 2147 /* Terminate Emacs in batch mode if at eof. */
2148 if (noninteractive && FIXNUMP (c) && XINT (c) < 0) 2148 if (noninteractive && FIXNUMP (c) && XFIXNUM (c) < 0)
2149 Fkill_emacs (make_fixnum (1)); 2149 Fkill_emacs (make_fixnum (1));
2150 2150
2151 if (FIXNUMP (c)) 2151 if (FIXNUMP (c))
@@ -2154,12 +2154,12 @@ read_event_from_main_queue (struct timespec *end_time,
2154 if ((extra_keyboard_modifiers & CHAR_CTL) 2154 if ((extra_keyboard_modifiers & CHAR_CTL)
2155 || ((extra_keyboard_modifiers & 0177) < ' ' 2155 || ((extra_keyboard_modifiers & 0177) < ' '
2156 && (extra_keyboard_modifiers & 0177) != 0)) 2156 && (extra_keyboard_modifiers & 0177) != 0))
2157 XSETINT (c, make_ctrl_char (XINT (c))); 2157 XSETINT (c, make_ctrl_char (XFIXNUM (c)));
2158 2158
2159 /* Transfer any other modifier bits directly from 2159 /* Transfer any other modifier bits directly from
2160 extra_keyboard_modifiers to c. Ignore the actual character code 2160 extra_keyboard_modifiers to c. Ignore the actual character code
2161 in the low 16 bits of extra_keyboard_modifiers. */ 2161 in the low 16 bits of extra_keyboard_modifiers. */
2162 XSETINT (c, XINT (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL)); 2162 XSETINT (c, XFIXNUM (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL));
2163 } 2163 }
2164 2164
2165 return c; 2165 return c;
@@ -2208,7 +2208,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2208 eassert (n < MAX_ENCODED_BYTES); 2208 eassert (n < MAX_ENCODED_BYTES);
2209 events[n++] = nextevt; 2209 events[n++] = nextevt;
2210 if (FIXNATP (nextevt) 2210 if (FIXNATP (nextevt)
2211 && XINT (nextevt) < (meta_key == 1 ? 0x80 : 0x100)) 2211 && XFIXNUM (nextevt) < (meta_key == 1 ? 0x80 : 0x100))
2212 { /* An encoded byte sequence, let's try to decode it. */ 2212 { /* An encoded byte sequence, let's try to decode it. */
2213 struct coding_system *coding 2213 struct coding_system *coding
2214 = TERMINAL_KEYBOARD_CODING (terminal); 2214 = TERMINAL_KEYBOARD_CODING (terminal);
@@ -2218,7 +2218,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2218 int i; 2218 int i;
2219 if (meta_key != 2) 2219 if (meta_key != 2)
2220 for (i = 0; i < n; i++) 2220 for (i = 0; i < n; i++)
2221 events[i] = make_fixnum (XINT (events[i]) & ~0x80); 2221 events[i] = make_fixnum (XFIXNUM (events[i]) & ~0x80);
2222 } 2222 }
2223 else 2223 else
2224 { 2224 {
@@ -2226,7 +2226,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
2226 unsigned char dest[MAX_ENCODED_BYTES * MAX_MULTIBYTE_LENGTH]; 2226 unsigned char dest[MAX_ENCODED_BYTES * MAX_MULTIBYTE_LENGTH];
2227 int i; 2227 int i;
2228 for (i = 0; i < n; i++) 2228 for (i = 0; i < n; i++)
2229 src[i] = XINT (events[i]); 2229 src[i] = XFIXNUM (events[i]);
2230 if (meta_key != 2) 2230 if (meta_key != 2)
2231 for (i = 0; i < n; i++) 2231 for (i = 0; i < n; i++)
2232 src[i] &= ~0x80; 2232 src[i] &= ~0x80;
@@ -2403,7 +2403,7 @@ read_char (int commandflag, Lisp_Object map,
2403 Also, some things replace the macro with t 2403 Also, some things replace the macro with t
2404 to force an early exit. */ 2404 to force an early exit. */
2405 if (EQ (Vexecuting_kbd_macro, Qt) 2405 if (EQ (Vexecuting_kbd_macro, Qt)
2406 || executing_kbd_macro_index >= XFASTINT (Flength (Vexecuting_kbd_macro))) 2406 || executing_kbd_macro_index >= XFIXNAT (Flength (Vexecuting_kbd_macro)))
2407 { 2407 {
2408 XSETINT (c, -1); 2408 XSETINT (c, -1);
2409 goto exit; 2409 goto exit;
@@ -2411,8 +2411,8 @@ read_char (int commandflag, Lisp_Object map,
2411 2411
2412 c = Faref (Vexecuting_kbd_macro, make_fixnum (executing_kbd_macro_index)); 2412 c = Faref (Vexecuting_kbd_macro, make_fixnum (executing_kbd_macro_index));
2413 if (STRINGP (Vexecuting_kbd_macro) 2413 if (STRINGP (Vexecuting_kbd_macro)
2414 && (XFASTINT (c) & 0x80) && (XFASTINT (c) <= 0xff)) 2414 && (XFIXNAT (c) & 0x80) && (XFIXNAT (c) <= 0xff))
2415 XSETFASTINT (c, CHAR_META | (XFASTINT (c) & ~0x80)); 2415 XSETFASTINT (c, CHAR_META | (XFIXNAT (c) & ~0x80));
2416 2416
2417 executing_kbd_macro_index++; 2417 executing_kbd_macro_index++;
2418 2418
@@ -2516,7 +2516,7 @@ read_char (int commandflag, Lisp_Object map,
2516 { 2516 {
2517 c = read_char_minibuf_menu_prompt (commandflag, map); 2517 c = read_char_minibuf_menu_prompt (commandflag, map);
2518 2518
2519 if (FIXNUMP (c) && XINT (c) == -2) 2519 if (FIXNUMP (c) && XFIXNUM (c) == -2)
2520 return c; /* wrong_kboard_jmpbuf */ 2520 return c; /* wrong_kboard_jmpbuf */
2521 2521
2522 if (! NILP (c)) 2522 if (! NILP (c))
@@ -2676,10 +2676,10 @@ read_char (int commandflag, Lisp_Object map,
2676 if (commandflag != 0 && commandflag != -2 2676 if (commandflag != 0 && commandflag != -2
2677 && num_nonmacro_input_events > last_auto_save 2677 && num_nonmacro_input_events > last_auto_save
2678 && FIXNUMP (Vauto_save_timeout) 2678 && FIXNUMP (Vauto_save_timeout)
2679 && XINT (Vauto_save_timeout) > 0) 2679 && XFIXNUM (Vauto_save_timeout) > 0)
2680 { 2680 {
2681 Lisp_Object tem0; 2681 Lisp_Object tem0;
2682 EMACS_INT timeout = XFASTINT (Vauto_save_timeout); 2682 EMACS_INT timeout = XFIXNAT (Vauto_save_timeout);
2683 2683
2684 timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4); 2684 timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4);
2685 timeout = delay_level * timeout / 4; 2685 timeout = delay_level * timeout / 4;
@@ -2852,15 +2852,15 @@ read_char (int commandflag, Lisp_Object map,
2852 if (FIXNUMP (c)) 2852 if (FIXNUMP (c))
2853 { 2853 {
2854 /* If kbd_buffer_get_event gave us an EOF, return that. */ 2854 /* If kbd_buffer_get_event gave us an EOF, return that. */
2855 if (XINT (c) == -1) 2855 if (XFIXNUM (c) == -1)
2856 goto exit; 2856 goto exit;
2857 2857
2858 if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table)) 2858 if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table))
2859 && UNSIGNED_CMP (XFASTINT (c), <, 2859 && UNSIGNED_CMP (XFIXNAT (c), <,
2860 SCHARS (KVAR (current_kboard, 2860 SCHARS (KVAR (current_kboard,
2861 Vkeyboard_translate_table)))) 2861 Vkeyboard_translate_table))))
2862 || (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table)) 2862 || (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table))
2863 && UNSIGNED_CMP (XFASTINT (c), <, 2863 && UNSIGNED_CMP (XFIXNAT (c), <,
2864 ASIZE (KVAR (current_kboard, 2864 ASIZE (KVAR (current_kboard,
2865 Vkeyboard_translate_table)))) 2865 Vkeyboard_translate_table))))
2866 || (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table)) 2866 || (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table))
@@ -2910,7 +2910,7 @@ read_char (int commandflag, Lisp_Object map,
2910 save the echo area contents for it to refer to. */ 2910 save the echo area contents for it to refer to. */
2911 if (FIXNUMP (c) 2911 if (FIXNUMP (c)
2912 && ! NILP (Vinput_method_function) 2912 && ! NILP (Vinput_method_function)
2913 && ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127) 2913 && ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127)
2914 { 2914 {
2915 previous_echo_area_message = Fcurrent_message (); 2915 previous_echo_area_message = Fcurrent_message ();
2916 Vinput_method_previous_message = previous_echo_area_message; 2916 Vinput_method_previous_message = previous_echo_area_message;
@@ -2940,7 +2940,7 @@ read_char (int commandflag, Lisp_Object map,
2940 /* Don't run the input method within a key sequence, 2940 /* Don't run the input method within a key sequence,
2941 after the first event of the key sequence. */ 2941 after the first event of the key sequence. */
2942 && NILP (prev_event) 2942 && NILP (prev_event)
2943 && ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127) 2943 && ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127)
2944 { 2944 {
2945 Lisp_Object keys; 2945 Lisp_Object keys;
2946 ptrdiff_t key_count; 2946 ptrdiff_t key_count;
@@ -3261,10 +3261,10 @@ record_char (Lisp_Object c)
3261 block_input (); 3261 block_input ();
3262 if (FIXNUMP (c)) 3262 if (FIXNUMP (c))
3263 { 3263 {
3264 if (XUINT (c) < 0x100) 3264 if (XUFIXNUM (c) < 0x100)
3265 putc_unlocked (XUINT (c), dribble); 3265 putc_unlocked (XUFIXNUM (c), dribble);
3266 else 3266 else
3267 fprintf (dribble, " 0x%"pI"x", XUINT (c)); 3267 fprintf (dribble, " 0x%"pI"x", XUFIXNUM (c));
3268 } 3268 }
3269 else 3269 else
3270 { 3270 {
@@ -5009,7 +5009,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
5009 int xret = 0, yret = 0; 5009 int xret = 0, yret = 0;
5010 /* The window or frame under frame pixel coordinates (x,y) */ 5010 /* The window or frame under frame pixel coordinates (x,y) */
5011 Lisp_Object window_or_frame = f 5011 Lisp_Object window_or_frame = f
5012 ? window_from_coordinates (f, XINT (x), XINT (y), &part, 0) 5012 ? window_from_coordinates (f, XFIXNUM (x), XFIXNUM (y), &part, 0)
5013 : Qnil; 5013 : Qnil;
5014 5014
5015 if (WINDOWP (window_or_frame)) 5015 if (WINDOWP (window_or_frame))
@@ -5024,15 +5024,15 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
5024 Lisp_Object object = Qnil; 5024 Lisp_Object object = Qnil;
5025 5025
5026 /* Pixel coordinates relative to the window corner. */ 5026 /* Pixel coordinates relative to the window corner. */
5027 int wx = XINT (x) - WINDOW_LEFT_EDGE_X (w); 5027 int wx = XFIXNUM (x) - WINDOW_LEFT_EDGE_X (w);
5028 int wy = XINT (y) - WINDOW_TOP_EDGE_Y (w); 5028 int wy = XFIXNUM (y) - WINDOW_TOP_EDGE_Y (w);
5029 5029
5030 /* For text area clicks, return X, Y relative to the corner of 5030 /* For text area clicks, return X, Y relative to the corner of
5031 this text area. Note that dX, dY etc are set below, by 5031 this text area. Note that dX, dY etc are set below, by
5032 buffer_posn_from_coords. */ 5032 buffer_posn_from_coords. */
5033 if (part == ON_TEXT) 5033 if (part == ON_TEXT)
5034 { 5034 {
5035 xret = XINT (x) - window_box_left (w, TEXT_AREA); 5035 xret = XFIXNUM (x) - window_box_left (w, TEXT_AREA);
5036 yret = wy - WINDOW_HEADER_LINE_HEIGHT (w); 5036 yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
5037 } 5037 }
5038 /* For mode line and header line clicks, return X, Y relative to 5038 /* For mode line and header line clicks, return X, Y relative to
@@ -5152,7 +5152,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
5152 : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN 5152 : (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN
5153 || (part == ON_VERTICAL_SCROLL_BAR 5153 || (part == ON_VERTICAL_SCROLL_BAR
5154 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w))) 5154 && WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
5155 ? (XINT (x) - window_box_left (w, TEXT_AREA)) 5155 ? (XFIXNUM (x) - window_box_left (w, TEXT_AREA))
5156 : 0; 5156 : 0;
5157 int y2 = wy; 5157 int y2 = wy;
5158 5158
@@ -5210,8 +5210,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
5210 { 5210 {
5211 /* Return mouse pixel coordinates here. */ 5211 /* Return mouse pixel coordinates here. */
5212 XSETFRAME (window_or_frame, f); 5212 XSETFRAME (window_or_frame, f);
5213 xret = XINT (x); 5213 xret = XFIXNUM (x);
5214 yret = XINT (y); 5214 yret = XFIXNUM (y);
5215 5215
5216 if (FRAME_LIVE_P (f) 5216 if (FRAME_LIVE_P (f)
5217 && FRAME_INTERNAL_BORDER_WIDTH (f) > 0 5217 && FRAME_INTERNAL_BORDER_WIDTH (f) > 0
@@ -5530,7 +5530,7 @@ make_lispy_event (struct input_event *event)
5530 in a menu (non-toolkit version). */ 5530 in a menu (non-toolkit version). */
5531 if (!toolkit_menubar_in_use (f)) 5531 if (!toolkit_menubar_in_use (f))
5532 { 5532 {
5533 pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y), 5533 pixel_to_glyph_coords (f, XFIXNUM (event->x), XFIXNUM (event->y),
5534 &column, &row, NULL, 1); 5534 &column, &row, NULL, 1);
5535 5535
5536 /* In the non-toolkit version, clicks on the menu bar 5536 /* In the non-toolkit version, clicks on the menu bar
@@ -5555,8 +5555,8 @@ make_lispy_event (struct input_event *event)
5555 pos = AREF (items, i + 3); 5555 pos = AREF (items, i + 3);
5556 if (NILP (string)) 5556 if (NILP (string))
5557 break; 5557 break;
5558 if (column >= XINT (pos) 5558 if (column >= XFIXNUM (pos)
5559 && column < XINT (pos) + SCHARS (string)) 5559 && column < XFIXNUM (pos) + SCHARS (string))
5560 { 5560 {
5561 item = AREF (items, i); 5561 item = AREF (items, i);
5562 break; 5562 break;
@@ -5616,18 +5616,18 @@ make_lispy_event (struct input_event *event)
5616 fuzz = double_click_fuzz / 8; 5616 fuzz = double_click_fuzz / 8;
5617 5617
5618 is_double = (button == last_mouse_button 5618 is_double = (button == last_mouse_button
5619 && (eabs (XINT (event->x) - last_mouse_x) <= fuzz) 5619 && (eabs (XFIXNUM (event->x) - last_mouse_x) <= fuzz)
5620 && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) 5620 && (eabs (XFIXNUM (event->y) - last_mouse_y) <= fuzz)
5621 && button_down_time != 0 5621 && button_down_time != 0
5622 && (EQ (Vdouble_click_time, Qt) 5622 && (EQ (Vdouble_click_time, Qt)
5623 || (FIXNATP (Vdouble_click_time) 5623 || (FIXNATP (Vdouble_click_time)
5624 && (event->timestamp - button_down_time 5624 && (event->timestamp - button_down_time
5625 < XFASTINT (Vdouble_click_time))))); 5625 < XFIXNAT (Vdouble_click_time)))));
5626 } 5626 }
5627 5627
5628 last_mouse_button = button; 5628 last_mouse_button = button;
5629 last_mouse_x = XINT (event->x); 5629 last_mouse_x = XFIXNUM (event->x);
5630 last_mouse_y = XINT (event->y); 5630 last_mouse_y = XFIXNUM (event->y);
5631 5631
5632 /* If this is a button press, squirrel away the location, so 5632 /* If this is a button press, squirrel away the location, so
5633 we can decide later whether it was a click or a drag. */ 5633 we can decide later whether it was a click or a drag. */
@@ -5674,8 +5674,8 @@ make_lispy_event (struct input_event *event)
5674 if (CONSP (down) 5674 if (CONSP (down)
5675 && FIXNUMP (XCAR (down)) && FIXNUMP (XCDR (down))) 5675 && FIXNUMP (XCAR (down)) && FIXNUMP (XCDR (down)))
5676 { 5676 {
5677 xdiff = XINT (XCAR (new_down)) - XINT (XCAR (down)); 5677 xdiff = XFIXNUM (XCAR (new_down)) - XFIXNUM (XCAR (down));
5678 ydiff = XINT (XCDR (new_down)) - XINT (XCDR (down)); 5678 ydiff = XFIXNUM (XCDR (new_down)) - XFIXNUM (XCDR (down));
5679 } 5679 }
5680 5680
5681 if (ignore_mouse_drag_p) 5681 if (ignore_mouse_drag_p)
@@ -5794,13 +5794,13 @@ make_lispy_event (struct input_event *event)
5794 symbol_num += 2; 5794 symbol_num += 2;
5795 5795
5796 is_double = (last_mouse_button == - (1 + symbol_num) 5796 is_double = (last_mouse_button == - (1 + symbol_num)
5797 && (eabs (XINT (event->x) - last_mouse_x) <= fuzz) 5797 && (eabs (XFIXNUM (event->x) - last_mouse_x) <= fuzz)
5798 && (eabs (XINT (event->y) - last_mouse_y) <= fuzz) 5798 && (eabs (XFIXNUM (event->y) - last_mouse_y) <= fuzz)
5799 && button_down_time != 0 5799 && button_down_time != 0
5800 && (EQ (Vdouble_click_time, Qt) 5800 && (EQ (Vdouble_click_time, Qt)
5801 || (FIXNATP (Vdouble_click_time) 5801 || (FIXNATP (Vdouble_click_time)
5802 && (event->timestamp - button_down_time 5802 && (event->timestamp - button_down_time
5803 < XFASTINT (Vdouble_click_time))))); 5803 < XFIXNAT (Vdouble_click_time)))));
5804 if (is_double) 5804 if (is_double)
5805 { 5805 {
5806 double_click_count++; 5806 double_click_count++;
@@ -5817,8 +5817,8 @@ make_lispy_event (struct input_event *event)
5817 button_down_time = event->timestamp; 5817 button_down_time = event->timestamp;
5818 /* Use a negative value to distinguish wheel from mouse button. */ 5818 /* Use a negative value to distinguish wheel from mouse button. */
5819 last_mouse_button = - (1 + symbol_num); 5819 last_mouse_button = - (1 + symbol_num);
5820 last_mouse_x = XINT (event->x); 5820 last_mouse_x = XFIXNUM (event->x);
5821 last_mouse_y = XINT (event->y); 5821 last_mouse_y = XFIXNUM (event->y);
5822 5822
5823 /* Get the symbol we should use for the wheel event. */ 5823 /* Get the symbol we should use for the wheel event. */
5824 head = modify_event_symbol (symbol_num, 5824 head = modify_event_symbol (symbol_num,
@@ -6260,7 +6260,7 @@ lispy_modifier_list (int modifiers)
6260 SYMBOL's Qevent_symbol_element_mask property, and maintains the 6260 SYMBOL's Qevent_symbol_element_mask property, and maintains the
6261 Qevent_symbol_elements property. */ 6261 Qevent_symbol_elements property. */
6262 6262
6263#define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1)) 6263#define KEY_TO_CHAR(k) (XFIXNUM (k) & ((1 << CHARACTERBITS) - 1))
6264 6264
6265Lisp_Object 6265Lisp_Object
6266parse_modifiers (Lisp_Object symbol) 6266parse_modifiers (Lisp_Object symbol)
@@ -6268,7 +6268,7 @@ parse_modifiers (Lisp_Object symbol)
6268 Lisp_Object elements; 6268 Lisp_Object elements;
6269 6269
6270 if (FIXNUMP (symbol)) 6270 if (FIXNUMP (symbol))
6271 return list2i (KEY_TO_CHAR (symbol), XINT (symbol) & CHAR_MODIFIER_MASK); 6271 return list2i (KEY_TO_CHAR (symbol), XFIXNUM (symbol) & CHAR_MODIFIER_MASK);
6272 else if (!SYMBOLP (symbol)) 6272 else if (!SYMBOLP (symbol))
6273 return Qnil; 6273 return Qnil;
6274 6274
@@ -6336,7 +6336,7 @@ apply_modifiers (int modifiers, Lisp_Object base)
6336 modifiers &= INTMASK; 6336 modifiers &= INTMASK;
6337 6337
6338 if (FIXNUMP (base)) 6338 if (FIXNUMP (base))
6339 return make_fixnum (XINT (base) | modifiers); 6339 return make_fixnum (XFIXNUM (base) | modifiers);
6340 6340
6341 /* The click modifier never figures into cache indices. */ 6341 /* The click modifier never figures into cache indices. */
6342 cache = Fget (base, Qmodifier_cache); 6342 cache = Fget (base, Qmodifier_cache);
@@ -6404,7 +6404,7 @@ reorder_modifiers (Lisp_Object symbol)
6404 Lisp_Object parsed; 6404 Lisp_Object parsed;
6405 6405
6406 parsed = parse_modifiers (symbol); 6406 parsed = parse_modifiers (symbol);
6407 return apply_modifiers (XFASTINT (XCAR (XCDR (parsed))), 6407 return apply_modifiers (XFIXNAT (XCAR (XCDR (parsed))),
6408 XCAR (parsed)); 6408 XCAR (parsed));
6409} 6409}
6410 6410
@@ -6491,7 +6491,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin
6491 USE_SAFE_ALLOCA; 6491 USE_SAFE_ALLOCA;
6492 buf = SAFE_ALLOCA (len); 6492 buf = SAFE_ALLOCA (len);
6493 esprintf (buf, "%s-%"pI"d", SDATA (name_alist_or_stem), 6493 esprintf (buf, "%s-%"pI"d", SDATA (name_alist_or_stem),
6494 XINT (symbol_int) + 1); 6494 XFIXNUM (symbol_int) + 1);
6495 value = intern (buf); 6495 value = intern (buf);
6496 SAFE_FREE (); 6496 SAFE_FREE ();
6497 } 6497 }
@@ -6578,18 +6578,18 @@ has the same base event type and all the specified modifiers. */)
6578 { 6578 {
6579 /* Turn (shift a) into A. */ 6579 /* Turn (shift a) into A. */
6580 if ((modifiers & shift_modifier) != 0 6580 if ((modifiers & shift_modifier) != 0
6581 && (XINT (base) >= 'a' && XINT (base) <= 'z')) 6581 && (XFIXNUM (base) >= 'a' && XFIXNUM (base) <= 'z'))
6582 { 6582 {
6583 XSETINT (base, XINT (base) - ('a' - 'A')); 6583 XSETINT (base, XFIXNUM (base) - ('a' - 'A'));
6584 modifiers &= ~shift_modifier; 6584 modifiers &= ~shift_modifier;
6585 } 6585 }
6586 6586
6587 /* Turn (control a) into C-a. */ 6587 /* Turn (control a) into C-a. */
6588 if (modifiers & ctrl_modifier) 6588 if (modifiers & ctrl_modifier)
6589 return make_fixnum ((modifiers & ~ctrl_modifier) 6589 return make_fixnum ((modifiers & ~ctrl_modifier)
6590 | make_ctrl_char (XINT (base))); 6590 | make_ctrl_char (XFIXNUM (base)));
6591 else 6591 else
6592 return make_fixnum (modifiers | XINT (base)); 6592 return make_fixnum (modifiers | XFIXNUM (base));
6593 } 6593 }
6594 else if (SYMBOLP (base)) 6594 else if (SYMBOLP (base))
6595 return apply_modifiers (modifiers, base); 6595 return apply_modifiers (modifiers, base);
@@ -8527,8 +8527,8 @@ read_char_minibuf_menu_prompt (int commandflag,
8527 8527
8528 upcased_event = Fupcase (event); 8528 upcased_event = Fupcase (event);
8529 downcased_event = Fdowncase (event); 8529 downcased_event = Fdowncase (event);
8530 char_matches = (XINT (upcased_event) == SREF (s, 0) 8530 char_matches = (XFIXNUM (upcased_event) == SREF (s, 0)
8531 || XINT (downcased_event) == SREF (s, 0)); 8531 || XFIXNUM (downcased_event) == SREF (s, 0));
8532 if (! char_matches) 8532 if (! char_matches)
8533 desc = Fsingle_key_description (event, Qnil); 8533 desc = Fsingle_key_description (event, Qnil);
8534 8534
@@ -8633,10 +8633,10 @@ read_char_minibuf_menu_prompt (int commandflag,
8633 while (BUFFERP (obj)); 8633 while (BUFFERP (obj));
8634 kset_defining_kbd_macro (current_kboard, orig_defn_macro); 8634 kset_defining_kbd_macro (current_kboard, orig_defn_macro);
8635 8635
8636 if (!FIXNUMP (obj) || XINT (obj) == -2 8636 if (!FIXNUMP (obj) || XFIXNUM (obj) == -2
8637 || (! EQ (obj, menu_prompt_more_char) 8637 || (! EQ (obj, menu_prompt_more_char)
8638 && (!FIXNUMP (menu_prompt_more_char) 8638 && (!FIXNUMP (menu_prompt_more_char)
8639 || ! EQ (obj, make_fixnum (Ctl (XINT (menu_prompt_more_char))))))) 8639 || ! EQ (obj, make_fixnum (Ctl (XFIXNUM (menu_prompt_more_char)))))))
8640 { 8640 {
8641 if (!NILP (KVAR (current_kboard, defining_kbd_macro))) 8641 if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
8642 store_kbd_macro_char (obj); 8642 store_kbd_macro_char (obj);
@@ -8757,7 +8757,7 @@ keyremap_step (Lisp_Object *keybuf, volatile keyremap *fkey,
8757 the binding and restart with fkey->start at the end. */ 8757 the binding and restart with fkey->start at the end. */
8758 if ((VECTORP (next) || STRINGP (next)) && doit) 8758 if ((VECTORP (next) || STRINGP (next)) && doit)
8759 { 8759 {
8760 int len = XFASTINT (Flength (next)); 8760 int len = XFIXNAT (Flength (next));
8761 int i; 8761 int i;
8762 8762
8763 *diff = len - (fkey->end - fkey->start); 8763 *diff = len - (fkey->end - fkey->start);
@@ -9105,7 +9105,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9105 current_binding, last_nonmenu_event, 9105 current_binding, last_nonmenu_event,
9106 &used_mouse_menu, NULL); 9106 &used_mouse_menu, NULL);
9107 used_mouse_menu_history[t] = used_mouse_menu; 9107 used_mouse_menu_history[t] = used_mouse_menu;
9108 if ((FIXNUMP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */ 9108 if ((FIXNUMP (key) && XFIXNUM (key) == -2) /* wrong_kboard_jmpbuf */
9109 /* When switching to a new tty (with a new keyboard), 9109 /* When switching to a new tty (with a new keyboard),
9110 read_char returns the new buffer, rather than -2 9110 read_char returns the new buffer, rather than -2
9111 (Bug#5095). This is because `terminal-init-xterm' 9111 (Bug#5095). This is because `terminal-init-xterm'
@@ -9173,7 +9173,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9173 /* read_char returns -1 at the end of a macro. 9173 /* read_char returns -1 at the end of a macro.
9174 Emacs 18 handles this by returning immediately with a 9174 Emacs 18 handles this by returning immediately with a
9175 zero, so that's what we'll do. */ 9175 zero, so that's what we'll do. */
9176 if (FIXNUMP (key) && XINT (key) == -1) 9176 if (FIXNUMP (key) && XFIXNUM (key) == -1)
9177 { 9177 {
9178 t = 0; 9178 t = 0;
9179 /* The Microsoft C compiler can't handle the goto that 9179 /* The Microsoft C compiler can't handle the goto that
@@ -9209,7 +9209,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9209 quit_throw_to_read_char switched buffers, 9209 quit_throw_to_read_char switched buffers,
9210 replay to get the right keymap. */ 9210 replay to get the right keymap. */
9211 if (FIXNUMP (key) 9211 if (FIXNUMP (key)
9212 && XINT (key) == quit_char 9212 && XFIXNUM (key) == quit_char
9213 && current_buffer != starting_buffer) 9213 && current_buffer != starting_buffer)
9214 { 9214 {
9215 GROW_RAW_KEYBUF; 9215 GROW_RAW_KEYBUF;
@@ -9409,7 +9409,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9409 int modifiers; 9409 int modifiers;
9410 9410
9411 breakdown = parse_modifiers (head); 9411 breakdown = parse_modifiers (head);
9412 modifiers = XINT (XCAR (XCDR (breakdown))); 9412 modifiers = XFIXNUM (XCAR (XCDR (breakdown)));
9413 /* Attempt to reduce an unbound mouse event to a simpler 9413 /* Attempt to reduce an unbound mouse event to a simpler
9414 event that is bound: 9414 event that is bound:
9415 Drags reduce to clicks. 9415 Drags reduce to clicks.
@@ -9642,7 +9642,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9642 && FIXNUMP (key)) 9642 && FIXNUMP (key))
9643 { 9643 {
9644 Lisp_Object new_key; 9644 Lisp_Object new_key;
9645 EMACS_INT k = XINT (key); 9645 EMACS_INT k = XFIXNUM (key);
9646 9646
9647 if (k & shift_modifier) 9647 if (k & shift_modifier)
9648 XSETINT (new_key, k & ~shift_modifier); 9648 XSETINT (new_key, k & ~shift_modifier);
@@ -9689,7 +9689,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
9689 { 9689 {
9690 Lisp_Object breakdown = parse_modifiers (key); 9690 Lisp_Object breakdown = parse_modifiers (key);
9691 int modifiers 9691 int modifiers
9692 = CONSP (breakdown) ? (XINT (XCAR (XCDR (breakdown)))) : 0; 9692 = CONSP (breakdown) ? (XFIXNUM (XCAR (XCDR (breakdown)))) : 0;
9693 9693
9694 if (modifiers & shift_modifier 9694 if (modifiers & shift_modifier
9695 /* Treat uppercase keys as shifted. */ 9695 /* Treat uppercase keys as shifted. */
@@ -10655,7 +10655,7 @@ See also `current-input-mode'. */)
10655 return Qnil; 10655 return Qnil;
10656 tty = t->display_info.tty; 10656 tty = t->display_info.tty;
10657 10657
10658 if (NILP (quit) || !FIXNUMP (quit) || XINT (quit) < 0 || XINT (quit) > 0400) 10658 if (NILP (quit) || !FIXNUMP (quit) || XFIXNUM (quit) < 0 || XFIXNUM (quit) > 0400)
10659 error ("QUIT must be an ASCII character"); 10659 error ("QUIT must be an ASCII character");
10660 10660
10661#ifndef DOS_NT 10661#ifndef DOS_NT
@@ -10664,7 +10664,7 @@ See also `current-input-mode'. */)
10664#endif 10664#endif
10665 10665
10666 /* Don't let this value be out of range. */ 10666 /* Don't let this value be out of range. */
10667 quit_char = XINT (quit) & (tty->meta_key == 0 ? 0177 : 0377); 10667 quit_char = XFIXNUM (quit) & (tty->meta_key == 0 ? 0177 : 0377);
10668 10668
10669#ifndef DOS_NT 10669#ifndef DOS_NT
10670 init_sys_modes (tty); 10670 init_sys_modes (tty);
@@ -10747,7 +10747,7 @@ The `posn-' functions access elements of such lists. */)
10747 CHECK_FIXNUM (x); 10747 CHECK_FIXNUM (x);
10748 /* We allow X of -1, for the newline in a R2L line that overflowed 10748 /* We allow X of -1, for the newline in a R2L line that overflowed
10749 into the left fringe. */ 10749 into the left fringe. */
10750 if (XINT (x) != -1) 10750 if (XFIXNUM (x) != -1)
10751 CHECK_FIXNAT (x); 10751 CHECK_FIXNAT (x);
10752 CHECK_FIXNAT (y); 10752 CHECK_FIXNAT (y);
10753 10753
@@ -10758,12 +10758,12 @@ The `posn-' functions access elements of such lists. */)
10758 { 10758 {
10759 struct window *w = decode_live_window (frame_or_window); 10759 struct window *w = decode_live_window (frame_or_window);
10760 10760
10761 XSETINT (x, (XINT (x) 10761 XSETINT (x, (XFIXNUM (x)
10762 + WINDOW_LEFT_EDGE_X (w) 10762 + WINDOW_LEFT_EDGE_X (w)
10763 + (NILP (whole) 10763 + (NILP (whole)
10764 ? window_box_left_offset (w, TEXT_AREA) 10764 ? window_box_left_offset (w, TEXT_AREA)
10765 : 0))); 10765 : 0)));
10766 XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y))); 10766 XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XFIXNUM (y)));
10767 frame_or_window = w->frame; 10767 frame_or_window = w->frame;
10768 } 10768 }
10769 10769
@@ -10796,15 +10796,15 @@ The `posn-' functions access elements of such lists. */)
10796 Lisp_Object x = XCAR (tem); 10796 Lisp_Object x = XCAR (tem);
10797 Lisp_Object y = XCAR (XCDR (tem)); 10797 Lisp_Object y = XCAR (XCDR (tem));
10798 Lisp_Object aux_info = XCDR (XCDR (tem)); 10798 Lisp_Object aux_info = XCDR (XCDR (tem));
10799 int y_coord = XINT (y); 10799 int y_coord = XFIXNUM (y);
10800 10800
10801 /* Point invisible due to hscrolling? X can be -1 when a 10801 /* Point invisible due to hscrolling? X can be -1 when a
10802 newline in a R2L line overflows into the left fringe. */ 10802 newline in a R2L line overflows into the left fringe. */
10803 if (XINT (x) < -1) 10803 if (XFIXNUM (x) < -1)
10804 return Qnil; 10804 return Qnil;
10805 if (!NILP (aux_info) && y_coord < 0) 10805 if (!NILP (aux_info) && y_coord < 0)
10806 { 10806 {
10807 int rtop = XINT (XCAR (aux_info)); 10807 int rtop = XFIXNUM (XCAR (aux_info));
10808 10808
10809 y = make_fixnum (y_coord + rtop); 10809 y = make_fixnum (y_coord + rtop);
10810 } 10810 }
diff --git a/src/keymap.c b/src/keymap.c
index a7e0557ebde..bdd3af2cdcc 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -382,17 +382,17 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
382 else if (FIXNUMP (idx)) 382 else if (FIXNUMP (idx))
383 /* Clobber the high bits that can be present on a machine 383 /* Clobber the high bits that can be present on a machine
384 with more than 24 bits of integer. */ 384 with more than 24 bits of integer. */
385 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1))); 385 XSETFASTINT (idx, XFIXNUM (idx) & (CHAR_META | (CHAR_META - 1)));
386 386
387 /* Handle the special meta -> esc mapping. */ 387 /* Handle the special meta -> esc mapping. */
388 if (FIXNUMP (idx) && XFASTINT (idx) & meta_modifier) 388 if (FIXNUMP (idx) && XFIXNAT (idx) & meta_modifier)
389 { 389 {
390 /* See if there is a meta-map. If there's none, there is 390 /* See if there is a meta-map. If there's none, there is
391 no binding for IDX, unless a default binding exists in MAP. */ 391 no binding for IDX, unless a default binding exists in MAP. */
392 Lisp_Object event_meta_binding, event_meta_map; 392 Lisp_Object event_meta_binding, event_meta_map;
393 /* A strange value in which Meta is set would cause 393 /* A strange value in which Meta is set would cause
394 infinite recursion. Protect against that. */ 394 infinite recursion. Protect against that. */
395 if (XINT (meta_prefix_char) & CHAR_META) 395 if (XFIXNUM (meta_prefix_char) & CHAR_META)
396 meta_prefix_char = make_fixnum (27); 396 meta_prefix_char = make_fixnum (27);
397 event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok, 397 event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok,
398 noinherit, autoload); 398 noinherit, autoload);
@@ -400,7 +400,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
400 if (CONSP (event_meta_map)) 400 if (CONSP (event_meta_map))
401 { 401 {
402 map = event_meta_map; 402 map = event_meta_map;
403 idx = make_fixnum (XFASTINT (idx) & ~meta_modifier); 403 idx = make_fixnum (XFIXNAT (idx) & ~meta_modifier);
404 } 404 }
405 else if (t_ok) 405 else if (t_ok)
406 /* Set IDX to t, so that we only find a default binding. */ 406 /* Set IDX to t, so that we only find a default binding. */
@@ -473,15 +473,15 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
473 } 473 }
474 else if (VECTORP (binding)) 474 else if (VECTORP (binding))
475 { 475 {
476 if (FIXNUMP (idx) && XFASTINT (idx) < ASIZE (binding)) 476 if (FIXNUMP (idx) && XFIXNAT (idx) < ASIZE (binding))
477 val = AREF (binding, XFASTINT (idx)); 477 val = AREF (binding, XFIXNAT (idx));
478 } 478 }
479 else if (CHAR_TABLE_P (binding)) 479 else if (CHAR_TABLE_P (binding))
480 { 480 {
481 /* Character codes with modifiers 481 /* Character codes with modifiers
482 are not included in a char-table. 482 are not included in a char-table.
483 All character codes without modifiers are included. */ 483 All character codes without modifiers are included. */
484 if (FIXNUMP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0) 484 if (FIXNUMP (idx) && (XFIXNAT (idx) & CHAR_MODIFIER_MASK) == 0)
485 { 485 {
486 val = Faref (binding, idx); 486 val = Faref (binding, idx);
487 /* nil has a special meaning for char-tables, so 487 /* nil has a special meaning for char-tables, so
@@ -567,7 +567,7 @@ map_keymap_char_table_item (Lisp_Object args, Lisp_Object key, Lisp_Object val)
567 it in place. */ 567 it in place. */
568 if (CONSP (key)) 568 if (CONSP (key))
569 key = Fcons (XCAR (key), XCDR (key)); 569 key = Fcons (XCAR (key), XCDR (key));
570 union map_keymap *md = XINTPTR (args); 570 union map_keymap *md = XFIXNUMPTR (args);
571 map_keymap_item (md->s.fun, md->s.args, key, val, md->s.data); 571 map_keymap_item (md->s.fun, md->s.args, key, val, md->s.data);
572 } 572 }
573} 573}
@@ -785,7 +785,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
785 else if (FIXNUMP (idx)) 785 else if (FIXNUMP (idx))
786 /* Clobber the high bits that can be present on a machine 786 /* Clobber the high bits that can be present on a machine
787 with more than 24 bits of integer. */ 787 with more than 24 bits of integer. */
788 XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1))); 788 XSETFASTINT (idx, XFIXNUM (idx) & (CHAR_META | (CHAR_META - 1)));
789 789
790 /* Scan the keymap for a binding of idx. */ 790 /* Scan the keymap for a binding of idx. */
791 { 791 {
@@ -807,22 +807,22 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
807 elt = XCAR (tail); 807 elt = XCAR (tail);
808 if (VECTORP (elt)) 808 if (VECTORP (elt))
809 { 809 {
810 if (FIXNATP (idx) && XFASTINT (idx) < ASIZE (elt)) 810 if (FIXNATP (idx) && XFIXNAT (idx) < ASIZE (elt))
811 { 811 {
812 CHECK_IMPURE (elt, XVECTOR (elt)); 812 CHECK_IMPURE (elt, XVECTOR (elt));
813 ASET (elt, XFASTINT (idx), def); 813 ASET (elt, XFIXNAT (idx), def);
814 return def; 814 return def;
815 } 815 }
816 else if (CONSP (idx) && CHARACTERP (XCAR (idx))) 816 else if (CONSP (idx) && CHARACTERP (XCAR (idx)))
817 { 817 {
818 int from = XFASTINT (XCAR (idx)); 818 int from = XFIXNAT (XCAR (idx));
819 int to = XFASTINT (XCDR (idx)); 819 int to = XFIXNAT (XCDR (idx));
820 820
821 if (to >= ASIZE (elt)) 821 if (to >= ASIZE (elt))
822 to = ASIZE (elt) - 1; 822 to = ASIZE (elt) - 1;
823 for (; from <= to; from++) 823 for (; from <= to; from++)
824 ASET (elt, from, def); 824 ASET (elt, from, def);
825 if (to == XFASTINT (XCDR (idx))) 825 if (to == XFIXNAT (XCDR (idx)))
826 /* We have defined all keys in IDX. */ 826 /* We have defined all keys in IDX. */
827 return def; 827 return def;
828 } 828 }
@@ -833,7 +833,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
833 /* Character codes with modifiers 833 /* Character codes with modifiers
834 are not included in a char-table. 834 are not included in a char-table.
835 All character codes without modifiers are included. */ 835 All character codes without modifiers are included. */
836 if (FIXNATP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK)) 836 if (FIXNATP (idx) && !(XFIXNAT (idx) & CHAR_MODIFIER_MASK))
837 { 837 {
838 Faset (elt, idx, 838 Faset (elt, idx,
839 /* nil has a special meaning for char-tables, so 839 /* nil has a special meaning for char-tables, so
@@ -870,11 +870,11 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
870 && CHARACTERP (XCAR (idx)) 870 && CHARACTERP (XCAR (idx))
871 && CHARACTERP (XCAR (elt))) 871 && CHARACTERP (XCAR (elt)))
872 { 872 {
873 int from = XFASTINT (XCAR (idx)); 873 int from = XFIXNAT (XCAR (idx));
874 int to = XFASTINT (XCDR (idx)); 874 int to = XFIXNAT (XCDR (idx));
875 875
876 if (from <= XFASTINT (XCAR (elt)) 876 if (from <= XFIXNAT (XCAR (elt))
877 && to >= XFASTINT (XCAR (elt))) 877 && to >= XFIXNAT (XCAR (elt)))
878 { 878 {
879 XSETCDR (elt, def); 879 XSETCDR (elt, def);
880 if (from == to) 880 if (from == to)
@@ -1124,7 +1124,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1124 silly_event_symbol_error (c); 1124 silly_event_symbol_error (c);
1125 1125
1126 if (FIXNUMP (c) 1126 if (FIXNUMP (c)
1127 && (XINT (c) & meta_bit) 1127 && (XFIXNUM (c) & meta_bit)
1128 && !metized) 1128 && !metized)
1129 { 1129 {
1130 c = meta_prefix_char; 1130 c = meta_prefix_char;
@@ -1133,7 +1133,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
1133 else 1133 else
1134 { 1134 {
1135 if (FIXNUMP (c)) 1135 if (FIXNUMP (c))
1136 XSETINT (c, XINT (c) & ~meta_bit); 1136 XSETINT (c, XFIXNUM (c) & ~meta_bit);
1137 1137
1138 metized = 0; 1138 metized = 0;
1139 idx++; 1139 idx++;
@@ -1246,8 +1246,8 @@ recognize the default bindings, just as `read-key-sequence' does. */)
1246 c = Fevent_convert_list (c); 1246 c = Fevent_convert_list (c);
1247 1247
1248 /* Turn the 8th bit of string chars into a meta modifier. */ 1248 /* Turn the 8th bit of string chars into a meta modifier. */
1249 if (STRINGP (key) && XINT (c) & 0x80 && !STRING_MULTIBYTE (key)) 1249 if (STRINGP (key) && XFIXNUM (c) & 0x80 && !STRING_MULTIBYTE (key))
1250 XSETINT (c, (XINT (c) | meta_modifier) & ~0x80); 1250 XSETINT (c, (XFIXNUM (c) | meta_modifier) & ~0x80);
1251 1251
1252 /* Allow string since binding for `menu-bar-select-buffer' 1252 /* Allow string since binding for `menu-bar-select-buffer'
1253 includes the buffer name in the key sequence. */ 1253 includes the buffer name in the key sequence. */
@@ -1300,7 +1300,7 @@ silly_event_symbol_error (Lisp_Object c)
1300 int modifiers; 1300 int modifiers;
1301 1301
1302 parsed = parse_modifiers (c); 1302 parsed = parse_modifiers (c);
1303 modifiers = XFASTINT (XCAR (XCDR (parsed))); 1303 modifiers = XFIXNAT (XCAR (XCDR (parsed)));
1304 base = XCAR (parsed); 1304 base = XCAR (parsed);
1305 name = Fsymbol_name (base); 1305 name = Fsymbol_name (base);
1306 /* This alist includes elements such as ("RET" . "\\r"). */ 1306 /* This alist includes elements such as ("RET" . "\\r"). */
@@ -1474,7 +1474,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr)
1474static ptrdiff_t 1474static ptrdiff_t
1475click_position (Lisp_Object position) 1475click_position (Lisp_Object position)
1476{ 1476{
1477 EMACS_INT pos = (FIXNUMP (position) ? XINT (position) 1477 EMACS_INT pos = (FIXNUMP (position) ? XFIXNUM (position)
1478 : MARKERP (position) ? marker_position (position) 1478 : MARKERP (position) ? marker_position (position)
1479 : PT); 1479 : PT);
1480 if (! (BEGV <= pos && pos <= ZV)) 1480 if (! (BEGV <= pos && pos <= ZV))
@@ -1553,12 +1553,12 @@ like in the respective argument of `key-binding'. */)
1553 1553
1554 pos = POSN_BUFFER_POSN (position); 1554 pos = POSN_BUFFER_POSN (position);
1555 if (FIXNUMP (pos) 1555 if (FIXNUMP (pos)
1556 && XINT (pos) >= BEG && XINT (pos) <= Z) 1556 && XFIXNUM (pos) >= BEG && XFIXNUM (pos) <= Z)
1557 { 1557 {
1558 local_map = get_local_map (XINT (pos), 1558 local_map = get_local_map (XFIXNUM (pos),
1559 current_buffer, Qlocal_map); 1559 current_buffer, Qlocal_map);
1560 1560
1561 keymap = get_local_map (XINT (pos), 1561 keymap = get_local_map (XFIXNUM (pos),
1562 current_buffer, Qkeymap); 1562 current_buffer, Qkeymap);
1563 } 1563 }
1564 } 1564 }
@@ -1576,8 +1576,8 @@ like in the respective argument of `key-binding'. */)
1576 pos = XCDR (string); 1576 pos = XCDR (string);
1577 string = XCAR (string); 1577 string = XCAR (string);
1578 if (FIXNUMP (pos) 1578 if (FIXNUMP (pos)
1579 && XINT (pos) >= 0 1579 && XFIXNUM (pos) >= 0
1580 && XINT (pos) < SCHARS (string)) 1580 && XFIXNUM (pos) < SCHARS (string))
1581 { 1581 {
1582 map = Fget_text_property (pos, Qlocal_map, string); 1582 map = Fget_text_property (pos, Qlocal_map, string);
1583 if (!NILP (map)) 1583 if (!NILP (map))
@@ -1854,8 +1854,8 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1854 while (!NILP (tem = Frassq (cmd, maps))) 1854 while (!NILP (tem = Frassq (cmd, maps)))
1855 { 1855 {
1856 Lisp_Object prefix = XCAR (tem); 1856 Lisp_Object prefix = XCAR (tem);
1857 ptrdiff_t lim = XINT (Flength (XCAR (tem))); 1857 ptrdiff_t lim = XFIXNUM (Flength (XCAR (tem)));
1858 if (lim <= XINT (Flength (thisseq))) 1858 if (lim <= XFIXNUM (Flength (thisseq)))
1859 { /* This keymap was already seen with a smaller prefix. */ 1859 { /* This keymap was already seen with a smaller prefix. */
1860 ptrdiff_t i = 0; 1860 ptrdiff_t i = 0;
1861 while (i < lim && EQ (Faref (prefix, make_fixnum (i)), 1861 while (i < lim && EQ (Faref (prefix, make_fixnum (i)),
@@ -1879,10 +1879,10 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
1879 if (is_metized) 1879 if (is_metized)
1880 { 1880 {
1881 int meta_bit = meta_modifier; 1881 int meta_bit = meta_modifier;
1882 Lisp_Object last = make_fixnum (XINT (Flength (thisseq)) - 1); 1882 Lisp_Object last = make_fixnum (XFIXNUM (Flength (thisseq)) - 1);
1883 tem = Fcopy_sequence (thisseq); 1883 tem = Fcopy_sequence (thisseq);
1884 1884
1885 Faset (tem, last, make_fixnum (XINT (key) | meta_bit)); 1885 Faset (tem, last, make_fixnum (XFIXNUM (key) | meta_bit));
1886 1886
1887 /* This new sequence is the same length as 1887 /* This new sequence is the same length as
1888 thisseq, so stick it in the list right 1888 thisseq, so stick it in the list right
@@ -1910,7 +1910,7 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1910 (Lisp_Object keymap, Lisp_Object prefix) 1910 (Lisp_Object keymap, Lisp_Object prefix)
1911{ 1911{
1912 Lisp_Object maps, tail; 1912 Lisp_Object maps, tail;
1913 EMACS_INT prefixlen = XFASTINT (Flength (prefix)); 1913 EMACS_INT prefixlen = XFIXNAT (Flength (prefix));
1914 1914
1915 if (!NILP (prefix)) 1915 if (!NILP (prefix))
1916 { 1916 {
@@ -1969,11 +1969,11 @@ then the value includes only maps for prefixes that start with PREFIX. */)
1969 data.thisseq = Fcar (XCAR (tail)); 1969 data.thisseq = Fcar (XCAR (tail));
1970 data.maps = maps; 1970 data.maps = maps;
1971 data.tail = tail; 1971 data.tail = tail;
1972 last = make_fixnum (XINT (Flength (data.thisseq)) - 1); 1972 last = make_fixnum (XFIXNUM (Flength (data.thisseq)) - 1);
1973 /* Does the current sequence end in the meta-prefix-char? */ 1973 /* Does the current sequence end in the meta-prefix-char? */
1974 data.is_metized = (XINT (last) >= 0 1974 data.is_metized = (XFIXNUM (last) >= 0
1975 /* Don't metize the last char of PREFIX. */ 1975 /* Don't metize the last char of PREFIX. */
1976 && XINT (last) >= prefixlen 1976 && XFIXNUM (last) >= prefixlen
1977 && EQ (Faref (data.thisseq, last), meta_prefix_char)); 1977 && EQ (Faref (data.thisseq, last), meta_prefix_char));
1978 1978
1979 /* Since we can't run lisp code, we can't scan autoloaded maps. */ 1979 /* Since we can't run lisp code, we can't scan autoloaded maps. */
@@ -1997,7 +1997,7 @@ For an approximate inverse of this, see `kbd'. */)
1997 EMACS_INT i; 1997 EMACS_INT i;
1998 ptrdiff_t i_byte; 1998 ptrdiff_t i_byte;
1999 Lisp_Object *args; 1999 Lisp_Object *args;
2000 EMACS_INT size = XINT (Flength (keys)); 2000 EMACS_INT size = XFIXNUM (Flength (keys));
2001 Lisp_Object list; 2001 Lisp_Object list;
2002 Lisp_Object sep = build_string (" "); 2002 Lisp_Object sep = build_string (" ");
2003 Lisp_Object key; 2003 Lisp_Object key;
@@ -2006,7 +2006,7 @@ For an approximate inverse of this, see `kbd'. */)
2006 USE_SAFE_ALLOCA; 2006 USE_SAFE_ALLOCA;
2007 2007
2008 if (!NILP (prefix)) 2008 if (!NILP (prefix))
2009 size += XINT (Flength (prefix)); 2009 size += XFIXNUM (Flength (prefix));
2010 2010
2011 /* This has one extra element at the end that we don't pass to Fconcat. */ 2011 /* This has one extra element at the end that we don't pass to Fconcat. */
2012 EMACS_INT size4; 2012 EMACS_INT size4;
@@ -2043,7 +2043,7 @@ For an approximate inverse of this, see `kbd'. */)
2043 else if (VECTORP (list)) 2043 else if (VECTORP (list))
2044 size = ASIZE (list); 2044 size = ASIZE (list);
2045 else if (CONSP (list)) 2045 else if (CONSP (list))
2046 size = XINT (Flength (list)); 2046 size = XFIXNUM (Flength (list));
2047 else 2047 else
2048 wrong_type_argument (Qarrayp, list); 2048 wrong_type_argument (Qarrayp, list);
2049 2049
@@ -2074,7 +2074,7 @@ For an approximate inverse of this, see `kbd'. */)
2074 { 2074 {
2075 if (!FIXNUMP (key) 2075 if (!FIXNUMP (key)
2076 || EQ (key, meta_prefix_char) 2076 || EQ (key, meta_prefix_char)
2077 || (XINT (key) & meta_modifier)) 2077 || (XFIXNUM (key) & meta_modifier))
2078 { 2078 {
2079 args[len++] = Fsingle_key_description (meta_prefix_char, Qnil); 2079 args[len++] = Fsingle_key_description (meta_prefix_char, Qnil);
2080 args[len++] = sep; 2080 args[len++] = sep;
@@ -2082,7 +2082,7 @@ For an approximate inverse of this, see `kbd'. */)
2082 continue; 2082 continue;
2083 } 2083 }
2084 else 2084 else
2085 XSETINT (key, XINT (key) | meta_modifier); 2085 XSETINT (key, XFIXNUM (key) | meta_modifier);
2086 add_meta = 0; 2086 add_meta = 0;
2087 } 2087 }
2088 else if (EQ (key, meta_prefix_char)) 2088 else if (EQ (key, meta_prefix_char))
@@ -2240,7 +2240,7 @@ around function keys and event symbols. */)
2240 if (FIXNUMP (key)) /* Normal character. */ 2240 if (FIXNUMP (key)) /* Normal character. */
2241 { 2241 {
2242 char tem[KEY_DESCRIPTION_SIZE]; 2242 char tem[KEY_DESCRIPTION_SIZE];
2243 char *p = push_key_description (XINT (key), tem); 2243 char *p = push_key_description (XFIXNUM (key), tem);
2244 *p = 0; 2244 *p = 0;
2245 return make_specified_string (tem, -1, p - tem, 1); 2245 return make_specified_string (tem, -1, p - tem, 1);
2246 } 2246 }
@@ -2306,7 +2306,7 @@ See Info node `(elisp)Describing Characters' for examples. */)
2306 2306
2307 CHECK_CHARACTER (character); 2307 CHECK_CHARACTER (character);
2308 2308
2309 c = XINT (character); 2309 c = XFIXNUM (character);
2310 if (!ASCII_CHAR_P (c)) 2310 if (!ASCII_CHAR_P (c))
2311 { 2311 {
2312 int len = CHAR_STRING (c, (unsigned char *) str); 2312 int len = CHAR_STRING (c, (unsigned char *) str);
@@ -2328,7 +2328,7 @@ static int
2328preferred_sequence_p (Lisp_Object seq) 2328preferred_sequence_p (Lisp_Object seq)
2329{ 2329{
2330 EMACS_INT i; 2330 EMACS_INT i;
2331 EMACS_INT len = XFASTINT (Flength (seq)); 2331 EMACS_INT len = XFIXNAT (Flength (seq));
2332 int result = 1; 2332 int result = 1;
2333 2333
2334 for (i = 0; i < len; i++) 2334 for (i = 0; i < len; i++)
@@ -2342,7 +2342,7 @@ preferred_sequence_p (Lisp_Object seq)
2342 return 0; 2342 return 0;
2343 else 2343 else
2344 { 2344 {
2345 int modifiers = XINT (elt) & (CHAR_MODIFIER_MASK & ~CHAR_META); 2345 int modifiers = XFIXNUM (elt) & (CHAR_MODIFIER_MASK & ~CHAR_META);
2346 if (modifiers == where_is_preferred_modifier) 2346 if (modifiers == where_is_preferred_modifier)
2347 result = 2; 2347 result = 2;
2348 else if (modifiers) 2348 else if (modifiers)
@@ -2463,12 +2463,12 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
2463 2463
2464 this = Fcar (XCAR (maps)); 2464 this = Fcar (XCAR (maps));
2465 map = Fcdr (XCAR (maps)); 2465 map = Fcdr (XCAR (maps));
2466 last = make_fixnum (XINT (Flength (this)) - 1); 2466 last = make_fixnum (XFIXNUM (Flength (this)) - 1);
2467 last_is_meta = (XINT (last) >= 0 2467 last_is_meta = (XFIXNUM (last) >= 0
2468 && EQ (Faref (this, last), meta_prefix_char)); 2468 && EQ (Faref (this, last), meta_prefix_char));
2469 2469
2470 /* if (nomenus && !preferred_sequence_p (this)) */ 2470 /* if (nomenus && !preferred_sequence_p (this)) */
2471 if (nomenus && XINT (last) >= 0 2471 if (nomenus && XFIXNUM (last) >= 0
2472 && SYMBOLP (tem = Faref (this, make_fixnum (0))) 2472 && SYMBOLP (tem = Faref (this, make_fixnum (0)))
2473 && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events))) 2473 && !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events)))
2474 /* If no menu entries should be returned, skip over the 2474 /* If no menu entries should be returned, skip over the
@@ -2720,7 +2720,7 @@ where_is_internal_1 (Lisp_Object key, Lisp_Object binding, Lisp_Object args, voi
2720 if (FIXNUMP (key) && last_is_meta) 2720 if (FIXNUMP (key) && last_is_meta)
2721 { 2721 {
2722 sequence = Fcopy_sequence (this); 2722 sequence = Fcopy_sequence (this);
2723 Faset (sequence, last, make_fixnum (XINT (key) | meta_modifier)); 2723 Faset (sequence, last, make_fixnum (XFIXNUM (key) | meta_modifier));
2724 } 2724 }
2725 else 2725 else
2726 { 2726 {
@@ -3126,8 +3126,8 @@ describe_map_compare (const void *aa, const void *bb)
3126{ 3126{
3127 const struct describe_map_elt *a = aa, *b = bb; 3127 const struct describe_map_elt *a = aa, *b = bb;
3128 if (FIXNUMP (a->event) && FIXNUMP (b->event)) 3128 if (FIXNUMP (a->event) && FIXNUMP (b->event))
3129 return ((XINT (a->event) > XINT (b->event)) 3129 return ((XFIXNUM (a->event) > XFIXNUM (b->event))
3130 - (XINT (a->event) < XINT (b->event))); 3130 - (XFIXNUM (a->event) < XFIXNUM (b->event)));
3131 if (!FIXNUMP (a->event) && FIXNUMP (b->event)) 3131 if (!FIXNUMP (a->event) && FIXNUMP (b->event))
3132 return 1; 3132 return 1;
3133 if (FIXNUMP (a->event) && !FIXNUMP (b->event)) 3133 if (FIXNUMP (a->event) && !FIXNUMP (b->event))
@@ -3285,7 +3285,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
3285 if (FIXNUMP (vect[i].event)) 3285 if (FIXNUMP (vect[i].event))
3286 { 3286 {
3287 while (i + 1 < slots_used 3287 while (i + 1 < slots_used
3288 && EQ (vect[i+1].event, make_fixnum (XINT (vect[i].event) + 1)) 3288 && EQ (vect[i+1].event, make_fixnum (XFIXNUM (vect[i].event) + 1))
3289 && !NILP (Fequal (vect[i + 1].definition, definition)) 3289 && !NILP (Fequal (vect[i + 1].definition, definition))
3290 && vect[i].shadowed == vect[i + 1].shadowed) 3290 && vect[i].shadowed == vect[i + 1].shadowed)
3291 i++; 3291 i++;
@@ -3407,7 +3407,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
3407 if (!keymap_p) 3407 if (!keymap_p)
3408 { 3408 {
3409 /* Call Fkey_description first, to avoid GC bug for the other string. */ 3409 /* Call Fkey_description first, to avoid GC bug for the other string. */
3410 if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0) 3410 if (!NILP (prefix) && XFIXNAT (Flength (prefix)) > 0)
3411 { 3411 {
3412 Lisp_Object tem = Fkey_description (prefix, Qnil); 3412 Lisp_Object tem = Fkey_description (prefix, Qnil);
3413 AUTO_STRING (space, " "); 3413 AUTO_STRING (space, " ");
diff --git a/src/kqueue.c b/src/kqueue.c
index b45c316b93b..bc01ab5062c 100644
--- a/src/kqueue.c
+++ b/src/kqueue.c
@@ -234,7 +234,7 @@ kqueue_compare_dir_list (Lisp_Object watch_object)
234 234
235 /* Check size of that file. */ 235 /* Check size of that file. */
236 Lisp_Object size = Fnth (make_fixnum (4), entry); 236 Lisp_Object size = Fnth (make_fixnum (4), entry);
237 if (FLOATP (size) || (XINT (size) > 0)) 237 if (FLOATP (size) || (XFIXNUM (size) > 0))
238 kqueue_generate_event 238 kqueue_generate_event
239 (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil); 239 (watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil);
240 240
@@ -395,7 +395,7 @@ only when the upper directory of the renamed file is watched. */)
395 maxfd = 256; 395 maxfd = 256;
396 396
397 /* We assume 50 file descriptors are sufficient for the rest of Emacs. */ 397 /* We assume 50 file descriptors are sufficient for the rest of Emacs. */
398 if ((maxfd - 50) < XINT (Flength (watch_list))) 398 if ((maxfd - 50) < XFIXNUM (Flength (watch_list)))
399 xsignal2 399 xsignal2
400 (Qfile_notify_error, 400 (Qfile_notify_error,
401 build_string ("File watching not possible, no file descriptor left"), 401 build_string ("File watching not possible, no file descriptor left"),
@@ -474,7 +474,7 @@ WATCH-DESCRIPTOR should be an object returned by `kqueue-add-watch'. */)
474 watch_descriptor); 474 watch_descriptor);
475 475
476 eassert (FIXNUMP (watch_descriptor)); 476 eassert (FIXNUMP (watch_descriptor));
477 int fd = XINT (watch_descriptor); 477 int fd = XFIXNUM (watch_descriptor);
478 if ( fd >= 0) 478 if ( fd >= 0)
479 emacs_close (fd); 479 emacs_close (fd);
480 480
diff --git a/src/lcms.c b/src/lcms.c
index 9df85c2c180..a3a98223060 100644
--- a/src/lcms.c
+++ b/src/lcms.c
@@ -254,7 +254,7 @@ parse_viewing_conditions (Lisp_Object view, const cmsCIEXYZ *wp,
254 if (CONSP (view) && FIXNATP (XCAR (view))) \ 254 if (CONSP (view) && FIXNATP (XCAR (view))) \
255 { \ 255 { \
256 CHECK_RANGED_INTEGER (XCAR (view), 1, 4); \ 256 CHECK_RANGED_INTEGER (XCAR (view), 1, 4); \
257 vc->field = XINT (XCAR (view)); \ 257 vc->field = XFIXNUM (XCAR (view)); \
258 view = XCDR (view); \ 258 view = XCDR (view); \
259 } \ 259 } \
260 else \ 260 else \
diff --git a/src/lisp.h b/src/lisp.h
index b404f9d89aa..9047d217249 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -382,15 +382,15 @@ typedef EMACS_INT Lisp_Word;
382#define lisp_h_XCDR(c) XCONS (c)->u.s.u.cdr 382#define lisp_h_XCDR(c) XCONS (c)->u.s.u.cdr
383#define lisp_h_XCONS(a) \ 383#define lisp_h_XCONS(a) \
384 (eassert (CONSP (a)), XUNTAG (a, Lisp_Cons, struct Lisp_Cons)) 384 (eassert (CONSP (a)), XUNTAG (a, Lisp_Cons, struct Lisp_Cons))
385#define lisp_h_XHASH(a) XUINT (a) 385#define lisp_h_XHASH(a) XUFIXNUM (a)
386#ifndef GC_CHECK_CONS_LIST 386#ifndef GC_CHECK_CONS_LIST
387# define lisp_h_check_cons_list() ((void) 0) 387# define lisp_h_check_cons_list() ((void) 0)
388#endif 388#endif
389#if USE_LSB_TAG 389#if USE_LSB_TAG
390# define lisp_h_make_fixnum(n) \ 390# define lisp_h_make_fixnum(n) \
391 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0)) 391 XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
392# define lisp_h_XFASTINT(a) XINT (a) 392# define lisp_h_XFIXNAT(a) XFIXNUM (a)
393# define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS) 393# define lisp_h_XFIXNUM(a) (XLI (a) >> INTTYPEBITS)
394# ifdef __CHKP__ 394# ifdef __CHKP__
395# define lisp_h_XSYMBOL(a) \ 395# define lisp_h_XSYMBOL(a) \
396 (eassert (SYMBOLP (a)), \ 396 (eassert (SYMBOLP (a)), \
@@ -448,8 +448,8 @@ typedef EMACS_INT Lisp_Word;
448# endif 448# endif
449# if USE_LSB_TAG 449# if USE_LSB_TAG
450# define make_fixnum(n) lisp_h_make_fixnum (n) 450# define make_fixnum(n) lisp_h_make_fixnum (n)
451# define XFASTINT(a) lisp_h_XFASTINT (a) 451# define XFIXNAT(a) lisp_h_XFIXNAT (a)
452# define XINT(a) lisp_h_XINT (a) 452# define XFIXNUM(a) lisp_h_XFIXNUM (a)
453# define XSYMBOL(a) lisp_h_XSYMBOL (a) 453# define XSYMBOL(a) lisp_h_XSYMBOL (a)
454# define XTYPE(a) lisp_h_XTYPE (a) 454# define XTYPE(a) lisp_h_XTYPE (a)
455# endif 455# endif
@@ -486,7 +486,7 @@ enum Lisp_Type
486 whose first member indicates the subtype. */ 486 whose first member indicates the subtype. */
487 Lisp_Misc = 1, 487 Lisp_Misc = 1,
488 488
489 /* Integer. XINT (obj) is the integer value. */ 489 /* Integer. XFIXNUM (obj) is the integer value. */
490 Lisp_Int0 = 2, 490 Lisp_Int0 = 2,
491 Lisp_Int1 = USE_LSB_TAG ? 6 : 3, 491 Lisp_Int1 = USE_LSB_TAG ? 6 : 3,
492 492
@@ -1038,15 +1038,15 @@ INLINE Lisp_Object
1038} 1038}
1039 1039
1040INLINE EMACS_INT 1040INLINE EMACS_INT
1041(XINT) (Lisp_Object a) 1041(XFIXNUM) (Lisp_Object a)
1042{ 1042{
1043 return lisp_h_XINT (a); 1043 return lisp_h_XFIXNUM (a);
1044} 1044}
1045 1045
1046INLINE EMACS_INT 1046INLINE EMACS_INT
1047(XFASTINT) (Lisp_Object a) 1047(XFIXNAT) (Lisp_Object a)
1048{ 1048{
1049 EMACS_INT n = lisp_h_XFASTINT (a); 1049 EMACS_INT n = lisp_h_XFIXNAT (a);
1050 eassume (0 <= n); 1050 eassume (0 <= n);
1051 return n; 1051 return n;
1052} 1052}
@@ -1079,7 +1079,7 @@ make_fixnum (EMACS_INT n)
1079 1079
1080/* Extract A's value as a signed integer. */ 1080/* Extract A's value as a signed integer. */
1081INLINE EMACS_INT 1081INLINE EMACS_INT
1082XINT (Lisp_Object a) 1082XFIXNUM (Lisp_Object a)
1083{ 1083{
1084 EMACS_INT i = XLI (a); 1084 EMACS_INT i = XLI (a);
1085 if (! USE_LSB_TAG) 1085 if (! USE_LSB_TAG)
@@ -1090,14 +1090,14 @@ XINT (Lisp_Object a)
1090 return i >> INTTYPEBITS; 1090 return i >> INTTYPEBITS;
1091} 1091}
1092 1092
1093/* Like XINT (A), but may be faster. A must be nonnegative. 1093/* Like XFIXNUM (A), but may be faster. A must be nonnegative.
1094 If ! USE_LSB_TAG, this takes advantage of the fact that Lisp 1094 If ! USE_LSB_TAG, this takes advantage of the fact that Lisp
1095 integers have zero-bits in their tags. */ 1095 integers have zero-bits in their tags. */
1096INLINE EMACS_INT 1096INLINE EMACS_INT
1097XFASTINT (Lisp_Object a) 1097XFIXNAT (Lisp_Object a)
1098{ 1098{
1099 EMACS_INT int0 = Lisp_Int0; 1099 EMACS_INT int0 = Lisp_Int0;
1100 EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a) - (int0 << VALBITS); 1100 EMACS_INT n = USE_LSB_TAG ? XFIXNUM (a) : XLI (a) - (int0 << VALBITS);
1101 eassume (0 <= n); 1101 eassume (0 <= n);
1102 return n; 1102 return n;
1103} 1103}
@@ -1106,14 +1106,14 @@ XFASTINT (Lisp_Object a)
1106 1106
1107/* Extract A's value as an unsigned integer. */ 1107/* Extract A's value as an unsigned integer. */
1108INLINE EMACS_UINT 1108INLINE EMACS_UINT
1109XUINT (Lisp_Object a) 1109XUFIXNUM (Lisp_Object a)
1110{ 1110{
1111 EMACS_UINT i = XLI (a); 1111 EMACS_UINT i = XLI (a);
1112 return USE_LSB_TAG ? i >> INTTYPEBITS : i & INTMASK; 1112 return USE_LSB_TAG ? i >> INTTYPEBITS : i & INTMASK;
1113} 1113}
1114 1114
1115/* Return A's (Lisp-integer sized) hash. Happens to be like XUINT 1115/* Return A's (Lisp-integer sized) hash. Happens to be like XUFIXNUM
1116 right now, but XUINT should only be applied to objects we know are 1116 right now, but XUFIXNUM should only be applied to objects we know are
1117 integers. */ 1117 integers. */
1118 1118
1119INLINE EMACS_INT 1119INLINE EMACS_INT
@@ -1218,7 +1218,7 @@ INLINE bool
1218 bits set, which makes this conversion inherently unportable. */ 1218 bits set, which makes this conversion inherently unportable. */
1219 1219
1220INLINE void * 1220INLINE void *
1221XINTPTR (Lisp_Object a) 1221XFIXNUMPTR (Lisp_Object a)
1222{ 1222{
1223 return XUNTAG (a, Lisp_Int0, char); 1223 return XUNTAG (a, Lisp_Int0, char);
1224} 1224}
@@ -1227,7 +1227,7 @@ INLINE Lisp_Object
1227make_pointer_integer (void *p) 1227make_pointer_integer (void *p)
1228{ 1228{
1229 Lisp_Object a = TAG_PTR (Lisp_Int0, p); 1229 Lisp_Object a = TAG_PTR (Lisp_Int0, p);
1230 eassert (FIXNUMP (a) && XINTPTR (a) == p); 1230 eassert (FIXNUMP (a) && XFIXNUMPTR (a) == p);
1231 return a; 1231 return a;
1232} 1232}
1233 1233
@@ -2378,10 +2378,10 @@ extern Lisp_Object make_misc_ptr (void *);
2378 2378
2379/* A mint_ptr object OBJ represents a C-language pointer P efficiently. 2379/* A mint_ptr object OBJ represents a C-language pointer P efficiently.
2380 Preferably (and typically), OBJ is a Lisp integer I such that 2380 Preferably (and typically), OBJ is a Lisp integer I such that
2381 XINTPTR (I) == P, as this represents P within a single Lisp value 2381 XFIXNUMPTR (I) == P, as this represents P within a single Lisp value
2382 without requiring any auxiliary memory. However, if P would be 2382 without requiring any auxiliary memory. However, if P would be
2383 damaged by being tagged as an integer and then untagged via 2383 damaged by being tagged as an integer and then untagged via
2384 XINTPTR, then OBJ is a Lisp_Misc_Ptr with pointer component P. 2384 XFIXNUMPTR, then OBJ is a Lisp_Misc_Ptr with pointer component P.
2385 2385
2386 mint_ptr objects are efficiency hacks intended for C code. 2386 mint_ptr objects are efficiency hacks intended for C code.
2387 Although xmint_ptr can be given any mint_ptr generated by non-buggy 2387 Although xmint_ptr can be given any mint_ptr generated by non-buggy
@@ -2395,7 +2395,7 @@ INLINE Lisp_Object
2395make_mint_ptr (void *a) 2395make_mint_ptr (void *a)
2396{ 2396{
2397 Lisp_Object val = TAG_PTR (Lisp_Int0, a); 2397 Lisp_Object val = TAG_PTR (Lisp_Int0, a);
2398 return FIXNUMP (val) && XINTPTR (val) == a ? val : make_misc_ptr (a); 2398 return FIXNUMP (val) && XFIXNUMPTR (val) == a ? val : make_misc_ptr (a);
2399} 2399}
2400 2400
2401INLINE bool 2401INLINE bool
@@ -2409,7 +2409,7 @@ xmint_pointer (Lisp_Object a)
2409{ 2409{
2410 eassert (mint_ptrp (a)); 2410 eassert (mint_ptrp (a));
2411 if (FIXNUMP (a)) 2411 if (FIXNUMP (a))
2412 return XINTPTR (a); 2412 return XFIXNUMPTR (a);
2413 return XUNTAG (a, Lisp_Misc, struct Lisp_Misc_Ptr)->pointer; 2413 return XUNTAG (a, Lisp_Misc, struct Lisp_Misc_Ptr)->pointer;
2414} 2414}
2415 2415
@@ -2766,14 +2766,14 @@ FIXED_OR_FLOATP (Lisp_Object x)
2766INLINE bool 2766INLINE bool
2767FIXNATP (Lisp_Object x) 2767FIXNATP (Lisp_Object x)
2768{ 2768{
2769 return FIXNUMP (x) && 0 <= XINT (x); 2769 return FIXNUMP (x) && 0 <= XFIXNUM (x);
2770} 2770}
2771INLINE bool 2771INLINE bool
2772NATNUMP (Lisp_Object x) 2772NATNUMP (Lisp_Object x)
2773{ 2773{
2774 if (BIGNUMP (x)) 2774 if (BIGNUMP (x))
2775 return mpz_cmp_si (XBIGNUM (x)->value, 0) >= 0; 2775 return mpz_cmp_si (XBIGNUM (x)->value, 0) >= 0;
2776 return FIXNUMP (x) && 0 <= XINT (x); 2776 return FIXNUMP (x) && 0 <= XFIXNUM (x);
2777} 2777}
2778INLINE bool 2778INLINE bool
2779NUMBERP (Lisp_Object x) 2779NUMBERP (Lisp_Object x)
@@ -2784,13 +2784,13 @@ NUMBERP (Lisp_Object x)
2784INLINE bool 2784INLINE bool
2785RANGED_FIXNUMP (intmax_t lo, Lisp_Object x, intmax_t hi) 2785RANGED_FIXNUMP (intmax_t lo, Lisp_Object x, intmax_t hi)
2786{ 2786{
2787 return FIXNUMP (x) && lo <= XINT (x) && XINT (x) <= hi; 2787 return FIXNUMP (x) && lo <= XFIXNUM (x) && XFIXNUM (x) <= hi;
2788} 2788}
2789 2789
2790#define TYPE_RANGED_FIXNUMP(type, x) \ 2790#define TYPE_RANGED_FIXNUMP(type, x) \
2791 (FIXNUMP (x) \ 2791 (FIXNUMP (x) \
2792 && (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XINT (x) : 0 <= XINT (x)) \ 2792 && (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XFIXNUM (x) : 0 <= XFIXNUM (x)) \
2793 && XINT (x) <= TYPE_MAXIMUM (type)) 2793 && XFIXNUM (x) <= TYPE_MAXIMUM (type))
2794 2794
2795INLINE bool 2795INLINE bool
2796AUTOLOADP (Lisp_Object x) 2796AUTOLOADP (Lisp_Object x)
@@ -2892,7 +2892,7 @@ CHECK_FIXNAT (Lisp_Object x)
2892#define CHECK_RANGED_INTEGER(x, lo, hi) \ 2892#define CHECK_RANGED_INTEGER(x, lo, hi) \
2893 do { \ 2893 do { \
2894 CHECK_FIXNUM (x); \ 2894 CHECK_FIXNUM (x); \
2895 if (! ((lo) <= XINT (x) && XINT (x) <= (hi))) \ 2895 if (! ((lo) <= XFIXNUM (x) && XFIXNUM (x) <= (hi))) \
2896 args_out_of_range_3 \ 2896 args_out_of_range_3 \
2897 (x, \ 2897 (x, \
2898 make_fixnum ((lo) < 0 && (lo) < MOST_NEGATIVE_FIXNUM \ 2898 make_fixnum ((lo) < 0 && (lo) < MOST_NEGATIVE_FIXNUM \
@@ -2921,7 +2921,7 @@ XFLOATINT (Lisp_Object n)
2921{ 2921{
2922 if (BIGNUMP (n)) 2922 if (BIGNUMP (n))
2923 return mpz_get_d (XBIGNUM (n)->value); 2923 return mpz_get_d (XBIGNUM (n)->value);
2924 return FLOATP (n) ? XFLOAT_DATA (n) : XINT (n); 2924 return FLOATP (n) ? XFLOAT_DATA (n) : XFIXNUM (n);
2925} 2925}
2926 2926
2927INLINE void 2927INLINE void
diff --git a/src/lread.c b/src/lread.c
index ff86c96c9b5..bcb695c3dae 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -331,7 +331,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
331 331
332 if (NILP (tem)) 332 if (NILP (tem))
333 return -1; 333 return -1;
334 return XINT (tem); 334 return XFIXNUM (tem);
335 335
336 read_multibyte: 336 read_multibyte:
337 if (unread_char >= 0) 337 if (unread_char >= 0)
@@ -673,7 +673,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required,
673 do 673 do
674 val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0, 674 val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
675 FIXED_OR_FLOATP (seconds) ? &end_time : NULL); 675 FIXED_OR_FLOATP (seconds) ? &end_time : NULL);
676 while (FIXNUMP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */ 676 while (FIXNUMP (val) && XFIXNUM (val) == -2); /* wrong_kboard_jmpbuf */
677 677
678 if (BUFFERP (val)) 678 if (BUFFERP (val))
679 goto retry; 679 goto retry;
@@ -704,7 +704,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required,
704 /* Merge this symbol's modifier bits 704 /* Merge this symbol's modifier bits
705 with the ASCII equivalent of its basic code. */ 705 with the ASCII equivalent of its basic code. */
706 if (!NILP (tem1)) 706 if (!NILP (tem1))
707 XSETFASTINT (val, XINT (tem1) | XINT (Fcar (Fcdr (tem)))); 707 XSETFASTINT (val, XFIXNUM (tem1) | XFIXNUM (Fcar (Fcdr (tem))));
708 } 708 }
709 } 709 }
710 710
@@ -766,7 +766,7 @@ floating-point value. */)
766 val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds); 766 val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
767 767
768 return (NILP (val) ? Qnil 768 return (NILP (val) ? Qnil
769 : make_fixnum (char_resolve_modifier_mask (XINT (val)))); 769 : make_fixnum (char_resolve_modifier_mask (XFIXNUM (val))));
770} 770}
771 771
772DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0, 772DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0,
@@ -810,7 +810,7 @@ floating-point value. */)
810 val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds); 810 val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
811 811
812 return (NILP (val) ? Qnil 812 return (NILP (val) ? Qnil
813 : make_fixnum (char_resolve_modifier_mask (XINT (val)))); 813 : make_fixnum (char_resolve_modifier_mask (XFIXNUM (val))));
814} 814}
815 815
816DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0, 816DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0,
@@ -1702,9 +1702,9 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object suffixes,
1702 if (FIXNATP (predicate)) 1702 if (FIXNATP (predicate))
1703 { 1703 {
1704 fd = -1; 1704 fd = -1;
1705 if (INT_MAX < XFASTINT (predicate)) 1705 if (INT_MAX < XFIXNAT (predicate))
1706 last_errno = EINVAL; 1706 last_errno = EINVAL;
1707 else if (faccessat (AT_FDCWD, pfn, XFASTINT (predicate), 1707 else if (faccessat (AT_FDCWD, pfn, XFIXNAT (predicate),
1708 AT_EACCESS) 1708 AT_EACCESS)
1709 == 0) 1709 == 0)
1710 { 1710 {
@@ -2348,14 +2348,14 @@ character_name_to_code (char const *name, ptrdiff_t name_len)
2348 : call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt)); 2348 : call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt));
2349 2349
2350 if (! RANGED_FIXNUMP (0, code, MAX_UNICODE_CHAR) 2350 if (! RANGED_FIXNUMP (0, code, MAX_UNICODE_CHAR)
2351 || char_surrogate_p (XINT (code))) 2351 || char_surrogate_p (XFIXNUM (code)))
2352 { 2352 {
2353 AUTO_STRING (format, "\\N{%s}"); 2353 AUTO_STRING (format, "\\N{%s}");
2354 AUTO_STRING_WITH_LEN (namestr, name, name_len); 2354 AUTO_STRING_WITH_LEN (namestr, name, name_len);
2355 xsignal1 (Qinvalid_read_syntax, CALLN (Fformat, format, namestr)); 2355 xsignal1 (Qinvalid_read_syntax, CALLN (Fformat, format, namestr));
2356 } 2356 }
2357 2357
2358 return XINT (code); 2358 return XFIXNUM (code);
2359} 2359}
2360 2360
2361/* Bound on the length of a Unicode character name. As of 2361/* Bound on the length of a Unicode character name. As of
@@ -2779,7 +2779,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2779 2779
2780 if (!EQ (head, Qhash_table)) 2780 if (!EQ (head, Qhash_table))
2781 { 2781 {
2782 ptrdiff_t size = XINT (Flength (tmp)); 2782 ptrdiff_t size = XFIXNUM (Flength (tmp));
2783 Lisp_Object record = Fmake_record (CAR_SAFE (tmp), 2783 Lisp_Object record = Fmake_record (CAR_SAFE (tmp),
2784 make_fixnum (size - 1), 2784 make_fixnum (size - 1),
2785 Qnil); 2785 Qnil);
@@ -2866,7 +2866,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2866 /* Sub char-table can't be read as a regular 2866 /* Sub char-table can't be read as a regular
2867 vector because of a two C integer fields. */ 2867 vector because of a two C integer fields. */
2868 Lisp_Object tbl, tmp = read_list (1, readcharfun); 2868 Lisp_Object tbl, tmp = read_list (1, readcharfun);
2869 ptrdiff_t size = XINT (Flength (tmp)); 2869 ptrdiff_t size = XFIXNUM (Flength (tmp));
2870 int i, depth, min_char; 2870 int i, depth, min_char;
2871 struct Lisp_Cons *cell; 2871 struct Lisp_Cons *cell;
2872 2872
@@ -2875,7 +2875,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2875 2875
2876 if (! RANGED_FIXNUMP (1, XCAR (tmp), 3)) 2876 if (! RANGED_FIXNUMP (1, XCAR (tmp), 3))
2877 error ("Invalid depth in sub char-table"); 2877 error ("Invalid depth in sub char-table");
2878 depth = XINT (XCAR (tmp)); 2878 depth = XFIXNUM (XCAR (tmp));
2879 if (chartab_size[depth] != size - 2) 2879 if (chartab_size[depth] != size - 2)
2880 error ("Invalid size in sub char-table"); 2880 error ("Invalid size in sub char-table");
2881 cell = XCONS (tmp), tmp = XCDR (tmp), size--; 2881 cell = XCONS (tmp), tmp = XCDR (tmp), size--;
@@ -2883,7 +2883,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2883 2883
2884 if (! RANGED_FIXNUMP (0, XCAR (tmp), MAX_CHAR)) 2884 if (! RANGED_FIXNUMP (0, XCAR (tmp), MAX_CHAR))
2885 error ("Invalid minimum character in sub-char-table"); 2885 error ("Invalid minimum character in sub-char-table");
2886 min_char = XINT (XCAR (tmp)); 2886 min_char = XFIXNUM (XCAR (tmp));
2887 cell = XCONS (tmp), tmp = XCDR (tmp), size--; 2887 cell = XCONS (tmp), tmp = XCDR (tmp), size--;
2888 free_cons (cell); 2888 free_cons (cell);
2889 2889
@@ -2908,7 +2908,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2908 if (c == '"') 2908 if (c == '"')
2909 { 2909 {
2910 Lisp_Object tmp, val; 2910 Lisp_Object tmp, val;
2911 EMACS_INT size_in_chars = bool_vector_bytes (XFASTINT (length)); 2911 EMACS_INT size_in_chars = bool_vector_bytes (XFIXNAT (length));
2912 unsigned char *data; 2912 unsigned char *data;
2913 2913
2914 UNREAD (c); 2914 UNREAD (c);
@@ -2919,17 +2919,17 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
2919 when the number of bits was a multiple of 8. 2919 when the number of bits was a multiple of 8.
2920 Accept such input in case it came from an old 2920 Accept such input in case it came from an old
2921 version. */ 2921 version. */
2922 && ! (XFASTINT (length) 2922 && ! (XFIXNAT (length)
2923 == (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR))) 2923 == (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR)))
2924 invalid_syntax ("#&..."); 2924 invalid_syntax ("#&...");
2925 2925
2926 val = make_uninit_bool_vector (XFASTINT (length)); 2926 val = make_uninit_bool_vector (XFIXNAT (length));
2927 data = bool_vector_uchar_data (val); 2927 data = bool_vector_uchar_data (val);
2928 memcpy (data, SDATA (tmp), size_in_chars); 2928 memcpy (data, SDATA (tmp), size_in_chars);
2929 /* Clear the extraneous bits in the last byte. */ 2929 /* Clear the extraneous bits in the last byte. */
2930 if (XINT (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR) 2930 if (XFIXNUM (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
2931 data[size_in_chars - 1] 2931 data[size_in_chars - 1]
2932 &= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1; 2932 &= (1 << (XFIXNUM (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
2933 return val; 2933 return val;
2934 } 2934 }
2935 invalid_syntax ("#&..."); 2935 invalid_syntax ("#&...");
@@ -3832,11 +3832,11 @@ read_vector (Lisp_Object readcharfun, bool bytecodeflag)
3832 3832
3833 tem = read_list (1, readcharfun); 3833 tem = read_list (1, readcharfun);
3834 len = Flength (tem); 3834 len = Flength (tem);
3835 if (bytecodeflag && XFASTINT (len) <= COMPILED_STACK_DEPTH) 3835 if (bytecodeflag && XFIXNAT (len) <= COMPILED_STACK_DEPTH)
3836 error ("Invalid byte code"); 3836 error ("Invalid byte code");
3837 vector = Fmake_vector (len, Qnil); 3837 vector = Fmake_vector (len, Qnil);
3838 3838
3839 size = XFASTINT (len); 3839 size = XFIXNAT (len);
3840 ptr = XVECTOR (vector)->contents; 3840 ptr = XVECTOR (vector)->contents;
3841 for (i = 0; i < size; i++) 3841 for (i = 0; i < size; i++)
3842 { 3842 {
@@ -3990,7 +3990,7 @@ read_list (bool flag, Lisp_Object readcharfun)
3990 multibyte. */ 3990 multibyte. */
3991 3991
3992 /* Position is negative for user variables. */ 3992 /* Position is negative for user variables. */
3993 EMACS_INT pos = eabs (XINT (XCDR (val))); 3993 EMACS_INT pos = eabs (XFIXNUM (XCDR (val)));
3994 if (pos >= saved_doc_string_position 3994 if (pos >= saved_doc_string_position
3995 && pos < (saved_doc_string_position 3995 && pos < (saved_doc_string_position
3996 + saved_doc_string_length)) 3996 + saved_doc_string_length))
@@ -4095,7 +4095,7 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
4095 SET_SYMBOL_VAL (XSYMBOL (sym), sym); 4095 SET_SYMBOL_VAL (XSYMBOL (sym), sym);
4096 } 4096 }
4097 4097
4098 ptr = aref_addr (obarray, XINT (index)); 4098 ptr = aref_addr (obarray, XFIXNUM (index));
4099 set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL); 4099 set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL);
4100 *ptr = sym; 4100 *ptr = sym;
4101 return sym; 4101 return sym;
diff --git a/src/macros.c b/src/macros.c
index be841069927..0677021bfd2 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -98,8 +98,8 @@ macro before appending to it. */)
98 { 98 {
99 Lisp_Object c; 99 Lisp_Object c;
100 c = Faref (KVAR (current_kboard, Vlast_kbd_macro), make_fixnum (i)); 100 c = Faref (KVAR (current_kboard, Vlast_kbd_macro), make_fixnum (i));
101 if (cvt && FIXNATP (c) && (XFASTINT (c) & 0x80)) 101 if (cvt && FIXNATP (c) && (XFIXNAT (c) & 0x80))
102 XSETFASTINT (c, CHAR_META | (XFASTINT (c) & ~0x80)); 102 XSETFASTINT (c, CHAR_META | (XFIXNAT (c) & ~0x80));
103 current_kboard->kbd_macro_buffer[i] = c; 103 current_kboard->kbd_macro_buffer[i] = c;
104 } 104 }
105 105
@@ -162,11 +162,11 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
162 message1 ("Keyboard macro defined"); 162 message1 ("Keyboard macro defined");
163 } 163 }
164 164
165 if (XFASTINT (repeat) == 0) 165 if (XFIXNAT (repeat) == 0)
166 Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc); 166 Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc);
167 else if (XINT (repeat) > 1) 167 else if (XFIXNUM (repeat) > 1)
168 { 168 {
169 XSETINT (repeat, XINT (repeat) - 1); 169 XSETINT (repeat, XFIXNUM (repeat) - 1);
170 Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), 170 Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro),
171 repeat, loopfunc); 171 repeat, loopfunc);
172 } 172 }
@@ -267,7 +267,7 @@ pop_kbd_macro (Lisp_Object info)
267 Lisp_Object tem; 267 Lisp_Object tem;
268 Vexecuting_kbd_macro = XCAR (info); 268 Vexecuting_kbd_macro = XCAR (info);
269 tem = XCDR (info); 269 tem = XCDR (info);
270 executing_kbd_macro_index = XINT (XCAR (tem)); 270 executing_kbd_macro_index = XFIXNUM (XCAR (tem));
271 Vreal_this_command = XCDR (tem); 271 Vreal_this_command = XCDR (tem);
272 run_hook (Qkbd_macro_termination_hook); 272 run_hook (Qkbd_macro_termination_hook);
273} 273}
@@ -293,7 +293,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
293 if (!NILP (count)) 293 if (!NILP (count))
294 { 294 {
295 count = Fprefix_numeric_value (count); 295 count = Fprefix_numeric_value (count);
296 repeat = XINT (count); 296 repeat = XFIXNUM (count);
297 } 297 }
298 298
299 final = indirect_function (macro); 299 final = indirect_function (macro);
diff --git a/src/marker.c b/src/marker.c
index ab1eb9f5bfe..b9ea5c59824 100644
--- a/src/marker.c
+++ b/src/marker.c
@@ -525,7 +525,7 @@ set_marker_internal (Lisp_Object marker, Lisp_Object position,
525 don't want to call buf_charpos_to_bytepos if POSITION 525 don't want to call buf_charpos_to_bytepos if POSITION
526 is a marker and so we know the bytepos already. */ 526 is a marker and so we know the bytepos already. */
527 if (FIXNUMP (position)) 527 if (FIXNUMP (position))
528 charpos = XINT (position), bytepos = -1; 528 charpos = XFIXNUM (position), bytepos = -1;
529 else if (MARKERP (position)) 529 else if (MARKERP (position))
530 { 530 {
531 charpos = XMARKER (position)->charpos; 531 charpos = XMARKER (position)->charpos;
@@ -752,7 +752,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
752 register struct Lisp_Marker *tail; 752 register struct Lisp_Marker *tail;
753 register ptrdiff_t charpos; 753 register ptrdiff_t charpos;
754 754
755 charpos = clip_to_bounds (BEG, XINT (position), Z); 755 charpos = clip_to_bounds (BEG, XFIXNUM (position), Z);
756 756
757 for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next) 757 for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
758 if (tail->charpos == charpos) 758 if (tail->charpos == charpos)
diff --git a/src/menu.c b/src/menu.c
index 1d0ba3c258f..eac82017d3e 100644
--- a/src/menu.c
+++ b/src/menu.c
@@ -134,11 +134,11 @@ restore_menu_items (Lisp_Object saved)
134 menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil); 134 menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil);
135 menu_items_allocated = (VECTORP (menu_items) ? ASIZE (menu_items) : 0); 135 menu_items_allocated = (VECTORP (menu_items) ? ASIZE (menu_items) : 0);
136 saved = XCDR (saved); 136 saved = XCDR (saved);
137 menu_items_used = XINT (XCAR (saved)); 137 menu_items_used = XFIXNUM (XCAR (saved));
138 saved = XCDR (saved); 138 saved = XCDR (saved);
139 menu_items_n_panes = XINT (XCAR (saved)); 139 menu_items_n_panes = XFIXNUM (XCAR (saved));
140 saved = XCDR (saved); 140 saved = XCDR (saved);
141 menu_items_submenu_depth = XINT (XCAR (saved)); 141 menu_items_submenu_depth = XFIXNUM (XCAR (saved));
142} 142}
143 143
144/* Push the whole state of menu_items processing onto the specpdl. 144/* Push the whole state of menu_items processing onto the specpdl.
@@ -532,7 +532,7 @@ parse_single_submenu (Lisp_Object item_key, Lisp_Object item_name,
532 USE_SAFE_ALLOCA; 532 USE_SAFE_ALLOCA;
533 533
534 length = Flength (maps); 534 length = Flength (maps);
535 len = XINT (length); 535 len = XFIXNUM (length);
536 536
537 /* Convert the list MAPS into a vector MAPVEC. */ 537 /* Convert the list MAPS into a vector MAPVEC. */
538 SAFE_ALLOCA_LISP (mapvec, len); 538 SAFE_ALLOCA_LISP (mapvec, len);
@@ -1079,7 +1079,7 @@ into menu items. */)
1079 if (!FRAME_LIVE_P (f)) 1079 if (!FRAME_LIVE_P (f))
1080 return Qnil; 1080 return Qnil;
1081 1081
1082 pixel_to_glyph_coords (f, XINT (x), XINT (y), &col, &row, NULL, 1); 1082 pixel_to_glyph_coords (f, XFIXNUM (x), XFIXNUM (y), &col, &row, NULL, 1);
1083 if (0 <= row && row < FRAME_MENU_BAR_LINES (f)) 1083 if (0 <= row && row < FRAME_MENU_BAR_LINES (f))
1084 { 1084 {
1085 Lisp_Object items, item; 1085 Lisp_Object items, item;
@@ -1099,10 +1099,10 @@ into menu items. */)
1099 pos = AREF (items, i + 3); 1099 pos = AREF (items, i + 3);
1100 if (NILP (str)) 1100 if (NILP (str))
1101 return item; 1101 return item;
1102 if (XINT (pos) <= col 1102 if (XFIXNUM (pos) <= col
1103 /* We use <= so the blank between 2 items on a TTY is 1103 /* We use <= so the blank between 2 items on a TTY is
1104 considered part of the previous item. */ 1104 considered part of the previous item. */
1105 && col <= XINT (pos) + menu_item_width (SDATA (str))) 1105 && col <= XFIXNUM (pos) + menu_item_width (SDATA (str)))
1106 { 1106 {
1107 item = AREF (items, i); 1107 item = AREF (items, i);
1108 return item; 1108 return item;
@@ -1268,8 +1268,8 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
1268 ? (EMACS_INT) INT_MIN - ypos 1268 ? (EMACS_INT) INT_MIN - ypos
1269 : MOST_NEGATIVE_FIXNUM), 1269 : MOST_NEGATIVE_FIXNUM),
1270 INT_MAX - ypos); 1270 INT_MAX - ypos);
1271 xpos += XINT (x); 1271 xpos += XFIXNUM (x);
1272 ypos += XINT (y); 1272 ypos += XFIXNUM (y);
1273 1273
1274 XSETFRAME (Vmenu_updating_frame, f); 1274 XSETFRAME (Vmenu_updating_frame, f);
1275 } 1275 }
@@ -1309,7 +1309,7 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
1309 else if (CONSP (menu) && KEYMAPP (XCAR (menu))) 1309 else if (CONSP (menu) && KEYMAPP (XCAR (menu)))
1310 { 1310 {
1311 /* We were given a list of keymaps. */ 1311 /* We were given a list of keymaps. */
1312 EMACS_INT nmaps = XFASTINT (Flength (menu)); 1312 EMACS_INT nmaps = XFIXNAT (Flength (menu));
1313 Lisp_Object *maps; 1313 Lisp_Object *maps;
1314 ptrdiff_t i; 1314 ptrdiff_t i;
1315 USE_SAFE_ALLOCA; 1315 USE_SAFE_ALLOCA;
diff --git a/src/minibuf.c b/src/minibuf.c
index a6d03b2cb50..751d6bda168 100644
--- a/src/minibuf.c
+++ b/src/minibuf.c
@@ -157,7 +157,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
157 } 157 }
158 158
159 expr_and_pos = Fread_from_string (val, Qnil, Qnil); 159 expr_and_pos = Fread_from_string (val, Qnil, Qnil);
160 pos = XINT (Fcdr (expr_and_pos)); 160 pos = XFIXNUM (Fcdr (expr_and_pos));
161 if (pos != SCHARS (val)) 161 if (pos != SCHARS (val))
162 { 162 {
163 /* Ignore trailing whitespace; any other trailing junk 163 /* Ignore trailing whitespace; any other trailing junk
@@ -198,7 +198,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
198 198
199 /* Check, whether we need to suppress echoing. */ 199 /* Check, whether we need to suppress echoing. */
200 if (CHARACTERP (Vread_hide_char)) 200 if (CHARACTERP (Vread_hide_char))
201 hide_char = XFASTINT (Vread_hide_char); 201 hide_char = XFIXNAT (Vread_hide_char);
202 202
203 /* Manipulate tty. */ 203 /* Manipulate tty. */
204 if (hide_char) 204 if (hide_char)
@@ -299,7 +299,7 @@ Return (point-min) if current buffer is not a minibuffer. */)
299 299
300 end = Ffield_end (beg, Qnil, Qnil); 300 end = Ffield_end (beg, Qnil, Qnil);
301 301
302 if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil))) 302 if (XFIXNUM (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
303 return beg; 303 return beg;
304 else 304 else
305 return end; 305 return end;
@@ -311,7 +311,7 @@ DEFUN ("minibuffer-contents", Fminibuffer_contents,
311If the current buffer is not a minibuffer, return its entire contents. */) 311If the current buffer is not a minibuffer, return its entire contents. */)
312 (void) 312 (void)
313{ 313{
314 ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ()); 314 ptrdiff_t prompt_end = XFIXNUM (Fminibuffer_prompt_end ());
315 return make_buffer_string (prompt_end, ZV, 1); 315 return make_buffer_string (prompt_end, ZV, 1);
316} 316}
317 317
@@ -321,7 +321,7 @@ DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
321If the current buffer is not a minibuffer, return its entire contents. */) 321If the current buffer is not a minibuffer, return its entire contents. */)
322 (void) 322 (void)
323{ 323{
324 ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ()); 324 ptrdiff_t prompt_end = XFIXNUM (Fminibuffer_prompt_end ());
325 return make_buffer_string (prompt_end, ZV, 0); 325 return make_buffer_string (prompt_end, ZV, 0);
326} 326}
327 327
@@ -395,11 +395,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
395 { 395 {
396 CHECK_FIXNUM (backup_n); 396 CHECK_FIXNUM (backup_n);
397 /* Convert to distance from end of input. */ 397 /* Convert to distance from end of input. */
398 if (XINT (backup_n) < 1) 398 if (XFIXNUM (backup_n) < 1)
399 /* A number too small means the beginning of the string. */ 399 /* A number too small means the beginning of the string. */
400 pos = - SCHARS (initial); 400 pos = - SCHARS (initial);
401 else 401 else
402 pos = XINT (backup_n) - 1 - SCHARS (initial); 402 pos = XFIXNUM (backup_n) - 1 - SCHARS (initial);
403 } 403 }
404 } 404 }
405 else 405 else
@@ -788,12 +788,12 @@ read_minibuf_unwind (void)
788 /* Restore prompt, etc, from outer minibuffer level. */ 788 /* Restore prompt, etc, from outer minibuffer level. */
789 Lisp_Object key_vec = Fcar (minibuf_save_list); 789 Lisp_Object key_vec = Fcar (minibuf_save_list);
790 eassert (VECTORP (key_vec)); 790 eassert (VECTORP (key_vec));
791 this_command_key_count = XFASTINT (Flength (key_vec)); 791 this_command_key_count = XFIXNAT (Flength (key_vec));
792 this_command_keys = key_vec; 792 this_command_keys = key_vec;
793 minibuf_save_list = Fcdr (minibuf_save_list); 793 minibuf_save_list = Fcdr (minibuf_save_list);
794 minibuf_prompt = Fcar (minibuf_save_list); 794 minibuf_prompt = Fcar (minibuf_save_list);
795 minibuf_save_list = Fcdr (minibuf_save_list); 795 minibuf_save_list = Fcdr (minibuf_save_list);
796 minibuf_prompt_width = XFASTINT (Fcar (minibuf_save_list)); 796 minibuf_prompt_width = XFIXNAT (Fcar (minibuf_save_list));
797 minibuf_save_list = Fcdr (minibuf_save_list); 797 minibuf_save_list = Fcdr (minibuf_save_list);
798 Vhelp_form = Fcar (minibuf_save_list); 798 Vhelp_form = Fcar (minibuf_save_list);
799 minibuf_save_list = Fcdr (minibuf_save_list); 799 minibuf_save_list = Fcdr (minibuf_save_list);
@@ -1327,7 +1327,7 @@ is used to further constrain the set of candidates. */)
1327 eltstring, zero, 1327 eltstring, zero,
1328 make_fixnum (compare), 1328 make_fixnum (compare),
1329 completion_ignore_case ? Qt : Qnil); 1329 completion_ignore_case ? Qt : Qnil);
1330 matchsize = EQ (tem, Qt) ? compare : eabs (XINT (tem)) - 1; 1330 matchsize = EQ (tem, Qt) ? compare : eabs (XFIXNUM (tem)) - 1;
1331 1331
1332 if (completion_ignore_case) 1332 if (completion_ignore_case)
1333 { 1333 {
diff --git a/src/msdos.c b/src/msdos.c
index 4f38b1de7d3..4031c579df8 100644
--- a/src/msdos.c
+++ b/src/msdos.c
@@ -224,7 +224,7 @@ them. This happens with wheeled mice on Windows 9X, for example. */)
224 int n; 224 int n;
225 225
226 CHECK_FIXNUM (nbuttons); 226 CHECK_FIXNUM (nbuttons);
227 n = XINT (nbuttons); 227 n = XFIXNUM (nbuttons);
228 if (n < 2 || n > 3) 228 if (n < 2 || n > 3)
229 xsignal2 (Qargs_out_of_range, 229 xsignal2 (Qargs_out_of_range,
230 build_string ("only 2 or 3 mouse buttons are supported"), 230 build_string ("only 2 or 3 mouse buttons are supported"),
@@ -540,7 +540,7 @@ dos_set_window_size (int *rows, int *cols)
540 *rows, *cols), Qnil)); 540 *rows, *cols), Qnil));
541 541
542 if (FIXNUMP (video_mode) 542 if (FIXNUMP (video_mode)
543 && (video_mode_value = XINT (video_mode)) > 0) 543 && (video_mode_value = XFIXNUM (video_mode)) > 0)
544 { 544 {
545 regs.x.ax = video_mode_value; 545 regs.x.ax = video_mode_value;
546 int86 (0x10, &regs, &regs); 546 int86 (0x10, &regs, &regs);
@@ -746,7 +746,7 @@ IT_set_cursor_type (struct frame *f, Lisp_Object cursor_type)
746 { 746 {
747 /* Feature: negative WIDTH means cursor at the top 747 /* Feature: negative WIDTH means cursor at the top
748 of the character cell, zero means invisible cursor. */ 748 of the character cell, zero means invisible cursor. */
749 width = XINT (bar_parms); 749 width = XFIXNUM (bar_parms);
750 msdos_set_cursor_shape (f, width >= 0 ? DEFAULT_CURSOR_START : 0, 750 msdos_set_cursor_shape (f, width >= 0 ? DEFAULT_CURSOR_START : 0,
751 width); 751 width);
752 } 752 }
@@ -754,9 +754,9 @@ IT_set_cursor_type (struct frame *f, Lisp_Object cursor_type)
754 && FIXNUMP (XCAR (bar_parms)) 754 && FIXNUMP (XCAR (bar_parms))
755 && FIXNUMP (XCDR (bar_parms))) 755 && FIXNUMP (XCDR (bar_parms)))
756 { 756 {
757 int start_line = XINT (XCDR (bar_parms)); 757 int start_line = XFIXNUM (XCDR (bar_parms));
758 758
759 width = XINT (XCAR (bar_parms)); 759 width = XFIXNUM (XCAR (bar_parms));
760 msdos_set_cursor_shape (f, start_line, width); 760 msdos_set_cursor_shape (f, start_line, width);
761 } 761 }
762 } 762 }
@@ -1564,7 +1564,7 @@ void
1564IT_set_frame_parameters (struct frame *f, Lisp_Object alist) 1564IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
1565{ 1565{
1566 Lisp_Object tail; 1566 Lisp_Object tail;
1567 int i, j, length = XINT (Flength (alist)); 1567 int i, j, length = XFIXNUM (Flength (alist));
1568 Lisp_Object *parms 1568 Lisp_Object *parms
1569 = (Lisp_Object *) alloca (length * word_size); 1569 = (Lisp_Object *) alloca (length * word_size);
1570 Lisp_Object *values 1570 Lisp_Object *values
diff --git a/src/print.c b/src/print.c
index 2b1d1fec726..998ff2dc0c6 100644
--- a/src/print.c
+++ b/src/print.c
@@ -261,7 +261,7 @@ printchar_to_stream (unsigned int ch, FILE *stream)
261 break; 261 break;
262 if (! (i < n)) 262 if (! (i < n))
263 break; 263 break;
264 ch = XFASTINT (AREF (dv, i)); 264 ch = XFIXNAT (AREF (dv, i));
265 } 265 }
266} 266}
267 267
@@ -522,7 +522,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see). */)
522 printcharfun = Vstandard_output; 522 printcharfun = Vstandard_output;
523 CHECK_FIXNUM (character); 523 CHECK_FIXNUM (character);
524 PRINTPREPARE; 524 PRINTPREPARE;
525 printchar (XINT (character), printcharfun); 525 printchar (XFIXNUM (character), printcharfun);
526 PRINTFINISH; 526 PRINTFINISH;
527 return character; 527 return character;
528} 528}
@@ -772,7 +772,7 @@ to make it write to the debugging output. */)
772 (Lisp_Object character) 772 (Lisp_Object character)
773{ 773{
774 CHECK_FIXNUM (character); 774 CHECK_FIXNUM (character);
775 printchar_to_stream (XINT (character), stderr); 775 printchar_to_stream (XFIXNUM (character), stderr);
776 return character; 776 return character;
777} 777}
778 778
@@ -1408,8 +1408,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
1408 Negative values of print-length are invalid. Treat them 1408 Negative values of print-length are invalid. Treat them
1409 like a print-length of nil. */ 1409 like a print-length of nil. */
1410 if (FIXNATP (Vprint_length) 1410 if (FIXNATP (Vprint_length)
1411 && XFASTINT (Vprint_length) < size_in_bytes) 1411 && XFIXNAT (Vprint_length) < size_in_bytes)
1412 size_in_bytes = XFASTINT (Vprint_length); 1412 size_in_bytes = XFIXNAT (Vprint_length);
1413 1413
1414 for (ptrdiff_t i = 0; i < size_in_bytes; i++) 1414 for (ptrdiff_t i = 0; i < size_in_bytes; i++)
1415 { 1415 {
@@ -1521,8 +1521,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
1521 ptrdiff_t size = real_size; 1521 ptrdiff_t size = real_size;
1522 1522
1523 /* Don't print more elements than the specified maximum. */ 1523 /* Don't print more elements than the specified maximum. */
1524 if (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size) 1524 if (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size)
1525 size = XFASTINT (Vprint_length); 1525 size = XFIXNAT (Vprint_length);
1526 1526
1527 printchar ('(', printcharfun); 1527 printchar ('(', printcharfun);
1528 for (ptrdiff_t i = 0; i < size; i++) 1528 for (ptrdiff_t i = 0; i < size; i++)
@@ -1652,8 +1652,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
1652 1652
1653 /* Don't print more elements than the specified maximum. */ 1653 /* Don't print more elements than the specified maximum. */
1654 ptrdiff_t n 1654 ptrdiff_t n
1655 = (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size 1655 = (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size
1656 ? XFASTINT (Vprint_length) : size); 1656 ? XFIXNAT (Vprint_length) : size);
1657 1657
1658 print_c_string ("#s(", printcharfun); 1658 print_c_string ("#s(", printcharfun);
1659 for (ptrdiff_t i = 0; i < n; i ++) 1659 for (ptrdiff_t i = 0; i < n; i ++)
@@ -1714,8 +1714,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
1714 1714
1715 /* Don't print more elements than the specified maximum. */ 1715 /* Don't print more elements than the specified maximum. */
1716 if (FIXNATP (Vprint_length) 1716 if (FIXNATP (Vprint_length)
1717 && XFASTINT (Vprint_length) < size) 1717 && XFIXNAT (Vprint_length) < size)
1718 size = XFASTINT (Vprint_length); 1718 size = XFIXNAT (Vprint_length);
1719 1719
1720 for (int i = idx; i < size; i++) 1720 for (int i = idx; i < size; i++)
1721 { 1721 {
@@ -1807,7 +1807,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1807 Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil); 1807 Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil);
1808 if (FIXNUMP (num)) 1808 if (FIXNUMP (num))
1809 { 1809 {
1810 EMACS_INT n = XINT (num); 1810 EMACS_INT n = XFIXNUM (num);
1811 if (n < 0) 1811 if (n < 0)
1812 { /* Add a prefix #n= if OBJ has not yet been printed; 1812 { /* Add a prefix #n= if OBJ has not yet been printed;
1813 that is, its status field is nil. */ 1813 that is, its status field is nil. */
@@ -1832,7 +1832,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
1832 { 1832 {
1833 case_Lisp_Int: 1833 case_Lisp_Int:
1834 { 1834 {
1835 int len = sprintf (buf, "%"pI"d", XINT (obj)); 1835 int len = sprintf (buf, "%"pI"d", XFIXNUM (obj));
1836 strout (buf, len, len, printcharfun); 1836 strout (buf, len, len, printcharfun);
1837 } 1837 }
1838 break; 1838 break;
@@ -2008,7 +2008,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
2008 case Lisp_Cons: 2008 case Lisp_Cons:
2009 /* If deeper than spec'd depth, print placeholder. */ 2009 /* If deeper than spec'd depth, print placeholder. */
2010 if (FIXNUMP (Vprint_level) 2010 if (FIXNUMP (Vprint_level)
2011 && print_depth > XINT (Vprint_level)) 2011 && print_depth > XFIXNUM (Vprint_level))
2012 print_c_string ("...", printcharfun); 2012 print_c_string ("...", printcharfun);
2013 else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj))) 2013 else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
2014 && EQ (XCAR (obj), Qquote)) 2014 && EQ (XCAR (obj), Qquote))
@@ -2050,7 +2050,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
2050 /* Negative values of print-length are invalid in CL. 2050 /* Negative values of print-length are invalid in CL.
2051 Treat them like nil, as CMUCL does. */ 2051 Treat them like nil, as CMUCL does. */
2052 printmax_t print_length = (FIXNATP (Vprint_length) 2052 printmax_t print_length = (FIXNATP (Vprint_length)
2053 ? XFASTINT (Vprint_length) 2053 ? XFIXNAT (Vprint_length)
2054 : TYPE_MAXIMUM (printmax_t)); 2054 : TYPE_MAXIMUM (printmax_t));
2055 2055
2056 printmax_t i = 0; 2056 printmax_t i = 0;
diff --git a/src/process.c b/src/process.c
index 350cfe0f80b..698a2c3ac02 100644
--- a/src/process.c
+++ b/src/process.c
@@ -747,7 +747,7 @@ status_message (struct Lisp_Process *p)
747 { 747 {
748 char const *signame; 748 char const *signame;
749 synchronize_system_messages_locale (); 749 synchronize_system_messages_locale ();
750 signame = strsignal (XFASTINT (code)); 750 signame = strsignal (XFIXNAT (code));
751 if (signame == 0) 751 if (signame == 0)
752 string = build_string ("unknown"); 752 string = build_string ("unknown");
753 else 753 else
@@ -769,10 +769,10 @@ status_message (struct Lisp_Process *p)
769 else if (EQ (symbol, Qexit)) 769 else if (EQ (symbol, Qexit))
770 { 770 {
771 if (NETCONN1_P (p)) 771 if (NETCONN1_P (p))
772 return build_string (XFASTINT (code) == 0 772 return build_string (XFIXNAT (code) == 0
773 ? "deleted\n" 773 ? "deleted\n"
774 : "connection broken by remote peer\n"); 774 : "connection broken by remote peer\n");
775 if (XFASTINT (code) == 0) 775 if (XFIXNAT (code) == 0)
776 return build_string ("finished\n"); 776 return build_string ("finished\n");
777 AUTO_STRING (prefix, "exited abnormally with code "); 777 AUTO_STRING (prefix, "exited abnormally with code ");
778 string = Fnumber_to_string (code); 778 string = Fnumber_to_string (code);
@@ -1383,7 +1383,7 @@ nil otherwise. */)
1383 if (NETCONN_P (process) 1383 if (NETCONN_P (process)
1384 || XPROCESS (process)->infd < 0 1384 || XPROCESS (process)->infd < 0
1385 || (set_window_size (XPROCESS (process)->infd, 1385 || (set_window_size (XPROCESS (process)->infd,
1386 XINT (height), XINT (width)) 1386 XFIXNUM (height), XFIXNUM (width))
1387 < 0)) 1387 < 0))
1388 return Qnil; 1388 return Qnil;
1389 else 1389 else
@@ -1589,7 +1589,7 @@ Return nil if format of ADDRESS is invalid. */)
1589 1589
1590 if (nargs <= 5 /* IPv4 */ 1590 if (nargs <= 5 /* IPv4 */
1591 && i < 4 /* host, not port */ 1591 && i < 4 /* host, not port */
1592 && XINT (p->contents[i]) > 255) 1592 && XFIXNUM (p->contents[i]) > 255)
1593 return Qnil; 1593 return Qnil;
1594 1594
1595 args[i + 1] = p->contents[i]; 1595 args[i + 1] = p->contents[i];
@@ -1789,7 +1789,7 @@ usage: (make-process &rest ARGS) */)
1789 val = Vcoding_system_for_read; 1789 val = Vcoding_system_for_read;
1790 if (NILP (val)) 1790 if (NILP (val))
1791 { 1791 {
1792 ptrdiff_t nargs2 = 3 + XINT (Flength (command)); 1792 ptrdiff_t nargs2 = 3 + XFIXNUM (Flength (command));
1793 Lisp_Object tem2; 1793 Lisp_Object tem2;
1794 SAFE_ALLOCA_LISP (args2, nargs2); 1794 SAFE_ALLOCA_LISP (args2, nargs2);
1795 ptrdiff_t i = 0; 1795 ptrdiff_t i = 0;
@@ -1819,7 +1819,7 @@ usage: (make-process &rest ARGS) */)
1819 { 1819 {
1820 if (EQ (coding_systems, Qt)) 1820 if (EQ (coding_systems, Qt))
1821 { 1821 {
1822 ptrdiff_t nargs2 = 3 + XINT (Flength (command)); 1822 ptrdiff_t nargs2 = 3 + XFIXNUM (Flength (command));
1823 Lisp_Object tem2; 1823 Lisp_Object tem2;
1824 SAFE_ALLOCA_LISP (args2, nargs2); 1824 SAFE_ALLOCA_LISP (args2, nargs2);
1825 ptrdiff_t i = 0; 1825 ptrdiff_t i = 0;
@@ -2567,7 +2567,7 @@ static Lisp_Object
2567conv_addrinfo_to_lisp (struct addrinfo *res) 2567conv_addrinfo_to_lisp (struct addrinfo *res)
2568{ 2568{
2569 Lisp_Object protocol = make_fixnum (res->ai_protocol); 2569 Lisp_Object protocol = make_fixnum (res->ai_protocol);
2570 eassert (XINT (protocol) == res->ai_protocol); 2570 eassert (XFIXNUM (protocol) == res->ai_protocol);
2571 return Fcons (protocol, conv_sockaddr_to_lisp (res->ai_addr, res->ai_addrlen)); 2571 return Fcons (protocol, conv_sockaddr_to_lisp (res->ai_addr, res->ai_addrlen));
2572} 2572}
2573 2573
@@ -2609,7 +2609,7 @@ get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp)
2609 p = XVECTOR (XCDR (address)); 2609 p = XVECTOR (XCDR (address));
2610 if (MAX_ALLOCA - sizeof sa->sa_family < p->header.size) 2610 if (MAX_ALLOCA - sizeof sa->sa_family < p->header.size)
2611 return 0; 2611 return 0;
2612 *familyp = XINT (XCAR (address)); 2612 *familyp = XFIXNUM (XCAR (address));
2613 return p->header.size + sizeof (sa->sa_family); 2613 return p->header.size + sizeof (sa->sa_family);
2614 } 2614 }
2615 return 0; 2615 return 0;
@@ -2639,7 +2639,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
2639 { 2639 {
2640 DECLARE_POINTER_ALIAS (sin, struct sockaddr_in, sa); 2640 DECLARE_POINTER_ALIAS (sin, struct sockaddr_in, sa);
2641 len = sizeof (sin->sin_addr) + 1; 2641 len = sizeof (sin->sin_addr) + 1;
2642 hostport = XINT (p->contents[--len]); 2642 hostport = XFIXNUM (p->contents[--len]);
2643 sin->sin_port = htons (hostport); 2643 sin->sin_port = htons (hostport);
2644 cp = (unsigned char *)&sin->sin_addr; 2644 cp = (unsigned char *)&sin->sin_addr;
2645 sa->sa_family = family; 2645 sa->sa_family = family;
@@ -2650,12 +2650,12 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
2650 DECLARE_POINTER_ALIAS (sin6, struct sockaddr_in6, sa); 2650 DECLARE_POINTER_ALIAS (sin6, struct sockaddr_in6, sa);
2651 DECLARE_POINTER_ALIAS (ip6, uint16_t, &sin6->sin6_addr); 2651 DECLARE_POINTER_ALIAS (ip6, uint16_t, &sin6->sin6_addr);
2652 len = sizeof (sin6->sin6_addr) / 2 + 1; 2652 len = sizeof (sin6->sin6_addr) / 2 + 1;
2653 hostport = XINT (p->contents[--len]); 2653 hostport = XFIXNUM (p->contents[--len]);
2654 sin6->sin6_port = htons (hostport); 2654 sin6->sin6_port = htons (hostport);
2655 for (i = 0; i < len; i++) 2655 for (i = 0; i < len; i++)
2656 if (FIXNUMP (p->contents[i])) 2656 if (FIXNUMP (p->contents[i]))
2657 { 2657 {
2658 int j = XFASTINT (p->contents[i]) & 0xffff; 2658 int j = XFIXNAT (p->contents[i]) & 0xffff;
2659 ip6[i] = ntohs (j); 2659 ip6[i] = ntohs (j);
2660 } 2660 }
2661 sa->sa_family = family; 2661 sa->sa_family = family;
@@ -2687,7 +2687,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
2687 2687
2688 for (i = 0; i < len; i++) 2688 for (i = 0; i < len; i++)
2689 if (FIXNUMP (p->contents[i])) 2689 if (FIXNUMP (p->contents[i]))
2690 *cp++ = XFASTINT (p->contents[i]) & 0xff; 2690 *cp++ = XFIXNAT (p->contents[i]) & 0xff;
2691} 2691}
2692 2692
2693#ifdef DATAGRAM_SOCKETS 2693#ifdef DATAGRAM_SOCKETS
@@ -2819,7 +2819,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
2819 { 2819 {
2820 int optval; 2820 int optval;
2821 if (TYPE_RANGED_FIXNUMP (int, val)) 2821 if (TYPE_RANGED_FIXNUMP (int, val))
2822 optval = XINT (val); 2822 optval = XFIXNUM (val);
2823 else 2823 else
2824 error ("Bad option value for %s", name); 2824 error ("Bad option value for %s", name);
2825 ret = setsockopt (s, sopt->optlevel, sopt->optnum, 2825 ret = setsockopt (s, sopt->optlevel, sopt->optnum,
@@ -2858,7 +2858,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
2858 linger.l_onoff = 1; 2858 linger.l_onoff = 1;
2859 linger.l_linger = 0; 2859 linger.l_linger = 0;
2860 if (TYPE_RANGED_FIXNUMP (int, val)) 2860 if (TYPE_RANGED_FIXNUMP (int, val))
2861 linger.l_linger = XINT (val); 2861 linger.l_linger = XFIXNUM (val);
2862 else 2862 else
2863 linger.l_onoff = NILP (val) ? 0 : 1; 2863 linger.l_onoff = NILP (val) ? 0 : 1;
2864 ret = setsockopt (s, sopt->optlevel, sopt->optnum, 2864 ret = setsockopt (s, sopt->optlevel, sopt->optnum,
@@ -3357,7 +3357,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
3357 { 3357 {
3358 Lisp_Object addrinfo = XCAR (addrinfos); 3358 Lisp_Object addrinfo = XCAR (addrinfos);
3359 addrinfos = XCDR (addrinfos); 3359 addrinfos = XCDR (addrinfos);
3360 int protocol = XINT (XCAR (addrinfo)); 3360 int protocol = XFIXNUM (XCAR (addrinfo));
3361 Lisp_Object ip_address = XCDR (addrinfo); 3361 Lisp_Object ip_address = XCDR (addrinfo);
3362 3362
3363#ifdef WINDOWSNT 3363#ifdef WINDOWSNT
@@ -3941,7 +3941,7 @@ usage: (make-network-process &rest ARGS) */)
3941 else if (EQ (tem, Qipv4)) 3941 else if (EQ (tem, Qipv4))
3942 family = AF_INET; 3942 family = AF_INET;
3943 else if (TYPE_RANGED_FIXNUMP (int, tem)) 3943 else if (TYPE_RANGED_FIXNUMP (int, tem))
3944 family = XINT (tem); 3944 family = XFIXNUM (tem);
3945 else 3945 else
3946 error ("Unknown address family"); 3946 error ("Unknown address family");
3947 3947
@@ -4010,7 +4010,7 @@ usage: (make-network-process &rest ARGS) */)
4010 else if (FIXNUMP (service)) 4010 else if (FIXNUMP (service))
4011 { 4011 {
4012 portstring = portbuf; 4012 portstring = portbuf;
4013 portstringlen = sprintf (portbuf, "%"pI"d", XINT (service)); 4013 portstringlen = sprintf (portbuf, "%"pI"d", XFIXNUM (service));
4014 } 4014 }
4015 else 4015 else
4016 { 4016 {
@@ -4096,7 +4096,7 @@ usage: (make-network-process &rest ARGS) */)
4096 if (EQ (service, Qt)) 4096 if (EQ (service, Qt))
4097 port = 0; 4097 port = 0;
4098 else if (FIXNUMP (service)) 4098 else if (FIXNUMP (service))
4099 port = XINT (service); 4099 port = XFIXNUM (service);
4100 else 4100 else
4101 { 4101 {
4102 CHECK_STRING (service); 4102 CHECK_STRING (service);
@@ -4170,7 +4170,7 @@ usage: (make-network-process &rest ARGS) */)
4170 /* :server QLEN */ 4170 /* :server QLEN */
4171 p->is_server = !NILP (server); 4171 p->is_server = !NILP (server);
4172 if (TYPE_RANGED_FIXNUMP (int, server)) 4172 if (TYPE_RANGED_FIXNUMP (int, server))
4173 p->backlog = XINT (server); 4173 p->backlog = XFIXNUM (server);
4174 4174
4175 /* :nowait BOOL */ 4175 /* :nowait BOOL */
4176 if (!p->is_server && socktype != SOCK_DGRAM && nowait) 4176 if (!p->is_server && socktype != SOCK_DGRAM && nowait)
@@ -4627,11 +4627,11 @@ is nil, from any process) before the timeout expired. */)
4627 { /* Obsolete calling convention using integers rather than floats. */ 4627 { /* Obsolete calling convention using integers rather than floats. */
4628 CHECK_FIXNUM (millisec); 4628 CHECK_FIXNUM (millisec);
4629 if (NILP (seconds)) 4629 if (NILP (seconds))
4630 seconds = make_float (XINT (millisec) / 1000.0); 4630 seconds = make_float (XFIXNUM (millisec) / 1000.0);
4631 else 4631 else
4632 { 4632 {
4633 CHECK_FIXNUM (seconds); 4633 CHECK_FIXNUM (seconds);
4634 seconds = make_float (XINT (millisec) / 1000.0 + XINT (seconds)); 4634 seconds = make_float (XFIXNUM (millisec) / 1000.0 + XFIXNUM (seconds));
4635 } 4635 }
4636 } 4636 }
4637 4637
@@ -4642,9 +4642,9 @@ is nil, from any process) before the timeout expired. */)
4642 { 4642 {
4643 if (FIXNUMP (seconds)) 4643 if (FIXNUMP (seconds))
4644 { 4644 {
4645 if (XINT (seconds) > 0) 4645 if (XFIXNUM (seconds) > 0)
4646 { 4646 {
4647 secs = XINT (seconds); 4647 secs = XFIXNUM (seconds);
4648 nsecs = 0; 4648 nsecs = 0;
4649 } 4649 }
4650 } 4650 }
@@ -6196,8 +6196,8 @@ write_queue_pop (struct Lisp_Process *p, Lisp_Object *obj,
6196 *obj = XCAR (entry); 6196 *obj = XCAR (entry);
6197 offset_length = XCDR (entry); 6197 offset_length = XCDR (entry);
6198 6198
6199 *len = XINT (XCDR (offset_length)); 6199 *len = XFIXNUM (XCDR (offset_length));
6200 offset = XINT (XCAR (offset_length)); 6200 offset = XFIXNUM (XCAR (offset_length));
6201 *buf = SSDATA (*obj) + offset; 6201 *buf = SSDATA (*obj) + offset;
6202 6202
6203 return 1; 6203 return 1;
@@ -6451,11 +6451,11 @@ set up yet, this function will block until socket setup has completed. */)
6451 6451
6452 validate_region (&start, &end); 6452 validate_region (&start, &end);
6453 6453
6454 start_byte = CHAR_TO_BYTE (XINT (start)); 6454 start_byte = CHAR_TO_BYTE (XFIXNUM (start));
6455 end_byte = CHAR_TO_BYTE (XINT (end)); 6455 end_byte = CHAR_TO_BYTE (XFIXNUM (end));
6456 6456
6457 if (XINT (start) < GPT && XINT (end) > GPT) 6457 if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
6458 move_gap_both (XINT (start), start_byte); 6458 move_gap_both (XFIXNUM (start), start_byte);
6459 6459
6460 if (NETCONN_P (proc)) 6460 if (NETCONN_P (proc))
6461 wait_while_connecting (proc); 6461 wait_while_connecting (proc);
@@ -6864,7 +6864,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
6864 if (FIXNUMP (sigcode)) 6864 if (FIXNUMP (sigcode))
6865 { 6865 {
6866 CHECK_TYPE_RANGED_INTEGER (int, sigcode); 6866 CHECK_TYPE_RANGED_INTEGER (int, sigcode);
6867 signo = XINT (sigcode); 6867 signo = XFIXNUM (sigcode);
6868 } 6868 }
6869 else 6869 else
6870 { 6870 {
@@ -7052,7 +7052,7 @@ handle_child_signal (int sig)
7052 { 7052 {
7053 pid_t deleted_pid; 7053 pid_t deleted_pid;
7054 if (FIXNUMP (xpid)) 7054 if (FIXNUMP (xpid))
7055 deleted_pid = XINT (xpid); 7055 deleted_pid = XFIXNUM (xpid);
7056 else 7056 else
7057 deleted_pid = XFLOAT_DATA (xpid); 7057 deleted_pid = XFLOAT_DATA (xpid);
7058 if (child_status_changed (deleted_pid, 0, 0)) 7058 if (child_status_changed (deleted_pid, 0, 0))
diff --git a/src/profiler.c b/src/profiler.c
index 4c7812aa778..7330f8861fc 100644
--- a/src/profiler.c
+++ b/src/profiler.c
@@ -80,12 +80,12 @@ static EMACS_INT approximate_median (log_t *log,
80{ 80{
81 eassert (size > 0); 81 eassert (size > 0);
82 if (size < 2) 82 if (size < 2)
83 return XINT (HASH_VALUE (log, start)); 83 return XFIXNUM (HASH_VALUE (log, start));
84 if (size < 3) 84 if (size < 3)
85 /* Not an actual median, but better for our application than 85 /* Not an actual median, but better for our application than
86 choosing either of the two numbers. */ 86 choosing either of the two numbers. */
87 return ((XINT (HASH_VALUE (log, start)) 87 return ((XFIXNUM (HASH_VALUE (log, start))
88 + XINT (HASH_VALUE (log, start + 1))) 88 + XFIXNUM (HASH_VALUE (log, start + 1)))
89 / 2); 89 / 2);
90 else 90 else
91 { 91 {
@@ -110,7 +110,7 @@ static void evict_lower_half (log_t *log)
110 for (i = 0; i < size; i++) 110 for (i = 0; i < size; i++)
111 /* Evict not only values smaller but also values equal to the median, 111 /* Evict not only values smaller but also values equal to the median,
112 so as to make sure we evict something no matter what. */ 112 so as to make sure we evict something no matter what. */
113 if (XINT (HASH_VALUE (log, i)) <= median) 113 if (XFIXNUM (HASH_VALUE (log, i)) <= median)
114 { 114 {
115 Lisp_Object key = HASH_KEY (log, i); 115 Lisp_Object key = HASH_KEY (log, i);
116 { /* FIXME: we could make this more efficient. */ 116 { /* FIXME: we could make this more efficient. */
@@ -156,7 +156,7 @@ record_backtrace (log_t *log, EMACS_INT count)
156 ptrdiff_t j = hash_lookup (log, backtrace, &hash); 156 ptrdiff_t j = hash_lookup (log, backtrace, &hash);
157 if (j >= 0) 157 if (j >= 0)
158 { 158 {
159 EMACS_INT old_val = XINT (HASH_VALUE (log, j)); 159 EMACS_INT old_val = XFIXNUM (HASH_VALUE (log, j));
160 EMACS_INT new_val = saturated_add (old_val, count); 160 EMACS_INT new_val = saturated_add (old_val, count);
161 set_hash_value_slot (log, j, make_fixnum (new_val)); 161 set_hash_value_slot (log, j, make_fixnum (new_val));
162 } 162 }
@@ -273,7 +273,7 @@ setup_cpu_timer (Lisp_Object sampling_interval)
273 : EMACS_INT_MAX))) 273 : EMACS_INT_MAX)))
274 return -1; 274 return -1;
275 275
276 current_sampling_interval = XINT (sampling_interval); 276 current_sampling_interval = XFIXNUM (sampling_interval);
277 interval = make_timespec (current_sampling_interval / billion, 277 interval = make_timespec (current_sampling_interval / billion,
278 current_sampling_interval % billion); 278 current_sampling_interval % billion);
279 emacs_sigaction_init (&action, deliver_profiler_signal); 279 emacs_sigaction_init (&action, deliver_profiler_signal);
diff --git a/src/search.c b/src/search.c
index 72374c8b9b4..5385c890f98 100644
--- a/src/search.c
+++ b/src/search.c
@@ -402,7 +402,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start,
402 ptrdiff_t len = SCHARS (string); 402 ptrdiff_t len = SCHARS (string);
403 403
404 CHECK_FIXNUM (start); 404 CHECK_FIXNUM (start);
405 pos = XINT (start); 405 pos = XFIXNUM (start);
406 if (pos < 0 && -pos <= len) 406 if (pos < 0 && -pos <= len)
407 pos = len + pos; 407 pos = len + pos;
408 else if (0 > pos || pos > len) 408 else if (0 > pos || pos > len)
@@ -1037,7 +1037,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
1037 if (!NILP (count)) 1037 if (!NILP (count))
1038 { 1038 {
1039 CHECK_FIXNUM (count); 1039 CHECK_FIXNUM (count);
1040 n *= XINT (count); 1040 n *= XFIXNUM (count);
1041 } 1041 }
1042 1042
1043 CHECK_STRING (string); 1043 CHECK_STRING (string);
@@ -1051,7 +1051,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
1051 else 1051 else
1052 { 1052 {
1053 CHECK_FIXNUM_COERCE_MARKER (bound); 1053 CHECK_FIXNUM_COERCE_MARKER (bound);
1054 lim = XINT (bound); 1054 lim = XFIXNUM (bound);
1055 if (n > 0 ? lim < PT : lim > PT) 1055 if (n > 0 ? lim < PT : lim > PT)
1056 error ("Invalid search bound (wrong side of point)"); 1056 error ("Invalid search bound (wrong side of point)");
1057 if (lim > ZV) 1057 if (lim > ZV)
@@ -1153,7 +1153,7 @@ do \
1153 Lisp_Object temp; \ 1153 Lisp_Object temp; \
1154 temp = Faref (trt, make_fixnum (d)); \ 1154 temp = Faref (trt, make_fixnum (d)); \
1155 if (FIXNUMP (temp)) \ 1155 if (FIXNUMP (temp)) \
1156 out = XINT (temp); \ 1156 out = XFIXNUM (temp); \
1157 else \ 1157 else \
1158 out = d; \ 1158 out = d; \
1159 } \ 1159 } \
@@ -2421,9 +2421,9 @@ since only regular expressions have distinguished subexpressions. */)
2421 else 2421 else
2422 { 2422 {
2423 CHECK_FIXNUM (subexp); 2423 CHECK_FIXNUM (subexp);
2424 if (! (0 <= XINT (subexp) && XINT (subexp) < search_regs.num_regs)) 2424 if (! (0 <= XFIXNUM (subexp) && XFIXNUM (subexp) < search_regs.num_regs))
2425 args_out_of_range (subexp, make_fixnum (search_regs.num_regs)); 2425 args_out_of_range (subexp, make_fixnum (search_regs.num_regs));
2426 sub = XINT (subexp); 2426 sub = XFIXNUM (subexp);
2427 } 2427 }
2428 2428
2429 if (NILP (string)) 2429 if (NILP (string))
@@ -2810,7 +2810,7 @@ match_limit (Lisp_Object num, bool beginningp)
2810 EMACS_INT n; 2810 EMACS_INT n;
2811 2811
2812 CHECK_FIXNUM (num); 2812 CHECK_FIXNUM (num);
2813 n = XINT (num); 2813 n = XFIXNUM (num);
2814 if (n < 0) 2814 if (n < 0)
2815 args_out_of_range (num, make_fixnum (0)); 2815 args_out_of_range (num, make_fixnum (0));
2816 if (search_regs.num_regs <= 0) 2816 if (search_regs.num_regs <= 0)
@@ -2989,7 +2989,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
2989 2989
2990 /* Allocate registers if they don't already exist. */ 2990 /* Allocate registers if they don't already exist. */
2991 { 2991 {
2992 EMACS_INT length = XFASTINT (Flength (list)) / 2; 2992 EMACS_INT length = XFIXNAT (Flength (list)) / 2;
2993 2993
2994 if (length > search_regs.num_regs) 2994 if (length > search_regs.num_regs)
2995 { 2995 {
@@ -3055,15 +3055,15 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
3055 XSETFASTINT (marker, 0); 3055 XSETFASTINT (marker, 0);
3056 3056
3057 CHECK_FIXNUM_COERCE_MARKER (marker); 3057 CHECK_FIXNUM_COERCE_MARKER (marker);
3058 if ((XINT (from) < 0 3058 if ((XFIXNUM (from) < 0
3059 ? TYPE_MINIMUM (regoff_t) <= XINT (from) 3059 ? TYPE_MINIMUM (regoff_t) <= XFIXNUM (from)
3060 : XINT (from) <= TYPE_MAXIMUM (regoff_t)) 3060 : XFIXNUM (from) <= TYPE_MAXIMUM (regoff_t))
3061 && (XINT (marker) < 0 3061 && (XFIXNUM (marker) < 0
3062 ? TYPE_MINIMUM (regoff_t) <= XINT (marker) 3062 ? TYPE_MINIMUM (regoff_t) <= XFIXNUM (marker)
3063 : XINT (marker) <= TYPE_MAXIMUM (regoff_t))) 3063 : XFIXNUM (marker) <= TYPE_MAXIMUM (regoff_t)))
3064 { 3064 {
3065 search_regs.start[i] = XINT (from); 3065 search_regs.start[i] = XFIXNUM (from);
3066 search_regs.end[i] = XINT (marker); 3066 search_regs.end[i] = XFIXNUM (marker);
3067 } 3067 }
3068 else 3068 else
3069 { 3069 {
diff --git a/src/sound.c b/src/sound.c
index ea57dc43bcb..6f15f5dab6d 100644
--- a/src/sound.c
+++ b/src/sound.c
@@ -387,7 +387,7 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs)
387 { 387 {
388 if (FIXNUMP (attrs[SOUND_VOLUME])) 388 if (FIXNUMP (attrs[SOUND_VOLUME]))
389 { 389 {
390 EMACS_INT volume = XINT (attrs[SOUND_VOLUME]); 390 EMACS_INT volume = XFIXNUM (attrs[SOUND_VOLUME]);
391 if (! (0 <= volume && volume <= 100)) 391 if (! (0 <= volume && volume <= 100))
392 return 0; 392 return 0;
393 } 393 }
@@ -1401,7 +1401,7 @@ Internal use only, use `play-sound' instead. */)
1401 current_sound_device->file = attrs[SOUND_DEVICE]; 1401 current_sound_device->file = attrs[SOUND_DEVICE];
1402 1402
1403 if (FIXNUMP (attrs[SOUND_VOLUME])) 1403 if (FIXNUMP (attrs[SOUND_VOLUME]))
1404 current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]); 1404 current_sound_device->volume = XFIXNAT (attrs[SOUND_VOLUME]);
1405 else if (FLOATP (attrs[SOUND_VOLUME])) 1405 else if (FLOATP (attrs[SOUND_VOLUME]))
1406 current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100; 1406 current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
1407 1407
@@ -1425,7 +1425,7 @@ Internal use only, use `play-sound' instead. */)
1425 file = ENCODE_FILE (file); 1425 file = ENCODE_FILE (file);
1426 if (FIXNUMP (attrs[SOUND_VOLUME])) 1426 if (FIXNUMP (attrs[SOUND_VOLUME]))
1427 { 1427 {
1428 ui_volume_tmp = XFASTINT (attrs[SOUND_VOLUME]); 1428 ui_volume_tmp = XFIXNAT (attrs[SOUND_VOLUME]);
1429 } 1429 }
1430 else if (FLOATP (attrs[SOUND_VOLUME])) 1430 else if (FLOATP (attrs[SOUND_VOLUME]))
1431 { 1431 {
diff --git a/src/syntax.c b/src/syntax.c
index 8434f47a5f7..ee83ed070a0 100644
--- a/src/syntax.c
+++ b/src/syntax.c
@@ -615,7 +615,7 @@ find_defun_start (ptrdiff_t pos, ptrdiff_t pos_byte)
615 Lisp_Object boc = Fnth (make_fixnum (8), ppss); 615 Lisp_Object boc = Fnth (make_fixnum (8), ppss);
616 if (FIXED_OR_FLOATP (boc)) 616 if (FIXED_OR_FLOATP (boc))
617 { 617 {
618 find_start_value = XINT (boc); 618 find_start_value = XFIXNUM (boc);
619 find_start_value_byte = CHAR_TO_BYTE (find_start_value); 619 find_start_value_byte = CHAR_TO_BYTE (find_start_value);
620 } 620 }
621 else 621 else
@@ -952,7 +952,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
952 { 952 {
953 adjusted = true; 953 adjusted = true;
954 find_start_value 954 find_start_value
955 = CONSP (state.levelstarts) ? XINT (XCAR (state.levelstarts)) 955 = CONSP (state.levelstarts) ? XFIXNUM (XCAR (state.levelstarts))
956 : state.thislevelstart >= 0 ? state.thislevelstart 956 : state.thislevelstart >= 0 ? state.thislevelstart
957 : find_start_value; 957 : find_start_value;
958 find_start_value_byte = CHAR_TO_BYTE (find_start_value); 958 find_start_value_byte = CHAR_TO_BYTE (find_start_value);
@@ -1118,7 +1118,7 @@ this is probably the wrong function to use, because it can't take
1118{ 1118{
1119 int char_int; 1119 int char_int;
1120 CHECK_CHARACTER (character); 1120 CHECK_CHARACTER (character);
1121 char_int = XINT (character); 1121 char_int = XFIXNUM (character);
1122 SETUP_BUFFER_SYNTAX_TABLE (); 1122 SETUP_BUFFER_SYNTAX_TABLE ();
1123 return make_fixnum (syntax_code_spec[SYNTAX (char_int)]); 1123 return make_fixnum (syntax_code_spec[SYNTAX (char_int)]);
1124} 1124}
@@ -1130,7 +1130,7 @@ DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0,
1130 int char_int; 1130 int char_int;
1131 enum syntaxcode code; 1131 enum syntaxcode code;
1132 CHECK_CHARACTER (character); 1132 CHECK_CHARACTER (character);
1133 char_int = XINT (character); 1133 char_int = XFIXNUM (character);
1134 SETUP_BUFFER_SYNTAX_TABLE (); 1134 SETUP_BUFFER_SYNTAX_TABLE ();
1135 code = SYNTAX (char_int); 1135 code = SYNTAX (char_int);
1136 if (code == Sopen || code == Sclose) 1136 if (code == Sopen || code == Sclose)
@@ -1165,7 +1165,7 @@ the value of a `syntax-table' text property. */)
1165 int len; 1165 int len;
1166 int character = STRING_CHAR_AND_LENGTH (p, len); 1166 int character = STRING_CHAR_AND_LENGTH (p, len);
1167 XSETINT (match, character); 1167 XSETINT (match, character);
1168 if (XFASTINT (match) == ' ') 1168 if (XFIXNAT (match) == ' ')
1169 match = Qnil; 1169 match = Qnil;
1170 p += len; 1170 p += len;
1171 } 1171 }
@@ -1277,7 +1277,7 @@ usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */)
1277 if (CONSP (c)) 1277 if (CONSP (c))
1278 SET_RAW_SYNTAX_ENTRY_RANGE (syntax_table, c, newentry); 1278 SET_RAW_SYNTAX_ENTRY_RANGE (syntax_table, c, newentry);
1279 else 1279 else
1280 SET_RAW_SYNTAX_ENTRY (syntax_table, XINT (c), newentry); 1280 SET_RAW_SYNTAX_ENTRY (syntax_table, XFIXNUM (c), newentry);
1281 1281
1282 /* We clear the regexp cache, since character classes can now have 1282 /* We clear the regexp cache, since character classes can now have
1283 different values from those in the compiled regexps.*/ 1283 different values from those in the compiled regexps.*/
@@ -1325,7 +1325,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
1325 return syntax; 1325 return syntax;
1326 } 1326 }
1327 1327
1328 syntax_code = XINT (first) & INT_MAX; 1328 syntax_code = XFIXNUM (first) & INT_MAX;
1329 code = syntax_code & 0377; 1329 code = syntax_code & 0377;
1330 start1 = SYNTAX_FLAGS_COMSTART_FIRST (syntax_code); 1330 start1 = SYNTAX_FLAGS_COMSTART_FIRST (syntax_code);
1331 start2 = SYNTAX_FLAGS_COMSTART_SECOND (syntax_code); 1331 start2 = SYNTAX_FLAGS_COMSTART_SECOND (syntax_code);
@@ -1348,7 +1348,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
1348 if (NILP (match_lisp)) 1348 if (NILP (match_lisp))
1349 insert (" ", 1); 1349 insert (" ", 1);
1350 else 1350 else
1351 insert_char (XINT (match_lisp)); 1351 insert_char (XFIXNUM (match_lisp));
1352 1352
1353 if (start1) 1353 if (start1)
1354 insert ("1", 1); 1354 insert ("1", 1);
@@ -1413,7 +1413,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
1413 if (!NILP (match_lisp)) 1413 if (!NILP (match_lisp))
1414 { 1414 {
1415 insert_string (", matches "); 1415 insert_string (", matches ");
1416 insert_char (XINT (match_lisp)); 1416 insert_char (XFIXNUM (match_lisp));
1417 } 1417 }
1418 1418
1419 if (start1) 1419 if (start1)
@@ -1481,9 +1481,9 @@ scan_words (ptrdiff_t from, EMACS_INT count)
1481 if (! NILP (Ffboundp (func))) 1481 if (! NILP (Ffboundp (func)))
1482 { 1482 {
1483 pos = call2 (func, make_fixnum (from - 1), make_fixnum (end)); 1483 pos = call2 (func, make_fixnum (from - 1), make_fixnum (end));
1484 if (FIXNUMP (pos) && from < XINT (pos) && XINT (pos) <= ZV) 1484 if (FIXNUMP (pos) && from < XFIXNUM (pos) && XFIXNUM (pos) <= ZV)
1485 { 1485 {
1486 from = XINT (pos); 1486 from = XFIXNUM (pos);
1487 from_byte = CHAR_TO_BYTE (from); 1487 from_byte = CHAR_TO_BYTE (from);
1488 } 1488 }
1489 } 1489 }
@@ -1530,9 +1530,9 @@ scan_words (ptrdiff_t from, EMACS_INT count)
1530 if (! NILP (Ffboundp (func))) 1530 if (! NILP (Ffboundp (func)))
1531 { 1531 {
1532 pos = call2 (func, make_fixnum (from), make_fixnum (beg)); 1532 pos = call2 (func, make_fixnum (from), make_fixnum (beg));
1533 if (FIXNUMP (pos) && BEGV <= XINT (pos) && XINT (pos) < from) 1533 if (FIXNUMP (pos) && BEGV <= XFIXNUM (pos) && XFIXNUM (pos) < from)
1534 { 1534 {
1535 from = XINT (pos); 1535 from = XFIXNUM (pos);
1536 from_byte = CHAR_TO_BYTE (from); 1536 from_byte = CHAR_TO_BYTE (from);
1537 } 1537 }
1538 } 1538 }
@@ -1588,14 +1588,14 @@ instead. See Info node `(elisp) Word Motion' for details. */)
1588 else 1588 else
1589 CHECK_FIXNUM (arg); 1589 CHECK_FIXNUM (arg);
1590 1590
1591 val = orig_val = scan_words (PT, XINT (arg)); 1591 val = orig_val = scan_words (PT, XFIXNUM (arg));
1592 if (! orig_val) 1592 if (! orig_val)
1593 val = XINT (arg) > 0 ? ZV : BEGV; 1593 val = XFIXNUM (arg) > 0 ? ZV : BEGV;
1594 1594
1595 /* Avoid jumping out of an input field. */ 1595 /* Avoid jumping out of an input field. */
1596 tmp = Fconstrain_to_field (make_fixnum (val), make_fixnum (PT), 1596 tmp = Fconstrain_to_field (make_fixnum (val), make_fixnum (PT),
1597 Qnil, Qnil, Qnil); 1597 Qnil, Qnil, Qnil);
1598 val = XFASTINT (tmp); 1598 val = XFIXNAT (tmp);
1599 1599
1600 SET_PT (val); 1600 SET_PT (val);
1601 return val == orig_val ? Qt : Qnil; 1601 return val == orig_val ? Qt : Qnil;
@@ -1679,13 +1679,13 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
1679 CHECK_FIXNUM_COERCE_MARKER (lim); 1679 CHECK_FIXNUM_COERCE_MARKER (lim);
1680 1680
1681 /* In any case, don't allow scan outside bounds of buffer. */ 1681 /* In any case, don't allow scan outside bounds of buffer. */
1682 if (XINT (lim) > ZV) 1682 if (XFIXNUM (lim) > ZV)
1683 XSETFASTINT (lim, ZV); 1683 XSETFASTINT (lim, ZV);
1684 if (XINT (lim) < BEGV) 1684 if (XFIXNUM (lim) < BEGV)
1685 XSETFASTINT (lim, BEGV); 1685 XSETFASTINT (lim, BEGV);
1686 1686
1687 multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters)) 1687 multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters))
1688 && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE)); 1688 && (XFIXNUM (lim) - PT != CHAR_TO_BYTE (XFIXNUM (lim)) - PT_BYTE));
1689 string_multibyte = SBYTES (string) > SCHARS (string); 1689 string_multibyte = SBYTES (string) > SCHARS (string);
1690 1690
1691 memset (fastmap, 0, sizeof fastmap); 1691 memset (fastmap, 0, sizeof fastmap);
@@ -1936,13 +1936,13 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
1936 1936
1937 if (forwardp) 1937 if (forwardp)
1938 { 1938 {
1939 endp = (XINT (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim)); 1939 endp = (XFIXNUM (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XFIXNUM (lim));
1940 stop = (pos < GPT && GPT < XINT (lim)) ? GPT_ADDR : endp; 1940 stop = (pos < GPT && GPT < XFIXNUM (lim)) ? GPT_ADDR : endp;
1941 } 1941 }
1942 else 1942 else
1943 { 1943 {
1944 endp = CHAR_POS_ADDR (XINT (lim)); 1944 endp = CHAR_POS_ADDR (XFIXNUM (lim));
1945 stop = (pos >= GPT && GPT > XINT (lim)) ? GAP_END_ADDR : endp; 1945 stop = (pos >= GPT && GPT > XFIXNUM (lim)) ? GAP_END_ADDR : endp;
1946 } 1946 }
1947 1947
1948 /* This code may look up syntax tables using functions that rely on the 1948 /* This code may look up syntax tables using functions that rely on the
@@ -2118,16 +2118,16 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
2118 CHECK_FIXNUM_COERCE_MARKER (lim); 2118 CHECK_FIXNUM_COERCE_MARKER (lim);
2119 2119
2120 /* In any case, don't allow scan outside bounds of buffer. */ 2120 /* In any case, don't allow scan outside bounds of buffer. */
2121 if (XINT (lim) > ZV) 2121 if (XFIXNUM (lim) > ZV)
2122 XSETFASTINT (lim, ZV); 2122 XSETFASTINT (lim, ZV);
2123 if (XINT (lim) < BEGV) 2123 if (XFIXNUM (lim) < BEGV)
2124 XSETFASTINT (lim, BEGV); 2124 XSETFASTINT (lim, BEGV);
2125 2125
2126 if (forwardp ? (PT >= XFASTINT (lim)) : (PT <= XFASTINT (lim))) 2126 if (forwardp ? (PT >= XFIXNAT (lim)) : (PT <= XFIXNAT (lim)))
2127 return make_fixnum (0); 2127 return make_fixnum (0);
2128 2128
2129 multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters)) 2129 multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters))
2130 && (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE)); 2130 && (XFIXNUM (lim) - PT != CHAR_TO_BYTE (XFIXNUM (lim)) - PT_BYTE));
2131 2131
2132 memset (fastmap, 0, sizeof fastmap); 2132 memset (fastmap, 0, sizeof fastmap);
2133 2133
@@ -2172,8 +2172,8 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
2172 while (true) 2172 while (true)
2173 { 2173 {
2174 p = BYTE_POS_ADDR (pos_byte); 2174 p = BYTE_POS_ADDR (pos_byte);
2175 endp = XINT (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim)); 2175 endp = XFIXNUM (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XFIXNUM (lim));
2176 stop = pos < GPT && GPT < XINT (lim) ? GPT_ADDR : endp; 2176 stop = pos < GPT && GPT < XFIXNUM (lim) ? GPT_ADDR : endp;
2177 2177
2178 do 2178 do
2179 { 2179 {
@@ -2205,8 +2205,8 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
2205 else 2205 else
2206 { 2206 {
2207 p = BYTE_POS_ADDR (pos_byte); 2207 p = BYTE_POS_ADDR (pos_byte);
2208 endp = CHAR_POS_ADDR (XINT (lim)); 2208 endp = CHAR_POS_ADDR (XFIXNUM (lim));
2209 stop = pos >= GPT && GPT > XINT (lim) ? GAP_END_ADDR : endp; 2209 stop = pos >= GPT && GPT > XFIXNUM (lim) ? GAP_END_ADDR : endp;
2210 2210
2211 if (multibyte) 2211 if (multibyte)
2212 { 2212 {
@@ -2275,7 +2275,7 @@ in_classes (int c, Lisp_Object iso_classes)
2275 elt = XCAR (iso_classes); 2275 elt = XCAR (iso_classes);
2276 iso_classes = XCDR (iso_classes); 2276 iso_classes = XCDR (iso_classes);
2277 2277
2278 if (re_iswctype (c, XFASTINT (elt))) 2278 if (re_iswctype (c, XFIXNAT (elt)))
2279 fits_class = 1; 2279 fits_class = 1;
2280 } 2280 }
2281 2281
@@ -2443,7 +2443,7 @@ between them, return t; otherwise return nil. */)
2443 unsigned short int quit_count = 0; 2443 unsigned short int quit_count = 0;
2444 2444
2445 CHECK_FIXNUM (count); 2445 CHECK_FIXNUM (count);
2446 count1 = XINT (count); 2446 count1 = XFIXNUM (count);
2447 stop = count1 > 0 ? ZV : BEGV; 2447 stop = count1 > 0 ? ZV : BEGV;
2448 2448
2449 from = PT; 2449 from = PT;
@@ -3057,7 +3057,7 @@ that point is zero, and signal an error if the depth is nonzero. */)
3057 CHECK_FIXNUM (count); 3057 CHECK_FIXNUM (count);
3058 CHECK_FIXNUM (depth); 3058 CHECK_FIXNUM (depth);
3059 3059
3060 return scan_lists (XINT (from), XINT (count), XINT (depth), 0); 3060 return scan_lists (XFIXNUM (from), XFIXNUM (count), XFIXNUM (depth), 0);
3061} 3061}
3062 3062
3063DEFUN ("scan-sexps", Fscan_sexps, Sscan_sexps, 2, 2, 0, 3063DEFUN ("scan-sexps", Fscan_sexps, Sscan_sexps, 2, 2, 0,
@@ -3076,7 +3076,7 @@ but before count is used up, nil is returned. */)
3076 CHECK_FIXNUM (from); 3076 CHECK_FIXNUM (from);
3077 CHECK_FIXNUM (count); 3077 CHECK_FIXNUM (count);
3078 3078
3079 return scan_lists (XINT (from), XINT (count), 0, 1); 3079 return scan_lists (XFIXNUM (from), XFIXNUM (count), 0, 1);
3080} 3080}
3081 3081
3082DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars, 3082DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
@@ -3217,7 +3217,7 @@ do { prev_from = from; \
3217 { 3217 {
3218 Lisp_Object temhd = Fcar (tem); 3218 Lisp_Object temhd = Fcar (tem);
3219 if (RANGED_FIXNUMP (PTRDIFF_MIN, temhd, PTRDIFF_MAX)) 3219 if (RANGED_FIXNUMP (PTRDIFF_MIN, temhd, PTRDIFF_MAX))
3220 curlevel->last = XINT (temhd); 3220 curlevel->last = XFIXNUM (temhd);
3221 if (++curlevel == endlevel) 3221 if (++curlevel == endlevel)
3222 curlevel--; /* error ("Nesting too deep for parser"); */ 3222 curlevel--; /* error ("Nesting too deep for parser"); */
3223 curlevel->prev = -1; 3223 curlevel->prev = -1;
@@ -3490,7 +3490,7 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
3490 { 3490 {
3491 tem = Fcar (external); 3491 tem = Fcar (external);
3492 if (!NILP (tem)) 3492 if (!NILP (tem))
3493 state->depth = XINT (tem); 3493 state->depth = XFIXNUM (tem);
3494 else 3494 else
3495 state->depth = 0; 3495 state->depth = 0;
3496 3496
@@ -3500,13 +3500,13 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
3500 tem = Fcar (external); 3500 tem = Fcar (external);
3501 /* Check whether we are inside string_fence-style string: */ 3501 /* Check whether we are inside string_fence-style string: */
3502 state->instring = (!NILP (tem) 3502 state->instring = (!NILP (tem)
3503 ? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE) 3503 ? (CHARACTERP (tem) ? XFIXNAT (tem) : ST_STRING_STYLE)
3504 : -1); 3504 : -1);
3505 3505
3506 external = Fcdr (external); 3506 external = Fcdr (external);
3507 tem = Fcar (external); 3507 tem = Fcar (external);
3508 state->incomment = (!NILP (tem) 3508 state->incomment = (!NILP (tem)
3509 ? (FIXNUMP (tem) ? XINT (tem) : -1) 3509 ? (FIXNUMP (tem) ? XFIXNUM (tem) : -1)
3510 : 0); 3510 : 0);
3511 3511
3512 external = Fcdr (external); 3512 external = Fcdr (external);
@@ -3521,20 +3521,20 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
3521 state->comstyle = (NILP (tem) 3521 state->comstyle = (NILP (tem)
3522 ? 0 3522 ? 0
3523 : (RANGED_FIXNUMP (0, tem, ST_COMMENT_STYLE) 3523 : (RANGED_FIXNUMP (0, tem, ST_COMMENT_STYLE)
3524 ? XINT (tem) 3524 ? XFIXNUM (tem)
3525 : ST_COMMENT_STYLE)); 3525 : ST_COMMENT_STYLE));
3526 3526
3527 external = Fcdr (external); 3527 external = Fcdr (external);
3528 tem = Fcar (external); 3528 tem = Fcar (external);
3529 state->comstr_start = 3529 state->comstr_start =
3530 RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1; 3530 RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XFIXNUM (tem) : -1;
3531 external = Fcdr (external); 3531 external = Fcdr (external);
3532 tem = Fcar (external); 3532 tem = Fcar (external);
3533 state->levelstarts = tem; 3533 state->levelstarts = tem;
3534 3534
3535 external = Fcdr (external); 3535 external = Fcdr (external);
3536 tem = Fcar (external); 3536 tem = Fcar (external);
3537 state->prev_syntax = NILP (tem) ? Smax : XINT (tem); 3537 state->prev_syntax = NILP (tem) ? Smax : XFIXNUM (tem);
3538 } 3538 }
3539} 3539}
3540 3540
@@ -3584,15 +3584,15 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment.
3584 if (!NILP (targetdepth)) 3584 if (!NILP (targetdepth))
3585 { 3585 {
3586 CHECK_FIXNUM (targetdepth); 3586 CHECK_FIXNUM (targetdepth);
3587 target = XINT (targetdepth); 3587 target = XFIXNUM (targetdepth);
3588 } 3588 }
3589 else 3589 else
3590 target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */ 3590 target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */
3591 3591
3592 validate_region (&from, &to); 3592 validate_region (&from, &to);
3593 internalize_parse_state (oldstate, &state); 3593 internalize_parse_state (oldstate, &state);
3594 scan_sexps_forward (&state, XINT (from), CHAR_TO_BYTE (XINT (from)), 3594 scan_sexps_forward (&state, XFIXNUM (from), CHAR_TO_BYTE (XFIXNUM (from)),
3595 XINT (to), 3595 XFIXNUM (to),
3596 target, !NILP (stopbefore), 3596 target, !NILP (stopbefore),
3597 (NILP (commentstop) 3597 (NILP (commentstop)
3598 ? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1))); 3598 ? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1)));
diff --git a/src/syntax.h b/src/syntax.h
index f02a17ce8d6..d971c747539 100644
--- a/src/syntax.h
+++ b/src/syntax.h
@@ -118,7 +118,7 @@ INLINE int
118syntax_property_with_flags (int c, bool via_property) 118syntax_property_with_flags (int c, bool via_property)
119{ 119{
120 Lisp_Object ent = syntax_property_entry (c, via_property); 120 Lisp_Object ent = syntax_property_entry (c, via_property);
121 return CONSP (ent) ? XINT (XCAR (ent)) : Swhitespace; 121 return CONSP (ent) ? XFIXNUM (XCAR (ent)) : Swhitespace;
122} 122}
123INLINE int 123INLINE int
124SYNTAX_WITH_FLAGS (int c) 124SYNTAX_WITH_FLAGS (int c)
diff --git a/src/sysdep.c b/src/sysdep.c
index 3bc7adcc89b..cf2982bca11 100644
--- a/src/sysdep.c
+++ b/src/sysdep.c
@@ -2851,7 +2851,7 @@ serial_configure (struct Lisp_Process *p,
2851 else 2851 else
2852 tem = Fplist_get (p->childp, QCspeed); 2852 tem = Fplist_get (p->childp, QCspeed);
2853 CHECK_FIXNUM (tem); 2853 CHECK_FIXNUM (tem);
2854 err = cfsetspeed (&attr, XINT (tem)); 2854 err = cfsetspeed (&attr, XFIXNUM (tem));
2855 if (err != 0) 2855 if (err != 0)
2856 report_file_error ("Failed cfsetspeed", tem); 2856 report_file_error ("Failed cfsetspeed", tem);
2857 childp2 = Fplist_put (childp2, QCspeed, tem); 2857 childp2 = Fplist_put (childp2, QCspeed, tem);
@@ -2864,15 +2864,15 @@ serial_configure (struct Lisp_Process *p,
2864 if (NILP (tem)) 2864 if (NILP (tem))
2865 tem = make_fixnum (8); 2865 tem = make_fixnum (8);
2866 CHECK_FIXNUM (tem); 2866 CHECK_FIXNUM (tem);
2867 if (XINT (tem) != 7 && XINT (tem) != 8) 2867 if (XFIXNUM (tem) != 7 && XFIXNUM (tem) != 8)
2868 error (":bytesize must be nil (8), 7, or 8"); 2868 error (":bytesize must be nil (8), 7, or 8");
2869 summary[0] = XINT (tem) + '0'; 2869 summary[0] = XFIXNUM (tem) + '0';
2870#if defined (CSIZE) && defined (CS7) && defined (CS8) 2870#if defined (CSIZE) && defined (CS7) && defined (CS8)
2871 attr.c_cflag &= ~CSIZE; 2871 attr.c_cflag &= ~CSIZE;
2872 attr.c_cflag |= ((XINT (tem) == 7) ? CS7 : CS8); 2872 attr.c_cflag |= ((XFIXNUM (tem) == 7) ? CS7 : CS8);
2873#else 2873#else
2874 /* Don't error on bytesize 8, which should be set by cfmakeraw. */ 2874 /* Don't error on bytesize 8, which should be set by cfmakeraw. */
2875 if (XINT (tem) != 8) 2875 if (XFIXNUM (tem) != 8)
2876 error ("Bytesize cannot be changed"); 2876 error ("Bytesize cannot be changed");
2877#endif 2877#endif
2878 childp2 = Fplist_put (childp2, QCbytesize, tem); 2878 childp2 = Fplist_put (childp2, QCbytesize, tem);
@@ -2918,16 +2918,16 @@ serial_configure (struct Lisp_Process *p,
2918 if (NILP (tem)) 2918 if (NILP (tem))
2919 tem = make_fixnum (1); 2919 tem = make_fixnum (1);
2920 CHECK_FIXNUM (tem); 2920 CHECK_FIXNUM (tem);
2921 if (XINT (tem) != 1 && XINT (tem) != 2) 2921 if (XFIXNUM (tem) != 1 && XFIXNUM (tem) != 2)
2922 error (":stopbits must be nil (1 stopbit), 1, or 2"); 2922 error (":stopbits must be nil (1 stopbit), 1, or 2");
2923 summary[2] = XINT (tem) + '0'; 2923 summary[2] = XFIXNUM (tem) + '0';
2924#if defined (CSTOPB) 2924#if defined (CSTOPB)
2925 attr.c_cflag &= ~CSTOPB; 2925 attr.c_cflag &= ~CSTOPB;
2926 if (XINT (tem) == 2) 2926 if (XFIXNUM (tem) == 2)
2927 attr.c_cflag |= CSTOPB; 2927 attr.c_cflag |= CSTOPB;
2928#else 2928#else
2929 /* Don't error on 1 stopbit, which should be set by cfmakeraw. */ 2929 /* Don't error on 1 stopbit, which should be set by cfmakeraw. */
2930 if (XINT (tem) != 1) 2930 if (XFIXNUM (tem) != 1)
2931 error ("Stopbits cannot be configured"); 2931 error ("Stopbits cannot be configured");
2932#endif 2932#endif
2933 childp2 = Fplist_put (childp2, QCstopbits, tem); 2933 childp2 = Fplist_put (childp2, QCstopbits, tem);
diff --git a/src/term.c b/src/term.c
index 026ead3f9a7..ce24f6915fc 100644
--- a/src/term.c
+++ b/src/term.c
@@ -2147,7 +2147,7 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
2147 else 2147 else
2148 color_mode = Qnil; 2148 color_mode = Qnil;
2149 2149
2150 mode = TYPE_RANGED_FIXNUMP (int, color_mode) ? XINT (color_mode) : 0; 2150 mode = TYPE_RANGED_FIXNUMP (int, color_mode) ? XFIXNUM (color_mode) : 0;
2151 2151
2152 if (mode != tty->previous_color_mode) 2152 if (mode != tty->previous_color_mode)
2153 { 2153 {
@@ -2805,8 +2805,8 @@ mouse_get_xy (int *x, int *y)
2805 &time_dummy); 2805 &time_dummy);
2806 if (!NILP (lmx)) 2806 if (!NILP (lmx))
2807 { 2807 {
2808 *x = XINT (lmx); 2808 *x = XFIXNUM (lmx);
2809 *y = XINT (lmy); 2809 *y = XFIXNUM (lmy);
2810 } 2810 }
2811} 2811}
2812 2812
@@ -3477,7 +3477,7 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
3477 pos = AREF (items, i + 3); 3477 pos = AREF (items, i + 3);
3478 if (NILP (str)) 3478 if (NILP (str))
3479 return; 3479 return;
3480 ix = XINT (pos); 3480 ix = XFIXNUM (pos);
3481 if (ix <= *x 3481 if (ix <= *x
3482 /* We use <= so the blank between 2 items on a TTY is 3482 /* We use <= so the blank between 2 items on a TTY is
3483 considered part of the previous item. */ 3483 considered part of the previous item. */
@@ -3488,14 +3488,14 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
3488 if (which == TTYM_NEXT) 3488 if (which == TTYM_NEXT)
3489 { 3489 {
3490 if (i < last_i) 3490 if (i < last_i)
3491 *x = XINT (AREF (items, i + 4 + 3)); 3491 *x = XFIXNUM (AREF (items, i + 4 + 3));
3492 else 3492 else
3493 *x = 0; /* Wrap around to the first item. */ 3493 *x = 0; /* Wrap around to the first item. */
3494 } 3494 }
3495 else if (prev_x < 0) 3495 else if (prev_x < 0)
3496 { 3496 {
3497 /* Wrap around to the last item. */ 3497 /* Wrap around to the last item. */
3498 *x = XINT (AREF (items, last_i + 3)); 3498 *x = XFIXNUM (AREF (items, last_i + 3));
3499 } 3499 }
3500 else 3500 else
3501 *x = prev_x; 3501 *x = prev_x;
diff --git a/src/termhooks.h b/src/termhooks.h
index d8c5edc948e..160bd2f4803 100644
--- a/src/termhooks.h
+++ b/src/termhooks.h
@@ -346,7 +346,7 @@ enum {
346 FIXNUM_BITS, so using it to represent a modifier key means that 346 FIXNUM_BITS, so using it to represent a modifier key means that
347 characters thus modified have different integer equivalents 347 characters thus modified have different integer equivalents
348 depending on the architecture they're running on. Oh, and 348 depending on the architecture they're running on. Oh, and
349 applying XINT to a character whose 2^28 bit is set might sign-extend 349 applying XFIXNUM to a character whose 2^28 bit is set might sign-extend
350 it, so you get a bunch of bits in the mask you didn't want. 350 it, so you get a bunch of bits in the mask you didn't want.
351 351
352 The CHAR_ macros are defined in lisp.h. */ 352 The CHAR_ macros are defined in lisp.h. */
diff --git a/src/textprop.c b/src/textprop.c
index 3f636a125ab..4bd4892b730 100644
--- a/src/textprop.c
+++ b/src/textprop.c
@@ -79,7 +79,7 @@ text_read_only (Lisp_Object propval)
79static void 79static void
80modify_text_properties (Lisp_Object buffer, Lisp_Object start, Lisp_Object end) 80modify_text_properties (Lisp_Object buffer, Lisp_Object start, Lisp_Object end)
81{ 81{
82 ptrdiff_t b = XINT (start), e = XINT (end); 82 ptrdiff_t b = XFIXNUM (start), e = XFIXNUM (end);
83 struct buffer *buf = XBUFFER (buffer), *old = current_buffer; 83 struct buffer *buf = XBUFFER (buffer), *old = current_buffer;
84 84
85 set_buffer_internal (buf); 85 set_buffer_internal (buf);
@@ -145,7 +145,7 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
145 if (EQ (*begin, *end) && begin != end) 145 if (EQ (*begin, *end) && begin != end)
146 return NULL; 146 return NULL;
147 147
148 if (XINT (*begin) > XINT (*end)) 148 if (XFIXNUM (*begin) > XFIXNUM (*end))
149 { 149 {
150 Lisp_Object n; 150 Lisp_Object n;
151 n = *begin; 151 n = *begin;
@@ -157,8 +157,8 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
157 { 157 {
158 register struct buffer *b = XBUFFER (object); 158 register struct buffer *b = XBUFFER (object);
159 159
160 if (!(BUF_BEGV (b) <= XINT (*begin) && XINT (*begin) <= XINT (*end) 160 if (!(BUF_BEGV (b) <= XFIXNUM (*begin) && XFIXNUM (*begin) <= XFIXNUM (*end)
161 && XINT (*end) <= BUF_ZV (b))) 161 && XFIXNUM (*end) <= BUF_ZV (b)))
162 args_out_of_range (*begin, *end); 162 args_out_of_range (*begin, *end);
163 i = buffer_intervals (b); 163 i = buffer_intervals (b);
164 164
@@ -166,24 +166,24 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
166 if (BUF_BEGV (b) == BUF_ZV (b)) 166 if (BUF_BEGV (b) == BUF_ZV (b))
167 return NULL; 167 return NULL;
168 168
169 searchpos = XINT (*begin); 169 searchpos = XFIXNUM (*begin);
170 } 170 }
171 else 171 else
172 { 172 {
173 ptrdiff_t len = SCHARS (object); 173 ptrdiff_t len = SCHARS (object);
174 174
175 if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end) 175 if (! (0 <= XFIXNUM (*begin) && XFIXNUM (*begin) <= XFIXNUM (*end)
176 && XINT (*end) <= len)) 176 && XFIXNUM (*end) <= len))
177 args_out_of_range (*begin, *end); 177 args_out_of_range (*begin, *end);
178 XSETFASTINT (*begin, XFASTINT (*begin)); 178 XSETFASTINT (*begin, XFIXNAT (*begin));
179 if (begin != end) 179 if (begin != end)
180 XSETFASTINT (*end, XFASTINT (*end)); 180 XSETFASTINT (*end, XFIXNAT (*end));
181 i = string_intervals (object); 181 i = string_intervals (object);
182 182
183 if (len == 0) 183 if (len == 0)
184 return NULL; 184 return NULL;
185 185
186 searchpos = XINT (*begin); 186 searchpos = XFIXNUM (*begin);
187 } 187 }
188 188
189 if (!i) 189 if (!i)
@@ -572,7 +572,7 @@ If POSITION is at the end of OBJECT, the value is nil. */)
572 it means it's the end of OBJECT. 572 it means it's the end of OBJECT.
573 There are no properties at the very end, 573 There are no properties at the very end,
574 since no character follows. */ 574 since no character follows. */
575 if (XINT (position) == LENGTH (i) + i->position) 575 if (XFIXNUM (position) == LENGTH (i) + i->position)
576 return Qnil; 576 return Qnil;
577 577
578 return i->plist; 578 return i->plist;
@@ -621,14 +621,14 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
621 Lisp_Object *overlay_vec; 621 Lisp_Object *overlay_vec;
622 struct buffer *obuf = current_buffer; 622 struct buffer *obuf = current_buffer;
623 623
624 if (XINT (position) < BUF_BEGV (XBUFFER (object)) 624 if (XFIXNUM (position) < BUF_BEGV (XBUFFER (object))
625 || XINT (position) > BUF_ZV (XBUFFER (object))) 625 || XFIXNUM (position) > BUF_ZV (XBUFFER (object)))
626 xsignal1 (Qargs_out_of_range, position); 626 xsignal1 (Qargs_out_of_range, position);
627 627
628 set_buffer_temp (XBUFFER (object)); 628 set_buffer_temp (XBUFFER (object));
629 629
630 USE_SAFE_ALLOCA; 630 USE_SAFE_ALLOCA;
631 GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, false); 631 GET_OVERLAYS_AT (XFIXNUM (position), overlay_vec, noverlays, NULL, false);
632 noverlays = sort_overlays (overlay_vec, noverlays, w); 632 noverlays = sort_overlays (overlay_vec, noverlays, w);
633 633
634 set_buffer_temp (obuf); 634 set_buffer_temp (obuf);
@@ -715,7 +715,7 @@ before LIMIT. LIMIT is a no-op if it is greater than (point-max). */)
715 if (! NILP (limit)) 715 if (! NILP (limit))
716 { 716 {
717 CHECK_FIXNUM_COERCE_MARKER (limit); 717 CHECK_FIXNUM_COERCE_MARKER (limit);
718 if (XINT (limit) < XINT (temp)) 718 if (XFIXNUM (limit) < XFIXNUM (temp))
719 temp = limit; 719 temp = limit;
720 } 720 }
721 return Fnext_property_change (position, Qnil, temp); 721 return Fnext_property_change (position, Qnil, temp);
@@ -741,7 +741,7 @@ before LIMIT. LIMIT is a no-op if it is less than (point-min). */)
741 if (! NILP (limit)) 741 if (! NILP (limit))
742 { 742 {
743 CHECK_FIXNUM_COERCE_MARKER (limit); 743 CHECK_FIXNUM_COERCE_MARKER (limit);
744 if (XINT (limit) > XINT (temp)) 744 if (XFIXNUM (limit) > XFIXNUM (temp))
745 temp = limit; 745 temp = limit;
746 } 746 }
747 return Fprevious_property_change (position, Qnil, temp); 747 return Fprevious_property_change (position, Qnil, temp);
@@ -805,17 +805,17 @@ last valid position in OBJECT. */)
805 else 805 else
806 CHECK_FIXNUM_COERCE_MARKER (limit); 806 CHECK_FIXNUM_COERCE_MARKER (limit);
807 807
808 if (XFASTINT (position) >= XFASTINT (limit)) 808 if (XFIXNAT (position) >= XFIXNAT (limit))
809 { 809 {
810 position = limit; 810 position = limit;
811 if (XFASTINT (position) > ZV) 811 if (XFIXNAT (position) > ZV)
812 XSETFASTINT (position, ZV); 812 XSETFASTINT (position, ZV);
813 } 813 }
814 else 814 else
815 while (true) 815 while (true)
816 { 816 {
817 position = Fnext_char_property_change (position, limit); 817 position = Fnext_char_property_change (position, limit);
818 if (XFASTINT (position) >= XFASTINT (limit)) 818 if (XFIXNAT (position) >= XFIXNAT (limit))
819 { 819 {
820 position = limit; 820 position = limit;
821 break; 821 break;
@@ -887,23 +887,23 @@ first valid position in OBJECT. */)
887 else 887 else
888 CHECK_FIXNUM_COERCE_MARKER (limit); 888 CHECK_FIXNUM_COERCE_MARKER (limit);
889 889
890 if (XFASTINT (position) <= XFASTINT (limit)) 890 if (XFIXNAT (position) <= XFIXNAT (limit))
891 { 891 {
892 position = limit; 892 position = limit;
893 if (XFASTINT (position) < BEGV) 893 if (XFIXNAT (position) < BEGV)
894 XSETFASTINT (position, BEGV); 894 XSETFASTINT (position, BEGV);
895 } 895 }
896 else 896 else
897 { 897 {
898 Lisp_Object initial_value 898 Lisp_Object initial_value
899 = Fget_char_property (make_fixnum (XFASTINT (position) - 1), 899 = Fget_char_property (make_fixnum (XFIXNAT (position) - 1),
900 prop, object); 900 prop, object);
901 901
902 while (true) 902 while (true)
903 { 903 {
904 position = Fprevious_char_property_change (position, limit); 904 position = Fprevious_char_property_change (position, limit);
905 905
906 if (XFASTINT (position) <= XFASTINT (limit)) 906 if (XFIXNAT (position) <= XFIXNAT (limit))
907 { 907 {
908 position = limit; 908 position = limit;
909 break; 909 break;
@@ -911,7 +911,7 @@ first valid position in OBJECT. */)
911 else 911 else
912 { 912 {
913 Lisp_Object value 913 Lisp_Object value
914 = Fget_char_property (make_fixnum (XFASTINT (position) - 1), 914 = Fget_char_property (make_fixnum (XFIXNAT (position) - 1),
915 prop, object); 915 prop, object);
916 916
917 if (!EQ (value, initial_value)) 917 if (!EQ (value, initial_value))
@@ -976,13 +976,13 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
976 next = next_interval (i); 976 next = next_interval (i);
977 977
978 while (next && intervals_equal (i, next) 978 while (next && intervals_equal (i, next)
979 && (NILP (limit) || next->position < XFASTINT (limit))) 979 && (NILP (limit) || next->position < XFIXNAT (limit)))
980 next = next_interval (next); 980 next = next_interval (next);
981 981
982 if (!next 982 if (!next
983 || (next->position 983 || (next->position
984 >= (FIXNUMP (limit) 984 >= (FIXNUMP (limit)
985 ? XFASTINT (limit) 985 ? XFIXNAT (limit)
986 : (STRINGP (object) 986 : (STRINGP (object)
987 ? SCHARS (object) 987 ? SCHARS (object)
988 : BUF_ZV (XBUFFER (object)))))) 988 : BUF_ZV (XBUFFER (object))))))
@@ -1025,13 +1025,13 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
1025 next = next_interval (i); 1025 next = next_interval (i);
1026 while (next 1026 while (next
1027 && EQ (here_val, textget (next->plist, prop)) 1027 && EQ (here_val, textget (next->plist, prop))
1028 && (NILP (limit) || next->position < XFASTINT (limit))) 1028 && (NILP (limit) || next->position < XFIXNAT (limit)))
1029 next = next_interval (next); 1029 next = next_interval (next);
1030 1030
1031 if (!next 1031 if (!next
1032 || (next->position 1032 || (next->position
1033 >= (FIXNUMP (limit) 1033 >= (FIXNUMP (limit)
1034 ? XFASTINT (limit) 1034 ? XFIXNAT (limit)
1035 : (STRINGP (object) 1035 : (STRINGP (object)
1036 ? SCHARS (object) 1036 ? SCHARS (object)
1037 : BUF_ZV (XBUFFER (object)))))) 1037 : BUF_ZV (XBUFFER (object))))))
@@ -1069,19 +1069,19 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1069 return limit; 1069 return limit;
1070 1070
1071 /* Start with the interval containing the char before point. */ 1071 /* Start with the interval containing the char before point. */
1072 if (i->position == XFASTINT (position)) 1072 if (i->position == XFIXNAT (position))
1073 i = previous_interval (i); 1073 i = previous_interval (i);
1074 1074
1075 previous = previous_interval (i); 1075 previous = previous_interval (i);
1076 while (previous && intervals_equal (previous, i) 1076 while (previous && intervals_equal (previous, i)
1077 && (NILP (limit) 1077 && (NILP (limit)
1078 || (previous->position + LENGTH (previous) > XFASTINT (limit)))) 1078 || (previous->position + LENGTH (previous) > XFIXNAT (limit))))
1079 previous = previous_interval (previous); 1079 previous = previous_interval (previous);
1080 1080
1081 if (!previous 1081 if (!previous
1082 || (previous->position + LENGTH (previous) 1082 || (previous->position + LENGTH (previous)
1083 <= (FIXNUMP (limit) 1083 <= (FIXNUMP (limit)
1084 ? XFASTINT (limit) 1084 ? XFIXNAT (limit)
1085 : (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object)))))) 1085 : (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
1086 return limit; 1086 return limit;
1087 else 1087 else
@@ -1117,7 +1117,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1117 i = validate_interval_range (object, &position, &position, soft); 1117 i = validate_interval_range (object, &position, &position, soft);
1118 1118
1119 /* Start with the interval containing the char before point. */ 1119 /* Start with the interval containing the char before point. */
1120 if (i && i->position == XFASTINT (position)) 1120 if (i && i->position == XFIXNAT (position))
1121 i = previous_interval (i); 1121 i = previous_interval (i);
1122 1122
1123 if (!i) 1123 if (!i)
@@ -1128,13 +1128,13 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
1128 while (previous 1128 while (previous
1129 && EQ (here_val, textget (previous->plist, prop)) 1129 && EQ (here_val, textget (previous->plist, prop))
1130 && (NILP (limit) 1130 && (NILP (limit)
1131 || (previous->position + LENGTH (previous) > XFASTINT (limit)))) 1131 || (previous->position + LENGTH (previous) > XFIXNAT (limit))))
1132 previous = previous_interval (previous); 1132 previous = previous_interval (previous);
1133 1133
1134 if (!previous 1134 if (!previous
1135 || (previous->position + LENGTH (previous) 1135 || (previous->position + LENGTH (previous)
1136 <= (FIXNUMP (limit) 1136 <= (FIXNUMP (limit)
1137 ? XFASTINT (limit) 1137 ? XFIXNAT (limit)
1138 : (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object)))))) 1138 : (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
1139 return limit; 1139 return limit;
1140 else 1140 else
@@ -1164,8 +1164,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
1164 if (!i) 1164 if (!i)
1165 return Qnil; 1165 return Qnil;
1166 1166
1167 s = XINT (start); 1167 s = XFIXNUM (start);
1168 len = XINT (end) - s; 1168 len = XFIXNUM (end) - s;
1169 1169
1170 /* If this interval already has the properties, we can skip it. */ 1170 /* If this interval already has the properties, we can skip it. */
1171 if (interval_has_all_properties (properties, i)) 1171 if (interval_has_all_properties (properties, i))
@@ -1221,8 +1221,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
1221 if (interval_has_all_properties (properties, i)) 1221 if (interval_has_all_properties (properties, i))
1222 { 1222 {
1223 if (BUFFERP (object)) 1223 if (BUFFERP (object))
1224 signal_after_change (XINT (start), XINT (end) - XINT (start), 1224 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1225 XINT (end) - XINT (start)); 1225 XFIXNUM (end) - XFIXNUM (start));
1226 1226
1227 eassert (modified); 1227 eassert (modified);
1228 return Qt; 1228 return Qt;
@@ -1232,8 +1232,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
1232 { 1232 {
1233 add_properties (properties, i, object, set_type); 1233 add_properties (properties, i, object, set_type);
1234 if (BUFFERP (object)) 1234 if (BUFFERP (object))
1235 signal_after_change (XINT (start), XINT (end) - XINT (start), 1235 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1236 XINT (end) - XINT (start)); 1236 XFIXNUM (end) - XFIXNUM (start));
1237 return Qt; 1237 return Qt;
1238 } 1238 }
1239 1239
@@ -1243,8 +1243,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
1243 copy_properties (unchanged, i); 1243 copy_properties (unchanged, i);
1244 add_properties (properties, i, object, set_type); 1244 add_properties (properties, i, object, set_type);
1245 if (BUFFERP (object)) 1245 if (BUFFERP (object))
1246 signal_after_change (XINT (start), XINT (end) - XINT (start), 1246 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1247 XINT (end) - XINT (start)); 1247 XFIXNUM (end) - XFIXNUM (start));
1248 return Qt; 1248 return Qt;
1249 } 1249 }
1250 1250
@@ -1362,8 +1362,8 @@ set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties,
1362 /* If we want no properties for a whole string, 1362 /* If we want no properties for a whole string,
1363 get rid of its intervals. */ 1363 get rid of its intervals. */
1364 if (NILP (properties) && STRINGP (object) 1364 if (NILP (properties) && STRINGP (object)
1365 && XFASTINT (start) == 0 1365 && XFIXNAT (start) == 0
1366 && XFASTINT (end) == SCHARS (object)) 1366 && XFIXNAT (end) == SCHARS (object))
1367 { 1367 {
1368 if (!string_intervals (object)) 1368 if (!string_intervals (object))
1369 return Qnil; 1369 return Qnil;
@@ -1397,8 +1397,8 @@ set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties,
1397 set_text_properties_1 (start, end, properties, object, i); 1397 set_text_properties_1 (start, end, properties, object, i);
1398 1398
1399 if (BUFFERP (object) && !NILP (coherent_change_p)) 1399 if (BUFFERP (object) && !NILP (coherent_change_p))
1400 signal_after_change (XINT (start), XINT (end) - XINT (start), 1400 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1401 XINT (end) - XINT (start)); 1401 XFIXNUM (end) - XFIXNUM (start));
1402 return Qt; 1402 return Qt;
1403} 1403}
1404 1404
@@ -1415,15 +1415,15 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie
1415 register ptrdiff_t s, len; 1415 register ptrdiff_t s, len;
1416 INTERVAL unchanged; 1416 INTERVAL unchanged;
1417 1417
1418 if (XINT (start) < XINT (end)) 1418 if (XFIXNUM (start) < XFIXNUM (end))
1419 { 1419 {
1420 s = XINT (start); 1420 s = XFIXNUM (start);
1421 len = XINT (end) - s; 1421 len = XFIXNUM (end) - s;
1422 } 1422 }
1423 else if (XINT (end) < XINT (start)) 1423 else if (XFIXNUM (end) < XFIXNUM (start))
1424 { 1424 {
1425 s = XINT (end); 1425 s = XFIXNUM (end);
1426 len = XINT (start) - s; 1426 len = XFIXNUM (start) - s;
1427 } 1427 }
1428 else 1428 else
1429 return; 1429 return;
@@ -1515,8 +1515,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
1515 if (!i) 1515 if (!i)
1516 return Qnil; 1516 return Qnil;
1517 1517
1518 s = XINT (start); 1518 s = XFIXNUM (start);
1519 len = XINT (end) - s; 1519 len = XFIXNUM (end) - s;
1520 1520
1521 /* If there are no properties on this entire interval, return. */ 1521 /* If there are no properties on this entire interval, return. */
1522 if (! interval_has_some_properties (properties, i)) 1522 if (! interval_has_some_properties (properties, i))
@@ -1573,8 +1573,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
1573 { 1573 {
1574 eassert (modified); 1574 eassert (modified);
1575 if (BUFFERP (object)) 1575 if (BUFFERP (object))
1576 signal_after_change (XINT (start), XINT (end) - XINT (start), 1576 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1577 XINT (end) - XINT (start)); 1577 XFIXNUM (end) - XFIXNUM (start));
1578 return Qt; 1578 return Qt;
1579 } 1579 }
1580 1580
@@ -1582,8 +1582,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
1582 { 1582 {
1583 remove_properties (properties, Qnil, i, object); 1583 remove_properties (properties, Qnil, i, object);
1584 if (BUFFERP (object)) 1584 if (BUFFERP (object))
1585 signal_after_change (XINT (start), XINT (end) - XINT (start), 1585 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1586 XINT (end) - XINT (start)); 1586 XFIXNUM (end) - XFIXNUM (start));
1587 return Qt; 1587 return Qt;
1588 } 1588 }
1589 1589
@@ -1593,8 +1593,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
1593 copy_properties (unchanged, i); 1593 copy_properties (unchanged, i);
1594 remove_properties (properties, Qnil, i, object); 1594 remove_properties (properties, Qnil, i, object);
1595 if (BUFFERP (object)) 1595 if (BUFFERP (object))
1596 signal_after_change (XINT (start), XINT (end) - XINT (start), 1596 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1597 XINT (end) - XINT (start)); 1597 XFIXNUM (end) - XFIXNUM (start));
1598 return Qt; 1598 return Qt;
1599 } 1599 }
1600 1600
@@ -1627,8 +1627,8 @@ Return t if any property was actually removed, nil otherwise. */)
1627 if (!i) 1627 if (!i)
1628 return Qnil; 1628 return Qnil;
1629 1629
1630 s = XINT (start); 1630 s = XFIXNUM (start);
1631 len = XINT (end) - s; 1631 len = XFIXNUM (end) - s;
1632 1632
1633 /* If there are no properties on the interval, return. */ 1633 /* If there are no properties on the interval, return. */
1634 if (! interval_has_some_properties_list (properties, i)) 1634 if (! interval_has_some_properties_list (properties, i))
@@ -1671,9 +1671,9 @@ Return t if any property was actually removed, nil otherwise. */)
1671 if (modified) 1671 if (modified)
1672 { 1672 {
1673 if (BUFFERP (object)) 1673 if (BUFFERP (object))
1674 signal_after_change (XINT (start), 1674 signal_after_change (XFIXNUM (start),
1675 XINT (end) - XINT (start), 1675 XFIXNUM (end) - XFIXNUM (start),
1676 XINT (end) - XINT (start)); 1676 XFIXNUM (end) - XFIXNUM (start));
1677 return Qt; 1677 return Qt;
1678 } 1678 }
1679 else 1679 else
@@ -1685,8 +1685,8 @@ Return t if any property was actually removed, nil otherwise. */)
1685 modify_text_properties (object, start, end); 1685 modify_text_properties (object, start, end);
1686 remove_properties (Qnil, properties, i, object); 1686 remove_properties (Qnil, properties, i, object);
1687 if (BUFFERP (object)) 1687 if (BUFFERP (object))
1688 signal_after_change (XINT (start), XINT (end) - XINT (start), 1688 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1689 XINT (end) - XINT (start)); 1689 XFIXNUM (end) - XFIXNUM (start));
1690 return Qt; 1690 return Qt;
1691 } 1691 }
1692 else 1692 else
@@ -1698,8 +1698,8 @@ Return t if any property was actually removed, nil otherwise. */)
1698 modify_text_properties (object, start, end); 1698 modify_text_properties (object, start, end);
1699 remove_properties (Qnil, properties, i, object); 1699 remove_properties (Qnil, properties, i, object);
1700 if (BUFFERP (object)) 1700 if (BUFFERP (object))
1701 signal_after_change (XINT (start), XINT (end) - XINT (start), 1701 signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
1702 XINT (end) - XINT (start)); 1702 XFIXNUM (end) - XFIXNUM (start));
1703 return Qt; 1703 return Qt;
1704 } 1704 }
1705 } 1705 }
@@ -1717,9 +1717,9 @@ Return t if any property was actually removed, nil otherwise. */)
1717 if (modified) 1717 if (modified)
1718 { 1718 {
1719 if (BUFFERP (object)) 1719 if (BUFFERP (object))
1720 signal_after_change (XINT (start), 1720 signal_after_change (XFIXNUM (start),
1721 XINT (end) - XINT (start), 1721 XFIXNUM (end) - XFIXNUM (start),
1722 XINT (end) - XINT (start)); 1722 XFIXNUM (end) - XFIXNUM (start));
1723 return Qt; 1723 return Qt;
1724 } 1724 }
1725 else 1725 else
@@ -1746,7 +1746,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
1746 i = validate_interval_range (object, &start, &end, soft); 1746 i = validate_interval_range (object, &start, &end, soft);
1747 if (!i) 1747 if (!i)
1748 return (!NILP (value) || EQ (start, end) ? Qnil : start); 1748 return (!NILP (value) || EQ (start, end) ? Qnil : start);
1749 e = XINT (end); 1749 e = XFIXNUM (end);
1750 1750
1751 while (i) 1751 while (i)
1752 { 1752 {
@@ -1755,8 +1755,8 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
1755 if (EQ (textget (i->plist, property), value)) 1755 if (EQ (textget (i->plist, property), value))
1756 { 1756 {
1757 pos = i->position; 1757 pos = i->position;
1758 if (pos < XINT (start)) 1758 if (pos < XFIXNUM (start))
1759 pos = XINT (start); 1759 pos = XFIXNUM (start);
1760 return make_fixnum (pos); 1760 return make_fixnum (pos);
1761 } 1761 }
1762 i = next_interval (i); 1762 i = next_interval (i);
@@ -1782,8 +1782,8 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
1782 i = validate_interval_range (object, &start, &end, soft); 1782 i = validate_interval_range (object, &start, &end, soft);
1783 if (!i) 1783 if (!i)
1784 return (NILP (value) || EQ (start, end)) ? Qnil : start; 1784 return (NILP (value) || EQ (start, end)) ? Qnil : start;
1785 s = XINT (start); 1785 s = XFIXNUM (start);
1786 e = XINT (end); 1786 e = XFIXNUM (end);
1787 1787
1788 while (i) 1788 while (i)
1789 { 1789 {
@@ -1811,7 +1811,7 @@ int
1811text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer) 1811text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
1812{ 1812{
1813 bool ignore_previous_character; 1813 bool ignore_previous_character;
1814 Lisp_Object prev_pos = make_fixnum (XINT (pos) - 1); 1814 Lisp_Object prev_pos = make_fixnum (XFIXNUM (pos) - 1);
1815 Lisp_Object front_sticky; 1815 Lisp_Object front_sticky;
1816 bool is_rear_sticky = true, is_front_sticky = false; /* defaults */ 1816 bool is_rear_sticky = true, is_front_sticky = false; /* defaults */
1817 Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky); 1817 Lisp_Object defalt = Fassq (prop, Vtext_property_default_nonsticky);
@@ -1819,7 +1819,7 @@ text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
1819 if (NILP (buffer)) 1819 if (NILP (buffer))
1820 XSETBUFFER (buffer, current_buffer); 1820 XSETBUFFER (buffer, current_buffer);
1821 1821
1822 ignore_previous_character = XINT (pos) <= BUF_BEGV (XBUFFER (buffer)); 1822 ignore_previous_character = XFIXNUM (pos) <= BUF_BEGV (XBUFFER (buffer));
1823 1823
1824 if (ignore_previous_character || (CONSP (defalt) && !NILP (XCDR (defalt)))) 1824 if (ignore_previous_character || (CONSP (defalt) && !NILP (XCDR (defalt))))
1825 is_rear_sticky = false; 1825 is_rear_sticky = false;
@@ -1895,7 +1895,7 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
1895 { 1895 {
1896 Lisp_Object dest_start, dest_end; 1896 Lisp_Object dest_start, dest_end;
1897 1897
1898 e = XINT (pos) + (XINT (end) - XINT (start)); 1898 e = XFIXNUM (pos) + (XFIXNUM (end) - XFIXNUM (start));
1899 if (MOST_POSITIVE_FIXNUM < e) 1899 if (MOST_POSITIVE_FIXNUM < e)
1900 args_out_of_range (pos, end); 1900 args_out_of_range (pos, end);
1901 dest_start = pos; 1901 dest_start = pos;
@@ -1905,9 +1905,9 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
1905 validate_interval_range (dest, &dest_start, &dest_end, soft); 1905 validate_interval_range (dest, &dest_start, &dest_end, soft);
1906 } 1906 }
1907 1907
1908 s = XINT (start); 1908 s = XFIXNUM (start);
1909 e = XINT (end); 1909 e = XFIXNUM (end);
1910 p = XINT (pos); 1910 p = XFIXNUM (pos);
1911 1911
1912 stuff = Qnil; 1912 stuff = Qnil;
1913 1913
@@ -1975,8 +1975,8 @@ text_property_list (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp
1975 i = validate_interval_range (object, &start, &end, soft); 1975 i = validate_interval_range (object, &start, &end, soft);
1976 if (i) 1976 if (i)
1977 { 1977 {
1978 ptrdiff_t s = XINT (start); 1978 ptrdiff_t s = XFIXNUM (start);
1979 ptrdiff_t e = XINT (end); 1979 ptrdiff_t e = XFIXNUM (end);
1980 1980
1981 while (s < e) 1981 while (s < e)
1982 { 1982 {
@@ -2027,8 +2027,8 @@ add_text_properties_from_list (Lisp_Object object, Lisp_Object list, Lisp_Object
2027 Lisp_Object item, start, end, plist; 2027 Lisp_Object item, start, end, plist;
2028 2028
2029 item = XCAR (list); 2029 item = XCAR (list);
2030 start = make_fixnum (XINT (XCAR (item)) + XINT (delta)); 2030 start = make_fixnum (XFIXNUM (XCAR (item)) + XFIXNUM (delta));
2031 end = make_fixnum (XINT (XCAR (XCDR (item))) + XINT (delta)); 2031 end = make_fixnum (XFIXNUM (XCAR (XCDR (item))) + XFIXNUM (delta));
2032 plist = XCAR (XCDR (XCDR (item))); 2032 plist = XCAR (XCDR (XCDR (item)));
2033 2033
2034 Fadd_text_properties (start, end, plist, object); 2034 Fadd_text_properties (start, end, plist, object);
@@ -2046,7 +2046,7 @@ Lisp_Object
2046extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_end) 2046extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_end)
2047{ 2047{
2048 Lisp_Object prev = Qnil, head = list; 2048 Lisp_Object prev = Qnil, head = list;
2049 ptrdiff_t max = XINT (new_end); 2049 ptrdiff_t max = XFIXNUM (new_end);
2050 2050
2051 for (; CONSP (list); prev = list, list = XCDR (list)) 2051 for (; CONSP (list); prev = list, list = XCDR (list))
2052 { 2052 {
@@ -2055,9 +2055,9 @@ extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_e
2055 2055
2056 item = XCAR (list); 2056 item = XCAR (list);
2057 beg = XCAR (item); 2057 beg = XCAR (item);
2058 end = XINT (XCAR (XCDR (item))); 2058 end = XFIXNUM (XCAR (XCDR (item)));
2059 2059
2060 if (XINT (beg) >= max) 2060 if (XFIXNUM (beg) >= max)
2061 { 2061 {
2062 /* The start-point is past the end of the new string. 2062 /* The start-point is past the end of the new string.
2063 Discard this property. */ 2063 Discard this property. */
@@ -2066,7 +2066,7 @@ extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_e
2066 else 2066 else
2067 XSETCDR (prev, XCDR (list)); 2067 XSETCDR (prev, XCDR (list));
2068 } 2068 }
2069 else if ((end == XINT (old_end) && end != max) 2069 else if ((end == XFIXNUM (old_end) && end != max)
2070 || end > max) 2070 || end > max)
2071 { 2071 {
2072 /* Either the end-point is past the end of the new string, 2072 /* Either the end-point is past the end of the new string,
diff --git a/src/undo.c b/src/undo.c
index 7d2402fda38..e80ec58ab09 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -104,7 +104,7 @@ record_insert (ptrdiff_t beg, ptrdiff_t length)
104 if (CONSP (elt) 104 if (CONSP (elt)
105 && FIXNUMP (XCAR (elt)) 105 && FIXNUMP (XCAR (elt))
106 && FIXNUMP (XCDR (elt)) 106 && FIXNUMP (XCDR (elt))
107 && XINT (XCDR (elt)) == beg) 107 && XFIXNUM (XCDR (elt)) == beg)
108 { 108 {
109 XSETCDR (elt, make_fixnum (beg + length)); 109 XSETCDR (elt, make_fixnum (beg + length));
110 return; 110 return;
@@ -353,7 +353,7 @@ truncate_undo_list (struct buffer *b)
353 /* If by the first boundary we have already passed undo_outer_limit, 353 /* If by the first boundary we have already passed undo_outer_limit,
354 we're heading for memory full, so offer to clear out the list. */ 354 we're heading for memory full, so offer to clear out the list. */
355 if (FIXNUMP (Vundo_outer_limit) 355 if (FIXNUMP (Vundo_outer_limit)
356 && size_so_far > XINT (Vundo_outer_limit) 356 && size_so_far > XFIXNUM (Vundo_outer_limit)
357 && !NILP (Vundo_outer_limit_function)) 357 && !NILP (Vundo_outer_limit_function))
358 { 358 {
359 Lisp_Object tem; 359 Lisp_Object tem;
diff --git a/src/w32.c b/src/w32.c
index 6eb6b0bbee9..299bba7be4a 100644
--- a/src/w32.c
+++ b/src/w32.c
@@ -7043,7 +7043,7 @@ system_process_attributes (Lisp_Object pid)
7043 BOOL result = FALSE; 7043 BOOL result = FALSE;
7044 7044
7045 CHECK_FIXNUM_OR_FLOAT (pid); 7045 CHECK_FIXNUM_OR_FLOAT (pid);
7046 proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid); 7046 proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XFIXNUM (pid);
7047 7047
7048 h_snapshot = create_toolhelp32_snapshot (TH32CS_SNAPPROCESS, 0); 7048 h_snapshot = create_toolhelp32_snapshot (TH32CS_SNAPPROCESS, 0);
7049 7049
@@ -10107,7 +10107,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
10107 else 10107 else
10108 tem = Fplist_get (p->childp, QCspeed); 10108 tem = Fplist_get (p->childp, QCspeed);
10109 CHECK_FIXNUM (tem); 10109 CHECK_FIXNUM (tem);
10110 dcb.BaudRate = XINT (tem); 10110 dcb.BaudRate = XFIXNUM (tem);
10111 childp2 = Fplist_put (childp2, QCspeed, tem); 10111 childp2 = Fplist_put (childp2, QCspeed, tem);
10112 10112
10113 /* Configure bytesize. */ 10113 /* Configure bytesize. */
@@ -10118,10 +10118,10 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
10118 if (NILP (tem)) 10118 if (NILP (tem))
10119 tem = make_fixnum (8); 10119 tem = make_fixnum (8);
10120 CHECK_FIXNUM (tem); 10120 CHECK_FIXNUM (tem);
10121 if (XINT (tem) != 7 && XINT (tem) != 8) 10121 if (XFIXNUM (tem) != 7 && XFIXNUM (tem) != 8)
10122 error (":bytesize must be nil (8), 7, or 8"); 10122 error (":bytesize must be nil (8), 7, or 8");
10123 dcb.ByteSize = XINT (tem); 10123 dcb.ByteSize = XFIXNUM (tem);
10124 summary[0] = XINT (tem) + '0'; 10124 summary[0] = XFIXNUM (tem) + '0';
10125 childp2 = Fplist_put (childp2, QCbytesize, tem); 10125 childp2 = Fplist_put (childp2, QCbytesize, tem);
10126 10126
10127 /* Configure parity. */ 10127 /* Configure parity. */
@@ -10162,12 +10162,12 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
10162 if (NILP (tem)) 10162 if (NILP (tem))
10163 tem = make_fixnum (1); 10163 tem = make_fixnum (1);
10164 CHECK_FIXNUM (tem); 10164 CHECK_FIXNUM (tem);
10165 if (XINT (tem) != 1 && XINT (tem) != 2) 10165 if (XFIXNUM (tem) != 1 && XFIXNUM (tem) != 2)
10166 error (":stopbits must be nil (1 stopbit), 1, or 2"); 10166 error (":stopbits must be nil (1 stopbit), 1, or 2");
10167 summary[2] = XINT (tem) + '0'; 10167 summary[2] = XFIXNUM (tem) + '0';
10168 if (XINT (tem) == 1) 10168 if (XFIXNUM (tem) == 1)
10169 dcb.StopBits = ONESTOPBIT; 10169 dcb.StopBits = ONESTOPBIT;
10170 else if (XINT (tem) == 2) 10170 else if (XFIXNUM (tem) == 2)
10171 dcb.StopBits = TWOSTOPBITS; 10171 dcb.StopBits = TWOSTOPBITS;
10172 childp2 = Fplist_put (childp2, QCstopbits, tem); 10172 childp2 = Fplist_put (childp2, QCstopbits, tem);
10173 10173
diff --git a/src/w32console.c b/src/w32console.c
index c322a8e6998..6c3cf06bfd3 100644
--- a/src/w32console.c
+++ b/src/w32console.c
@@ -791,7 +791,7 @@ DEFUN ("set-screen-color", Fset_screen_color, Sset_screen_color, 2, 2, 0,
791Arguments should be indices between 0 and 15, see w32console.el. */) 791Arguments should be indices between 0 and 15, see w32console.el. */)
792 (Lisp_Object foreground, Lisp_Object background) 792 (Lisp_Object foreground, Lisp_Object background)
793{ 793{
794 char_attr_normal = XFASTINT (foreground) + (XFASTINT (background) << 4); 794 char_attr_normal = XFIXNAT (foreground) + (XFIXNAT (background) << 4);
795 795
796 Frecenter (Qnil, Qt); 796 Frecenter (Qnil, Qt);
797 return Qt; 797 return Qt;
@@ -814,7 +814,7 @@ DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0,
814 (Lisp_Object size) 814 (Lisp_Object size)
815{ 815{
816 CONSOLE_CURSOR_INFO cci; 816 CONSOLE_CURSOR_INFO cci;
817 cci.dwSize = XFASTINT (size); 817 cci.dwSize = XFIXNAT (size);
818 cci.bVisible = TRUE; 818 cci.bVisible = TRUE;
819 (void) SetConsoleCursorInfo (cur_screen, &cci); 819 (void) SetConsoleCursorInfo (cur_screen, &cci);
820 820
diff --git a/src/w32fns.c b/src/w32fns.c
index e8962b491fe..8d5293c1af0 100644
--- a/src/w32fns.c
+++ b/src/w32fns.c
@@ -462,7 +462,7 @@ if the entry is new. */)
462 CHECK_FIXNUM (blue); 462 CHECK_FIXNUM (blue);
463 CHECK_STRING (name); 463 CHECK_STRING (name);
464 464
465 XSETINT (rgb, RGB (XUINT (red), XUINT (green), XUINT (blue))); 465 XSETINT (rgb, RGB (XUFIXNUM (red), XUFIXNUM (green), XUFIXNUM (blue)));
466 466
467 block_input (); 467 block_input ();
468 468
@@ -1182,7 +1182,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
1182 if (f) 1182 if (f)
1183 { 1183 {
1184 /* Apply gamma correction. */ 1184 /* Apply gamma correction. */
1185 w32_color_ref = XUINT (tem); 1185 w32_color_ref = XUFIXNUM (tem);
1186 gamma_correct (f, &w32_color_ref); 1186 gamma_correct (f, &w32_color_ref);
1187 XSETINT (tem, w32_color_ref); 1187 XSETINT (tem, w32_color_ref);
1188 } 1188 }
@@ -1198,7 +1198,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
1198 /* check if color is already mapped */ 1198 /* check if color is already mapped */
1199 while (entry) 1199 while (entry)
1200 { 1200 {
1201 if (W32_COLOR (entry->entry) == XUINT (tem)) 1201 if (W32_COLOR (entry->entry) == XUFIXNUM (tem))
1202 break; 1202 break;
1203 prev = &entry->next; 1203 prev = &entry->next;
1204 entry = entry->next; 1204 entry = entry->next;
@@ -1208,7 +1208,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
1208 { 1208 {
1209 /* not already mapped, so add to list */ 1209 /* not already mapped, so add to list */
1210 entry = xmalloc (sizeof (struct w32_palette_entry)); 1210 entry = xmalloc (sizeof (struct w32_palette_entry));
1211 SET_W32_COLOR (entry->entry, XUINT (tem)); 1211 SET_W32_COLOR (entry->entry, XUFIXNUM (tem));
1212 entry->next = NULL; 1212 entry->next = NULL;
1213 *prev = entry; 1213 *prev = entry;
1214 one_w32_display_info.num_colors++; 1214 one_w32_display_info.num_colors++;
@@ -1220,7 +1220,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
1220 /* Ensure COLORREF value is snapped to nearest color in (default) 1220 /* Ensure COLORREF value is snapped to nearest color in (default)
1221 palette by simulating the PALETTERGB macro. This works whether 1221 palette by simulating the PALETTERGB macro. This works whether
1222 or not the display device has a palette. */ 1222 or not the display device has a palette. */
1223 w32_color_ref = XUINT (tem) | 0x2000000; 1223 w32_color_ref = XUFIXNUM (tem) | 0x2000000;
1224 1224
1225 color_def->pixel = w32_color_ref; 1225 color_def->pixel = w32_color_ref;
1226 color_def->red = GetRValue (w32_color_ref) * 256; 1226 color_def->red = GetRValue (w32_color_ref) * 256;
@@ -1344,7 +1344,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1344 if (!EQ (Qnil, Vx_pointer_shape)) 1344 if (!EQ (Qnil, Vx_pointer_shape))
1345 { 1345 {
1346 CHECK_FIXNUM (Vx_pointer_shape); 1346 CHECK_FIXNUM (Vx_pointer_shape);
1347 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape)); 1347 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XFIXNUM (Vx_pointer_shape));
1348 } 1348 }
1349 else 1349 else
1350 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm); 1350 cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
@@ -1354,7 +1354,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1354 { 1354 {
1355 CHECK_FIXNUM (Vx_nontext_pointer_shape); 1355 CHECK_FIXNUM (Vx_nontext_pointer_shape);
1356 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1356 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1357 XINT (Vx_nontext_pointer_shape)); 1357 XFIXNUM (Vx_nontext_pointer_shape));
1358 } 1358 }
1359 else 1359 else
1360 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_left_ptr); 1360 nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_left_ptr);
@@ -1364,7 +1364,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1364 { 1364 {
1365 CHECK_FIXNUM (Vx_hourglass_pointer_shape); 1365 CHECK_FIXNUM (Vx_hourglass_pointer_shape);
1366 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1366 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1367 XINT (Vx_hourglass_pointer_shape)); 1367 XFIXNUM (Vx_hourglass_pointer_shape));
1368 } 1368 }
1369 else 1369 else
1370 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_watch); 1370 hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_watch);
@@ -1375,7 +1375,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1375 { 1375 {
1376 CHECK_FIXNUM (Vx_mode_pointer_shape); 1376 CHECK_FIXNUM (Vx_mode_pointer_shape);
1377 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1377 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1378 XINT (Vx_mode_pointer_shape)); 1378 XFIXNUM (Vx_mode_pointer_shape));
1379 } 1379 }
1380 else 1380 else
1381 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm); 1381 mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_xterm);
@@ -1386,7 +1386,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1386 CHECK_FIXNUM (Vx_sensitive_text_pointer_shape); 1386 CHECK_FIXNUM (Vx_sensitive_text_pointer_shape);
1387 hand_cursor 1387 hand_cursor
1388 = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1388 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1389 XINT (Vx_sensitive_text_pointer_shape)); 1389 XFIXNUM (Vx_sensitive_text_pointer_shape));
1390 } 1390 }
1391 else 1391 else
1392 hand_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair); 1392 hand_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XC_crosshair);
@@ -1396,7 +1396,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1396 CHECK_FIXNUM (Vx_window_horizontal_drag_shape); 1396 CHECK_FIXNUM (Vx_window_horizontal_drag_shape);
1397 horizontal_drag_cursor 1397 horizontal_drag_cursor
1398 = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1398 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1399 XINT (Vx_window_horizontal_drag_shape)); 1399 XFIXNUM (Vx_window_horizontal_drag_shape));
1400 } 1400 }
1401 else 1401 else
1402 horizontal_drag_cursor 1402 horizontal_drag_cursor
@@ -1407,7 +1407,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1407 CHECK_FIXNUM (Vx_window_vertical_drag_shape); 1407 CHECK_FIXNUM (Vx_window_vertical_drag_shape);
1408 vertical_drag_cursor 1408 vertical_drag_cursor
1409 = XCreateFontCursor (FRAME_W32_DISPLAY (f), 1409 = XCreateFontCursor (FRAME_W32_DISPLAY (f),
1410 XINT (Vx_window_vertical_drag_shape)); 1410 XFIXNUM (Vx_window_vertical_drag_shape));
1411 } 1411 }
1412 else 1412 else
1413 vertical_drag_cursor 1413 vertical_drag_cursor
@@ -1689,7 +1689,7 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva
1689 int border; 1689 int border;
1690 1690
1691 CHECK_TYPE_RANGED_INTEGER (int, arg); 1691 CHECK_TYPE_RANGED_INTEGER (int, arg);
1692 border = max (XINT (arg), 0); 1692 border = max (XFIXNUM (arg), 0);
1693 1693
1694 if (border != FRAME_INTERNAL_BORDER_WIDTH (f)) 1694 if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
1695 { 1695 {
@@ -1725,7 +1725,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1725 if (!FRAME_MINIBUF_ONLY_P (f) && !FRAME_PARENT_FRAME (f)) 1725 if (!FRAME_MINIBUF_ONLY_P (f) && !FRAME_PARENT_FRAME (f))
1726 { 1726 {
1727 boolean old = FRAME_EXTERNAL_MENU_BAR (f); 1727 boolean old = FRAME_EXTERNAL_MENU_BAR (f);
1728 boolean new = (FIXNUMP (value) && XINT (value) > 0) ? true : false; 1728 boolean new = (FIXNUMP (value) && XFIXNUM (value) > 0) ? true : false;
1729 1729
1730 FRAME_MENU_BAR_LINES (f) = 0; 1730 FRAME_MENU_BAR_LINES (f) = 0;
1731 FRAME_MENU_BAR_HEIGHT (f) = 0; 1731 FRAME_MENU_BAR_HEIGHT (f) = 0;
@@ -1780,8 +1780,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1780 return; 1780 return;
1781 1781
1782 /* Use VALUE only if an integer >= 0. */ 1782 /* Use VALUE only if an integer >= 0. */
1783 if (FIXNUMP (value) && XINT (value) >= 0) 1783 if (FIXNUMP (value) && XFIXNUM (value) >= 0)
1784 nlines = XFASTINT (value); 1784 nlines = XFIXNAT (value);
1785 else 1785 else
1786 nlines = 0; 1786 nlines = 0;
1787 1787
@@ -2027,7 +2027,7 @@ x_set_undecorated (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
2027 if (!NILP (new_value) && !FRAME_UNDECORATED (f)) 2027 if (!NILP (new_value) && !FRAME_UNDECORATED (f))
2028 { 2028 {
2029 dwStyle = ((dwStyle & ~WS_THICKFRAME & ~WS_CAPTION) 2029 dwStyle = ((dwStyle & ~WS_THICKFRAME & ~WS_CAPTION)
2030 | ((FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) 2030 | ((FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
2031 ? WS_BORDER : false)); 2031 ? WS_BORDER : false));
2032 SetWindowLong (hwnd, GWL_STYLE, dwStyle); 2032 SetWindowLong (hwnd, GWL_STYLE, dwStyle);
2033 SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0, 2033 SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0,
@@ -2334,7 +2334,7 @@ w32_createwindow (struct frame *f, int *coords)
2334 if (FRAME_UNDECORATED (f)) 2334 if (FRAME_UNDECORATED (f))
2335 { 2335 {
2336 /* If we want a thin border, specify it here. */ 2336 /* If we want a thin border, specify it here. */
2337 if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) 2337 if (FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
2338 f->output_data.w32->dwStyle |= WS_BORDER; 2338 f->output_data.w32->dwStyle |= WS_BORDER;
2339 } 2339 }
2340 else 2340 else
@@ -2350,7 +2350,7 @@ w32_createwindow (struct frame *f, int *coords)
2350 f->output_data.w32->dwStyle = WS_POPUP; 2350 f->output_data.w32->dwStyle = WS_POPUP;
2351 2351
2352 /* If we want a thin border, specify it here. */ 2352 /* If we want a thin border, specify it here. */
2353 if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0)) 2353 if (FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
2354 f->output_data.w32->dwStyle |= WS_BORDER; 2354 f->output_data.w32->dwStyle |= WS_BORDER;
2355 } 2355 }
2356 else 2356 else
@@ -3117,9 +3117,9 @@ map_keypad_keys (unsigned int virt_key, unsigned int extended)
3117static Lisp_Object w32_grabbed_keys; 3117static Lisp_Object w32_grabbed_keys;
3118 3118
3119#define HOTKEY(vk, mods) make_fixnum (((vk) & 255) | ((mods) << 8)) 3119#define HOTKEY(vk, mods) make_fixnum (((vk) & 255) | ((mods) << 8))
3120#define HOTKEY_ID(k) (XFASTINT (k) & 0xbfff) 3120#define HOTKEY_ID(k) (XFIXNAT (k) & 0xbfff)
3121#define HOTKEY_VK_CODE(k) (XFASTINT (k) & 255) 3121#define HOTKEY_VK_CODE(k) (XFIXNAT (k) & 255)
3122#define HOTKEY_MODIFIERS(k) (XFASTINT (k) >> 8) 3122#define HOTKEY_MODIFIERS(k) (XFIXNAT (k) >> 8)
3123 3123
3124#define RAW_HOTKEY_ID(k) ((k) & 0xbfff) 3124#define RAW_HOTKEY_ID(k) ((k) & 0xbfff)
3125#define RAW_HOTKEY_VK_CODE(k) ((k) & 255) 3125#define RAW_HOTKEY_VK_CODE(k) ((k) & 255)
@@ -4200,7 +4200,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
4200 if (GetAsyncKeyState (wParam) & 1) 4200 if (GetAsyncKeyState (wParam) & 1)
4201 { 4201 {
4202 if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) 4202 if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
4203 key = XUINT (Vw32_phantom_key_code) & 255; 4203 key = XUFIXNUM (Vw32_phantom_key_code) & 255;
4204 else 4204 else
4205 key = VK_SPACE; 4205 key = VK_SPACE;
4206 dpyinfo->faked_key = key; 4206 dpyinfo->faked_key = key;
@@ -4216,7 +4216,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
4216 if (GetAsyncKeyState (wParam) & 1) 4216 if (GetAsyncKeyState (wParam) & 1)
4217 { 4217 {
4218 if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) 4218 if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
4219 key = XUINT (Vw32_phantom_key_code) & 255; 4219 key = XUFIXNUM (Vw32_phantom_key_code) & 255;
4220 else 4220 else
4221 key = VK_SPACE; 4221 key = VK_SPACE;
4222 dpyinfo->faked_key = key; 4222 dpyinfo->faked_key = key;
@@ -5413,11 +5413,11 @@ my_create_window (struct frame * f)
5413 if (EQ (left, Qunbound)) 5413 if (EQ (left, Qunbound))
5414 coords[0] = CW_USEDEFAULT; 5414 coords[0] = CW_USEDEFAULT;
5415 else 5415 else
5416 coords[0] = XINT (left); 5416 coords[0] = XFIXNUM (left);
5417 if (EQ (top, Qunbound)) 5417 if (EQ (top, Qunbound))
5418 coords[1] = CW_USEDEFAULT; 5418 coords[1] = CW_USEDEFAULT;
5419 else 5419 else
5420 coords[1] = XINT (top); 5420 coords[1] = XFIXNUM (top);
5421 5421
5422 if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW, 5422 if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW,
5423 (WPARAM)f, (LPARAM)coords)) 5423 (WPARAM)f, (LPARAM)coords))
@@ -5809,7 +5809,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
5809 { 5809 {
5810 /* Cast to UINT_PTR shuts up compiler warnings about cast to 5810 /* Cast to UINT_PTR shuts up compiler warnings about cast to
5811 pointer from integer of different size. */ 5811 pointer from integer of different size. */
5812 f->output_data.w32->parent_desc = (Window) (UINT_PTR) XFASTINT (parent); 5812 f->output_data.w32->parent_desc = (Window) (UINT_PTR) XFIXNAT (parent);
5813 f->output_data.w32->explicit_parent = true; 5813 f->output_data.w32->explicit_parent = true;
5814 } 5814 }
5815 else 5815 else
@@ -7105,33 +7105,33 @@ compute_tip_xy (struct frame *f,
7105 } 7105 }
7106 7106
7107 if (FIXNUMP (top)) 7107 if (FIXNUMP (top))
7108 *root_y = XINT (top); 7108 *root_y = XFIXNUM (top);
7109 else if (FIXNUMP (bottom)) 7109 else if (FIXNUMP (bottom))
7110 *root_y = XINT (bottom) - height; 7110 *root_y = XFIXNUM (bottom) - height;
7111 else if (*root_y + XINT (dy) <= min_y) 7111 else if (*root_y + XFIXNUM (dy) <= min_y)
7112 *root_y = min_y; /* Can happen for negative dy */ 7112 *root_y = min_y; /* Can happen for negative dy */
7113 else if (*root_y + XINT (dy) + height <= max_y) 7113 else if (*root_y + XFIXNUM (dy) + height <= max_y)
7114 /* It fits below the pointer */ 7114 /* It fits below the pointer */
7115 *root_y += XINT (dy); 7115 *root_y += XFIXNUM (dy);
7116 else if (height + XINT (dy) + min_y <= *root_y) 7116 else if (height + XFIXNUM (dy) + min_y <= *root_y)
7117 /* It fits above the pointer. */ 7117 /* It fits above the pointer. */
7118 *root_y -= height + XINT (dy); 7118 *root_y -= height + XFIXNUM (dy);
7119 else 7119 else
7120 /* Put it on the top. */ 7120 /* Put it on the top. */
7121 *root_y = min_y; 7121 *root_y = min_y;
7122 7122
7123 if (FIXNUMP (left)) 7123 if (FIXNUMP (left))
7124 *root_x = XINT (left); 7124 *root_x = XFIXNUM (left);
7125 else if (FIXNUMP (right)) 7125 else if (FIXNUMP (right))
7126 *root_x = XINT (right) - width; 7126 *root_x = XFIXNUM (right) - width;
7127 else if (*root_x + XINT (dx) <= min_x) 7127 else if (*root_x + XFIXNUM (dx) <= min_x)
7128 *root_x = 0; /* Can happen for negative dx */ 7128 *root_x = 0; /* Can happen for negative dx */
7129 else if (*root_x + XINT (dx) + width <= max_x) 7129 else if (*root_x + XFIXNUM (dx) + width <= max_x)
7130 /* It fits to the right of the pointer. */ 7130 /* It fits to the right of the pointer. */
7131 *root_x += XINT (dx); 7131 *root_x += XFIXNUM (dx);
7132 else if (width + XINT (dx) + min_x <= *root_x) 7132 else if (width + XFIXNUM (dx) + min_x <= *root_x)
7133 /* It fits to the left of the pointer. */ 7133 /* It fits to the left of the pointer. */
7134 *root_x -= width + XINT (dx); 7134 *root_x -= width + XFIXNUM (dx);
7135 else 7135 else
7136 /* Put it left justified on the screen -- it ought to fit that way. */ 7136 /* Put it left justified on the screen -- it ought to fit that way. */
7137 *root_x = min_x; 7137 *root_x = min_x;
@@ -7389,8 +7389,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
7389 && RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX) 7389 && RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
7390 && RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) 7390 && RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
7391 { 7391 {
7392 w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size)); 7392 w->total_cols = XFIXNAT (XCAR (Vx_max_tooltip_size));
7393 w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size)); 7393 w->total_lines = XFIXNAT (XCDR (Vx_max_tooltip_size));
7394 } 7394 }
7395 else 7395 else
7396 { 7396 {
@@ -7422,8 +7422,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
7422 size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, 7422 size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
7423 make_fixnum (w->pixel_height), Qnil); 7423 make_fixnum (w->pixel_height), Qnil);
7424 /* Add the frame's internal border to calculated size. */ 7424 /* Add the frame's internal border to calculated size. */
7425 width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); 7425 width = XFIXNUM (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
7426 height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); 7426 height = XFIXNUM (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
7427 /* Calculate position of tooltip frame. */ 7427 /* Calculate position of tooltip frame. */
7428 compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y); 7428 compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y);
7429 7429
@@ -7431,7 +7431,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
7431 { 7431 {
7432 RECT rect; 7432 RECT rect;
7433 int pad = (FIXED_OR_FLOATP (Vw32_tooltip_extra_pixels) 7433 int pad = (FIXED_OR_FLOATP (Vw32_tooltip_extra_pixels)
7434 ? max (0, XINT (Vw32_tooltip_extra_pixels)) 7434 ? max (0, XFIXNUM (Vw32_tooltip_extra_pixels))
7435 : FRAME_COLUMN_WIDTH (tip_f)); 7435 : FRAME_COLUMN_WIDTH (tip_f));
7436 7436
7437 rect.left = rect.top = 0; 7437 rect.left = rect.top = 0;
@@ -8036,7 +8036,7 @@ If optional parameter FRAME is not specified, use selected frame. */)
8036 CHECK_FIXNUM (command); 8036 CHECK_FIXNUM (command);
8037 8037
8038 if (FRAME_W32_P (f)) 8038 if (FRAME_W32_P (f))
8039 PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0); 8039 PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XFIXNUM (command), 0);
8040 8040
8041 return Qnil; 8041 return Qnil;
8042} 8042}
@@ -8144,7 +8144,7 @@ a ShowWindow flag:
8144 result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w, 8144 result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w,
8145 GUI_SDATA (current_dir), 8145 GUI_SDATA (current_dir),
8146 (FIXNUMP (show_flag) 8146 (FIXNUMP (show_flag)
8147 ? XINT (show_flag) : SW_SHOWDEFAULT)); 8147 ? XFIXNUM (show_flag) : SW_SHOWDEFAULT));
8148 8148
8149 if (result > 32) 8149 if (result > 32)
8150 return Qt; 8150 return Qt;
@@ -8301,7 +8301,7 @@ a ShowWindow flag:
8301 shexinfo_w.lpParameters = params_w; 8301 shexinfo_w.lpParameters = params_w;
8302 shexinfo_w.lpDirectory = current_dir_w; 8302 shexinfo_w.lpDirectory = current_dir_w;
8303 shexinfo_w.nShow = 8303 shexinfo_w.nShow =
8304 (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); 8304 (FIXNUMP (show_flag) ? XFIXNUM (show_flag) : SW_SHOWDEFAULT);
8305 success = ShellExecuteExW (&shexinfo_w); 8305 success = ShellExecuteExW (&shexinfo_w);
8306 xfree (doc_w); 8306 xfree (doc_w);
8307 } 8307 }
@@ -8336,7 +8336,7 @@ a ShowWindow flag:
8336 shexinfo_a.lpParameters = params_a; 8336 shexinfo_a.lpParameters = params_a;
8337 shexinfo_a.lpDirectory = current_dir_a; 8337 shexinfo_a.lpDirectory = current_dir_a;
8338 shexinfo_a.nShow = 8338 shexinfo_a.nShow =
8339 (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT); 8339 (FIXNUMP (show_flag) ? XFIXNUM (show_flag) : SW_SHOWDEFAULT);
8340 success = ShellExecuteExA (&shexinfo_a); 8340 success = ShellExecuteExA (&shexinfo_a);
8341 xfree (doc_w); 8341 xfree (doc_w);
8342 xfree (doc_a); 8342 xfree (doc_a);
@@ -8419,7 +8419,7 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
8419 if (SYMBOLP (c)) 8419 if (SYMBOLP (c))
8420 { 8420 {
8421 c = parse_modifiers (c); 8421 c = parse_modifiers (c);
8422 lisp_modifiers = XINT (Fcar (Fcdr (c))); 8422 lisp_modifiers = XFIXNUM (Fcar (Fcdr (c)));
8423 c = Fcar (c); 8423 c = Fcar (c);
8424 if (!SYMBOLP (c)) 8424 if (!SYMBOLP (c))
8425 emacs_abort (); 8425 emacs_abort ();
@@ -8432,9 +8432,9 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
8432 } 8432 }
8433 else if (FIXNUMP (c)) 8433 else if (FIXNUMP (c))
8434 { 8434 {
8435 lisp_modifiers = XINT (c) & ~CHARACTERBITS; 8435 lisp_modifiers = XFIXNUM (c) & ~CHARACTERBITS;
8436 /* Many ascii characters are their own virtual key code. */ 8436 /* Many ascii characters are their own virtual key code. */
8437 vk_code = XINT (c) & CHARACTERBITS; 8437 vk_code = XFIXNUM (c) & CHARACTERBITS;
8438 } 8438 }
8439 8439
8440 if (vk_code < 0 || vk_code > 255) 8440 if (vk_code < 0 || vk_code > 255)
@@ -8534,7 +8534,7 @@ any key combinations, otherwise nil. */)
8534 /* Notify input thread about new hot-key definition, so that it 8534 /* Notify input thread about new hot-key definition, so that it
8535 takes effect without needing to switch focus. */ 8535 takes effect without needing to switch focus. */
8536 PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY, 8536 PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY,
8537 (WPARAM) XINT (key), 0); 8537 (WPARAM) XFIXNUM (key), 0);
8538 } 8538 }
8539 8539
8540 return key; 8540 return key;
@@ -8567,7 +8567,7 @@ DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key,
8567 /* Notify input thread about hot-key definition being removed, so 8567 /* Notify input thread about hot-key definition being removed, so
8568 that it takes effect without needing focus switch. */ 8568 that it takes effect without needing focus switch. */
8569 if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY, 8569 if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY,
8570 (WPARAM) XINT (XCAR (item)), lparam)) 8570 (WPARAM) XFIXNUM (XCAR (item)), lparam))
8571 { 8571 {
8572 MSG msg; 8572 MSG msg;
8573 GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE); 8573 GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
@@ -8647,7 +8647,7 @@ to change the state. */)
8647 if (NILP (new_state)) 8647 if (NILP (new_state))
8648 lparam = -1; 8648 lparam = -1;
8649 else 8649 else
8650 lparam = (XUINT (new_state)) & 1; 8650 lparam = (XUFIXNUM (new_state)) & 1;
8651 if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY, 8651 if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY,
8652 (WPARAM) vk_code, lparam)) 8652 (WPARAM) vk_code, lparam))
8653 { 8653 {
@@ -9071,7 +9071,7 @@ The coordinates X and Y are interpreted in pixels relative to a position
9071 if (os_subtype == OS_NT 9071 if (os_subtype == OS_NT
9072 && w32_major_version + w32_minor_version >= 6) 9072 && w32_major_version + w32_minor_version >= 6)
9073 ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0); 9073 ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
9074 SetCursorPos (XINT (x), XINT (y)); 9074 SetCursorPos (XFIXNUM (x), XFIXNUM (y));
9075 if (ret) 9075 if (ret)
9076 SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0); 9076 SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0);
9077 unblock_input (); 9077 unblock_input ();
@@ -9432,7 +9432,7 @@ w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state)
9432 9432
9433 if (NILP (new_state) 9433 if (NILP (new_state)
9434 || (FIXED_OR_FLOATP (new_state) 9434 || (FIXED_OR_FLOATP (new_state)
9435 && ((XUINT (new_state)) & 1) != cur_state)) 9435 && ((XUFIXNUM (new_state)) & 1) != cur_state))
9436 { 9436 {
9437#ifdef WINDOWSNT 9437#ifdef WINDOWSNT
9438 faked_key = vk_code; 9438 faked_key = vk_code;
@@ -10071,7 +10071,7 @@ DEFUN ("w32-notification-close",
10071 struct frame *f = SELECTED_FRAME (); 10071 struct frame *f = SELECTED_FRAME ();
10072 10072
10073 if (FIXNUMP (id)) 10073 if (FIXNUMP (id))
10074 delete_tray_notification (f, XINT (id)); 10074 delete_tray_notification (f, XFIXNUM (id));
10075 10075
10076 return Qnil; 10076 return Qnil;
10077} 10077}
diff --git a/src/w32font.c b/src/w32font.c
index ed68656a006..c2f5dc3746d 100644
--- a/src/w32font.c
+++ b/src/w32font.c
@@ -920,7 +920,7 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
920 if (!EQ (val, Qraster)) 920 if (!EQ (val, Qraster))
921 logfont.lfOutPrecision = OUT_TT_PRECIS; 921 logfont.lfOutPrecision = OUT_TT_PRECIS;
922 922
923 size = XINT (AREF (font_entity, FONT_SIZE_INDEX)); 923 size = XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX));
924 if (!size) 924 if (!size)
925 size = pixel_size; 925 size = pixel_size;
926 926
@@ -1231,7 +1231,7 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
1231 val = AREF (spec, FONT_SPACING_INDEX); 1231 val = AREF (spec, FONT_SPACING_INDEX);
1232 if (FIXNUMP (val)) 1232 if (FIXNUMP (val))
1233 { 1233 {
1234 int spacing = XINT (val); 1234 int spacing = XFIXNUM (val);
1235 int proportional = (spacing < FONT_SPACING_MONO); 1235 int proportional = (spacing < FONT_SPACING_MONO);
1236 1236
1237 if ((proportional && !(font->ntmTm.tmPitchAndFamily & 0x01)) 1237 if ((proportional && !(font->ntmTm.tmPitchAndFamily & 0x01))
@@ -1822,8 +1822,8 @@ w32_to_x_charset (int fncharset, char *matching)
1822 /* Look for Same charset and a valid codepage (or non-int 1822 /* Look for Same charset and a valid codepage (or non-int
1823 which means ignore). */ 1823 which means ignore). */
1824 if (EQ (w32_charset, charset_type) 1824 if (EQ (w32_charset, charset_type)
1825 && (!FIXNUMP (codepage) || XINT (codepage) == CP_DEFAULT 1825 && (!FIXNUMP (codepage) || XFIXNUM (codepage) == CP_DEFAULT
1826 || IsValidCodePage (XINT (codepage)))) 1826 || IsValidCodePage (XFIXNUM (codepage))))
1827 { 1827 {
1828 /* If we don't have a match already, then this is the 1828 /* If we don't have a match already, then this is the
1829 best. */ 1829 best. */
@@ -1957,7 +1957,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
1957 tmp = AREF (font_spec, FONT_DPI_INDEX); 1957 tmp = AREF (font_spec, FONT_DPI_INDEX);
1958 if (FIXNUMP (tmp)) 1958 if (FIXNUMP (tmp))
1959 { 1959 {
1960 dpi = XINT (tmp); 1960 dpi = XFIXNUM (tmp);
1961 } 1961 }
1962 else if (FLOATP (tmp)) 1962 else if (FLOATP (tmp))
1963 { 1963 {
@@ -1967,7 +1967,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
1967 /* Height */ 1967 /* Height */
1968 tmp = AREF (font_spec, FONT_SIZE_INDEX); 1968 tmp = AREF (font_spec, FONT_SIZE_INDEX);
1969 if (FIXNUMP (tmp)) 1969 if (FIXNUMP (tmp))
1970 logfont->lfHeight = -1 * XINT (tmp); 1970 logfont->lfHeight = -1 * XFIXNUM (tmp);
1971 else if (FLOATP (tmp)) 1971 else if (FLOATP (tmp))
1972 logfont->lfHeight = (int) (-1.0 * dpi * XFLOAT_DATA (tmp) / 72.27 + 0.5); 1972 logfont->lfHeight = (int) (-1.0 * dpi * XFLOAT_DATA (tmp) / 72.27 + 0.5);
1973 1973
@@ -2038,7 +2038,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
2038 tmp = AREF (font_spec, FONT_SPACING_INDEX); 2038 tmp = AREF (font_spec, FONT_SPACING_INDEX);
2039 if (FIXNUMP (tmp)) 2039 if (FIXNUMP (tmp))
2040 { 2040 {
2041 int spacing = XINT (tmp); 2041 int spacing = XFIXNUM (tmp);
2042 if (spacing < FONT_SPACING_MONO) 2042 if (spacing < FONT_SPACING_MONO)
2043 logfont->lfPitchAndFamily 2043 logfont->lfPitchAndFamily
2044 = (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH; 2044 = (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH;
diff --git a/src/w32inevt.c b/src/w32inevt.c
index 6c5a1c6d47a..e8494c88bc1 100644
--- a/src/w32inevt.c
+++ b/src/w32inevt.c
@@ -182,7 +182,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
182 if ((mod_key_state & LEFT_WIN_PRESSED) == 0) 182 if ((mod_key_state & LEFT_WIN_PRESSED) == 0)
183 { 183 {
184 if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) 184 if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
185 faked_key = XUINT (Vw32_phantom_key_code) & 255; 185 faked_key = XUFIXNUM (Vw32_phantom_key_code) & 255;
186 else 186 else
187 faked_key = VK_SPACE; 187 faked_key = VK_SPACE;
188 keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0); 188 keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0);
@@ -199,7 +199,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
199 if ((mod_key_state & RIGHT_WIN_PRESSED) == 0) 199 if ((mod_key_state & RIGHT_WIN_PRESSED) == 0)
200 { 200 {
201 if (FIXED_OR_FLOATP (Vw32_phantom_key_code)) 201 if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
202 faked_key = XUINT (Vw32_phantom_key_code) & 255; 202 faked_key = XUFIXNUM (Vw32_phantom_key_code) & 255;
203 else 203 else
204 faked_key = VK_SPACE; 204 faked_key = VK_SPACE;
205 keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0); 205 keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0);
diff --git a/src/w32proc.c b/src/w32proc.c
index 4cffdd0d9d7..61ce157b558 100644
--- a/src/w32proc.c
+++ b/src/w32proc.c
@@ -1890,7 +1890,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
1890 /* Override escape char by binding w32-quote-process-args to 1890 /* Override escape char by binding w32-quote-process-args to
1891 desired character, or use t for auto-selection. */ 1891 desired character, or use t for auto-selection. */
1892 if (FIXNUMP (Vw32_quote_process_args)) 1892 if (FIXNUMP (Vw32_quote_process_args))
1893 escape_char = XINT (Vw32_quote_process_args); 1893 escape_char = XFIXNUM (Vw32_quote_process_args);
1894 else 1894 else
1895 escape_char = (is_cygnus_app || is_msys_app) ? '"' : '\\'; 1895 escape_char = (is_cygnus_app || is_msys_app) ? '"' : '\\';
1896 } 1896 }
@@ -3023,7 +3023,7 @@ If successful, the return value is t, otherwise nil. */)
3023 externally. This is necessary because real pids on Windows 95 are 3023 externally. This is necessary because real pids on Windows 95 are
3024 negative. */ 3024 negative. */
3025 3025
3026 pid = XINT (process); 3026 pid = XFIXNUM (process);
3027 cp = find_child_pid (pid); 3027 cp = find_child_pid (pid);
3028 if (cp != NULL) 3028 if (cp != NULL)
3029 pid = cp->procinfo.dwProcessId; 3029 pid = cp->procinfo.dwProcessId;
@@ -3188,12 +3188,12 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
3188 3188
3189 CHECK_FIXNUM (lcid); 3189 CHECK_FIXNUM (lcid);
3190 3190
3191 if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED)) 3191 if (!IsValidLocale (XFIXNUM (lcid), LCID_SUPPORTED))
3192 return Qnil; 3192 return Qnil;
3193 3193
3194 if (NILP (longform)) 3194 if (NILP (longform))
3195 { 3195 {
3196 got_abbrev = GetLocaleInfo (XINT (lcid), 3196 got_abbrev = GetLocaleInfo (XFIXNUM (lcid),
3197 LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP, 3197 LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP,
3198 abbrev_name, sizeof (abbrev_name)); 3198 abbrev_name, sizeof (abbrev_name));
3199 if (got_abbrev) 3199 if (got_abbrev)
@@ -3201,7 +3201,7 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
3201 } 3201 }
3202 else if (EQ (longform, Qt)) 3202 else if (EQ (longform, Qt))
3203 { 3203 {
3204 got_full = GetLocaleInfo (XINT (lcid), 3204 got_full = GetLocaleInfo (XFIXNUM (lcid),
3205 LOCALE_SLANGUAGE | LOCALE_USE_CP_ACP, 3205 LOCALE_SLANGUAGE | LOCALE_USE_CP_ACP,
3206 full_name, sizeof (full_name)); 3206 full_name, sizeof (full_name));
3207 if (got_full) 3207 if (got_full)
@@ -3209,8 +3209,8 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
3209 } 3209 }
3210 else if (FIXED_OR_FLOATP (longform)) 3210 else if (FIXED_OR_FLOATP (longform))
3211 { 3211 {
3212 got_full = GetLocaleInfo (XINT (lcid), 3212 got_full = GetLocaleInfo (XFIXNUM (lcid),
3213 XINT (longform), 3213 XFIXNUM (longform),
3214 full_name, sizeof (full_name)); 3214 full_name, sizeof (full_name));
3215 /* GetLocaleInfo's return value includes the terminating null 3215 /* GetLocaleInfo's return value includes the terminating null
3216 character, when the returned information is a string, whereas 3216 character, when the returned information is a string, whereas
@@ -3301,16 +3301,16 @@ If successful, the new locale id is returned, otherwise nil. */)
3301{ 3301{
3302 CHECK_FIXNUM (lcid); 3302 CHECK_FIXNUM (lcid);
3303 3303
3304 if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED)) 3304 if (!IsValidLocale (XFIXNUM (lcid), LCID_SUPPORTED))
3305 return Qnil; 3305 return Qnil;
3306 3306
3307 if (!SetThreadLocale (XINT (lcid))) 3307 if (!SetThreadLocale (XFIXNUM (lcid)))
3308 return Qnil; 3308 return Qnil;
3309 3309
3310 /* Need to set input thread locale if present. */ 3310 /* Need to set input thread locale if present. */
3311 if (dwWindowsThreadId) 3311 if (dwWindowsThreadId)
3312 /* Reply is not needed. */ 3312 /* Reply is not needed. */
3313 PostThreadMessage (dwWindowsThreadId, WM_EMACS_SETLOCALE, XINT (lcid), 0); 3313 PostThreadMessage (dwWindowsThreadId, WM_EMACS_SETLOCALE, XFIXNUM (lcid), 0);
3314 3314
3315 return make_fixnum (GetThreadLocale ()); 3315 return make_fixnum (GetThreadLocale ());
3316} 3316}
@@ -3360,10 +3360,10 @@ If successful, the new CP is returned, otherwise nil. */)
3360{ 3360{
3361 CHECK_FIXNUM (cp); 3361 CHECK_FIXNUM (cp);
3362 3362
3363 if (!IsValidCodePage (XINT (cp))) 3363 if (!IsValidCodePage (XFIXNUM (cp)))
3364 return Qnil; 3364 return Qnil;
3365 3365
3366 if (!SetConsoleCP (XINT (cp))) 3366 if (!SetConsoleCP (XFIXNUM (cp)))
3367 return Qnil; 3367 return Qnil;
3368 3368
3369 return make_fixnum (GetConsoleCP ()); 3369 return make_fixnum (GetConsoleCP ());
@@ -3388,10 +3388,10 @@ If successful, the new CP is returned, otherwise nil. */)
3388{ 3388{
3389 CHECK_FIXNUM (cp); 3389 CHECK_FIXNUM (cp);
3390 3390
3391 if (!IsValidCodePage (XINT (cp))) 3391 if (!IsValidCodePage (XFIXNUM (cp)))
3392 return Qnil; 3392 return Qnil;
3393 3393
3394 if (!SetConsoleOutputCP (XINT (cp))) 3394 if (!SetConsoleOutputCP (XFIXNUM (cp)))
3395 return Qnil; 3395 return Qnil;
3396 3396
3397 return make_fixnum (GetConsoleOutputCP ()); 3397 return make_fixnum (GetConsoleOutputCP ());
@@ -3414,13 +3414,13 @@ yield nil. */)
3414 3414
3415 CHECK_FIXNUM (cp); 3415 CHECK_FIXNUM (cp);
3416 3416
3417 if (!IsValidCodePage (XINT (cp))) 3417 if (!IsValidCodePage (XFIXNUM (cp)))
3418 return Qnil; 3418 return Qnil;
3419 3419
3420 /* Going through a temporary DWORD_PTR variable avoids compiler warning 3420 /* Going through a temporary DWORD_PTR variable avoids compiler warning
3421 about cast to pointer from integer of different size, when 3421 about cast to pointer from integer of different size, when
3422 building --with-wide-int or building for 64bit. */ 3422 building --with-wide-int or building for 64bit. */
3423 dwcp = XINT (cp); 3423 dwcp = XFIXNUM (cp);
3424 if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE)) 3424 if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE))
3425 return make_fixnum (info.ciCharset); 3425 return make_fixnum (info.ciCharset);
3426 3426
@@ -3480,8 +3480,8 @@ If successful, the new layout id is returned, otherwise nil. */)
3480 CHECK_FIXNUM_CAR (layout); 3480 CHECK_FIXNUM_CAR (layout);
3481 CHECK_FIXNUM_CDR (layout); 3481 CHECK_FIXNUM_CDR (layout);
3482 3482
3483 kl = (HKL) (UINT_PTR) ((XINT (XCAR (layout)) & 0xffff) 3483 kl = (HKL) (UINT_PTR) ((XFIXNUM (XCAR (layout)) & 0xffff)
3484 | (XINT (XCDR (layout)) << 16)); 3484 | (XFIXNUM (XCDR (layout)) << 16));
3485 3485
3486 /* Synchronize layout with input thread. */ 3486 /* Synchronize layout with input thread. */
3487 if (dwWindowsThreadId) 3487 if (dwWindowsThreadId)
diff --git a/src/w32select.c b/src/w32select.c
index 9255bf068ad..dc568d47f27 100644
--- a/src/w32select.c
+++ b/src/w32select.c
@@ -241,7 +241,7 @@ static Lisp_Object
241render (Lisp_Object oformat) 241render (Lisp_Object oformat)
242{ 242{
243 HGLOBAL htext = NULL; 243 HGLOBAL htext = NULL;
244 UINT format = XFASTINT (oformat); 244 UINT format = XFIXNAT (oformat);
245 245
246 ONTRACE (fprintf (stderr, "render\n")); 246 ONTRACE (fprintf (stderr, "render\n"));
247 247
diff --git a/src/w32term.c b/src/w32term.c
index cf6d516d583..9d224fe9b46 100644
--- a/src/w32term.c
+++ b/src/w32term.c
@@ -479,7 +479,7 @@ x_set_frame_alpha (struct frame *f)
479 if (FLOATP (Vframe_alpha_lower_limit)) 479 if (FLOATP (Vframe_alpha_lower_limit))
480 alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit); 480 alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
481 else if (FIXNUMP (Vframe_alpha_lower_limit)) 481 else if (FIXNUMP (Vframe_alpha_lower_limit))
482 alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; 482 alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0;
483 483
484 if (alpha < 0.0) 484 if (alpha < 0.0)
485 return; 485 return;
@@ -1982,11 +1982,11 @@ x_draw_image_relief (struct glyph_string *s)
1982 && FIXNUMP (XCAR (Vtool_bar_button_margin)) 1982 && FIXNUMP (XCAR (Vtool_bar_button_margin))
1983 && FIXNUMP (XCDR (Vtool_bar_button_margin))) 1983 && FIXNUMP (XCDR (Vtool_bar_button_margin)))
1984 { 1984 {
1985 extra_x = XINT (XCAR (Vtool_bar_button_margin)); 1985 extra_x = XFIXNUM (XCAR (Vtool_bar_button_margin));
1986 extra_y = XINT (XCDR (Vtool_bar_button_margin)); 1986 extra_y = XFIXNUM (XCDR (Vtool_bar_button_margin));
1987 } 1987 }
1988 else if (FIXNUMP (Vtool_bar_button_margin)) 1988 else if (FIXNUMP (Vtool_bar_button_margin))
1989 extra_x = extra_y = XINT (Vtool_bar_button_margin); 1989 extra_x = extra_y = XFIXNUM (Vtool_bar_button_margin);
1990 } 1990 }
1991 1991
1992 top_p = bot_p = left_p = right_p = 0; 1992 top_p = bot_p = left_p = right_p = 0;
@@ -2482,7 +2482,7 @@ x_draw_glyph_string (struct glyph_string *s)
2482 = buffer_local_value (Qunderline_minimum_offset, 2482 = buffer_local_value (Qunderline_minimum_offset,
2483 s->w->contents); 2483 s->w->contents);
2484 if (FIXNUMP (val)) 2484 if (FIXNUMP (val))
2485 minimum_offset = XFASTINT (val); 2485 minimum_offset = XFIXNAT (val);
2486 else 2486 else
2487 minimum_offset = 1; 2487 minimum_offset = 1;
2488 val = buffer_local_value (Qx_underline_at_descent_line, 2488 val = buffer_local_value (Qx_underline_at_descent_line,
@@ -3573,8 +3573,8 @@ w32_mouse_position (struct frame **fp, int insist, Lisp_Object *bar_window,
3573static void 3573static void
3574w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event) 3574w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event)
3575{ 3575{
3576 int x = XFASTINT (button_event->x); 3576 int x = XFIXNAT (button_event->x);
3577 int y = XFASTINT (button_event->y); 3577 int y = XFIXNAT (button_event->y);
3578 3578
3579 if (button_event->modifiers & down_modifier) 3579 if (button_event->modifiers & down_modifier)
3580 handle_tool_bar_click (f, x, y, 1, 0); 3580 handle_tool_bar_click (f, x, y, 1, 0);
@@ -4996,8 +4996,8 @@ w32_read_socket (struct terminal *terminal,
4996 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window))) 4996 && WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
4997 { 4997 {
4998 Lisp_Object window; 4998 Lisp_Object window;
4999 int x = XFASTINT (inev.x); 4999 int x = XFIXNAT (inev.x);
5000 int y = XFASTINT (inev.y); 5000 int y = XFIXNAT (inev.y);
5001 5001
5002 window = window_from_coordinates (f, x, y, 0, 1); 5002 window = window_from_coordinates (f, x, y, 0, 1);
5003 5003
@@ -6145,8 +6145,8 @@ x_calc_absolute_position (struct frame *f)
6145 monitor_left = Fnth (make_fixnum (1), geometry); 6145 monitor_left = Fnth (make_fixnum (1), geometry);
6146 monitor_top = Fnth (make_fixnum (2), geometry); 6146 monitor_top = Fnth (make_fixnum (2), geometry);
6147 6147
6148 display_left = min (display_left, XINT (monitor_left)); 6148 display_left = min (display_left, XFIXNUM (monitor_left));
6149 display_top = min (display_top, XINT (monitor_top)); 6149 display_top = min (display_top, XFIXNUM (monitor_top));
6150 } 6150 }
6151 } 6151 }
6152 } 6152 }
diff --git a/src/w32term.h b/src/w32term.h
index c69bebeebdd..ebdab040fbc 100644
--- a/src/w32term.h
+++ b/src/w32term.h
@@ -478,7 +478,7 @@ struct scroll_bar {
478 478
479#ifdef _WIN64 479#ifdef _WIN64
480/* Building a 64-bit C integer from two 32-bit lisp integers. */ 480/* Building a 64-bit C integer from two 32-bit lisp integers. */
481#define SCROLL_BAR_PACK(low, high) (XINT (high) << 32 | XINT (low)) 481#define SCROLL_BAR_PACK(low, high) (XFIXNUM (high) << 32 | XFIXNUM (low))
482 482
483/* Setting two lisp integers to the low and high words of a 64-bit C int. */ 483/* Setting two lisp integers to the low and high words of a 64-bit C int. */
484#define SCROLL_BAR_UNPACK(low, high, int64) \ 484#define SCROLL_BAR_UNPACK(low, high, int64) \
@@ -486,7 +486,7 @@ struct scroll_bar {
486 XSETINT ((high), ((DWORDLONG)(int64) >> 32) & 0xffffffff)) 486 XSETINT ((high), ((DWORDLONG)(int64) >> 32) & 0xffffffff))
487#else /* not _WIN64 */ 487#else /* not _WIN64 */
488/* Building a 32-bit C unsigned integer from two 16-bit lisp integers. */ 488/* Building a 32-bit C unsigned integer from two 16-bit lisp integers. */
489#define SCROLL_BAR_PACK(low, high) ((UINT_PTR)(XINT (high) << 16 | XINT (low))) 489#define SCROLL_BAR_PACK(low, high) ((UINT_PTR)(XFIXNUM (high) << 16 | XFIXNUM (low)))
490 490
491/* Setting two lisp integers to the low and high words of a 32-bit C int. */ 491/* Setting two lisp integers to the low and high words of a 32-bit C int. */
492#define SCROLL_BAR_UNPACK(low, high, int32) \ 492#define SCROLL_BAR_UNPACK(low, high, int32) \
diff --git a/src/w32uniscribe.c b/src/w32uniscribe.c
index 149f03d6acc..11bfa5490b8 100644
--- a/src/w32uniscribe.c
+++ b/src/w32uniscribe.c
@@ -879,7 +879,7 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
879 int i, retval = 0; 879 int i, retval = 0;
880 880
881 /* Check the spec is in the right format. */ 881 /* Check the spec is in the right format. */
882 if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3) 882 if (!CONSP (otf_spec) || XFIXNUM (Flength (otf_spec)) < 3)
883 return 0; 883 return 0;
884 884
885 /* Break otf_spec into its components. */ 885 /* Break otf_spec into its components. */
diff --git a/src/window.c b/src/window.c
index e3b0c3a66a5..67cfdc12b5d 100644
--- a/src/window.c
+++ b/src/window.c
@@ -1118,7 +1118,7 @@ window so that the location of point moves off-window. */)
1118 (Lisp_Object window, Lisp_Object ncol) 1118 (Lisp_Object window, Lisp_Object ncol)
1119{ 1119{
1120 CHECK_FIXNUM (ncol); 1120 CHECK_FIXNUM (ncol);
1121 return set_window_hscroll (decode_live_window (window), XINT (ncol)); 1121 return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol));
1122} 1122}
1123 1123
1124DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger, 1124DEFUN ("window-redisplay-end-trigger", Fwindow_redisplay_end_trigger,
@@ -1764,7 +1764,7 @@ POS, ROWH is the visible height of that row, and VPOS is the row number
1764 else if (!NILP (pos)) 1764 else if (!NILP (pos))
1765 { 1765 {
1766 CHECK_FIXNUM_COERCE_MARKER (pos); 1766 CHECK_FIXNUM_COERCE_MARKER (pos);
1767 posint = XINT (pos); 1767 posint = XFIXNUM (pos);
1768 } 1768 }
1769 else if (w == XWINDOW (selected_window)) 1769 else if (w == XWINDOW (selected_window))
1770 posint = PT; 1770 posint = PT;
@@ -1870,7 +1870,7 @@ Return nil if window display is not up-to-date. In that case, use
1870 } 1870 }
1871 1871
1872 CHECK_FIXNUM (line); 1872 CHECK_FIXNUM (line);
1873 n = XINT (line); 1873 n = XFIXNUM (line);
1874 1874
1875 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix); 1875 row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
1876 end_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w); 1876 end_row = MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w);
@@ -1975,7 +1975,7 @@ though when run from an idle timer with a delay of zero seconds. */)
1975 else if (FIXED_OR_FLOATP (first)) 1975 else if (FIXED_OR_FLOATP (first))
1976 { 1976 {
1977 CHECK_RANGED_INTEGER (first, 0, w->current_matrix->nrows); 1977 CHECK_RANGED_INTEGER (first, 0, w->current_matrix->nrows);
1978 row = MATRIX_ROW (w->current_matrix, XINT (first)); 1978 row = MATRIX_ROW (w->current_matrix, XFIXNUM (first));
1979 } 1979 }
1980 else 1980 else
1981 error ("Invalid specification of first line"); 1981 error ("Invalid specification of first line");
@@ -1988,7 +1988,7 @@ though when run from an idle timer with a delay of zero seconds. */)
1988 else if (FIXED_OR_FLOATP (last)) 1988 else if (FIXED_OR_FLOATP (last))
1989 { 1989 {
1990 CHECK_RANGED_INTEGER (last, 0, w->current_matrix->nrows); 1990 CHECK_RANGED_INTEGER (last, 0, w->current_matrix->nrows);
1991 end_row = MATRIX_ROW (w->current_matrix, XINT (last)); 1991 end_row = MATRIX_ROW (w->current_matrix, XFIXNUM (last));
1992 } 1992 }
1993 else 1993 else
1994 error ("Invalid specification of last line"); 1994 error ("Invalid specification of last line");
@@ -2492,7 +2492,7 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow,
2492 == FRAME_TERMINAL (XFRAME (selected_frame))); 2492 == FRAME_TERMINAL (XFRAME (selected_frame)));
2493 2493
2494 } 2494 }
2495 else if (FIXNUMP (all_frames) && XINT (all_frames) == 0) 2495 else if (FIXNUMP (all_frames) && XFIXNUM (all_frames) == 0)
2496 { 2496 {
2497 candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f) 2497 candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f)
2498#ifdef HAVE_X_WINDOWS 2498#ifdef HAVE_X_WINDOWS
@@ -3495,7 +3495,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
3495 3495
3496 /* Update time stamps of buffer display. */ 3496 /* Update time stamps of buffer display. */
3497 if (FIXNUMP (BVAR (b, display_count))) 3497 if (FIXNUMP (BVAR (b, display_count)))
3498 bset_display_count (b, make_fixnum (XINT (BVAR (b, display_count)) + 1)); 3498 bset_display_count (b, make_fixnum (XFIXNUM (BVAR (b, display_count)) + 1));
3499 bset_display_time (b, Fcurrent_time ()); 3499 bset_display_time (b, Fcurrent_time ());
3500 3500
3501 w->window_end_pos = 0; 3501 w->window_end_pos = 0;
@@ -3820,14 +3820,14 @@ Note: This function does not operate on any child windows of WINDOW. */)
3820 (Lisp_Object window, Lisp_Object size, Lisp_Object add) 3820 (Lisp_Object window, Lisp_Object size, Lisp_Object add)
3821{ 3821{
3822 struct window *w = decode_valid_window (window); 3822 struct window *w = decode_valid_window (window);
3823 EMACS_INT size_min = NILP (add) ? 0 : - XINT (w->new_pixel); 3823 EMACS_INT size_min = NILP (add) ? 0 : - XFIXNUM (w->new_pixel);
3824 EMACS_INT size_max = size_min + min (INT_MAX, MOST_POSITIVE_FIXNUM); 3824 EMACS_INT size_max = size_min + min (INT_MAX, MOST_POSITIVE_FIXNUM);
3825 3825
3826 CHECK_RANGED_INTEGER (size, size_min, size_max); 3826 CHECK_RANGED_INTEGER (size, size_min, size_max);
3827 if (NILP (add)) 3827 if (NILP (add))
3828 wset_new_pixel (w, size); 3828 wset_new_pixel (w, size);
3829 else 3829 else
3830 wset_new_pixel (w, make_fixnum (XINT (w->new_pixel) + XINT (size))); 3830 wset_new_pixel (w, make_fixnum (XFIXNUM (w->new_pixel) + XFIXNUM (size)));
3831 3831
3832 return w->new_pixel; 3832 return w->new_pixel;
3833} 3833}
@@ -3853,7 +3853,7 @@ Note: This function does not operate on any child windows of WINDOW. */)
3853 if (NILP (add)) 3853 if (NILP (add))
3854 wset_new_total (w, size); 3854 wset_new_total (w, size);
3855 else 3855 else
3856 wset_new_total (w, make_fixnum (XINT (w->new_total) + XINT (size))); 3856 wset_new_total (w, make_fixnum (XFIXNUM (w->new_total) + XFIXNUM (size)));
3857 3857
3858 return w->new_total; 3858 return w->new_total;
3859} 3859}
@@ -3895,7 +3895,7 @@ window_resize_check (struct window *w, bool horflag)
3895 { 3895 {
3896 while (c) 3896 while (c)
3897 { 3897 {
3898 if (XINT (c->new_pixel) != XINT (w->new_pixel) 3898 if (XFIXNUM (c->new_pixel) != XFIXNUM (w->new_pixel)
3899 || !window_resize_check (c, horflag)) 3899 || !window_resize_check (c, horflag))
3900 return false; 3900 return false;
3901 3901
@@ -3908,14 +3908,14 @@ window_resize_check (struct window *w, bool horflag)
3908 /* The sum of the heights of the child windows of W must equal 3908 /* The sum of the heights of the child windows of W must equal
3909 W's height. */ 3909 W's height. */
3910 { 3910 {
3911 int remaining_pixels = XINT (w->new_pixel); 3911 int remaining_pixels = XFIXNUM (w->new_pixel);
3912 3912
3913 while (c) 3913 while (c)
3914 { 3914 {
3915 if (!window_resize_check (c, horflag)) 3915 if (!window_resize_check (c, horflag))
3916 return false; 3916 return false;
3917 3917
3918 remaining_pixels -= XINT (c->new_pixel); 3918 remaining_pixels -= XFIXNUM (c->new_pixel);
3919 if (remaining_pixels < 0) 3919 if (remaining_pixels < 0)
3920 return false; 3920 return false;
3921 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3921 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3932,14 +3932,14 @@ window_resize_check (struct window *w, bool horflag)
3932 /* The sum of the widths of the child windows of W must equal W's 3932 /* The sum of the widths of the child windows of W must equal W's
3933 width. */ 3933 width. */
3934 { 3934 {
3935 int remaining_pixels = XINT (w->new_pixel); 3935 int remaining_pixels = XFIXNUM (w->new_pixel);
3936 3936
3937 while (c) 3937 while (c)
3938 { 3938 {
3939 if (!window_resize_check (c, horflag)) 3939 if (!window_resize_check (c, horflag))
3940 return false; 3940 return false;
3941 3941
3942 remaining_pixels -= XINT (c->new_pixel); 3942 remaining_pixels -= XFIXNUM (c->new_pixel);
3943 if (remaining_pixels < 0) 3943 if (remaining_pixels < 0)
3944 return false; 3944 return false;
3945 c = NILP (c->next) ? 0 : XWINDOW (c->next); 3945 c = NILP (c->next) ? 0 : XWINDOW (c->next);
@@ -3952,7 +3952,7 @@ window_resize_check (struct window *w, bool horflag)
3952 { 3952 {
3953 while (c) 3953 while (c)
3954 { 3954 {
3955 if (XINT (c->new_pixel) != XINT (w->new_pixel) 3955 if (XFIXNUM (c->new_pixel) != XFIXNUM (w->new_pixel)
3956 || !window_resize_check (c, horflag)) 3956 || !window_resize_check (c, horflag))
3957 return false; 3957 return false;
3958 3958
@@ -3966,7 +3966,7 @@ window_resize_check (struct window *w, bool horflag)
3966 /* A leaf window. Make sure it's not too small. The following 3966 /* A leaf window. Make sure it's not too small. The following
3967 hardcodes the values of `window-safe-min-width' (2) and 3967 hardcodes the values of `window-safe-min-width' (2) and
3968 `window-safe-min-height' (1) which are defined in window.el. */ 3968 `window-safe-min-height' (1) which are defined in window.el. */
3969 return (XINT (w->new_pixel) >= (horflag 3969 return (XFIXNUM (w->new_pixel) >= (horflag
3970 ? (2 * FRAME_COLUMN_WIDTH (f)) 3970 ? (2 * FRAME_COLUMN_WIDTH (f))
3971 : FRAME_LINE_HEIGHT (f))); 3971 : FRAME_LINE_HEIGHT (f)));
3972} 3972}
@@ -3992,7 +3992,7 @@ window_resize_apply (struct window *w, bool horflag)
3992 parent window has been set *before*. */ 3992 parent window has been set *before*. */
3993 if (horflag) 3993 if (horflag)
3994 { 3994 {
3995 w->pixel_width = XFASTINT (w->new_pixel); 3995 w->pixel_width = XFIXNAT (w->new_pixel);
3996 w->total_cols = w->pixel_width / unit; 3996 w->total_cols = w->pixel_width / unit;
3997 if (FIXED_OR_FLOATP (w->new_normal)) 3997 if (FIXED_OR_FLOATP (w->new_normal))
3998 wset_normal_cols (w, w->new_normal); 3998 wset_normal_cols (w, w->new_normal);
@@ -4001,7 +4001,7 @@ window_resize_apply (struct window *w, bool horflag)
4001 } 4001 }
4002 else 4002 else
4003 { 4003 {
4004 w->pixel_height = XFASTINT (w->new_pixel); 4004 w->pixel_height = XFIXNAT (w->new_pixel);
4005 w->total_lines = w->pixel_height / unit; 4005 w->total_lines = w->pixel_height / unit;
4006 if (FIXED_OR_FLOATP (w->new_normal)) 4006 if (FIXED_OR_FLOATP (w->new_normal))
4007 wset_normal_lines (w, w->new_normal); 4007 wset_normal_lines (w, w->new_normal);
@@ -4076,12 +4076,12 @@ window_resize_apply_total (struct window *w, bool horflag)
4076 parent window has been set *before*. */ 4076 parent window has been set *before*. */
4077 if (horflag) 4077 if (horflag)
4078 { 4078 {
4079 w->total_cols = XFASTINT (w->new_total); 4079 w->total_cols = XFIXNAT (w->new_total);
4080 edge = w->left_col; 4080 edge = w->left_col;
4081 } 4081 }
4082 else 4082 else
4083 { 4083 {
4084 w->total_lines = XFASTINT (w->new_total); 4084 w->total_lines = XFIXNAT (w->new_total);
4085 edge = w->top_line; 4085 edge = w->top_line;
4086 } 4086 }
4087 4087
@@ -4149,7 +4149,7 @@ be applied on the Elisp level. */)
4149 bool horflag = !NILP (horizontal); 4149 bool horflag = !NILP (horizontal);
4150 4150
4151 if (!window_resize_check (r, horflag) 4151 if (!window_resize_check (r, horflag)
4152 || (XINT (r->new_pixel) 4152 || (XFIXNUM (r->new_pixel)
4153 != (horflag ? r->pixel_width : r->pixel_height))) 4153 != (horflag ? r->pixel_width : r->pixel_height)))
4154 return Qnil; 4154 return Qnil;
4155 4155
@@ -4193,10 +4193,10 @@ values. */)
4193 if (NILP (horizontal)) 4193 if (NILP (horizontal))
4194 { 4194 {
4195 m->top_line = r->top_line + r->total_lines; 4195 m->top_line = r->top_line + r->total_lines;
4196 m->total_lines = XFASTINT (m->new_total); 4196 m->total_lines = XFIXNAT (m->new_total);
4197 } 4197 }
4198 else 4198 else
4199 m->total_cols = XFASTINT (m->new_total); 4199 m->total_cols = XFIXNAT (m->new_total);
4200 } 4200 }
4201 4201
4202 unblock_input (); 4202 unblock_input ();
@@ -4286,7 +4286,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
4286 resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil, 4286 resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil,
4287 pixelwise ? Qt : Qnil); 4287 pixelwise ? Qt : Qnil);
4288 if (window_resize_check (r, horflag) 4288 if (window_resize_check (r, horflag)
4289 && new_pixel_size == XINT (r->new_pixel)) 4289 && new_pixel_size == XFIXNUM (r->new_pixel))
4290 { 4290 {
4291 window_resize_apply (r, horflag); 4291 window_resize_apply (r, horflag);
4292 window_pixel_to_total (r->frame, horflag ? Qt : Qnil); 4292 window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
@@ -4297,7 +4297,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
4297 resize_root_window (root, delta, horflag ? Qt : Qnil, Qt, 4297 resize_root_window (root, delta, horflag ? Qt : Qnil, Qt,
4298 pixelwise ? Qt : Qnil); 4298 pixelwise ? Qt : Qnil);
4299 if (window_resize_check (r, horflag) 4299 if (window_resize_check (r, horflag)
4300 && new_pixel_size == XINT (r->new_pixel)) 4300 && new_pixel_size == XFIXNUM (r->new_pixel))
4301 { 4301 {
4302 window_resize_apply (r, horflag); 4302 window_resize_apply (r, horflag);
4303 window_pixel_to_total (r->frame, horflag ? Qt : Qnil); 4303 window_pixel_to_total (r->frame, horflag ? Qt : Qnil);
@@ -4371,7 +4371,7 @@ set correctly. See the code of `split-window' for how this is done. */)
4371 4371
4372 CHECK_FIXNUM (pixel_size); 4372 CHECK_FIXNUM (pixel_size);
4373 EMACS_INT total_size 4373 EMACS_INT total_size
4374 = XINT (pixel_size) / (horflag 4374 = XFIXNUM (pixel_size) / (horflag
4375 ? FRAME_COLUMN_WIDTH (f) 4375 ? FRAME_COLUMN_WIDTH (f)
4376 : FRAME_LINE_HEIGHT (f)); 4376 : FRAME_LINE_HEIGHT (f));
4377 4377
@@ -4407,7 +4407,7 @@ set correctly. See the code of `split-window' for how this is done. */)
4407 /* Temporarily pretend we split the parent window. */ 4407 /* Temporarily pretend we split the parent window. */
4408 wset_new_pixel 4408 wset_new_pixel
4409 (p, make_fixnum ((horflag ? p->pixel_width : p->pixel_height) 4409 (p, make_fixnum ((horflag ? p->pixel_width : p->pixel_height)
4410 - XINT (pixel_size))); 4410 - XFIXNUM (pixel_size)));
4411 if (!window_resize_check (p, horflag)) 4411 if (!window_resize_check (p, horflag))
4412 error ("Window sizes don't fit"); 4412 error ("Window sizes don't fit");
4413 else 4413 else
@@ -4418,7 +4418,7 @@ set correctly. See the code of `split-window' for how this is done. */)
4418 { 4418 {
4419 if (!window_resize_check (o, horflag)) 4419 if (!window_resize_check (o, horflag))
4420 error ("Resizing old window failed"); 4420 error ("Resizing old window failed");
4421 else if (XINT (pixel_size) + XINT (o->new_pixel) 4421 else if (XFIXNUM (pixel_size) + XFIXNUM (o->new_pixel)
4422 != (horflag ? o->pixel_width : o->pixel_height)) 4422 != (horflag ? o->pixel_width : o->pixel_height))
4423 error ("Sum of sizes of old and new window don't fit"); 4423 error ("Sum of sizes of old and new window don't fit");
4424 } 4424 }
@@ -4511,7 +4511,7 @@ set correctly. See the code of `split-window' for how this is done. */)
4511 while (c) 4511 while (c)
4512 { 4512 {
4513 if (c != n) 4513 if (c != n)
4514 sum = sum + XINT (c->new_total); 4514 sum = sum + XFIXNUM (c->new_total);
4515 c = NILP (c->next) ? 0 : XWINDOW (c->next); 4515 c = NILP (c->next) ? 0 : XWINDOW (c->next);
4516 } 4516 }
4517 wset_new_total (n, make_fixnum ((horflag 4517 wset_new_total (n, make_fixnum ((horflag
@@ -4596,7 +4596,7 @@ Signal an error when WINDOW is the only window on its frame. */)
4596 } 4596 }
4597 4597
4598 if (window_resize_check (r, horflag) 4598 if (window_resize_check (r, horflag)
4599 && (XINT (r->new_pixel) 4599 && (XFIXNUM (r->new_pixel)
4600 == (horflag ? r->pixel_width : r->pixel_height))) 4600 == (horflag ? r->pixel_width : r->pixel_height)))
4601 /* We can delete WINDOW now. */ 4601 /* We can delete WINDOW now. */
4602 { 4602 {
@@ -4735,12 +4735,12 @@ grow_mini_window (struct window *w, int delta, bool pixelwise)
4735 4735
4736 if (pixelwise) 4736 if (pixelwise)
4737 { 4737 {
4738 pixel_height = min (-XINT (height), INT_MAX - w->pixel_height); 4738 pixel_height = min (-XFIXNUM (height), INT_MAX - w->pixel_height);
4739 line_height = pixel_height / FRAME_LINE_HEIGHT (f); 4739 line_height = pixel_height / FRAME_LINE_HEIGHT (f);
4740 } 4740 }
4741 else 4741 else
4742 { 4742 {
4743 line_height = min (-XINT (height), 4743 line_height = min (-XFIXNUM (height),
4744 ((INT_MAX - w->pixel_height) 4744 ((INT_MAX - w->pixel_height)
4745 / FRAME_LINE_HEIGHT (f))); 4745 / FRAME_LINE_HEIGHT (f)));
4746 pixel_height = line_height * FRAME_LINE_HEIGHT (f); 4746 pixel_height = line_height * FRAME_LINE_HEIGHT (f);
@@ -4831,13 +4831,13 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
4831 r = XWINDOW (FRAME_ROOT_WINDOW (f)); 4831 r = XWINDOW (FRAME_ROOT_WINDOW (f));
4832 height = r->pixel_height + w->pixel_height; 4832 height = r->pixel_height + w->pixel_height;
4833 if (window_resize_check (r, false) 4833 if (window_resize_check (r, false)
4834 && XINT (w->new_pixel) > 0 4834 && XFIXNUM (w->new_pixel) > 0
4835 && height == XINT (r->new_pixel) + XINT (w->new_pixel)) 4835 && height == XFIXNUM (r->new_pixel) + XFIXNUM (w->new_pixel))
4836 { 4836 {
4837 block_input (); 4837 block_input ();
4838 window_resize_apply (r, false); 4838 window_resize_apply (r, false);
4839 4839
4840 w->pixel_height = XFASTINT (w->new_pixel); 4840 w->pixel_height = XFIXNAT (w->new_pixel);
4841 w->total_lines = w->pixel_height / FRAME_LINE_HEIGHT (f); 4841 w->total_lines = w->pixel_height / FRAME_LINE_HEIGHT (f);
4842 w->pixel_top = r->pixel_top + r->pixel_height; 4842 w->pixel_top = r->pixel_top + r->pixel_height;
4843 w->top_line = r->top_line + r->total_lines; 4843 w->top_line = r->top_line + r->total_lines;
@@ -5128,9 +5128,9 @@ window_scroll_pixel_based (Lisp_Object window, int n, bool whole, bool noerror)
5128 /* If there are other text lines above the current row, 5128 /* If there are other text lines above the current row,
5129 move window start to current row. Else to next row. */ 5129 move window start to current row. Else to next row. */
5130 if (rbot > 0) 5130 if (rbot > 0)
5131 spos = XINT (Fline_beginning_position (Qnil)); 5131 spos = XFIXNUM (Fline_beginning_position (Qnil));
5132 else 5132 else
5133 spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV); 5133 spos = min (XFIXNUM (Fline_end_position (Qnil)) + 1, ZV);
5134 set_marker_restricted (w->start, make_fixnum (spos), 5134 set_marker_restricted (w->start, make_fixnum (spos),
5135 w->contents); 5135 w->contents);
5136 w->start_at_line_beg = true; 5136 w->start_at_line_beg = true;
@@ -5589,7 +5589,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror)
5589 SET_PT_BOTH (pos, pos_byte); 5589 SET_PT_BOTH (pos, pos_byte);
5590 tem = Fvertical_motion (make_fixnum (ht - this_scroll_margin), window, 5590 tem = Fvertical_motion (make_fixnum (ht - this_scroll_margin), window,
5591 Qnil); 5591 Qnil);
5592 if (XFASTINT (tem) == ht - this_scroll_margin) 5592 if (XFIXNAT (tem) == ht - this_scroll_margin)
5593 bottom_margin = PT; 5593 bottom_margin = PT;
5594 else 5594 else
5595 bottom_margin = PT + 1; 5595 bottom_margin = PT + 1;
@@ -5680,7 +5680,7 @@ scroll_command (Lisp_Object window, Lisp_Object n, int direction)
5680 else 5680 else
5681 { 5681 {
5682 n = Fprefix_numeric_value (n); 5682 n = Fprefix_numeric_value (n);
5683 window_scroll (window, XINT (n) * direction, false, false); 5683 window_scroll (window, XFIXNUM (n) * direction, false, false);
5684 } 5684 }
5685 5685
5686 if (other_window) 5686 if (other_window)
@@ -5804,7 +5804,7 @@ by this function. This happens in an interactive call. */)
5804 struct window *w = XWINDOW (selected_window); 5804 struct window *w = XWINDOW (selected_window);
5805 EMACS_INT requested_arg = (NILP (arg) 5805 EMACS_INT requested_arg = (NILP (arg)
5806 ? window_body_width (w, 0) - 2 5806 ? window_body_width (w, 0) - 2
5807 : XINT (Fprefix_numeric_value (arg))); 5807 : XFIXNUM (Fprefix_numeric_value (arg)));
5808 Lisp_Object result = set_window_hscroll (w, w->hscroll + requested_arg); 5808 Lisp_Object result = set_window_hscroll (w, w->hscroll + requested_arg);
5809 5809
5810 if (!NILP (set_minimum)) 5810 if (!NILP (set_minimum))
@@ -5829,7 +5829,7 @@ by this function. This happens in an interactive call. */)
5829 struct window *w = XWINDOW (selected_window); 5829 struct window *w = XWINDOW (selected_window);
5830 EMACS_INT requested_arg = (NILP (arg) 5830 EMACS_INT requested_arg = (NILP (arg)
5831 ? window_body_width (w, 0) - 2 5831 ? window_body_width (w, 0) - 2
5832 : XINT (Fprefix_numeric_value (arg))); 5832 : XFIXNUM (Fprefix_numeric_value (arg)));
5833 Lisp_Object result = set_window_hscroll (w, w->hscroll - requested_arg); 5833 Lisp_Object result = set_window_hscroll (w, w->hscroll - requested_arg);
5834 5834
5835 if (!NILP (set_minimum)) 5835 if (!NILP (set_minimum))
@@ -5962,7 +5962,7 @@ and redisplay normally--don't erase and redraw the frame. */)
5962 { 5962 {
5963 arg = Fprefix_numeric_value (arg); 5963 arg = Fprefix_numeric_value (arg);
5964 CHECK_FIXNUM (arg); 5964 CHECK_FIXNUM (arg);
5965 iarg = XINT (arg); 5965 iarg = XFIXNUM (arg);
5966 } 5966 }
5967 5967
5968 /* Do this after making BUF current 5968 /* Do this after making BUF current
@@ -6210,7 +6210,7 @@ from the top of the window. */)
6210 XSETFASTINT (arg, lines / 2); 6210 XSETFASTINT (arg, lines / 2);
6211 else 6211 else
6212 { 6212 {
6213 EMACS_INT iarg = XINT (Fprefix_numeric_value (arg)); 6213 EMACS_INT iarg = XFIXNUM (Fprefix_numeric_value (arg));
6214 6214
6215 if (iarg < 0) 6215 if (iarg < 0)
6216 iarg = iarg + lines; 6216 iarg = iarg + lines;
@@ -6233,7 +6233,7 @@ from the top of the window. */)
6233 6233
6234 /* Skip past a partially visible first line. */ 6234 /* Skip past a partially visible first line. */
6235 if (w->vscroll) 6235 if (w->vscroll)
6236 XSETINT (arg, XINT (arg) + 1); 6236 XSETINT (arg, XFIXNUM (arg) + 1);
6237 6237
6238 return Fvertical_motion (arg, window, Qnil); 6238 return Fvertical_motion (arg, window, Qnil);
6239} 6239}
@@ -6471,14 +6471,14 @@ the return value is nil. Otherwise the value is t. */)
6471 6471
6472 if (!NILP (p->parent)) 6472 if (!NILP (p->parent))
6473 wset_parent 6473 wset_parent
6474 (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->parent))->window); 6474 (w, SAVED_WINDOW_N (saved_windows, XFIXNAT (p->parent))->window);
6475 else 6475 else
6476 wset_parent (w, Qnil); 6476 wset_parent (w, Qnil);
6477 6477
6478 if (!NILP (p->prev)) 6478 if (!NILP (p->prev))
6479 { 6479 {
6480 wset_prev 6480 wset_prev
6481 (w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window); 6481 (w, SAVED_WINDOW_N (saved_windows, XFIXNAT (p->prev))->window);
6482 wset_next (XWINDOW (w->prev), p->window); 6482 wset_next (XWINDOW (w->prev), p->window);
6483 } 6483 }
6484 else 6484 else
@@ -6486,7 +6486,7 @@ the return value is nil. Otherwise the value is t. */)
6486 wset_prev (w, Qnil); 6486 wset_prev (w, Qnil);
6487 if (!NILP (w->parent)) 6487 if (!NILP (w->parent))
6488 wset_combination (XWINDOW (w->parent), 6488 wset_combination (XWINDOW (w->parent),
6489 (XINT (p->total_cols) 6489 (XFIXNUM (p->total_cols)
6490 != XWINDOW (w->parent)->total_cols), 6490 != XWINDOW (w->parent)->total_cols),
6491 p->window); 6491 p->window);
6492 } 6492 }
@@ -6494,32 +6494,32 @@ the return value is nil. Otherwise the value is t. */)
6494 /* If we squirreled away the buffer, restore it now. */ 6494 /* If we squirreled away the buffer, restore it now. */
6495 if (BUFFERP (w->combination_limit)) 6495 if (BUFFERP (w->combination_limit))
6496 wset_buffer (w, w->combination_limit); 6496 wset_buffer (w, w->combination_limit);
6497 w->pixel_left = XFASTINT (p->pixel_left); 6497 w->pixel_left = XFIXNAT (p->pixel_left);
6498 w->pixel_top = XFASTINT (p->pixel_top); 6498 w->pixel_top = XFIXNAT (p->pixel_top);
6499 w->pixel_width = XFASTINT (p->pixel_width); 6499 w->pixel_width = XFIXNAT (p->pixel_width);
6500 w->pixel_height = XFASTINT (p->pixel_height); 6500 w->pixel_height = XFIXNAT (p->pixel_height);
6501 w->pixel_width_before_size_change 6501 w->pixel_width_before_size_change
6502 = XFASTINT (p->pixel_width_before_size_change); 6502 = XFIXNAT (p->pixel_width_before_size_change);
6503 w->pixel_height_before_size_change 6503 w->pixel_height_before_size_change
6504 = XFASTINT (p->pixel_height_before_size_change); 6504 = XFIXNAT (p->pixel_height_before_size_change);
6505 w->left_col = XFASTINT (p->left_col); 6505 w->left_col = XFIXNAT (p->left_col);
6506 w->top_line = XFASTINT (p->top_line); 6506 w->top_line = XFIXNAT (p->top_line);
6507 w->total_cols = XFASTINT (p->total_cols); 6507 w->total_cols = XFIXNAT (p->total_cols);
6508 w->total_lines = XFASTINT (p->total_lines); 6508 w->total_lines = XFIXNAT (p->total_lines);
6509 wset_normal_cols (w, p->normal_cols); 6509 wset_normal_cols (w, p->normal_cols);
6510 wset_normal_lines (w, p->normal_lines); 6510 wset_normal_lines (w, p->normal_lines);
6511 w->hscroll = XFASTINT (p->hscroll); 6511 w->hscroll = XFIXNAT (p->hscroll);
6512 w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll); 6512 w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll);
6513 w->min_hscroll = XFASTINT (p->min_hscroll); 6513 w->min_hscroll = XFIXNAT (p->min_hscroll);
6514 w->hscroll_whole = XFASTINT (p->hscroll_whole); 6514 w->hscroll_whole = XFIXNAT (p->hscroll_whole);
6515 wset_display_table (w, p->display_table); 6515 wset_display_table (w, p->display_table);
6516 w->left_margin_cols = XINT (p->left_margin_cols); 6516 w->left_margin_cols = XFIXNUM (p->left_margin_cols);
6517 w->right_margin_cols = XINT (p->right_margin_cols); 6517 w->right_margin_cols = XFIXNUM (p->right_margin_cols);
6518 w->left_fringe_width = XINT (p->left_fringe_width); 6518 w->left_fringe_width = XFIXNUM (p->left_fringe_width);
6519 w->right_fringe_width = XINT (p->right_fringe_width); 6519 w->right_fringe_width = XFIXNUM (p->right_fringe_width);
6520 w->fringes_outside_margins = !NILP (p->fringes_outside_margins); 6520 w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
6521 w->scroll_bar_width = XINT (p->scroll_bar_width); 6521 w->scroll_bar_width = XFIXNUM (p->scroll_bar_width);
6522 w->scroll_bar_height = XINT (p->scroll_bar_height); 6522 w->scroll_bar_height = XFIXNUM (p->scroll_bar_height);
6523 wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type); 6523 wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
6524 wset_horizontal_scroll_bar_type (w, p->horizontal_scroll_bar_type); 6524 wset_horizontal_scroll_bar_type (w, p->horizontal_scroll_bar_type);
6525 wset_dedicated (w, p->dedicated); 6525 wset_dedicated (w, p->dedicated);
@@ -7042,7 +7042,7 @@ extract_dimension (Lisp_Object dimension)
7042 if (NILP (dimension)) 7042 if (NILP (dimension))
7043 return -1; 7043 return -1;
7044 CHECK_RANGED_INTEGER (dimension, 0, INT_MAX); 7044 CHECK_RANGED_INTEGER (dimension, 0, INT_MAX);
7045 return XINT (dimension); 7045 return XFIXNUM (dimension);
7046} 7046}
7047 7047
7048static struct window * 7048static struct window *
diff --git a/src/xdisp.c b/src/xdisp.c
index 4af0a6d2e3f..e30f800b7ee 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -1251,7 +1251,7 @@ default_line_pixel_height (struct window *w)
1251 if (!NILP (val)) 1251 if (!NILP (val))
1252 { 1252 {
1253 if (RANGED_FIXNUMP (0, val, INT_MAX)) 1253 if (RANGED_FIXNUMP (0, val, INT_MAX))
1254 height += XFASTINT (val); 1254 height += XFIXNAT (val);
1255 else if (FLOATP (val)) 1255 else if (FLOATP (val))
1256 { 1256 {
1257 int addon = XFLOAT_DATA (val) * height + 0.5; 1257 int addon = XFLOAT_DATA (val) * height + 0.5;
@@ -1550,8 +1550,8 @@ pos_visible_p (struct window *w, ptrdiff_t charpos, int *x, int *y,
1550 startpos = 1550 startpos =
1551 Fprevious_single_char_property_change (endpos, Qdisplay, 1551 Fprevious_single_char_property_change (endpos, Qdisplay,
1552 Qnil, Qnil); 1552 Qnil, Qnil);
1553 start = XFASTINT (startpos); 1553 start = XFIXNAT (startpos);
1554 end = XFASTINT (endpos); 1554 end = XFIXNAT (endpos);
1555 /* Move to the last buffer position before the 1555 /* Move to the last buffer position before the
1556 display property. */ 1556 display property. */
1557 start_display (&it3, w, top); 1557 start_display (&it3, w, top);
@@ -2843,7 +2843,7 @@ init_iterator (struct it *it, struct window *w,
2843 && FRAME_WINDOW_P (it->f)) 2843 && FRAME_WINDOW_P (it->f))
2844 { 2844 {
2845 if (FIXNATP (BVAR (current_buffer, extra_line_spacing))) 2845 if (FIXNATP (BVAR (current_buffer, extra_line_spacing)))
2846 it->extra_line_spacing = XFASTINT (BVAR (current_buffer, extra_line_spacing)); 2846 it->extra_line_spacing = XFIXNAT (BVAR (current_buffer, extra_line_spacing));
2847 else if (FLOATP (BVAR (current_buffer, extra_line_spacing))) 2847 else if (FLOATP (BVAR (current_buffer, extra_line_spacing)))
2848 it->extra_line_spacing = (XFLOAT_DATA (BVAR (current_buffer, extra_line_spacing)) 2848 it->extra_line_spacing = (XFLOAT_DATA (BVAR (current_buffer, extra_line_spacing))
2849 * FRAME_LINE_HEIGHT (it->f)); 2849 * FRAME_LINE_HEIGHT (it->f));
@@ -2870,7 +2870,7 @@ init_iterator (struct it *it, struct window *w,
2870 invisible. */ 2870 invisible. */
2871 it->selective = (FIXNUMP (BVAR (current_buffer, selective_display)) 2871 it->selective = (FIXNUMP (BVAR (current_buffer, selective_display))
2872 ? (clip_to_bounds 2872 ? (clip_to_bounds
2873 (-1, XINT (BVAR (current_buffer, selective_display)), 2873 (-1, XFIXNUM (BVAR (current_buffer, selective_display)),
2874 PTRDIFF_MAX)) 2874 PTRDIFF_MAX))
2875 : (!NILP (BVAR (current_buffer, selective_display)) 2875 : (!NILP (BVAR (current_buffer, selective_display))
2876 ? -1 : 0)); 2876 ? -1 : 0));
@@ -2891,7 +2891,7 @@ init_iterator (struct it *it, struct window *w,
2891 = marker_position (w->redisplay_end_trigger); 2891 = marker_position (w->redisplay_end_trigger);
2892 else if (FIXNUMP (w->redisplay_end_trigger)) 2892 else if (FIXNUMP (w->redisplay_end_trigger))
2893 it->redisplay_end_trigger_charpos 2893 it->redisplay_end_trigger_charpos
2894 = clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger), 2894 = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (w->redisplay_end_trigger),
2895 PTRDIFF_MAX); 2895 PTRDIFF_MAX);
2896 2896
2897 it->tab_width = SANE_TAB_WIDTH (current_buffer); 2897 it->tab_width = SANE_TAB_WIDTH (current_buffer);
@@ -2905,7 +2905,7 @@ init_iterator (struct it *it, struct window *w,
2905 || NILP (Vtruncate_partial_width_windows) 2905 || NILP (Vtruncate_partial_width_windows)
2906 || (FIXNUMP (Vtruncate_partial_width_windows) 2906 || (FIXNUMP (Vtruncate_partial_width_windows)
2907 /* PXW: Shall we do something about this? */ 2907 /* PXW: Shall we do something about this? */
2908 && (XINT (Vtruncate_partial_width_windows) 2908 && (XFIXNUM (Vtruncate_partial_width_windows)
2909 <= WINDOW_TOTAL_COLS (it->w)))) 2909 <= WINDOW_TOTAL_COLS (it->w))))
2910 && NILP (BVAR (current_buffer, truncate_lines))) 2910 && NILP (BVAR (current_buffer, truncate_lines)))
2911 it->line_wrap = NILP (BVAR (current_buffer, word_wrap)) 2911 it->line_wrap = NILP (BVAR (current_buffer, word_wrap))
@@ -3599,7 +3599,7 @@ compute_stop_pos (struct it *it)
3599 for (next_iv = next_interval (iv); 3599 for (next_iv = next_interval (iv);
3600 (next_iv 3600 (next_iv
3601 && (NILP (limit) 3601 && (NILP (limit)
3602 || XFASTINT (limit) > next_iv->position)); 3602 || XFIXNAT (limit) > next_iv->position));
3603 next_iv = next_interval (next_iv)) 3603 next_iv = next_interval (next_iv))
3604 { 3604 {
3605 for (p = it_props; p->handler; ++p) 3605 for (p = it_props; p->handler; ++p)
@@ -3617,9 +3617,9 @@ compute_stop_pos (struct it *it)
3617 if (next_iv) 3617 if (next_iv)
3618 { 3618 {
3619 if (FIXNUMP (limit) 3619 if (FIXNUMP (limit)
3620 && next_iv->position >= XFASTINT (limit)) 3620 && next_iv->position >= XFIXNAT (limit))
3621 /* No text property change up to limit. */ 3621 /* No text property change up to limit. */
3622 it->stop_charpos = min (XFASTINT (limit), it->stop_charpos); 3622 it->stop_charpos = min (XFIXNAT (limit), it->stop_charpos);
3623 else 3623 else
3624 /* Text properties change in next_iv. */ 3624 /* Text properties change in next_iv. */
3625 it->stop_charpos = min (it->stop_charpos, next_iv->position); 3625 it->stop_charpos = min (it->stop_charpos, next_iv->position);
@@ -3758,7 +3758,7 @@ compute_display_string_pos (struct text_pos *position,
3758 limpos = make_fixnum (lim); 3758 limpos = make_fixnum (lim);
3759 do { 3759 do {
3760 pos = Fnext_single_char_property_change (pos, Qdisplay, object1, limpos); 3760 pos = Fnext_single_char_property_change (pos, Qdisplay, object1, limpos);
3761 CHARPOS (tpos) = XFASTINT (pos); 3761 CHARPOS (tpos) = XFIXNAT (pos);
3762 if (CHARPOS (tpos) >= lim) 3762 if (CHARPOS (tpos) >= lim)
3763 { 3763 {
3764 *disp_prop = 0; 3764 *disp_prop = 0;
@@ -3819,7 +3819,7 @@ compute_display_string_end (ptrdiff_t charpos, struct bidi_string_data *string)
3819 changes. */ 3819 changes. */
3820 pos = Fnext_single_char_property_change (pos, Qdisplay, object, Qnil); 3820 pos = Fnext_single_char_property_change (pos, Qdisplay, object, Qnil);
3821 3821
3822 return XFASTINT (pos); 3822 return XFIXNAT (pos);
3823} 3823}
3824 3824
3825 3825
@@ -4376,7 +4376,7 @@ handle_invisible_prop (struct it *it)
4376 eassert (FIXNUMP (end_charpos)); 4376 eassert (FIXNUMP (end_charpos));
4377 if (FIXNUMP (end_charpos)) 4377 if (FIXNUMP (end_charpos))
4378 { 4378 {
4379 endpos = XFASTINT (end_charpos); 4379 endpos = XFIXNAT (end_charpos);
4380 prop = Fget_text_property (end_charpos, Qinvisible, it->string); 4380 prop = Fget_text_property (end_charpos, Qinvisible, it->string);
4381 invis = TEXT_PROP_MEANS_INVISIBLE (prop); 4381 invis = TEXT_PROP_MEANS_INVISIBLE (prop);
4382 if (invis == 2) 4382 if (invis == 2)
@@ -4863,11 +4863,11 @@ display_prop_end (struct it *it, Lisp_Object object, struct text_pos start_pos)
4863 4863
4864 end = Fnext_single_char_property_change (make_fixnum (CHARPOS (start_pos)), 4864 end = Fnext_single_char_property_change (make_fixnum (CHARPOS (start_pos)),
4865 Qdisplay, object, Qnil); 4865 Qdisplay, object, Qnil);
4866 CHARPOS (end_pos) = XFASTINT (end); 4866 CHARPOS (end_pos) = XFIXNAT (end);
4867 if (STRINGP (object)) 4867 if (STRINGP (object))
4868 compute_string_pos (&end_pos, start_pos, it->string); 4868 compute_string_pos (&end_pos, start_pos, it->string);
4869 else 4869 else
4870 BYTEPOS (end_pos) = CHAR_TO_BYTE (XFASTINT (end)); 4870 BYTEPOS (end_pos) = CHAR_TO_BYTE (XFIXNAT (end));
4871 4871
4872 return end_pos; 4872 return end_pos;
4873} 4873}
@@ -4965,7 +4965,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
4965 && RANGED_FIXNUMP (0, XCAR (XCDR (it->font_height)), INT_MAX)) 4965 && RANGED_FIXNUMP (0, XCAR (XCDR (it->font_height)), INT_MAX))
4966 { 4966 {
4967 /* `(+ N)' or `(- N)' where N is an integer. */ 4967 /* `(+ N)' or `(- N)' where N is an integer. */
4968 int steps = XINT (XCAR (XCDR (it->font_height))); 4968 int steps = XFIXNUM (XCAR (XCDR (it->font_height)));
4969 if (EQ (XCAR (it->font_height), Qplus)) 4969 if (EQ (XCAR (it->font_height), Qplus))
4970 steps = - steps; 4970 steps = - steps;
4971 it->face_id = smaller_face (it->f, it->face_id, steps); 4971 it->face_id = smaller_face (it->f, it->face_id, steps);
@@ -4989,7 +4989,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
4989 f = FACE_FROM_ID (it->f, 4989 f = FACE_FROM_ID (it->f,
4990 lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID)); 4990 lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID));
4991 new_height = (XFLOATINT (it->font_height) 4991 new_height = (XFLOATINT (it->font_height)
4992 * XINT (f->lface[LFACE_HEIGHT_INDEX])); 4992 * XFIXNUM (f->lface[LFACE_HEIGHT_INDEX]));
4993 } 4993 }
4994 else if (enable_eval_p) 4994 else if (enable_eval_p)
4995 { 4995 {
@@ -5517,7 +5517,7 @@ string_buffer_position_lim (Lisp_Object string,
5517 } 5517 }
5518 } 5518 }
5519 5519
5520 return found ? XINT (pos) : 0; 5520 return found ? XFIXNUM (pos) : 0;
5521} 5521}
5522 5522
5523/* Determine which buffer position in current buffer STRING comes from. 5523/* Determine which buffer position in current buffer STRING comes from.
@@ -5852,7 +5852,7 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos)
5852 entries[n].string = (STRING); \ 5852 entries[n].string = (STRING); \
5853 entries[n].overlay = (OVERLAY); \ 5853 entries[n].overlay = (OVERLAY); \
5854 priority = Foverlay_get ((OVERLAY), Qpriority); \ 5854 priority = Foverlay_get ((OVERLAY), Qpriority); \
5855 entries[n].priority = FIXNUMP (priority) ? XINT (priority) : 0; \ 5855 entries[n].priority = FIXNUMP (priority) ? XFIXNUM (priority) : 0; \
5856 entries[n].after_string_p = (AFTER_P); \ 5856 entries[n].after_string_p = (AFTER_P); \
5857 ++n; \ 5857 ++n; \
5858 } \ 5858 } \
@@ -10144,7 +10144,7 @@ include the height of both, if present, in the return value. */)
10144 else 10144 else
10145 { 10145 {
10146 CHECK_FIXNUM_COERCE_MARKER (from); 10146 CHECK_FIXNUM_COERCE_MARKER (from);
10147 start = min (max (XINT (from), BEGV), ZV); 10147 start = min (max (XFIXNUM (from), BEGV), ZV);
10148 } 10148 }
10149 10149
10150 if (NILP (to)) 10150 if (NILP (to))
@@ -10161,16 +10161,16 @@ include the height of both, if present, in the return value. */)
10161 else 10161 else
10162 { 10162 {
10163 CHECK_FIXNUM_COERCE_MARKER (to); 10163 CHECK_FIXNUM_COERCE_MARKER (to);
10164 end = max (start, min (XINT (to), ZV)); 10164 end = max (start, min (XFIXNUM (to), ZV));
10165 } 10165 }
10166 10166
10167 if (!NILP (x_limit) && RANGED_FIXNUMP (0, x_limit, INT_MAX)) 10167 if (!NILP (x_limit) && RANGED_FIXNUMP (0, x_limit, INT_MAX))
10168 max_x = XINT (x_limit); 10168 max_x = XFIXNUM (x_limit);
10169 10169
10170 if (NILP (y_limit)) 10170 if (NILP (y_limit))
10171 max_y = INT_MAX; 10171 max_y = INT_MAX;
10172 else if (RANGED_FIXNUMP (0, y_limit, INT_MAX)) 10172 else if (RANGED_FIXNUMP (0, y_limit, INT_MAX))
10173 max_y = XINT (y_limit); 10173 max_y = XFIXNUM (y_limit);
10174 10174
10175 itdata = bidi_shelve_cache (); 10175 itdata = bidi_shelve_cache ();
10176 SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start)); 10176 SET_TEXT_POS (startp, start, CHAR_TO_BYTE (start));
@@ -10460,7 +10460,7 @@ message_dolog (const char *m, ptrdiff_t nbytes, bool nlflag, bool multibyte)
10460 if (FIXNATP (Vmessage_log_max)) 10460 if (FIXNATP (Vmessage_log_max))
10461 { 10461 {
10462 scan_newline (Z, Z_BYTE, BEG, BEG_BYTE, 10462 scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,
10463 -XFASTINT (Vmessage_log_max) - 1, false); 10463 -XFIXNAT (Vmessage_log_max) - 1, false);
10464 del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, false); 10464 del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, false);
10465 } 10465 }
10466 } 10466 }
@@ -11000,7 +11000,7 @@ unwind_with_echo_area_buffer (Lisp_Object vector)
11000{ 11000{
11001 set_buffer_internal_1 (XBUFFER (AREF (vector, 0))); 11001 set_buffer_internal_1 (XBUFFER (AREF (vector, 0)));
11002 Vdeactivate_mark = AREF (vector, 1); 11002 Vdeactivate_mark = AREF (vector, 1);
11003 windows_or_buffers_changed = XFASTINT (AREF (vector, 2)); 11003 windows_or_buffers_changed = XFIXNAT (AREF (vector, 2));
11004 11004
11005 if (WINDOWP (AREF (vector, 3))) 11005 if (WINDOWP (AREF (vector, 3)))
11006 { 11006 {
@@ -11012,14 +11012,14 @@ unwind_with_echo_area_buffer (Lisp_Object vector)
11012 11012
11013 wset_buffer (w, buffer); 11013 wset_buffer (w, buffer);
11014 set_marker_both (w->pointm, buffer, 11014 set_marker_both (w->pointm, buffer,
11015 XFASTINT (AREF (vector, 5)), 11015 XFIXNAT (AREF (vector, 5)),
11016 XFASTINT (AREF (vector, 6))); 11016 XFIXNAT (AREF (vector, 6)));
11017 set_marker_both (w->old_pointm, buffer, 11017 set_marker_both (w->old_pointm, buffer,
11018 XFASTINT (AREF (vector, 7)), 11018 XFIXNAT (AREF (vector, 7)),
11019 XFASTINT (AREF (vector, 8))); 11019 XFIXNAT (AREF (vector, 8)));
11020 set_marker_both (w->start, buffer, 11020 set_marker_both (w->start, buffer,
11021 XFASTINT (AREF (vector, 9)), 11021 XFIXNAT (AREF (vector, 9)),
11022 XFASTINT (AREF (vector, 10))); 11022 XFIXNAT (AREF (vector, 10)));
11023 } 11023 }
11024 11024
11025 Vwith_echo_area_save_vector = vector; 11025 Vwith_echo_area_save_vector = vector;
@@ -11280,7 +11280,7 @@ resize_mini_window (struct window *w, bool exact_p)
11280 if (FLOATP (Vmax_mini_window_height)) 11280 if (FLOATP (Vmax_mini_window_height))
11281 max_height = XFLOAT_DATA (Vmax_mini_window_height) * total_height; 11281 max_height = XFLOAT_DATA (Vmax_mini_window_height) * total_height;
11282 else if (FIXNUMP (Vmax_mini_window_height)) 11282 else if (FIXNUMP (Vmax_mini_window_height))
11283 max_height = XINT (Vmax_mini_window_height) * unit; 11283 max_height = XFIXNUM (Vmax_mini_window_height) * unit;
11284 else 11284 else
11285 max_height = total_height / 4; 11285 max_height = total_height / 4;
11286 11286
@@ -11871,8 +11871,8 @@ unwind_format_mode_line (Lisp_Object vector)
11871 Lisp_Object target_frame_window = AREF (vector, 8); 11871 Lisp_Object target_frame_window = AREF (vector, 8);
11872 Lisp_Object old_top_frame = AREF (vector, 9); 11872 Lisp_Object old_top_frame = AREF (vector, 9);
11873 11873
11874 mode_line_target = XINT (AREF (vector, 0)); 11874 mode_line_target = XFIXNUM (AREF (vector, 0));
11875 mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1)); 11875 mode_line_noprop_ptr = mode_line_noprop_buf + XFIXNUM (AREF (vector, 1));
11876 mode_line_string_list = AREF (vector, 2); 11876 mode_line_string_list = AREF (vector, 2);
11877 if (! EQ (AREF (vector, 3), Qt)) 11877 if (! EQ (AREF (vector, 3), Qt))
11878 mode_line_proptrans_alist = AREF (vector, 3); 11878 mode_line_proptrans_alist = AREF (vector, 3);
@@ -12488,18 +12488,18 @@ build_desired_tool_bar_string (struct frame *f)
12488 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, 12488 if (RANGED_FIXNUMP (1, Vtool_bar_button_margin,
12489 INT_MAX - max (hmargin, vmargin))) 12489 INT_MAX - max (hmargin, vmargin)))
12490 { 12490 {
12491 hmargin += XFASTINT (Vtool_bar_button_margin); 12491 hmargin += XFIXNAT (Vtool_bar_button_margin);
12492 vmargin += XFASTINT (Vtool_bar_button_margin); 12492 vmargin += XFIXNAT (Vtool_bar_button_margin);
12493 } 12493 }
12494 else if (CONSP (Vtool_bar_button_margin)) 12494 else if (CONSP (Vtool_bar_button_margin))
12495 { 12495 {
12496 if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin), 12496 if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin),
12497 INT_MAX - hmargin)) 12497 INT_MAX - hmargin))
12498 hmargin += XFASTINT (XCAR (Vtool_bar_button_margin)); 12498 hmargin += XFIXNAT (XCAR (Vtool_bar_button_margin));
12499 12499
12500 if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), 12500 if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin),
12501 INT_MAX - vmargin)) 12501 INT_MAX - vmargin))
12502 vmargin += XFASTINT (XCDR (Vtool_bar_button_margin)); 12502 vmargin += XFIXNAT (XCDR (Vtool_bar_button_margin));
12503 } 12503 }
12504 12504
12505 if (auto_raise_tool_bar_buttons_p) 12505 if (auto_raise_tool_bar_buttons_p)
@@ -12836,7 +12836,7 @@ redisplay_tool_bar (struct frame *f)
12836 int border, rows, height, extra; 12836 int border, rows, height, extra;
12837 12837
12838 if (TYPE_RANGED_FIXNUMP (int, Vtool_bar_border)) 12838 if (TYPE_RANGED_FIXNUMP (int, Vtool_bar_border))
12839 border = XINT (Vtool_bar_border); 12839 border = XFIXNUM (Vtool_bar_border);
12840 else if (EQ (Vtool_bar_border, Qinternal_border_width)) 12840 else if (EQ (Vtool_bar_border, Qinternal_border_width))
12841 border = FRAME_INTERNAL_BORDER_WIDTH (f); 12841 border = FRAME_INTERNAL_BORDER_WIDTH (f);
12842 else if (EQ (Vtool_bar_border, Qborder_width)) 12842 else if (EQ (Vtool_bar_border, Qborder_width))
@@ -12958,7 +12958,7 @@ tool_bar_item_info (struct frame *f, struct glyph *glyph, int *prop_idx)
12958 Qmenu_item, f->current_tool_bar_string); 12958 Qmenu_item, f->current_tool_bar_string);
12959 if (! FIXNUMP (prop)) 12959 if (! FIXNUMP (prop))
12960 return false; 12960 return false;
12961 *prop_idx = XINT (prop); 12961 *prop_idx = XFIXNUM (prop);
12962 return true; 12962 return true;
12963} 12963}
12964 12964
@@ -13205,7 +13205,7 @@ hscroll_window_tree (Lisp_Object window)
13205 } 13205 }
13206 else if (TYPE_RANGED_FIXNUMP (int, Vhscroll_step)) 13206 else if (TYPE_RANGED_FIXNUMP (int, Vhscroll_step))
13207 { 13207 {
13208 hscroll_step_abs = XINT (Vhscroll_step); 13208 hscroll_step_abs = XFIXNUM (Vhscroll_step);
13209 if (hscroll_step_abs < 0) 13209 if (hscroll_step_abs < 0)
13210 hscroll_step_abs = 0; 13210 hscroll_step_abs = 0;
13211 } 13211 }
@@ -13562,7 +13562,7 @@ text_outside_line_unchanged_p (struct window *w,
13562 beginning of the line. */ 13562 beginning of the line. */
13563 if (unchanged_p 13563 if (unchanged_p
13564 && FIXNUMP (BVAR (current_buffer, selective_display)) 13564 && FIXNUMP (BVAR (current_buffer, selective_display))
13565 && XINT (BVAR (current_buffer, selective_display)) > 0 13565 && XFIXNUM (BVAR (current_buffer, selective_display)) > 0
13566 && (BEG_UNCHANGED < start || GPT <= start)) 13566 && (BEG_UNCHANGED < start || GPT <= start))
13567 unchanged_p = false; 13567 unchanged_p = false;
13568 13568
@@ -14144,7 +14144,7 @@ redisplay_internal (void)
14144 { \ 14144 { \
14145 Lisp_Object entry = Fgethash (make_fixnum (i), a, make_fixnum (0)); \ 14145 Lisp_Object entry = Fgethash (make_fixnum (i), a, make_fixnum (0)); \
14146 if (FIXNUMP (entry)) \ 14146 if (FIXNUMP (entry)) \
14147 Fputhash (make_fixnum (i), make_fixnum (1 + XINT (entry)), a); \ 14147 Fputhash (make_fixnum (i), make_fixnum (1 + XFIXNUM (entry)), a); \
14148 } 14148 }
14149 14149
14150 AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed); 14150 AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed);
@@ -15136,7 +15136,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
15136 } 15136 }
15137 if (FIXNUMP (chprop)) 15137 if (FIXNUMP (chprop))
15138 { 15138 {
15139 bpos_covered = bpos_max + XINT (chprop); 15139 bpos_covered = bpos_max + XFIXNUM (chprop);
15140 /* If the `cursor' property covers buffer positions up 15140 /* If the `cursor' property covers buffer positions up
15141 to and including point, we should display cursor on 15141 to and including point, we should display cursor on
15142 this glyph. Note that, if a `cursor' property on one 15142 this glyph. Note that, if a `cursor' property on one
@@ -15210,7 +15210,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
15210 } 15210 }
15211 if (FIXNUMP (chprop)) 15211 if (FIXNUMP (chprop))
15212 { 15212 {
15213 bpos_covered = bpos_max + XINT (chprop); 15213 bpos_covered = bpos_max + XFIXNUM (chprop);
15214 /* If the `cursor' property covers buffer positions up 15214 /* If the `cursor' property covers buffer positions up
15215 to and including point, we should display cursor on 15215 to and including point, we should display cursor on
15216 this glyph. */ 15216 this glyph. */
@@ -16943,7 +16943,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
16943 Qnil, Qnil); 16943 Qnil, Qnil);
16944 16944
16945 if (FIXNATP (invprop_end)) 16945 if (FIXNATP (invprop_end))
16946 alt_pt = XFASTINT (invprop_end); 16946 alt_pt = XFIXNAT (invprop_end);
16947 else 16947 else
16948 alt_pt = ZV; 16948 alt_pt = ZV;
16949 r = row_containing_pos (w, alt_pt, w->desired_matrix->rows, 16949 r = row_containing_pos (w, alt_pt, w->desired_matrix->rows,
@@ -17475,7 +17475,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
17475 Qnil, Qnil); 17475 Qnil, Qnil);
17476 17476
17477 if (FIXNATP (invis_end)) 17477 if (FIXNATP (invis_end))
17478 alt_pos = XFASTINT (invis_end); 17478 alt_pos = XFIXNAT (invis_end);
17479 else 17479 else
17480 alt_pos = ZV; 17480 alt_pos = ZV;
17481 row = row_containing_pos (w, alt_pos, matrix->rows, NULL, 0); 17481 row = row_containing_pos (w, alt_pos, matrix->rows, NULL, 0);
@@ -19584,7 +19584,7 @@ with numeric argument, its value is passed as the GLYPHS flag. */)
19584 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos); 19584 w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
19585 fprintf (stderr, "=============================================\n"); 19585 fprintf (stderr, "=============================================\n");
19586 dump_glyph_matrix (w->current_matrix, 19586 dump_glyph_matrix (w->current_matrix,
19587 TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 0); 19587 TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 0);
19588 return Qnil; 19588 return Qnil;
19589} 19589}
19590 19590
@@ -19629,13 +19629,13 @@ GLYPHS > 1 or omitted means dump glyphs in long form. */)
19629 else 19629 else
19630 { 19630 {
19631 CHECK_FIXNUM (row); 19631 CHECK_FIXNUM (row);
19632 vpos = XINT (row); 19632 vpos = XFIXNUM (row);
19633 } 19633 }
19634 matrix = XWINDOW (selected_window)->current_matrix; 19634 matrix = XWINDOW (selected_window)->current_matrix;
19635 if (vpos >= 0 && vpos < matrix->nrows) 19635 if (vpos >= 0 && vpos < matrix->nrows)
19636 dump_glyph_row (MATRIX_ROW (matrix, vpos), 19636 dump_glyph_row (MATRIX_ROW (matrix, vpos),
19637 vpos, 19637 vpos,
19638 TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2); 19638 TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 2);
19639 return Qnil; 19639 return Qnil;
19640} 19640}
19641 19641
@@ -19661,11 +19661,11 @@ do nothing. */)
19661 else 19661 else
19662 { 19662 {
19663 CHECK_FIXNUM (row); 19663 CHECK_FIXNUM (row);
19664 vpos = XINT (row); 19664 vpos = XFIXNUM (row);
19665 } 19665 }
19666 if (vpos >= 0 && vpos < m->nrows) 19666 if (vpos >= 0 && vpos < m->nrows)
19667 dump_glyph_row (MATRIX_ROW (m, vpos), vpos, 19667 dump_glyph_row (MATRIX_ROW (m, vpos), vpos,
19668 TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2); 19668 TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 2);
19669#endif 19669#endif
19670 return Qnil; 19670 return Qnil;
19671} 19671}
@@ -19681,7 +19681,7 @@ With ARG, turn tracing on if and only if ARG is positive. */)
19681 else 19681 else
19682 { 19682 {
19683 arg = Fprefix_numeric_value (arg); 19683 arg = Fprefix_numeric_value (arg);
19684 trace_redisplay_p = XINT (arg) > 0; 19684 trace_redisplay_p = XFIXNUM (arg) > 0;
19685 } 19685 }
19686 19686
19687 return Qnil; 19687 return Qnil;
@@ -20147,8 +20147,8 @@ append_space_for_newline (struct it *it, bool default_face_p)
20147 it->phys_ascent = it->ascent; 20147 it->phys_ascent = it->ascent;
20148 it->phys_descent = it->descent; 20148 it->phys_descent = it->descent;
20149 if (!NILP (height) 20149 if (!NILP (height)
20150 && XINT (height) > it->ascent + it->descent) 20150 && XFIXNUM (height) > it->ascent + it->descent)
20151 it->ascent = XINT (height) - it->descent; 20151 it->ascent = XFIXNUM (height) - it->descent;
20152 20152
20153 if (!NILP (total_height)) 20153 if (!NILP (total_height))
20154 spacing = calc_line_height_property (it, total_height, font, 20154 spacing = calc_line_height_property (it, total_height, font,
@@ -20161,7 +20161,7 @@ append_space_for_newline (struct it *it, bool default_face_p)
20161 } 20161 }
20162 if (FIXNUMP (spacing)) 20162 if (FIXNUMP (spacing))
20163 { 20163 {
20164 extra_line_spacing = XINT (spacing); 20164 extra_line_spacing = XFIXNUM (spacing);
20165 if (!NILP (total_height)) 20165 if (!NILP (total_height))
20166 extra_line_spacing -= (it->phys_ascent + it->phys_descent); 20166 extra_line_spacing -= (it->phys_ascent + it->phys_descent);
20167 } 20167 }
@@ -21129,7 +21129,7 @@ maybe_produce_line_number (struct it *it)
21129 if (!it->lnum_width) 21129 if (!it->lnum_width)
21130 { 21130 {
21131 if (FIXNATP (Vdisplay_line_numbers_width)) 21131 if (FIXNATP (Vdisplay_line_numbers_width))
21132 it->lnum_width = XFASTINT (Vdisplay_line_numbers_width); 21132 it->lnum_width = XFIXNAT (Vdisplay_line_numbers_width);
21133 21133
21134 /* Max line number to be displayed cannot be more than the one 21134 /* Max line number to be displayed cannot be more than the one
21135 corresponding to the last row of the desired matrix. */ 21135 corresponding to the last row of the desired matrix. */
@@ -22186,7 +22186,7 @@ display_line (struct it *it, int cursor_vpos)
22186 else 22186 else
22187 { 22187 {
22188 eassert (FIXNUMP (overlay_arrow_string)); 22188 eassert (FIXNUMP (overlay_arrow_string));
22189 row->overlay_arrow_bitmap = XINT (overlay_arrow_string); 22189 row->overlay_arrow_bitmap = XFIXNUM (overlay_arrow_string);
22190 } 22190 }
22191 overlay_arrow_seen = true; 22191 overlay_arrow_seen = true;
22192 } 22192 }
@@ -22449,8 +22449,8 @@ the `bidi-class' property of a character. */)
22449 22449
22450 set_buffer_temp (buf); 22450 set_buffer_temp (buf);
22451 validate_region (&from, &to); 22451 validate_region (&from, &to);
22452 from_pos = XINT (from); 22452 from_pos = XFIXNUM (from);
22453 to_pos = XINT (to); 22453 to_pos = XFIXNUM (to);
22454 if (from_pos >= ZV) 22454 if (from_pos >= ZV)
22455 return Qnil; 22455 return Qnil;
22456 22456
@@ -22519,7 +22519,7 @@ Value is the new character position of point. */)
22519 && !(GLYPH)->avoid_cursor_p) 22519 && !(GLYPH)->avoid_cursor_p)
22520 22520
22521 CHECK_FIXNUM (direction); 22521 CHECK_FIXNUM (direction);
22522 dir = XINT (direction); 22522 dir = XFIXNUM (direction);
22523 if (dir > 0) 22523 if (dir > 0)
22524 dir = 1; 22524 dir = 1;
22525 else 22525 else
@@ -22990,7 +22990,7 @@ Emacs UBA implementation, in particular with the test suite. */)
22990 else 22990 else
22991 { 22991 {
22992 CHECK_FIXNUM_COERCE_MARKER (vpos); 22992 CHECK_FIXNUM_COERCE_MARKER (vpos);
22993 nrow = XINT (vpos); 22993 nrow = XFIXNUM (vpos);
22994 } 22994 }
22995 22995
22996 /* We require up-to-date glyph matrix for this window. */ 22996 /* We require up-to-date glyph matrix for this window. */
@@ -23912,7 +23912,7 @@ display_mode_element (struct it *it, int depth, int field_width, int precision,
23912 } 23912 }
23913 else if (FIXNUMP (car)) 23913 else if (FIXNUMP (car))
23914 { 23914 {
23915 register int lim = XINT (car); 23915 register int lim = XFIXNUM (car);
23916 elt = XCDR (elt); 23916 elt = XCDR (elt);
23917 if (lim < 0) 23917 if (lim < 0)
23918 { 23918 {
@@ -24032,7 +24032,7 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string,
24032 } 24032 }
24033 else 24033 else
24034 { 24034 {
24035 len = XFASTINT (Flength (lisp_string)); 24035 len = XFIXNAT (Flength (lisp_string));
24036 if (precision > 0 && len > precision) 24036 if (precision > 0 && len > precision)
24037 { 24037 {
24038 len = precision; 24038 len = precision;
@@ -24362,7 +24362,7 @@ decode_mode_spec_coding (Lisp_Object coding_system, char *buf, bool eol_flag)
24362 eolvalue = AREF (val, 2); 24362 eolvalue = AREF (val, 2);
24363 24363
24364 *buf++ = multibyte 24364 *buf++ = multibyte
24365 ? XFASTINT (CODING_ATTR_MNEMONIC (attrs)) 24365 ? XFIXNAT (CODING_ATTR_MNEMONIC (attrs))
24366 : ' '; 24366 : ' ';
24367 24367
24368 if (eol_flag) 24368 if (eol_flag)
@@ -24391,7 +24391,7 @@ decode_mode_spec_coding (Lisp_Object coding_system, char *buf, bool eol_flag)
24391 } 24391 }
24392 else if (CHARACTERP (eoltype)) 24392 else if (CHARACTERP (eoltype))
24393 { 24393 {
24394 int c = XFASTINT (eoltype); 24394 int c = XFIXNAT (eoltype);
24395 return buf + CHAR_STRING (c, (unsigned char *) buf); 24395 return buf + CHAR_STRING (c, (unsigned char *) buf);
24396 } 24396 }
24397 else 24397 else
@@ -24598,7 +24598,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
24598 24598
24599 /* If the buffer is very big, don't waste time. */ 24599 /* If the buffer is very big, don't waste time. */
24600 if (FIXNUMP (Vline_number_display_limit) 24600 if (FIXNUMP (Vline_number_display_limit)
24601 && BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit)) 24601 && BUF_ZV (b) - BUF_BEGV (b) > XFIXNUM (Vline_number_display_limit))
24602 { 24602 {
24603 w->base_line_pos = 0; 24603 w->base_line_pos = 0;
24604 w->base_line_number = 0; 24604 w->base_line_number = 0;
@@ -27191,22 +27191,22 @@ produce_image_glyph (struct it *it)
27191 slice.height = img->height; 27191 slice.height = img->height;
27192 27192
27193 if (FIXNUMP (it->slice.x)) 27193 if (FIXNUMP (it->slice.x))
27194 slice.x = XINT (it->slice.x); 27194 slice.x = XFIXNUM (it->slice.x);
27195 else if (FLOATP (it->slice.x)) 27195 else if (FLOATP (it->slice.x))
27196 slice.x = XFLOAT_DATA (it->slice.x) * img->width; 27196 slice.x = XFLOAT_DATA (it->slice.x) * img->width;
27197 27197
27198 if (FIXNUMP (it->slice.y)) 27198 if (FIXNUMP (it->slice.y))
27199 slice.y = XINT (it->slice.y); 27199 slice.y = XFIXNUM (it->slice.y);
27200 else if (FLOATP (it->slice.y)) 27200 else if (FLOATP (it->slice.y))
27201 slice.y = XFLOAT_DATA (it->slice.y) * img->height; 27201 slice.y = XFLOAT_DATA (it->slice.y) * img->height;
27202 27202
27203 if (FIXNUMP (it->slice.width)) 27203 if (FIXNUMP (it->slice.width))
27204 slice.width = XINT (it->slice.width); 27204 slice.width = XFIXNUM (it->slice.width);
27205 else if (FLOATP (it->slice.width)) 27205 else if (FLOATP (it->slice.width))
27206 slice.width = XFLOAT_DATA (it->slice.width) * img->width; 27206 slice.width = XFLOAT_DATA (it->slice.width) * img->width;
27207 27207
27208 if (FIXNUMP (it->slice.height)) 27208 if (FIXNUMP (it->slice.height))
27209 slice.height = XINT (it->slice.height); 27209 slice.height = XFIXNUM (it->slice.height);
27210 else if (FLOATP (it->slice.height)) 27210 else if (FLOATP (it->slice.height))
27211 slice.height = XFLOAT_DATA (it->slice.height) * img->height; 27211 slice.height = XFLOAT_DATA (it->slice.height) * img->height;
27212 27212
@@ -27886,7 +27886,7 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
27886 if (FLOATP (val)) 27886 if (FLOATP (val))
27887 height = (int)(XFLOAT_DATA (val) * height); 27887 height = (int)(XFLOAT_DATA (val) * height);
27888 else if (FIXNUMP (val)) 27888 else if (FIXNUMP (val))
27889 height *= XINT (val); 27889 height *= XFIXNUM (val);
27890 27890
27891 return make_fixnum (height); 27891 return make_fixnum (height);
27892} 27892}
@@ -28376,8 +28376,8 @@ x_produce_glyphs (struct it *it)
28376 it->descent += face->box_line_width; 28376 it->descent += face->box_line_width;
28377 } 28377 }
28378 if (!NILP (height) 28378 if (!NILP (height)
28379 && XINT (height) > it->ascent + it->descent) 28379 && XFIXNUM (height) > it->ascent + it->descent)
28380 it->ascent = XINT (height) - it->descent; 28380 it->ascent = XFIXNUM (height) - it->descent;
28381 28381
28382 if (!NILP (total_height)) 28382 if (!NILP (total_height))
28383 spacing = calc_line_height_property (it, total_height, font, 28383 spacing = calc_line_height_property (it, total_height, font,
@@ -28390,7 +28390,7 @@ x_produce_glyphs (struct it *it)
28390 } 28390 }
28391 if (FIXNUMP (spacing)) 28391 if (FIXNUMP (spacing))
28392 { 28392 {
28393 extra_line_spacing = XINT (spacing); 28393 extra_line_spacing = XFIXNUM (spacing);
28394 if (!NILP (total_height)) 28394 if (!NILP (total_height))
28395 extra_line_spacing -= (it->phys_ascent + it->phys_descent); 28395 extra_line_spacing -= (it->phys_ascent + it->phys_descent);
28396 } 28396 }
@@ -29096,7 +29096,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width)
29096 && EQ (XCAR (arg), Qbar) 29096 && EQ (XCAR (arg), Qbar)
29097 && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX)) 29097 && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
29098 { 29098 {
29099 *width = XINT (XCDR (arg)); 29099 *width = XFIXNUM (XCDR (arg));
29100 return BAR_CURSOR; 29100 return BAR_CURSOR;
29101 } 29101 }
29102 29102
@@ -29110,7 +29110,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width)
29110 && EQ (XCAR (arg), Qhbar) 29110 && EQ (XCAR (arg), Qhbar)
29111 && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX)) 29111 && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
29112 { 29112 {
29113 *width = XINT (XCDR (arg)); 29113 *width = XFIXNUM (XCDR (arg));
29114 return HBAR_CURSOR; 29114 return HBAR_CURSOR;
29115 } 29115 }
29116 29116
@@ -30733,13 +30733,13 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
30733 return false; 30733 return false;
30734 if (!CONSP (XCDR (rect))) 30734 if (!CONSP (XCDR (rect)))
30735 return false; 30735 return false;
30736 if (!(tem = XCAR (XCAR (rect)), FIXNUMP (tem) && x >= XINT (tem))) 30736 if (!(tem = XCAR (XCAR (rect)), FIXNUMP (tem) && x >= XFIXNUM (tem)))
30737 return false; 30737 return false;
30738 if (!(tem = XCDR (XCAR (rect)), FIXNUMP (tem) && y >= XINT (tem))) 30738 if (!(tem = XCDR (XCAR (rect)), FIXNUMP (tem) && y >= XFIXNUM (tem)))
30739 return false; 30739 return false;
30740 if (!(tem = XCAR (XCDR (rect)), FIXNUMP (tem) && x <= XINT (tem))) 30740 if (!(tem = XCAR (XCDR (rect)), FIXNUMP (tem) && x <= XFIXNUM (tem)))
30741 return false; 30741 return false;
30742 if (!(tem = XCDR (XCDR (rect)), FIXNUMP (tem) && y <= XINT (tem))) 30742 if (!(tem = XCDR (XCDR (rect)), FIXNUMP (tem) && y <= XFIXNUM (tem)))
30743 return false; 30743 return false;
30744 return true; 30744 return true;
30745 } 30745 }
@@ -30755,8 +30755,8 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
30755 && (ly0 = XCDR (XCAR (circ)), FIXNUMP (ly0))) 30755 && (ly0 = XCDR (XCAR (circ)), FIXNUMP (ly0)))
30756 { 30756 {
30757 double r = XFLOATINT (lr); 30757 double r = XFLOATINT (lr);
30758 double dx = XINT (lx0) - x; 30758 double dx = XFIXNUM (lx0) - x;
30759 double dy = XINT (ly0) - y; 30759 double dy = XFIXNUM (ly0) - y;
30760 return (dx * dx + dy * dy <= r * r); 30760 return (dx * dx + dy * dy <= r * r);
30761 } 30761 }
30762 } 30762 }
@@ -30784,14 +30784,14 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
30784 if ((lx = poly[n-2], !FIXNUMP (lx)) 30784 if ((lx = poly[n-2], !FIXNUMP (lx))
30785 || (ly = poly[n-1], !FIXNUMP (lx))) 30785 || (ly = poly[n-1], !FIXNUMP (lx)))
30786 return false; 30786 return false;
30787 x0 = XINT (lx), y0 = XINT (ly); 30787 x0 = XFIXNUM (lx), y0 = XFIXNUM (ly);
30788 for (i = 0; i < n; i += 2) 30788 for (i = 0; i < n; i += 2)
30789 { 30789 {
30790 int x1 = x0, y1 = y0; 30790 int x1 = x0, y1 = y0;
30791 if ((lx = poly[i], !FIXNUMP (lx)) 30791 if ((lx = poly[i], !FIXNUMP (lx))
30792 || (ly = poly[i+1], !FIXNUMP (ly))) 30792 || (ly = poly[i+1], !FIXNUMP (ly)))
30793 return false; 30793 return false;
30794 x0 = XINT (lx), y0 = XINT (ly); 30794 x0 = XFIXNUM (lx), y0 = XFIXNUM (ly);
30795 30795
30796 /* Does this segment cross the X line? */ 30796 /* Does this segment cross the X line? */
30797 if (x0 >= x) 30797 if (x0 >= x)
@@ -30847,8 +30847,8 @@ Returns the alist element for the first matching AREA in MAP. */)
30847 CHECK_FIXNUM (y); 30847 CHECK_FIXNUM (y);
30848 30848
30849 return find_hot_spot (map, 30849 return find_hot_spot (map,
30850 clip_to_bounds (INT_MIN, XINT (x), INT_MAX), 30850 clip_to_bounds (INT_MIN, XFIXNUM (x), INT_MAX),
30851 clip_to_bounds (INT_MIN, XINT (y), INT_MAX)); 30851 clip_to_bounds (INT_MIN, XFIXNUM (y), INT_MAX));
30852} 30852}
30853#endif /* HAVE_WINDOW_SYSTEM */ 30853#endif /* HAVE_WINDOW_SYSTEM */
30854 30854
@@ -31090,13 +31090,13 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
31090 if (NILP (b)) 31090 if (NILP (b))
31091 begpos = 0; 31091 begpos = 0;
31092 else 31092 else
31093 begpos = XINT (b); 31093 begpos = XFIXNUM (b);
31094 31094
31095 e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil); 31095 e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil);
31096 if (NILP (e)) 31096 if (NILP (e))
31097 endpos = SCHARS (string); 31097 endpos = SCHARS (string);
31098 else 31098 else
31099 endpos = XINT (e); 31099 endpos = XFIXNUM (e);
31100 31100
31101 /* Calculate the glyph position GPOS of GLYPH in the 31101 /* Calculate the glyph position GPOS of GLYPH in the
31102 displayed string, relative to the beginning of the 31102 displayed string, relative to the beginning of the
@@ -31573,7 +31573,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
31573 if (NILP (e)) 31573 if (NILP (e))
31574 e = make_fixnum (SCHARS (object)); 31574 e = make_fixnum (SCHARS (object));
31575 mouse_face_from_string_pos (w, hlinfo, object, 31575 mouse_face_from_string_pos (w, hlinfo, object,
31576 XINT (s), XINT (e)); 31576 XFIXNUM (s), XFIXNUM (e));
31577 hlinfo->mouse_face_past_end = false; 31577 hlinfo->mouse_face_past_end = false;
31578 hlinfo->mouse_face_window = window; 31578 hlinfo->mouse_face_window = window;
31579 hlinfo->mouse_face_face_id 31579 hlinfo->mouse_face_face_id
@@ -31658,10 +31658,10 @@ note_mouse_highlight (struct frame *f, int x, int y)
31658 mouse_face_from_buffer_pos (window, hlinfo, pos, 31658 mouse_face_from_buffer_pos (window, hlinfo, pos,
31659 NILP (before) 31659 NILP (before)
31660 ? 1 31660 ? 1
31661 : XFASTINT (before), 31661 : XFIXNAT (before),
31662 NILP (after) 31662 NILP (after)
31663 ? BUF_Z (XBUFFER (buffer)) 31663 ? BUF_Z (XBUFFER (buffer))
31664 : XFASTINT (after), 31664 : XFIXNAT (after),
31665 before_string, after_string, 31665 before_string, after_string,
31666 disp_string); 31666 disp_string);
31667 cursor = No_Cursor; 31667 cursor = No_Cursor;
@@ -33316,8 +33316,8 @@ start_hourglass (void)
33316 cancel_hourglass (); 33316 cancel_hourglass ();
33317 33317
33318 if (FIXNUMP (Vhourglass_delay) 33318 if (FIXNUMP (Vhourglass_delay)
33319 && XINT (Vhourglass_delay) > 0) 33319 && XFIXNUM (Vhourglass_delay) > 0)
33320 delay = make_timespec (min (XINT (Vhourglass_delay), 33320 delay = make_timespec (min (XFIXNUM (Vhourglass_delay),
33321 TYPE_MAXIMUM (time_t)), 33321 TYPE_MAXIMUM (time_t)),
33322 0); 33322 0);
33323 else if (FLOATP (Vhourglass_delay) 33323 else if (FLOATP (Vhourglass_delay)
diff --git a/src/xfaces.c b/src/xfaces.c
index f87eb66b3ab..29168e23205 100644
--- a/src/xfaces.c
+++ b/src/xfaces.c
@@ -739,8 +739,8 @@ the pixmap. Bits are stored row by row, each row occupies
739 && RANGED_FIXNUMP (1, width, INT_MAX) 739 && RANGED_FIXNUMP (1, width, INT_MAX)
740 && RANGED_FIXNUMP (1, height, INT_MAX)) 740 && RANGED_FIXNUMP (1, height, INT_MAX))
741 { 741 {
742 int bytes_per_row = (XINT (width) + CHAR_BIT - 1) / CHAR_BIT; 742 int bytes_per_row = (XFIXNUM (width) + CHAR_BIT - 1) / CHAR_BIT;
743 if (XINT (height) <= SBYTES (data) / bytes_per_row) 743 if (XFIXNUM (height) <= SBYTES (data) / bytes_per_row)
744 pixmap_p = true; 744 pixmap_p = true;
745 } 745 }
746 } 746 }
@@ -773,8 +773,8 @@ load_pixmap (struct frame *f, Lisp_Object name)
773 int h, w; 773 int h, w;
774 Lisp_Object bits; 774 Lisp_Object bits;
775 775
776 w = XINT (Fcar (name)); 776 w = XFIXNUM (Fcar (name));
777 h = XINT (Fcar (Fcdr (name))); 777 h = XFIXNUM (Fcar (Fcdr (name)));
778 bits = Fcar (Fcdr (Fcdr (name))); 778 bits = Fcar (Fcdr (Fcdr (name)));
779 779
780 bitmap_id = x_create_bitmap_from_data (f, SSDATA (bits), 780 bitmap_id = x_create_bitmap_from_data (f, SSDATA (bits),
@@ -820,7 +820,7 @@ parse_rgb_list (Lisp_Object rgb_list, XColor *color)
820#define PARSE_RGB_LIST_FIELD(field) \ 820#define PARSE_RGB_LIST_FIELD(field) \
821 if (CONSP (rgb_list) && FIXNUMP (XCAR (rgb_list))) \ 821 if (CONSP (rgb_list) && FIXNUMP (XCAR (rgb_list))) \
822 { \ 822 { \
823 color->field = XINT (XCAR (rgb_list)); \ 823 color->field = XFIXNUM (XCAR (rgb_list)); \
824 rgb_list = XCDR (rgb_list); \ 824 rgb_list = XCDR (rgb_list); \
825 } \ 825 } \
826 else \ 826 else \
@@ -858,7 +858,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color,
858 if (! FIXNUMP (XCAR (XCDR (color_desc)))) 858 if (! FIXNUMP (XCAR (XCDR (color_desc))))
859 return false; 859 return false;
860 860
861 tty_color->pixel = XINT (XCAR (XCDR (color_desc))); 861 tty_color->pixel = XFIXNUM (XCAR (XCDR (color_desc)));
862 862
863 rgb = XCDR (XCDR (color_desc)); 863 rgb = XCDR (XCDR (color_desc));
864 if (! parse_rgb_list (rgb, tty_color)) 864 if (! parse_rgb_list (rgb, tty_color))
@@ -1391,8 +1391,8 @@ compare_fonts_by_sort_order (const void *v1, const void *v2)
1391 else 1391 else
1392 { 1392 {
1393 if (FIXNUMP (val1)) 1393 if (FIXNUMP (val1))
1394 result = (FIXNUMP (val2) && XINT (val1) >= XINT (val2) 1394 result = (FIXNUMP (val2) && XFIXNUM (val1) >= XFIXNUM (val2)
1395 ? XINT (val1) > XINT (val2) 1395 ? XFIXNUM (val1) > XFIXNUM (val2)
1396 : -1); 1396 : -1);
1397 else 1397 else
1398 result = FIXNUMP (val2) ? 1 : 0; 1398 result = FIXNUMP (val2) ? 1 : 0;
@@ -1457,7 +1457,7 @@ the face font sort order. */)
1457 font_props_for_sorting[i++] = FONT_ADSTYLE_INDEX; 1457 font_props_for_sorting[i++] = FONT_ADSTYLE_INDEX;
1458 font_props_for_sorting[i++] = FONT_REGISTRY_INDEX; 1458 font_props_for_sorting[i++] = FONT_REGISTRY_INDEX;
1459 1459
1460 ndrivers = XINT (Flength (list)); 1460 ndrivers = XFIXNUM (Flength (list));
1461 SAFE_ALLOCA_LISP (drivers, ndrivers); 1461 SAFE_ALLOCA_LISP (drivers, ndrivers);
1462 for (i = 0; i < ndrivers; i++, list = XCDR (list)) 1462 for (i = 0; i < ndrivers; i++, list = XCDR (list))
1463 drivers[i] = XCAR (list); 1463 drivers[i] = XCAR (list);
@@ -1477,7 +1477,7 @@ the face font sort order. */)
1477 1477
1478 ASET (v, 0, AREF (font, FONT_FAMILY_INDEX)); 1478 ASET (v, 0, AREF (font, FONT_FAMILY_INDEX));
1479 ASET (v, 1, FONT_WIDTH_SYMBOLIC (font)); 1479 ASET (v, 1, FONT_WIDTH_SYMBOLIC (font));
1480 point = PIXEL_TO_POINT (XINT (AREF (font, FONT_SIZE_INDEX)) * 10, 1480 point = PIXEL_TO_POINT (XFIXNUM (AREF (font, FONT_SIZE_INDEX)) * 10,
1481 FRAME_RES_Y (f)); 1481 FRAME_RES_Y (f));
1482 ASET (v, 2, make_fixnum (point)); 1482 ASET (v, 2, make_fixnum (point));
1483 ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font)); 1483 ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font));
@@ -1566,7 +1566,7 @@ the WIDTH times as wide as FACE on FRAME. */)
1566 avgwidth = FRAME_FONT (f)->average_width; 1566 avgwidth = FRAME_FONT (f)->average_width;
1567 } 1567 }
1568 if (!NILP (width)) 1568 if (!NILP (width))
1569 avgwidth *= XINT (width); 1569 avgwidth *= XFIXNUM (width);
1570 } 1570 }
1571 1571
1572 Lisp_Object font_spec = font_spec_from_name (pattern); 1572 Lisp_Object font_spec = font_spec_from_name (pattern);
@@ -1585,7 +1585,7 @@ the WIDTH times as wide as FACE on FRAME. */)
1585 1585
1586 font_entity = XCAR (tail); 1586 font_entity = XCAR (tail);
1587 if ((NILP (AREF (font_entity, FONT_SIZE_INDEX)) 1587 if ((NILP (AREF (font_entity, FONT_SIZE_INDEX))
1588 || XINT (AREF (font_entity, FONT_SIZE_INDEX)) == 0) 1588 || XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX)) == 0)
1589 && ! NILP (AREF (font_spec, FONT_SIZE_INDEX))) 1589 && ! NILP (AREF (font_spec, FONT_SIZE_INDEX)))
1590 { 1590 {
1591 /* This is a scalable font. For backward compatibility, 1591 /* This is a scalable font. For backward compatibility,
@@ -2051,7 +2051,7 @@ merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid)
2051 { 2051 {
2052 if (FIXNUMP (to)) 2052 if (FIXNUMP (to))
2053 /* relative X absolute => absolute */ 2053 /* relative X absolute => absolute */
2054 result = make_fixnum (XFLOAT_DATA (from) * XINT (to)); 2054 result = make_fixnum (XFLOAT_DATA (from) * XFIXNUM (to));
2055 else if (FLOATP (to)) 2055 else if (FLOATP (to))
2056 /* relative X relative => relative */ 2056 /* relative X relative => relative */
2057 result = make_float (XFLOAT_DATA (from) * XFLOAT_DATA (to)); 2057 result = make_float (XFLOAT_DATA (from) * XFLOAT_DATA (to));
@@ -2792,7 +2792,7 @@ FRAME 0 means change the face on all frames, and change the default
2792 2792
2793 /* If FRAME is 0, change face on all frames, and change the 2793 /* If FRAME is 0, change face on all frames, and change the
2794 default for new frames. */ 2794 default for new frames. */
2795 if (FIXNUMP (frame) && XINT (frame) == 0) 2795 if (FIXNUMP (frame) && XFIXNUM (frame) == 0)
2796 { 2796 {
2797 Lisp_Object tail; 2797 Lisp_Object tail;
2798 Finternal_set_lisp_face_attribute (face, attr, value, Qt); 2798 Finternal_set_lisp_face_attribute (face, attr, value, Qt);
@@ -2862,7 +2862,7 @@ FRAME 0 means change the face on all frames, and change the default
2862 if (EQ (face, Qdefault)) 2862 if (EQ (face, Qdefault))
2863 { 2863 {
2864 /* The default face must have an absolute size. */ 2864 /* The default face must have an absolute size. */
2865 if (!FIXNUMP (value) || XINT (value) <= 0) 2865 if (!FIXNUMP (value) || XFIXNUM (value) <= 0)
2866 signal_error ("Default face height not absolute and positive", 2866 signal_error ("Default face height not absolute and positive",
2867 value); 2867 value);
2868 } 2868 }
@@ -2873,7 +2873,7 @@ FRAME 0 means change the face on all frames, and change the default
2873 Lisp_Object test = merge_face_heights (value, 2873 Lisp_Object test = merge_face_heights (value,
2874 make_fixnum (10), 2874 make_fixnum (10),
2875 Qnil); 2875 Qnil);
2876 if (!FIXNUMP (test) || XINT (test) <= 0) 2876 if (!FIXNUMP (test) || XFIXNUM (test) <= 0)
2877 signal_error ("Face height does not produce a positive integer", 2877 signal_error ("Face height does not produce a positive integer",
2878 value); 2878 value);
2879 } 2879 }
@@ -3008,7 +3008,7 @@ FRAME 0 means change the face on all frames, and change the default
3008 else if (NILP (value)) 3008 else if (NILP (value))
3009 valid_p = true; 3009 valid_p = true;
3010 else if (FIXNUMP (value)) 3010 else if (FIXNUMP (value))
3011 valid_p = XINT (value) != 0; 3011 valid_p = XFIXNUM (value) != 0;
3012 else if (STRINGP (value)) 3012 else if (STRINGP (value))
3013 valid_p = SCHARS (value) > 0; 3013 valid_p = SCHARS (value) > 0;
3014 else if (CONSP (value)) 3014 else if (CONSP (value))
@@ -3029,7 +3029,7 @@ FRAME 0 means change the face on all frames, and change the default
3029 3029
3030 if (EQ (k, QCline_width)) 3030 if (EQ (k, QCline_width))
3031 { 3031 {
3032 if (!FIXNUMP (v) || XINT (v) == 0) 3032 if (!FIXNUMP (v) || XFIXNUM (v) == 0)
3033 break; 3033 break;
3034 } 3034 }
3035 else if (EQ (k, QCcolor)) 3035 else if (EQ (k, QCcolor))
@@ -3538,7 +3538,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource",
3538 else if (EQ (attr, QCheight)) 3538 else if (EQ (attr, QCheight))
3539 { 3539 {
3540 value = Fstring_to_number (value, Qnil); 3540 value = Fstring_to_number (value, Qnil);
3541 if (!FIXNUMP (value) || XINT (value) <= 0) 3541 if (!FIXNUMP (value) || XFIXNUM (value) <= 0)
3542 signal_error ("Invalid face height from X resource", value); 3542 signal_error ("Invalid face height from X resource", value);
3543 } 3543 }
3544 else if (EQ (attr, QCbold) || EQ (attr, QCitalic)) 3544 else if (EQ (attr, QCbold) || EQ (attr, QCitalic))
@@ -3928,7 +3928,7 @@ return the font name used for CHARACTER. */)
3928 if (FRAME_WINDOW_P (f) && !NILP (character)) 3928 if (FRAME_WINDOW_P (f) && !NILP (character))
3929 { 3929 {
3930 CHECK_CHARACTER (character); 3930 CHECK_CHARACTER (character);
3931 face_id = FACE_FOR_CHAR (f, fface, XINT (character), -1, Qnil); 3931 face_id = FACE_FOR_CHAR (f, fface, XFIXNUM (character), -1, Qnil);
3932 fface = FACE_FROM_ID_OR_NULL (f, face_id); 3932 fface = FACE_FROM_ID_OR_NULL (f, face_id);
3933 } 3933 }
3934 return ((fface && fface->font) 3934 return ((fface && fface->font)
@@ -4685,7 +4685,7 @@ smaller_face (struct frame *f, int face_id, int steps)
4685 4685
4686 face = FACE_FROM_ID (f, face_id); 4686 face = FACE_FROM_ID (f, face_id);
4687 memcpy (attrs, face->lface, sizeof attrs); 4687 memcpy (attrs, face->lface, sizeof attrs);
4688 pt = last_pt = XFASTINT (attrs[LFACE_HEIGHT_INDEX]); 4688 pt = last_pt = XFIXNAT (attrs[LFACE_HEIGHT_INDEX]);
4689 new_face_id = face_id; 4689 new_face_id = face_id;
4690 last_height = FONT_HEIGHT (face->font); 4690 last_height = FONT_HEIGHT (face->font);
4691 4691
@@ -5679,9 +5679,9 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
5679 { 5679 {
5680 /* Simple box of specified line width in foreground color of the 5680 /* Simple box of specified line width in foreground color of the
5681 face. */ 5681 face. */
5682 eassert (XINT (box) != 0); 5682 eassert (XFIXNUM (box) != 0);
5683 face->box = FACE_SIMPLE_BOX; 5683 face->box = FACE_SIMPLE_BOX;
5684 face->box_line_width = XINT (box); 5684 face->box_line_width = XFIXNUM (box);
5685 face->box_color = face->foreground; 5685 face->box_color = face->foreground;
5686 face->box_color_defaulted_p = true; 5686 face->box_color_defaulted_p = true;
5687 } 5687 }
@@ -5708,8 +5708,8 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
5708 5708
5709 if (EQ (keyword, QCline_width)) 5709 if (EQ (keyword, QCline_width))
5710 { 5710 {
5711 if (FIXNUMP (value) && XINT (value) != 0) 5711 if (FIXNUMP (value) && XFIXNUM (value) != 0)
5712 face->box_line_width = XINT (value); 5712 face->box_line_width = XFIXNUM (value);
5713 } 5713 }
5714 else if (EQ (keyword, QCcolor)) 5714 else if (EQ (keyword, QCcolor))
5715 { 5715 {
@@ -5875,7 +5875,7 @@ map_tty_color (struct frame *f, struct face *face,
5875 { 5875 {
5876 /* Associations in tty-defined-color-alist are of the form 5876 /* Associations in tty-defined-color-alist are of the form
5877 (NAME INDEX R G B). We need the INDEX part. */ 5877 (NAME INDEX R G B). We need the INDEX part. */
5878 pixel = XINT (XCAR (XCDR (def))); 5878 pixel = XFIXNUM (XCAR (XCDR (def)));
5879 } 5879 }
5880 5880
5881 if (pixel == default_pixel && STRINGP (color)) 5881 if (pixel == default_pixel && STRINGP (color))
@@ -6075,7 +6075,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
6075 XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); 6075 XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
6076 end = Fnext_single_property_change (position, propname, w->contents, limit1); 6076 end = Fnext_single_property_change (position, propname, w->contents, limit1);
6077 if (FIXNUMP (end)) 6077 if (FIXNUMP (end))
6078 endpos = XINT (end); 6078 endpos = XFIXNUM (end);
6079 6079
6080 /* Look at properties from overlays. */ 6080 /* Look at properties from overlays. */
6081 USE_SAFE_ALLOCA; 6081 USE_SAFE_ALLOCA;
@@ -6204,7 +6204,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
6204 XSETFASTINT (limit1, (limit < endpos ? limit : endpos)); 6204 XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
6205 end = Fnext_single_property_change (position, propname, w->contents, limit1); 6205 end = Fnext_single_property_change (position, propname, w->contents, limit1);
6206 if (FIXNUMP (end)) 6206 if (FIXNUMP (end))
6207 endpos = XINT (end); 6207 endpos = XFIXNUM (end);
6208 6208
6209 *endptr = endpos; 6209 *endptr = endpos;
6210 6210
@@ -6277,7 +6277,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
6277 XSETFASTINT (limit, SCHARS (string)); 6277 XSETFASTINT (limit, SCHARS (string));
6278 end = Fnext_single_property_change (position, prop_name, string, limit); 6278 end = Fnext_single_property_change (position, prop_name, string, limit);
6279 if (FIXNUMP (end)) 6279 if (FIXNUMP (end))
6280 *endptr = XFASTINT (end); 6280 *endptr = XFIXNAT (end);
6281 else 6281 else
6282 *endptr = -1; 6282 *endptr = -1;
6283 6283
@@ -6477,7 +6477,7 @@ DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
6477 { 6477 {
6478 struct face *face; 6478 struct face *face;
6479 CHECK_FIXNUM (n); 6479 CHECK_FIXNUM (n);
6480 face = FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), XINT (n)); 6480 face = FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), XFIXNUM (n));
6481 if (face == NULL) 6481 if (face == NULL)
6482 error ("Not a valid face"); 6482 error ("Not a valid face");
6483 dump_realized_face (face); 6483 dump_realized_face (face);
diff --git a/src/xfns.c b/src/xfns.c
index 224e090ebcf..d9df03e7ef3 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -1233,7 +1233,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
1233 if (!NILP (shape_var)) 1233 if (!NILP (shape_var))
1234 { 1234 {
1235 CHECK_TYPE_RANGED_INTEGER (unsigned, shape_var); 1235 CHECK_TYPE_RANGED_INTEGER (unsigned, shape_var);
1236 cursor_data.cursor_num[i] = XINT (shape_var); 1236 cursor_data.cursor_num[i] = XFIXNUM (shape_var);
1237 } 1237 }
1238 else 1238 else
1239 cursor_data.cursor_num[i] = mouse_cursor_types[i].default_shape; 1239 cursor_data.cursor_num[i] = mouse_cursor_types[i].default_shape;
@@ -1532,7 +1532,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1532 return; 1532 return;
1533 1533
1534 if (TYPE_RANGED_FIXNUMP (int, value)) 1534 if (TYPE_RANGED_FIXNUMP (int, value))
1535 nlines = XINT (value); 1535 nlines = XFIXNUM (value);
1536 else 1536 else
1537 nlines = 0; 1537 nlines = 0;
1538 1538
@@ -1619,7 +1619,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
1619 1619
1620 /* Use VALUE only if an int >= 0. */ 1620 /* Use VALUE only if an int >= 0. */
1621 if (RANGED_FIXNUMP (0, value, INT_MAX)) 1621 if (RANGED_FIXNUMP (0, value, INT_MAX))
1622 nlines = XFASTINT (value); 1622 nlines = XFIXNAT (value);
1623 else 1623 else
1624 nlines = 0; 1624 nlines = 0;
1625 1625
@@ -1716,7 +1716,7 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva
1716 int border; 1716 int border;
1717 1717
1718 CHECK_TYPE_RANGED_INTEGER (int, arg); 1718 CHECK_TYPE_RANGED_INTEGER (int, arg);
1719 border = max (XINT (arg), 0); 1719 border = max (XFIXNUM (arg), 0);
1720 1720
1721 if (border != FRAME_INTERNAL_BORDER_WIDTH (f)) 1721 if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
1722 { 1722 {
@@ -3292,7 +3292,7 @@ x_icon (struct frame *f, Lisp_Object parms)
3292 block_input (); 3292 block_input ();
3293 3293
3294 if (! EQ (icon_x, Qunbound)) 3294 if (! EQ (icon_x, Qunbound))
3295 x_wm_set_icon_position (f, XINT (icon_x), XINT (icon_y)); 3295 x_wm_set_icon_position (f, XFIXNUM (icon_x), XFIXNUM (icon_y));
3296 3296
3297#if false /* x_get_arg removes the visibility parameter as a side effect, 3297#if false /* x_get_arg removes the visibility parameter as a side effect,
3298 but x_create_frame still needs it. */ 3298 but x_create_frame still needs it. */
@@ -3725,7 +3725,7 @@ This function is an internal primitive--use `make-frame' instead. */)
3725 /* Specify the parent under which to make this X window. */ 3725 /* Specify the parent under which to make this X window. */
3726 if (!NILP (parent)) 3726 if (!NILP (parent))
3727 { 3727 {
3728 f->output_data.x->parent_desc = (Window) XFASTINT (parent); 3728 f->output_data.x->parent_desc = (Window) XFIXNAT (parent);
3729 f->output_data.x->explicit_parent = true; 3729 f->output_data.x->explicit_parent = true;
3730 } 3730 }
3731 else 3731 else
@@ -5099,8 +5099,8 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
5099 edges = Fx_frame_edges (parent, Qnative_edges); 5099 edges = Fx_frame_edges (parent, Qnative_edges);
5100 if (!NILP (edges)) 5100 if (!NILP (edges))
5101 { 5101 {
5102 x_native += XINT (Fnth (make_fixnum (0), edges)); 5102 x_native += XFIXNUM (Fnth (make_fixnum (0), edges));
5103 y_native += XINT (Fnth (make_fixnum (1), edges)); 5103 y_native += XFIXNUM (Fnth (make_fixnum (1), edges));
5104 } 5104 }
5105 5105
5106 outer_left = x_native; 5106 outer_left = x_native;
@@ -5476,7 +5476,7 @@ The coordinates X and Y are interpreted in pixels relative to a position
5476 5476
5477 block_input (); 5477 block_input ();
5478 XWarpPointer (FRAME_X_DISPLAY (f), None, DefaultRootWindow (FRAME_X_DISPLAY (f)), 5478 XWarpPointer (FRAME_X_DISPLAY (f), None, DefaultRootWindow (FRAME_X_DISPLAY (f)),
5479 0, 0, 0, 0, XINT (x), XINT (y)); 5479 0, 0, 0, 0, XFIXNUM (x), XFIXNUM (y));
5480 unblock_input (); 5480 unblock_input ();
5481 5481
5482 return Qnil; 5482 return Qnil;
@@ -5776,10 +5776,10 @@ FRAME. Default is to change on the edit X window. */)
5776 { 5776 {
5777 CHECK_FIXNUM (format); 5777 CHECK_FIXNUM (format);
5778 5778
5779 if (XINT (format) != 8 && XINT (format) != 16 5779 if (XFIXNUM (format) != 8 && XFIXNUM (format) != 16
5780 && XINT (format) != 32) 5780 && XFIXNUM (format) != 32)
5781 error ("FORMAT must be one of 8, 16 or 32"); 5781 error ("FORMAT must be one of 8, 16 or 32");
5782 element_format = XINT (format); 5782 element_format = XFIXNUM (format);
5783 } 5783 }
5784 5784
5785 if (CONSP (value)) 5785 if (CONSP (value))
@@ -6484,10 +6484,10 @@ compute_tip_xy (struct frame *f,
6484 geometry = Fassq (Qgeometry, monitor); 6484 geometry = Fassq (Qgeometry, monitor);
6485 if (CONSP (geometry)) 6485 if (CONSP (geometry))
6486 { 6486 {
6487 min_x = XINT (Fnth (make_fixnum (1), geometry)); 6487 min_x = XFIXNUM (Fnth (make_fixnum (1), geometry));
6488 min_y = XINT (Fnth (make_fixnum (2), geometry)); 6488 min_y = XFIXNUM (Fnth (make_fixnum (2), geometry));
6489 max_x = min_x + XINT (Fnth (make_fixnum (3), geometry)); 6489 max_x = min_x + XFIXNUM (Fnth (make_fixnum (3), geometry));
6490 max_y = min_y + XINT (Fnth (make_fixnum (4), geometry)); 6490 max_y = min_y + XFIXNUM (Fnth (make_fixnum (4), geometry));
6491 if (min_x <= *root_x && *root_x < max_x 6491 if (min_x <= *root_x && *root_x < max_x
6492 && min_y <= *root_y && *root_y < max_y) 6492 && min_y <= *root_y && *root_y < max_y)
6493 { 6493 {
@@ -6511,33 +6511,33 @@ compute_tip_xy (struct frame *f,
6511 } 6511 }
6512 6512
6513 if (FIXNUMP (top)) 6513 if (FIXNUMP (top))
6514 *root_y = XINT (top); 6514 *root_y = XFIXNUM (top);
6515 else if (FIXNUMP (bottom)) 6515 else if (FIXNUMP (bottom))
6516 *root_y = XINT (bottom) - height; 6516 *root_y = XFIXNUM (bottom) - height;
6517 else if (*root_y + XINT (dy) <= min_y) 6517 else if (*root_y + XFIXNUM (dy) <= min_y)
6518 *root_y = min_y; /* Can happen for negative dy */ 6518 *root_y = min_y; /* Can happen for negative dy */
6519 else if (*root_y + XINT (dy) + height <= max_y) 6519 else if (*root_y + XFIXNUM (dy) + height <= max_y)
6520 /* It fits below the pointer */ 6520 /* It fits below the pointer */
6521 *root_y += XINT (dy); 6521 *root_y += XFIXNUM (dy);
6522 else if (height + XINT (dy) + min_y <= *root_y) 6522 else if (height + XFIXNUM (dy) + min_y <= *root_y)
6523 /* It fits above the pointer. */ 6523 /* It fits above the pointer. */
6524 *root_y -= height + XINT (dy); 6524 *root_y -= height + XFIXNUM (dy);
6525 else 6525 else
6526 /* Put it on the top. */ 6526 /* Put it on the top. */
6527 *root_y = min_y; 6527 *root_y = min_y;
6528 6528
6529 if (FIXNUMP (left)) 6529 if (FIXNUMP (left))
6530 *root_x = XINT (left); 6530 *root_x = XFIXNUM (left);
6531 else if (FIXNUMP (right)) 6531 else if (FIXNUMP (right))
6532 *root_x = XINT (right) - width; 6532 *root_x = XFIXNUM (right) - width;
6533 else if (*root_x + XINT (dx) <= min_x) 6533 else if (*root_x + XFIXNUM (dx) <= min_x)
6534 *root_x = 0; /* Can happen for negative dx */ 6534 *root_x = 0; /* Can happen for negative dx */
6535 else if (*root_x + XINT (dx) + width <= max_x) 6535 else if (*root_x + XFIXNUM (dx) + width <= max_x)
6536 /* It fits to the right of the pointer. */ 6536 /* It fits to the right of the pointer. */
6537 *root_x += XINT (dx); 6537 *root_x += XFIXNUM (dx);
6538 else if (width + XINT (dx) + min_x <= *root_x) 6538 else if (width + XFIXNUM (dx) + min_x <= *root_x)
6539 /* It fits to the left of the pointer. */ 6539 /* It fits to the left of the pointer. */
6540 *root_x -= width + XINT (dx); 6540 *root_x -= width + XFIXNUM (dx);
6541 else 6541 else
6542 /* Put it left justified on the screen -- it ought to fit that way. */ 6542 /* Put it left justified on the screen -- it ought to fit that way. */
6543 *root_x = min_x; 6543 *root_x = min_x;
@@ -6925,8 +6925,8 @@ Text larger than the specified size is clipped. */)
6925 && RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX) 6925 && RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
6926 && RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX)) 6926 && RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
6927 { 6927 {
6928 w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size)); 6928 w->total_cols = XFIXNAT (XCAR (Vx_max_tooltip_size));
6929 w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size)); 6929 w->total_lines = XFIXNAT (XCDR (Vx_max_tooltip_size));
6930 } 6930 }
6931 else 6931 else
6932 { 6932 {
@@ -6958,8 +6958,8 @@ Text larger than the specified size is clipped. */)
6958 size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil, 6958 size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
6959 make_fixnum (w->pixel_height), Qnil); 6959 make_fixnum (w->pixel_height), Qnil);
6960 /* Add the frame's internal border to calculated size. */ 6960 /* Add the frame's internal border to calculated size. */
6961 width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); 6961 width = XFIXNUM (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
6962 height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f); 6962 height = XFIXNUM (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
6963 6963
6964 /* Calculate position of tooltip frame. */ 6964 /* Calculate position of tooltip frame. */
6965 compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y); 6965 compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y);
diff --git a/src/xfont.c b/src/xfont.c
index 53f7070a643..73caa705890 100644
--- a/src/xfont.c
+++ b/src/xfont.c
@@ -190,7 +190,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
190 { 190 {
191 for (; CONSP (chars); chars = XCDR (chars)) 191 for (; CONSP (chars); chars = XCDR (chars))
192 { 192 {
193 int c = XINT (XCAR (chars)); 193 int c = XFIXNUM (XCAR (chars));
194 unsigned code = ENCODE_CHAR (charset, c); 194 unsigned code = ENCODE_CHAR (charset, c);
195 XChar2b char2b; 195 XChar2b char2b;
196 196
@@ -213,7 +213,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
213 213
214 for (i = ASIZE (chars) - 1; i >= 0; i--) 214 for (i = ASIZE (chars) - 1; i >= 0; i--)
215 { 215 {
216 int c = XINT (AREF (chars, i)); 216 int c = XFIXNUM (AREF (chars, i));
217 unsigned code = ENCODE_CHAR (charset, c); 217 unsigned code = ENCODE_CHAR (charset, c);
218 XChar2b char2b; 218 XChar2b char2b;
219 219
@@ -378,8 +378,8 @@ xfont_list_pattern (Display *display, const char *pattern,
378 /* Avoid auto-scaled fonts. */ 378 /* Avoid auto-scaled fonts. */
379 if (FIXNUMP (AREF (entity, FONT_DPI_INDEX)) 379 if (FIXNUMP (AREF (entity, FONT_DPI_INDEX))
380 && FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX)) 380 && FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
381 && XINT (AREF (entity, FONT_DPI_INDEX)) != 0 381 && XFIXNUM (AREF (entity, FONT_DPI_INDEX)) != 0
382 && XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0) 382 && XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0)
383 continue; 383 continue;
384 /* Avoid not-allowed scalable fonts. */ 384 /* Avoid not-allowed scalable fonts. */
385 if (NILP (Vscalable_fonts_allowed)) 385 if (NILP (Vscalable_fonts_allowed))
@@ -387,7 +387,7 @@ xfont_list_pattern (Display *display, const char *pattern,
387 int size = 0; 387 int size = 0;
388 388
389 if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX))) 389 if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX)))
390 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 390 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
391 else if (FLOATP (AREF (entity, FONT_SIZE_INDEX))) 391 else if (FLOATP (AREF (entity, FONT_SIZE_INDEX)))
392 size = XFLOAT_DATA (AREF (entity, FONT_SIZE_INDEX)); 392 size = XFLOAT_DATA (AREF (entity, FONT_SIZE_INDEX));
393 if (size == 0 && i_pass == 0) 393 if (size == 0 && i_pass == 0)
@@ -672,8 +672,8 @@ xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
672 return Qnil; 672 return Qnil;
673 } 673 }
674 674
675 if (XINT (AREF (entity, FONT_SIZE_INDEX)) != 0) 675 if (XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) != 0)
676 pixel_size = XINT (AREF (entity, FONT_SIZE_INDEX)); 676 pixel_size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
677 else if (pixel_size == 0) 677 else if (pixel_size == 0)
678 { 678 {
679 if (FRAME_FONT (f)) 679 if (FRAME_FONT (f))
@@ -812,7 +812,7 @@ xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
812 812
813 val = Ffont_get (font_object, QCavgwidth); 813 val = Ffont_get (font_object, QCavgwidth);
814 if (FIXNUMP (val)) 814 if (FIXNUMP (val))
815 font->average_width = XINT (val) / 10; 815 font->average_width = XFIXNUM (val) / 10;
816 if (font->average_width < 0) 816 if (font->average_width < 0)
817 font->average_width = - font->average_width; 817 font->average_width = - font->average_width;
818 else 818 else
diff --git a/src/xftfont.c b/src/xftfont.c
index b5749add668..85df0d857a2 100644
--- a/src/xftfont.c
+++ b/src/xftfont.c
@@ -220,7 +220,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
220 else if (EQ (key, QChintstyle)) 220 else if (EQ (key, QChintstyle))
221 { 221 {
222 if (FIXNUMP (val)) 222 if (FIXNUMP (val))
223 FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val)); 223 FcPatternAddInteger (pat, FC_HINT_STYLE, XFIXNUM (val));
224 else if (SYMBOLP (val) 224 else if (SYMBOLP (val)
225 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) 225 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
226 FcPatternAddInteger (pat, FC_HINT_STYLE, ival); 226 FcPatternAddInteger (pat, FC_HINT_STYLE, ival);
@@ -228,7 +228,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
228 else if (EQ (key, QCrgba)) 228 else if (EQ (key, QCrgba))
229 { 229 {
230 if (FIXNUMP (val)) 230 if (FIXNUMP (val))
231 FcPatternAddInteger (pat, FC_RGBA, XINT (val)); 231 FcPatternAddInteger (pat, FC_RGBA, XFIXNUM (val));
232 else if (SYMBOLP (val) 232 else if (SYMBOLP (val)
233 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) 233 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
234 FcPatternAddInteger (pat, FC_RGBA, ival); 234 FcPatternAddInteger (pat, FC_RGBA, ival);
@@ -236,7 +236,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
236 else if (EQ (key, QClcdfilter)) 236 else if (EQ (key, QClcdfilter))
237 { 237 {
238 if (FIXNUMP (val)) 238 if (FIXNUMP (val))
239 FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val)); 239 FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XFIXNUM (val));
240 else if (SYMBOLP (val) 240 else if (SYMBOLP (val)
241 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival)) 241 && FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
242 FcPatternAddInteger (pat, FC_LCD_FILTER, ival); 242 FcPatternAddInteger (pat, FC_LCD_FILTER, ival);
@@ -271,7 +271,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
271 val = XCDR (val); 271 val = XCDR (val);
272 filename = XCAR (val); 272 filename = XCAR (val);
273 idx = XCDR (val); 273 idx = XCDR (val);
274 size = XINT (AREF (entity, FONT_SIZE_INDEX)); 274 size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
275 if (size == 0) 275 if (size == 0)
276 size = pixel_size; 276 size = pixel_size;
277 pat = FcPatternCreate (); 277 pat = FcPatternCreate ();
@@ -289,16 +289,16 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
289 FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME (val))); 289 FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
290 val = AREF (entity, FONT_SPACING_INDEX); 290 val = AREF (entity, FONT_SPACING_INDEX);
291 if (! NILP (val)) 291 if (! NILP (val))
292 FcPatternAddInteger (pat, FC_SPACING, XINT (val)); 292 FcPatternAddInteger (pat, FC_SPACING, XFIXNUM (val));
293 val = AREF (entity, FONT_DPI_INDEX); 293 val = AREF (entity, FONT_DPI_INDEX);
294 if (! NILP (val)) 294 if (! NILP (val))
295 { 295 {
296 double dbl = XINT (val); 296 double dbl = XFIXNUM (val);
297 297
298 FcPatternAddDouble (pat, FC_DPI, dbl); 298 FcPatternAddDouble (pat, FC_DPI, dbl);
299 } 299 }
300 val = AREF (entity, FONT_AVGWIDTH_INDEX); 300 val = AREF (entity, FONT_AVGWIDTH_INDEX);
301 if (FIXNUMP (val) && XINT (val) == 0) 301 if (FIXNUMP (val) && XFIXNUM (val) == 0)
302 FcPatternAddBool (pat, FC_SCALABLE, FcTrue); 302 FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
303 /* This is necessary to identify the exact font (e.g. 10x20.pcf.gz 303 /* This is necessary to identify the exact font (e.g. 10x20.pcf.gz
304 over 10x20-ISO8859-1.pcf.gz). */ 304 over 10x20-ISO8859-1.pcf.gz). */
@@ -307,7 +307,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
307 xftfont_add_rendering_parameters (pat, entity); 307 xftfont_add_rendering_parameters (pat, entity);
308 308
309 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename)); 309 FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
310 FcPatternAddInteger (pat, FC_INDEX, XINT (idx)); 310 FcPatternAddInteger (pat, FC_INDEX, XFIXNUM (idx));
311 311
312 312
313 block_input (); 313 block_input ();
@@ -353,7 +353,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
353 xftfont_info->matrix.yx = 0x10000L * matrix->yx; 353 xftfont_info->matrix.yx = 0x10000L * matrix->yx;
354 } 354 }
355 if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX))) 355 if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
356 spacing = XINT (AREF (entity, FONT_SPACING_INDEX)); 356 spacing = XFIXNUM (AREF (entity, FONT_SPACING_INDEX));
357 else 357 else
358 spacing = FC_PROPORTIONAL; 358 spacing = FC_PROPORTIONAL;
359 if (! ascii_printable[0]) 359 if (! ascii_printable[0])
@@ -412,7 +412,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
412 } 412 }
413 font->height = font->ascent + font->descent; 413 font->height = font->ascent + font->descent;
414 414
415 if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0) 415 if (XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) == 0)
416 { 416 {
417 int upEM = ft_face->units_per_EM; 417 int upEM = ft_face->units_per_EM;
418 418
diff --git a/src/xmenu.c b/src/xmenu.c
index f51e46fb276..e6740af7ca6 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -1180,10 +1180,10 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
1180 { 1180 {
1181 int min_x, min_y; 1181 int min_x, min_y;
1182 1182
1183 min_x = XINT (XCAR (workarea)); 1183 min_x = XFIXNUM (XCAR (workarea));
1184 min_y = XINT (Fnth (make_fixnum (1), workarea)); 1184 min_y = XFIXNUM (Fnth (make_fixnum (1), workarea));
1185 max_x = min_x + XINT (Fnth (make_fixnum (2), workarea)); 1185 max_x = min_x + XFIXNUM (Fnth (make_fixnum (2), workarea));
1186 max_y = min_y + XINT (Fnth (make_fixnum (3), workarea)); 1186 max_y = min_y + XFIXNUM (Fnth (make_fixnum (3), workarea));
1187 } 1187 }
1188 1188
1189 if (max_x < 0 || max_y < 0) 1189 if (max_x < 0 || max_y < 0)
diff --git a/src/xml.c b/src/xml.c
index 3674e320ef6..5f3ccc85c86 100644
--- a/src/xml.c
+++ b/src/xml.c
@@ -187,8 +187,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url,
187 187
188 validate_region (&start, &end); 188 validate_region (&start, &end);
189 189
190 istart = XINT (start); 190 istart = XFIXNUM (start);
191 iend = XINT (end); 191 iend = XFIXNUM (end);
192 istart_byte = CHAR_TO_BYTE (istart); 192 istart_byte = CHAR_TO_BYTE (istart);
193 iend_byte = CHAR_TO_BYTE (iend); 193 iend_byte = CHAR_TO_BYTE (iend);
194 194
diff --git a/src/xrdb.c b/src/xrdb.c
index ce0e1cce072..4abf1ad84ed 100644
--- a/src/xrdb.c
+++ b/src/xrdb.c
@@ -474,13 +474,13 @@ x_load_resources (Display *display, const char *xrm_string,
474 474
475 /* Set double click time of list boxes in the file selection 475 /* Set double click time of list boxes in the file selection
476 dialog from `double-click-time'. */ 476 dialog from `double-click-time'. */
477 if (FIXNUMP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0) 477 if (FIXNUMP (Vdouble_click_time) && XFIXNUM (Vdouble_click_time) > 0)
478 { 478 {
479 sprintf (line, "%s*fsb*DirList.doubleClickInterval: %"pI"d", 479 sprintf (line, "%s*fsb*DirList.doubleClickInterval: %"pI"d",
480 myclass, XFASTINT (Vdouble_click_time)); 480 myclass, XFIXNAT (Vdouble_click_time));
481 XrmPutLineResource (&rdb, line); 481 XrmPutLineResource (&rdb, line);
482 sprintf (line, "%s*fsb*ItemsList.doubleClickInterval: %"pI"d", 482 sprintf (line, "%s*fsb*ItemsList.doubleClickInterval: %"pI"d",
483 myclass, XFASTINT (Vdouble_click_time)); 483 myclass, XFIXNAT (Vdouble_click_time));
484 XrmPutLineResource (&rdb, line); 484 XrmPutLineResource (&rdb, line);
485 } 485 }
486 486
diff --git a/src/xselect.c b/src/xselect.c
index d24a493294e..984d95d7483 100644
--- a/src/xselect.c
+++ b/src/xselect.c
@@ -1693,7 +1693,7 @@ static unsigned long
1693cons_to_x_long (Lisp_Object obj) 1693cons_to_x_long (Lisp_Object obj)
1694{ 1694{
1695 if (X_ULONG_MAX <= INTMAX_MAX 1695 if (X_ULONG_MAX <= INTMAX_MAX
1696 || XINT (FIXNUMP (obj) ? obj : XCAR (obj)) < 0) 1696 || XFIXNUM (FIXNUMP (obj) ? obj : XCAR (obj)) < 0)
1697 return cons_to_signed (obj, X_LONG_MIN, min (X_ULONG_MAX, INTMAX_MAX)); 1697 return cons_to_signed (obj, X_LONG_MIN, min (X_ULONG_MAX, INTMAX_MAX));
1698 else 1698 else
1699 return cons_to_unsigned (obj, X_ULONG_MAX); 1699 return cons_to_unsigned (obj, X_ULONG_MAX);
@@ -1756,7 +1756,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo,
1756 cs->format = 16; 1756 cs->format = 16;
1757 cs->size = 1; 1757 cs->size = 1;
1758 cs->data[sizeof (short)] = 0; 1758 cs->data[sizeof (short)] = 0;
1759 *short_ptr = XINT (obj); 1759 *short_ptr = XFIXNUM (obj);
1760 if (NILP (type)) type = QINTEGER; 1760 if (NILP (type)) type = QINTEGER;
1761 } 1761 }
1762 else if (FIXNUMP (obj) 1762 else if (FIXNUMP (obj)
@@ -1832,7 +1832,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo,
1832 if (format == 32) 1832 if (format == 32)
1833 x_atoms[i] = cons_to_x_long (AREF (obj, i)); 1833 x_atoms[i] = cons_to_x_long (AREF (obj, i));
1834 else 1834 else
1835 shorts[i] = XINT (AREF (obj, i)); 1835 shorts[i] = XFIXNUM (AREF (obj, i));
1836 } 1836 }
1837 } 1837 }
1838 } 1838 }
@@ -1856,10 +1856,10 @@ clean_local_selection_data (Lisp_Object obj)
1856 && FIXNUMP (XCAR (obj)) 1856 && FIXNUMP (XCAR (obj))
1857 && FIXNUMP (XCDR (obj))) 1857 && FIXNUMP (XCDR (obj)))
1858 { 1858 {
1859 if (XINT (XCAR (obj)) == 0) 1859 if (XFIXNUM (XCAR (obj)) == 0)
1860 return XCDR (obj); 1860 return XCDR (obj);
1861 if (XINT (XCAR (obj)) == -1) 1861 if (XFIXNUM (XCAR (obj)) == -1)
1862 return make_fixnum (- XINT (XCDR (obj))); 1862 return make_fixnum (- XFIXNUM (XCDR (obj)));
1863 } 1863 }
1864 if (VECTORP (obj)) 1864 if (VECTORP (obj))
1865 { 1865 {
@@ -2313,8 +2313,8 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
2313 For XDnd, v2 might be y of a window, and can be negative. 2313 For XDnd, v2 might be y of a window, and can be negative.
2314 The XDnd spec. is not explicit about negative values, 2314 The XDnd spec. is not explicit about negative values,
2315 but let's assume negative v2 is sent modulo 2**16. */ 2315 but let's assume negative v2 is sent modulo 2**16. */
2316 unsigned long v1 = XINT (XCAR (o)) & 0xffff; 2316 unsigned long v1 = XFIXNUM (XCAR (o)) & 0xffff;
2317 unsigned long v2 = XINT (XCDR (o)) & 0xffff; 2317 unsigned long v2 = XFIXNUM (XCDR (o)) & 0xffff;
2318 val = (v1 << 16) | v2; 2318 val = (v1 << 16) | v2;
2319 } 2319 }
2320 else 2320 else
@@ -2560,11 +2560,11 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
2560 if (x_check_property_data (values) == -1) 2560 if (x_check_property_data (values) == -1)
2561 error ("Bad data in VALUES, must be number, cons or string"); 2561 error ("Bad data in VALUES, must be number, cons or string");
2562 2562
2563 if (XINT (format) != 8 && XINT (format) != 16 && XINT (format) != 32) 2563 if (XFIXNUM (format) != 8 && XFIXNUM (format) != 16 && XFIXNUM (format) != 32)
2564 error ("FORMAT must be one of 8, 16 or 32"); 2564 error ("FORMAT must be one of 8, 16 or 32");
2565 2565
2566 event.xclient.type = ClientMessage; 2566 event.xclient.type = ClientMessage;
2567 event.xclient.format = XINT (format); 2567 event.xclient.format = XFIXNUM (format);
2568 2568
2569 if (FRAMEP (dest) || NILP (dest)) 2569 if (FRAMEP (dest) || NILP (dest))
2570 { 2570 {
diff --git a/src/xsettings.c b/src/xsettings.c
index 81c8f9b2919..0b67db30746 100644
--- a/src/xsettings.c
+++ b/src/xsettings.c
@@ -393,7 +393,7 @@ parse_settings (unsigned char *prop,
393 struct xsettings *settings) 393 struct xsettings *settings)
394{ 394{
395 Lisp_Object byteorder = Fbyteorder (); 395 Lisp_Object byteorder = Fbyteorder ();
396 int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst; 396 int my_bo = XFIXNAT (byteorder) == 'B' ? MSBFirst : LSBFirst;
397 int that_bo = prop[0]; 397 int that_bo = prop[0];
398 CARD32 n_settings; 398 CARD32 n_settings;
399 int bytes_parsed = 0; 399 int bytes_parsed = 0;
diff --git a/src/xterm.c b/src/xterm.c
index f83f054802e..be8e3da3721 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -918,7 +918,7 @@ x_set_frame_alpha (struct frame *f)
918 if (FLOATP (Vframe_alpha_lower_limit)) 918 if (FLOATP (Vframe_alpha_lower_limit))
919 alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit); 919 alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
920 else if (FIXNUMP (Vframe_alpha_lower_limit)) 920 else if (FIXNUMP (Vframe_alpha_lower_limit))
921 alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0; 921 alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0;
922 922
923 if (alpha < 0.0) 923 if (alpha < 0.0)
924 return; 924 return;
@@ -3109,11 +3109,11 @@ x_draw_image_relief (struct glyph_string *s)
3109 && FIXNUMP (XCAR (Vtool_bar_button_margin)) 3109 && FIXNUMP (XCAR (Vtool_bar_button_margin))
3110 && FIXNUMP (XCDR (Vtool_bar_button_margin))) 3110 && FIXNUMP (XCDR (Vtool_bar_button_margin)))
3111 { 3111 {
3112 extra_x = XINT (XCAR (Vtool_bar_button_margin)); 3112 extra_x = XFIXNUM (XCAR (Vtool_bar_button_margin));
3113 extra_y = XINT (XCDR (Vtool_bar_button_margin)); 3113 extra_y = XFIXNUM (XCDR (Vtool_bar_button_margin));
3114 } 3114 }
3115 else if (FIXNUMP (Vtool_bar_button_margin)) 3115 else if (FIXNUMP (Vtool_bar_button_margin))
3116 extra_x = extra_y = XINT (Vtool_bar_button_margin); 3116 extra_x = extra_y = XFIXNUM (Vtool_bar_button_margin);
3117 } 3117 }
3118 3118
3119 top_p = bot_p = left_p = right_p = false; 3119 top_p = bot_p = left_p = right_p = false;
@@ -3705,7 +3705,7 @@ x_draw_glyph_string (struct glyph_string *s)
3705 = buffer_local_value (Qunderline_minimum_offset, 3705 = buffer_local_value (Qunderline_minimum_offset,
3706 s->w->contents); 3706 s->w->contents);
3707 if (FIXNUMP (val)) 3707 if (FIXNUMP (val))
3708 minimum_offset = XFASTINT (val); 3708 minimum_offset = XFIXNAT (val);
3709 else 3709 else
3710 minimum_offset = 1; 3710 minimum_offset = 1;
3711 val = buffer_local_value (Qx_underline_at_descent_line, 3711 val = buffer_local_value (Qx_underline_at_descent_line,
@@ -4824,15 +4824,15 @@ x_x_to_emacs_modifiers (struct x_display_info *dpyinfo, int state)
4824 Lisp_Object tem; 4824 Lisp_Object tem;
4825 4825
4826 tem = Fget (Vx_ctrl_keysym, Qmodifier_value); 4826 tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
4827 if (FIXNUMP (tem)) mod_ctrl = XINT (tem) & INT_MAX; 4827 if (FIXNUMP (tem)) mod_ctrl = XFIXNUM (tem) & INT_MAX;
4828 tem = Fget (Vx_alt_keysym, Qmodifier_value); 4828 tem = Fget (Vx_alt_keysym, Qmodifier_value);
4829 if (FIXNUMP (tem)) mod_alt = XINT (tem) & INT_MAX; 4829 if (FIXNUMP (tem)) mod_alt = XFIXNUM (tem) & INT_MAX;
4830 tem = Fget (Vx_meta_keysym, Qmodifier_value); 4830 tem = Fget (Vx_meta_keysym, Qmodifier_value);
4831 if (FIXNUMP (tem)) mod_meta = XINT (tem) & INT_MAX; 4831 if (FIXNUMP (tem)) mod_meta = XFIXNUM (tem) & INT_MAX;
4832 tem = Fget (Vx_hyper_keysym, Qmodifier_value); 4832 tem = Fget (Vx_hyper_keysym, Qmodifier_value);
4833 if (FIXNUMP (tem)) mod_hyper = XINT (tem) & INT_MAX; 4833 if (FIXNUMP (tem)) mod_hyper = XFIXNUM (tem) & INT_MAX;
4834 tem = Fget (Vx_super_keysym, Qmodifier_value); 4834 tem = Fget (Vx_super_keysym, Qmodifier_value);
4835 if (FIXNUMP (tem)) mod_super = XINT (tem) & INT_MAX; 4835 if (FIXNUMP (tem)) mod_super = XFIXNUM (tem) & INT_MAX;
4836 4836
4837 return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0) 4837 return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0)
4838 | ((state & ControlMask) ? mod_ctrl : 0) 4838 | ((state & ControlMask) ? mod_ctrl : 0)
@@ -4854,15 +4854,15 @@ x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, EMACS_INT state)
4854 Lisp_Object tem; 4854 Lisp_Object tem;
4855 4855
4856 tem = Fget (Vx_ctrl_keysym, Qmodifier_value); 4856 tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
4857 if (FIXNUMP (tem)) mod_ctrl = XINT (tem); 4857 if (FIXNUMP (tem)) mod_ctrl = XFIXNUM (tem);
4858 tem = Fget (Vx_alt_keysym, Qmodifier_value); 4858 tem = Fget (Vx_alt_keysym, Qmodifier_value);
4859 if (FIXNUMP (tem)) mod_alt = XINT (tem); 4859 if (FIXNUMP (tem)) mod_alt = XFIXNUM (tem);
4860 tem = Fget (Vx_meta_keysym, Qmodifier_value); 4860 tem = Fget (Vx_meta_keysym, Qmodifier_value);
4861 if (FIXNUMP (tem)) mod_meta = XINT (tem); 4861 if (FIXNUMP (tem)) mod_meta = XFIXNUM (tem);
4862 tem = Fget (Vx_hyper_keysym, Qmodifier_value); 4862 tem = Fget (Vx_hyper_keysym, Qmodifier_value);
4863 if (FIXNUMP (tem)) mod_hyper = XINT (tem); 4863 if (FIXNUMP (tem)) mod_hyper = XFIXNUM (tem);
4864 tem = Fget (Vx_super_keysym, Qmodifier_value); 4864 tem = Fget (Vx_super_keysym, Qmodifier_value);
4865 if (FIXNUMP (tem)) mod_super = XINT (tem); 4865 if (FIXNUMP (tem)) mod_super = XFIXNUM (tem);
4866 4866
4867 4867
4868 return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0) 4868 return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0)
@@ -8363,10 +8363,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
8363 Qnil), 8363 Qnil),
8364 FIXNATP (c))) 8364 FIXNATP (c)))
8365 { 8365 {
8366 inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c)) 8366 inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFIXNAT (c))
8367 ? ASCII_KEYSTROKE_EVENT 8367 ? ASCII_KEYSTROKE_EVENT
8368 : MULTIBYTE_CHAR_KEYSTROKE_EVENT); 8368 : MULTIBYTE_CHAR_KEYSTROKE_EVENT);
8369 inev.ie.code = XFASTINT (c); 8369 inev.ie.code = XFIXNAT (c);
8370 goto done_keysym; 8370 goto done_keysym;
8371 } 8371 }
8372 8372
@@ -10254,8 +10254,8 @@ x_calc_absolute_position (struct frame *f)
10254 XSETFRAME (frame, f); 10254 XSETFRAME (frame, f);
10255 edges = Fx_frame_edges (frame, Qouter_edges); 10255 edges = Fx_frame_edges (frame, Qouter_edges);
10256 if (!NILP (edges)) 10256 if (!NILP (edges))
10257 width = (XINT (Fnth (make_fixnum (2), edges)) 10257 width = (XFIXNUM (Fnth (make_fixnum (2), edges))
10258 - XINT (Fnth (make_fixnum (0), edges))); 10258 - XFIXNUM (Fnth (make_fixnum (0), edges)));
10259 } 10259 }
10260 10260
10261 if (p) 10261 if (p)
@@ -10296,8 +10296,8 @@ x_calc_absolute_position (struct frame *f)
10296 if (NILP (edges)) 10296 if (NILP (edges))
10297 edges = Fx_frame_edges (frame, Qouter_edges); 10297 edges = Fx_frame_edges (frame, Qouter_edges);
10298 if (!NILP (edges)) 10298 if (!NILP (edges))
10299 height = (XINT (Fnth (make_fixnum (3), edges)) 10299 height = (XFIXNUM (Fnth (make_fixnum (3), edges))
10300 - XINT (Fnth (make_fixnum (1), edges))); 10300 - XFIXNUM (Fnth (make_fixnum (1), edges)));
10301 } 10301 }
10302 10302
10303 if (p) 10303 if (p)
diff --git a/src/xwidget.c b/src/xwidget.c
index dc1b888280f..d6b39fe4105 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -87,8 +87,8 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
87 xw->type = type; 87 xw->type = type;
88 xw->title = title; 88 xw->title = title;
89 xw->buffer = NILP (buffer) ? Fcurrent_buffer () : Fget_buffer_create (buffer); 89 xw->buffer = NILP (buffer) ? Fcurrent_buffer () : Fget_buffer_create (buffer);
90 xw->height = XFASTINT (height); 90 xw->height = XFIXNAT (height);
91 xw->width = XFASTINT (width); 91 xw->width = XFIXNAT (width);
92 xw->kill_without_query = false; 92 xw->kill_without_query = false;
93 XSETXWIDGET (val, xw); 93 XSETXWIDGET (val, xw);
94 Vxwidget_list = Fcons (val, Vxwidget_list); 94 Vxwidget_list = Fcons (val, Vxwidget_list);
@@ -767,8 +767,8 @@ DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 3, 3, 0,
767 CHECK_RANGED_INTEGER (new_width, 0, INT_MAX); 767 CHECK_RANGED_INTEGER (new_width, 0, INT_MAX);
768 CHECK_RANGED_INTEGER (new_height, 0, INT_MAX); 768 CHECK_RANGED_INTEGER (new_height, 0, INT_MAX);
769 struct xwidget *xw = XXWIDGET (xwidget); 769 struct xwidget *xw = XXWIDGET (xwidget);
770 int w = XFASTINT (new_width); 770 int w = XFIXNAT (new_width);
771 int h = XFASTINT (new_height); 771 int h = XFIXNAT (new_height);
772 772
773 xw->width = w; 773 xw->width = w;
774 xw->height = h; 774 xw->height = h;