Commit d1ec3a0a authored by Tom Tromey's avatar Tom Tromey

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.
parent 68ebff23
......@@ -2324,10 +2324,10 @@ a multibyte string even if INIT is an ASCII character. */)
CHECK_FIXNAT (length);
CHECK_CHARACTER (init);
c = XFASTINT (init);
c = XFIXNAT (init);
if (ASCII_CHAR_P (c) && NILP (multibyte))
{
nbytes = XINT (length);
nbytes = XFIXNUM (length);
val = make_uninit_string (nbytes);
if (nbytes)
{
......@@ -2339,7 +2339,7 @@ a multibyte string even if INIT is an ASCII character. */)
{
unsigned char str[MAX_MULTIBYTE_LENGTH];
ptrdiff_t len = CHAR_STRING (c, str);
EMACS_INT string_len = XINT (length);
EMACS_INT string_len = XFIXNUM (length);
unsigned char *p, *beg, *end;
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. */)
Lisp_Object val;
CHECK_FIXNAT (length);
val = make_uninit_bool_vector (XFASTINT (length));
val = make_uninit_bool_vector (XFIXNAT (length));
return bool_vector_fill (val, init);
}
......@@ -2896,7 +2896,7 @@ DEFUN ("make-list", Fmake_list, Smake_list, 2, 2, 0,
Lisp_Object val = Qnil;
CHECK_FIXNAT (length);
for (EMACS_INT size = XFASTINT (length); 0 < size; size--)
for (EMACS_INT size = XFIXNAT (length); 0 < size; size--)
{
val = Fcons (init, val);
rarely_quit (size);
......@@ -3440,7 +3440,7 @@ each initialized to INIT. */)
(Lisp_Object type, Lisp_Object slots, Lisp_Object init)
{
CHECK_FIXNAT (slots);
EMACS_INT size = XFASTINT (slots) + 1;
EMACS_INT size = XFIXNAT (slots) + 1;
struct Lisp_Vector *p = allocate_record (size);
p->contents[0] = type;
for (ptrdiff_t i = 1; i < size; i++)
......@@ -3469,8 +3469,8 @@ See also the function `vector'. */)
(Lisp_Object length, Lisp_Object init)
{
CHECK_FIXNAT (length);
struct Lisp_Vector *p = allocate_vector (XFASTINT (length));
for (ptrdiff_t i = 0; i < XFASTINT (length); i++)
struct Lisp_Vector *p = allocate_vector (XFIXNAT (length));
for (ptrdiff_t i = 0; i < XFIXNAT (length); i++)
p->contents[i] = init;
return make_lisp_ptr (p, Lisp_Vectorlike);
}
......@@ -3899,7 +3899,7 @@ make_event_array (ptrdiff_t nargs, Lisp_Object *args)
are characters that are in 0...127,
after discarding the meta bit and all the bits above it. */
if (!FIXNUMP (args[i])
|| (XINT (args[i]) & ~(-CHAR_META)) >= 0200)
|| (XFIXNUM (args[i]) & ~(-CHAR_META)) >= 0200)
return Fvector (nargs, args);
/* 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)
result = Fmake_string (make_fixnum (nargs), make_fixnum (0), Qnil);
for (i = 0; i < nargs; i++)
{
SSET (result, i, XINT (args[i]));
SSET (result, i, XFIXNUM (args[i]));
/* Move the meta bit to the right place for a string char. */
if (XINT (args[i]) & CHAR_META)
if (XFIXNUM (args[i]) & CHAR_META)
SSET (result, i, SREF (result, i) | 0x80);
}
......
......@@ -280,7 +280,7 @@ bidi_get_type (int ch, bidi_dir_t override)
if (ch < 0 || ch > MAX_CHAR)
emacs_abort ();
default_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
default_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch));
/* Every valid character code, even those that are unassigned by the
UCD, have some bidi-class property, according to
DerivedBidiClass.txt file. Therefore, if we ever get UNKNOWN_BT
......@@ -385,9 +385,9 @@ bidi_mirror_char (int c)
/* When debugging, check before assigning to V, so that the check
isn't broken by undefined behavior due to int overflow. */
eassert (CHAR_VALID_P (XINT (val)));
eassert (CHAR_VALID_P (XFIXNUM (val)));
v = XINT (val);
v = XFIXNUM (val);
/* Minimal test we must do in optimized builds, to prevent weird
crashes further down the road. */
......@@ -409,7 +409,7 @@ bidi_paired_bracket_type (int c)
if (c < 0 || c > MAX_CHAR)
emacs_abort ();
return (bidi_bracket_type_t) XINT (CHAR_TABLE_REF (bidi_brackets_table, c));
return (bidi_bracket_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_brackets_table, c));
}
/* Determine the start-of-sequence (sos) directional type given the two
......@@ -1805,7 +1805,7 @@ bidi_explicit_dir_char (int ch)
eassert (ch == BIDI_EOB);
return false;
}
ch_type = (bidi_type_t) XINT (CHAR_TABLE_REF (bidi_type_table, ch));
ch_type = (bidi_type_t) XFIXNUM (CHAR_TABLE_REF (bidi_type_table, ch));
return (ch_type == LRE || ch_type == LRO
|| ch_type == RLE || ch_type == RLO
|| ch_type == PDF);
......
......@@ -1102,8 +1102,8 @@ is first appended to NAME, to speed up finding a non-existent buffer. */)
{
char number[sizeof "-999999"];
/* Use XINT instead of XFASTINT to work around GCC bug 80776. */
int i = XINT (Frandom (make_fixnum (1000000)));
/* Use XFIXNUM instead of XFIXNAT to work around GCC bug 80776. */
int i = XFIXNUM (Frandom (make_fixnum (1000000)));
eassume (0 <= i && i < 1000000);
AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
......@@ -2236,13 +2236,13 @@ validate_region (register Lisp_Object *b, register Lisp_Object *e)
CHECK_FIXNUM_COERCE_MARKER (*b);
CHECK_FIXNUM_COERCE_MARKER (*e);
if (XINT (*b) > XINT (*e))
if (XFIXNUM (*b) > XFIXNUM (*e))
{
Lisp_Object tem;
tem = *b; *b = *e; *e = tem;
}
if (! (BEGV <= XINT (*b) && XINT (*e) <= ZV))
if (! (BEGV <= XFIXNUM (*b) && XFIXNUM (*e) <= ZV))
args_out_of_range_3 (Fcurrent_buffer (), *b, *e);
}
......@@ -3214,15 +3214,15 @@ sort_overlays (Lisp_Object *overlay_vec, ptrdiff_t noverlays, struct window *w)
}
else if (FIXNUMP (tem))
{
sortvec[j].priority = XINT (tem);
sortvec[j].priority = XFIXNUM (tem);
sortvec[j].spriority = 0;
}
else if (CONSP (tem))
{
Lisp_Object car = XCAR (tem);
Lisp_Object cdr = XCDR (tem);
sortvec[j].priority = FIXNUMP (car) ? XINT (car) : 0;
sortvec[j].spriority = FIXNUMP (cdr) ? XINT (cdr) : 0;
sortvec[j].priority = FIXNUMP (car) ? XFIXNUM (car) : 0;
sortvec[j].spriority = FIXNUMP (cdr) ? XFIXNUM (cdr) : 0;
}
j++;
}
......@@ -3290,7 +3290,7 @@ record_overlay_string (struct sortstrlist *ssl, Lisp_Object str,
ssl->buf[ssl->used].string = str;
ssl->buf[ssl->used].string2 = str2;
ssl->buf[ssl->used].size = size;
ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XINT (pri) : 0);
ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XFIXNUM (pri) : 0);
ssl->used++;
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
......@@ -3870,7 +3870,7 @@ for the rear of the overlay advance when text is inserted there
CHECK_FIXNUM_COERCE_MARKER (beg);
CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
if (XFIXNUM (beg) > XFIXNUM (end))
{
Lisp_Object temp;
temp = beg; beg = end; end = temp;
......@@ -3990,7 +3990,7 @@ buffer. */)
CHECK_FIXNUM_COERCE_MARKER (beg);
CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
if (XFIXNUM (beg) > XFIXNUM (end))
{
Lisp_Object temp;
temp = beg; beg = end; end = temp;
......@@ -4167,7 +4167,7 @@ If SORTED is non-nil, then sort them by decreasing priority. */)
/* Put all the overlays we want in a vector in overlay_vec.
Store the length in len. */
noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
NULL, NULL, 0);
if (!NILP (sorted))
......@@ -4211,7 +4211,7 @@ end of the buffer. */)
/* Put all the overlays we want in a vector in overlay_vec.
Store the length in len. */
noverlays = overlays_in (XINT (beg), XINT (end), 1, &overlay_vec, &len,
noverlays = overlays_in (XFIXNUM (beg), XFIXNUM (end), 1, &overlay_vec, &len,
NULL, NULL);
/* Make a list of them all. */
......@@ -4243,7 +4243,7 @@ the value is (point-max). */)
/* Put all the overlays we want in a vector in overlay_vec.
Store the length in len.
endpos gets the position where the next overlay starts. */
noverlays = overlays_at (XINT (pos), 1, &overlay_vec, &len,
noverlays = overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
&endpos, 0, 1);
/* If any of these overlays ends before endpos,
......@@ -4281,7 +4281,7 @@ the value is (point-min). */)
/* At beginning of buffer, we know the answer;
avoid bug subtracting 1 below. */
if (XINT (pos) == BEGV)
if (XFIXNUM (pos) == BEGV)
return pos;
len = 10;
......@@ -4290,7 +4290,7 @@ the value is (point-min). */)
/* Put all the overlays we want in a vector in overlay_vec.
Store the length in len.
prevpos gets the position of the previous change. */
overlays_at (XINT (pos), 1, &overlay_vec, &len,
overlays_at (XFIXNUM (pos), 1, &overlay_vec, &len,
0, &prevpos, 1);
xfree (overlay_vec);
......@@ -4334,7 +4334,7 @@ for positions far away from POS). */)
ptrdiff_t p;
CHECK_FIXNUM_COERCE_MARKER (pos);
p = clip_to_bounds (PTRDIFF_MIN, XINT (pos), PTRDIFF_MAX);
p = clip_to_bounds (PTRDIFF_MIN, XFIXNUM (pos), PTRDIFF_MAX);
recenter_overlay_lists (current_buffer, p);
return Qnil;
}
......@@ -4442,7 +4442,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
Lisp_Object prop, overlay;
struct Lisp_Overlay *tail;
/* True if this change is an insertion. */
bool insertion = (after ? XFASTINT (arg3) == 0 : EQ (start, end));
bool insertion = (after ? XFIXNAT (arg3) == 0 : EQ (start, end));
overlay = Qnil;
tail = NULL;
......@@ -4470,18 +4470,18 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
ostart = OVERLAY_START (overlay);
oend = OVERLAY_END (overlay);
endpos = OVERLAY_POSITION (oend);
if (XFASTINT (start) > endpos)
if (XFIXNAT (start) > endpos)
break;
startpos = OVERLAY_POSITION (ostart);
if (insertion && (XFASTINT (start) == startpos
|| XFASTINT (end) == startpos))
if (insertion && (XFIXNAT (start) == startpos
|| XFIXNAT (end) == startpos))
{
prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
if (!NILP (prop))
add_overlay_mod_hooklist (prop, overlay);
}
if (insertion && (XFASTINT (start) == endpos
|| XFASTINT (end) == endpos))
if (insertion && (XFIXNAT (start) == endpos
|| XFIXNAT (end) == endpos))
{
prop = Foverlay_get (overlay, Qinsert_behind_hooks);
if (!NILP (prop))
......@@ -4489,7 +4489,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
}
/* Test for intersecting intervals. This does the right thing
for both insertion and deletion. */
if (XFASTINT (end) > startpos && XFASTINT (start) < endpos)
if (XFIXNAT (end) > startpos && XFIXNAT (start) < endpos)
{
prop = Foverlay_get (overlay, Qmodification_hooks);
if (!NILP (prop))
......@@ -4508,17 +4508,17 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
oend = OVERLAY_END (overlay);
startpos = OVERLAY_POSITION (ostart);
endpos = OVERLAY_POSITION (oend);
if (XFASTINT (end) < startpos)
if (XFIXNAT (end) < startpos)
break;
if (insertion && (XFASTINT (start) == startpos
|| XFASTINT (end) == startpos))
if (insertion && (XFIXNAT (start) == startpos
|| XFIXNAT (end) == startpos))
{
prop = Foverlay_get (overlay, Qinsert_in_front_hooks);
if (!NILP (prop))
add_overlay_mod_hooklist (prop, overlay);
}
if (insertion && (XFASTINT (start) == endpos
|| XFASTINT (end) == endpos))
if (insertion && (XFIXNAT (start) == endpos
|| XFIXNAT (end) == endpos))
{
prop = Foverlay_get (overlay, Qinsert_behind_hooks);
if (!NILP (prop))
......@@ -4526,7 +4526,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
}
/* Test for intersecting intervals. This does the right thing
for both insertion and deletion. */
if (XFASTINT (end) > startpos && XFASTINT (start) < endpos)
if (XFIXNAT (end) > startpos && XFIXNAT (start) < endpos)
{
prop = Foverlay_get (overlay, Qmodification_hooks);
if (!NILP (prop))
......
......@@ -1349,7 +1349,7 @@ extern int last_per_buffer_idx;
#define PER_BUFFER_IDX(OFFSET) \
XINT (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags))
XFIXNUM (*(Lisp_Object *)((OFFSET) + (char *) &buffer_local_flags))
/* Functions to get and set default value of the per-buffer
variable at offset OFFSET in the buffer structure. */
......@@ -1387,7 +1387,7 @@ downcase (int c)
{
Lisp_Object downcase_table = BVAR (current_buffer, downcase_table);
Lisp_Object down = CHAR_TABLE_REF (downcase_table, c);
return FIXNATP (down) ? XFASTINT (down) : c;
return FIXNATP (down) ? XFIXNAT (down) : c;
}
/* Upcase a character C, or make no change if that cannot be done. */
......@@ -1396,7 +1396,7 @@ upcase (int c)
{
Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
Lisp_Object up = CHAR_TABLE_REF (upcase_table, c);
return FIXNATP (up) ? XFASTINT (up) : c;
return FIXNATP (up) ? XFIXNAT (up) : c;
}
/* True if C is upper case. */
......
......@@ -63,14 +63,14 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
{ \
if (byte_metering_on) \
{ \
if (XFASTINT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \
if (XFIXNAT (METER_1 (this_code)) < MOST_POSITIVE_FIXNUM) \
XSETFASTINT (METER_1 (this_code), \
XFASTINT (METER_1 (this_code)) + 1); \
XFIXNAT (METER_1 (this_code)) + 1); \
if (last_code \
&& (XFASTINT (METER_2 (last_code, this_code)) \
&& (XFIXNAT (METER_2 (last_code, this_code)) \
< MOST_POSITIVE_FIXNUM)) \
XSETFASTINT (METER_2 (last_code, this_code), \
XFASTINT (METER_2 (last_code, this_code)) + 1); \
XFIXNAT (METER_2 (last_code, this_code)) + 1); \
} \
}
......@@ -362,7 +362,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
Lisp_Object *vectorp = XVECTOR (vector)->contents;
unsigned char quitcounter = 1;
EMACS_INT stack_items = XFASTINT (maxdepth) + 1;
EMACS_INT stack_items = XFIXNAT (maxdepth) + 1;
USE_SAFE_ALLOCA;
void *alloc;
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,
if (!NILP (args_template))
{
eassert (FIXNUMP (args_template));
ptrdiff_t at = XINT (args_template);
ptrdiff_t at = XFIXNUM (args_template);
bool rest = (at & 128) != 0;
int mandatory = at & 127;
ptrdiff_t nonrest = at >> 8;
......@@ -622,9 +622,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
Lisp_Object v1 = TOP;
Lisp_Object v2 = Fget (v1, Qbyte_code_meter);
if (FIXNUMP (v2)
&& XINT (v2) < MOST_POSITIVE_FIXNUM)
&& XFIXNUM (v2) < MOST_POSITIVE_FIXNUM)
{
XSETINT (v2, XINT (v2) + 1);
XSETINT (v2, XFIXNUM (v2) + 1);
Fput (v1, Qbyte_code_meter, v2);
}
}
......@@ -833,7 +833,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
Lisp_Object v2 = POP, v1 = TOP;
CHECK_FIXNUM (v1);
for (EMACS_INT n = XINT (v1); 0 < n && CONSP (v2); n--)
for (EMACS_INT n = XFIXNUM (v1); 0 < n && CONSP (v2); n--)
{
v2 = XCDR (v2);
rarely_quit (n);
......@@ -972,14 +972,14 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bsub1):
TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_NEGATIVE_FIXNUM
? make_fixnum (XINT (TOP) - 1)
TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_NEGATIVE_FIXNUM
? make_fixnum (XFIXNUM (TOP) - 1)
: Fsub1 (TOP));
NEXT;
CASE (Badd1):
TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_POSITIVE_FIXNUM
? make_fixnum (XINT (TOP) + 1)
TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_POSITIVE_FIXNUM
? make_fixnum (XFIXNUM (TOP) + 1)
: Fadd1 (TOP));
NEXT;
......@@ -1031,8 +1031,8 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
NEXT;
CASE (Bnegate):
TOP = (FIXNUMP (TOP) && XINT (TOP) != MOST_NEGATIVE_FIXNUM
? make_fixnum (- XINT (TOP))
TOP = (FIXNUMP (TOP) && XFIXNUM (TOP) != MOST_NEGATIVE_FIXNUM
? make_fixnum (- XFIXNUM (TOP))
: Fminus (1, &TOP));
NEXT;
......@@ -1175,7 +1175,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
CASE (Bchar_syntax):
{
CHECK_CHARACTER (TOP);
int c = XFASTINT (TOP);
int c = XFIXNAT (TOP);
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
MAKE_CHAR_MULTIBYTE (c);
XSETFASTINT (TOP, syntax_code_spec[SYNTAX (c)]);
......@@ -1269,7 +1269,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
/* Exchange args and then do nth. */
Lisp_Object v2 = POP, v1 = TOP;
CHECK_FIXNUM (v2);
for (EMACS_INT n = XINT (v2); 0 < n && CONSP (v1); n--)
for (EMACS_INT n = XFIXNUM (v2); 0 < n && CONSP (v1); n--)
{
v1 = XCDR (v1);
rarely_quit (n);
......@@ -1439,7 +1439,7 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
Lisp_Object val = HASH_VALUE (h, i);
if (BYTE_CODE_SAFE && !FIXNUMP (val))
emacs_abort ();
op = XINT (val);
op = XFIXNUM (val);
goto op_branch;
}
}
......@@ -1475,7 +1475,7 @@ Lisp_Object
get_byte_code_arity (Lisp_Object args_template)
{
eassert (FIXNATP (args_template));
EMACS_INT at = XINT (args_template);
EMACS_INT at = XFIXNUM (args_template);
bool rest = (at & 128) != 0;
int mandatory = at & 127;
EMACS_INT nonrest = at >> 8;
......
......@@ -542,7 +542,7 @@ invoke it. If KEYS is omitted or nil, the return value of
/* If the key sequence ends with a down-event,
discard the following up-event. */
Lisp_Object teml
= Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1));
= Faref (args[i], make_fixnum (XFIXNUM (Flength (args[i])) - 1));
if (CONSP (teml))
teml = XCAR (teml);
if (SYMBOLP (teml))
......@@ -572,7 +572,7 @@ invoke it. If KEYS is omitted or nil, the return value of
/* If the key sequence ends with a down-event,
discard the following up-event. */
Lisp_Object teml
= Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1));
= Faref (args[i], make_fixnum (XFIXNUM (Flength (args[i])) - 1));
if (CONSP (teml))
teml = XCAR (teml);
if (SYMBOLP (teml))
......@@ -796,7 +796,7 @@ Its numeric meaning is what you would get from `(interactive "p")'. */)
else if (EQ (raw, Qminus))
XSETINT (val, -1);
else if (CONSP (raw) && FIXNUMP (XCAR (raw)))
XSETINT (val, XINT (XCAR (raw)));
XSETINT (val, XFIXNUM (XCAR (raw)));
else if (FIXNUMP (raw))
val = raw;
else
......
......@@ -1066,7 +1066,7 @@ usage: (call-process-region START END PROGRAM &optional DELETE BUFFER DISPLAY &r
validate_region (&args[0], &args[1]);
start = args[0];
end = args[1];
empty_input = XINT (start) == XINT (end);
empty_input = XFIXNUM (start) == XFIXNUM (end);
}
if (!empty_input)
......
......@@ -152,7 +152,7 @@ case_character_impl (struct casing_str_buf *buf,
prop = CHAR_TABLE_REF (ctx->titlecase_char_table, ch);
if (CHARACTERP (prop))
{
cased = XFASTINT (prop);
cased = XFIXNAT (prop);
cased_is_set = true;
}
}
......@@ -225,7 +225,7 @@ do_casify_natnum (struct casing_context *ctx, Lisp_Object obj)
{
int flagbits = (CHAR_ALT | CHAR_SUPER | CHAR_HYPER
| CHAR_SHIFT | CHAR_CTL | CHAR_META);
int ch = XFASTINT (obj);
int ch = XFIXNAT (obj);
/* If the character has higher bits set above the flags, return it unchanged.
It is not a real character. */
......@@ -485,8 +485,8 @@ casify_region (enum case_action flag, Lisp_Object b, Lisp_Object e)
struct casing_context ctx;
validate_region (&b, &e);
ptrdiff_t start = XFASTINT (b);
ptrdiff_t end = XFASTINT (e);
ptrdiff_t start = XFIXNAT (b);
ptrdiff_t end = XFIXNAT (e);
if (start == end)
/* Not modifying because nothing marked. */
return end;
......@@ -602,9 +602,9 @@ static Lisp_Object
casify_word (enum case_action flag, Lisp_Object arg)
{
CHECK_FIXNUM (arg);
ptrdiff_t farend = scan_words (PT, XINT (arg));
ptrdiff_t farend = scan_words (PT, XFIXNUM (arg));
if (!farend)
farend = XINT (arg) <= 0 ? BEGV : ZV;
farend = XFIXNUM (arg) <= 0 ? BEGV : ZV;
SET_PT (casify_region (flag, make_fixnum (PT), make_fixnum (farend)));
return Qnil;
}
......
......@@ -196,11 +196,11 @@ set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
if (CONSP (c))
{
from = XINT (XCAR (c));
to = XINT (XCDR (c));
from = XFIXNUM (XCAR (c));
to = XFIXNUM (XCDR (c));
}
else
from = to = XINT (c);
from = to = XFIXNUM (c);
to++;
for (; from < to; from++)
......@@ -222,11 +222,11 @@ shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
if (CONSP (c))
{
from = XINT (XCAR (c));
to = XINT (XCDR (c));
from = XFIXNUM (XCAR (c));
to = XFIXNUM (XCDR (c));
}
else
from = to = XINT (c);
from = to = XFIXNUM (c);
to++;
for (; from < to; from++)
......
......@@ -130,11 +130,11 @@ the current buffer's category table. */)
CHECK_STRING (docstring);
table = check_category_table (table);
if (!NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
error ("Category `%c' is already defined", (int) XFASTINT (category));
if (!NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
error ("Category `%c' is already defined", (int) XFIXNAT (category));
if (!NILP (Vpurify_flag))
docstring = Fpurecopy (docstring);
SET_CATEGORY_DOCSTRING (table, XFASTINT (category), docstring);
SET_CATEGORY_DOCSTRING (table, XFIXNAT (category), docstring);
return Qnil;
}
......@@ -148,7 +148,7 @@ category table. */)
CHECK_CATEGORY (category);
table = check_category_table (table);
return CATEGORY_DOCSTRING (table, XFASTINT (category));
return CATEGORY_DOCSTRING (table, XFIXNAT (category));
}
DEFUN ("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)
{
val = Fcopy_sequence (val);
if (CONSP (c))
char_table_set_range (table, XINT (XCAR (c)), XINT (XCDR (c)), val);
char_table_set_range (table, XFIXNUM (XCAR (c)), XFIXNUM (XCDR (c)), val);
else
char_table_set (table, XINT (c), val);
char_table_set (table, XFIXNUM (c), val);
}
/* Return a copy of category table TABLE. We can't simply use the
......@@ -303,7 +303,7 @@ usage: (char-category-set CHAR) */)
(Lisp_Object ch)
{
CHECK_CHARACTER (ch);
return CATEGORY_SET (XFASTINT (ch));
return CATEGORY_SET (XFIXNAT (ch));
}
DEFUN ("category-set-mnemonics", Fcategory_set_mnemonics,
......@@ -349,22 +349,22 @@ then delete CATEGORY from the category set instead of adding it. */)
if (FIXNUMP (character))
{
CHECK_CHARACTER (character);
start = end = XFASTINT (character);
start = end = XFIXNAT (character);
}
else
{
CHECK_CONS (character);
CHECK_CHARACTER_CAR (character);
CHECK_CHARACTER_CDR (character);
start = XFASTINT (XCAR (character));
end = XFASTINT (XCDR (character));
start = XFIXNAT (XCAR (character));
end = XFIXNAT (XCDR (character));
}
CHECK_CATEGORY (category);
table = check_category_table (table);
if (NILP (CATEGORY_DOCSTRING (table, XFASTINT (category))))
error ("Undefined category: %c", (int) XFASTINT (category));
if (NILP (CATEGORY_DOCSTRING (table, XFIXNAT (category))))
error ("Undefined category: %c", (int) XFIXNAT (category));
set_value = NILP (reset);
......@@ -372,10 +372,10 @@ then delete CATEGORY from the category set instead of adding it. */)
{
from = start, to = end;
category_set = char_table_ref_and_range (table, start, &from, &to);
if (CATEGORY_MEMBER (XFASTINT (category), category_set) != NILP (reset))
if (CATEGORY_MEMBER (XFIXNAT (category), category_set) != NILP (reset))
{
category_set = Fcopy_sequence (category_set);
set_category_set (category_set, XFASTINT (category), set_value);
set_category_set (category_set, XFIXNAT (category), set_value);
category_set = hash_get_category_set (table, category_set);
char_table_set_range (table, start, to, category_set);
}
......@@ -423,12 +423,12 @@ word_boundary_p (int c1, int c2)
if (CONSP (elt)
&& (NILP (XCAR (elt))
|| (CATEGORYP (XCAR (elt))
&& CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set1)
&& ! CATEGORY_MEMBER (XFASTINT (XCAR (elt)), category_set2)))
&& CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set1)
&& ! CATEGORY_MEMBER (XFIXNAT (XCAR (elt)), category_set2)))
&& (NILP (XCDR (elt))
|| (CATEGORYP (XCDR (elt))
&& ! CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set1)
&& CATEGORY_MEMBER (XFASTINT (XCDR (elt)), category_set2))))
&& ! CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set1)
&& CATEGORY_MEMBER (XFIXNAT (XCDR (elt)), category_set2))))
return !default_result;
}
return default_result;
......
This diff is collapsed.
......@@ -206,7 +206,7 @@ translate_char (Lisp_Object table, int c)
ch = CHAR_TABLE_REF (table, c);
if (CHARACTERP (ch))
c = XINT (ch);
c = XFIXNUM (ch);
}
else
{
......@@ -244,7 +244,7 @@ DEFUN ("unibyte-char-to-multibyte", Funibyte_char_to_multibyte,
int c;
CHECK_CHARACTER (ch);
c = XFASTINT (ch);
c = XFIXNAT (ch);
if (c >= 0x100)
error ("Not a unibyte character: %d", c);
MAKE_CHAR_MULTIBYTE (c);
......@@ -260,7 +260,7 @@ If the multibyte character does not represent a byte, return -1. */)
int cm;
CHECK_CHARACTER (ch);
cm = XFASTINT (ch);
cm = XFIXNAT (ch);
if (cm < 256)
/* Can't distinguish a byte read from a unibyte buffer from
a latin1 char, so let's let it slide. */
......@@ -291,7 +291,7 @@ char_width (int c, struct Lisp_Char_Table *dp)
ch <