mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 11:27:34 +00:00
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.
This commit is contained in:
parent
68ebff23f7
commit
d1ec3a0a8e
98 changed files with 1972 additions and 1972 deletions
22
src/alloc.c
22
src/alloc.c
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
10
src/bidi.c
10
src/bidi.c
|
|
@ -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);
|
||||
|
|
|
|||
58
src/buffer.c
58
src/buffer.c
|
|
@ -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;
|
||||
|
|
|
|||
118
src/ccl.c
118
src/ccl.c
|
|
@ -629,7 +629,7 @@ do \
|
|||
stack_idx++; \
|
||||
ccl_prog = called_ccl.prog; \
|
||||
ic = CCL_HEADER_MAIN; \
|
||||
eof_ic = XFASTINT (ccl_prog[CCL_HEADER_EOF]); \
|
||||
eof_ic = XFIXNAT (ccl_prog[CCL_HEADER_EOF]); \
|
||||
goto ccl_repeat; \
|
||||
} \
|
||||
while (0)
|
||||
|
|
@ -736,7 +736,7 @@ while (0)
|
|||
#define GET_CCL_RANGE(var, ccl_prog, ic, lo, hi) \
|
||||
do \
|
||||
{ \
|
||||
EMACS_INT prog_word = XINT ((ccl_prog)[ic]); \
|
||||
EMACS_INT prog_word = XFIXNUM ((ccl_prog)[ic]); \
|
||||
if (! ASCENDING_ORDER (lo, prog_word, hi)) \
|
||||
CCL_INVALID_CMD; \
|
||||
(var) = prog_word; \
|
||||
|
|
@ -769,12 +769,12 @@ while (0)
|
|||
CCL_INVALID_CMD; \
|
||||
else if (dst + len <= dst_end) \
|
||||
{ \
|
||||
if (XFASTINT (ccl_prog[ic]) & 0x1000000) \
|
||||
if (XFIXNAT (ccl_prog[ic]) & 0x1000000) \
|
||||
for (ccli = 0; ccli < len; ccli++) \
|
||||
*dst++ = XFASTINT (ccl_prog[ic + ccli]) & 0xFFFFFF; \
|
||||
*dst++ = XFIXNAT (ccl_prog[ic + ccli]) & 0xFFFFFF; \
|
||||
else \
|
||||
for (ccli = 0; ccli < len; ccli++) \
|
||||
*dst++ = ((XFASTINT (ccl_prog[ic + (ccli / 3)])) \
|
||||
*dst++ = ((XFIXNAT (ccl_prog[ic + (ccli / 3)])) \
|
||||
>> ((2 - (ccli % 3)) * 8)) & 0xFF; \
|
||||
} \
|
||||
else \
|
||||
|
|
@ -926,14 +926,14 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
break;
|
||||
|
||||
case CCL_SetConst: /* 00000000000000000000rrrXXXXX */
|
||||
reg[rrr] = XINT (ccl_prog[ic++]);
|
||||
reg[rrr] = XFIXNUM (ccl_prog[ic++]);
|
||||
break;
|
||||
|
||||
case CCL_SetArray: /* CCCCCCCCCCCCCCCCCCCCRRRrrrXXXXX */
|
||||
i = reg[RRR];
|
||||
j = field1 >> 3;
|
||||
if (0 <= i && i < j)
|
||||
reg[rrr] = XINT (ccl_prog[ic + i]);
|
||||
reg[rrr] = XFIXNUM (ccl_prog[ic + i]);
|
||||
ic += j;
|
||||
break;
|
||||
|
||||
|
|
@ -961,13 +961,13 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
break;
|
||||
|
||||
case CCL_WriteConstJump: /* A--D--D--R--E--S--S-000XXXXX */
|
||||
i = XINT (ccl_prog[ic]);
|
||||
i = XFIXNUM (ccl_prog[ic]);
|
||||
CCL_WRITE_CHAR (i);
|
||||
ic += ADDR;
|
||||
break;
|
||||
|
||||
case CCL_WriteConstReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
|
||||
i = XINT (ccl_prog[ic]);
|
||||
i = XFIXNUM (ccl_prog[ic]);
|
||||
CCL_WRITE_CHAR (i);
|
||||
ic++;
|
||||
CCL_READ_CHAR (reg[rrr]);
|
||||
|
|
@ -975,17 +975,17 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
break;
|
||||
|
||||
case CCL_WriteStringJump: /* A--D--D--R--E--S--S-000XXXXX */
|
||||
j = XINT (ccl_prog[ic++]);
|
||||
j = XFIXNUM (ccl_prog[ic++]);
|
||||
CCL_WRITE_STRING (j);
|
||||
ic += ADDR - 1;
|
||||
break;
|
||||
|
||||
case CCL_WriteArrayReadJump: /* A--D--D--R--E--S--S-rrrXXXXX */
|
||||
i = reg[rrr];
|
||||
j = XINT (ccl_prog[ic]);
|
||||
j = XFIXNUM (ccl_prog[ic]);
|
||||
if (0 <= i && i < j)
|
||||
{
|
||||
i = XINT (ccl_prog[ic + 1 + i]);
|
||||
i = XFIXNUM (ccl_prog[ic + 1 + i]);
|
||||
CCL_WRITE_CHAR (i);
|
||||
}
|
||||
ic += j + 2;
|
||||
|
|
@ -1004,7 +1004,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
case CCL_Branch: /* CCCCCCCCCCCCCCCCCCCCrrrXXXXX */
|
||||
{
|
||||
int ioff = 0 <= reg[rrr] && reg[rrr] < field1 ? reg[rrr] : field1;
|
||||
int incr = XINT (ccl_prog[ic + ioff]);
|
||||
int incr = XFIXNUM (ccl_prog[ic + ioff]);
|
||||
ic += incr;
|
||||
}
|
||||
break;
|
||||
|
|
@ -1023,7 +1023,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
case CCL_WriteExprConst: /* 1:00000OPERATION000RRR000XXXXX */
|
||||
rrr = 7;
|
||||
i = reg[RRR];
|
||||
j = XINT (ccl_prog[ic]);
|
||||
j = XFIXNUM (ccl_prog[ic]);
|
||||
op = field1 >> 6;
|
||||
jump_address = ic + 1;
|
||||
goto ccl_set_expr;
|
||||
|
|
@ -1056,7 +1056,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
/* If FFF is nonzero, the CCL program ID is in the
|
||||
following code. */
|
||||
if (rrr)
|
||||
prog_id = XINT (ccl_prog[ic++]);
|
||||
prog_id = XFIXNUM (ccl_prog[ic++]);
|
||||
else
|
||||
prog_id = field1;
|
||||
|
||||
|
|
@ -1081,7 +1081,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
stack_idx++;
|
||||
ccl_prog = XVECTOR (AREF (slot, 1))->contents;
|
||||
ic = CCL_HEADER_MAIN;
|
||||
eof_ic = XFASTINT (ccl_prog[CCL_HEADER_EOF]);
|
||||
eof_ic = XFIXNAT (ccl_prog[CCL_HEADER_EOF]);
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -1099,7 +1099,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
i = reg[rrr];
|
||||
if (0 <= i && i < field1)
|
||||
{
|
||||
j = XINT (ccl_prog[ic + i]);
|
||||
j = XFIXNUM (ccl_prog[ic + i]);
|
||||
CCL_WRITE_CHAR (j);
|
||||
}
|
||||
ic += field1;
|
||||
|
|
@ -1124,7 +1124,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
CCL_SUCCESS;
|
||||
|
||||
case CCL_ExprSelfConst: /* 00000OPERATION000000rrrXXXXX */
|
||||
i = XINT (ccl_prog[ic++]);
|
||||
i = XFIXNUM (ccl_prog[ic++]);
|
||||
op = field1 >> 6;
|
||||
goto ccl_expr_self;
|
||||
|
||||
|
|
@ -1160,7 +1160,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
|
||||
case CCL_SetExprConst: /* 00000OPERATION000RRRrrrXXXXX */
|
||||
i = reg[RRR];
|
||||
j = XINT (ccl_prog[ic++]);
|
||||
j = XFIXNUM (ccl_prog[ic++]);
|
||||
op = field1 >> 6;
|
||||
jump_address = ic;
|
||||
goto ccl_set_expr;
|
||||
|
|
@ -1178,8 +1178,8 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
case CCL_JumpCondExprConst: /* A--D--D--R--E--S--S-rrrXXXXX */
|
||||
i = reg[rrr];
|
||||
jump_address = ic + ADDR;
|
||||
op = XINT (ccl_prog[ic++]);
|
||||
j = XINT (ccl_prog[ic++]);
|
||||
op = XFIXNUM (ccl_prog[ic++]);
|
||||
j = XFIXNUM (ccl_prog[ic++]);
|
||||
rrr = 7;
|
||||
goto ccl_set_expr;
|
||||
|
||||
|
|
@ -1189,7 +1189,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
case CCL_JumpCondExprReg:
|
||||
i = reg[rrr];
|
||||
jump_address = ic + ADDR;
|
||||
op = XINT (ccl_prog[ic++]);
|
||||
op = XFIXNUM (ccl_prog[ic++]);
|
||||
GET_CCL_RANGE (j, ccl_prog, ic++, 0, 7);
|
||||
j = reg[j];
|
||||
rrr = 7;
|
||||
|
|
@ -1323,9 +1323,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
{
|
||||
Lisp_Object opl;
|
||||
opl = HASH_VALUE (h, eop);
|
||||
if (! (FIXNUMP (opl) && IN_INT_RANGE (XINT (opl))))
|
||||
if (! (FIXNUMP (opl) && IN_INT_RANGE (XFIXNUM (opl))))
|
||||
CCL_INVALID_CMD;
|
||||
reg[RRR] = XINT (opl);
|
||||
reg[RRR] = XFIXNUM (opl);
|
||||
reg[7] = 1; /* r7 true for success */
|
||||
}
|
||||
else
|
||||
|
|
@ -1340,7 +1340,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
ptrdiff_t size;
|
||||
int fin_ic;
|
||||
|
||||
j = XINT (ccl_prog[ic++]); /* number of maps. */
|
||||
j = XFIXNUM (ccl_prog[ic++]); /* number of maps. */
|
||||
fin_ic = ic + j;
|
||||
op = reg[rrr];
|
||||
if ((j > reg[RRR]) && (j >= 0))
|
||||
|
|
@ -1359,7 +1359,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
{
|
||||
if (!VECTORP (Vcode_conversion_map_vector)) continue;
|
||||
size = ASIZE (Vcode_conversion_map_vector);
|
||||
point = XINT (ccl_prog[ic++]);
|
||||
point = XFIXNUM (ccl_prog[ic++]);
|
||||
if (! (0 <= point && point < size)) continue;
|
||||
map = AREF (Vcode_conversion_map_vector, point);
|
||||
|
||||
|
|
@ -1377,7 +1377,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
[t ELEMENT STARTPOINT ENDPOINT] */
|
||||
if (FIXNUMP (content))
|
||||
{
|
||||
point = XINT (content);
|
||||
point = XFIXNUM (content);
|
||||
if (!(point <= op && op - point + 1 < size)) continue;
|
||||
content = AREF (map, op - point + 1);
|
||||
}
|
||||
|
|
@ -1385,9 +1385,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
{
|
||||
if (size != 4) continue;
|
||||
if (FIXNUMP (AREF (map, 2))
|
||||
&& XINT (AREF (map, 2)) <= op
|
||||
&& XFIXNUM (AREF (map, 2)) <= op
|
||||
&& FIXNUMP (AREF (map, 3))
|
||||
&& op < XINT (AREF (map, 3)))
|
||||
&& op < XFIXNUM (AREF (map, 3)))
|
||||
content = AREF (map, 1);
|
||||
else
|
||||
continue;
|
||||
|
|
@ -1397,10 +1397,10 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
|
||||
if (NILP (content))
|
||||
continue;
|
||||
else if (FIXNUMP (content) && IN_INT_RANGE (XINT (content)))
|
||||
else if (FIXNUMP (content) && IN_INT_RANGE (XFIXNUM (content)))
|
||||
{
|
||||
reg[RRR] = i;
|
||||
reg[rrr] = XINT (content);
|
||||
reg[rrr] = XFIXNUM (content);
|
||||
break;
|
||||
}
|
||||
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
|
|||
attrib = XCAR (content);
|
||||
value = XCDR (content);
|
||||
if (! (FIXNUMP (attrib) && FIXNUMP (value)
|
||||
&& IN_INT_RANGE (XINT (value))))
|
||||
&& IN_INT_RANGE (XFIXNUM (value))))
|
||||
continue;
|
||||
reg[RRR] = i;
|
||||
reg[rrr] = XINT (value);
|
||||
reg[rrr] = XFIXNUM (value);
|
||||
break;
|
||||
}
|
||||
else if (SYMBOLP (content))
|
||||
|
|
@ -1453,7 +1453,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
stack_idx_of_map_multiple = 0;
|
||||
|
||||
/* Get number of maps and separators. */
|
||||
map_set_rest_length = XINT (ccl_prog[ic++]);
|
||||
map_set_rest_length = XFIXNUM (ccl_prog[ic++]);
|
||||
|
||||
fin_ic = ic + map_set_rest_length;
|
||||
op = reg[rrr];
|
||||
|
|
@ -1524,7 +1524,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
do {
|
||||
for (;map_set_rest_length > 0;i++, ic++, map_set_rest_length--)
|
||||
{
|
||||
point = XINT (ccl_prog[ic]);
|
||||
point = XFIXNUM (ccl_prog[ic]);
|
||||
if (point < 0)
|
||||
{
|
||||
/* +1 is for including separator. */
|
||||
|
|
@ -1556,7 +1556,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
[t ELEMENT STARTPOINT ENDPOINT] */
|
||||
if (FIXNUMP (content))
|
||||
{
|
||||
point = XINT (content);
|
||||
point = XFIXNUM (content);
|
||||
if (!(point <= op && op - point + 1 < size)) continue;
|
||||
content = AREF (map, op - point + 1);
|
||||
}
|
||||
|
|
@ -1564,9 +1564,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
{
|
||||
if (size != 4) continue;
|
||||
if (FIXNUMP (AREF (map, 2))
|
||||
&& XINT (AREF (map, 2)) <= op
|
||||
&& XFIXNUM (AREF (map, 2)) <= op
|
||||
&& FIXNUMP (AREF (map, 3))
|
||||
&& op < XINT (AREF (map, 3)))
|
||||
&& op < XFIXNUM (AREF (map, 3)))
|
||||
content = AREF (map, 1);
|
||||
else
|
||||
continue;
|
||||
|
|
@ -1578,9 +1578,9 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
continue;
|
||||
|
||||
reg[RRR] = i;
|
||||
if (FIXNUMP (content) && IN_INT_RANGE (XINT (content)))
|
||||
if (FIXNUMP (content) && IN_INT_RANGE (XFIXNUM (content)))
|
||||
{
|
||||
op = XINT (content);
|
||||
op = XFIXNUM (content);
|
||||
i += map_set_rest_length - 1;
|
||||
ic += map_set_rest_length - 1;
|
||||
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
|
|||
attrib = XCAR (content);
|
||||
value = XCDR (content);
|
||||
if (! (FIXNUMP (attrib) && FIXNUMP (value)
|
||||
&& IN_INT_RANGE (XINT (value))))
|
||||
&& IN_INT_RANGE (XFIXNUM (value))))
|
||||
continue;
|
||||
op = XINT (value);
|
||||
op = XFIXNUM (value);
|
||||
i += map_set_rest_length - 1;
|
||||
ic += map_set_rest_length - 1;
|
||||
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
|
|||
{
|
||||
Lisp_Object map, attrib, value, content;
|
||||
int point;
|
||||
j = XINT (ccl_prog[ic++]); /* map_id */
|
||||
j = XFIXNUM (ccl_prog[ic++]); /* map_id */
|
||||
op = reg[rrr];
|
||||
if (! (VECTORP (Vcode_conversion_map_vector)
|
||||
&& j < ASIZE (Vcode_conversion_map_vector)))
|
||||
|
|
@ -1657,19 +1657,19 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
if (! (VECTORP (map)
|
||||
&& 0 < ASIZE (map)
|
||||
&& FIXNUMP (AREF (map, 0))
|
||||
&& XINT (AREF (map, 0)) <= op
|
||||
&& op - XINT (AREF (map, 0)) + 1 < ASIZE (map)))
|
||||
&& XFIXNUM (AREF (map, 0)) <= op
|
||||
&& op - XFIXNUM (AREF (map, 0)) + 1 < ASIZE (map)))
|
||||
{
|
||||
reg[RRR] = -1;
|
||||
break;
|
||||
}
|
||||
point = op - XINT (AREF (map, 0)) + 1;
|
||||
point = op - XFIXNUM (AREF (map, 0)) + 1;
|
||||
reg[RRR] = 0;
|
||||
content = AREF (map, point);
|
||||
if (NILP (content))
|
||||
reg[RRR] = -1;
|
||||
else if (TYPE_RANGED_FIXNUMP (int, content))
|
||||
reg[rrr] = XINT (content);
|
||||
reg[rrr] = XFIXNUM (content);
|
||||
else if (EQ (content, Qt));
|
||||
else if (CONSP (content))
|
||||
{
|
||||
|
|
@ -1678,7 +1678,7 @@ ccl_driver (struct ccl_program *ccl, int *source, int *destination, int src_size
|
|||
if (!FIXNUMP (attrib)
|
||||
|| !TYPE_RANGED_FIXNUMP (int, value))
|
||||
continue;
|
||||
reg[rrr] = XINT (value);
|
||||
reg[rrr] = XFIXNUM (value);
|
||||
break;
|
||||
}
|
||||
else if (SYMBOLP (content))
|
||||
|
|
@ -1852,8 +1852,8 @@ resolve_symbol_ccl_program (Lisp_Object ccl)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
if (! (0 <= XINT (AREF (result, CCL_HEADER_BUF_MAG))
|
||||
&& ASCENDING_ORDER (0, XINT (AREF (result, CCL_HEADER_EOF)),
|
||||
if (! (0 <= XFIXNUM (AREF (result, CCL_HEADER_BUF_MAG))
|
||||
&& ASCENDING_ORDER (0, XFIXNUM (AREF (result, CCL_HEADER_EOF)),
|
||||
ASIZE (ccl))))
|
||||
return Qnil;
|
||||
|
||||
|
|
@ -1882,14 +1882,14 @@ ccl_get_compiled_code (Lisp_Object ccl_prog, ptrdiff_t *idx)
|
|||
|
||||
val = Fget (ccl_prog, Qccl_program_idx);
|
||||
if (! FIXNATP (val)
|
||||
|| XINT (val) >= ASIZE (Vccl_program_table))
|
||||
|| XFIXNUM (val) >= ASIZE (Vccl_program_table))
|
||||
return Qnil;
|
||||
slot = AREF (Vccl_program_table, XINT (val));
|
||||
slot = AREF (Vccl_program_table, XFIXNUM (val));
|
||||
if (! VECTORP (slot)
|
||||
|| ASIZE (slot) != 4
|
||||
|| ! VECTORP (AREF (slot, 1)))
|
||||
return Qnil;
|
||||
*idx = XINT (val);
|
||||
*idx = XFIXNUM (val);
|
||||
if (NILP (AREF (slot, 2)))
|
||||
{
|
||||
val = resolve_symbol_ccl_program (AREF (slot, 1));
|
||||
|
|
@ -1920,8 +1920,8 @@ setup_ccl_program (struct ccl_program *ccl, Lisp_Object ccl_prog)
|
|||
vp = XVECTOR (ccl_prog);
|
||||
ccl->size = vp->header.size;
|
||||
ccl->prog = vp->contents;
|
||||
ccl->eof_ic = XINT (vp->contents[CCL_HEADER_EOF]);
|
||||
ccl->buf_magnification = XINT (vp->contents[CCL_HEADER_BUF_MAG]);
|
||||
ccl->eof_ic = XFIXNUM (vp->contents[CCL_HEADER_EOF]);
|
||||
ccl->buf_magnification = XFIXNUM (vp->contents[CCL_HEADER_BUF_MAG]);
|
||||
if (ccl->idx >= 0)
|
||||
{
|
||||
Lisp_Object slot;
|
||||
|
|
@ -1957,7 +1957,7 @@ See the documentation of `define-ccl-program' for the detail of CCL program. */
|
|||
|
||||
val = Fget (object, Qccl_program_idx);
|
||||
return ((! FIXNATP (val)
|
||||
|| XINT (val) >= ASIZE (Vccl_program_table))
|
||||
|| XFIXNUM (val) >= ASIZE (Vccl_program_table))
|
||||
? Qnil : Qt);
|
||||
}
|
||||
|
||||
|
|
@ -1991,7 +1991,7 @@ programs. */)
|
|||
|
||||
for (i = 0; i < 8; i++)
|
||||
ccl.reg[i] = (TYPE_RANGED_FIXNUMP (int, AREF (reg, i))
|
||||
? XINT (AREF (reg, i))
|
||||
? XFIXNUM (AREF (reg, i))
|
||||
: 0);
|
||||
|
||||
ccl_driver (&ccl, NULL, NULL, 0, 0, Qnil);
|
||||
|
|
@ -2060,11 +2060,11 @@ usage: (ccl-execute-on-string CCL-PROGRAM STATUS STRING &optional CONTINUE UNIBY
|
|||
if (NILP (AREF (status, i)))
|
||||
ASET (status, i, make_fixnum (0));
|
||||
if (TYPE_RANGED_FIXNUMP (int, AREF (status, i)))
|
||||
ccl.reg[i] = XINT (AREF (status, i));
|
||||
ccl.reg[i] = XFIXNUM (AREF (status, i));
|
||||
}
|
||||
if (FIXNUMP (AREF (status, i)))
|
||||
{
|
||||
i = XFASTINT (AREF (status, 8));
|
||||
i = XFIXNAT (AREF (status, 8));
|
||||
if (ccl.ic < i && i < ccl.size)
|
||||
ccl.ic = i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 = AREF (disp, i);
|
||||
if (CHARACTERP (ch))
|
||||
{
|
||||
int w = CHARACTER_WIDTH (XFASTINT (ch));
|
||||
int w = CHARACTER_WIDTH (XFIXNAT (ch));
|
||||
if (INT_ADD_WRAPV (width, w, &width))
|
||||
string_overflow ();
|
||||
}
|
||||
|
|
@ -312,7 +312,7 @@ usage: (char-width CHAR) */)
|
|||
ptrdiff_t width;
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XINT (ch);
|
||||
c = XFIXNUM (ch);
|
||||
width = char_width (c, buffer_display_table ());
|
||||
return make_fixnum (width);
|
||||
}
|
||||
|
|
@ -855,7 +855,7 @@ usage: (string &rest CHARACTERS) */)
|
|||
for (i = 0; i < n; i++)
|
||||
{
|
||||
CHECK_CHARACTER (args[i]);
|
||||
c = XINT (args[i]);
|
||||
c = XFIXNUM (args[i]);
|
||||
p += CHAR_STRING (c, p);
|
||||
}
|
||||
|
||||
|
|
@ -878,7 +878,7 @@ usage: (unibyte-string &rest BYTES) */)
|
|||
for (i = 0; i < n; i++)
|
||||
{
|
||||
CHECK_RANGED_INTEGER (args[i], 0, 255);
|
||||
*p++ = XINT (args[i]);
|
||||
*p++ = XFIXNUM (args[i]);
|
||||
}
|
||||
|
||||
str = make_string_from_bytes ((char *) buf, n, p - buf);
|
||||
|
|
@ -897,7 +897,7 @@ usage: (char-resolve-modifiers CHAR) */)
|
|||
EMACS_INT c;
|
||||
|
||||
CHECK_FIXNUM (character);
|
||||
c = XINT (character);
|
||||
c = XFIXNUM (character);
|
||||
return make_fixnum (char_resolve_modifier_mask (c));
|
||||
}
|
||||
|
||||
|
|
@ -926,9 +926,9 @@ character is not ASCII nor 8-bit character, an error is signaled. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (position);
|
||||
if (XINT (position) < BEGV || XINT (position) >= ZV)
|
||||
if (XFIXNUM (position) < BEGV || XFIXNUM (position) >= ZV)
|
||||
args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
|
||||
pos = XFASTINT (position);
|
||||
pos = XFIXNAT (position);
|
||||
p = CHAR_POS_ADDR (pos);
|
||||
}
|
||||
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
|
|
@ -944,9 +944,9 @@ character is not ASCII nor 8-bit character, an error is signaled. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (position);
|
||||
if (XINT (position) >= SCHARS (string))
|
||||
if (XFIXNUM (position) >= SCHARS (string))
|
||||
args_out_of_range (string, position);
|
||||
pos = XFASTINT (position);
|
||||
pos = XFIXNAT (position);
|
||||
p = SDATA (string) + string_char_to_byte (string, pos);
|
||||
}
|
||||
if (! STRING_MULTIBYTE (string))
|
||||
|
|
@ -967,7 +967,7 @@ alphabeticp (int c)
|
|||
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
|
||||
if (! FIXNUMP (category))
|
||||
return false;
|
||||
EMACS_INT gen_cat = XINT (category);
|
||||
EMACS_INT gen_cat = XFIXNUM (category);
|
||||
|
||||
/* See UTS #18. There are additional characters that should be
|
||||
here, those designated as Other_uppercase, Other_lowercase,
|
||||
|
|
@ -990,7 +990,7 @@ alphanumericp (int c)
|
|||
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
|
||||
if (! FIXNUMP (category))
|
||||
return false;
|
||||
EMACS_INT gen_cat = XINT (category);
|
||||
EMACS_INT gen_cat = XFIXNUM (category);
|
||||
|
||||
/* See UTS #18. Same comment as for alphabeticp applies. FIXME. */
|
||||
return (gen_cat == UNICODE_CATEGORY_Lu
|
||||
|
|
@ -1012,7 +1012,7 @@ graphicp (int c)
|
|||
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
|
||||
if (! FIXNUMP (category))
|
||||
return false;
|
||||
EMACS_INT gen_cat = XINT (category);
|
||||
EMACS_INT gen_cat = XFIXNUM (category);
|
||||
|
||||
/* See UTS #18. */
|
||||
return (!(gen_cat == UNICODE_CATEGORY_Zs /* space separator */
|
||||
|
|
@ -1030,7 +1030,7 @@ printablep (int c)
|
|||
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
|
||||
if (! FIXNUMP (category))
|
||||
return false;
|
||||
EMACS_INT gen_cat = XINT (category);
|
||||
EMACS_INT gen_cat = XFIXNUM (category);
|
||||
|
||||
/* See UTS #18. */
|
||||
return (!(gen_cat == UNICODE_CATEGORY_Cc /* control */
|
||||
|
|
@ -1047,7 +1047,7 @@ blankp (int c)
|
|||
if (! FIXNUMP (category))
|
||||
return false;
|
||||
|
||||
return XINT (category) == UNICODE_CATEGORY_Zs; /* separator, space */
|
||||
return XFIXNUM (category) == UNICODE_CATEGORY_Zs; /* separator, space */
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ enum
|
|||
#define MAX_MULTIBYTE_LENGTH 5
|
||||
|
||||
/* Nonzero iff X is a character. */
|
||||
#define CHARACTERP(x) (FIXNATP (x) && XFASTINT (x) <= MAX_CHAR)
|
||||
#define CHARACTERP(x) (FIXNATP (x) && XFIXNAT (x) <= MAX_CHAR)
|
||||
|
||||
/* Nonzero iff C is valid as a character code. */
|
||||
#define CHAR_VALID_P(c) UNSIGNED_CMP (c, <=, MAX_CHAR)
|
||||
|
|
@ -559,7 +559,7 @@ enum
|
|||
/* Return a non-outlandish value for the tab width. */
|
||||
|
||||
#define SANE_TAB_WIDTH(buf) \
|
||||
sanitize_tab_width (XFASTINT (BVAR (buf, tab_width)))
|
||||
sanitize_tab_width (XFIXNAT (BVAR (buf, tab_width)))
|
||||
INLINE int
|
||||
sanitize_tab_width (EMACS_INT width)
|
||||
{
|
||||
|
|
@ -595,7 +595,7 @@ sanitize_char_width (EMACS_INT width)
|
|||
#define CHARACTER_WIDTH(c) \
|
||||
(ASCII_CHAR_P (c) \
|
||||
? ASCII_CHAR_WIDTH (c) \
|
||||
: sanitize_char_width (XINT (CHAR_TABLE_REF (Vchar_width_table, c))))
|
||||
: sanitize_char_width (XFIXNUM (CHAR_TABLE_REF (Vchar_width_table, c))))
|
||||
|
||||
/* If C is a variation selector, return the index of the
|
||||
variation selector (1..256). Otherwise, return 0. */
|
||||
|
|
@ -700,7 +700,7 @@ char_table_translate (Lisp_Object obj, int ch)
|
|||
eassert (CHAR_VALID_P (ch));
|
||||
eassert (CHAR_TABLE_P (obj));
|
||||
obj = CHAR_TABLE_REF (obj, ch);
|
||||
return CHARACTERP (obj) ? XINT (obj) : ch;
|
||||
return CHARACTERP (obj) ? XFIXNUM (obj) : ch;
|
||||
}
|
||||
|
||||
#if defined __GNUC__ && !defined __STRICT_ANSI__
|
||||
|
|
|
|||
158
src/charset.c
158
src/charset.c
|
|
@ -587,14 +587,14 @@ load_charset_map_from_vector (struct charset *charset, Lisp_Object vec, int cont
|
|||
{
|
||||
val2 = XCDR (val);
|
||||
val = XCAR (val);
|
||||
from = XFASTINT (val);
|
||||
to = XFASTINT (val2);
|
||||
from = XFIXNAT (val);
|
||||
to = XFIXNAT (val2);
|
||||
}
|
||||
else
|
||||
from = to = XFASTINT (val);
|
||||
from = to = XFIXNAT (val);
|
||||
val = AREF (vec, i + 1);
|
||||
CHECK_FIXNAT (val);
|
||||
c = XFASTINT (val);
|
||||
c = XFIXNAT (val);
|
||||
|
||||
if (from < min_code || to > max_code || from > to || c > MAX_CHAR)
|
||||
continue;
|
||||
|
|
@ -757,14 +757,14 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun
|
|||
int offset;
|
||||
|
||||
subset_info = CHARSET_SUBSET (charset);
|
||||
charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0)));
|
||||
offset = XINT (AREF (subset_info, 3));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
|
||||
offset = XFIXNUM (AREF (subset_info, 3));
|
||||
from -= offset;
|
||||
if (from < XFASTINT (AREF (subset_info, 1)))
|
||||
from = XFASTINT (AREF (subset_info, 1));
|
||||
if (from < XFIXNAT (AREF (subset_info, 1)))
|
||||
from = XFIXNAT (AREF (subset_info, 1));
|
||||
to -= offset;
|
||||
if (to > XFASTINT (AREF (subset_info, 2)))
|
||||
to = XFASTINT (AREF (subset_info, 2));
|
||||
if (to > XFIXNAT (AREF (subset_info, 2)))
|
||||
to = XFIXNAT (AREF (subset_info, 2));
|
||||
map_charset_chars (c_function, function, arg, charset, from, to);
|
||||
}
|
||||
else /* i.e. CHARSET_METHOD_SUPERSET */
|
||||
|
|
@ -777,8 +777,8 @@ map_charset_chars (void (*c_function)(Lisp_Object, Lisp_Object), Lisp_Object fun
|
|||
int offset;
|
||||
unsigned this_from, this_to;
|
||||
|
||||
charset = CHARSET_FROM_ID (XFASTINT (XCAR (XCAR (parents))));
|
||||
offset = XINT (XCDR (XCAR (parents)));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (XCAR (XCAR (parents))));
|
||||
offset = XFIXNUM (XCDR (XCAR (parents)));
|
||||
this_from = from > offset ? from - offset : 0;
|
||||
this_to = to > offset ? to - offset : 0;
|
||||
if (this_from < CHARSET_MIN_CODE (charset))
|
||||
|
|
@ -811,7 +811,7 @@ range of code points (in CHARSET) of target characters. */)
|
|||
from = CHARSET_MIN_CODE (cs);
|
||||
else
|
||||
{
|
||||
from = XINT (from_code);
|
||||
from = XFIXNUM (from_code);
|
||||
if (from < CHARSET_MIN_CODE (cs))
|
||||
from = CHARSET_MIN_CODE (cs);
|
||||
}
|
||||
|
|
@ -819,7 +819,7 @@ range of code points (in CHARSET) of target characters. */)
|
|||
to = CHARSET_MAX_CODE (cs);
|
||||
else
|
||||
{
|
||||
to = XINT (to_code);
|
||||
to = XFIXNUM (to_code);
|
||||
if (to > CHARSET_MAX_CODE (cs))
|
||||
to = CHARSET_MAX_CODE (cs);
|
||||
}
|
||||
|
|
@ -870,9 +870,9 @@ usage: (define-charset-internal ...) */)
|
|||
min_byte_obj = Faref (val, make_fixnum (i * 2));
|
||||
max_byte_obj = Faref (val, make_fixnum (i * 2 + 1));
|
||||
CHECK_RANGED_INTEGER (min_byte_obj, 0, 255);
|
||||
min_byte = XINT (min_byte_obj);
|
||||
min_byte = XFIXNUM (min_byte_obj);
|
||||
CHECK_RANGED_INTEGER (max_byte_obj, min_byte, 255);
|
||||
max_byte = XINT (max_byte_obj);
|
||||
max_byte = XFIXNUM (max_byte_obj);
|
||||
charset.code_space[i * 4] = min_byte;
|
||||
charset.code_space[i * 4 + 1] = max_byte;
|
||||
charset.code_space[i * 4 + 2] = max_byte - min_byte + 1;
|
||||
|
|
@ -890,7 +890,7 @@ usage: (define-charset-internal ...) */)
|
|||
else
|
||||
{
|
||||
CHECK_RANGED_INTEGER (val, 1, 4);
|
||||
charset.dimension = XINT (val);
|
||||
charset.dimension = XFIXNUM (val);
|
||||
}
|
||||
|
||||
charset.code_linear_p
|
||||
|
|
@ -971,9 +971,9 @@ usage: (define-charset-internal ...) */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (val);
|
||||
if (XINT (val) < '0' || XINT (val) > 127)
|
||||
error ("Invalid iso-final-char: %"pI"d", XINT (val));
|
||||
charset.iso_final = XINT (val);
|
||||
if (XFIXNUM (val) < '0' || XFIXNUM (val) > 127)
|
||||
error ("Invalid iso-final-char: %"pI"d", XFIXNUM (val));
|
||||
charset.iso_final = XFIXNUM (val);
|
||||
}
|
||||
|
||||
val = args[charset_arg_iso_revision];
|
||||
|
|
@ -982,7 +982,7 @@ usage: (define-charset-internal ...) */)
|
|||
else
|
||||
{
|
||||
CHECK_RANGED_INTEGER (val, -1, 63);
|
||||
charset.iso_revision = XINT (val);
|
||||
charset.iso_revision = XFIXNUM (val);
|
||||
}
|
||||
|
||||
val = args[charset_arg_emacs_mule_id];
|
||||
|
|
@ -991,9 +991,9 @@ usage: (define-charset-internal ...) */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (val);
|
||||
if ((XINT (val) > 0 && XINT (val) <= 128) || XINT (val) >= 256)
|
||||
error ("Invalid emacs-mule-id: %"pI"d", XINT (val));
|
||||
charset.emacs_mule_id = XINT (val);
|
||||
if ((XFIXNUM (val) > 0 && XFIXNUM (val) <= 128) || XFIXNUM (val) >= 256)
|
||||
error ("Invalid emacs-mule-id: %"pI"d", XFIXNUM (val));
|
||||
charset.emacs_mule_id = XFIXNUM (val);
|
||||
}
|
||||
|
||||
charset.ascii_compatible_p = ! NILP (args[charset_arg_ascii_compatible_p]);
|
||||
|
|
@ -1010,7 +1010,7 @@ usage: (define-charset-internal ...) */)
|
|||
CHECK_CHARACTER (val);
|
||||
|
||||
charset.method = CHARSET_METHOD_OFFSET;
|
||||
charset.code_offset = XINT (val);
|
||||
charset.code_offset = XFIXNUM (val);
|
||||
|
||||
i = CODE_POINT_TO_INDEX (&charset, charset.max_code);
|
||||
if (MAX_CHAR - charset.code_offset < i)
|
||||
|
|
@ -1089,7 +1089,7 @@ usage: (define-charset-internal ...) */)
|
|||
cdr_part = XCDR (elt);
|
||||
CHECK_CHARSET_GET_ID (car_part, this_id);
|
||||
CHECK_TYPE_RANGED_INTEGER (int, cdr_part);
|
||||
offset = XINT (cdr_part);
|
||||
offset = XFIXNUM (cdr_part);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1123,7 +1123,7 @@ usage: (define-charset-internal ...) */)
|
|||
if (charset.hash_index >= 0)
|
||||
{
|
||||
new_definition_p = 0;
|
||||
id = XFASTINT (CHARSET_SYMBOL_ID (args[charset_arg_name]));
|
||||
id = XFIXNAT (CHARSET_SYMBOL_ID (args[charset_arg_name]));
|
||||
set_hash_value_slot (hash_table, charset.hash_index, attrs);
|
||||
}
|
||||
else
|
||||
|
|
@ -1209,7 +1209,7 @@ usage: (define-charset-internal ...) */)
|
|||
|
||||
for (tail = Vcharset_ordered_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
struct charset *cs = CHARSET_FROM_ID (XINT (XCAR (tail)));
|
||||
struct charset *cs = CHARSET_FROM_ID (XFIXNUM (XCAR (tail)));
|
||||
|
||||
if (cs->supplementary_p)
|
||||
break;
|
||||
|
|
@ -1293,7 +1293,7 @@ define_charset_internal (Lisp_Object name,
|
|||
args[charset_arg_code_offset]);
|
||||
Fdefine_charset_internal (charset_arg_max, args);
|
||||
|
||||
return XINT (CHARSET_SYMBOL_ID (name));
|
||||
return XFIXNUM (CHARSET_SYMBOL_ID (name));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1400,15 +1400,15 @@ check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars,
|
|||
CHECK_FIXNUM (chars);
|
||||
CHECK_CHARACTER (final_char);
|
||||
|
||||
if (! (1 <= XINT (dimension) && XINT (dimension) <= 3))
|
||||
if (! (1 <= XFIXNUM (dimension) && XFIXNUM (dimension) <= 3))
|
||||
error ("Invalid DIMENSION %"pI"d, it should be 1, 2, or 3",
|
||||
XINT (dimension));
|
||||
XFIXNUM (dimension));
|
||||
|
||||
bool chars_flag = XINT (chars) == 96;
|
||||
if (! (chars_flag || XINT (chars) == 94))
|
||||
error ("Invalid CHARS %"pI"d, it should be 94 or 96", XINT (chars));
|
||||
bool chars_flag = XFIXNUM (chars) == 96;
|
||||
if (! (chars_flag || XFIXNUM (chars) == 94))
|
||||
error ("Invalid CHARS %"pI"d, it should be 94 or 96", XFIXNUM (chars));
|
||||
|
||||
int final_ch = XFASTINT (final_char);
|
||||
int final_ch = XFIXNAT (final_char);
|
||||
if (! ('0' <= final_ch && final_ch <= '~'))
|
||||
error ("Invalid FINAL-CHAR `%c', it should be `0'..`~'", final_ch);
|
||||
|
||||
|
|
@ -1430,7 +1430,7 @@ return nil. */)
|
|||
bool chars_flag = check_iso_charset_parameter (dimension, chars,
|
||||
make_fixnum ('0'));
|
||||
for (int final_char = '0'; final_char <= '?'; final_char++)
|
||||
if (ISO_CHARSET_TABLE (XINT (dimension), chars_flag, final_char) < 0)
|
||||
if (ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag, final_char) < 0)
|
||||
return make_fixnum (final_char);
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -1449,7 +1449,7 @@ if CHARSET is designated instead. */)
|
|||
|
||||
CHECK_CHARSET_GET_ID (charset, id);
|
||||
bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
|
||||
ISO_CHARSET_TABLE (XINT (dimension), chars_flag, XFASTINT (final_char)) = id;
|
||||
ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag, XFIXNAT (final_char)) = id;
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -1550,8 +1550,8 @@ only `ascii', `eight-bit-control', and `eight-bit-graphic'. */)
|
|||
bool multibyte = ! NILP (BVAR (current_buffer, enable_multibyte_characters));
|
||||
|
||||
validate_region (&beg, &end);
|
||||
from = XFASTINT (beg);
|
||||
stop = to = XFASTINT (end);
|
||||
from = XFIXNAT (beg);
|
||||
stop = to = XFIXNAT (end);
|
||||
|
||||
if (from < GPT && GPT < to)
|
||||
{
|
||||
|
|
@ -1622,7 +1622,7 @@ maybe_unify_char (int c, Lisp_Object val)
|
|||
struct charset *charset;
|
||||
|
||||
if (FIXNUMP (val))
|
||||
return XFASTINT (val);
|
||||
return XFIXNAT (val);
|
||||
if (NILP (val))
|
||||
return c;
|
||||
|
||||
|
|
@ -1638,7 +1638,7 @@ maybe_unify_char (int c, Lisp_Object val)
|
|||
{
|
||||
val = CHAR_TABLE_REF (Vchar_unify_table, c);
|
||||
if (! NILP (val))
|
||||
c = XFASTINT (val);
|
||||
c = XFIXNAT (val);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1672,10 +1672,10 @@ decode_char (struct charset *charset, unsigned int code)
|
|||
Lisp_Object subset_info;
|
||||
|
||||
subset_info = CHARSET_SUBSET (charset);
|
||||
charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0)));
|
||||
code -= XINT (AREF (subset_info, 3));
|
||||
if (code < XFASTINT (AREF (subset_info, 1))
|
||||
|| code > XFASTINT (AREF (subset_info, 2)))
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
|
||||
code -= XFIXNUM (AREF (subset_info, 3));
|
||||
if (code < XFIXNAT (AREF (subset_info, 1))
|
||||
|| code > XFIXNAT (AREF (subset_info, 2)))
|
||||
c = -1;
|
||||
else
|
||||
c = DECODE_CHAR (charset, code);
|
||||
|
|
@ -1688,8 +1688,8 @@ decode_char (struct charset *charset, unsigned int code)
|
|||
c = -1;
|
||||
for (; CONSP (parents); parents = XCDR (parents))
|
||||
{
|
||||
int id = XINT (XCAR (XCAR (parents)));
|
||||
int code_offset = XINT (XCDR (XCAR (parents)));
|
||||
int id = XFIXNUM (XCAR (XCAR (parents)));
|
||||
int code_offset = XFIXNUM (XCDR (XCAR (parents)));
|
||||
unsigned this_code = code - code_offset;
|
||||
|
||||
charset = CHARSET_FROM_ID (id);
|
||||
|
|
@ -1714,7 +1714,7 @@ decode_char (struct charset *charset, unsigned int code)
|
|||
decoder = CHARSET_DECODER (charset);
|
||||
}
|
||||
if (VECTORP (decoder))
|
||||
c = XINT (AREF (decoder, char_index));
|
||||
c = XFIXNUM (AREF (decoder, char_index));
|
||||
else
|
||||
c = GET_TEMP_CHARSET_WORK_DECODER (char_index);
|
||||
}
|
||||
|
|
@ -1763,7 +1763,7 @@ encode_char (struct charset *charset, int c)
|
|||
Lisp_Object deunified = CHAR_TABLE_REF (deunifier, c);
|
||||
|
||||
if (FIXNUMP (deunified))
|
||||
code_index = XINT (deunified);
|
||||
code_index = XFIXNUM (deunified);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1779,13 +1779,13 @@ encode_char (struct charset *charset, int c)
|
|||
struct charset *this_charset;
|
||||
|
||||
subset_info = CHARSET_SUBSET (charset);
|
||||
this_charset = CHARSET_FROM_ID (XFASTINT (AREF (subset_info, 0)));
|
||||
this_charset = CHARSET_FROM_ID (XFIXNAT (AREF (subset_info, 0)));
|
||||
code = ENCODE_CHAR (this_charset, c);
|
||||
if (code == CHARSET_INVALID_CODE (this_charset)
|
||||
|| code < XFASTINT (AREF (subset_info, 1))
|
||||
|| code > XFASTINT (AREF (subset_info, 2)))
|
||||
|| code < XFIXNAT (AREF (subset_info, 1))
|
||||
|| code > XFIXNAT (AREF (subset_info, 2)))
|
||||
return CHARSET_INVALID_CODE (charset);
|
||||
code += XINT (AREF (subset_info, 3));
|
||||
code += XFIXNUM (AREF (subset_info, 3));
|
||||
return code;
|
||||
}
|
||||
|
||||
|
|
@ -1796,8 +1796,8 @@ encode_char (struct charset *charset, int c)
|
|||
parents = CHARSET_SUPERSET (charset);
|
||||
for (; CONSP (parents); parents = XCDR (parents))
|
||||
{
|
||||
int id = XINT (XCAR (XCAR (parents)));
|
||||
int code_offset = XINT (XCDR (XCAR (parents)));
|
||||
int id = XFIXNUM (XCAR (XCAR (parents)));
|
||||
int code_offset = XFIXNUM (XCDR (XCAR (parents)));
|
||||
struct charset *this_charset = CHARSET_FROM_ID (id);
|
||||
|
||||
code = ENCODE_CHAR (this_charset, c);
|
||||
|
|
@ -1827,7 +1827,7 @@ encode_char (struct charset *charset, int c)
|
|||
val = CHAR_TABLE_REF (encoder, c);
|
||||
if (NILP (val))
|
||||
return CHARSET_INVALID_CODE (charset);
|
||||
code = XINT (val);
|
||||
code = XFIXNUM (val);
|
||||
if (! CHARSET_COMPACT_CODES_P (charset))
|
||||
code = INDEX_TO_CODE_POINT (charset, code);
|
||||
}
|
||||
|
|
@ -1878,7 +1878,7 @@ Return nil if CHARSET doesn't include CH. */)
|
|||
|
||||
CHECK_CHARSET_GET_ID (charset, id);
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
charsetp = CHARSET_FROM_ID (id);
|
||||
code = ENCODE_CHAR (charsetp, c);
|
||||
if (code == CHARSET_INVALID_CODE (charsetp))
|
||||
|
|
@ -1911,9 +1911,9 @@ is specified. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (code1);
|
||||
if (XFASTINT (code1) >= 0x100)
|
||||
if (XFIXNAT (code1) >= 0x100)
|
||||
args_out_of_range (make_fixnum (0xFF), code1);
|
||||
code = XFASTINT (code1);
|
||||
code = XFIXNAT (code1);
|
||||
|
||||
if (dimension > 1)
|
||||
{
|
||||
|
|
@ -1923,9 +1923,9 @@ is specified. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (code2);
|
||||
if (XFASTINT (code2) >= 0x100)
|
||||
if (XFIXNAT (code2) >= 0x100)
|
||||
args_out_of_range (make_fixnum (0xFF), code2);
|
||||
code |= XFASTINT (code2);
|
||||
code |= XFIXNAT (code2);
|
||||
}
|
||||
|
||||
if (dimension > 2)
|
||||
|
|
@ -1936,9 +1936,9 @@ is specified. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (code3);
|
||||
if (XFASTINT (code3) >= 0x100)
|
||||
if (XFIXNAT (code3) >= 0x100)
|
||||
args_out_of_range (make_fixnum (0xFF), code3);
|
||||
code |= XFASTINT (code3);
|
||||
code |= XFIXNAT (code3);
|
||||
}
|
||||
|
||||
if (dimension > 3)
|
||||
|
|
@ -1949,9 +1949,9 @@ is specified. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (code4);
|
||||
if (XFASTINT (code4) >= 0x100)
|
||||
if (XFIXNAT (code4) >= 0x100)
|
||||
args_out_of_range (make_fixnum (0xFF), code4);
|
||||
code |= XFASTINT (code4);
|
||||
code |= XFIXNAT (code4);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1983,7 +1983,7 @@ char_charset (int c, Lisp_Object charset_list, unsigned int *code_return)
|
|||
|
||||
while (CONSP (charset_list))
|
||||
{
|
||||
struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
struct charset *charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
unsigned code = ENCODE_CHAR (charset, c);
|
||||
|
||||
if (code != CHARSET_INVALID_CODE (charset))
|
||||
|
|
@ -2018,7 +2018,7 @@ CH in the charset. */)
|
|||
Lisp_Object val;
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
charset = CHAR_CHARSET (c);
|
||||
if (! charset)
|
||||
emacs_abort ();
|
||||
|
|
@ -2048,12 +2048,12 @@ that case, find the charset from what supported by that coding system. */)
|
|||
|
||||
CHECK_CHARACTER (ch);
|
||||
if (NILP (restriction))
|
||||
charset = CHAR_CHARSET (XINT (ch));
|
||||
charset = CHAR_CHARSET (XFIXNUM (ch));
|
||||
else
|
||||
{
|
||||
if (CONSP (restriction))
|
||||
{
|
||||
int c = XFASTINT (ch);
|
||||
int c = XFIXNAT (ch);
|
||||
|
||||
for (; CONSP (restriction); restriction = XCDR (restriction))
|
||||
{
|
||||
|
|
@ -2066,7 +2066,7 @@ that case, find the charset from what supported by that coding system. */)
|
|||
return Qnil;
|
||||
}
|
||||
restriction = coding_system_charset_list (restriction);
|
||||
charset = char_charset (XINT (ch), restriction, NULL);
|
||||
charset = char_charset (XFIXNUM (ch), restriction, NULL);
|
||||
if (! charset)
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -2087,7 +2087,7 @@ If POS is out of range, the value is nil. */)
|
|||
ch = Fchar_after (pos);
|
||||
if (! FIXNUMP (ch))
|
||||
return ch;
|
||||
charset = CHAR_CHARSET (XINT (ch));
|
||||
charset = CHAR_CHARSET (XFIXNUM (ch));
|
||||
return (CHARSET_NAME (charset));
|
||||
}
|
||||
|
||||
|
|
@ -2104,8 +2104,8 @@ DIMENSION, CHARS, and FINAL-CHAR. */)
|
|||
(Lisp_Object dimension, Lisp_Object chars, Lisp_Object final_char)
|
||||
{
|
||||
bool chars_flag = check_iso_charset_parameter (dimension, chars, final_char);
|
||||
int id = ISO_CHARSET_TABLE (XINT (dimension), chars_flag,
|
||||
XFASTINT (final_char));
|
||||
int id = ISO_CHARSET_TABLE (XFIXNUM (dimension), chars_flag,
|
||||
XFIXNAT (final_char));
|
||||
return (id >= 0 ? CHARSET_NAME (CHARSET_FROM_ID (id)) : Qnil);
|
||||
}
|
||||
|
||||
|
|
@ -2139,11 +2139,11 @@ HIGHESTP non-nil means just return the highest priority one. */)
|
|||
Lisp_Object val = Qnil, list = Vcharset_ordered_list;
|
||||
|
||||
if (!NILP (highestp))
|
||||
return CHARSET_NAME (CHARSET_FROM_ID (XINT (Fcar (list))));
|
||||
return CHARSET_NAME (CHARSET_FROM_ID (XFIXNUM (Fcar (list))));
|
||||
|
||||
while (!NILP (list))
|
||||
{
|
||||
val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XINT (XCAR (list)))), val);
|
||||
val = Fcons (CHARSET_NAME (CHARSET_FROM_ID (XFIXNUM (XCAR (list)))), val);
|
||||
list = XCDR (list);
|
||||
}
|
||||
return Fnreverse (val);
|
||||
|
|
@ -2186,7 +2186,7 @@ usage: (set-charset-priority &rest charsets) */)
|
|||
list_emacs_mule = Fcons (XCAR (old_list), list_emacs_mule);
|
||||
if (charset_unibyte < 0)
|
||||
{
|
||||
struct charset *charset = CHARSET_FROM_ID (XINT (XCAR (old_list)));
|
||||
struct charset *charset = CHARSET_FROM_ID (XFIXNUM (XCAR (old_list)));
|
||||
|
||||
if (CHARSET_DIMENSION (charset) == 1
|
||||
&& CHARSET_ASCII_COMPATIBLE_P (charset)
|
||||
|
|
@ -2237,7 +2237,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
|
|||
(Lisp_Object charsets)
|
||||
{
|
||||
Lisp_Object len = Flength (charsets);
|
||||
ptrdiff_t n = XFASTINT (len), i, j;
|
||||
ptrdiff_t n = XFIXNAT (len), i, j;
|
||||
int done;
|
||||
Lisp_Object tail, elt, attrs;
|
||||
struct charset_sort_data *sort_data;
|
||||
|
|
@ -2252,7 +2252,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
|
|||
elt = XCAR (tail);
|
||||
CHECK_CHARSET_GET_ATTR (elt, attrs);
|
||||
sort_data[i].charset = elt;
|
||||
sort_data[i].id = id = XINT (CHARSET_ATTR_ID (attrs));
|
||||
sort_data[i].id = id = XFIXNUM (CHARSET_ATTR_ID (attrs));
|
||||
if (id < min_id)
|
||||
min_id = id;
|
||||
if (id > max_id)
|
||||
|
|
@ -2262,7 +2262,7 @@ See also `charset-priority-list' and `set-charset-priority'. */)
|
|||
done < n && CONSP (tail); tail = XCDR (tail), i++)
|
||||
{
|
||||
elt = XCAR (tail);
|
||||
id = XFASTINT (elt);
|
||||
id = XFIXNAT (elt);
|
||||
if (id >= min_id && id <= max_id)
|
||||
for (j = 0; j < n; j++)
|
||||
if (sort_data[j].id == id)
|
||||
|
|
|
|||
|
|
@ -355,7 +355,7 @@ set_charset_attr (struct charset *charset, enum charset_attr_index idx,
|
|||
\
|
||||
if (! SYMBOLP (x) || (idx = CHARSET_SYMBOL_HASH_INDEX (x)) < 0) \
|
||||
wrong_type_argument (Qcharsetp, (x)); \
|
||||
id = XINT (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
|
||||
id = XFIXNUM (AREF (HASH_VALUE (XHASH_TABLE (Vcharset_hash_table), idx), \
|
||||
charset_id)); \
|
||||
} while (false)
|
||||
|
||||
|
|
@ -416,7 +416,7 @@ extern Lisp_Object Vchar_charset_set;
|
|||
: (charset)->method == CHARSET_METHOD_MAP \
|
||||
? (((charset)->code_linear_p \
|
||||
&& VECTORP (CHARSET_DECODER (charset))) \
|
||||
? XINT (AREF (CHARSET_DECODER (charset), \
|
||||
? XFIXNUM (AREF (CHARSET_DECODER (charset), \
|
||||
(code) - (charset)->min_code)) \
|
||||
: decode_char ((charset), (code))) \
|
||||
: decode_char ((charset), (code)))
|
||||
|
|
@ -447,7 +447,7 @@ extern Lisp_Object charset_work;
|
|||
? (charset_work = CHAR_TABLE_REF (CHARSET_ENCODER (charset), c), \
|
||||
(NILP (charset_work) \
|
||||
? (charset)->invalid_code \
|
||||
: (unsigned) XFASTINT (charset_work))) \
|
||||
: (unsigned) XFIXNAT (charset_work))) \
|
||||
: encode_char (charset, c)) \
|
||||
: encode_char (charset, c))))
|
||||
|
||||
|
|
|
|||
|
|
@ -119,9 +119,9 @@ the char-table has no extra slot. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (n);
|
||||
if (XINT (n) > 10)
|
||||
if (XFIXNUM (n) > 10)
|
||||
args_out_of_range (n, Qnil);
|
||||
n_extras = XINT (n);
|
||||
n_extras = XFIXNUM (n);
|
||||
}
|
||||
|
||||
size = CHAR_TABLE_STANDARD_SLOTS + n_extras;
|
||||
|
|
@ -572,11 +572,11 @@ DEFUN ("char-table-extra-slot", Fchar_table_extra_slot, Schar_table_extra_slot,
|
|||
{
|
||||
CHECK_CHAR_TABLE (char_table);
|
||||
CHECK_FIXNUM (n);
|
||||
if (XINT (n) < 0
|
||||
|| XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
|
||||
if (XFIXNUM (n) < 0
|
||||
|| XFIXNUM (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
|
||||
args_out_of_range (char_table, n);
|
||||
|
||||
return XCHAR_TABLE (char_table)->extras[XINT (n)];
|
||||
return XCHAR_TABLE (char_table)->extras[XFIXNUM (n)];
|
||||
}
|
||||
|
||||
DEFUN ("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,
|
|||
{
|
||||
CHECK_CHAR_TABLE (char_table);
|
||||
CHECK_FIXNUM (n);
|
||||
if (XINT (n) < 0
|
||||
|| XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
|
||||
if (XFIXNUM (n) < 0
|
||||
|| XFIXNUM (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
|
||||
args_out_of_range (char_table, n);
|
||||
|
||||
set_char_table_extras (char_table, XINT (n), value);
|
||||
set_char_table_extras (char_table, XFIXNUM (n), value);
|
||||
return value;
|
||||
}
|
||||
|
||||
|
|
@ -608,15 +608,15 @@ a cons of character codes (for characters in the range), or a character code. *
|
|||
if (EQ (range, Qnil))
|
||||
val = XCHAR_TABLE (char_table)->defalt;
|
||||
else if (CHARACTERP (range))
|
||||
val = CHAR_TABLE_REF (char_table, XFASTINT (range));
|
||||
val = CHAR_TABLE_REF (char_table, XFIXNAT (range));
|
||||
else if (CONSP (range))
|
||||
{
|
||||
int from, to;
|
||||
|
||||
CHECK_CHARACTER_CAR (range);
|
||||
CHECK_CHARACTER_CDR (range);
|
||||
from = XFASTINT (XCAR (range));
|
||||
to = XFASTINT (XCDR (range));
|
||||
from = XFIXNAT (XCAR (range));
|
||||
to = XFIXNAT (XCDR (range));
|
||||
val = char_table_ref_and_range (char_table, from, &from, &to);
|
||||
/* Not yet implemented. */
|
||||
}
|
||||
|
|
@ -645,13 +645,13 @@ or a character code. Return VALUE. */)
|
|||
else if (EQ (range, Qnil))
|
||||
set_char_table_defalt (char_table, value);
|
||||
else if (CHARACTERP (range))
|
||||
char_table_set (char_table, XINT (range), value);
|
||||
char_table_set (char_table, XFIXNUM (range), value);
|
||||
else if (CONSP (range))
|
||||
{
|
||||
CHECK_CHARACTER_CAR (range);
|
||||
CHECK_CHARACTER_CDR (range);
|
||||
char_table_set_range (char_table,
|
||||
XINT (XCAR (range)), XINT (XCDR (range)), value);
|
||||
XFIXNUM (XCAR (range)), XFIXNUM (XCDR (range)), value);
|
||||
}
|
||||
else
|
||||
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),
|
|||
int min_char, max_char;
|
||||
/* Number of characters covered by one element of TABLE. */
|
||||
int chars_in_block;
|
||||
int from = XINT (XCAR (range)), to = XINT (XCDR (range));
|
||||
int from = XFIXNUM (XCAR (range)), to = XFIXNUM (XCDR (range));
|
||||
int i, c;
|
||||
bool is_uniprop = UNIPROP_TABLE_P (top);
|
||||
uniprop_decoder_t decoder = UNIPROP_GET_DECODER (top);
|
||||
|
|
@ -878,7 +878,7 @@ map_char_table (void (*c_function) (Lisp_Object, Lisp_Object, Lisp_Object),
|
|||
while (NILP (val) && ! NILP (XCHAR_TABLE (table)->parent))
|
||||
{
|
||||
Lisp_Object temp;
|
||||
int from = XINT (XCAR (range));
|
||||
int from = XFIXNUM (XCAR (range));
|
||||
|
||||
parent = XCHAR_TABLE (table)->parent;
|
||||
temp = XCHAR_TABLE (parent)->parent;
|
||||
|
|
@ -1174,8 +1174,8 @@ uniprop_decode_value_run_length (Lisp_Object table, Lisp_Object value)
|
|||
{
|
||||
Lisp_Object valvec = XCHAR_TABLE (table)->extras[4];
|
||||
|
||||
if (XINT (value) >= 0 && XINT (value) < ASIZE (valvec))
|
||||
value = AREF (valvec, XINT (value));
|
||||
if (XFIXNUM (value) >= 0 && XFIXNUM (value) < ASIZE (valvec))
|
||||
value = AREF (valvec, XFIXNUM (value));
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
|
@ -1194,7 +1194,7 @@ uniprop_get_decoder (Lisp_Object table)
|
|||
|
||||
if (! FIXNUMP (XCHAR_TABLE (table)->extras[1]))
|
||||
return NULL;
|
||||
i = XINT (XCHAR_TABLE (table)->extras[1]);
|
||||
i = XFIXNUM (XCHAR_TABLE (table)->extras[1]);
|
||||
if (i < 0 || i >= uniprop_decoder_count)
|
||||
return NULL;
|
||||
return uniprop_decoder[i];
|
||||
|
|
@ -1269,7 +1269,7 @@ uniprop_get_encoder (Lisp_Object table)
|
|||
|
||||
if (! FIXNUMP (XCHAR_TABLE (table)->extras[2]))
|
||||
return NULL;
|
||||
i = XINT (XCHAR_TABLE (table)->extras[2]);
|
||||
i = XFIXNUM (XCHAR_TABLE (table)->extras[2]);
|
||||
if (i < 0 || i >= uniprop_encoder_count)
|
||||
return NULL;
|
||||
return uniprop_encoder[i];
|
||||
|
|
@ -1301,7 +1301,7 @@ uniprop_table (Lisp_Object prop)
|
|||
return Qnil;
|
||||
val = XCHAR_TABLE (table)->extras[1];
|
||||
if (FIXNUMP (val)
|
||||
? (XINT (val) < 0 || XINT (val) >= uniprop_decoder_count)
|
||||
? (XFIXNUM (val) < 0 || XFIXNUM (val) >= uniprop_decoder_count)
|
||||
: ! NILP (val))
|
||||
return Qnil;
|
||||
/* Prepare ASCII values in advance for CHAR_TABLE_REF. */
|
||||
|
|
@ -1337,7 +1337,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
|
|||
CHECK_CHARACTER (ch);
|
||||
if (! UNIPROP_TABLE_P (char_table))
|
||||
error ("Invalid Unicode property table");
|
||||
val = CHAR_TABLE_REF (char_table, XINT (ch));
|
||||
val = CHAR_TABLE_REF (char_table, XFIXNUM (ch));
|
||||
decoder = uniprop_get_decoder (char_table);
|
||||
return (decoder ? decoder (char_table, val) : val);
|
||||
}
|
||||
|
|
@ -1357,7 +1357,7 @@ CHAR-TABLE must be what returned by `unicode-property-table-internal'. */)
|
|||
encoder = uniprop_get_encoder (char_table);
|
||||
if (encoder)
|
||||
value = encoder (char_table, value);
|
||||
CHAR_TABLE_SET (char_table, XINT (ch), value);
|
||||
CHAR_TABLE_SET (char_table, XFIXNUM (ch), value);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
|
|||
36
src/cmds.c
36
src/cmds.c
|
|
@ -37,7 +37,7 @@ DEFUN ("forward-point", Fforward_point, Sforward_point, 1, 1, 0,
|
|||
{
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
return make_fixnum (PT + XINT (n));
|
||||
return make_fixnum (PT + XFIXNUM (n));
|
||||
}
|
||||
|
||||
/* 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,
|
|||
static Lisp_Object
|
||||
move_point (Lisp_Object n, bool forward)
|
||||
{
|
||||
/* This used to just set point to point + XINT (n), and then check
|
||||
/* This used to just set point to point + XFIXNUM (n), and then check
|
||||
to see if it was within boundaries. But now that SET_PT can
|
||||
potentially do a lot of stuff (calling entering and exiting
|
||||
hooks, etcetera), that's not a good approach. So we validate the
|
||||
|
|
@ -58,7 +58,7 @@ move_point (Lisp_Object n, bool forward)
|
|||
else
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
new_point = PT + (forward ? XINT (n) : - XINT (n));
|
||||
new_point = PT + (forward ? XFIXNUM (n) : - XFIXNUM (n));
|
||||
|
||||
if (new_point < BEGV)
|
||||
{
|
||||
|
|
@ -128,7 +128,7 @@ go to its beginning. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (n);
|
||||
count = XINT (n);
|
||||
count = XFIXNUM (n);
|
||||
}
|
||||
|
||||
shortage = scan_newline_from_point (count, &pos, &pos_byte);
|
||||
|
|
@ -164,7 +164,7 @@ instead. For instance, `(forward-line 0)' does the same thing as
|
|||
else
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
SET_PT (XINT (Fline_beginning_position (n)));
|
||||
SET_PT (XFIXNUM (Fline_beginning_position (n)));
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -191,7 +191,7 @@ to t. */)
|
|||
|
||||
while (1)
|
||||
{
|
||||
newpos = XINT (Fline_end_position (n));
|
||||
newpos = XFIXNUM (Fline_end_position (n));
|
||||
SET_PT (newpos);
|
||||
|
||||
if (PT > newpos
|
||||
|
|
@ -232,13 +232,13 @@ because it respects values of `delete-active-region' and `overwrite-mode'. */)
|
|||
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
if (eabs (XINT (n)) < 2)
|
||||
if (eabs (XFIXNUM (n)) < 2)
|
||||
call0 (Qundo_auto_amalgamate);
|
||||
|
||||
pos = PT + XINT (n);
|
||||
pos = PT + XFIXNUM (n);
|
||||
if (NILP (killflag))
|
||||
{
|
||||
if (XINT (n) < 0)
|
||||
if (XFIXNUM (n) < 0)
|
||||
{
|
||||
if (pos < BEGV)
|
||||
xsignal0 (Qbeginning_of_buffer);
|
||||
|
|
@ -276,10 +276,10 @@ a non-nil value for the inserted character. At the end, it runs
|
|||
{
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
if (XINT (n) < 0)
|
||||
error ("Negative repetition argument %"pI"d", XINT (n));
|
||||
if (XFIXNUM (n) < 0)
|
||||
error ("Negative repetition argument %"pI"d", XFIXNUM (n));
|
||||
|
||||
if (XFASTINT (n) < 2)
|
||||
if (XFIXNAT (n) < 2)
|
||||
call0 (Qundo_auto_amalgamate);
|
||||
|
||||
/* 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
|
|||
bitch_at_user ();
|
||||
else {
|
||||
int character = translate_char (Vtranslation_table_for_input,
|
||||
XINT (last_command_event));
|
||||
int val = internal_self_insert (character, XFASTINT (n));
|
||||
XFIXNUM (last_command_event));
|
||||
int val = internal_self_insert (character, XFIXNAT (n));
|
||||
if (val == 2)
|
||||
Fset (Qundo_auto__this_command_amalgamating, Qnil);
|
||||
frame_make_pointer_invisible (SELECTED_FRAME ());
|
||||
|
|
@ -360,7 +360,7 @@ internal_self_insert (int c, EMACS_INT n)
|
|||
if (EQ (overwrite, Qoverwrite_mode_binary))
|
||||
chars_to_delete = min (n, PTRDIFF_MAX);
|
||||
else if (c != '\n' && c2 != '\n'
|
||||
&& (cwidth = XFASTINT (Fchar_width (make_fixnum (c)))) != 0)
|
||||
&& (cwidth = XFIXNAT (Fchar_width (make_fixnum (c)))) != 0)
|
||||
{
|
||||
ptrdiff_t pos = PT;
|
||||
ptrdiff_t pos_byte = PT_BYTE;
|
||||
|
|
@ -378,7 +378,7 @@ internal_self_insert (int c, EMACS_INT n)
|
|||
character. In that case, the new point is set after
|
||||
that character. */
|
||||
ptrdiff_t actual_clm
|
||||
= XFASTINT (Fmove_to_column (make_fixnum (target_clm), Qnil));
|
||||
= XFIXNAT (Fmove_to_column (make_fixnum (target_clm), Qnil));
|
||||
|
||||
chars_to_delete = PT - pos;
|
||||
|
||||
|
|
@ -408,8 +408,8 @@ internal_self_insert (int c, EMACS_INT n)
|
|||
&& NILP (BVAR (current_buffer, read_only))
|
||||
&& PT > BEGV
|
||||
&& (SYNTAX (!NILP (BVAR (current_buffer, enable_multibyte_characters))
|
||||
? XFASTINT (Fprevious_char ())
|
||||
: UNIBYTE_TO_CHAR (XFASTINT (Fprevious_char ())))
|
||||
? XFIXNAT (Fprevious_char ())
|
||||
: UNIBYTE_TO_CHAR (XFIXNAT (Fprevious_char ())))
|
||||
== Sword))
|
||||
{
|
||||
EMACS_INT modiff = MODIFF;
|
||||
|
|
|
|||
234
src/coding.c
234
src/coding.c
|
|
@ -324,7 +324,7 @@ static Lisp_Object Vbig5_coding_system;
|
|||
/* ISO2022 section */
|
||||
|
||||
#define CODING_ISO_INITIAL(coding, reg) \
|
||||
(XINT (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \
|
||||
(XFIXNUM (AREF (AREF (CODING_ID_ATTRS ((coding)->id), \
|
||||
coding_attr_iso_initial), \
|
||||
reg)))
|
||||
|
||||
|
|
@ -2888,7 +2888,7 @@ setup_iso_safe_charsets (Lisp_Object attrs)
|
|||
Lisp_Object reg_usage;
|
||||
Lisp_Object tail;
|
||||
EMACS_INT reg94, reg96;
|
||||
int flags = XINT (AREF (attrs, coding_attr_iso_flags));
|
||||
int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
|
||||
int max_charset_id;
|
||||
|
||||
charset_list = CODING_ATTR_CHARSET_LIST (attrs);
|
||||
|
|
@ -2906,7 +2906,7 @@ setup_iso_safe_charsets (Lisp_Object attrs)
|
|||
max_charset_id = 0;
|
||||
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
int id = XINT (XCAR (tail));
|
||||
int id = XFIXNUM (XCAR (tail));
|
||||
if (max_charset_id < id)
|
||||
max_charset_id = id;
|
||||
}
|
||||
|
|
@ -2915,8 +2915,8 @@ setup_iso_safe_charsets (Lisp_Object attrs)
|
|||
memset (SDATA (safe_charsets), 255, max_charset_id + 1);
|
||||
request = AREF (attrs, coding_attr_iso_request);
|
||||
reg_usage = AREF (attrs, coding_attr_iso_usage);
|
||||
reg94 = XINT (XCAR (reg_usage));
|
||||
reg96 = XINT (XCDR (reg_usage));
|
||||
reg94 = XFIXNUM (XCAR (reg_usage));
|
||||
reg96 = XFIXNUM (XCDR (reg_usage));
|
||||
|
||||
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
|
|
@ -2925,19 +2925,19 @@ setup_iso_safe_charsets (Lisp_Object attrs)
|
|||
struct charset *charset;
|
||||
|
||||
id = XCAR (tail);
|
||||
charset = CHARSET_FROM_ID (XINT (id));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (id));
|
||||
reg = Fcdr (Fassq (id, request));
|
||||
if (! NILP (reg))
|
||||
SSET (safe_charsets, XINT (id), XINT (reg));
|
||||
SSET (safe_charsets, XFIXNUM (id), XFIXNUM (reg));
|
||||
else if (charset->iso_chars_96)
|
||||
{
|
||||
if (reg96 < 4)
|
||||
SSET (safe_charsets, XINT (id), reg96);
|
||||
SSET (safe_charsets, XFIXNUM (id), reg96);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (reg94 < 4)
|
||||
SSET (safe_charsets, XINT (id), reg94);
|
||||
SSET (safe_charsets, XFIXNUM (id), reg94);
|
||||
}
|
||||
}
|
||||
ASET (attrs, coding_attr_safe_charsets, safe_charsets);
|
||||
|
|
@ -4612,7 +4612,7 @@ detect_coding_sjis (struct coding_system *coding,
|
|||
|
||||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
max_first_byte_of_2_byte_code
|
||||
= (XINT (Flength (charset_list)) > 3 ? 0xFC : 0xEF);
|
||||
= (XFIXNUM (Flength (charset_list)) > 3 ? 0xFC : 0xEF);
|
||||
|
||||
detect_info->checked |= CATEGORY_MASK_SJIS;
|
||||
/* A coding system of this category is always ASCII compatible. */
|
||||
|
|
@ -4725,10 +4725,10 @@ decode_coding_sjis (struct coding_system *coding)
|
|||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
|
||||
val = charset_list;
|
||||
charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
@ -4840,8 +4840,8 @@ decode_coding_big5 (struct coding_system *coding)
|
|||
|
||||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
val = charset_list;
|
||||
charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
|
@ -4936,9 +4936,9 @@ encode_coding_sjis (struct coding_system *coding)
|
|||
|
||||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
val = XCDR (charset_list);
|
||||
charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji2 = NILP (val) ? NULL : CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
|
||||
ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs));
|
||||
|
||||
|
|
@ -5029,7 +5029,7 @@ encode_coding_big5 (struct coding_system *coding)
|
|||
|
||||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
val = XCDR (charset_list);
|
||||
charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
ascii_compatible = ! NILP (CODING_ATTR_ASCII_COMPAT (attrs));
|
||||
|
||||
while (charbuf < charbuf_end)
|
||||
|
|
@ -5442,7 +5442,7 @@ detect_coding_charset (struct coding_system *coding,
|
|||
}
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XFASTINT (val));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (val));
|
||||
dim = CHARSET_DIMENSION (charset);
|
||||
for (idx = 1; idx < dim; idx++)
|
||||
{
|
||||
|
|
@ -5461,7 +5461,7 @@ detect_coding_charset (struct coding_system *coding,
|
|||
idx = 1;
|
||||
for (; CONSP (val); val = XCDR (val))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XFASTINT (XCAR (val)));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (XCAR (val)));
|
||||
dim = CHARSET_DIMENSION (charset);
|
||||
while (idx < dim)
|
||||
{
|
||||
|
|
@ -5555,7 +5555,7 @@ decode_coding_charset (struct coding_system *coding)
|
|||
goto invalid_code;
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XFASTINT (val));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (val));
|
||||
dim = CHARSET_DIMENSION (charset);
|
||||
while (len < dim)
|
||||
{
|
||||
|
|
@ -5573,7 +5573,7 @@ decode_coding_charset (struct coding_system *coding)
|
|||
comes first). */
|
||||
while (CONSP (val))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XFASTINT (XCAR (val)));
|
||||
charset = CHARSET_FROM_ID (XFIXNAT (XCAR (val)));
|
||||
dim = CHARSET_DIMENSION (charset);
|
||||
while (len < dim)
|
||||
{
|
||||
|
|
@ -5726,7 +5726,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
|
|||
val = CODING_ATTR_SAFE_CHARSETS (attrs);
|
||||
coding->max_charset_id = SCHARS (val) - 1;
|
||||
coding->safe_charsets = SDATA (val);
|
||||
coding->default_char = XINT (CODING_ATTR_DEFAULT_CHAR (attrs));
|
||||
coding->default_char = XFIXNUM (CODING_ATTR_DEFAULT_CHAR (attrs));
|
||||
coding->carryover_bytes = 0;
|
||||
coding->raw_destination = 0;
|
||||
|
||||
|
|
@ -5749,7 +5749,7 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
|
|||
else if (EQ (coding_type, Qiso_2022))
|
||||
{
|
||||
int i;
|
||||
int flags = XINT (AREF (attrs, coding_attr_iso_flags));
|
||||
int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
|
||||
|
||||
/* Invoke graphic register 0 to plane 0. */
|
||||
CODING_ISO_INVOCATION (coding, 0) = 0;
|
||||
|
|
@ -5852,13 +5852,13 @@ setup_coding_system (Lisp_Object coding_system, struct coding_system *coding)
|
|||
|
||||
for (tail = Vemacs_mule_charset_list; CONSP (tail);
|
||||
tail = XCDR (tail))
|
||||
if (max_charset_id < XFASTINT (XCAR (tail)))
|
||||
max_charset_id = XFASTINT (XCAR (tail));
|
||||
if (max_charset_id < XFIXNAT (XCAR (tail)))
|
||||
max_charset_id = XFIXNAT (XCAR (tail));
|
||||
safe_charsets = make_uninit_string (max_charset_id + 1);
|
||||
memset (SDATA (safe_charsets), 255, max_charset_id + 1);
|
||||
for (tail = Vemacs_mule_charset_list; CONSP (tail);
|
||||
tail = XCDR (tail))
|
||||
SSET (safe_charsets, XFASTINT (XCAR (tail)), 0);
|
||||
SSET (safe_charsets, XFIXNAT (XCAR (tail)), 0);
|
||||
coding->max_charset_id = max_charset_id;
|
||||
coding->safe_charsets = SDATA (safe_charsets);
|
||||
}
|
||||
|
|
@ -5908,7 +5908,7 @@ coding_charset_list (struct coding_system *coding)
|
|||
CODING_GET_INFO (coding, attrs, charset_list);
|
||||
if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022))
|
||||
{
|
||||
int flags = XINT (AREF (attrs, coding_attr_iso_flags));
|
||||
int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
|
||||
|
||||
if (flags & CODING_ISO_FLAG_FULL_SUPPORT)
|
||||
charset_list = Viso_2022_charset_list;
|
||||
|
|
@ -5934,7 +5934,7 @@ coding_system_charset_list (Lisp_Object coding_system)
|
|||
|
||||
if (EQ (CODING_ATTR_TYPE (attrs), Qiso_2022))
|
||||
{
|
||||
int flags = XINT (AREF (attrs, coding_attr_iso_flags));
|
||||
int flags = XFIXNUM (AREF (attrs, coding_attr_iso_flags));
|
||||
|
||||
if (flags & CODING_ISO_FLAG_FULL_SUPPORT)
|
||||
charset_list = Viso_2022_charset_list;
|
||||
|
|
@ -6714,7 +6714,7 @@ detect_coding (struct coding_system *coding)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (XINT (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
|
||||
else if (XFIXNUM (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
|
||||
== coding_category_utf_8_auto)
|
||||
{
|
||||
Lisp_Object coding_systems;
|
||||
|
|
@ -6740,7 +6740,7 @@ detect_coding (struct coding_system *coding)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if (XINT (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
|
||||
else if (XFIXNUM (CODING_ATTR_CATEGORY (CODING_ID_ATTRS (coding->id)))
|
||||
== coding_category_utf_16_auto)
|
||||
{
|
||||
Lisp_Object coding_systems;
|
||||
|
|
@ -6924,8 +6924,8 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
|
|||
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (translation_table)) > 1)
|
||||
{
|
||||
val = XCHAR_TABLE (translation_table)->extras[1];
|
||||
if (FIXNATP (val) && *max_lookup < XFASTINT (val))
|
||||
*max_lookup = min (XFASTINT (val), MAX_LOOKUP_MAX);
|
||||
if (FIXNATP (val) && *max_lookup < XFIXNAT (val))
|
||||
*max_lookup = min (XFIXNAT (val), MAX_LOOKUP_MAX);
|
||||
}
|
||||
else if (CONSP (translation_table))
|
||||
{
|
||||
|
|
@ -6936,8 +6936,8 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
|
|||
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1)
|
||||
{
|
||||
Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1];
|
||||
if (FIXNATP (tailval) && *max_lookup < XFASTINT (tailval))
|
||||
*max_lookup = min (XFASTINT (tailval), MAX_LOOKUP_MAX);
|
||||
if (FIXNATP (tailval) && *max_lookup < XFIXNAT (tailval))
|
||||
*max_lookup = min (XFIXNAT (tailval), MAX_LOOKUP_MAX);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6951,7 +6951,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
|
|||
{ \
|
||||
trans = CHAR_TABLE_REF (table, c); \
|
||||
if (CHARACTERP (trans)) \
|
||||
c = XFASTINT (trans), trans = Qnil; \
|
||||
c = XFIXNAT (trans), trans = Qnil; \
|
||||
} \
|
||||
else if (CONSP (table)) \
|
||||
{ \
|
||||
|
|
@ -6962,7 +6962,7 @@ get_translation_table (Lisp_Object attrs, bool encodep, int *max_lookup)
|
|||
{ \
|
||||
trans = CHAR_TABLE_REF (XCAR (tail), c); \
|
||||
if (CHARACTERP (trans)) \
|
||||
c = XFASTINT (trans), trans = Qnil; \
|
||||
c = XFIXNAT (trans), trans = Qnil; \
|
||||
else if (! NILP (trans)) \
|
||||
break; \
|
||||
} \
|
||||
|
|
@ -6997,7 +6997,7 @@ get_translation (Lisp_Object trans, int *buf, int *buf_end, ptrdiff_t *nchars)
|
|||
{
|
||||
if (buf + i == buf_end)
|
||||
return Qt;
|
||||
if (XINT (AREF (from, i)) != buf[i])
|
||||
if (XFIXNUM (AREF (from, i)) != buf[i])
|
||||
break;
|
||||
}
|
||||
if (i == len)
|
||||
|
|
@ -7049,11 +7049,11 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
|
|||
{
|
||||
trans = get_translation (trans, buf, buf_end, &from_nchars);
|
||||
if (FIXNUMP (trans))
|
||||
c = XINT (trans);
|
||||
c = XFIXNUM (trans);
|
||||
else if (VECTORP (trans))
|
||||
{
|
||||
to_nchars = ASIZE (trans);
|
||||
c = XINT (AREF (trans, 0));
|
||||
c = XFIXNUM (AREF (trans, 0));
|
||||
}
|
||||
else if (EQ (trans, Qt) && ! last_block)
|
||||
break;
|
||||
|
|
@ -7081,7 +7081,7 @@ produce_chars (struct coding_system *coding, Lisp_Object translation_table,
|
|||
for (i = 0; i < to_nchars; i++)
|
||||
{
|
||||
if (i > 0)
|
||||
c = XINT (AREF (trans, i));
|
||||
c = XFIXNUM (AREF (trans, i));
|
||||
if (coding->dst_multibyte
|
||||
|| ! CHAR_BYTE8_P (c))
|
||||
CHAR_STRING_ADVANCE_NO_UNIFY (c, dst);
|
||||
|
|
@ -7534,7 +7534,7 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit,
|
|||
{
|
||||
len = ASIZE (components);
|
||||
for (i = 0; i < len; i++)
|
||||
*buf++ = XINT (AREF (components, i));
|
||||
*buf++ = XFIXNUM (AREF (components, i));
|
||||
}
|
||||
else if (STRINGP (components))
|
||||
{
|
||||
|
|
@ -7549,13 +7549,13 @@ handle_composition_annotation (ptrdiff_t pos, ptrdiff_t limit,
|
|||
else if (FIXNUMP (components))
|
||||
{
|
||||
len = 1;
|
||||
*buf++ = XINT (components);
|
||||
*buf++ = XFIXNUM (components);
|
||||
}
|
||||
else if (CONSP (components))
|
||||
{
|
||||
for (len = 0; CONSP (components);
|
||||
len++, components = XCDR (components))
|
||||
*buf++ = XINT (XCAR (components));
|
||||
*buf++ = XFIXNUM (XCAR (components));
|
||||
}
|
||||
else
|
||||
emacs_abort ();
|
||||
|
|
@ -7593,14 +7593,14 @@ handle_charset_annotation (ptrdiff_t pos, ptrdiff_t limit,
|
|||
|
||||
val = Fget_text_property (make_fixnum (pos), Qcharset, coding->src_object);
|
||||
if (! NILP (val) && CHARSETP (val))
|
||||
id = XINT (CHARSET_SYMBOL_ID (val));
|
||||
id = XFIXNUM (CHARSET_SYMBOL_ID (val));
|
||||
else
|
||||
id = -1;
|
||||
ADD_CHARSET_DATA (buf, 0, id);
|
||||
next = Fnext_single_property_change (make_fixnum (pos), Qcharset,
|
||||
coding->src_object,
|
||||
make_fixnum (limit));
|
||||
*stop = XINT (next);
|
||||
*stop = XFIXNUM (next);
|
||||
return buf;
|
||||
}
|
||||
|
||||
|
|
@ -7710,19 +7710,19 @@ consume_chars (struct coding_system *coding, Lisp_Object translation_table,
|
|||
trans = get_translation (trans, lookup_buf, lookup_buf_end,
|
||||
&from_nchars);
|
||||
if (FIXNUMP (trans))
|
||||
c = XINT (trans);
|
||||
c = XFIXNUM (trans);
|
||||
else if (VECTORP (trans))
|
||||
{
|
||||
to_nchars = ASIZE (trans);
|
||||
if (buf_end - buf < to_nchars)
|
||||
break;
|
||||
c = XINT (AREF (trans, 0));
|
||||
c = XFIXNUM (AREF (trans, 0));
|
||||
}
|
||||
else
|
||||
break;
|
||||
*buf++ = c;
|
||||
for (i = 1; i < to_nchars; i++)
|
||||
*buf++ = XINT (AREF (trans, i));
|
||||
*buf++ = XFIXNUM (AREF (trans, i));
|
||||
for (i = 1; i < from_nchars; i++, pos++)
|
||||
src += MULTIBYTE_LENGTH_NO_CHECK (src);
|
||||
}
|
||||
|
|
@ -8618,7 +8618,7 @@ detect_coding_system (const unsigned char *src,
|
|||
detect_info.checked = detect_info.found = detect_info.rejected = 0;
|
||||
|
||||
/* At first, detect text-format if necessary. */
|
||||
base_category = XINT (CODING_ATTR_CATEGORY (attrs));
|
||||
base_category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
|
||||
if (base_category == coding_category_undecided)
|
||||
{
|
||||
enum coding_category category UNINIT;
|
||||
|
|
@ -8826,7 +8826,7 @@ detect_coding_system (const unsigned char *src,
|
|||
}
|
||||
else
|
||||
{
|
||||
detect_info.found = 1 << XINT (CODING_ATTR_CATEGORY (attrs));
|
||||
detect_info.found = 1 << XFIXNUM (CODING_ATTR_CATEGORY (attrs));
|
||||
val = list1 (make_fixnum (coding.id));
|
||||
}
|
||||
|
||||
|
|
@ -8869,9 +8869,9 @@ detect_coding_system (const unsigned char *src,
|
|||
enum coding_category category;
|
||||
int this_eol;
|
||||
|
||||
id = XINT (XCAR (tail));
|
||||
id = XFIXNUM (XCAR (tail));
|
||||
attrs = CODING_ID_ATTRS (id);
|
||||
category = XINT (CODING_ATTR_CATEGORY (attrs));
|
||||
category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
|
||||
eol_type = CODING_ID_EOL_TYPE (id);
|
||||
if (VECTORP (eol_type))
|
||||
{
|
||||
|
|
@ -8922,7 +8922,7 @@ highest priority. */)
|
|||
ptrdiff_t from_byte, to_byte;
|
||||
|
||||
validate_region (&start, &end);
|
||||
from = XINT (start), to = XINT (end);
|
||||
from = XFIXNUM (start), to = XFIXNUM (end);
|
||||
from_byte = CHAR_TO_BYTE (from);
|
||||
to_byte = CHAR_TO_BYTE (to);
|
||||
|
||||
|
|
@ -8975,7 +8975,7 @@ char_encodable_p (int c, Lisp_Object attrs)
|
|||
for (tail = CODING_ATTR_CHARSET_LIST (attrs);
|
||||
CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (tail)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (tail)));
|
||||
if (CHAR_CHARSET_P (c, charset))
|
||||
break;
|
||||
}
|
||||
|
|
@ -9013,21 +9013,21 @@ DEFUN ("find-coding-systems-region-internal",
|
|||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start);
|
||||
CHECK_FIXNUM_COERCE_MARKER (end);
|
||||
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
|
||||
if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end))
|
||||
args_out_of_range (start, end);
|
||||
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
return Qt;
|
||||
start_byte = CHAR_TO_BYTE (XINT (start));
|
||||
end_byte = CHAR_TO_BYTE (XINT (end));
|
||||
if (XINT (end) - XINT (start) == end_byte - start_byte)
|
||||
start_byte = CHAR_TO_BYTE (XFIXNUM (start));
|
||||
end_byte = CHAR_TO_BYTE (XFIXNUM (end));
|
||||
if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte)
|
||||
return Qt;
|
||||
|
||||
if (XINT (start) < GPT && XINT (end) > GPT)
|
||||
if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
|
||||
{
|
||||
if ((GPT - XINT (start)) < (XINT (end) - GPT))
|
||||
move_gap_both (XINT (start), start_byte);
|
||||
if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT))
|
||||
move_gap_both (XFIXNUM (start), start_byte);
|
||||
else
|
||||
move_gap_both (XINT (end), end_byte);
|
||||
move_gap_both (XFIXNUM (end), end_byte);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -9146,8 +9146,8 @@ to the string and treated as in `substring'. */)
|
|||
if (NILP (string))
|
||||
{
|
||||
validate_region (&start, &end);
|
||||
from = XINT (start);
|
||||
to = XINT (end);
|
||||
from = XFIXNUM (start);
|
||||
to = XFIXNUM (end);
|
||||
if (NILP (BVAR (current_buffer, enable_multibyte_characters))
|
||||
|| (ascii_compatible
|
||||
&& (to - from) == (CHAR_TO_BYTE (to) - (CHAR_TO_BYTE (from)))))
|
||||
|
|
@ -9176,7 +9176,7 @@ to the string and treated as in `substring'. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNAT (count);
|
||||
n = XINT (count);
|
||||
n = XFIXNUM (count);
|
||||
}
|
||||
|
||||
positions = Qnil;
|
||||
|
|
@ -9267,23 +9267,23 @@ is nil. */)
|
|||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start);
|
||||
CHECK_FIXNUM_COERCE_MARKER (end);
|
||||
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
|
||||
if (XFIXNUM (start) < BEG || XFIXNUM (end) > Z || XFIXNUM (start) > XFIXNUM (end))
|
||||
args_out_of_range (start, end);
|
||||
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
return Qnil;
|
||||
start_byte = CHAR_TO_BYTE (XINT (start));
|
||||
end_byte = CHAR_TO_BYTE (XINT (end));
|
||||
if (XINT (end) - XINT (start) == end_byte - start_byte)
|
||||
start_byte = CHAR_TO_BYTE (XFIXNUM (start));
|
||||
end_byte = CHAR_TO_BYTE (XFIXNUM (end));
|
||||
if (XFIXNUM (end) - XFIXNUM (start) == end_byte - start_byte)
|
||||
return Qnil;
|
||||
|
||||
if (XINT (start) < GPT && XINT (end) > GPT)
|
||||
if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
|
||||
{
|
||||
if ((GPT - XINT (start)) < (XINT (end) - GPT))
|
||||
move_gap_both (XINT (start), start_byte);
|
||||
if ((GPT - XFIXNUM (start)) < (XFIXNUM (end) - GPT))
|
||||
move_gap_both (XFIXNUM (start), start_byte);
|
||||
else
|
||||
move_gap_both (XINT (end), end_byte);
|
||||
move_gap_both (XFIXNUM (end), end_byte);
|
||||
}
|
||||
pos = XINT (start);
|
||||
pos = XFIXNUM (start);
|
||||
}
|
||||
|
||||
list = Qnil;
|
||||
|
|
@ -9369,9 +9369,9 @@ code_convert_region (Lisp_Object start, Lisp_Object end,
|
|||
CHECK_BUFFER (dst_object);
|
||||
|
||||
validate_region (&start, &end);
|
||||
from = XFASTINT (start);
|
||||
from = XFIXNAT (start);
|
||||
from_byte = CHAR_TO_BYTE (from);
|
||||
to = XFASTINT (end);
|
||||
to = XFIXNAT (end);
|
||||
to_byte = CHAR_TO_BYTE (to);
|
||||
|
||||
setup_coding_system (coding_system, &coding);
|
||||
|
|
@ -9611,7 +9611,7 @@ Return the corresponding character. */)
|
|||
int c;
|
||||
|
||||
CHECK_FIXNAT (code);
|
||||
ch = XFASTINT (code);
|
||||
ch = XFIXNAT (code);
|
||||
CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
|
||||
attrs = AREF (spec, 0);
|
||||
|
||||
|
|
@ -9620,9 +9620,9 @@ Return the corresponding character. */)
|
|||
return code;
|
||||
|
||||
val = CODING_ATTR_CHARSET_LIST (attrs);
|
||||
charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kana = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kana = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_kanji = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
|
||||
if (ch <= 0x7F)
|
||||
{
|
||||
|
|
@ -9664,7 +9664,7 @@ Return the corresponding code in SJIS. */)
|
|||
unsigned code;
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
|
||||
attrs = AREF (spec, 0);
|
||||
|
||||
|
|
@ -9692,7 +9692,7 @@ Return the corresponding character. */)
|
|||
int c;
|
||||
|
||||
CHECK_FIXNAT (code);
|
||||
ch = XFASTINT (code);
|
||||
ch = XFIXNAT (code);
|
||||
CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
|
||||
attrs = AREF (spec, 0);
|
||||
|
||||
|
|
@ -9701,8 +9701,8 @@ Return the corresponding character. */)
|
|||
return code;
|
||||
|
||||
val = CODING_ATTR_CHARSET_LIST (attrs);
|
||||
charset_roman = CHARSET_FROM_ID (XINT (XCAR (val))), val = XCDR (val);
|
||||
charset_big5 = CHARSET_FROM_ID (XINT (XCAR (val)));
|
||||
charset_roman = CHARSET_FROM_ID (XFIXNUM (XCAR (val))), val = XCDR (val);
|
||||
charset_big5 = CHARSET_FROM_ID (XFIXNUM (XCAR (val)));
|
||||
|
||||
if (ch <= 0x7F)
|
||||
{
|
||||
|
|
@ -9736,7 +9736,7 @@ Return the corresponding character code in Big5. */)
|
|||
unsigned code;
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
|
||||
attrs = AREF (spec, 0);
|
||||
if (ASCII_CHAR_P (c)
|
||||
|
|
@ -9885,17 +9885,17 @@ usage: (find-operation-coding-system OPERATION ARGUMENTS...) */)
|
|||
if (!SYMBOLP (operation)
|
||||
|| (target_idx = Fget (operation, Qtarget_idx), !FIXNATP (target_idx)))
|
||||
error ("Invalid first argument");
|
||||
if (nargs <= 1 + XFASTINT (target_idx))
|
||||
if (nargs <= 1 + XFIXNAT (target_idx))
|
||||
error ("Too few arguments for operation `%s'",
|
||||
SDATA (SYMBOL_NAME (operation)));
|
||||
target = args[XFASTINT (target_idx) + 1];
|
||||
target = args[XFIXNAT (target_idx) + 1];
|
||||
if (!(STRINGP (target)
|
||||
|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
|
||||
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|
||||
|| (EQ (operation, Qopen_network_stream)
|
||||
&& (FIXNUMP (target) || EQ (target, Qt)))))
|
||||
error ("Invalid argument %"pI"d of operation `%s'",
|
||||
XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
|
||||
XFIXNAT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
|
||||
if (CONSP (target))
|
||||
target = XCAR (target);
|
||||
|
||||
|
|
@ -9967,7 +9967,7 @@ usage: (set-coding-system-priority &rest coding-systems) */)
|
|||
|
||||
CHECK_CODING_SYSTEM_GET_SPEC (args[i], spec);
|
||||
attrs = AREF (spec, 0);
|
||||
category = XINT (CODING_ATTR_CATEGORY (attrs));
|
||||
category = XFIXNUM (CODING_ATTR_CATEGORY (attrs));
|
||||
if (changed[category])
|
||||
/* Ignore this coding system because a coding system of the
|
||||
same category already had a higher priority. */
|
||||
|
|
@ -10110,8 +10110,8 @@ usage: (define-coding-system-internal ...) */)
|
|||
{
|
||||
if (! RANGED_FIXNUMP (0, XCAR (tail), INT_MAX - 1))
|
||||
error ("Invalid charset-list");
|
||||
if (max_charset_id < XFASTINT (XCAR (tail)))
|
||||
max_charset_id = XFASTINT (XCAR (tail));
|
||||
if (max_charset_id < XFIXNAT (XCAR (tail)))
|
||||
max_charset_id = XFIXNAT (XCAR (tail));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -10141,7 +10141,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
safe_charsets = make_uninit_string (max_charset_id + 1);
|
||||
memset (SDATA (safe_charsets), 255, max_charset_id + 1);
|
||||
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
|
||||
SSET (safe_charsets, XFASTINT (XCAR (tail)), 0);
|
||||
SSET (safe_charsets, XFIXNAT (XCAR (tail)), 0);
|
||||
ASET (attrs, coding_attr_safe_charsets, safe_charsets);
|
||||
|
||||
ASET (attrs, coding_attr_ascii_compat, args[coding_arg_ascii_compatible_p]);
|
||||
|
|
@ -10198,7 +10198,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
|
||||
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
|
||||
{
|
||||
struct charset *charset = CHARSET_FROM_ID (XFASTINT (XCAR (tail)));
|
||||
struct charset *charset = CHARSET_FROM_ID (XFIXNAT (XCAR (tail)));
|
||||
int dim = CHARSET_DIMENSION (charset);
|
||||
int idx = (dim - 1) * 4;
|
||||
|
||||
|
|
@ -10216,7 +10216,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
tmp = XCAR (tail);
|
||||
else if (FIXED_OR_FLOATP (tmp))
|
||||
{
|
||||
dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp)));
|
||||
dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFIXNAT (tmp)));
|
||||
if (dim < dim2)
|
||||
tmp = list2 (XCAR (tail), tmp);
|
||||
else
|
||||
|
|
@ -10226,7 +10226,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
{
|
||||
for (tmp2 = tmp; CONSP (tmp2); tmp2 = XCDR (tmp2))
|
||||
{
|
||||
dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (XCAR (tmp2))));
|
||||
dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFIXNAT (XCAR (tmp2))));
|
||||
if (dim < dim2)
|
||||
break;
|
||||
}
|
||||
|
|
@ -10272,23 +10272,23 @@ usage: (define-coding-system-internal ...) */)
|
|||
val = XCAR (tail);
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
if (! (0 <= XINT (val) && XINT (val) <= 255))
|
||||
if (! (0 <= XFIXNUM (val) && XFIXNUM (val) <= 255))
|
||||
args_out_of_range_3 (val, make_fixnum (0), make_fixnum (255));
|
||||
from = to = XINT (val);
|
||||
from = to = XFIXNUM (val);
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_CONS (val);
|
||||
CHECK_FIXNAT_CAR (val);
|
||||
CHECK_FIXNUM_CDR (val);
|
||||
if (XINT (XCAR (val)) > 255)
|
||||
if (XFIXNUM (XCAR (val)) > 255)
|
||||
args_out_of_range_3 (XCAR (val),
|
||||
make_fixnum (0), make_fixnum (255));
|
||||
from = XINT (XCAR (val));
|
||||
if (! (from <= XINT (XCDR (val)) && XINT (XCDR (val)) <= 255))
|
||||
from = XFIXNUM (XCAR (val));
|
||||
if (! (from <= XFIXNUM (XCDR (val)) && XFIXNUM (XCDR (val)) <= 255))
|
||||
args_out_of_range_3 (XCDR (val),
|
||||
XCAR (val), make_fixnum (255));
|
||||
to = XINT (XCDR (val));
|
||||
to = XFIXNUM (XCDR (val));
|
||||
}
|
||||
for (i = from; i <= to; i++)
|
||||
SSET (valids, i, 1);
|
||||
|
|
@ -10376,14 +10376,14 @@ usage: (define-coding-system-internal ...) */)
|
|||
tmp1 = XCAR (val);
|
||||
CHECK_CHARSET_GET_ID (tmp1, id);
|
||||
CHECK_FIXNAT_CDR (val);
|
||||
if (XINT (XCDR (val)) >= 4)
|
||||
error ("Invalid graphic register number: %"pI"d", XINT (XCDR (val)));
|
||||
if (XFIXNUM (XCDR (val)) >= 4)
|
||||
error ("Invalid graphic register number: %"pI"d", XFIXNUM (XCDR (val)));
|
||||
XSETCAR (val, make_fixnum (id));
|
||||
}
|
||||
|
||||
flags = args[coding_arg_iso2022_flags];
|
||||
CHECK_FIXNAT (flags);
|
||||
i = XINT (flags) & INT_MAX;
|
||||
i = XFIXNUM (flags) & INT_MAX;
|
||||
if (EQ (args[coding_arg_charset_list], Qiso_2022))
|
||||
i |= CODING_ISO_FLAG_FULL_SUPPORT;
|
||||
flags = make_fixnum (i);
|
||||
|
|
@ -10403,7 +10403,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
: coding_category_iso_7_tight);
|
||||
else
|
||||
{
|
||||
int id = XINT (AREF (initial, 1));
|
||||
int id = XFIXNUM (AREF (initial, 1));
|
||||
|
||||
category = (((i & CODING_ISO_FLAG_LOCKING_SHIFT)
|
||||
|| EQ (args[coding_arg_charset_list], Qiso_2022)
|
||||
|
|
@ -10429,11 +10429,11 @@ usage: (define-coding-system-internal ...) */)
|
|||
|
||||
struct charset *charset;
|
||||
|
||||
if (XINT (Flength (charset_list)) != 3
|
||||
&& XINT (Flength (charset_list)) != 4)
|
||||
if (XFIXNUM (Flength (charset_list)) != 3
|
||||
&& XFIXNUM (Flength (charset_list)) != 4)
|
||||
error ("There should be three or four charsets");
|
||||
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 1)
|
||||
error ("Dimension of charset %s is not one",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
|
@ -10441,13 +10441,13 @@ usage: (define-coding-system-internal ...) */)
|
|||
ASET (attrs, coding_attr_ascii_compat, Qt);
|
||||
|
||||
charset_list = XCDR (charset_list);
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 1)
|
||||
error ("Dimension of charset %s is not one",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
||||
charset_list = XCDR (charset_list);
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 2)
|
||||
error ("Dimension of charset %s is not two",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
|
@ -10455,7 +10455,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
charset_list = XCDR (charset_list);
|
||||
if (! NILP (charset_list))
|
||||
{
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 2)
|
||||
error ("Dimension of charset %s is not two",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
|
@ -10468,10 +10468,10 @@ usage: (define-coding-system-internal ...) */)
|
|||
{
|
||||
struct charset *charset;
|
||||
|
||||
if (XINT (Flength (charset_list)) != 2)
|
||||
if (XFIXNUM (Flength (charset_list)) != 2)
|
||||
error ("There should be just two charsets");
|
||||
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 1)
|
||||
error ("Dimension of charset %s is not one",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
|
@ -10479,7 +10479,7 @@ usage: (define-coding-system-internal ...) */)
|
|||
ASET (attrs, coding_attr_ascii_compat, Qt);
|
||||
|
||||
charset_list = XCDR (charset_list);
|
||||
charset = CHARSET_FROM_ID (XINT (XCAR (charset_list)));
|
||||
charset = CHARSET_FROM_ID (XFIXNUM (XCAR (charset_list)));
|
||||
if (CHARSET_DIMENSION (charset) != 2)
|
||||
error ("Dimension of charset %s is not two",
|
||||
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
|
||||
|
|
|
|||
|
|
@ -196,9 +196,9 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
|
|||
if (FIXNUMP (id))
|
||||
{
|
||||
/* PROP should be Form-B. */
|
||||
if (XINT (id) < 0 || XINT (id) >= n_compositions)
|
||||
if (XFIXNUM (id) < 0 || XFIXNUM (id) >= n_compositions)
|
||||
goto invalid_composition;
|
||||
return XINT (id);
|
||||
return XFIXNUM (id);
|
||||
}
|
||||
|
||||
/* PROP should be Form-A.
|
||||
|
|
@ -206,7 +206,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
|
|||
if (!CONSP (id))
|
||||
goto invalid_composition;
|
||||
length = XCAR (id);
|
||||
if (!FIXNUMP (length) || XINT (length) != nchars)
|
||||
if (!FIXNUMP (length) || XFIXNUM (length) != nchars)
|
||||
goto invalid_composition;
|
||||
|
||||
components = XCDR (id);
|
||||
|
|
@ -251,7 +251,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
|
|||
id = HASH_VALUE (hash_table, hash_index);
|
||||
XSETCAR (prop, id);
|
||||
XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop))));
|
||||
return XINT (id);
|
||||
return XFIXNUM (id);
|
||||
}
|
||||
|
||||
/* 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,
|
|||
for (i = 0; i < glyph_len; i++)
|
||||
{
|
||||
int this_width;
|
||||
ch = XINT (key_contents[i]);
|
||||
ch = XFIXNUM (key_contents[i]);
|
||||
/* TAB in a composition means display glyphs with padding
|
||||
space on the left or right. */
|
||||
this_width = (ch == '\t' ? 1 : CHARACTER_WIDTH (ch));
|
||||
|
|
@ -345,7 +345,7 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
|
|||
/* Rule-base composition. */
|
||||
double leftmost = 0.0, rightmost;
|
||||
|
||||
ch = XINT (key_contents[0]);
|
||||
ch = XFIXNUM (key_contents[0]);
|
||||
rightmost = ch != '\t' ? CHARACTER_WIDTH (ch) : 1;
|
||||
|
||||
for (i = 1; i < glyph_len; i += 2)
|
||||
|
|
@ -354,8 +354,8 @@ get_composition_id (ptrdiff_t charpos, ptrdiff_t bytepos, ptrdiff_t nchars,
|
|||
int this_width;
|
||||
double this_left;
|
||||
|
||||
rule = XINT (key_contents[i]);
|
||||
ch = XINT (key_contents[i + 1]);
|
||||
rule = XFIXNUM (key_contents[i]);
|
||||
ch = XFIXNUM (key_contents[i + 1]);
|
||||
this_width = ch != '\t' ? CHARACTER_WIDTH (ch) : 1;
|
||||
|
||||
/* A composition rule is specified by an integer value
|
||||
|
|
@ -433,7 +433,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit,
|
|||
{
|
||||
val = Fnext_single_property_change (make_fixnum (pos), Qcomposition,
|
||||
object, make_fixnum (limit));
|
||||
pos = XINT (val);
|
||||
pos = XFIXNUM (val);
|
||||
if (pos == limit)
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -444,7 +444,7 @@ find_composition (ptrdiff_t pos, ptrdiff_t limit,
|
|||
return 1;
|
||||
val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition,
|
||||
object, make_fixnum (limit));
|
||||
pos = XINT (val);
|
||||
pos = XFIXNUM (val);
|
||||
if (pos == limit)
|
||||
return 0;
|
||||
pos--;
|
||||
|
|
@ -836,7 +836,7 @@ fill_gstring_body (Lisp_Object gstring)
|
|||
for (i = 0; i < len; i++)
|
||||
{
|
||||
Lisp_Object g = LGSTRING_GLYPH (gstring, i);
|
||||
int c = XFASTINT (AREF (header, i + 1));
|
||||
int c = XFIXNAT (AREF (header, i + 1));
|
||||
|
||||
if (NILP (g))
|
||||
{
|
||||
|
|
@ -852,7 +852,7 @@ fill_gstring_body (Lisp_Object gstring)
|
|||
}
|
||||
else
|
||||
{
|
||||
int width = XFASTINT (CHAR_TABLE_REF (Vchar_width_table, c));
|
||||
int width = XFIXNAT (CHAR_TABLE_REF (Vchar_width_table, c));
|
||||
|
||||
LGLYPH_SET_CODE (g, c);
|
||||
LGLYPH_SET_LBEARING (g, 0);
|
||||
|
|
@ -941,7 +941,7 @@ char_composable_p (int c)
|
|||
return (c > ' '
|
||||
&& (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
|
||||
|| (val = CHAR_TABLE_REF (Vunicode_category_table, c),
|
||||
(FIXNUMP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
|
||||
(FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_So)))));
|
||||
}
|
||||
|
||||
/* 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,
|
|||
Lisp_Object elt = XCAR (val);
|
||||
if (VECTORP (elt) && ASIZE (elt) == 3
|
||||
&& FIXNATP (AREF (elt, 1))
|
||||
&& charpos - 1 - XFASTINT (AREF (elt, 1)) >= start)
|
||||
&& charpos - 1 - XFIXNAT (AREF (elt, 1)) >= start)
|
||||
{
|
||||
cmp_it->rule_idx = ridx;
|
||||
cmp_it->lookback = XFASTINT (AREF (elt, 1));
|
||||
cmp_it->lookback = XFIXNAT (AREF (elt, 1));
|
||||
cmp_it->stop_pos = charpos - 1 - cmp_it->lookback;
|
||||
cmp_it->ch = c;
|
||||
return;
|
||||
|
|
@ -1082,9 +1082,9 @@ composition_compute_stop_pos (struct composition_it *cmp_it, ptrdiff_t charpos,
|
|||
Lisp_Object elt = XCAR (val);
|
||||
if (VECTORP (elt) && ASIZE (elt) == 3
|
||||
&& FIXNATP (AREF (elt, 1))
|
||||
&& charpos - XFASTINT (AREF (elt, 1)) > endpos)
|
||||
&& charpos - XFIXNAT (AREF (elt, 1)) > endpos)
|
||||
{
|
||||
ptrdiff_t back = XFASTINT (AREF (elt, 1));
|
||||
ptrdiff_t back = XFIXNAT (AREF (elt, 1));
|
||||
ptrdiff_t cpos = charpos - back, bpos;
|
||||
|
||||
if (back == 0)
|
||||
|
|
@ -1223,7 +1223,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
|
|||
if (! VECTORP (elt) || ASIZE (elt) != 3
|
||||
|| ! FIXNUMP (AREF (elt, 1)))
|
||||
continue;
|
||||
if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback)
|
||||
if (XFIXNAT (AREF (elt, 1)) != cmp_it->lookback)
|
||||
goto no_composition;
|
||||
lgstring = autocmp_chars (elt, charpos, bytepos, endpos,
|
||||
w, face, string);
|
||||
|
|
@ -1262,7 +1262,7 @@ composition_reseat_it (struct composition_it *cmp_it, ptrdiff_t charpos,
|
|||
goto no_composition;
|
||||
if (NILP (LGSTRING_ID (lgstring)))
|
||||
lgstring = composition_gstring_put_cache (lgstring, -1);
|
||||
cmp_it->id = XINT (LGSTRING_ID (lgstring));
|
||||
cmp_it->id = XFIXNUM (LGSTRING_ID (lgstring));
|
||||
int i;
|
||||
for (i = 0; i < LGSTRING_GLYPH_LEN (lgstring); i++)
|
||||
if (NILP (LGSTRING_GLYPH (lgstring, i)))
|
||||
|
|
@ -1391,7 +1391,7 @@ composition_update_it (struct composition_it *cmp_it, ptrdiff_t charpos, ptrdiff
|
|||
cmp_it->width = 0;
|
||||
for (i = cmp_it->nchars - 1; i >= 0; i--)
|
||||
{
|
||||
c = XINT (LGSTRING_CHAR (gstring, from + i));
|
||||
c = XFIXNUM (LGSTRING_CHAR (gstring, from + i));
|
||||
cmp_it->nbytes += CHAR_BYTES (c);
|
||||
cmp_it->width += CHARACTER_WIDTH (c);
|
||||
}
|
||||
|
|
@ -1561,7 +1561,7 @@ find_automatic_composition (ptrdiff_t pos, ptrdiff_t limit,
|
|||
|
||||
if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1)))
|
||||
{
|
||||
EMACS_INT check_pos = cur.pos - XFASTINT (AREF (elt, 1));
|
||||
EMACS_INT check_pos = cur.pos - XFIXNAT (AREF (elt, 1));
|
||||
struct position_record check;
|
||||
|
||||
if (check_pos < head
|
||||
|
|
@ -1739,8 +1739,8 @@ should be ignored. */)
|
|||
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
error ("Attempt to shape unibyte text");
|
||||
validate_region (&from, &to);
|
||||
frompos = XFASTINT (from);
|
||||
topos = XFASTINT (to);
|
||||
frompos = XFIXNAT (from);
|
||||
topos = XFIXNAT (to);
|
||||
frombyte = CHAR_TO_BYTE (frompos);
|
||||
}
|
||||
else
|
||||
|
|
@ -1785,7 +1785,7 @@ for the composition. See `compose-region' for more details. */)
|
|||
&& !STRINGP (components))
|
||||
CHECK_VECTOR (components);
|
||||
|
||||
compose_text (XINT (start), XINT (end), components, modification_func, Qnil);
|
||||
compose_text (XFIXNUM (start), XFIXNUM (end), components, modification_func, Qnil);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -1824,7 +1824,7 @@ See `find-composition' for more details. */)
|
|||
if (!NILP (limit))
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (limit);
|
||||
to = min (XINT (limit), ZV);
|
||||
to = min (XFIXNUM (limit), ZV);
|
||||
}
|
||||
else
|
||||
to = -1;
|
||||
|
|
@ -1832,15 +1832,15 @@ See `find-composition' for more details. */)
|
|||
if (!NILP (string))
|
||||
{
|
||||
CHECK_STRING (string);
|
||||
if (XINT (pos) < 0 || XINT (pos) > SCHARS (string))
|
||||
if (XFIXNUM (pos) < 0 || XFIXNUM (pos) > SCHARS (string))
|
||||
args_out_of_range (string, pos);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (XINT (pos) < BEGV || XINT (pos) > ZV)
|
||||
if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) > ZV)
|
||||
args_out_of_range (Fcurrent_buffer (), pos);
|
||||
}
|
||||
from = XINT (pos);
|
||||
from = XFIXNUM (pos);
|
||||
|
||||
if (!find_composition (from, to, &start, &end, &prop, string))
|
||||
{
|
||||
|
|
@ -1851,12 +1851,12 @@ See `find-composition' for more details. */)
|
|||
return list3 (make_fixnum (start), make_fixnum (end), gstring);
|
||||
return Qnil;
|
||||
}
|
||||
if ((end <= XINT (pos) || start > XINT (pos)))
|
||||
if ((end <= XFIXNUM (pos) || start > XFIXNUM (pos)))
|
||||
{
|
||||
ptrdiff_t s, e;
|
||||
|
||||
if (find_automatic_composition (from, to, &s, &e, &gstring, string)
|
||||
&& (e <= XINT (pos) ? e > end : s < start))
|
||||
&& (e <= XFIXNUM (pos) ? e > end : s < start))
|
||||
return list3 (make_fixnum (s), make_fixnum (e), gstring);
|
||||
}
|
||||
if (!composition_valid_p (start, end, prop))
|
||||
|
|
|
|||
|
|
@ -63,13 +63,13 @@ composition_registered_p (Lisp_Object prop)
|
|||
}
|
||||
|
||||
/* Return ID number of the already registered composition. */
|
||||
#define COMPOSITION_ID(prop) XINT (XCAR (prop))
|
||||
#define COMPOSITION_ID(prop) XFIXNUM (XCAR (prop))
|
||||
|
||||
/* Return length of the composition. */
|
||||
#define COMPOSITION_LENGTH(prop) \
|
||||
(composition_registered_p (prop) \
|
||||
? XINT (XCAR (XCDR (prop))) \
|
||||
: XINT (XCAR (XCAR (prop))))
|
||||
? XFIXNUM (XCAR (XCDR (prop))) \
|
||||
: XFIXNUM (XCAR (XCAR (prop))))
|
||||
|
||||
/* Return components of the composition. */
|
||||
#define COMPOSITION_COMPONENTS(prop) \
|
||||
|
|
@ -86,7 +86,7 @@ composition_registered_p (Lisp_Object prop)
|
|||
/* Return the Nth glyph of composition specified by CMP. CMP is a
|
||||
pointer to `struct composition'. */
|
||||
#define COMPOSITION_GLYPH(cmp, n) \
|
||||
XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
|
||||
XFIXNUM (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
|
||||
->key_and_value) \
|
||||
->contents[cmp->hash_index * 2]) \
|
||||
->contents[cmp->method == COMPOSITION_WITH_RULE_ALTCHARS \
|
||||
|
|
@ -96,7 +96,7 @@ composition_registered_p (Lisp_Object prop)
|
|||
rule-base composition specified by CMP. CMP is a pointer to
|
||||
`struct composition'. */
|
||||
#define COMPOSITION_RULE(cmp, n) \
|
||||
XINT (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
|
||||
XFIXNUM (XVECTOR (XVECTOR (XHASH_TABLE (composition_hash_table) \
|
||||
->key_and_value) \
|
||||
->contents[cmp->hash_index * 2]) \
|
||||
->contents[(n) * 2 - 1])
|
||||
|
|
@ -275,18 +275,18 @@ enum lglyph_indices
|
|||
};
|
||||
|
||||
#define LGLYPH_NEW() Fmake_vector (make_fixnum (LGLYPH_SIZE), Qnil)
|
||||
#define LGLYPH_FROM(g) XINT (AREF ((g), LGLYPH_IX_FROM))
|
||||
#define LGLYPH_TO(g) XINT (AREF ((g), LGLYPH_IX_TO))
|
||||
#define LGLYPH_CHAR(g) XINT (AREF ((g), LGLYPH_IX_CHAR))
|
||||
#define LGLYPH_FROM(g) XFIXNUM (AREF ((g), LGLYPH_IX_FROM))
|
||||
#define LGLYPH_TO(g) XFIXNUM (AREF ((g), LGLYPH_IX_TO))
|
||||
#define LGLYPH_CHAR(g) XFIXNUM (AREF ((g), LGLYPH_IX_CHAR))
|
||||
#define LGLYPH_CODE(g) \
|
||||
(NILP (AREF ((g), LGLYPH_IX_CODE)) \
|
||||
? FONT_INVALID_CODE \
|
||||
: cons_to_unsigned (AREF (g, LGLYPH_IX_CODE), TYPE_MAXIMUM (unsigned)))
|
||||
#define LGLYPH_WIDTH(g) XINT (AREF ((g), LGLYPH_IX_WIDTH))
|
||||
#define LGLYPH_LBEARING(g) XINT (AREF ((g), LGLYPH_IX_LBEARING))
|
||||
#define LGLYPH_RBEARING(g) XINT (AREF ((g), LGLYPH_IX_RBEARING))
|
||||
#define LGLYPH_ASCENT(g) XINT (AREF ((g), LGLYPH_IX_ASCENT))
|
||||
#define LGLYPH_DESCENT(g) XINT (AREF ((g), LGLYPH_IX_DESCENT))
|
||||
#define LGLYPH_WIDTH(g) XFIXNUM (AREF ((g), LGLYPH_IX_WIDTH))
|
||||
#define LGLYPH_LBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_LBEARING))
|
||||
#define LGLYPH_RBEARING(g) XFIXNUM (AREF ((g), LGLYPH_IX_RBEARING))
|
||||
#define LGLYPH_ASCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_ASCENT))
|
||||
#define LGLYPH_DESCENT(g) XFIXNUM (AREF ((g), LGLYPH_IX_DESCENT))
|
||||
#define LGLYPH_ADJUSTMENT(g) AREF ((g), LGLYPH_IX_ADJUSTMENT)
|
||||
#define LGLYPH_SET_FROM(g, val) ASET ((g), LGLYPH_IX_FROM, make_fixnum (val))
|
||||
#define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_fixnum (val))
|
||||
|
|
@ -304,11 +304,11 @@ enum lglyph_indices
|
|||
#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val))
|
||||
|
||||
#define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
|
||||
? XINT (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0)
|
||||
? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 0)) : 0)
|
||||
#define LGLYPH_YOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
|
||||
? XINT (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0)
|
||||
? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 1)) : 0)
|
||||
#define LGLYPH_WADJUST(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
|
||||
? XINT (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
|
||||
? XFIXNUM (AREF (LGLYPH_ADJUSTMENT (g), 2)) : 0)
|
||||
|
||||
extern Lisp_Object composition_gstring_put_cache (Lisp_Object, ptrdiff_t);
|
||||
extern Lisp_Object composition_gstring_from_id (ptrdiff_t);
|
||||
|
|
|
|||
170
src/data.c
170
src/data.c
|
|
@ -74,7 +74,7 @@ XKBOARD_OBJFWD (union Lisp_Fwd *a)
|
|||
return &a->u_kboard_objfwd;
|
||||
}
|
||||
static struct Lisp_Intfwd *
|
||||
XINTFWD (union Lisp_Fwd *a)
|
||||
XFIXNUMFWD (union Lisp_Fwd *a)
|
||||
{
|
||||
eassert (INTFWDP (a));
|
||||
return &a->u_intfwd;
|
||||
|
|
@ -1013,7 +1013,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
|
|||
switch (XFWDTYPE (valcontents))
|
||||
{
|
||||
case Lisp_Fwd_Int:
|
||||
XSETINT (val, *XINTFWD (valcontents)->intvar);
|
||||
XSETINT (val, *XFIXNUMFWD (valcontents)->intvar);
|
||||
return val;
|
||||
|
||||
case Lisp_Fwd_Bool:
|
||||
|
|
@ -1050,7 +1050,7 @@ do_symval_forwarding (register union Lisp_Fwd *valcontents)
|
|||
void
|
||||
wrong_choice (Lisp_Object choice, Lisp_Object wrong)
|
||||
{
|
||||
ptrdiff_t i = 0, len = XINT (Flength (choice));
|
||||
ptrdiff_t i = 0, len = XFIXNUM (Flength (choice));
|
||||
Lisp_Object obj, *args;
|
||||
AUTO_STRING (one_of, "One of ");
|
||||
AUTO_STRING (comma, ", ");
|
||||
|
|
@ -1106,7 +1106,7 @@ store_symval_forwarding (union Lisp_Fwd *valcontents, register Lisp_Object newva
|
|||
{
|
||||
case Lisp_Fwd_Int:
|
||||
CHECK_FIXNUM (newval);
|
||||
*XINTFWD (valcontents)->intvar = XINT (newval);
|
||||
*XFIXNUMFWD (valcontents)->intvar = XFIXNUM (newval);
|
||||
break;
|
||||
|
||||
case Lisp_Fwd_Bool:
|
||||
|
|
@ -2254,7 +2254,7 @@ or a byte-code object. IDX starts at 0. */)
|
|||
register EMACS_INT idxval;
|
||||
|
||||
CHECK_FIXNUM (idx);
|
||||
idxval = XINT (idx);
|
||||
idxval = XFIXNUM (idx);
|
||||
if (STRINGP (array))
|
||||
{
|
||||
int c;
|
||||
|
|
@ -2305,7 +2305,7 @@ bool-vector. IDX starts at 0. */)
|
|||
register EMACS_INT idxval;
|
||||
|
||||
CHECK_FIXNUM (idx);
|
||||
idxval = XINT (idx);
|
||||
idxval = XFIXNUM (idx);
|
||||
if (! RECORDP (array))
|
||||
CHECK_ARRAY (array, Qarrayp);
|
||||
|
||||
|
|
@ -2341,7 +2341,7 @@ bool-vector. IDX starts at 0. */)
|
|||
if (idxval < 0 || idxval >= SCHARS (array))
|
||||
args_out_of_range (array, idx);
|
||||
CHECK_CHARACTER (newelt);
|
||||
c = XFASTINT (newelt);
|
||||
c = XFIXNAT (newelt);
|
||||
|
||||
if (STRING_MULTIBYTE (array))
|
||||
{
|
||||
|
|
@ -2420,16 +2420,16 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
|
|||
}
|
||||
else if (FIXNUMP (num2))
|
||||
{
|
||||
if (sizeof (EMACS_INT) > sizeof (long) && XINT (num2) > LONG_MAX)
|
||||
if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num2) > LONG_MAX)
|
||||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (num2));
|
||||
mpz_set_intmax (tem, XFIXNUM (num2));
|
||||
cmp = mpz_cmp (XBIGNUM (num1)->value, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else
|
||||
cmp = mpz_cmp_si (XBIGNUM (num1)->value, XINT (num2));
|
||||
cmp = mpz_cmp_si (XBIGNUM (num1)->value, XFIXNUM (num2));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2451,16 +2451,16 @@ bignumcompare (Lisp_Object num1, Lisp_Object num2,
|
|||
else
|
||||
{
|
||||
eassume (FIXNUMP (num1));
|
||||
if (sizeof (EMACS_INT) > sizeof (long) && XINT (num1) > LONG_MAX)
|
||||
if (sizeof (EMACS_INT) > sizeof (long) && XFIXNUM (num1) > LONG_MAX)
|
||||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (num1));
|
||||
mpz_set_intmax (tem, XFIXNUM (num1));
|
||||
cmp = - mpz_cmp (XBIGNUM (num2)->value, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else
|
||||
cmp = - mpz_cmp_si (XBIGNUM (num2)->value, XINT (num1));
|
||||
cmp = - mpz_cmp_si (XBIGNUM (num2)->value, XFIXNUM (num1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2537,13 +2537,13 @@ arithcompare (Lisp_Object num1, Lisp_Object num2,
|
|||
floating-point comparison reports a tie, NUM1 = F1 = F2 = I1
|
||||
(exactly) so I1 - I2 = NUM1 - NUM2 (exactly), so comparing I1
|
||||
to I2 will break the tie correctly. */
|
||||
i1 = f2 = i2 = XINT (num2);
|
||||
i1 = f2 = i2 = XFIXNUM (num2);
|
||||
}
|
||||
fneq = f1 != f2;
|
||||
}
|
||||
else
|
||||
{
|
||||
i1 = XINT (num1);
|
||||
i1 = XFIXNUM (num1);
|
||||
if (FLOATP (num2))
|
||||
{
|
||||
/* Compare an integer NUM1 to a float NUM2. This is the
|
||||
|
|
@ -2554,7 +2554,7 @@ arithcompare (Lisp_Object num1, Lisp_Object num2,
|
|||
}
|
||||
else
|
||||
{
|
||||
i2 = XINT (num2);
|
||||
i2 = XFIXNUM (num2);
|
||||
fneq = false;
|
||||
}
|
||||
}
|
||||
|
|
@ -2687,8 +2687,8 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
|
|||
uintmax_t val UNINIT;
|
||||
if (FIXNUMP (c))
|
||||
{
|
||||
valid = XINT (c) >= 0;
|
||||
val = XINT (c);
|
||||
valid = XFIXNUM (c) >= 0;
|
||||
val = XFIXNUM (c);
|
||||
}
|
||||
else if (FLOATP (c))
|
||||
{
|
||||
|
|
@ -2701,24 +2701,24 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
|
|||
}
|
||||
else if (CONSP (c) && FIXNATP (XCAR (c)))
|
||||
{
|
||||
uintmax_t top = XFASTINT (XCAR (c));
|
||||
uintmax_t top = XFIXNAT (XCAR (c));
|
||||
Lisp_Object rest = XCDR (c);
|
||||
if (top <= UINTMAX_MAX >> 24 >> 16
|
||||
&& CONSP (rest)
|
||||
&& FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
|
||||
&& FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
|
||||
&& FIXNATP (XCAR (rest)) && XFIXNAT (XCAR (rest)) < 1 << 24
|
||||
&& FIXNATP (XCDR (rest)) && XFIXNAT (XCDR (rest)) < 1 << 16)
|
||||
{
|
||||
uintmax_t mid = XFASTINT (XCAR (rest));
|
||||
val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest));
|
||||
uintmax_t mid = XFIXNAT (XCAR (rest));
|
||||
val = top << 24 << 16 | mid << 16 | XFIXNAT (XCDR (rest));
|
||||
valid = true;
|
||||
}
|
||||
else if (top <= UINTMAX_MAX >> 16)
|
||||
{
|
||||
if (CONSP (rest))
|
||||
rest = XCAR (rest);
|
||||
if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16)
|
||||
if (FIXNATP (rest) && XFIXNAT (rest) < 1 << 16)
|
||||
{
|
||||
val = top << 16 | XFASTINT (rest);
|
||||
val = top << 16 | XFIXNAT (rest);
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2741,7 +2741,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
|
|||
intmax_t val UNINIT;
|
||||
if (FIXNUMP (c))
|
||||
{
|
||||
val = XINT (c);
|
||||
val = XFIXNUM (c);
|
||||
valid = true;
|
||||
}
|
||||
else if (FLOATP (c))
|
||||
|
|
@ -2755,24 +2755,24 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
|
|||
}
|
||||
else if (CONSP (c) && FIXNUMP (XCAR (c)))
|
||||
{
|
||||
intmax_t top = XINT (XCAR (c));
|
||||
intmax_t top = XFIXNUM (XCAR (c));
|
||||
Lisp_Object rest = XCDR (c);
|
||||
if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16
|
||||
&& CONSP (rest)
|
||||
&& FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
|
||||
&& FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
|
||||
&& FIXNATP (XCAR (rest)) && XFIXNAT (XCAR (rest)) < 1 << 24
|
||||
&& FIXNATP (XCDR (rest)) && XFIXNAT (XCDR (rest)) < 1 << 16)
|
||||
{
|
||||
intmax_t mid = XFASTINT (XCAR (rest));
|
||||
val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest));
|
||||
intmax_t mid = XFIXNAT (XCAR (rest));
|
||||
val = top << 24 << 16 | mid << 16 | XFIXNAT (XCDR (rest));
|
||||
valid = true;
|
||||
}
|
||||
else if (top >= INTMAX_MIN >> 16 && top <= INTMAX_MAX >> 16)
|
||||
{
|
||||
if (CONSP (rest))
|
||||
rest = XCAR (rest);
|
||||
if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16)
|
||||
if (FIXNATP (rest) && XFIXNAT (rest) < 1 << 16)
|
||||
{
|
||||
val = top << 16 | XFASTINT (rest);
|
||||
val = top << 16 | XFIXNAT (rest);
|
||||
valid = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -2805,7 +2805,7 @@ NUMBER may be an integer or a floating point number. */)
|
|||
if (FLOATP (number))
|
||||
len = float_to_string (buffer, XFLOAT_DATA (number));
|
||||
else
|
||||
len = sprintf (buffer, "%"pI"d", XINT (number));
|
||||
len = sprintf (buffer, "%"pI"d", XFIXNUM (number));
|
||||
|
||||
return make_unibyte_string (buffer, len);
|
||||
}
|
||||
|
|
@ -2829,9 +2829,9 @@ If the base used is not 10, STRING is always parsed as an integer. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (base);
|
||||
if (! (XINT (base) >= 2 && XINT (base) <= 16))
|
||||
if (! (XFIXNUM (base) >= 2 && XFIXNUM (base) <= 16))
|
||||
xsignal1 (Qargs_out_of_range, base);
|
||||
b = XINT (base);
|
||||
b = XFIXNUM (base);
|
||||
}
|
||||
|
||||
char *p = SSDATA (string);
|
||||
|
|
@ -2911,14 +2911,14 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (val));
|
||||
mpz_set_intmax (tem, XFIXNUM (val));
|
||||
mpz_add (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else if (XINT (val) < 0)
|
||||
mpz_sub_ui (accum, accum, - XINT (val));
|
||||
else if (XFIXNUM (val) < 0)
|
||||
mpz_sub_ui (accum, accum, - XFIXNUM (val));
|
||||
else
|
||||
mpz_add_ui (accum, accum, XINT (val));
|
||||
mpz_add_ui (accum, accum, XFIXNUM (val));
|
||||
break;
|
||||
case Asub:
|
||||
if (! argnum)
|
||||
|
|
@ -2926,7 +2926,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
if (BIGNUMP (val))
|
||||
mpz_set (accum, XBIGNUM (val)->value);
|
||||
else
|
||||
mpz_set_intmax (accum, XINT (val));
|
||||
mpz_set_intmax (accum, XFIXNUM (val));
|
||||
if (nargs == 1)
|
||||
mpz_neg (accum, accum);
|
||||
}
|
||||
|
|
@ -2936,14 +2936,14 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (val));
|
||||
mpz_set_intmax (tem, XFIXNUM (val));
|
||||
mpz_sub (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else if (XINT (val) < 0)
|
||||
mpz_add_ui (accum, accum, - XINT (val));
|
||||
else if (XFIXNUM (val) < 0)
|
||||
mpz_add_ui (accum, accum, - XFIXNUM (val));
|
||||
else
|
||||
mpz_sub_ui (accum, accum, XINT (val));
|
||||
mpz_sub_ui (accum, accum, XFIXNUM (val));
|
||||
break;
|
||||
case Amult:
|
||||
if (BIGNUMP (val))
|
||||
|
|
@ -2952,12 +2952,12 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (val));
|
||||
mpz_set_intmax (tem, XFIXNUM (val));
|
||||
mpz_mul (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else
|
||||
mpz_mul_si (accum, accum, XINT (val));
|
||||
mpz_mul_si (accum, accum, XFIXNUM (val));
|
||||
break;
|
||||
case Adiv:
|
||||
if (! (argnum || nargs == 1))
|
||||
|
|
@ -2965,13 +2965,13 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
if (BIGNUMP (val))
|
||||
mpz_set (accum, XBIGNUM (val)->value);
|
||||
else
|
||||
mpz_set_intmax (accum, XINT (val));
|
||||
mpz_set_intmax (accum, XFIXNUM (val));
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Note that a bignum can never be 0, so we don't need
|
||||
to check that case. */
|
||||
if (FIXNUMP (val) && XINT (val) == 0)
|
||||
if (FIXNUMP (val) && XFIXNUM (val) == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
if (BIGNUMP (val))
|
||||
mpz_tdiv_q (accum, accum, XBIGNUM (val)->value);
|
||||
|
|
@ -2979,13 +2979,13 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_intmax (tem, XINT (val));
|
||||
mpz_set_intmax (tem, XFIXNUM (val));
|
||||
mpz_tdiv_q (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
else
|
||||
{
|
||||
EMACS_INT value = XINT (val);
|
||||
EMACS_INT value = XFIXNUM (val);
|
||||
bool negate = value < 0;
|
||||
if (negate)
|
||||
value = -value;
|
||||
|
|
@ -3002,7 +3002,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_uintmax (tem, XUINT (val));
|
||||
mpz_set_uintmax (tem, XUFIXNUM (val));
|
||||
mpz_and (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
|
|
@ -3014,7 +3014,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_uintmax (tem, XUINT (val));
|
||||
mpz_set_uintmax (tem, XUFIXNUM (val));
|
||||
mpz_ior (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
|
|
@ -3026,7 +3026,7 @@ arith_driver (enum arithop code, ptrdiff_t nargs, Lisp_Object *args)
|
|||
{
|
||||
mpz_t tem;
|
||||
mpz_init (tem);
|
||||
mpz_set_uintmax (tem, XUINT (val));
|
||||
mpz_set_uintmax (tem, XUFIXNUM (val));
|
||||
mpz_xor (accum, accum, tem);
|
||||
mpz_clear (tem);
|
||||
}
|
||||
|
|
@ -3059,7 +3059,7 @@ float_arith_driver (double accum, ptrdiff_t argnum, enum arithop code,
|
|||
else
|
||||
{
|
||||
args[argnum] = val; /* runs into a compiler bug. */
|
||||
next = XINT (args[argnum]);
|
||||
next = XFIXNUM (args[argnum]);
|
||||
}
|
||||
switch (code)
|
||||
{
|
||||
|
|
@ -3146,11 +3146,11 @@ Both must be integers or markers. */)
|
|||
|
||||
/* Note that a bignum can never be 0, so we don't need to check that
|
||||
case. */
|
||||
if (FIXNUMP (y) && XINT (y) == 0)
|
||||
if (FIXNUMP (y) && XFIXNUM (y) == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
|
||||
if (FIXNUMP (x) && FIXNUMP (y))
|
||||
XSETINT (val, XINT (x) % XINT (y));
|
||||
XSETINT (val, XFIXNUM (x) % XFIXNUM (y));
|
||||
else
|
||||
{
|
||||
mpz_t xm, ym, *xmp, *ymp;
|
||||
|
|
@ -3161,7 +3161,7 @@ Both must be integers or markers. */)
|
|||
else
|
||||
{
|
||||
mpz_init (xm);
|
||||
mpz_set_intmax (xm, XINT (x));
|
||||
mpz_set_intmax (xm, XFIXNUM (x));
|
||||
xmp = &xm;
|
||||
}
|
||||
|
||||
|
|
@ -3170,7 +3170,7 @@ Both must be integers or markers. */)
|
|||
else
|
||||
{
|
||||
mpz_init (ym);
|
||||
mpz_set_intmax (ym, XINT (y));
|
||||
mpz_set_intmax (ym, XFIXNUM (y));
|
||||
ymp = &ym;
|
||||
}
|
||||
|
||||
|
|
@ -3201,7 +3201,7 @@ Both X and Y must be numbers or markers. */)
|
|||
|
||||
/* Note that a bignum can never be 0, so we don't need to check that
|
||||
case. */
|
||||
if (FIXNUMP (y) && XINT (y) == 0)
|
||||
if (FIXNUMP (y) && XFIXNUM (y) == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
|
||||
if (FLOATP (x) || FLOATP (y))
|
||||
|
|
@ -3209,8 +3209,8 @@ Both X and Y must be numbers or markers. */)
|
|||
|
||||
if (FIXNUMP (x) && FIXNUMP (y))
|
||||
{
|
||||
i1 = XINT (x);
|
||||
i2 = XINT (y);
|
||||
i1 = XFIXNUM (x);
|
||||
i2 = XFIXNUM (y);
|
||||
|
||||
if (i2 == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
|
|
@ -3234,7 +3234,7 @@ Both X and Y must be numbers or markers. */)
|
|||
else
|
||||
{
|
||||
mpz_init (xm);
|
||||
mpz_set_intmax (xm, XINT (x));
|
||||
mpz_set_intmax (xm, XFIXNUM (x));
|
||||
xmp = &xm;
|
||||
}
|
||||
|
||||
|
|
@ -3243,7 +3243,7 @@ Both X and Y must be numbers or markers. */)
|
|||
else
|
||||
{
|
||||
mpz_init (ym);
|
||||
mpz_set_intmax (ym, XINT (y));
|
||||
mpz_set_intmax (ym, XFIXNUM (y));
|
||||
ymp = &ym;
|
||||
}
|
||||
|
||||
|
|
@ -3354,7 +3354,7 @@ representation. */)
|
|||
}
|
||||
|
||||
eassume (FIXNUMP (value));
|
||||
EMACS_INT v = XINT (value) < 0 ? -1 - XINT (value) : XINT (value);
|
||||
EMACS_INT v = XFIXNUM (value) < 0 ? -1 - XFIXNUM (value) : XFIXNUM (value);
|
||||
return make_fixnum (EMACS_UINT_WIDTH <= UINT_WIDTH
|
||||
? count_one_bits (v)
|
||||
: EMACS_UINT_WIDTH <= ULONG_WIDTH
|
||||
|
|
@ -3377,12 +3377,12 @@ ash_lsh_impl (Lisp_Object value, Lisp_Object count, bool lsh)
|
|||
{
|
||||
mpz_t result;
|
||||
mpz_init (result);
|
||||
if (XINT (count) >= 0)
|
||||
mpz_mul_2exp (result, XBIGNUM (value)->value, XINT (count));
|
||||
if (XFIXNUM (count) >= 0)
|
||||
mpz_mul_2exp (result, XBIGNUM (value)->value, XFIXNUM (count));
|
||||
else if (lsh)
|
||||
mpz_tdiv_q_2exp (result, XBIGNUM (value)->value, - XINT (count));
|
||||
mpz_tdiv_q_2exp (result, XBIGNUM (value)->value, - XFIXNUM (count));
|
||||
else
|
||||
mpz_fdiv_q_2exp (result, XBIGNUM (value)->value, - XINT (count));
|
||||
mpz_fdiv_q_2exp (result, XBIGNUM (value)->value, - XFIXNUM (count));
|
||||
val = make_number (result);
|
||||
mpz_clear (result);
|
||||
}
|
||||
|
|
@ -3393,19 +3393,19 @@ ash_lsh_impl (Lisp_Object value, Lisp_Object count, bool lsh)
|
|||
eassume (FIXNUMP (value));
|
||||
mpz_init (result);
|
||||
|
||||
mpz_set_intmax (result, XINT (value));
|
||||
mpz_set_intmax (result, XFIXNUM (value));
|
||||
|
||||
if (XINT (count) >= 0)
|
||||
mpz_mul_2exp (result, result, XINT (count));
|
||||
if (XFIXNUM (count) >= 0)
|
||||
mpz_mul_2exp (result, result, XFIXNUM (count));
|
||||
else if (lsh)
|
||||
{
|
||||
if (mpz_sgn (result) > 0)
|
||||
mpz_fdiv_q_2exp (result, result, - XINT (count));
|
||||
mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
|
||||
else
|
||||
mpz_fdiv_q_2exp (result, result, - XINT (count));
|
||||
mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
|
||||
}
|
||||
else /* ash */
|
||||
mpz_fdiv_q_2exp (result, result, - XINT (count));
|
||||
mpz_fdiv_q_2exp (result, result, - XFIXNUM (count));
|
||||
|
||||
val = make_number (result);
|
||||
mpz_clear (result);
|
||||
|
|
@ -3453,13 +3453,13 @@ Markers are converted to integers. */)
|
|||
else
|
||||
{
|
||||
eassume (FIXNUMP (number));
|
||||
if (XINT (number) < MOST_POSITIVE_FIXNUM)
|
||||
XSETINT (number, XINT (number) + 1);
|
||||
if (XFIXNUM (number) < MOST_POSITIVE_FIXNUM)
|
||||
XSETINT (number, XFIXNUM (number) + 1);
|
||||
else
|
||||
{
|
||||
mpz_t num;
|
||||
mpz_init (num);
|
||||
mpz_set_intmax (num, XINT (number) + 1);
|
||||
mpz_set_intmax (num, XFIXNUM (number) + 1);
|
||||
number = make_number (num);
|
||||
mpz_clear (num);
|
||||
}
|
||||
|
|
@ -3488,13 +3488,13 @@ Markers are converted to integers. */)
|
|||
else
|
||||
{
|
||||
eassume (FIXNUMP (number));
|
||||
if (XINT (number) > MOST_NEGATIVE_FIXNUM)
|
||||
XSETINT (number, XINT (number) - 1);
|
||||
if (XFIXNUM (number) > MOST_NEGATIVE_FIXNUM)
|
||||
XSETINT (number, XFIXNUM (number) - 1);
|
||||
else
|
||||
{
|
||||
mpz_t num;
|
||||
mpz_init (num);
|
||||
mpz_set_intmax (num, XINT (number) - 1);
|
||||
mpz_set_intmax (num, XFIXNUM (number) - 1);
|
||||
number = make_number (num);
|
||||
mpz_clear (num);
|
||||
}
|
||||
|
|
@ -3518,7 +3518,7 @@ DEFUN ("lognot", Flognot, Slognot, 1, 1, 0,
|
|||
else
|
||||
{
|
||||
eassume (FIXNUMP (number));
|
||||
XSETINT (number, ~XINT (number));
|
||||
XSETINT (number, ~XFIXNUM (number));
|
||||
}
|
||||
return number;
|
||||
}
|
||||
|
|
@ -3908,13 +3908,13 @@ A is a bool vector, B is t or nil, and I is an index into A. */)
|
|||
CHECK_FIXNAT (i);
|
||||
|
||||
nr_bits = bool_vector_size (a);
|
||||
if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */
|
||||
if (XFIXNAT (i) > nr_bits) /* Allow one past the end for convenience */
|
||||
args_out_of_range (a, i);
|
||||
|
||||
adata = bool_vector_data (a);
|
||||
nr_words = bool_vector_words (nr_bits);
|
||||
pos = XFASTINT (i) / BITS_PER_BITS_WORD;
|
||||
offset = XFASTINT (i) % BITS_PER_BITS_WORD;
|
||||
pos = XFIXNAT (i) / BITS_PER_BITS_WORD;
|
||||
offset = XFIXNAT (i) % BITS_PER_BITS_WORD;
|
||||
count = 0;
|
||||
|
||||
/* By XORing with twiddle, we transform the problem of "count
|
||||
|
|
|
|||
|
|
@ -522,8 +522,8 @@ xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi)
|
|||
CHECK_FIXNUM_OR_FLOAT (x);
|
||||
if (FIXNUMP (x))
|
||||
{
|
||||
if (lo <= XINT (x) && XINT (x) <= hi)
|
||||
return XINT (x);
|
||||
if (lo <= XFIXNUM (x) && XFIXNUM (x) <= hi)
|
||||
return XFIXNUM (x);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -550,8 +550,8 @@ xd_extract_unsigned (Lisp_Object x, uintmax_t hi)
|
|||
CHECK_FIXNUM_OR_FLOAT (x);
|
||||
if (FIXNUMP (x))
|
||||
{
|
||||
if (0 <= XINT (x) && XINT (x) <= hi)
|
||||
return XINT (x);
|
||||
if (0 <= XFIXNUM (x) && XFIXNUM (x) <= hi)
|
||||
return XFIXNUM (x);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -586,7 +586,7 @@ xd_append_arg (int dtype, Lisp_Object object, DBusMessageIter *iter)
|
|||
case DBUS_TYPE_BYTE:
|
||||
CHECK_FIXNAT (object);
|
||||
{
|
||||
unsigned char val = XFASTINT (object) & 0xFF;
|
||||
unsigned char val = XFIXNAT (object) & 0xFF;
|
||||
XD_DEBUG_MESSAGE ("%c %u", dtype, val);
|
||||
if (!dbus_message_iter_append_basic (iter, dtype, &val))
|
||||
XD_SIGNAL2 (build_string ("Unable to append argument"), object);
|
||||
|
|
@ -1276,10 +1276,10 @@ usage: (dbus-message-internal &rest REST) */)
|
|||
handler = Qnil;
|
||||
|
||||
CHECK_FIXNAT (message_type);
|
||||
if (! (DBUS_MESSAGE_TYPE_INVALID < XFASTINT (message_type)
|
||||
&& XFASTINT (message_type) < DBUS_NUM_MESSAGE_TYPES))
|
||||
if (! (DBUS_MESSAGE_TYPE_INVALID < XFIXNAT (message_type)
|
||||
&& XFIXNAT (message_type) < DBUS_NUM_MESSAGE_TYPES))
|
||||
XD_SIGNAL2 (build_string ("Invalid message type"), message_type);
|
||||
mtype = XFASTINT (message_type);
|
||||
mtype = XFIXNAT (message_type);
|
||||
|
||||
if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
|
||||
|| (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
|
||||
|
|
@ -1410,7 +1410,7 @@ usage: (dbus-message-internal &rest REST) */)
|
|||
if ((count + 2 <= nargs) && EQ (args[count], QCtimeout))
|
||||
{
|
||||
CHECK_FIXNAT (args[count+1]);
|
||||
timeout = min (XFASTINT (args[count+1]), INT_MAX);
|
||||
timeout = min (XFIXNAT (args[count+1]), INT_MAX);
|
||||
count = count+2;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,8 +149,8 @@ This function can be called only in unibyte buffers. */)
|
|||
|
||||
/* This is a unibyte buffer, so character positions and bytes are
|
||||
the same. */
|
||||
istart = XINT (start);
|
||||
iend = XINT (end);
|
||||
istart = XFIXNUM (start);
|
||||
iend = XFIXNUM (end);
|
||||
|
||||
/* Do the following before manipulating the gap. */
|
||||
modify_text (istart, iend);
|
||||
|
|
|
|||
|
|
@ -704,7 +704,7 @@ file_name_completion (Lisp_Object file, Lisp_Object dirname, bool all_flag,
|
|||
= Fcompare_strings (bestmatch, zero, make_fixnum (compare),
|
||||
name, zero, make_fixnum (compare),
|
||||
completion_ignore_case ? Qt : Qnil);
|
||||
ptrdiff_t matchsize = EQ (cmp, Qt) ? compare : eabs (XINT (cmp)) - 1;
|
||||
ptrdiff_t matchsize = EQ (cmp, Qt) ? compare : eabs (XFIXNUM (cmp)) - 1;
|
||||
|
||||
if (completion_ignore_case)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -306,24 +306,24 @@ INLINE int
|
|||
GLYPH_CODE_CHAR (Lisp_Object gc)
|
||||
{
|
||||
return (CONSP (gc)
|
||||
? XINT (XCAR (gc))
|
||||
: XINT (gc) & MAX_CHAR);
|
||||
? XFIXNUM (XCAR (gc))
|
||||
: XFIXNUM (gc) & MAX_CHAR);
|
||||
}
|
||||
|
||||
INLINE int
|
||||
GLYPH_CODE_FACE (Lisp_Object gc)
|
||||
{
|
||||
return CONSP (gc) ? XINT (XCDR (gc)) : XINT (gc) >> CHARACTERBITS;
|
||||
return CONSP (gc) ? XFIXNUM (XCDR (gc)) : XFIXNUM (gc) >> CHARACTERBITS;
|
||||
}
|
||||
|
||||
#define SET_GLYPH_FROM_GLYPH_CODE(glyph, gc) \
|
||||
do \
|
||||
{ \
|
||||
if (CONSP (gc)) \
|
||||
SET_GLYPH (glyph, XINT (XCAR (gc)), XINT (XCDR (gc))); \
|
||||
SET_GLYPH (glyph, XFIXNUM (XCAR (gc)), XFIXNUM (XCDR (gc))); \
|
||||
else \
|
||||
SET_GLYPH (glyph, (XINT (gc) & ((1 << CHARACTERBITS)-1)), \
|
||||
(XINT (gc) >> CHARACTERBITS)); \
|
||||
SET_GLYPH (glyph, (XFIXNUM (gc) & ((1 << CHARACTERBITS)-1)), \
|
||||
(XFIXNUM (gc) >> CHARACTERBITS)); \
|
||||
} \
|
||||
while (false)
|
||||
|
||||
|
|
|
|||
|
|
@ -5718,7 +5718,7 @@ additional wait period, in milliseconds; this is for backwards compatibility.
|
|||
if (!NILP (milliseconds))
|
||||
{
|
||||
CHECK_FIXNUM (milliseconds);
|
||||
duration += XINT (milliseconds) / 1000.0;
|
||||
duration += XFIXNUM (milliseconds) / 1000.0;
|
||||
}
|
||||
|
||||
if (duration > 0)
|
||||
|
|
@ -5768,7 +5768,7 @@ sit_for (Lisp_Object timeout, bool reading, int display_option)
|
|||
|
||||
if (FIXNUMP (timeout))
|
||||
{
|
||||
sec = XINT (timeout);
|
||||
sec = XFIXNUM (timeout);
|
||||
if (sec <= 0)
|
||||
return Qt;
|
||||
nsec = 0;
|
||||
|
|
|
|||
|
|
@ -79,7 +79,7 @@ extern struct Lisp_Char_Table *buffer_display_table (void);
|
|||
#define GLYPH_FOLLOW_ALIASES(base, length, g) \
|
||||
do { \
|
||||
while (GLYPH_ALIAS_P ((base), (length), (g))) \
|
||||
SET_GLYPH_CHAR ((g), XINT ((base)[GLYPH_CHAR (g)])); \
|
||||
SET_GLYPH_CHAR ((g), XFIXNUM ((base)[GLYPH_CHAR (g)])); \
|
||||
if (!GLYPH_CHAR_VALID_P (g)) \
|
||||
SET_GLYPH_CHAR (g, ' '); \
|
||||
} while (false)
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ get_doc_string (Lisp_Object filepos, bool unibyte, bool definition)
|
|||
else
|
||||
return Qnil;
|
||||
|
||||
position = eabs (XINT (pos));
|
||||
position = eabs (XFIXNUM (pos));
|
||||
|
||||
if (!STRINGP (Vdoc_directory))
|
||||
return Qnil;
|
||||
|
|
|
|||
28
src/dosfns.c
28
src/dosfns.c
|
|
@ -67,21 +67,21 @@ REGISTERS should be a vector produced by `make-register' and
|
|||
union REGS inregs, outregs;
|
||||
|
||||
CHECK_FIXNUM (interrupt);
|
||||
no = (unsigned long) XINT (interrupt);
|
||||
no = (unsigned long) XFIXNUM (interrupt);
|
||||
CHECK_VECTOR (registers);
|
||||
if (no < 0 || no > 0xff || ASIZE (registers) != 8)
|
||||
return Qnil;
|
||||
for (i = 0; i < 8; i++)
|
||||
CHECK_FIXNUM (AREF (registers, i));
|
||||
|
||||
inregs.x.ax = (unsigned long) XFASTINT (AREF (registers, 0));
|
||||
inregs.x.bx = (unsigned long) XFASTINT (AREF (registers, 1));
|
||||
inregs.x.cx = (unsigned long) XFASTINT (AREF (registers, 2));
|
||||
inregs.x.dx = (unsigned long) XFASTINT (AREF (registers, 3));
|
||||
inregs.x.si = (unsigned long) XFASTINT (AREF (registers, 4));
|
||||
inregs.x.di = (unsigned long) XFASTINT (AREF (registers, 5));
|
||||
inregs.x.cflag = (unsigned long) XFASTINT (AREF (registers, 6));
|
||||
inregs.x.flags = (unsigned long) XFASTINT (AREF (registers, 7));
|
||||
inregs.x.ax = (unsigned long) XFIXNAT (AREF (registers, 0));
|
||||
inregs.x.bx = (unsigned long) XFIXNAT (AREF (registers, 1));
|
||||
inregs.x.cx = (unsigned long) XFIXNAT (AREF (registers, 2));
|
||||
inregs.x.dx = (unsigned long) XFIXNAT (AREF (registers, 3));
|
||||
inregs.x.si = (unsigned long) XFIXNAT (AREF (registers, 4));
|
||||
inregs.x.di = (unsigned long) XFIXNAT (AREF (registers, 5));
|
||||
inregs.x.cflag = (unsigned long) XFIXNAT (AREF (registers, 6));
|
||||
inregs.x.flags = (unsigned long) XFIXNAT (AREF (registers, 7));
|
||||
|
||||
int86 (no, &inregs, &outregs);
|
||||
|
||||
|
|
@ -107,7 +107,7 @@ Return the updated VECTOR. */)
|
|||
char *buf;
|
||||
|
||||
CHECK_FIXNUM (address);
|
||||
offs = (unsigned long) XINT (address);
|
||||
offs = (unsigned long) XFIXNUM (address);
|
||||
CHECK_VECTOR (vector);
|
||||
len = ASIZE (vector);
|
||||
if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
|
||||
|
|
@ -130,7 +130,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
|
|||
char *buf;
|
||||
|
||||
CHECK_FIXNUM (address);
|
||||
offs = (unsigned long) XINT (address);
|
||||
offs = (unsigned long) XFIXNUM (address);
|
||||
CHECK_VECTOR (vector);
|
||||
len = ASIZE (vector);
|
||||
if (len < 1 || len > 2048 || offs < 0 || offs > 0xfffff - len)
|
||||
|
|
@ -140,7 +140,7 @@ DEFUN ("msdos-memput", Fdos_memput, Sdos_memput, 2, 2, 0,
|
|||
for (i = 0; i < len; i++)
|
||||
{
|
||||
CHECK_FIXNUM (AREF (vector, i));
|
||||
buf[i] = (unsigned char) XFASTINT (AREF (vector, i)) & 0xFF;
|
||||
buf[i] = (unsigned char) XFIXNAT (AREF (vector, i)) & 0xFF;
|
||||
}
|
||||
|
||||
dosmemput (buf, len, offs);
|
||||
|
|
@ -155,7 +155,7 @@ The current keyboard layout is available in dos-keyboard-code. */)
|
|||
(Lisp_Object country_code, Lisp_Object allkeys)
|
||||
{
|
||||
CHECK_FIXNUM (country_code);
|
||||
if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys)))
|
||||
if (!dos_set_keyboard (XFIXNUM (country_code), !NILP (allkeys)))
|
||||
return Qnil;
|
||||
return Qt;
|
||||
}
|
||||
|
|
@ -521,7 +521,7 @@ system_process_attributes (Lisp_Object pid)
|
|||
Lisp_Object attrs = Qnil;
|
||||
|
||||
CHECK_FIXNUM_OR_FLOAT (pid);
|
||||
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
|
||||
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XFIXNUM (pid);
|
||||
|
||||
if (proc_id == getpid ())
|
||||
{
|
||||
|
|
|
|||
202
src/editfns.c
202
src/editfns.c
|
|
@ -181,7 +181,7 @@ tzlookup (Lisp_Object zone, bool settz)
|
|||
zone = XCAR (zone);
|
||||
}
|
||||
|
||||
EMACS_INT abszone = eabs (XINT (zone)), hour = abszone / (60 * 60);
|
||||
EMACS_INT abszone = eabs (XFIXNUM (zone)), hour = abszone / (60 * 60);
|
||||
int hour_remainder = abszone % (60 * 60);
|
||||
int min = hour_remainder / 60, sec = hour_remainder % 60;
|
||||
|
||||
|
|
@ -196,8 +196,8 @@ tzlookup (Lisp_Object zone, bool settz)
|
|||
prec += 2, numzone = 100 * numzone + sec;
|
||||
}
|
||||
sprintf (tzbuf, tzbuf_format, prec,
|
||||
XINT (zone) < 0 ? -numzone : numzone,
|
||||
&"-"[XINT (zone) < 0], hour, min, sec);
|
||||
XFIXNUM (zone) < 0 ? -numzone : numzone,
|
||||
&"-"[XFIXNUM (zone) < 0], hour, min, sec);
|
||||
zone_string = tzbuf;
|
||||
}
|
||||
else
|
||||
|
|
@ -205,7 +205,7 @@ tzlookup (Lisp_Object zone, bool settz)
|
|||
AUTO_STRING (leading, "<");
|
||||
AUTO_STRING_WITH_LEN (trailing, tzbuf,
|
||||
sprintf (tzbuf, trailing_tzbuf_format,
|
||||
&"-"[XINT (zone) < 0],
|
||||
&"-"[XFIXNUM (zone) < 0],
|
||||
hour, min, sec));
|
||||
zone_string = SSDATA (concat3 (leading, ENCODE_SYSTEM (abbr),
|
||||
trailing));
|
||||
|
|
@ -217,11 +217,11 @@ tzlookup (Lisp_Object zone, bool settz)
|
|||
new_tz = tzalloc (zone_string);
|
||||
|
||||
if (HAVE_TZALLOC_BUG && !new_tz && errno != ENOMEM && plain_integer
|
||||
&& XINT (zone) % (60 * 60) == 0)
|
||||
&& XFIXNUM (zone) % (60 * 60) == 0)
|
||||
{
|
||||
/* tzalloc mishandles POSIX strings; fall back on tzdb if
|
||||
possible (Bug#30738). */
|
||||
sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XINT (zone) / (60 * 60)));
|
||||
sprintf (tzbuf, "Etc/GMT%+"pI"d", - (XFIXNUM (zone) / (60 * 60)));
|
||||
new_tz = tzalloc (zone_string);
|
||||
}
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ usage: (char-to-string CHAR) */)
|
|||
unsigned char str[MAX_MULTIBYTE_LENGTH];
|
||||
|
||||
CHECK_CHARACTER (character);
|
||||
c = XFASTINT (character);
|
||||
c = XFIXNAT (character);
|
||||
|
||||
len = CHAR_STRING (c, str);
|
||||
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,
|
|||
{
|
||||
unsigned char b;
|
||||
CHECK_FIXNUM (byte);
|
||||
if (XINT (byte) < 0 || XINT (byte) > 255)
|
||||
if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255)
|
||||
error ("Invalid byte");
|
||||
b = XINT (byte);
|
||||
b = XFIXNUM (byte);
|
||||
return make_string_from_bytes ((char *) &b, 1, 1);
|
||||
}
|
||||
|
||||
|
|
@ -422,7 +422,7 @@ The return value is POSITION. */)
|
|||
if (MARKERP (position))
|
||||
set_point_from_marker (position);
|
||||
else if (FIXNUMP (position))
|
||||
SET_PT (clip_to_bounds (BEGV, XINT (position), ZV));
|
||||
SET_PT (clip_to_bounds (BEGV, XFIXNUM (position), ZV));
|
||||
else
|
||||
wrong_type_argument (Qinteger_or_marker_p, position);
|
||||
return position;
|
||||
|
|
@ -448,9 +448,9 @@ region_limit (bool beginningp)
|
|||
error ("The mark is not set now, so there is no region");
|
||||
|
||||
/* Clip to the current narrowing (bug#11770). */
|
||||
return make_fixnum ((PT < XFASTINT (m)) == beginningp
|
||||
return make_fixnum ((PT < XFIXNAT (m)) == beginningp
|
||||
? PT
|
||||
: clip_to_bounds (BEGV, XFASTINT (m), ZV));
|
||||
: clip_to_bounds (BEGV, XFIXNAT (m), ZV));
|
||||
}
|
||||
|
||||
DEFUN ("region-beginning", Fregion_beginning, Sregion_beginning, 0, 0, 0,
|
||||
|
|
@ -553,7 +553,7 @@ at POSITION. */)
|
|||
return Fget_text_property (position, prop, object);
|
||||
else
|
||||
{
|
||||
EMACS_INT posn = XINT (position);
|
||||
EMACS_INT posn = XFIXNUM (position);
|
||||
ptrdiff_t noverlays;
|
||||
Lisp_Object *overlay_vec, tem;
|
||||
struct buffer *obuf = current_buffer;
|
||||
|
|
@ -606,8 +606,8 @@ at POSITION. */)
|
|||
if (stickiness > 0)
|
||||
return Fget_text_property (position, prop, object);
|
||||
else if (stickiness < 0
|
||||
&& XINT (position) > BUF_BEGV (XBUFFER (object)))
|
||||
return Fget_text_property (make_fixnum (XINT (position) - 1),
|
||||
&& XFIXNUM (position) > BUF_BEGV (XBUFFER (object)))
|
||||
return Fget_text_property (make_fixnum (XFIXNUM (position) - 1),
|
||||
prop, object);
|
||||
else
|
||||
return Qnil;
|
||||
|
|
@ -655,8 +655,8 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
|
|||
after_field
|
||||
= get_char_property_and_overlay (pos, Qfield, Qnil, NULL);
|
||||
before_field
|
||||
= (XFASTINT (pos) > BEGV
|
||||
? get_char_property_and_overlay (make_fixnum (XINT (pos) - 1),
|
||||
= (XFIXNAT (pos) > BEGV
|
||||
? get_char_property_and_overlay (make_fixnum (XFIXNUM (pos) - 1),
|
||||
Qfield, Qnil, NULL)
|
||||
/* Using nil here would be a more obvious choice, but it would
|
||||
fail when the buffer starts with a non-sticky field. */
|
||||
|
|
@ -710,7 +710,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
|
|||
if (at_field_start)
|
||||
/* POS is at the edge of a field, and we should consider it as
|
||||
the beginning of the following field. */
|
||||
*beg = XFASTINT (pos);
|
||||
*beg = XFIXNAT (pos);
|
||||
else
|
||||
/* Find the previous field boundary. */
|
||||
{
|
||||
|
|
@ -722,7 +722,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
|
|||
|
||||
p = Fprevious_single_char_property_change (p, Qfield, Qnil,
|
||||
beg_limit);
|
||||
*beg = NILP (p) ? BEGV : XFASTINT (p);
|
||||
*beg = NILP (p) ? BEGV : XFIXNAT (p);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -731,7 +731,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
|
|||
if (at_field_end)
|
||||
/* POS is at the edge of a field, and we should consider it as
|
||||
the end of the previous field. */
|
||||
*end = XFASTINT (pos);
|
||||
*end = XFIXNAT (pos);
|
||||
else
|
||||
/* Find the next field boundary. */
|
||||
{
|
||||
|
|
@ -742,7 +742,7 @@ find_field (Lisp_Object pos, Lisp_Object merge_at_boundary,
|
|||
|
||||
pos = Fnext_single_char_property_change (pos, Qfield, Qnil,
|
||||
end_limit);
|
||||
*end = NILP (pos) ? ZV : XFASTINT (pos);
|
||||
*end = NILP (pos) ? ZV : XFIXNAT (pos);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -859,10 +859,10 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
|
|||
CHECK_FIXNUM_COERCE_MARKER (new_pos);
|
||||
CHECK_FIXNUM_COERCE_MARKER (old_pos);
|
||||
|
||||
fwd = (XINT (new_pos) > XINT (old_pos));
|
||||
fwd = (XFIXNUM (new_pos) > XFIXNUM (old_pos));
|
||||
|
||||
prev_old = make_fixnum (XINT (old_pos) - 1);
|
||||
prev_new = make_fixnum (XINT (new_pos) - 1);
|
||||
prev_old = make_fixnum (XFIXNUM (old_pos) - 1);
|
||||
prev_new = make_fixnum (XFIXNUM (new_pos) - 1);
|
||||
|
||||
if (NILP (Vinhibit_field_text_motion)
|
||||
&& !EQ (new_pos, old_pos)
|
||||
|
|
@ -872,16 +872,16 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
|
|||
previous positions; we could use `Fget_pos_property'
|
||||
instead, but in itself that would fail inside non-sticky
|
||||
fields (like comint prompts). */
|
||||
|| (XFASTINT (new_pos) > BEGV
|
||||
|| (XFIXNAT (new_pos) > BEGV
|
||||
&& !NILP (Fget_char_property (prev_new, Qfield, Qnil)))
|
||||
|| (XFASTINT (old_pos) > BEGV
|
||||
|| (XFIXNAT (old_pos) > BEGV
|
||||
&& !NILP (Fget_char_property (prev_old, Qfield, Qnil))))
|
||||
&& (NILP (inhibit_capture_property)
|
||||
/* Field boundaries are again a problem; but now we must
|
||||
decide the case exactly, so we need to call
|
||||
`get_pos_property' as well. */
|
||||
|| (NILP (Fget_pos_property (old_pos, inhibit_capture_property, Qnil))
|
||||
&& (XFASTINT (old_pos) <= BEGV
|
||||
&& (XFIXNAT (old_pos) <= BEGV
|
||||
|| NILP (Fget_char_property
|
||||
(old_pos, inhibit_capture_property, Qnil))
|
||||
|| NILP (Fget_char_property
|
||||
|
|
@ -901,7 +901,7 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */)
|
|||
other side of NEW_POS, which would mean that NEW_POS is
|
||||
already acceptable, and it's not necessary to constrain it
|
||||
to FIELD_BOUND. */
|
||||
((XFASTINT (field_bound) < XFASTINT (new_pos)) ? fwd : !fwd)
|
||||
((XFIXNAT (field_bound) < XFIXNAT (new_pos)) ? fwd : !fwd)
|
||||
/* NEW_POS should be constrained, but only if either
|
||||
ONLY_IN_LINE is nil (in which case any constraint is OK),
|
||||
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. */)
|
|||
/* This is the ONLY_IN_LINE case, check that NEW_POS and
|
||||
FIELD_BOUND are on the same line by seeing whether
|
||||
there's an intervening newline or not. */
|
||||
|| (find_newline (XFASTINT (new_pos), -1,
|
||||
XFASTINT (field_bound), -1,
|
||||
|| (find_newline (XFIXNAT (new_pos), -1,
|
||||
XFIXNAT (field_bound), -1,
|
||||
fwd ? -1 : 1, &shortage, NULL, 1),
|
||||
shortage != 0)))
|
||||
/* Constrain NEW_POS to FIELD_BOUND. */
|
||||
new_pos = field_bound;
|
||||
|
||||
if (orig_point && XFASTINT (new_pos) != orig_point)
|
||||
if (orig_point && XFIXNAT (new_pos) != orig_point)
|
||||
/* The NEW_POS argument was originally nil, so automatically set PT. */
|
||||
SET_PT (XFASTINT (new_pos));
|
||||
SET_PT (XFIXNAT (new_pos));
|
||||
}
|
||||
|
||||
return new_pos;
|
||||
|
|
@ -952,11 +952,11 @@ This function does not move point. */)
|
|||
else
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
scan_newline_from_point (XINT (n) - 1, &charpos, &bytepos);
|
||||
scan_newline_from_point (XFIXNUM (n) - 1, &charpos, &bytepos);
|
||||
|
||||
/* Return END constrained to the current input field. */
|
||||
return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT),
|
||||
XINT (n) != 1 ? Qt : Qnil,
|
||||
XFIXNUM (n) != 1 ? Qt : Qnil,
|
||||
Qt, Qnil);
|
||||
}
|
||||
|
||||
|
|
@ -987,7 +987,7 @@ This function does not move point. */)
|
|||
else
|
||||
CHECK_FIXNUM (n);
|
||||
|
||||
clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX);
|
||||
clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XFIXNUM (n), PTRDIFF_MAX);
|
||||
end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0),
|
||||
NULL);
|
||||
|
||||
|
|
@ -1161,9 +1161,9 @@ If POSITION is out of range, the value is nil. */)
|
|||
(Lisp_Object position)
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (position);
|
||||
if (XINT (position) < BEG || XINT (position) > Z)
|
||||
if (XFIXNUM (position) < BEG || XFIXNUM (position) > Z)
|
||||
return Qnil;
|
||||
return make_fixnum (CHAR_TO_BYTE (XINT (position)));
|
||||
return make_fixnum (CHAR_TO_BYTE (XFIXNUM (position)));
|
||||
}
|
||||
|
||||
DEFUN ("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. */)
|
|||
ptrdiff_t pos_byte;
|
||||
|
||||
CHECK_FIXNUM (bytepos);
|
||||
pos_byte = XINT (bytepos);
|
||||
pos_byte = XFIXNUM (bytepos);
|
||||
if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE)
|
||||
return Qnil;
|
||||
if (Z != Z_BYTE)
|
||||
|
|
@ -1281,10 +1281,10 @@ If POS is out of range, the value is nil. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (pos);
|
||||
if (XINT (pos) < BEGV || XINT (pos) >= ZV)
|
||||
if (XFIXNUM (pos) < BEGV || XFIXNUM (pos) >= ZV)
|
||||
return Qnil;
|
||||
|
||||
pos_byte = CHAR_TO_BYTE (XINT (pos));
|
||||
pos_byte = CHAR_TO_BYTE (XFIXNUM (pos));
|
||||
}
|
||||
|
||||
return make_fixnum (FETCH_CHAR (pos_byte));
|
||||
|
|
@ -1316,10 +1316,10 @@ If POS is out of range, the value is nil. */)
|
|||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (pos);
|
||||
|
||||
if (XINT (pos) <= BEGV || XINT (pos) > ZV)
|
||||
if (XFIXNUM (pos) <= BEGV || XFIXNUM (pos) > ZV)
|
||||
return Qnil;
|
||||
|
||||
pos_byte = CHAR_TO_BYTE (XINT (pos));
|
||||
pos_byte = CHAR_TO_BYTE (XFIXNUM (pos));
|
||||
}
|
||||
|
||||
if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
|
|
@ -1847,10 +1847,10 @@ decode_time_components (Lisp_Object high, Lisp_Object low, Lisp_Object usec,
|
|||
return 0;
|
||||
}
|
||||
|
||||
hi = XINT (high);
|
||||
lo = XINT (low);
|
||||
us = XINT (usec);
|
||||
ps = XINT (psec);
|
||||
hi = XFIXNUM (high);
|
||||
lo = XFIXNUM (low);
|
||||
us = XFIXNUM (usec);
|
||||
ps = XFIXNUM (psec);
|
||||
|
||||
/* Normalize out-of-range lower-order components by carrying
|
||||
each overflow into the next higher-order component. */
|
||||
|
|
@ -2207,7 +2207,7 @@ static int
|
|||
check_tm_member (Lisp_Object obj, int offset)
|
||||
{
|
||||
CHECK_FIXNUM (obj);
|
||||
EMACS_INT n = XINT (obj);
|
||||
EMACS_INT n = XFIXNUM (obj);
|
||||
int result;
|
||||
if (INT_SUBTRACT_WRAPV (n, offset, &result))
|
||||
time_overflow ();
|
||||
|
|
@ -2532,7 +2532,7 @@ general_insert_function (void (*insert_func)
|
|||
val = args[argnum];
|
||||
if (CHARACTERP (val))
|
||||
{
|
||||
int c = XFASTINT (val);
|
||||
int c = XFIXNAT (val);
|
||||
unsigned char str[MAX_MULTIBYTE_LENGTH];
|
||||
int len;
|
||||
|
||||
|
|
@ -2689,17 +2689,17 @@ called interactively, INHERIT is t. */)
|
|||
if (NILP (count))
|
||||
XSETFASTINT (count, 1);
|
||||
CHECK_FIXNUM (count);
|
||||
c = XFASTINT (character);
|
||||
c = XFIXNAT (character);
|
||||
|
||||
if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
len = CHAR_STRING (c, str);
|
||||
else
|
||||
str[0] = c, len = 1;
|
||||
if (XINT (count) <= 0)
|
||||
if (XFIXNUM (count) <= 0)
|
||||
return Qnil;
|
||||
if (BUF_BYTES_MAX / len < XINT (count))
|
||||
if (BUF_BYTES_MAX / len < XFIXNUM (count))
|
||||
buffer_overflow ();
|
||||
n = XINT (count) * len;
|
||||
n = XFIXNUM (count) * len;
|
||||
stringlen = min (n, sizeof string - sizeof string % len);
|
||||
for (i = 0; i < stringlen; i++)
|
||||
string[i] = str[i % len];
|
||||
|
|
@ -2733,11 +2733,11 @@ from adjoining text, if those properties are sticky. */)
|
|||
(Lisp_Object byte, Lisp_Object count, Lisp_Object inherit)
|
||||
{
|
||||
CHECK_FIXNUM (byte);
|
||||
if (XINT (byte) < 0 || XINT (byte) > 255)
|
||||
if (XFIXNUM (byte) < 0 || XFIXNUM (byte) > 255)
|
||||
args_out_of_range_3 (byte, make_fixnum (0), make_fixnum (255));
|
||||
if (XINT (byte) >= 128
|
||||
if (XFIXNUM (byte) >= 128
|
||||
&& ! NILP (BVAR (current_buffer, enable_multibyte_characters)))
|
||||
XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte)));
|
||||
XSETFASTINT (byte, BYTE8_TO_CHAR (XFIXNUM (byte)));
|
||||
return Finsert_char (byte, count, inherit);
|
||||
}
|
||||
|
||||
|
|
@ -2823,7 +2823,7 @@ make_buffer_string_both (ptrdiff_t start, ptrdiff_t start_byte,
|
|||
tem = Fnext_property_change (make_fixnum (start), Qnil, make_fixnum (end));
|
||||
tem1 = Ftext_properties_at (make_fixnum (start), Qnil);
|
||||
|
||||
if (XINT (tem) != end || !NILP (tem1))
|
||||
if (XFIXNUM (tem) != end || !NILP (tem1))
|
||||
copy_intervals_to_string (result, current_buffer, start,
|
||||
end - start);
|
||||
}
|
||||
|
|
@ -2872,8 +2872,8 @@ use `buffer-substring-no-properties' instead. */)
|
|||
register ptrdiff_t b, e;
|
||||
|
||||
validate_region (&start, &end);
|
||||
b = XINT (start);
|
||||
e = XINT (end);
|
||||
b = XFIXNUM (start);
|
||||
e = XFIXNUM (end);
|
||||
|
||||
return make_buffer_string (b, e, 1);
|
||||
}
|
||||
|
|
@ -2888,8 +2888,8 @@ they can be in either order. */)
|
|||
register ptrdiff_t b, e;
|
||||
|
||||
validate_region (&start, &end);
|
||||
b = XINT (start);
|
||||
e = XINT (end);
|
||||
b = XFIXNUM (start);
|
||||
e = XFIXNUM (end);
|
||||
|
||||
return make_buffer_string (b, e, 0);
|
||||
}
|
||||
|
|
@ -2935,14 +2935,14 @@ using `string-make-multibyte' or `string-make-unibyte', which see. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start);
|
||||
b = XINT (start);
|
||||
b = XFIXNUM (start);
|
||||
}
|
||||
if (NILP (end))
|
||||
e = BUF_ZV (bp);
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (end);
|
||||
e = XINT (end);
|
||||
e = XFIXNUM (end);
|
||||
}
|
||||
|
||||
if (b > e)
|
||||
|
|
@ -3003,14 +3003,14 @@ determines whether case is significant or ignored. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start1);
|
||||
begp1 = XINT (start1);
|
||||
begp1 = XFIXNUM (start1);
|
||||
}
|
||||
if (NILP (end1))
|
||||
endp1 = BUF_ZV (bp1);
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (end1);
|
||||
endp1 = XINT (end1);
|
||||
endp1 = XFIXNUM (end1);
|
||||
}
|
||||
|
||||
if (begp1 > endp1)
|
||||
|
|
@ -3041,14 +3041,14 @@ determines whether case is significant or ignored. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start2);
|
||||
begp2 = XINT (start2);
|
||||
begp2 = XFIXNUM (start2);
|
||||
}
|
||||
if (NILP (end2))
|
||||
endp2 = BUF_ZV (bp2);
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (end2);
|
||||
endp2 = XINT (end2);
|
||||
endp2 = XFIXNUM (end2);
|
||||
}
|
||||
|
||||
if (begp2 > endp2)
|
||||
|
|
@ -3439,8 +3439,8 @@ Both characters must have the same length of multi-byte form. */)
|
|||
validate_region (&start, &end);
|
||||
CHECK_CHARACTER (fromchar);
|
||||
CHECK_CHARACTER (tochar);
|
||||
fromc = XFASTINT (fromchar);
|
||||
toc = XFASTINT (tochar);
|
||||
fromc = XFIXNAT (fromchar);
|
||||
toc = XFIXNAT (tochar);
|
||||
|
||||
if (multibyte_p)
|
||||
{
|
||||
|
|
@ -3466,9 +3466,9 @@ Both characters must have the same length of multi-byte form. */)
|
|||
tostr[0] = toc;
|
||||
}
|
||||
|
||||
pos = XINT (start);
|
||||
pos = XFIXNUM (start);
|
||||
pos_byte = CHAR_TO_BYTE (pos);
|
||||
stop = CHAR_TO_BYTE (XINT (end));
|
||||
stop = CHAR_TO_BYTE (XFIXNUM (end));
|
||||
end_byte = stop;
|
||||
|
||||
/* 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. */)
|
|||
else if (!changed)
|
||||
{
|
||||
changed = -1;
|
||||
modify_text (pos, XINT (end));
|
||||
modify_text (pos, XFIXNUM (end));
|
||||
|
||||
if (! NILP (noundo))
|
||||
{
|
||||
|
|
@ -3639,7 +3639,7 @@ check_translation (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t end,
|
|||
buf[buf_used++] = STRING_CHAR_AND_LENGTH (p, len1);
|
||||
pos_byte += len1;
|
||||
}
|
||||
if (XINT (AREF (elt, i)) != buf[i])
|
||||
if (XFIXNUM (AREF (elt, i)) != buf[i])
|
||||
break;
|
||||
}
|
||||
if (i == len)
|
||||
|
|
@ -3691,9 +3691,9 @@ It returns the number of characters changed. */)
|
|||
tt = SDATA (table);
|
||||
}
|
||||
|
||||
pos = XINT (start);
|
||||
pos = XFIXNUM (start);
|
||||
pos_byte = CHAR_TO_BYTE (pos);
|
||||
end_pos = XINT (end);
|
||||
end_pos = XFIXNUM (end);
|
||||
modify_text (pos, end_pos);
|
||||
|
||||
cnt = 0;
|
||||
|
|
@ -3742,7 +3742,7 @@ It returns the number of characters changed. */)
|
|||
val = CHAR_TABLE_REF (table, oc);
|
||||
if (CHARACTERP (val))
|
||||
{
|
||||
nc = XFASTINT (val);
|
||||
nc = XFIXNAT (val);
|
||||
str_len = CHAR_STRING (nc, buf);
|
||||
str = buf;
|
||||
}
|
||||
|
|
@ -3827,7 +3827,7 @@ This command deletes buffer text without modifying the kill ring. */)
|
|||
(Lisp_Object start, Lisp_Object end)
|
||||
{
|
||||
validate_region (&start, &end);
|
||||
del_range (XINT (start), XINT (end));
|
||||
del_range (XFIXNUM (start), XFIXNUM (end));
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -3837,9 +3837,9 @@ DEFUN ("delete-and-extract-region", Fdelete_and_extract_region,
|
|||
(Lisp_Object start, Lisp_Object end)
|
||||
{
|
||||
validate_region (&start, &end);
|
||||
if (XINT (start) == XINT (end))
|
||||
if (XFIXNUM (start) == XFIXNUM (end))
|
||||
return empty_unibyte_string;
|
||||
return del_range_1 (XINT (start), XINT (end), 1, 1);
|
||||
return del_range_1 (XFIXNUM (start), XFIXNUM (end), 1, 1);
|
||||
}
|
||||
|
||||
DEFUN ("widen", Fwiden, Swiden, 0, 0, "",
|
||||
|
|
@ -3871,24 +3871,24 @@ or markers) bounding the text that should remain visible. */)
|
|||
CHECK_FIXNUM_COERCE_MARKER (start);
|
||||
CHECK_FIXNUM_COERCE_MARKER (end);
|
||||
|
||||
if (XINT (start) > XINT (end))
|
||||
if (XFIXNUM (start) > XFIXNUM (end))
|
||||
{
|
||||
Lisp_Object tem;
|
||||
tem = start; start = end; end = tem;
|
||||
}
|
||||
|
||||
if (!(BEG <= XINT (start) && XINT (start) <= XINT (end) && XINT (end) <= Z))
|
||||
if (!(BEG <= XFIXNUM (start) && XFIXNUM (start) <= XFIXNUM (end) && XFIXNUM (end) <= Z))
|
||||
args_out_of_range (start, end);
|
||||
|
||||
if (BEGV != XFASTINT (start) || ZV != XFASTINT (end))
|
||||
if (BEGV != XFIXNAT (start) || ZV != XFIXNAT (end))
|
||||
current_buffer->clip_changed = 1;
|
||||
|
||||
SET_BUF_BEGV (current_buffer, XFASTINT (start));
|
||||
SET_BUF_ZV (current_buffer, XFASTINT (end));
|
||||
if (PT < XFASTINT (start))
|
||||
SET_PT (XFASTINT (start));
|
||||
if (PT > XFASTINT (end))
|
||||
SET_PT (XFASTINT (end));
|
||||
SET_BUF_BEGV (current_buffer, XFIXNAT (start));
|
||||
SET_BUF_ZV (current_buffer, XFIXNAT (end));
|
||||
if (PT < XFIXNAT (start))
|
||||
SET_PT (XFIXNAT (start));
|
||||
if (PT > XFIXNAT (end))
|
||||
SET_PT (XFIXNAT (end));
|
||||
/* Changing the buffer bounds invalidates any recorded current column. */
|
||||
invalidate_current_column ();
|
||||
return Qnil;
|
||||
|
|
@ -4475,7 +4475,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
}
|
||||
else if (conversion == 'c')
|
||||
{
|
||||
if (FIXNUMP (arg) && ! ASCII_CHAR_P (XINT (arg)))
|
||||
if (FIXNUMP (arg) && ! ASCII_CHAR_P (XFIXNUM (arg)))
|
||||
{
|
||||
if (!multibyte)
|
||||
{
|
||||
|
|
@ -4717,7 +4717,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
/* Although long double may have a rounding error if
|
||||
DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1,
|
||||
it is more accurate than plain 'double'. */
|
||||
long double x = XINT (arg);
|
||||
long double x = XFIXNUM (arg);
|
||||
sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x);
|
||||
}
|
||||
else
|
||||
|
|
@ -4727,7 +4727,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
else if (conversion == 'c')
|
||||
{
|
||||
/* Don't use sprintf here, as it might mishandle prec. */
|
||||
sprintf_buf[0] = XINT (arg);
|
||||
sprintf_buf[0] = XFIXNUM (arg);
|
||||
sprintf_bytes = prec != 0;
|
||||
sprintf_buf[sprintf_bytes] = '\0';
|
||||
}
|
||||
|
|
@ -4735,7 +4735,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
{
|
||||
if (FIXNUMP (arg))
|
||||
{
|
||||
printmax_t x = XINT (arg);
|
||||
printmax_t x = XFIXNUM (arg);
|
||||
sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x);
|
||||
}
|
||||
else
|
||||
|
|
@ -4759,7 +4759,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
/* Don't sign-extend for octal or hex printing. */
|
||||
uprintmax_t x;
|
||||
if (FIXNUMP (arg))
|
||||
x = XUINT (arg);
|
||||
x = XUFIXNUM (arg);
|
||||
else
|
||||
{
|
||||
double d = XFLOAT_DATA (arg);
|
||||
|
|
@ -5016,7 +5016,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
Lisp_Object item = XCAR (list);
|
||||
|
||||
/* First adjust the property start position. */
|
||||
ptrdiff_t pos = XINT (XCAR (item));
|
||||
ptrdiff_t pos = XFIXNUM (XCAR (item));
|
||||
|
||||
/* Advance BYTEPOS, POSITION, TRANSLATED and ARGN
|
||||
up to this position. */
|
||||
|
|
@ -5038,7 +5038,7 @@ styled_format (ptrdiff_t nargs, Lisp_Object *args, bool message)
|
|||
XSETCAR (item, make_fixnum (translated));
|
||||
|
||||
/* Likewise adjust the property end position. */
|
||||
pos = XINT (XCAR (XCDR (item)));
|
||||
pos = XFIXNUM (XCAR (XCDR (item)));
|
||||
|
||||
for (; position < pos; bytepos++)
|
||||
{
|
||||
|
|
@ -5099,13 +5099,13 @@ Case is ignored if `case-fold-search' is non-nil in the current buffer. */)
|
|||
CHECK_CHARACTER (c1);
|
||||
CHECK_CHARACTER (c2);
|
||||
|
||||
if (XINT (c1) == XINT (c2))
|
||||
if (XFIXNUM (c1) == XFIXNUM (c2))
|
||||
return Qt;
|
||||
if (NILP (BVAR (current_buffer, case_fold_search)))
|
||||
return Qnil;
|
||||
|
||||
i1 = XFASTINT (c1);
|
||||
i2 = XFASTINT (c2);
|
||||
i1 = XFIXNAT (c1);
|
||||
i2 = XFIXNAT (c2);
|
||||
|
||||
/* FIXME: It is possible to compare multibyte characters even when
|
||||
the current buffer is unibyte. Unfortunately this is ambiguous
|
||||
|
|
@ -5249,10 +5249,10 @@ ring. */)
|
|||
validate_region (&startr1, &endr1);
|
||||
validate_region (&startr2, &endr2);
|
||||
|
||||
start1 = XFASTINT (startr1);
|
||||
end1 = XFASTINT (endr1);
|
||||
start2 = XFASTINT (startr2);
|
||||
end2 = XFASTINT (endr2);
|
||||
start1 = XFIXNAT (startr1);
|
||||
end1 = XFIXNAT (endr1);
|
||||
start2 = XFIXNAT (startr2);
|
||||
end2 = XFIXNAT (endr2);
|
||||
gap = GPT;
|
||||
|
||||
/* Swap the regions if they're reversed. */
|
||||
|
|
|
|||
|
|
@ -302,7 +302,7 @@ module_make_global_ref (emacs_env *env, emacs_value ref)
|
|||
if (i >= 0)
|
||||
{
|
||||
Lisp_Object value = HASH_VALUE (h, i);
|
||||
EMACS_INT refcount = XFASTINT (value) + 1;
|
||||
EMACS_INT refcount = XFIXNAT (value) + 1;
|
||||
if (MOST_POSITIVE_FIXNUM < refcount)
|
||||
xsignal0 (Qoverflow_error);
|
||||
value = make_fixed_natnum (refcount);
|
||||
|
|
@ -329,7 +329,7 @@ module_free_global_ref (emacs_env *env, emacs_value ref)
|
|||
|
||||
if (i >= 0)
|
||||
{
|
||||
EMACS_INT refcount = XFASTINT (HASH_VALUE (h, i)) - 1;
|
||||
EMACS_INT refcount = XFIXNAT (HASH_VALUE (h, i)) - 1;
|
||||
if (refcount > 0)
|
||||
set_hash_value_slot (h, i, make_fixed_natnum (refcount));
|
||||
else
|
||||
|
|
@ -525,7 +525,7 @@ module_extract_integer (emacs_env *env, emacs_value n)
|
|||
xsignal1 (Qoverflow_error, l);
|
||||
return mpz_get_si (XBIGNUM (l)->value);
|
||||
}
|
||||
return XINT (l);
|
||||
return XFIXNUM (l);
|
||||
}
|
||||
|
||||
static emacs_value
|
||||
|
|
|
|||
|
|
@ -2065,9 +2065,9 @@ all of which are called before Emacs is actually killed. */
|
|||
}
|
||||
|
||||
if (FIXNUMP (arg))
|
||||
exit_code = (XINT (arg) < 0
|
||||
? XINT (arg) | INT_MIN
|
||||
: XINT (arg) & INT_MAX);
|
||||
exit_code = (XFIXNUM (arg) < 0
|
||||
? XFIXNUM (arg) | INT_MIN
|
||||
: XFIXNUM (arg) & INT_MAX);
|
||||
else
|
||||
exit_code = EXIT_SUCCESS;
|
||||
exit (exit_code);
|
||||
|
|
|
|||
24
src/eval.c
24
src/eval.c
|
|
@ -264,8 +264,8 @@ init_eval (void)
|
|||
static void
|
||||
restore_stack_limits (Lisp_Object data)
|
||||
{
|
||||
max_specpdl_size = XINT (XCAR (data));
|
||||
max_lisp_eval_depth = XINT (XCDR (data));
|
||||
max_specpdl_size = XFIXNUM (XCAR (data));
|
||||
max_lisp_eval_depth = XFIXNUM (XCDR (data));
|
||||
}
|
||||
|
||||
static void grow_specpdl (void);
|
||||
|
|
@ -938,7 +938,7 @@ usage: (let VARLIST BODY...) */)
|
|||
CHECK_LIST (varlist);
|
||||
|
||||
/* Make space to hold the values to give the bound variables. */
|
||||
EMACS_INT varlist_len = XFASTINT (Flength (varlist));
|
||||
EMACS_INT varlist_len = XFIXNAT (Flength (varlist));
|
||||
SAFE_ALLOCA_LISP (temps, varlist_len);
|
||||
ptrdiff_t nvars = varlist_len;
|
||||
|
||||
|
|
@ -2246,9 +2246,9 @@ eval_sub (Lisp_Object form)
|
|||
|
||||
check_cons_list ();
|
||||
|
||||
if (XINT (numargs) < XSUBR (fun)->min_args
|
||||
if (XFIXNUM (numargs) < XSUBR (fun)->min_args
|
||||
|| (XSUBR (fun)->max_args >= 0
|
||||
&& XSUBR (fun)->max_args < XINT (numargs)))
|
||||
&& XSUBR (fun)->max_args < XFIXNUM (numargs)))
|
||||
xsignal2 (Qwrong_number_of_arguments, original_fun, numargs);
|
||||
|
||||
else if (XSUBR (fun)->max_args == UNEVALLED)
|
||||
|
|
@ -2260,9 +2260,9 @@ eval_sub (Lisp_Object form)
|
|||
ptrdiff_t argnum = 0;
|
||||
USE_SAFE_ALLOCA;
|
||||
|
||||
SAFE_ALLOCA_LISP (vals, XINT (numargs));
|
||||
SAFE_ALLOCA_LISP (vals, XFIXNUM (numargs));
|
||||
|
||||
while (CONSP (args_left) && argnum < XINT (numargs))
|
||||
while (CONSP (args_left) && argnum < XFIXNUM (numargs))
|
||||
{
|
||||
Lisp_Object arg = XCAR (args_left);
|
||||
args_left = XCDR (args_left);
|
||||
|
|
@ -2292,7 +2292,7 @@ eval_sub (Lisp_Object form)
|
|||
args_left = Fcdr (args_left);
|
||||
}
|
||||
|
||||
set_backtrace_args (specpdl + count, argvals, XINT (numargs));
|
||||
set_backtrace_args (specpdl + count, argvals, XFIXNUM (numargs));
|
||||
|
||||
switch (i)
|
||||
{
|
||||
|
|
@ -2405,7 +2405,7 @@ usage: (apply FUNCTION &rest ARGUMENTS) */)
|
|||
|
||||
CHECK_LIST (spread_arg);
|
||||
|
||||
numargs = XINT (Flength (spread_arg));
|
||||
numargs = XFIXNUM (Flength (spread_arg));
|
||||
|
||||
if (numargs == 0)
|
||||
return Ffuncall (nargs - 1, args);
|
||||
|
|
@ -2960,7 +2960,7 @@ apply_lambda (Lisp_Object fun, Lisp_Object args, ptrdiff_t count)
|
|||
Lisp_Object tem;
|
||||
USE_SAFE_ALLOCA;
|
||||
|
||||
numargs = XFASTINT (Flength (args));
|
||||
numargs = XFIXNAT (Flength (args));
|
||||
SAFE_ALLOCA_LISP (arg_vector, numargs);
|
||||
args_left = args;
|
||||
|
||||
|
|
@ -3667,7 +3667,7 @@ get_backtrace_frame (Lisp_Object nframes, Lisp_Object base)
|
|||
union specbinding *pdl = get_backtrace_starting_at (base);
|
||||
|
||||
/* Find the frame requested. */
|
||||
for (i = XFASTINT (nframes); i > 0 && backtrace_p (pdl); i--)
|
||||
for (i = XFIXNAT (nframes); i > 0 && backtrace_p (pdl); i--)
|
||||
pdl = backtrace_next (pdl);
|
||||
|
||||
return pdl;
|
||||
|
|
@ -3868,7 +3868,7 @@ NFRAMES and BASE specify the activation frame to use, as in `backtrace-frame'.
|
|||
{
|
||||
union specbinding *frame = get_backtrace_frame (nframes, base);
|
||||
union specbinding *prevframe
|
||||
= get_backtrace_frame (make_fixnum (XFASTINT (nframes) - 1), base);
|
||||
= get_backtrace_frame (make_fixnum (XFIXNAT (nframes) - 1), base);
|
||||
ptrdiff_t distance = specpdl_ptr - frame;
|
||||
Lisp_Object result = Qnil;
|
||||
eassert (distance >= 0);
|
||||
|
|
|
|||
48
src/fileio.c
48
src/fileio.c
|
|
@ -3195,7 +3195,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */)
|
|||
|
||||
encoded_absname = ENCODE_FILE (absname);
|
||||
|
||||
if (chmod (SSDATA (encoded_absname), XINT (mode) & 07777) < 0)
|
||||
if (chmod (SSDATA (encoded_absname), XFIXNUM (mode) & 07777) < 0)
|
||||
report_file_error ("Doing chmod", absname);
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -3218,7 +3218,7 @@ by having the corresponding bit in the mask reset. */)
|
|||
mode_t oldrealmask, oldumask, newumask;
|
||||
CHECK_FIXNUM (mode);
|
||||
oldrealmask = realmask;
|
||||
newumask = ~ XINT (mode) & 0777;
|
||||
newumask = ~ XFIXNUM (mode) & 0777;
|
||||
|
||||
block_input ();
|
||||
realmask = newumask;
|
||||
|
|
@ -3378,7 +3378,7 @@ verify (alignof (union read_non_regular) % GCALIGNMENT == 0);
|
|||
static Lisp_Object
|
||||
read_non_regular (Lisp_Object state)
|
||||
{
|
||||
union read_non_regular *data = XINTPTR (state);
|
||||
union read_non_regular *data = XFIXNUMPTR (state);
|
||||
int nbytes = emacs_read_quit (data->s.fd,
|
||||
((char *) BEG_ADDR + PT_BYTE - BEG_BYTE
|
||||
+ data->s.inserted),
|
||||
|
|
@ -3402,7 +3402,7 @@ static off_t
|
|||
file_offset (Lisp_Object val)
|
||||
{
|
||||
if (RANGED_FIXNUMP (0, val, TYPE_MAXIMUM (off_t)))
|
||||
return XINT (val);
|
||||
return XFIXNUM (val);
|
||||
|
||||
if (FLOATP (val))
|
||||
{
|
||||
|
|
@ -3462,14 +3462,14 @@ restore_window_points (Lisp_Object window_markers, ptrdiff_t inserted,
|
|||
Lisp_Object marker = XCAR (car);
|
||||
Lisp_Object oldpos = XCDR (car);
|
||||
if (MARKERP (marker) && FIXNUMP (oldpos)
|
||||
&& XINT (oldpos) > same_at_start
|
||||
&& XINT (oldpos) < same_at_end)
|
||||
&& XFIXNUM (oldpos) > same_at_start
|
||||
&& XFIXNUM (oldpos) < same_at_end)
|
||||
{
|
||||
ptrdiff_t oldsize = same_at_end - same_at_start;
|
||||
ptrdiff_t newsize = inserted;
|
||||
double growth = newsize / (double)oldsize;
|
||||
ptrdiff_t newpos
|
||||
= same_at_start + growth * (XINT (oldpos) - same_at_start);
|
||||
= same_at_start + growth * (XFIXNUM (oldpos) - same_at_start);
|
||||
Fset_marker (marker, make_fixnum (newpos), Qnil);
|
||||
}
|
||||
}
|
||||
|
|
@ -3584,7 +3584,7 @@ by calling `format-decode', which see. */)
|
|||
visit, beg, end, replace);
|
||||
if (CONSP (val) && CONSP (XCDR (val))
|
||||
&& RANGED_FIXNUMP (0, XCAR (XCDR (val)), ZV - PT))
|
||||
inserted = XINT (XCAR (XCDR (val)));
|
||||
inserted = XFIXNUM (XCAR (XCDR (val)));
|
||||
goto handled;
|
||||
}
|
||||
|
||||
|
|
@ -4248,7 +4248,7 @@ by calling `format-decode', which see. */)
|
|||
break;
|
||||
}
|
||||
|
||||
this = XINT (nbytes);
|
||||
this = XFIXNUM (nbytes);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4469,7 +4469,7 @@ by calling `format-decode', which see. */)
|
|||
{
|
||||
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
|
||||
wrong_type_argument (intern ("inserted-chars"), insval);
|
||||
inserted = XFASTINT (insval);
|
||||
inserted = XFIXNAT (insval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4492,7 +4492,7 @@ by calling `format-decode', which see. */)
|
|||
Qnil, make_fixnum (inserted), visit);
|
||||
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
|
||||
wrong_type_argument (intern ("inserted-chars"), insval);
|
||||
inserted = XFASTINT (insval);
|
||||
inserted = XFIXNAT (insval);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4523,7 +4523,7 @@ by calling `format-decode', which see. */)
|
|||
else
|
||||
/* format_decode modified buffer's characters => consider
|
||||
entire buffer changed and leave point at point-min. */
|
||||
inserted = XFASTINT (insval);
|
||||
inserted = XFIXNAT (insval);
|
||||
}
|
||||
|
||||
/* For consistency with format-decode call these now iff inserted > 0
|
||||
|
|
@ -4538,7 +4538,7 @@ by calling `format-decode', which see. */)
|
|||
{
|
||||
if (! RANGED_FIXNUMP (0, insval, ZV - PT))
|
||||
wrong_type_argument (intern ("inserted-chars"), insval);
|
||||
inserted = XFASTINT (insval);
|
||||
inserted = XFIXNAT (insval);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -4566,7 +4566,7 @@ by calling `format-decode', which see. */)
|
|||
/* after_insert_file_functions did modify buffer's
|
||||
characters => consider entire buffer changed and
|
||||
leave point at point-min. */
|
||||
inserted = XFASTINT (insval);
|
||||
inserted = XFIXNAT (insval);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4584,7 +4584,7 @@ by calling `format-decode', which see. */)
|
|||
Lisp_Object tem = XCAR (old_undo);
|
||||
if (CONSP (tem) && FIXNUMP (XCAR (tem))
|
||||
&& FIXNUMP (XCDR (tem))
|
||||
&& XFASTINT (XCDR (tem)) == PT + old_inserted)
|
||||
&& XFIXNAT (XCDR (tem)) == PT + old_inserted)
|
||||
XSETCDR (tem, make_fixnum (PT + inserted));
|
||||
}
|
||||
}
|
||||
|
|
@ -4962,14 +4962,14 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename,
|
|||
|
||||
if (STRINGP (start))
|
||||
ok = a_write (desc, start, 0, SCHARS (start), &annotations, &coding);
|
||||
else if (XINT (start) != XINT (end))
|
||||
ok = a_write (desc, Qnil, XINT (start), XINT (end) - XINT (start),
|
||||
else if (XFIXNUM (start) != XFIXNUM (end))
|
||||
ok = a_write (desc, Qnil, XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
&annotations, &coding);
|
||||
else
|
||||
{
|
||||
/* If file was empty, still need to write the annotations. */
|
||||
coding.mode |= CODING_MODE_LAST_BLOCK;
|
||||
ok = a_write (desc, Qnil, XINT (end), 0, &annotations, &coding);
|
||||
ok = a_write (desc, Qnil, XFIXNUM (end), 0, &annotations, &coding);
|
||||
}
|
||||
save_errno = errno;
|
||||
|
||||
|
|
@ -5256,7 +5256,7 @@ a_write (int desc, Lisp_Object string, ptrdiff_t pos,
|
|||
tem = Fcar_safe (Fcar (*annot));
|
||||
nextpos = pos - 1;
|
||||
if (FIXNUMP (tem))
|
||||
nextpos = XFASTINT (tem);
|
||||
nextpos = XFIXNAT (tem);
|
||||
|
||||
/* If there are no more annotations in this range,
|
||||
output the rest of the range all at once. */
|
||||
|
|
@ -5458,7 +5458,7 @@ An argument specifies the modification time value to use
|
|||
if (FIXNUMP (time_flag))
|
||||
{
|
||||
CHECK_RANGED_INTEGER (time_flag, -1, 0);
|
||||
mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XINT (time_flag));
|
||||
mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XFIXNUM (time_flag));
|
||||
}
|
||||
else
|
||||
mtime = lisp_time_argument (time_flag);
|
||||
|
|
@ -5526,7 +5526,7 @@ auto_save_1 (void)
|
|||
else if (modes = Ffile_modes (BVAR (current_buffer, filename)),
|
||||
FIXNUMP (modes))
|
||||
/* Remote files don't cooperate with stat. */
|
||||
auto_save_mode_bits = (XINT (modes) | 0600) & 0777;
|
||||
auto_save_mode_bits = (XFIXNUM (modes) | 0600) & 0777;
|
||||
}
|
||||
|
||||
return
|
||||
|
|
@ -5693,7 +5693,7 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
|
|||
&& BUF_SAVE_MODIFF (b) < BUF_MODIFF (b)
|
||||
&& BUF_AUTOSAVE_MODIFF (b) < BUF_MODIFF (b)
|
||||
/* -1 means we've turned off autosaving for a while--see below. */
|
||||
&& XINT (BVAR (b, save_length)) >= 0
|
||||
&& XFIXNUM (BVAR (b, save_length)) >= 0
|
||||
&& (do_handled_files
|
||||
|| NILP (Ffind_file_name_handler (BVAR (b, auto_save_file_name),
|
||||
Qwrite_region))))
|
||||
|
|
@ -5708,11 +5708,11 @@ A non-nil CURRENT-ONLY argument means save only current buffer. */)
|
|||
|
||||
set_buffer_internal (b);
|
||||
if (NILP (Vauto_save_include_big_deletions)
|
||||
&& (XFASTINT (BVAR (b, save_length)) * 10
|
||||
&& (XFIXNAT (BVAR (b, save_length)) * 10
|
||||
> (BUF_Z (b) - BUF_BEG (b)) * 13)
|
||||
/* A short file is likely to change a large fraction;
|
||||
spare the user annoying messages. */
|
||||
&& XFASTINT (BVAR (b, save_length)) > 5000
|
||||
&& XFIXNAT (BVAR (b, save_length)) > 5000
|
||||
/* These messages are frequent and annoying for `*mail*'. */
|
||||
&& !EQ (BVAR (b, filename), Qnil)
|
||||
&& NILP (no_message))
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ EXPONENT must be an integer. */)
|
|||
(Lisp_Object sgnfcand, Lisp_Object exponent)
|
||||
{
|
||||
CHECK_FIXNUM (exponent);
|
||||
int e = min (max (INT_MIN, XINT (exponent)), INT_MAX);
|
||||
int e = min (max (INT_MIN, XFIXNUM (exponent)), INT_MAX);
|
||||
return make_float (ldexp (extract_float (sgnfcand), e));
|
||||
}
|
||||
|
||||
|
|
@ -215,14 +215,14 @@ DEFUN ("expt", Fexpt, Sexpt, 2, 2, 0,
|
|||
CHECK_FIXNUM_OR_FLOAT (arg2);
|
||||
if (FIXNUMP (arg1) /* common lisp spec */
|
||||
&& FIXNUMP (arg2) /* don't promote, if both are ints, and */
|
||||
&& XINT (arg2) >= 0) /* we are sure the result is not fractional */
|
||||
&& XFIXNUM (arg2) >= 0) /* we are sure the result is not fractional */
|
||||
{ /* this can be improved by pre-calculating */
|
||||
EMACS_INT y; /* some binary powers of x then accumulating */
|
||||
EMACS_UINT acc, x; /* Unsigned so that overflow is well defined. */
|
||||
Lisp_Object val;
|
||||
|
||||
x = XINT (arg1);
|
||||
y = XINT (arg2);
|
||||
x = XFIXNUM (arg1);
|
||||
y = XFIXNUM (arg2);
|
||||
acc = (y & 1 ? x : 1);
|
||||
|
||||
while ((y >>= 1) != 0)
|
||||
|
|
@ -285,7 +285,7 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
|
|||
arg = make_number (val);
|
||||
mpz_clear (val);
|
||||
}
|
||||
else if (FIXNUMP (arg) && XINT (arg) == MOST_NEGATIVE_FIXNUM)
|
||||
else if (FIXNUMP (arg) && XFIXNUM (arg) == MOST_NEGATIVE_FIXNUM)
|
||||
{
|
||||
mpz_t val;
|
||||
mpz_init (val);
|
||||
|
|
@ -295,8 +295,8 @@ DEFUN ("abs", Fabs, Sabs, 1, 1, 0,
|
|||
}
|
||||
else if (FLOATP (arg))
|
||||
arg = make_float (fabs (XFLOAT_DATA (arg)));
|
||||
else if (XINT (arg) < 0)
|
||||
XSETINT (arg, - XINT (arg));
|
||||
else if (XFIXNUM (arg) < 0)
|
||||
XSETINT (arg, - XFIXNUM (arg));
|
||||
|
||||
return arg;
|
||||
}
|
||||
|
|
@ -310,7 +310,7 @@ DEFUN ("float", Ffloat, Sfloat, 1, 1, 0,
|
|||
if (BIGNUMP (arg))
|
||||
return make_float (mpz_get_d (XBIGNUM (arg)->value));
|
||||
if (FIXNUMP (arg))
|
||||
return make_float ((double) XINT (arg));
|
||||
return make_float ((double) XFIXNUM (arg));
|
||||
else /* give 'em the same float back */
|
||||
return arg;
|
||||
}
|
||||
|
|
@ -351,7 +351,7 @@ This is the same as the exponent of a float. */)
|
|||
else
|
||||
{
|
||||
eassert (FIXNUMP (arg));
|
||||
EMACS_INT i = eabs (XINT (arg));
|
||||
EMACS_INT i = eabs (XFIXNUM (arg));
|
||||
value = (i == 0
|
||||
? MOST_NEGATIVE_FIXNUM
|
||||
: EMACS_UINT_WIDTH - 1 - ecount_leading_zeros (i));
|
||||
|
|
@ -383,13 +383,13 @@ rounding_driver (Lisp_Object arg, Lisp_Object divisor,
|
|||
CHECK_FIXNUM_OR_FLOAT (divisor);
|
||||
if (!FLOATP (arg) && !FLOATP (divisor))
|
||||
{
|
||||
if (XINT (divisor) == 0)
|
||||
if (XFIXNUM (divisor) == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
return make_fixnum (int_round2 (XINT (arg), XINT (divisor)));
|
||||
return make_fixnum (int_round2 (XFIXNUM (arg), XFIXNUM (divisor)));
|
||||
}
|
||||
|
||||
double f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XINT (arg);
|
||||
double f2 = FLOATP (divisor) ? XFLOAT_DATA (divisor) : XINT (divisor);
|
||||
double f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XFIXNUM (arg);
|
||||
double f2 = FLOATP (divisor) ? XFLOAT_DATA (divisor) : XFIXNUM (divisor);
|
||||
if (! IEEE_FLOATING_POINT && f2 == 0)
|
||||
xsignal0 (Qarith_error);
|
||||
d = f1 / f2;
|
||||
|
|
@ -510,8 +510,8 @@ fmod_float (Lisp_Object x, Lisp_Object y)
|
|||
{
|
||||
double f1, f2;
|
||||
|
||||
f1 = FLOATP (x) ? XFLOAT_DATA (x) : XINT (x);
|
||||
f2 = FLOATP (y) ? XFLOAT_DATA (y) : XINT (y);
|
||||
f1 = FLOATP (x) ? XFLOAT_DATA (x) : XFIXNUM (x);
|
||||
f2 = FLOATP (y) ? XFLOAT_DATA (y) : XFIXNUM (y);
|
||||
|
||||
f1 = fmod (f1, f2);
|
||||
|
||||
|
|
|
|||
106
src/fns.c
106
src/fns.c
|
|
@ -77,14 +77,14 @@ See Info node `(elisp)Random Numbers' for more details. */)
|
|||
seed_random (SSDATA (limit), SBYTES (limit));
|
||||
|
||||
val = get_random ();
|
||||
if (FIXNUMP (limit) && 0 < XINT (limit))
|
||||
if (FIXNUMP (limit) && 0 < XFIXNUM (limit))
|
||||
while (true)
|
||||
{
|
||||
/* Return the remainder, except reject the rare case where
|
||||
get_random returns a number so close to INTMASK that the
|
||||
remainder isn't random. */
|
||||
EMACS_INT remainder = val % XINT (limit);
|
||||
if (val - remainder <= INTMASK - XINT (limit) + 1)
|
||||
EMACS_INT remainder = val % XFIXNUM (limit);
|
||||
if (val - remainder <= INTMASK - XFIXNUM (limit) + 1)
|
||||
return make_fixnum (remainder);
|
||||
val = get_random ();
|
||||
}
|
||||
|
|
@ -270,9 +270,9 @@ If string STR1 is greater, the value is a positive number N;
|
|||
|
||||
/* For backward compatibility, silently bring too-large positive end
|
||||
values into range. */
|
||||
if (FIXNUMP (end1) && SCHARS (str1) < XINT (end1))
|
||||
if (FIXNUMP (end1) && SCHARS (str1) < XFIXNUM (end1))
|
||||
end1 = make_fixnum (SCHARS (str1));
|
||||
if (FIXNUMP (end2) && SCHARS (str2) < XINT (end2))
|
||||
if (FIXNUMP (end2) && SCHARS (str2) < XFIXNUM (end2))
|
||||
end2 = make_fixnum (SCHARS (str2));
|
||||
|
||||
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;
|
|||
|
||||
if (! NILP (ignore_case))
|
||||
{
|
||||
c1 = XINT (Fupcase (make_fixnum (c1)));
|
||||
c2 = XINT (Fupcase (make_fixnum (c2)));
|
||||
c1 = XFIXNUM (Fupcase (make_fixnum (c1)));
|
||||
c2 = XFIXNUM (Fupcase (make_fixnum (c2)));
|
||||
}
|
||||
|
||||
if (c1 == c2)
|
||||
|
|
@ -645,7 +645,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
|
|||
{
|
||||
EMACS_INT len;
|
||||
this = args[argnum];
|
||||
len = XFASTINT (Flength (this));
|
||||
len = XFIXNAT (Flength (this));
|
||||
if (target_type == Lisp_String)
|
||||
{
|
||||
/* We must count the number of bytes needed in the string
|
||||
|
|
@ -660,7 +660,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
|
|||
{
|
||||
ch = AREF (this, i);
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
this_len_byte = CHAR_BYTES (c);
|
||||
if (STRING_BYTES_BOUND - result_len_byte < this_len_byte)
|
||||
string_overflow ();
|
||||
|
|
@ -675,7 +675,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
|
|||
{
|
||||
ch = XCAR (this);
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XFASTINT (ch);
|
||||
c = XFIXNAT (ch);
|
||||
this_len_byte = CHAR_BYTES (c);
|
||||
if (STRING_BYTES_BOUND - result_len_byte < this_len_byte)
|
||||
string_overflow ();
|
||||
|
|
@ -740,7 +740,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
|
|||
|
||||
this = args[argnum];
|
||||
if (!CONSP (this))
|
||||
thislen = Flength (this), thisleni = XINT (thislen);
|
||||
thislen = Flength (this), thisleni = XFIXNUM (thislen);
|
||||
|
||||
/* Between strings of the same kind, copy fast. */
|
||||
if (STRINGP (this) && STRINGP (val)
|
||||
|
|
@ -827,7 +827,7 @@ concat (ptrdiff_t nargs, Lisp_Object *args,
|
|||
{
|
||||
int c;
|
||||
CHECK_CHARACTER (elt);
|
||||
c = XFASTINT (elt);
|
||||
c = XFIXNAT (elt);
|
||||
if (some_multibyte)
|
||||
toindex_byte += CHAR_STRING (c, SDATA (val) + toindex_byte);
|
||||
else
|
||||
|
|
@ -1260,7 +1260,7 @@ validate_subarray (Lisp_Object array, Lisp_Object from, Lisp_Object to,
|
|||
|
||||
if (FIXNUMP (from))
|
||||
{
|
||||
f = XINT (from);
|
||||
f = XFIXNUM (from);
|
||||
if (f < 0)
|
||||
f += size;
|
||||
}
|
||||
|
|
@ -1271,7 +1271,7 @@ validate_subarray (Lisp_Object array, Lisp_Object from, Lisp_Object to,
|
|||
|
||||
if (FIXNUMP (to))
|
||||
{
|
||||
t = XINT (to);
|
||||
t = XFIXNUM (to);
|
||||
if (t < 0)
|
||||
t += size;
|
||||
}
|
||||
|
|
@ -1385,7 +1385,7 @@ DEFUN ("nthcdr", Fnthcdr, Snthcdr, 2, 2, 0,
|
|||
{
|
||||
CHECK_FIXNUM (n);
|
||||
Lisp_Object tail = list;
|
||||
for (EMACS_INT num = XINT (n); 0 < num; num--)
|
||||
for (EMACS_INT num = XFIXNUM (n); 0 < num; num--)
|
||||
{
|
||||
if (! CONSP (tail))
|
||||
{
|
||||
|
|
@ -1645,7 +1645,7 @@ changing the value of a sequence `foo'. */)
|
|||
cbytes = 1;
|
||||
}
|
||||
|
||||
if (!FIXNUMP (elt) || c != XINT (elt))
|
||||
if (!FIXNUMP (elt) || c != XFIXNUM (elt))
|
||||
{
|
||||
++nchars;
|
||||
nbytes += cbytes;
|
||||
|
|
@ -1675,7 +1675,7 @@ changing the value of a sequence `foo'. */)
|
|||
cbytes = 1;
|
||||
}
|
||||
|
||||
if (!FIXNUMP (elt) || c != XINT (elt))
|
||||
if (!FIXNUMP (elt) || c != XFIXNUM (elt))
|
||||
{
|
||||
unsigned char *from = SDATA (seq) + ibyte;
|
||||
unsigned char *to = SDATA (tem) + nbytes;
|
||||
|
|
@ -1846,7 +1846,7 @@ sort_list (Lisp_Object list, Lisp_Object predicate)
|
|||
|
||||
front = list;
|
||||
len = Flength (list);
|
||||
length = XINT (len);
|
||||
length = XFIXNUM (len);
|
||||
if (length < 2)
|
||||
return list;
|
||||
|
||||
|
|
@ -2417,7 +2417,7 @@ ARRAY is a vector, string, char-table, or bool-vector. */)
|
|||
register unsigned char *p = SDATA (array);
|
||||
int charval;
|
||||
CHECK_CHARACTER (item);
|
||||
charval = XFASTINT (item);
|
||||
charval = XFIXNAT (item);
|
||||
size = SCHARS (array);
|
||||
if (STRING_MULTIBYTE (array))
|
||||
{
|
||||
|
|
@ -2569,7 +2569,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
|
|||
(Lisp_Object function, Lisp_Object sequence, Lisp_Object separator)
|
||||
{
|
||||
USE_SAFE_ALLOCA;
|
||||
EMACS_INT leni = XFASTINT (Flength (sequence));
|
||||
EMACS_INT leni = XFIXNAT (Flength (sequence));
|
||||
if (CHAR_TABLE_P (sequence))
|
||||
wrong_type_argument (Qlistp, sequence);
|
||||
EMACS_INT args_alloc = 2 * leni - 1;
|
||||
|
|
@ -2598,7 +2598,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
|
|||
(Lisp_Object function, Lisp_Object sequence)
|
||||
{
|
||||
USE_SAFE_ALLOCA;
|
||||
EMACS_INT leni = XFASTINT (Flength (sequence));
|
||||
EMACS_INT leni = XFIXNAT (Flength (sequence));
|
||||
if (CHAR_TABLE_P (sequence))
|
||||
wrong_type_argument (Qlistp, sequence);
|
||||
Lisp_Object *args;
|
||||
|
|
@ -2617,7 +2617,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
|
|||
{
|
||||
register EMACS_INT leni;
|
||||
|
||||
leni = XFASTINT (Flength (sequence));
|
||||
leni = XFIXNAT (Flength (sequence));
|
||||
if (CHAR_TABLE_P (sequence))
|
||||
wrong_type_argument (Qlistp, sequence);
|
||||
mapcar1 (leni, 0, function, sequence);
|
||||
|
|
@ -2632,7 +2632,7 @@ SEQUENCE may be a list, a vector, a bool-vector, or a string. */)
|
|||
(Lisp_Object function, Lisp_Object sequence)
|
||||
{
|
||||
USE_SAFE_ALLOCA;
|
||||
EMACS_INT leni = XFASTINT (Flength (sequence));
|
||||
EMACS_INT leni = XFIXNAT (Flength (sequence));
|
||||
if (CHAR_TABLE_P (sequence))
|
||||
wrong_type_argument (Qlistp, sequence);
|
||||
Lisp_Object *args;
|
||||
|
|
@ -3159,9 +3159,9 @@ into shorter lines. */)
|
|||
|
||||
validate_region (&beg, &end);
|
||||
|
||||
ibeg = CHAR_TO_BYTE (XFASTINT (beg));
|
||||
iend = CHAR_TO_BYTE (XFASTINT (end));
|
||||
move_gap_both (XFASTINT (beg), ibeg);
|
||||
ibeg = CHAR_TO_BYTE (XFIXNAT (beg));
|
||||
iend = CHAR_TO_BYTE (XFIXNAT (end));
|
||||
move_gap_both (XFIXNAT (beg), ibeg);
|
||||
|
||||
/* We need to allocate enough room for encoding the text.
|
||||
We need 33 1/3% more space, plus a newline every 76
|
||||
|
|
@ -3186,17 +3186,17 @@ into shorter lines. */)
|
|||
|
||||
/* Now we have encoded the region, so we insert the new contents
|
||||
and delete the old. (Insert first in order to preserve markers.) */
|
||||
SET_PT_BOTH (XFASTINT (beg), ibeg);
|
||||
SET_PT_BOTH (XFIXNAT (beg), ibeg);
|
||||
insert (encoded, encoded_length);
|
||||
SAFE_FREE ();
|
||||
del_range_byte (ibeg + encoded_length, iend + encoded_length);
|
||||
|
||||
/* If point was outside of the region, restore it exactly; else just
|
||||
move to the beginning of the region. */
|
||||
if (old_pos >= XFASTINT (end))
|
||||
old_pos += encoded_length - (XFASTINT (end) - XFASTINT (beg));
|
||||
else if (old_pos > XFASTINT (beg))
|
||||
old_pos = XFASTINT (beg);
|
||||
if (old_pos >= XFIXNAT (end))
|
||||
old_pos += encoded_length - (XFIXNAT (end) - XFIXNAT (beg));
|
||||
else if (old_pos > XFIXNAT (beg))
|
||||
old_pos = XFIXNAT (beg);
|
||||
SET_PT (old_pos);
|
||||
|
||||
/* 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. */
|
|||
|
||||
validate_region (&beg, &end);
|
||||
|
||||
ibeg = CHAR_TO_BYTE (XFASTINT (beg));
|
||||
iend = CHAR_TO_BYTE (XFASTINT (end));
|
||||
ibeg = CHAR_TO_BYTE (XFIXNAT (beg));
|
||||
iend = CHAR_TO_BYTE (XFIXNAT (end));
|
||||
|
||||
length = iend - ibeg;
|
||||
|
||||
|
|
@ -3370,7 +3370,7 @@ If the region can't be decoded, signal an error and don't modify the buffer. */
|
|||
allength = multibyte ? length * 2 : length;
|
||||
decoded = SAFE_ALLOCA (allength);
|
||||
|
||||
move_gap_both (XFASTINT (beg), ibeg);
|
||||
move_gap_both (XFIXNAT (beg), ibeg);
|
||||
decoded_length = base64_decode_1 ((char *) BYTE_POS_ADDR (ibeg),
|
||||
decoded, length,
|
||||
multibyte, &inserted_chars);
|
||||
|
|
@ -3385,21 +3385,21 @@ If the region can't be decoded, signal an error and don't modify the buffer. */
|
|||
|
||||
/* Now we have decoded the region, so we insert the new contents
|
||||
and delete the old. (Insert first in order to preserve markers.) */
|
||||
TEMP_SET_PT_BOTH (XFASTINT (beg), ibeg);
|
||||
TEMP_SET_PT_BOTH (XFIXNAT (beg), ibeg);
|
||||
insert_1_both (decoded, inserted_chars, decoded_length, 0, 1, 0);
|
||||
signal_after_change (XFASTINT (beg), 0, inserted_chars);
|
||||
signal_after_change (XFIXNAT (beg), 0, inserted_chars);
|
||||
SAFE_FREE ();
|
||||
|
||||
/* Delete the original text. */
|
||||
del_range_both (PT, PT_BYTE, XFASTINT (end) + inserted_chars,
|
||||
del_range_both (PT, PT_BYTE, XFIXNAT (end) + inserted_chars,
|
||||
iend + decoded_length, 1);
|
||||
|
||||
/* If point was outside of the region, restore it exactly; else just
|
||||
move to the beginning of the region. */
|
||||
if (old_pos >= XFASTINT (end))
|
||||
old_pos += inserted_chars - (XFASTINT (end) - XFASTINT (beg));
|
||||
else if (old_pos > XFASTINT (beg))
|
||||
old_pos = XFASTINT (beg);
|
||||
if (old_pos >= XFIXNAT (end))
|
||||
old_pos += inserted_chars - (XFIXNAT (end) - XFIXNAT (beg));
|
||||
else if (old_pos > XFIXNAT (beg))
|
||||
old_pos = XFIXNAT (beg);
|
||||
SET_PT (old_pos > ZV ? ZV : old_pos);
|
||||
|
||||
return make_fixnum (inserted_chars);
|
||||
|
|
@ -3696,7 +3696,7 @@ larger_vector (Lisp_Object vec, ptrdiff_t incr_min, ptrdiff_t nitems_max)
|
|||
static ptrdiff_t
|
||||
HASH_NEXT (struct Lisp_Hash_Table *h, ptrdiff_t idx)
|
||||
{
|
||||
return XINT (AREF (h->next, idx));
|
||||
return XFIXNUM (AREF (h->next, idx));
|
||||
}
|
||||
|
||||
/* 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)
|
|||
static ptrdiff_t
|
||||
HASH_INDEX (struct Lisp_Hash_Table *h, ptrdiff_t idx)
|
||||
{
|
||||
return XINT (AREF (h->index, idx));
|
||||
return XFIXNUM (AREF (h->index, idx));
|
||||
}
|
||||
|
||||
/* 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)
|
|||
for (i = 0; i < old_size; ++i)
|
||||
if (!NILP (HASH_HASH (h, i)))
|
||||
{
|
||||
EMACS_UINT hash_code = XUINT (HASH_HASH (h, i));
|
||||
EMACS_UINT hash_code = XUFIXNUM (HASH_HASH (h, i));
|
||||
ptrdiff_t start_of_bucket = hash_code % ASIZE (h->index);
|
||||
set_hash_next_slot (h, i, HASH_INDEX (h, start_of_bucket));
|
||||
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)
|
|||
for (i = HASH_INDEX (h, start_of_bucket); 0 <= i; i = HASH_NEXT (h, i))
|
||||
if (EQ (key, HASH_KEY (h, i))
|
||||
|| (h->test.cmpfn
|
||||
&& hash_code == XUINT (HASH_HASH (h, i))
|
||||
&& hash_code == XUFIXNUM (HASH_HASH (h, i))
|
||||
&& h->test.cmpfn (&h->test, key, HASH_KEY (h, i))))
|
||||
break;
|
||||
|
||||
|
|
@ -4094,7 +4094,7 @@ hash_remove_from_table (struct Lisp_Hash_Table *h, Lisp_Object key)
|
|||
{
|
||||
if (EQ (key, HASH_KEY (h, i))
|
||||
|| (h->test.cmpfn
|
||||
&& hash_code == XUINT (HASH_HASH (h, i))
|
||||
&& hash_code == XUFIXNUM (HASH_HASH (h, i))
|
||||
&& h->test.cmpfn (&h->test, key, HASH_KEY (h, i))))
|
||||
{
|
||||
/* Take entry out of collision chain. */
|
||||
|
|
@ -4444,7 +4444,7 @@ sxhash (Lisp_Object obj, int depth)
|
|||
switch (XTYPE (obj))
|
||||
{
|
||||
case_Lisp_Int:
|
||||
hash = XUINT (obj);
|
||||
hash = XUFIXNUM (obj);
|
||||
break;
|
||||
|
||||
case Lisp_Misc:
|
||||
|
|
@ -4607,7 +4607,7 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
|
|||
if (NILP (size_arg))
|
||||
size = DEFAULT_HASH_SIZE;
|
||||
else if (FIXNATP (size_arg))
|
||||
size = XFASTINT (size_arg);
|
||||
size = XFIXNAT (size_arg);
|
||||
else
|
||||
signal_error ("Invalid hash table size", size_arg);
|
||||
|
||||
|
|
@ -4616,8 +4616,8 @@ usage: (make-hash-table &rest KEYWORD-ARGS) */)
|
|||
i = get_key_arg (QCrehash_size, nargs, args, used);
|
||||
if (!i)
|
||||
rehash_size = DEFAULT_REHASH_SIZE;
|
||||
else if (FIXNUMP (args[i]) && 0 < XINT (args[i]))
|
||||
rehash_size = - XINT (args[i]);
|
||||
else if (FIXNUMP (args[i]) && 0 < XFIXNUM (args[i]))
|
||||
rehash_size = - XFIXNUM (args[i]);
|
||||
else if (FLOATP (args[i]) && 0 < (float) (XFLOAT_DATA (args[i]) - 1))
|
||||
rehash_size = (float) (XFLOAT_DATA (args[i]) - 1);
|
||||
else
|
||||
|
|
@ -4932,7 +4932,7 @@ extract_data_from_object (Lisp_Object spec,
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (start);
|
||||
b = XINT (start);
|
||||
b = XFIXNUM (start);
|
||||
}
|
||||
|
||||
if (NILP (end))
|
||||
|
|
@ -4940,7 +4940,7 @@ extract_data_from_object (Lisp_Object spec,
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (end);
|
||||
e = XINT (end);
|
||||
e = XFIXNUM (end);
|
||||
}
|
||||
|
||||
if (b > e)
|
||||
|
|
@ -5033,7 +5033,7 @@ extract_data_from_object (Lisp_Object spec,
|
|||
error ("Without a length, `iv-auto' can't be used; see ELisp manual");
|
||||
else
|
||||
{
|
||||
EMACS_INT start_hold = XFASTINT (start);
|
||||
EMACS_INT start_hold = XFIXNAT (start);
|
||||
object = make_uninit_string (start_hold);
|
||||
gnutls_rnd (GNUTLS_RND_NONCE, SSDATA (object), start_hold);
|
||||
|
||||
|
|
|
|||
168
src/font.c
168
src/font.c
|
|
@ -303,7 +303,7 @@ font_pixel_size (struct frame *f, Lisp_Object spec)
|
|||
Lisp_Object val;
|
||||
|
||||
if (FIXNUMP (size))
|
||||
return XINT (size);
|
||||
return XFIXNUM (size);
|
||||
if (NILP (size))
|
||||
return 0;
|
||||
if (FRAME_WINDOW_P (f))
|
||||
|
|
@ -312,7 +312,7 @@ font_pixel_size (struct frame *f, Lisp_Object spec)
|
|||
point_size = XFLOAT_DATA (size);
|
||||
val = AREF (spec, FONT_DPI_INDEX);
|
||||
if (FIXNUMP (val))
|
||||
dpi = XINT (val);
|
||||
dpi = XFIXNUM (val);
|
||||
else
|
||||
dpi = FRAME_RES_Y (f);
|
||||
pixel_size = POINT_TO_PIXEL (point_size, dpi);
|
||||
|
|
@ -354,7 +354,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
|
|||
if (EQ (val, AREF (AREF (table, i), j)))
|
||||
{
|
||||
CHECK_FIXNUM (AREF (AREF (table, i), 0));
|
||||
return ((XINT (AREF (AREF (table, i), 0)) << 8)
|
||||
return ((XFIXNUM (AREF (AREF (table, i), 0)) << 8)
|
||||
| (i << 4) | (j - 1));
|
||||
}
|
||||
}
|
||||
|
|
@ -367,7 +367,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
|
|||
if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0)
|
||||
{
|
||||
CHECK_FIXNUM (AREF (AREF (table, i), 0));
|
||||
return ((XINT (AREF (AREF (table, i), 0)) << 8)
|
||||
return ((XFIXNUM (AREF (AREF (table, i), 0)) << 8)
|
||||
| (i << 4) | (j - 1));
|
||||
}
|
||||
}
|
||||
|
|
@ -383,7 +383,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
|
|||
else
|
||||
{
|
||||
int i, last_n;
|
||||
EMACS_INT numeric = XINT (val);
|
||||
EMACS_INT numeric = XFIXNUM (val);
|
||||
|
||||
for (i = 0, last_n = -1; i < len; i++)
|
||||
{
|
||||
|
|
@ -391,7 +391,7 @@ font_style_to_value (enum font_property_index prop, Lisp_Object val,
|
|||
|
||||
CHECK_VECTOR (AREF (table, i));
|
||||
CHECK_FIXNUM (AREF (AREF (table, i), 0));
|
||||
n = XINT (AREF (AREF (table, i), 0));
|
||||
n = XFIXNUM (AREF (AREF (table, i), 0));
|
||||
if (numeric == n)
|
||||
return (n << 8) | (i << 4);
|
||||
if (numeric < n)
|
||||
|
|
@ -421,7 +421,7 @@ font_style_symbolic (Lisp_Object font, enum font_property_index prop,
|
|||
return Qnil;
|
||||
table = AREF (font_style_table, prop - FONT_WEIGHT_INDEX);
|
||||
CHECK_VECTOR (table);
|
||||
i = XINT (val) & 0xFF;
|
||||
i = XFIXNUM (val) & 0xFF;
|
||||
eassert (((i >> 4) & 0xF) < ASIZE (table));
|
||||
elt = AREF (table, ((i >> 4) & 0xF));
|
||||
CHECK_VECTOR (elt);
|
||||
|
|
@ -470,28 +470,28 @@ font_registry_charsets (Lisp_Object registry, struct charset **encoding, struct
|
|||
val = XCDR (val);
|
||||
if (NILP (val))
|
||||
return -1;
|
||||
encoding_id = XINT (XCAR (val));
|
||||
repertory_id = XINT (XCDR (val));
|
||||
encoding_id = XFIXNUM (XCAR (val));
|
||||
repertory_id = XFIXNUM (XCDR (val));
|
||||
}
|
||||
else
|
||||
{
|
||||
val = find_font_encoding (SYMBOL_NAME (registry));
|
||||
if (SYMBOLP (val) && CHARSETP (val))
|
||||
{
|
||||
encoding_id = repertory_id = XINT (CHARSET_SYMBOL_ID (val));
|
||||
encoding_id = repertory_id = XFIXNUM (CHARSET_SYMBOL_ID (val));
|
||||
}
|
||||
else if (CONSP (val))
|
||||
{
|
||||
if (! CHARSETP (XCAR (val)))
|
||||
goto invalid_entry;
|
||||
encoding_id = XINT (CHARSET_SYMBOL_ID (XCAR (val)));
|
||||
encoding_id = XFIXNUM (CHARSET_SYMBOL_ID (XCAR (val)));
|
||||
if (NILP (XCDR (val)))
|
||||
repertory_id = -1;
|
||||
else
|
||||
{
|
||||
if (! CHARSETP (XCDR (val)))
|
||||
goto invalid_entry;
|
||||
repertory_id = XINT (CHARSET_SYMBOL_ID (XCDR (val)));
|
||||
repertory_id = XFIXNUM (CHARSET_SYMBOL_ID (XCDR (val)));
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -545,7 +545,7 @@ font_prop_validate_style (Lisp_Object style, Lisp_Object val)
|
|||
: FONT_WIDTH_INDEX);
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
EMACS_INT n = XINT (val);
|
||||
EMACS_INT n = XFIXNUM (val);
|
||||
CHECK_VECTOR (AREF (font_style_table, prop - FONT_WEIGHT_INDEX));
|
||||
if (((n >> 4) & 0xF)
|
||||
>= ASIZE (AREF (font_style_table, prop - FONT_WEIGHT_INDEX)))
|
||||
|
|
@ -560,7 +560,7 @@ font_prop_validate_style (Lisp_Object style, Lisp_Object val)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (AREF (elt, 0));
|
||||
if (XINT (AREF (elt, 0)) != (n >> 8))
|
||||
if (XFIXNUM (AREF (elt, 0)) != (n >> 8))
|
||||
val = Qerror;
|
||||
}
|
||||
}
|
||||
|
|
@ -586,7 +586,7 @@ font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val)
|
|||
static Lisp_Object
|
||||
font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val)
|
||||
{
|
||||
if (NILP (val) || (FIXNATP (val) && XINT (val) <= FONT_SPACING_CHARCELL))
|
||||
if (NILP (val) || (FIXNATP (val) && XFIXNUM (val) <= FONT_SPACING_CHARCELL))
|
||||
return val;
|
||||
if (SYMBOLP (val) && SBYTES (SYMBOL_NAME (val)) == 1)
|
||||
{
|
||||
|
|
@ -877,7 +877,7 @@ font_expand_wildcards (Lisp_Object *field, int n)
|
|||
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
EMACS_INT numeric = XINT (val);
|
||||
EMACS_INT numeric = XFIXNUM (val);
|
||||
|
||||
if (i + 1 == n)
|
||||
from = to = XLFD_ENCODING_INDEX,
|
||||
|
|
@ -1185,7 +1185,7 @@ font_parse_xlfd (char *name, ptrdiff_t len, Lisp_Object font)
|
|||
ASET (font, FONT_SIZE_INDEX, prop[XLFD_PIXEL_INDEX]);
|
||||
else if (FIXNUMP (prop[XLFD_POINT_INDEX]))
|
||||
{
|
||||
double point_size = XINT (prop[XLFD_POINT_INDEX]);
|
||||
double point_size = XFIXNUM (prop[XLFD_POINT_INDEX]);
|
||||
|
||||
ASET (font, FONT_SIZE_INDEX, make_float (point_size / 10));
|
||||
}
|
||||
|
|
@ -1289,7 +1289,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
1 + DBL_MAX_10_EXP + 1)];
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
EMACS_INT v = XINT (val);
|
||||
EMACS_INT v = XFIXNUM (val);
|
||||
if (v <= 0)
|
||||
v = pixel_size;
|
||||
if (v > 0)
|
||||
|
|
@ -1312,7 +1312,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
char dpi_index_buf[sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT)];
|
||||
if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
|
||||
{
|
||||
EMACS_INT v = XINT (AREF (font, FONT_DPI_INDEX));
|
||||
EMACS_INT v = XFIXNUM (AREF (font, FONT_DPI_INDEX));
|
||||
f[XLFD_RESX_INDEX] = p = dpi_index_buf;
|
||||
sprintf (p, "%"pI"d-%"pI"d", v, v);
|
||||
}
|
||||
|
|
@ -1321,7 +1321,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
|
||||
if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
|
||||
{
|
||||
EMACS_INT spacing = XINT (AREF (font, FONT_SPACING_INDEX));
|
||||
EMACS_INT spacing = XFIXNUM (AREF (font, FONT_SPACING_INDEX));
|
||||
|
||||
f[XLFD_SPACING_INDEX] = (spacing <= FONT_SPACING_PROPORTIONAL ? "p"
|
||||
: spacing <= FONT_SPACING_DUAL ? "d"
|
||||
|
|
@ -1335,7 +1335,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX)))
|
||||
{
|
||||
f[XLFD_AVGWIDTH_INDEX] = p = avgwidth_index_buf;
|
||||
sprintf (p, "%"pI"d", XINT (AREF (font, FONT_AVGWIDTH_INDEX)));
|
||||
sprintf (p, "%"pI"d", XFIXNUM (AREF (font, FONT_AVGWIDTH_INDEX)));
|
||||
}
|
||||
else
|
||||
f[XLFD_AVGWIDTH_INDEX] = "*";
|
||||
|
|
@ -1623,8 +1623,8 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
val = AREF (font, FONT_SIZE_INDEX);
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
if (XINT (val) != 0)
|
||||
pixel_size = XINT (val);
|
||||
if (XFIXNUM (val) != 0)
|
||||
pixel_size = XFIXNUM (val);
|
||||
point_size = -1;
|
||||
}
|
||||
else
|
||||
|
|
@ -1691,7 +1691,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
|
||||
{
|
||||
int len = snprintf (p, lim - p, ":dpi=%"pI"d",
|
||||
XINT (AREF (font, FONT_DPI_INDEX)));
|
||||
XFIXNUM (AREF (font, FONT_DPI_INDEX)));
|
||||
if (! (0 <= len && len < lim - p))
|
||||
return -1;
|
||||
p += len;
|
||||
|
|
@ -1700,7 +1700,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
|
||||
{
|
||||
int len = snprintf (p, lim - p, ":spacing=%"pI"d",
|
||||
XINT (AREF (font, FONT_SPACING_INDEX)));
|
||||
XFIXNUM (AREF (font, FONT_SPACING_INDEX)));
|
||||
if (! (0 <= len && len < lim - p))
|
||||
return -1;
|
||||
p += len;
|
||||
|
|
@ -1709,7 +1709,7 @@ font_unparse_fcname (Lisp_Object font, int pixel_size, char *name, int nbytes)
|
|||
if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX)))
|
||||
{
|
||||
int len = snprintf (p, lim - p,
|
||||
(XINT (AREF (font, FONT_AVGWIDTH_INDEX)) == 0
|
||||
(XFIXNUM (AREF (font, FONT_AVGWIDTH_INDEX)) == 0
|
||||
? ":scalable=true"
|
||||
: ":scalable=false"));
|
||||
if (! (0 <= len && len < lim - p))
|
||||
|
|
@ -2134,20 +2134,20 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
|
|||
for (i = FONT_WEIGHT_INDEX; i <= FONT_WIDTH_INDEX; i++)
|
||||
if (! NILP (spec_prop[i]) && ! EQ (AREF (entity, i), spec_prop[i]))
|
||||
{
|
||||
EMACS_INT diff = ((XINT (AREF (entity, i)) >> 8)
|
||||
- (XINT (spec_prop[i]) >> 8));
|
||||
EMACS_INT diff = ((XFIXNUM (AREF (entity, i)) >> 8)
|
||||
- (XFIXNUM (spec_prop[i]) >> 8));
|
||||
score |= min (eabs (diff), 127) << sort_shift_bits[i];
|
||||
}
|
||||
|
||||
/* Score the size. Maximum difference is 127. */
|
||||
if (! NILP (spec_prop[FONT_SIZE_INDEX])
|
||||
&& XINT (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
&& XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
{
|
||||
/* We use the higher 6-bit for the actual size difference. The
|
||||
lowest bit is set if the DPI is different. */
|
||||
EMACS_INT diff;
|
||||
EMACS_INT pixel_size = XINT (spec_prop[FONT_SIZE_INDEX]);
|
||||
EMACS_INT entity_size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
EMACS_INT pixel_size = XFIXNUM (spec_prop[FONT_SIZE_INDEX]);
|
||||
EMACS_INT entity_size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
|
||||
if (CONSP (Vface_font_rescale_alist))
|
||||
pixel_size *= font_rescale_ratio (entity);
|
||||
|
|
@ -2174,7 +2174,7 @@ font_score (Lisp_Object entity, Lisp_Object *spec_prop)
|
|||
static Lisp_Object
|
||||
font_vconcat_entity_vectors (Lisp_Object list)
|
||||
{
|
||||
EMACS_INT nargs = XFASTINT (Flength (list));
|
||||
EMACS_INT nargs = XFIXNAT (Flength (list));
|
||||
Lisp_Object *args;
|
||||
USE_SAFE_ALLOCA;
|
||||
SAFE_ALLOCA_LISP (args, nargs);
|
||||
|
|
@ -2492,7 +2492,7 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
|
|||
{
|
||||
if (! CHARACTERP (XCAR (val2)))
|
||||
continue;
|
||||
if (font_encode_char (font, XFASTINT (XCAR (val2)))
|
||||
if (font_encode_char (font, XFIXNAT (XCAR (val2)))
|
||||
== FONT_INVALID_CODE)
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -2504,7 +2504,7 @@ font_match_p (Lisp_Object spec, Lisp_Object font)
|
|||
{
|
||||
if (! CHARACTERP (AREF (val2, i)))
|
||||
continue;
|
||||
if (font_encode_char (font, XFASTINT (AREF (val2, i)))
|
||||
if (font_encode_char (font, XFIXNAT (AREF (val2, i)))
|
||||
!= FONT_INVALID_CODE)
|
||||
break;
|
||||
}
|
||||
|
|
@ -2565,7 +2565,7 @@ font_prepare_cache (struct frame *f, struct font_driver const *driver)
|
|||
else
|
||||
{
|
||||
val = XCDR (XCAR (val));
|
||||
XSETCAR (val, make_fixnum (XINT (XCAR (val)) + 1));
|
||||
XSETCAR (val, make_fixnum (XFIXNUM (XCAR (val)) + 1));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2582,8 +2582,8 @@ font_finish_cache (struct frame *f, struct font_driver const *driver)
|
|||
cache = val, val = XCDR (val);
|
||||
eassert (! NILP (val));
|
||||
tmp = XCDR (XCAR (val));
|
||||
XSETCAR (tmp, make_fixnum (XINT (XCAR (tmp)) - 1));
|
||||
if (XINT (XCAR (tmp)) == 0)
|
||||
XSETCAR (tmp, make_fixnum (XFIXNUM (XCAR (tmp)) - 1));
|
||||
if (XFIXNUM (XCAR (tmp)) == 0)
|
||||
{
|
||||
font_clear_cache (f, XCAR (val), driver);
|
||||
XSETCDR (cache, XCDR (val));
|
||||
|
|
@ -2699,14 +2699,14 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
|
|||
}
|
||||
for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++)
|
||||
if (FIXNUMP (AREF (spec, prop))
|
||||
&& ((XINT (AREF (spec, prop)) >> 8)
|
||||
!= (XINT (AREF (entity, prop)) >> 8)))
|
||||
&& ((XFIXNUM (AREF (spec, prop)) >> 8)
|
||||
!= (XFIXNUM (AREF (entity, prop)) >> 8)))
|
||||
prop = FONT_SPEC_MAX;
|
||||
if (prop < FONT_SPEC_MAX
|
||||
&& size
|
||||
&& XINT (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
&& XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
{
|
||||
int diff = XINT (AREF (entity, FONT_SIZE_INDEX)) - size;
|
||||
int diff = XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) - size;
|
||||
|
||||
if (eabs (diff) > FONT_PIXEL_SIZE_QUANTUM)
|
||||
prop = FONT_SPEC_MAX;
|
||||
|
|
@ -2714,13 +2714,13 @@ font_delete_unmatched (Lisp_Object vec, Lisp_Object spec, int size)
|
|||
if (prop < FONT_SPEC_MAX
|
||||
&& FIXNUMP (AREF (spec, FONT_DPI_INDEX))
|
||||
&& FIXNUMP (AREF (entity, FONT_DPI_INDEX))
|
||||
&& XINT (AREF (entity, FONT_DPI_INDEX)) != 0
|
||||
&& XFIXNUM (AREF (entity, FONT_DPI_INDEX)) != 0
|
||||
&& ! EQ (AREF (spec, FONT_DPI_INDEX), AREF (entity, FONT_DPI_INDEX)))
|
||||
prop = FONT_SPEC_MAX;
|
||||
if (prop < FONT_SPEC_MAX
|
||||
&& FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
|
||||
&& FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
|
||||
&& XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0
|
||||
&& XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0
|
||||
&& ! EQ (AREF (spec, FONT_AVGWIDTH_INDEX),
|
||||
AREF (entity, FONT_AVGWIDTH_INDEX)))
|
||||
prop = FONT_SPEC_MAX;
|
||||
|
|
@ -2748,7 +2748,7 @@ font_list_entities (struct frame *f, Lisp_Object spec)
|
|||
eassert (FONT_SPEC_P (spec));
|
||||
|
||||
if (FIXNUMP (AREF (spec, FONT_SIZE_INDEX)))
|
||||
size = XINT (AREF (spec, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (spec, FONT_SIZE_INDEX));
|
||||
else if (FLOATP (AREF (spec, FONT_SIZE_INDEX)))
|
||||
size = font_pixel_size (f, spec);
|
||||
else
|
||||
|
|
@ -2873,8 +2873,8 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
|
||||
eassert (FONT_ENTITY_P (entity));
|
||||
size = AREF (entity, FONT_SIZE_INDEX);
|
||||
if (XINT (size) != 0)
|
||||
pixel_size = XINT (size);
|
||||
if (XFIXNUM (size) != 0)
|
||||
pixel_size = XFIXNUM (size);
|
||||
|
||||
val = AREF (entity, FONT_TYPE_INDEX);
|
||||
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
|
|||
pixel_size = font_pixel_size (f, spec);
|
||||
if (pixel_size == 0 && FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
|
||||
{
|
||||
double pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
|
||||
double pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
|
||||
|
||||
pixel_size = POINT_TO_PIXEL (pt / 10, FRAME_RES_Y (f));
|
||||
if (pixel_size < 1)
|
||||
|
|
@ -3241,7 +3241,7 @@ font_find_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec, int
|
|||
|
||||
if (! NILP (alters))
|
||||
{
|
||||
EMACS_INT alterslen = XFASTINT (Flength (alters));
|
||||
EMACS_INT alterslen = XFIXNAT (Flength (alters));
|
||||
SAFE_ALLOCA_LISP (family, alterslen + 2);
|
||||
for (i = 0; CONSP (alters); i++, alters = XCDR (alters))
|
||||
family[i] = XCAR (alters);
|
||||
|
|
@ -3299,8 +3299,8 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
|
|||
int size;
|
||||
|
||||
if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX))
|
||||
&& XINT (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
&& XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) > 0)
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
else
|
||||
{
|
||||
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
|
|||
{
|
||||
double pt;
|
||||
if (FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
|
||||
pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
|
||||
pt = XFIXNUM (attrs[LFACE_HEIGHT_INDEX]);
|
||||
else
|
||||
{
|
||||
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
|
||||
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
|
||||
eassert (FIXNUMP (height));
|
||||
pt = XINT (height);
|
||||
pt = XFIXNUM (height);
|
||||
}
|
||||
|
||||
pt /= 10;
|
||||
|
|
@ -3325,7 +3325,7 @@ font_open_for_lface (struct frame *f, Lisp_Object entity, Lisp_Object *attrs, Li
|
|||
{
|
||||
Lisp_Object ffsize = get_frame_param (f, Qfontsize);
|
||||
size = (FIXED_OR_FLOATP (ffsize)
|
||||
? POINT_TO_PIXEL (XINT (ffsize), FRAME_RES_Y (f)) : 0);
|
||||
? POINT_TO_PIXEL (XFIXNUM (ffsize), FRAME_RES_Y (f)) : 0);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
@ -3372,7 +3372,7 @@ font_load_for_lface (struct frame *f, Lisp_Object *attrs, Lisp_Object spec)
|
|||
Lisp_Object lsize = Ffont_get (spec, QCsize);
|
||||
|
||||
if ((FLOATP (lsize) && XFLOAT_DATA (lsize) == font_size)
|
||||
|| (FIXNUMP (lsize) && XINT (lsize) == font_size))
|
||||
|| (FIXNUMP (lsize) && XFIXNUM (lsize) == font_size))
|
||||
{
|
||||
ASET (spec, FONT_FAMILY_INDEX,
|
||||
font_intern_prop (p, tail - p, 1));
|
||||
|
|
@ -3673,7 +3673,7 @@ font_filter_properties (Lisp_Object font,
|
|||
|
||||
if (strcmp (boolean_properties[i], keystr) == 0)
|
||||
{
|
||||
const char *str = FIXNUMP (val) ? (XINT (val) ? "true" : "false")
|
||||
const char *str = FIXNUMP (val) ? (XFIXNUM (val) ? "true" : "false")
|
||||
: SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val))
|
||||
: "true";
|
||||
|
||||
|
|
@ -3828,7 +3828,7 @@ font_range (ptrdiff_t pos, ptrdiff_t pos_byte, ptrdiff_t *limit,
|
|||
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte);
|
||||
category = CHAR_TABLE_REF (Vunicode_category_table, c);
|
||||
if (FIXNUMP (category)
|
||||
&& (XINT (category) == UNICODE_CATEGORY_Cf
|
||||
&& (XFIXNUM (category) == UNICODE_CATEGORY_Cf
|
||||
|| CHAR_VARIATION_SELECTOR_P (c)))
|
||||
continue;
|
||||
if (NILP (font_object))
|
||||
|
|
@ -4145,9 +4145,9 @@ are to be displayed on. If omitted, the selected frame is used. */)
|
|||
if (FIXNUMP (val))
|
||||
{
|
||||
Lisp_Object font_dpi = AREF (font, FONT_DPI_INDEX);
|
||||
int dpi = FIXNUMP (font_dpi) ? XINT (font_dpi) : FRAME_RES_Y (f);
|
||||
int dpi = FIXNUMP (font_dpi) ? XFIXNUM (font_dpi) : FRAME_RES_Y (f);
|
||||
plist[n++] = QCheight;
|
||||
plist[n++] = make_fixnum (PIXEL_TO_POINT (XINT (val) * 10, dpi));
|
||||
plist[n++] = make_fixnum (PIXEL_TO_POINT (XFIXNUM (val) * 10, dpi));
|
||||
}
|
||||
else if (FLOATP (val))
|
||||
{
|
||||
|
|
@ -4232,7 +4232,7 @@ how close they are to PREFER. */)
|
|||
if (! NILP (num))
|
||||
{
|
||||
CHECK_FIXNUM (num);
|
||||
n = XINT (num);
|
||||
n = XFIXNUM (num);
|
||||
if (n <= 0)
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -4358,7 +4358,7 @@ clear_font_cache (struct frame *f)
|
|||
! EQ (XCAR (XCAR (val)), driver_list->driver->type))
|
||||
val = XCDR (val);
|
||||
tmp = XCDR (XCAR (val));
|
||||
if (XINT (XCAR (tmp)) == 0)
|
||||
if (XFIXNUM (XCAR (tmp)) == 0)
|
||||
{
|
||||
font_clear_cache (f, XCAR (val), driver_list->driver);
|
||||
XSETCDR (cache, XCDR (val));
|
||||
|
|
@ -4432,10 +4432,10 @@ GSTRING. */)
|
|||
gstring = larger_vector (gstring,
|
||||
LGSTRING_GLYPH_LEN (gstring), -1);
|
||||
}
|
||||
if (i == 3 || XINT (n) == 0)
|
||||
if (i == 3 || XFIXNUM (n) == 0)
|
||||
return Qnil;
|
||||
if (XINT (n) < LGSTRING_GLYPH_LEN (gstring))
|
||||
LGSTRING_SET_GLYPH (gstring, XINT (n), Qnil);
|
||||
if (XFIXNUM (n) < LGSTRING_GLYPH_LEN (gstring))
|
||||
LGSTRING_SET_GLYPH (gstring, XFIXNUM (n), Qnil);
|
||||
|
||||
/* Check FROM_IDX and TO_IDX of each GLYPH in GSTRING to assure that
|
||||
GLYPHS covers all characters (except for the last few ones) in
|
||||
|
|
@ -4469,7 +4469,7 @@ GSTRING. */)
|
|||
from = LGLYPH_FROM (glyph);
|
||||
to = LGLYPH_TO (glyph);
|
||||
}
|
||||
return composition_gstring_put_cache (gstring, XINT (n));
|
||||
return composition_gstring_put_cache (gstring, XFIXNUM (n));
|
||||
|
||||
shaper_error:
|
||||
return Qnil;
|
||||
|
|
@ -4495,7 +4495,7 @@ where
|
|||
font = XFONT_OBJECT (font_object);
|
||||
if (! font->driver->get_variation_glyphs)
|
||||
return Qnil;
|
||||
n = font->driver->get_variation_glyphs (font, XINT (character), variations);
|
||||
n = font->driver->get_variation_glyphs (font, XFIXNUM (character), variations);
|
||||
if (! n)
|
||||
return Qnil;
|
||||
val = Qnil;
|
||||
|
|
@ -4556,7 +4556,7 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
|
|||
if (NILP (position))
|
||||
{
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XINT (ch);
|
||||
c = XFIXNUM (ch);
|
||||
f = XFRAME (selected_frame);
|
||||
face_id = lookup_basic_face (NULL, f, DEFAULT_FACE_ID);
|
||||
pos = -1;
|
||||
|
|
@ -4567,16 +4567,16 @@ DEFUN ("internal-char-font", Finternal_char_font, Sinternal_char_font, 1, 2, 0,
|
|||
struct window *w;
|
||||
|
||||
CHECK_FIXNUM_COERCE_MARKER (position);
|
||||
if (! (BEGV <= XINT (position) && XINT (position) < ZV))
|
||||
if (! (BEGV <= XFIXNUM (position) && XFIXNUM (position) < ZV))
|
||||
args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
|
||||
pos = XINT (position);
|
||||
pos = XFIXNUM (position);
|
||||
pos_byte = CHAR_TO_BYTE (pos);
|
||||
if (NILP (ch))
|
||||
c = FETCH_CHAR (pos_byte);
|
||||
else
|
||||
{
|
||||
CHECK_FIXNAT (ch);
|
||||
c = XINT (ch);
|
||||
c = XFIXNUM (ch);
|
||||
}
|
||||
window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
|
||||
if (NILP (window))
|
||||
|
|
@ -4669,13 +4669,13 @@ glyph-string. */)
|
|||
CHECK_FIXNAT (to);
|
||||
CHECK_FIXNAT (index);
|
||||
|
||||
if (XINT (from) >= XINT (to) || XINT (to) > len)
|
||||
if (XFIXNUM (from) >= XFIXNUM (to) || XFIXNUM (to) > len)
|
||||
args_out_of_range_3 (from, to, make_fixnum (len));
|
||||
if (XINT (index) >= ASIZE (gstring_out))
|
||||
if (XFIXNUM (index) >= ASIZE (gstring_out))
|
||||
args_out_of_range (index, make_fixnum (ASIZE (gstring_out)));
|
||||
num = font->driver->otf_drive (font, otf_features,
|
||||
gstring_in, XINT (from), XINT (to),
|
||||
gstring_out, XINT (index), 0);
|
||||
gstring_in, XFIXNUM (from), XFIXNUM (to),
|
||||
gstring_out, XFIXNUM (index), 0);
|
||||
if (num < 0)
|
||||
return Qnil;
|
||||
return make_fixnum (num);
|
||||
|
|
@ -4708,7 +4708,7 @@ corresponding character. */)
|
|||
|
||||
gstring_in = Ffont_make_gstring (font_object, make_fixnum (1));
|
||||
g = LGSTRING_GLYPH (gstring_in, 0);
|
||||
LGLYPH_SET_CHAR (g, XINT (character));
|
||||
LGLYPH_SET_CHAR (g, XFIXNUM (character));
|
||||
gstring_out = Ffont_make_gstring (font_object, make_fixnum (10));
|
||||
while ((num = font->driver->otf_drive (font, otf_features, gstring_in, 0, 1,
|
||||
gstring_out, 0, 1)) < 0)
|
||||
|
|
@ -4741,14 +4741,14 @@ DEFUN ("open-font", Fopen_font, Sopen_font, 1, 3, 0,
|
|||
CHECK_FONT_ENTITY (font_entity);
|
||||
|
||||
if (NILP (size))
|
||||
isize = XINT (AREF (font_entity, FONT_SIZE_INDEX));
|
||||
isize = XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX));
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM_OR_FLOAT (size);
|
||||
if (FLOATP (size))
|
||||
isize = POINT_TO_PIXEL (XFLOAT_DATA (size), FRAME_RES_Y (f));
|
||||
else
|
||||
isize = XINT (size);
|
||||
isize = XFIXNUM (size);
|
||||
if (! (INT_MIN <= isize && isize <= INT_MAX))
|
||||
args_out_of_range (font_entity, size);
|
||||
if (isize == 0)
|
||||
|
|
@ -4862,11 +4862,11 @@ the corresponding element is nil. */)
|
|||
validate_region (&from, &to);
|
||||
if (EQ (from, to))
|
||||
return Qnil;
|
||||
len = XFASTINT (to) - XFASTINT (from);
|
||||
len = XFIXNAT (to) - XFIXNAT (from);
|
||||
SAFE_ALLOCA_LISP (chars, len);
|
||||
charpos = XFASTINT (from);
|
||||
charpos = XFIXNAT (from);
|
||||
bytepos = CHAR_TO_BYTE (charpos);
|
||||
for (i = 0; charpos < XFASTINT (to); i++)
|
||||
for (i = 0; charpos < XFIXNAT (to); i++)
|
||||
{
|
||||
int c;
|
||||
FETCH_CHAR_ADVANCE (c, charpos, bytepos);
|
||||
|
|
@ -4925,7 +4925,7 @@ the corresponding element is nil. */)
|
|||
for (i = 0; i < len; i++)
|
||||
{
|
||||
Lisp_Object g;
|
||||
int c = XFASTINT (chars[i]);
|
||||
int c = XFIXNAT (chars[i]);
|
||||
unsigned code;
|
||||
struct font_metrics metrics;
|
||||
|
||||
|
|
@ -4979,18 +4979,18 @@ character at index specified by POSITION. */)
|
|||
if (XBUFFER (w->contents) != current_buffer)
|
||||
error ("Specified window is not displaying the current buffer");
|
||||
CHECK_FIXNUM_COERCE_MARKER (position);
|
||||
if (! (BEGV <= XINT (position) && XINT (position) < ZV))
|
||||
if (! (BEGV <= XFIXNUM (position) && XFIXNUM (position) < ZV))
|
||||
args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
|
||||
}
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM (position);
|
||||
CHECK_STRING (string);
|
||||
if (! (0 <= XINT (position) && XINT (position) < SCHARS (string)))
|
||||
if (! (0 <= XFIXNUM (position) && XFIXNUM (position) < SCHARS (string)))
|
||||
args_out_of_range (string, position);
|
||||
}
|
||||
|
||||
return font_at (-1, XINT (position), NULL, w, string);
|
||||
return font_at (-1, XFIXNUM (position), NULL, w, string);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
|
@ -5015,7 +5015,7 @@ Type C-l to recover what previously shown. */)
|
|||
{
|
||||
Lisp_Object ch = Faref (string, make_fixnum (i));
|
||||
Lisp_Object val;
|
||||
int c = XINT (ch);
|
||||
int c = XFIXNUM (ch);
|
||||
|
||||
code[i] = font->driver->encode_char (font, c);
|
||||
if (code[i] == FONT_INVALID_CODE)
|
||||
|
|
|
|||
|
|
@ -186,15 +186,15 @@ enum font_property_index
|
|||
/* Return the numeric weight value of FONT. */
|
||||
#define FONT_WEIGHT_NUMERIC(font) \
|
||||
(FIXNUMP (AREF ((font), FONT_WEIGHT_INDEX)) \
|
||||
? (XINT (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1)
|
||||
? (XFIXNUM (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1)
|
||||
/* Return the numeric slant value of FONT. */
|
||||
#define FONT_SLANT_NUMERIC(font) \
|
||||
(FIXNUMP (AREF ((font), FONT_SLANT_INDEX)) \
|
||||
? (XINT (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1)
|
||||
? (XFIXNUM (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1)
|
||||
/* Return the numeric width value of FONT. */
|
||||
#define FONT_WIDTH_NUMERIC(font) \
|
||||
(FIXNUMP (AREF ((font), FONT_WIDTH_INDEX)) \
|
||||
? (XINT (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
|
||||
? (XFIXNUM (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
|
||||
/* Return the symbolic weight value of FONT. */
|
||||
#define FONT_WEIGHT_SYMBOLIC(font) \
|
||||
font_style_symbolic (font, FONT_WEIGHT_INDEX, false)
|
||||
|
|
|
|||
|
|
@ -276,7 +276,7 @@ set_fontset_fallback (Lisp_Object fontset, Lisp_Object fallback)
|
|||
the order of listing by font backends, the higher bits represents
|
||||
the order given by charset priority list. The smaller value is
|
||||
preferable. */
|
||||
#define RFONT_DEF_SCORE(rfont_def) XINT (AREF (rfont_def, 3))
|
||||
#define RFONT_DEF_SCORE(rfont_def) XFIXNUM (AREF (rfont_def, 3))
|
||||
#define RFONT_DEF_SET_SCORE(rfont_def, score) \
|
||||
ASET ((rfont_def), 3, make_fixnum (score))
|
||||
#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
|
|||
|
||||
if (CONSP (range))
|
||||
{
|
||||
int from = XINT (XCAR (range));
|
||||
int to = XINT (XCDR (range));
|
||||
int from = XFIXNUM (XCAR (range));
|
||||
int to = XFIXNUM (XCDR (range));
|
||||
int from1, to1;
|
||||
|
||||
do {
|
||||
|
|
@ -561,7 +561,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
|
|||
|
||||
if (ASIZE (vec) > 1)
|
||||
{
|
||||
if (XINT (XCAR (font_group)) != charset_ordered_list_tick)
|
||||
if (XFIXNUM (XCAR (font_group)) != charset_ordered_list_tick)
|
||||
/* We have just created the font-group,
|
||||
or the charset priorities were changed. */
|
||||
reorder_font_vector (font_group, face->ascii_face->font);
|
||||
|
|
@ -577,7 +577,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
|
|||
break;
|
||||
repertory = FONT_DEF_REPERTORY (RFONT_DEF_FONT_DEF (rfont_def));
|
||||
|
||||
if (XINT (repertory) == charset_id)
|
||||
if (XFIXNUM (repertory) == charset_id)
|
||||
{
|
||||
charset_matched = i;
|
||||
break;
|
||||
|
|
@ -634,7 +634,7 @@ fontset_find_font (Lisp_Object fontset, int c, struct face *face,
|
|||
return Qt;
|
||||
}
|
||||
if (FIXNUMP (RFONT_DEF_FACE (rfont_def))
|
||||
&& XINT (RFONT_DEF_FACE (rfont_def)) < 0)
|
||||
&& XFIXNUM (RFONT_DEF_FACE (rfont_def)) < 0)
|
||||
/* We couldn't open this font last time. */
|
||||
continue;
|
||||
|
||||
|
|
@ -892,7 +892,7 @@ free_face_fontset (struct frame *f, struct face *face)
|
|||
next_fontset_id = face->fontset;
|
||||
if (! NILP (FONTSET_DEFAULT (fontset)))
|
||||
{
|
||||
int id = XINT (FONTSET_ID (FONTSET_DEFAULT (fontset)));
|
||||
int id = XFIXNUM (FONTSET_ID (FONTSET_DEFAULT (fontset)));
|
||||
|
||||
fontset = AREF (Vfontset_table, id);
|
||||
eassert (!NILP (fontset) && ! BASE_FONTSET_P (fontset));
|
||||
|
|
@ -981,7 +981,7 @@ face_for_char (struct frame *f, struct face *face, int c,
|
|||
val = assq_no_quit (charset, Vfont_encoding_charset_alist);
|
||||
if (CONSP (val) && CHARSETP (XCDR (val)))
|
||||
charset = XCDR (val);
|
||||
id = XINT (CHARSET_SYMBOL_ID (charset));
|
||||
id = XFIXNUM (CHARSET_SYMBOL_ID (charset));
|
||||
}
|
||||
else
|
||||
id = -1;
|
||||
|
|
@ -991,7 +991,7 @@ face_for_char (struct frame *f, struct face *face, int c,
|
|||
if (VECTORP (rfont_def))
|
||||
{
|
||||
if (FIXNUMP (RFONT_DEF_FACE (rfont_def)))
|
||||
face_id = XINT (RFONT_DEF_FACE (rfont_def));
|
||||
face_id = XFIXNUM (RFONT_DEF_FACE (rfont_def));
|
||||
else
|
||||
{
|
||||
Lisp_Object font_object;
|
||||
|
|
@ -1004,7 +1004,7 @@ face_for_char (struct frame *f, struct face *face, int c,
|
|||
else
|
||||
{
|
||||
if (FIXNUMP (FONTSET_NOFONT_FACE (fontset)))
|
||||
face_id = XINT (FONTSET_NOFONT_FACE (fontset));
|
||||
face_id = XFIXNUM (FONTSET_NOFONT_FACE (fontset));
|
||||
else
|
||||
{
|
||||
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)
|
|||
val = assq_no_quit (charset, Vfont_encoding_charset_alist);
|
||||
if (CONSP (val) && CHARSETP (XCDR (val)))
|
||||
charset = XCDR (val);
|
||||
id = XINT (CHARSET_SYMBOL_ID (charset));
|
||||
id = XFIXNUM (CHARSET_SYMBOL_ID (charset));
|
||||
}
|
||||
else
|
||||
id = -1;
|
||||
|
|
@ -1083,7 +1083,7 @@ make_fontset_for_ascii_face (struct frame *f, int base_fontset_id, struct face *
|
|||
base_fontset = Vdefault_fontset;
|
||||
|
||||
fontset = make_fontset (frame, Qnil, base_fontset);
|
||||
return XINT (FONTSET_ID (fontset));
|
||||
return XFIXNUM (FONTSET_ID (fontset));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1306,7 +1306,7 @@ free_realized_fontsets (Lisp_Object base)
|
|||
tail = XCDR (tail))
|
||||
{
|
||||
struct frame *f = XFRAME (FONTSET_FRAME (this));
|
||||
int face_id = XINT (XCDR (XCAR (tail)));
|
||||
int face_id = XFIXNUM (XCDR (XCAR (tail)));
|
||||
struct face *face = FACE_FROM_ID_OR_NULL (f, face_id);
|
||||
|
||||
/* Face THIS itself is also freed by the following call. */
|
||||
|
|
@ -1399,7 +1399,7 @@ static void
|
|||
set_fontset_font (Lisp_Object arg, Lisp_Object range)
|
||||
{
|
||||
Lisp_Object fontset, font_def, add, ascii, script_range_list;
|
||||
int from = XINT (XCAR (range)), to = XINT (XCDR (range));
|
||||
int from = XFIXNUM (XCAR (range)), to = XFIXNUM (XCDR (range));
|
||||
|
||||
fontset = AREF (arg, 0);
|
||||
font_def = AREF (arg, 1);
|
||||
|
|
@ -1415,8 +1415,8 @@ set_fontset_font (Lisp_Object arg, Lisp_Object range)
|
|||
range = Fcons (make_fixnum (0x80), XCDR (range));
|
||||
}
|
||||
|
||||
#define SCRIPT_FROM XINT (XCAR (XCAR (script_range_list)))
|
||||
#define SCRIPT_TO XINT (XCDR (XCAR (script_range_list)))
|
||||
#define SCRIPT_FROM XFIXNUM (XCAR (XCAR (script_range_list)))
|
||||
#define SCRIPT_TO XFIXNUM (XCDR (XCAR (script_range_list)))
|
||||
#define POP_SCRIPT_RANGE() script_range_list = XCDR (script_range_list)
|
||||
|
||||
for (; CONSP (script_range_list) && SCRIPT_TO < from; POP_SCRIPT_RANGE ())
|
||||
|
|
@ -1544,7 +1544,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
|
|||
|
||||
if (CHARACTERP (target))
|
||||
{
|
||||
if (XFASTINT (target) < 0x80)
|
||||
if (XFIXNAT (target) < 0x80)
|
||||
error ("Can't set a font for partial ASCII range");
|
||||
range_list = list1 (Fcons (target, target));
|
||||
}
|
||||
|
|
@ -1556,9 +1556,9 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
|
|||
to = Fcdr (target);
|
||||
CHECK_CHARACTER (from);
|
||||
CHECK_CHARACTER (to);
|
||||
if (XFASTINT (from) < 0x80)
|
||||
if (XFIXNAT (from) < 0x80)
|
||||
{
|
||||
if (XFASTINT (from) != 0 || XFASTINT (to) < 0x7F)
|
||||
if (XFIXNAT (from) != 0 || XFIXNAT (to) < 0x7F)
|
||||
error ("Can't set a font for partial ASCII range");
|
||||
ascii_changed = 1;
|
||||
}
|
||||
|
|
@ -1629,7 +1629,7 @@ appended. By default, FONT-SPEC overrides the previous settings. */)
|
|||
if (ascii_changed)
|
||||
{
|
||||
Lisp_Object tail, fr;
|
||||
int fontset_id = XINT (FONTSET_ID (fontset));
|
||||
int fontset_id = XFIXNUM (FONTSET_ID (fontset));
|
||||
|
||||
set_fontset_ascii (fontset, fontname);
|
||||
name = FONTSET_NAME (fontset);
|
||||
|
|
@ -1762,7 +1762,7 @@ fontset_from_font (Lisp_Object font_object)
|
|||
|
||||
val = assoc_no_quit (font_spec, auto_fontset_alist);
|
||||
if (CONSP (val))
|
||||
return XINT (FONTSET_ID (XCDR (val)));
|
||||
return XFIXNUM (FONTSET_ID (XCDR (val)));
|
||||
if (num_auto_fontsets++ == 0)
|
||||
alias = intern ("fontset-startup");
|
||||
else
|
||||
|
|
@ -1797,7 +1797,7 @@ fontset_from_font (Lisp_Object font_object)
|
|||
|
||||
set_fontset_ascii (fontset, font_name);
|
||||
|
||||
return XINT (FONTSET_ID (fontset));
|
||||
return XFIXNUM (FONTSET_ID (fontset));
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1985,7 +1985,7 @@ patterns. */)
|
|||
fontset = check_fontset_name (name, &frame);
|
||||
|
||||
CHECK_CHARACTER (ch);
|
||||
c = XINT (ch);
|
||||
c = XFIXNUM (ch);
|
||||
list = Qnil;
|
||||
while (1)
|
||||
{
|
||||
|
|
@ -2002,7 +2002,7 @@ patterns. */)
|
|||
repertory = AREF (val, 1);
|
||||
if (FIXNUMP (repertory))
|
||||
{
|
||||
struct charset *charset = CHARSET_FROM_ID (XINT (repertory));
|
||||
struct charset *charset = CHARSET_FROM_ID (XFIXNUM (repertory));
|
||||
|
||||
if (! CHAR_CHARSET_P (c, charset))
|
||||
continue;
|
||||
|
|
|
|||
166
src/frame.c
166
src/frame.c
|
|
@ -159,9 +159,9 @@ frame_size_history_add (struct frame *f, Lisp_Object fun_symbol,
|
|||
XSETFRAME (frame, f);
|
||||
if (CONSP (frame_size_history)
|
||||
&& FIXNUMP (XCAR (frame_size_history))
|
||||
&& 0 < XINT (XCAR (frame_size_history)))
|
||||
&& 0 < XFIXNUM (XCAR (frame_size_history)))
|
||||
frame_size_history =
|
||||
Fcons (make_fixnum (XINT (XCAR (frame_size_history)) - 1),
|
||||
Fcons (make_fixnum (XFIXNUM (XCAR (frame_size_history)) - 1),
|
||||
Fcons (list4
|
||||
(frame, fun_symbol,
|
||||
((width > 0)
|
||||
|
|
@ -220,7 +220,7 @@ set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
|||
return;
|
||||
|
||||
if (TYPE_RANGED_FIXNUMP (int, value))
|
||||
nlines = XINT (value);
|
||||
nlines = XFIXNUM (value);
|
||||
else
|
||||
nlines = 0;
|
||||
|
||||
|
|
@ -359,7 +359,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
|
|||
|| (NILP (horizontal)
|
||||
&& FIXED_OR_FLOATP (par_size = get_frame_param (f, Qmin_height))))
|
||||
{
|
||||
int min_size = XINT (par_size);
|
||||
int min_size = XFIXNUM (par_size);
|
||||
|
||||
/* Don't allow phantom frames. */
|
||||
if (min_size < 1)
|
||||
|
|
@ -372,7 +372,7 @@ frame_windows_min_size (Lisp_Object frame, Lisp_Object horizontal,
|
|||
: FRAME_COLUMN_WIDTH (f)));
|
||||
}
|
||||
else
|
||||
retval = XINT (call4 (Qframe_windows_min_size, frame, horizontal,
|
||||
retval = XFIXNUM (call4 (Qframe_windows_min_size, frame, horizontal,
|
||||
ignore, pixelwise));
|
||||
/* Don't allow too small height of text-mode frames, or else cm.c
|
||||
might abort in cmcheckmagic. */
|
||||
|
|
@ -1598,7 +1598,7 @@ candidate_frame (Lisp_Object candidate, Lisp_Object frame, Lisp_Object minibuf)
|
|||
FRAME_FOCUS_FRAME (c)))
|
||||
return candidate;
|
||||
}
|
||||
else if (FIXNUMP (minibuf) && XINT (minibuf) == 0)
|
||||
else if (FIXNUMP (minibuf) && XFIXNUM (minibuf) == 0)
|
||||
{
|
||||
if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c))
|
||||
return candidate;
|
||||
|
|
@ -2320,8 +2320,8 @@ and returns whatever that function returns. */)
|
|||
|
||||
if (! NILP (x))
|
||||
{
|
||||
int col = XINT (x);
|
||||
int row = XINT (y);
|
||||
int col = XFIXNUM (x);
|
||||
int row = XFIXNUM (y);
|
||||
pixel_to_glyph_coords (f, col, row, &col, &row, NULL, 1);
|
||||
XSETINT (x, col);
|
||||
XSETINT (y, row);
|
||||
|
|
@ -2430,19 +2430,19 @@ before calling this function on it, like this.
|
|||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (FRAME_WINDOW_P (XFRAME (frame)))
|
||||
/* Warping the mouse will cause enternotify and focus events. */
|
||||
frame_set_mouse_position (XFRAME (frame), XINT (x), XINT (y));
|
||||
frame_set_mouse_position (XFRAME (frame), XFIXNUM (x), XFIXNUM (y));
|
||||
#else
|
||||
#if defined (MSDOS)
|
||||
if (FRAME_MSDOS_P (XFRAME (frame)))
|
||||
{
|
||||
Fselect_frame (frame, Qnil);
|
||||
mouse_moveto (XINT (x), XINT (y));
|
||||
mouse_moveto (XFIXNUM (x), XFIXNUM (y));
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE_GPM
|
||||
{
|
||||
Fselect_frame (frame, Qnil);
|
||||
term_mouse_moveto (XINT (x), XINT (y));
|
||||
term_mouse_moveto (XFIXNUM (x), XFIXNUM (y));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -2471,19 +2471,19 @@ before calling this function on it, like this.
|
|||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
if (FRAME_WINDOW_P (XFRAME (frame)))
|
||||
/* Warping the mouse will cause enternotify and focus events. */
|
||||
frame_set_mouse_pixel_position (XFRAME (frame), XINT (x), XINT (y));
|
||||
frame_set_mouse_pixel_position (XFRAME (frame), XFIXNUM (x), XFIXNUM (y));
|
||||
#else
|
||||
#if defined (MSDOS)
|
||||
if (FRAME_MSDOS_P (XFRAME (frame)))
|
||||
{
|
||||
Fselect_frame (frame, Qnil);
|
||||
mouse_moveto (XINT (x), XINT (y));
|
||||
mouse_moveto (XFIXNUM (x), XFIXNUM (y));
|
||||
}
|
||||
#else
|
||||
#ifdef HAVE_GPM
|
||||
{
|
||||
Fselect_frame (frame, Qnil);
|
||||
term_mouse_moveto (XINT (x), XINT (y));
|
||||
term_mouse_moveto (XFIXNUM (x), XFIXNUM (y));
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
|
@ -3193,7 +3193,7 @@ list, but are otherwise ignored. */)
|
|||
#endif
|
||||
|
||||
{
|
||||
EMACS_INT length = XFASTINT (Flength (alist));
|
||||
EMACS_INT length = XFIXNAT (Flength (alist));
|
||||
ptrdiff_t i;
|
||||
Lisp_Object *parms;
|
||||
Lisp_Object *values;
|
||||
|
|
@ -3428,8 +3428,8 @@ multiple of the default frame font height. */)
|
|||
CHECK_TYPE_RANGED_INTEGER (int, height);
|
||||
|
||||
pixel_height = (!NILP (pixelwise)
|
||||
? XINT (height)
|
||||
: XINT (height) * FRAME_LINE_HEIGHT (f));
|
||||
? XFIXNUM (height)
|
||||
: XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
|
||||
adjust_frame_size (f, -1, pixel_height, 1, !NILP (pretend), Qheight);
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -3453,8 +3453,8 @@ multiple of the default frame font width. */)
|
|||
CHECK_TYPE_RANGED_INTEGER (int, width);
|
||||
|
||||
pixel_width = (!NILP (pixelwise)
|
||||
? XINT (width)
|
||||
: XINT (width) * FRAME_COLUMN_WIDTH (f));
|
||||
? XFIXNUM (width)
|
||||
: XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
|
||||
adjust_frame_size (f, pixel_width, -1, 1, !NILP (pretend), Qwidth);
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -3476,11 +3476,11 @@ font height. */)
|
|||
CHECK_TYPE_RANGED_INTEGER (int, height);
|
||||
|
||||
pixel_width = (!NILP (pixelwise)
|
||||
? XINT (width)
|
||||
: XINT (width) * FRAME_COLUMN_WIDTH (f));
|
||||
? XFIXNUM (width)
|
||||
: XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
|
||||
pixel_height = (!NILP (pixelwise)
|
||||
? XINT (height)
|
||||
: XINT (height) * FRAME_LINE_HEIGHT (f));
|
||||
? XFIXNUM (height)
|
||||
: XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
|
||||
adjust_frame_size (f, pixel_width, pixel_height, 1, 0, Qsize);
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -3520,7 +3520,7 @@ bottom edge of FRAME's display. */)
|
|||
if (FRAME_WINDOW_P (f))
|
||||
{
|
||||
#ifdef HAVE_WINDOW_SYSTEM
|
||||
x_set_offset (f, XINT (x), XINT (y), 1);
|
||||
x_set_offset (f, XFIXNUM (x), XFIXNUM (y), 1);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -3689,10 +3689,10 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what,
|
|||
}
|
||||
|
||||
/* Workarea available. */
|
||||
parent_left = XINT (Fnth (make_fixnum (0), workarea));
|
||||
parent_top = XINT (Fnth (make_fixnum (1), workarea));
|
||||
parent_width = XINT (Fnth (make_fixnum (2), workarea));
|
||||
parent_height = XINT (Fnth (make_fixnum (3), workarea));
|
||||
parent_left = XFIXNUM (Fnth (make_fixnum (0), workarea));
|
||||
parent_top = XFIXNUM (Fnth (make_fixnum (1), workarea));
|
||||
parent_width = XFIXNUM (Fnth (make_fixnum (2), workarea));
|
||||
parent_height = XFIXNUM (Fnth (make_fixnum (3), workarea));
|
||||
*parent_done = 1;
|
||||
}
|
||||
}
|
||||
|
|
@ -3720,12 +3720,12 @@ frame_float (struct frame *f, Lisp_Object val, enum frame_float_type what,
|
|||
if (!NILP (outer_edges))
|
||||
{
|
||||
outer_minus_text_width
|
||||
= (XINT (Fnth (make_fixnum (2), outer_edges))
|
||||
- XINT (Fnth (make_fixnum (0), outer_edges))
|
||||
= (XFIXNUM (Fnth (make_fixnum (2), outer_edges))
|
||||
- XFIXNUM (Fnth (make_fixnum (0), outer_edges))
|
||||
- FRAME_TEXT_WIDTH (f));
|
||||
outer_minus_text_height
|
||||
= (XINT (Fnth (make_fixnum (3), outer_edges))
|
||||
- XINT (Fnth (make_fixnum (1), outer_edges))
|
||||
= (XFIXNUM (Fnth (make_fixnum (3), outer_edges))
|
||||
- XFIXNUM (Fnth (make_fixnum (1), outer_edges))
|
||||
- FRAME_TEXT_HEIGHT (f));
|
||||
}
|
||||
else
|
||||
|
|
@ -3875,10 +3875,10 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
if (EQ (prop, Qwidth))
|
||||
{
|
||||
if (RANGED_FIXNUMP (0, val, INT_MAX))
|
||||
width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
|
||||
width = XFIXNAT (val) * FRAME_COLUMN_WIDTH (f) ;
|
||||
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
|
||||
&& RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
|
||||
width = XFASTINT (XCDR (val));
|
||||
width = XFIXNAT (XCDR (val));
|
||||
else if (FLOATP (val))
|
||||
width = frame_float (f, val, FRAME_FLOAT_WIDTH, &parent_done,
|
||||
&outer_done, -1);
|
||||
|
|
@ -3886,10 +3886,10 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
else if (EQ (prop, Qheight))
|
||||
{
|
||||
if (RANGED_FIXNUMP (0, val, INT_MAX))
|
||||
height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
|
||||
height = XFIXNAT (val) * FRAME_LINE_HEIGHT (f);
|
||||
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
|
||||
&& RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
|
||||
height = XFASTINT (XCDR (val));
|
||||
height = XFIXNAT (XCDR (val));
|
||||
else if (FLOATP (val))
|
||||
height = frame_float (f, val, FRAME_FLOAT_HEIGHT, &parent_done,
|
||||
&outer_done, -1);
|
||||
|
|
@ -3917,9 +3917,9 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
|
||||
param_index = Fget (prop, Qx_frame_parameter);
|
||||
if (FIXNATP (param_index)
|
||||
&& XFASTINT (param_index) < ARRAYELTS (frame_parms)
|
||||
&& FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])
|
||||
(*(FRAME_RIF (f)->frame_parm_handlers[XINT (param_index)])) (f, val, old_value);
|
||||
&& XFIXNAT (param_index) < ARRAYELTS (frame_parms)
|
||||
&& FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])
|
||||
(*(FRAME_RIF (f)->frame_parm_handlers[XFIXNUM (param_index)])) (f, val, old_value);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3981,8 +3981,8 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
|
||||
if ((!NILP (left) || !NILP (top))
|
||||
&& ! (left_no_change && top_no_change)
|
||||
&& ! (FIXED_OR_FLOATP (left) && XINT (left) == f->left_pos
|
||||
&& FIXED_OR_FLOATP (top) && XINT (top) == f->top_pos))
|
||||
&& ! (FIXED_OR_FLOATP (left) && XFIXNUM (left) == f->left_pos
|
||||
&& FIXED_OR_FLOATP (top) && XFIXNUM (top) == f->top_pos))
|
||||
{
|
||||
int leftpos = 0;
|
||||
int toppos = 0;
|
||||
|
|
@ -3993,7 +3993,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
f->size_hint_flags |= XNegative;
|
||||
else if (TYPE_RANGED_FIXNUMP (int, left))
|
||||
{
|
||||
leftpos = XINT (left);
|
||||
leftpos = XFIXNUM (left);
|
||||
if (leftpos < 0)
|
||||
f->size_hint_flags |= XNegative;
|
||||
}
|
||||
|
|
@ -4001,13 +4001,13 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
&& CONSP (XCDR (left))
|
||||
&& RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
|
||||
{
|
||||
leftpos = - XINT (XCAR (XCDR (left)));
|
||||
leftpos = - XFIXNUM (XCAR (XCDR (left)));
|
||||
f->size_hint_flags |= XNegative;
|
||||
}
|
||||
else if (CONSP (left) && EQ (XCAR (left), Qplus)
|
||||
&& CONSP (XCDR (left))
|
||||
&& TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
|
||||
leftpos = XINT (XCAR (XCDR (left)));
|
||||
leftpos = XFIXNUM (XCAR (XCDR (left)));
|
||||
else if (FLOATP (left))
|
||||
leftpos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done,
|
||||
&outer_done, 0);
|
||||
|
|
@ -4016,7 +4016,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
f->size_hint_flags |= YNegative;
|
||||
else if (TYPE_RANGED_FIXNUMP (int, top))
|
||||
{
|
||||
toppos = XINT (top);
|
||||
toppos = XFIXNUM (top);
|
||||
if (toppos < 0)
|
||||
f->size_hint_flags |= YNegative;
|
||||
}
|
||||
|
|
@ -4024,13 +4024,13 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
&& CONSP (XCDR (top))
|
||||
&& RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
|
||||
{
|
||||
toppos = - XINT (XCAR (XCDR (top)));
|
||||
toppos = - XFIXNUM (XCAR (XCDR (top)));
|
||||
f->size_hint_flags |= YNegative;
|
||||
}
|
||||
else if (CONSP (top) && EQ (XCAR (top), Qplus)
|
||||
&& CONSP (XCDR (top))
|
||||
&& TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
|
||||
toppos = XINT (XCAR (XCDR (top)));
|
||||
toppos = XFIXNUM (XCAR (XCDR (top)));
|
||||
else if (FLOATP (top))
|
||||
toppos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done,
|
||||
&outer_done, 0);
|
||||
|
|
@ -4061,7 +4061,7 @@ x_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
|||
#ifdef HAVE_X_WINDOWS
|
||||
if ((!NILP (icon_left) || !NILP (icon_top))
|
||||
&& ! (icon_left_no_change && icon_top_no_change))
|
||||
x_wm_set_icon_position (f, XINT (icon_left), XINT (icon_top));
|
||||
x_wm_set_icon_position (f, XFIXNUM (icon_left), XFIXNUM (icon_top));
|
||||
#endif /* HAVE_X_WINDOWS */
|
||||
|
||||
SAFE_FREE ();
|
||||
|
|
@ -4188,7 +4188,7 @@ x_set_line_spacing (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
|
|||
if (NILP (new_value))
|
||||
f->extra_line_spacing = 0;
|
||||
else if (RANGED_FIXNUMP (0, new_value, INT_MAX))
|
||||
f->extra_line_spacing = XFASTINT (new_value);
|
||||
f->extra_line_spacing = XFIXNAT (new_value);
|
||||
else if (FLOATP (new_value))
|
||||
{
|
||||
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
|
|||
{
|
||||
Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
|
||||
if (FIXNATP (parm_index)
|
||||
&& XFASTINT (parm_index) < ARRAYELTS (frame_parms)
|
||||
&& FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
|
||||
(*FRAME_RIF (f)->frame_parm_handlers[XFASTINT (parm_index)])
|
||||
&& XFIXNAT (parm_index) < ARRAYELTS (frame_parms)
|
||||
&& FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
|
||||
(*FRAME_RIF (f)->frame_parm_handlers[XFIXNAT (parm_index)])
|
||||
(f, bgcolor, Qnil);
|
||||
}
|
||||
|
||||
|
|
@ -4415,7 +4415,7 @@ x_set_left_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
|
|||
int new_width;
|
||||
|
||||
new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
|
||||
? eabs (XINT (new_value)) : 8);
|
||||
? eabs (XFIXNUM (new_value)) : 8);
|
||||
|
||||
if (new_width != old_width)
|
||||
{
|
||||
|
|
@ -4439,7 +4439,7 @@ x_set_right_fringe (struct frame *f, Lisp_Object new_value, Lisp_Object old_valu
|
|||
int new_width;
|
||||
|
||||
new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
|
||||
? eabs (XINT (new_value)) : 8);
|
||||
? eabs (XFIXNUM (new_value)) : 8);
|
||||
|
||||
if (new_width != old_width)
|
||||
{
|
||||
|
|
@ -4460,13 +4460,13 @@ x_set_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (int, arg);
|
||||
|
||||
if (XINT (arg) == f->border_width)
|
||||
if (XFIXNUM (arg) == f->border_width)
|
||||
return;
|
||||
|
||||
if (FRAME_X_WINDOW (f) != 0)
|
||||
error ("Cannot change the border width of a frame");
|
||||
|
||||
f->border_width = XINT (arg);
|
||||
f->border_width = XFIXNUM (arg);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
@ -4474,7 +4474,7 @@ x_set_right_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
{
|
||||
int old = FRAME_RIGHT_DIVIDER_WIDTH (f);
|
||||
CHECK_TYPE_RANGED_INTEGER (int, arg);
|
||||
int new = max (0, XINT (arg));
|
||||
int new = max (0, XFIXNUM (arg));
|
||||
if (new != old)
|
||||
{
|
||||
f->right_divider_width = new;
|
||||
|
|
@ -4489,7 +4489,7 @@ x_set_bottom_divider_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval
|
|||
{
|
||||
int old = FRAME_BOTTOM_DIVIDER_WIDTH (f);
|
||||
CHECK_TYPE_RANGED_INTEGER (int, arg);
|
||||
int new = max (0, XINT (arg));
|
||||
int new = max (0, XFIXNUM (arg));
|
||||
if (new != old)
|
||||
{
|
||||
f->bottom_divider_width = new;
|
||||
|
|
@ -4599,10 +4599,10 @@ x_set_scroll_bar_width (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
SET_FRAME_GARBAGED (f);
|
||||
}
|
||||
else if (RANGED_FIXNUMP (1, arg, INT_MAX)
|
||||
&& XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
|
||||
&& XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
|
||||
{
|
||||
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFASTINT (arg);
|
||||
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFASTINT (arg) + unit - 1) / unit;
|
||||
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFIXNAT (arg);
|
||||
FRAME_CONFIG_SCROLL_BAR_COLS (f) = (XFIXNAT (arg) + unit - 1) / unit;
|
||||
if (FRAME_X_WINDOW (f))
|
||||
adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_width);
|
||||
|
||||
|
|
@ -4629,10 +4629,10 @@ x_set_scroll_bar_height (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
SET_FRAME_GARBAGED (f);
|
||||
}
|
||||
else if (RANGED_FIXNUMP (1, arg, INT_MAX)
|
||||
&& XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
|
||||
&& XFIXNAT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
|
||||
{
|
||||
FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFASTINT (arg);
|
||||
FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFASTINT (arg) + unit - 1) / unit;
|
||||
FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFIXNAT (arg);
|
||||
FRAME_CONFIG_SCROLL_BAR_LINES (f) = (XFIXNAT (arg) + unit - 1) / unit;
|
||||
if (FRAME_X_WINDOW (f))
|
||||
adjust_frame_size (f, -1, -1, 3, 0, Qscroll_bar_height);
|
||||
|
||||
|
|
@ -4673,7 +4673,7 @@ x_set_alpha (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
}
|
||||
else if (FIXNUMP (item))
|
||||
{
|
||||
EMACS_INT ialpha = XINT (item);
|
||||
EMACS_INT ialpha = XFIXNUM (item);
|
||||
if (! (0 <= ialpha && ialpha <= 100))
|
||||
args_out_of_range (make_fixnum (0), make_fixnum (100));
|
||||
alpha = ialpha / 100.0;
|
||||
|
|
@ -5303,10 +5303,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
: DEFAULT_TOOL_BAR_BUTTON_RELIEF);
|
||||
|
||||
if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
|
||||
margin = XFASTINT (Vtool_bar_button_margin);
|
||||
margin = XFIXNAT (Vtool_bar_button_margin);
|
||||
else if (CONSP (Vtool_bar_button_margin)
|
||||
&& RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
|
||||
margin = XFASTINT (XCDR (Vtool_bar_button_margin));
|
||||
margin = XFIXNAT (XCDR (Vtool_bar_button_margin));
|
||||
else
|
||||
margin = 0;
|
||||
|
||||
|
|
@ -5328,12 +5328,12 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
if (CONSP (width) && EQ (XCAR (width), Qtext_pixels))
|
||||
{
|
||||
CHECK_FIXNUM (XCDR (width));
|
||||
if ((XINT (XCDR (width)) < 0 || XINT (XCDR (width)) > INT_MAX))
|
||||
if ((XFIXNUM (XCDR (width)) < 0 || XFIXNUM (XCDR (width)) > INT_MAX))
|
||||
xsignal1 (Qargs_out_of_range, XCDR (width));
|
||||
|
||||
SET_FRAME_WIDTH (f, XINT (XCDR (width)));
|
||||
SET_FRAME_WIDTH (f, XFIXNUM (XCDR (width)));
|
||||
f->inhibit_horizontal_resize = true;
|
||||
*x_width = XINT (XCDR (width));
|
||||
*x_width = XFIXNUM (XCDR (width));
|
||||
}
|
||||
else if (FLOATP (width))
|
||||
{
|
||||
|
|
@ -5353,10 +5353,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (width);
|
||||
if ((XINT (width) < 0 || XINT (width) > INT_MAX))
|
||||
if ((XFIXNUM (width) < 0 || XFIXNUM (width) > INT_MAX))
|
||||
xsignal1 (Qargs_out_of_range, width);
|
||||
|
||||
SET_FRAME_WIDTH (f, XINT (width) * FRAME_COLUMN_WIDTH (f));
|
||||
SET_FRAME_WIDTH (f, XFIXNUM (width) * FRAME_COLUMN_WIDTH (f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5365,12 +5365,12 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
if (CONSP (height) && EQ (XCAR (height), Qtext_pixels))
|
||||
{
|
||||
CHECK_FIXNUM (XCDR (height));
|
||||
if ((XINT (XCDR (height)) < 0 || XINT (XCDR (height)) > INT_MAX))
|
||||
if ((XFIXNUM (XCDR (height)) < 0 || XFIXNUM (XCDR (height)) > INT_MAX))
|
||||
xsignal1 (Qargs_out_of_range, XCDR (height));
|
||||
|
||||
SET_FRAME_HEIGHT (f, XINT (XCDR (height)));
|
||||
SET_FRAME_HEIGHT (f, XFIXNUM (XCDR (height)));
|
||||
f->inhibit_vertical_resize = true;
|
||||
*x_height = XINT (XCDR (height));
|
||||
*x_height = XFIXNUM (XCDR (height));
|
||||
}
|
||||
else if (FLOATP (height))
|
||||
{
|
||||
|
|
@ -5390,10 +5390,10 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (height);
|
||||
if ((XINT (height) < 0) || (XINT (height) > INT_MAX))
|
||||
if ((XFIXNUM (height) < 0) || (XFIXNUM (height) > INT_MAX))
|
||||
xsignal1 (Qargs_out_of_range, height);
|
||||
|
||||
SET_FRAME_HEIGHT (f, XINT (height) * FRAME_LINE_HEIGHT (f));
|
||||
SET_FRAME_HEIGHT (f, XFIXNUM (height) * FRAME_LINE_HEIGHT (f));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -5418,14 +5418,14 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
&& CONSP (XCDR (top))
|
||||
&& RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
|
||||
{
|
||||
f->top_pos = - XINT (XCAR (XCDR (top)));
|
||||
f->top_pos = - XFIXNUM (XCAR (XCDR (top)));
|
||||
window_prompting |= YNegative;
|
||||
}
|
||||
else if (CONSP (top) && EQ (XCAR (top), Qplus)
|
||||
&& CONSP (XCDR (top))
|
||||
&& TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
|
||||
{
|
||||
f->top_pos = XINT (XCAR (XCDR (top)));
|
||||
f->top_pos = XFIXNUM (XCAR (XCDR (top)));
|
||||
}
|
||||
else if (FLOATP (top))
|
||||
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
|
|||
else
|
||||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (int, top);
|
||||
f->top_pos = XINT (top);
|
||||
f->top_pos = XFIXNUM (top);
|
||||
if (f->top_pos < 0)
|
||||
window_prompting |= YNegative;
|
||||
}
|
||||
|
|
@ -5449,14 +5449,14 @@ x_figure_window_size (struct frame *f, Lisp_Object parms, bool toolbar_p, int *x
|
|||
&& CONSP (XCDR (left))
|
||||
&& RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
|
||||
{
|
||||
f->left_pos = - XINT (XCAR (XCDR (left)));
|
||||
f->left_pos = - XFIXNUM (XCAR (XCDR (left)));
|
||||
window_prompting |= XNegative;
|
||||
}
|
||||
else if (CONSP (left) && EQ (XCAR (left), Qplus)
|
||||
&& CONSP (XCDR (left))
|
||||
&& TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
|
||||
{
|
||||
f->left_pos = XINT (XCAR (XCDR (left)));
|
||||
f->left_pos = XFIXNUM (XCAR (XCDR (left)));
|
||||
}
|
||||
else if (FLOATP (left))
|
||||
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
|
|||
else
|
||||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (int, left);
|
||||
f->left_pos = XINT (left);
|
||||
f->left_pos = XFIXNUM (left);
|
||||
if (f->left_pos < 0)
|
||||
window_prompting |= XNegative;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1361,7 +1361,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
|
|||
float. Value is a C integer. */
|
||||
#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \
|
||||
(FIXNUMP (X) \
|
||||
? XINT (X) * FRAME_COLUMN_WIDTH (F) \
|
||||
? XFIXNUM (X) * FRAME_COLUMN_WIDTH (F) \
|
||||
: (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))
|
||||
|
||||
/* Convert canonical value Y to pixels. F is the frame whose
|
||||
|
|
@ -1369,7 +1369,7 @@ FRAME_BOTTOM_DIVIDER_WIDTH (struct frame *f)
|
|||
or float. Value is a C integer. */
|
||||
#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \
|
||||
(FIXNUMP (Y) \
|
||||
? XINT (Y) * FRAME_LINE_HEIGHT (F) \
|
||||
? XFIXNUM (Y) * FRAME_LINE_HEIGHT (F) \
|
||||
: (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))
|
||||
|
||||
/* Convert pixel-value X to canonical units. F is the frame whose
|
||||
|
|
|
|||
16
src/fringe.c
16
src/fringe.c
|
|
@ -491,7 +491,7 @@ lookup_fringe_bitmap (Lisp_Object bitmap)
|
|||
if (!FIXNUMP (bitmap))
|
||||
return 0;
|
||||
|
||||
bn = XINT (bitmap);
|
||||
bn = XFIXNUM (bitmap);
|
||||
if (bn > NO_FRINGE_BITMAP
|
||||
&& bn < max_used_fringe_bitmap
|
||||
&& (bn < MAX_STANDARD_FRINGE_BITMAPS
|
||||
|
|
@ -743,7 +743,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
|
|||
return NO_FRINGE_BITMAP;
|
||||
if (CONSP (bm1))
|
||||
{
|
||||
ln1 = XINT (Flength (bm1));
|
||||
ln1 = XFIXNUM (Flength (bm1));
|
||||
if (partial_p)
|
||||
{
|
||||
if (ln1 > ix2)
|
||||
|
|
@ -778,7 +778,7 @@ get_logical_fringe_bitmap (struct window *w, Lisp_Object bitmap, int right_p, in
|
|||
{
|
||||
if (CONSP (bm2))
|
||||
{
|
||||
ln2 = XINT (Flength (bm2));
|
||||
ln2 = XFIXNUM (Flength (bm2));
|
||||
if (partial_p)
|
||||
{
|
||||
if (ln2 > ix2)
|
||||
|
|
@ -1510,7 +1510,7 @@ If BITMAP already exists, the existing definition is replaced. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (height);
|
||||
fb.height = max (0, min (XINT (height), 255));
|
||||
fb.height = max (0, min (XFIXNUM (height), 255));
|
||||
if (fb.height > h)
|
||||
{
|
||||
fill1 = (fb.height - h) / 2;
|
||||
|
|
@ -1523,7 +1523,7 @@ If BITMAP already exists, the existing definition is replaced. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (width);
|
||||
fb.width = max (0, min (XINT (width), 255));
|
||||
fb.width = max (0, min (XFIXNUM (width), 255));
|
||||
}
|
||||
|
||||
fb.period = 0;
|
||||
|
|
@ -1605,7 +1605,7 @@ If BITMAP already exists, the existing definition is replaced. */)
|
|||
for (i = 0; i < h && j < fb.height; i++)
|
||||
{
|
||||
Lisp_Object elt = Faref (bits, make_fixnum (i));
|
||||
b[j++] = FIXED_OR_FLOATP (elt) ? XINT (elt) : 0;
|
||||
b[j++] = FIXED_OR_FLOATP (elt) ? XFIXNUM (elt) : 0;
|
||||
}
|
||||
for (i = 0; i < fill2 && j < fb.height; i++)
|
||||
b[j++] = 0;
|
||||
|
|
@ -1662,9 +1662,9 @@ Return nil if POS is not visible in WINDOW. */)
|
|||
if (!NILP (pos))
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (pos);
|
||||
if (! (BEGV <= XINT (pos) && XINT (pos) <= ZV))
|
||||
if (! (BEGV <= XFIXNUM (pos) && XFIXNUM (pos) <= ZV))
|
||||
args_out_of_range (window, pos);
|
||||
textpos = XINT (pos);
|
||||
textpos = XFIXNUM (pos);
|
||||
}
|
||||
else if (w == XWINDOW (selected_window))
|
||||
textpos = PT;
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ ftcrfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
FT_UInt size;
|
||||
|
||||
block_input ();
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (size == 0)
|
||||
size = pixel_size;
|
||||
font_object = font_build_object (VECSIZE (struct ftcrfont_info),
|
||||
|
|
|
|||
30
src/ftfont.c
30
src/ftfont.c
|
|
@ -390,7 +390,7 @@ ftfont_lookup_cache (Lisp_Object key, enum ftfont_cache_for cache_for)
|
|||
? ! cache_data->ft_face : ! cache_data->fc_charset)
|
||||
{
|
||||
char *filename = SSDATA (XCAR (key));
|
||||
int idx = XINT (XCDR (key));
|
||||
int idx = XFIXNUM (XCDR (key));
|
||||
|
||||
if (cache_for == FTFONT_CACHE_FOR_FACE)
|
||||
{
|
||||
|
|
@ -600,9 +600,9 @@ ftfont_get_open_type_spec (Lisp_Object otf_spec)
|
|||
continue;
|
||||
len = Flength (val);
|
||||
spec->features[i] =
|
||||
(min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XINT (len)
|
||||
(min (PTRDIFF_MAX, SIZE_MAX) / sizeof (int) < XFIXNUM (len)
|
||||
? 0
|
||||
: malloc (XINT (len) * sizeof *spec->features[i]));
|
||||
: malloc (XFIXNUM (len) * sizeof *spec->features[i]));
|
||||
if (! spec->features[i])
|
||||
{
|
||||
if (i > 0 && spec->features[0])
|
||||
|
|
@ -647,9 +647,9 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
|
|||
return NULL;
|
||||
|
||||
if (FIXNUMP (AREF (spec, FONT_DPI_INDEX)))
|
||||
dpi = XINT (AREF (spec, FONT_DPI_INDEX));
|
||||
dpi = XFIXNUM (AREF (spec, FONT_DPI_INDEX));
|
||||
if (FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
|
||||
&& XINT (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0)
|
||||
&& XFIXNUM (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0)
|
||||
scalable = 1;
|
||||
|
||||
registry = AREF (spec, FONT_REGISTRY_INDEX);
|
||||
|
|
@ -687,7 +687,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
|
|||
if (EQ (key, QCdpi))
|
||||
{
|
||||
if (FIXNUMP (val))
|
||||
dpi = XINT (val);
|
||||
dpi = XFIXNUM (val);
|
||||
}
|
||||
else if (EQ (key, QClang))
|
||||
{
|
||||
|
|
@ -735,7 +735,7 @@ ftfont_spec_pattern (Lisp_Object spec, char *otlayout, struct OpenTypeSpec **ots
|
|||
goto err;
|
||||
for (chars = XCDR (chars); CONSP (chars); chars = XCDR (chars))
|
||||
if (CHARACTERP (XCAR (chars))
|
||||
&& ! FcCharSetAddChar (charset, XFASTINT (XCAR (chars))))
|
||||
&& ! FcCharSetAddChar (charset, XFIXNAT (XCAR (chars))))
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
|
@ -833,7 +833,7 @@ ftfont_list (struct frame *f, Lisp_Object spec)
|
|||
val = Qnil;
|
||||
}
|
||||
if (FIXNUMP (AREF (spec, FONT_SPACING_INDEX)))
|
||||
spacing = XINT (AREF (spec, FONT_SPACING_INDEX));
|
||||
spacing = XFIXNUM (AREF (spec, FONT_SPACING_INDEX));
|
||||
family = AREF (spec, FONT_FAMILY_INDEX);
|
||||
if (! NILP (family))
|
||||
{
|
||||
|
|
@ -956,7 +956,7 @@ ftfont_list (struct frame *f, Lisp_Object spec)
|
|||
continue;
|
||||
for (j = 0; j < ASIZE (chars); j++)
|
||||
if (TYPE_RANGED_FIXNUMP (FcChar32, AREF (chars, j))
|
||||
&& FcCharSetHasChar (charset, XFASTINT (AREF (chars, j))))
|
||||
&& FcCharSetHasChar (charset, XFIXNAT (AREF (chars, j))))
|
||||
break;
|
||||
if (j == ASIZE (chars))
|
||||
continue;
|
||||
|
|
@ -1021,7 +1021,7 @@ ftfont_match (struct frame *f, Lisp_Object spec)
|
|||
FcValue value;
|
||||
|
||||
value.type = FcTypeDouble;
|
||||
value.u.d = XINT (AREF (spec, FONT_SIZE_INDEX));
|
||||
value.u.d = XFIXNUM (AREF (spec, FONT_SIZE_INDEX));
|
||||
FcPatternAdd (pattern, FC_PIXEL_SIZE, value, FcFalse);
|
||||
}
|
||||
if (FcConfigSubstitute (NULL, pattern, FcMatchPattern) == FcTrue)
|
||||
|
|
@ -1130,7 +1130,7 @@ ftfont_open2 (struct frame *f,
|
|||
return Qnil;
|
||||
}
|
||||
}
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (size == 0)
|
||||
size = pixel_size;
|
||||
if (FT_Set_Pixel_Sizes (ft_face, size, size) != 0)
|
||||
|
|
@ -1148,7 +1148,7 @@ ftfont_open2 (struct frame *f,
|
|||
font = XFONT_OBJECT (font_object);
|
||||
ftfont_info = (struct ftfont_info *) font;
|
||||
ftfont_info->ft_size = ft_face->size;
|
||||
ftfont_info->index = XINT (idx);
|
||||
ftfont_info->index = XFIXNUM (idx);
|
||||
#ifdef HAVE_LIBOTF
|
||||
ftfont_info->maybe_otf = (ft_face->face_flags & FT_FACE_FLAG_SFNT) != 0;
|
||||
ftfont_info->otf = NULL;
|
||||
|
|
@ -1161,7 +1161,7 @@ ftfont_open2 (struct frame *f,
|
|||
|
||||
upEM = ft_face->units_per_EM;
|
||||
scalable = (FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
|
||||
&& XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0);
|
||||
&& XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0);
|
||||
if (scalable)
|
||||
{
|
||||
font->ascent = ft_face->ascender * size / upEM + 0.5;
|
||||
|
|
@ -1175,7 +1175,7 @@ ftfont_open2 (struct frame *f,
|
|||
font->height = ft_face->size->metrics.height >> 6;
|
||||
}
|
||||
if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
|
||||
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
|
||||
spacing = XFIXNUM (AREF (entity, FONT_SPACING_INDEX));
|
||||
else
|
||||
spacing = FC_PROPORTIONAL;
|
||||
if (spacing != FC_PROPORTIONAL
|
||||
|
|
@ -1233,7 +1233,7 @@ ftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
{
|
||||
Lisp_Object font_object;
|
||||
FT_UInt size;
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (size == 0)
|
||||
size = pixel_size;
|
||||
font_object = font_build_object (VECSIZE (struct ftfont_info),
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ WATCH-DESCRIPTOR should be an object returned by `gfile-add-watch'. */)
|
|||
watch_descriptor);
|
||||
|
||||
eassert (FIXNUMP (watch_descriptor));
|
||||
GFileMonitor *monitor = XINTPTR (watch_descriptor);
|
||||
GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
|
||||
if (!g_file_monitor_is_cancelled (monitor) &&
|
||||
!g_file_monitor_cancel (monitor))
|
||||
xsignal2 (Qfile_notify_error, build_string ("Could not rm watch"),
|
||||
|
|
@ -271,7 +271,7 @@ invalid. */)
|
|||
return Qnil;
|
||||
else
|
||||
{
|
||||
GFileMonitor *monitor = XINTPTR (watch_descriptor);
|
||||
GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
|
||||
return g_file_monitor_is_cancelled (monitor) ? Qnil : Qt;
|
||||
}
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ If WATCH-DESCRIPTOR is not valid, nil is returned. */)
|
|||
return Qnil;
|
||||
else
|
||||
{
|
||||
GFileMonitor *monitor = XINTPTR (watch_descriptor);
|
||||
GFileMonitor *monitor = XFIXNUMPTR (watch_descriptor);
|
||||
return intern (G_OBJECT_TYPE_NAME (monitor));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
24
src/gnutls.c
24
src/gnutls.c
|
|
@ -936,7 +936,7 @@ Usage: (gnutls-error-fatalp ERROR) */)
|
|||
if (! TYPE_RANGED_FIXNUMP (int, err))
|
||||
error ("Not an error symbol or code");
|
||||
|
||||
if (0 == gnutls_error_is_fatal (XINT (err)))
|
||||
if (0 == gnutls_error_is_fatal (XFIXNUM (err)))
|
||||
return Qnil;
|
||||
|
||||
return Qt;
|
||||
|
|
@ -968,7 +968,7 @@ usage: (gnutls-error-string ERROR) */)
|
|||
if (! TYPE_RANGED_FIXNUMP (int, err))
|
||||
return build_string ("Not an error symbol or code");
|
||||
|
||||
return build_string (emacs_gnutls_strerror (XINT (err)));
|
||||
return build_string (emacs_gnutls_strerror (XFIXNUM (err)));
|
||||
}
|
||||
|
||||
DEFUN ("gnutls-deinit", Fgnutls_deinit, Sgnutls_deinit, 1, 1, 0,
|
||||
|
|
@ -1656,8 +1656,8 @@ one trustfile (usually a CA bundle). */)
|
|||
# ifdef HAVE_GNUTLS3
|
||||
gnutls_global_set_audit_log_function (gnutls_audit_log_function);
|
||||
# endif
|
||||
gnutls_global_set_log_level (XINT (loglevel));
|
||||
max_log_level = XINT (loglevel);
|
||||
gnutls_global_set_log_level (XFIXNUM (loglevel));
|
||||
max_log_level = XFIXNUM (loglevel);
|
||||
XPROCESS (proc)->gnutls_log_level = max_log_level;
|
||||
}
|
||||
|
||||
|
|
@ -1692,7 +1692,7 @@ one trustfile (usually a CA bundle). */)
|
|||
verify_flags = Fplist_get (proplist, QCverify_flags);
|
||||
if (TYPE_RANGED_FIXNUMP (unsigned int, verify_flags))
|
||||
{
|
||||
gnutls_verify_flags = XFASTINT (verify_flags);
|
||||
gnutls_verify_flags = XFIXNAT (verify_flags);
|
||||
GNUTLS_LOG (2, max_log_level, "setting verification flags");
|
||||
}
|
||||
else if (NILP (verify_flags))
|
||||
|
|
@ -1852,7 +1852,7 @@ one trustfile (usually a CA bundle). */)
|
|||
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
|
||||
|
||||
if (FIXNUMP (prime_bits))
|
||||
gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
|
||||
gnutls_dh_set_prime_bits (state, XUFIXNUM (prime_bits));
|
||||
|
||||
ret = EQ (type, Qgnutls_x509pki)
|
||||
? gnutls_credentials_set (state, GNUTLS_CRD_CERTIFICATE, x509_cred)
|
||||
|
|
@ -2073,7 +2073,7 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher,
|
|||
if (SYMBOLP (cipher))
|
||||
info = XCDR (Fassq (cipher, Fgnutls_ciphers ()));
|
||||
else if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, cipher))
|
||||
gca = XINT (cipher);
|
||||
gca = XFIXNUM (cipher);
|
||||
else
|
||||
info = cipher;
|
||||
|
||||
|
|
@ -2081,7 +2081,7 @@ gnutls_symmetric (bool encrypting, Lisp_Object cipher,
|
|||
{
|
||||
Lisp_Object v = Fplist_get (info, QCcipher_id);
|
||||
if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, v))
|
||||
gca = XINT (v);
|
||||
gca = XFIXNUM (v);
|
||||
}
|
||||
|
||||
ptrdiff_t key_size = gnutls_cipher_get_key_size (gca);
|
||||
|
|
@ -2344,7 +2344,7 @@ itself. */)
|
|||
if (SYMBOLP (hash_method))
|
||||
info = XCDR (Fassq (hash_method, Fgnutls_macs ()));
|
||||
else if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, hash_method))
|
||||
gma = XINT (hash_method);
|
||||
gma = XFIXNUM (hash_method);
|
||||
else
|
||||
info = hash_method;
|
||||
|
||||
|
|
@ -2352,7 +2352,7 @@ itself. */)
|
|||
{
|
||||
Lisp_Object v = Fplist_get (info, QCmac_algorithm_id);
|
||||
if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, v))
|
||||
gma = XINT (v);
|
||||
gma = XFIXNUM (v);
|
||||
}
|
||||
|
||||
ptrdiff_t digest_length = gnutls_hmac_get_len (gma);
|
||||
|
|
@ -2425,7 +2425,7 @@ the number itself. */)
|
|||
if (SYMBOLP (digest_method))
|
||||
info = XCDR (Fassq (digest_method, Fgnutls_digests ()));
|
||||
else if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, digest_method))
|
||||
gda = XINT (digest_method);
|
||||
gda = XFIXNUM (digest_method);
|
||||
else
|
||||
info = digest_method;
|
||||
|
||||
|
|
@ -2433,7 +2433,7 @@ the number itself. */)
|
|||
{
|
||||
Lisp_Object v = Fplist_get (info, QCdigest_algorithm_id);
|
||||
if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, v))
|
||||
gda = XINT (v);
|
||||
gda = XFIXNUM (v);
|
||||
}
|
||||
|
||||
ptrdiff_t digest_length = gnutls_hash_get_len (gda);
|
||||
|
|
|
|||
|
|
@ -4296,7 +4296,7 @@ xg_print_frames_dialog (Lisp_Object frames)
|
|||
gtk_print_operation_set_print_settings (print, print_settings);
|
||||
if (page_setup != NULL)
|
||||
gtk_print_operation_set_default_page_setup (print, page_setup);
|
||||
gtk_print_operation_set_n_pages (print, XINT (Flength (frames)));
|
||||
gtk_print_operation_set_n_pages (print, XFIXNUM (Flength (frames)));
|
||||
g_signal_connect (print, "draw-page", G_CALLBACK (draw_page), &frames);
|
||||
res = gtk_print_operation_run (print, GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG,
|
||||
NULL, NULL);
|
||||
|
|
@ -4891,16 +4891,16 @@ update_frame_tool_bar (struct frame *f)
|
|||
|
||||
if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
|
||||
{
|
||||
hmargin = XFASTINT (Vtool_bar_button_margin);
|
||||
vmargin = XFASTINT (Vtool_bar_button_margin);
|
||||
hmargin = XFIXNAT (Vtool_bar_button_margin);
|
||||
vmargin = XFIXNAT (Vtool_bar_button_margin);
|
||||
}
|
||||
else if (CONSP (Vtool_bar_button_margin))
|
||||
{
|
||||
if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin), INT_MAX))
|
||||
hmargin = XFASTINT (XCAR (Vtool_bar_button_margin));
|
||||
hmargin = XFIXNAT (XCAR (Vtool_bar_button_margin));
|
||||
|
||||
if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
|
||||
vmargin = XFASTINT (XCDR (Vtool_bar_button_margin));
|
||||
vmargin = XFIXNAT (XCDR (Vtool_bar_button_margin));
|
||||
}
|
||||
|
||||
/* The natural size (i.e. when GTK uses 0 as margin) looks best,
|
||||
|
|
|
|||
64
src/image.c
64
src/image.c
|
|
@ -785,7 +785,7 @@ parse_image_spec (Lisp_Object spec, struct image_keyword *keywords,
|
|||
/* Unlike the other integer-related cases, this one does not
|
||||
verify that VALUE fits in 'int'. This is because callers
|
||||
want EMACS_INT. */
|
||||
if (!FIXNUMP (value) || XINT (value) < 0)
|
||||
if (!FIXNUMP (value) || XFIXNUM (value) < 0)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
|
|
@ -1005,8 +1005,8 @@ check_image_size (struct frame *f, int width, int height)
|
|||
return 0;
|
||||
|
||||
if (FIXNUMP (Vmax_image_size))
|
||||
return (width <= XINT (Vmax_image_size)
|
||||
&& height <= XINT (Vmax_image_size));
|
||||
return (width <= XFIXNUM (Vmax_image_size)
|
||||
&& height <= XFIXNUM (Vmax_image_size));
|
||||
else if (FLOATP (Vmax_image_size))
|
||||
{
|
||||
if (f != NULL)
|
||||
|
|
@ -1547,7 +1547,7 @@ clear_image_cache (struct frame *f, Lisp_Object filter)
|
|||
|
||||
/* If the number of cached images has grown unusually large,
|
||||
decrease the cache eviction delay (Bug#6230). */
|
||||
delay = XINT (Vimage_cache_eviction_delay);
|
||||
delay = XFIXNUM (Vimage_cache_eviction_delay);
|
||||
if (nimages > 40)
|
||||
delay = 1600 * delay / nimages / nimages;
|
||||
delay = max (delay, 1);
|
||||
|
|
@ -1762,10 +1762,10 @@ lookup_image (struct frame *f, Lisp_Object spec)
|
|||
|
||||
value = image_spec_value (spec, QCwidth, NULL);
|
||||
img->width = (FIXNUMP (value)
|
||||
? XFASTINT (value) : DEFAULT_IMAGE_WIDTH);
|
||||
? XFIXNAT (value) : DEFAULT_IMAGE_WIDTH);
|
||||
value = image_spec_value (spec, QCheight, NULL);
|
||||
img->height = (FIXNUMP (value)
|
||||
? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT);
|
||||
? XFIXNAT (value) : DEFAULT_IMAGE_HEIGHT);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1777,24 +1777,24 @@ lookup_image (struct frame *f, Lisp_Object spec)
|
|||
|
||||
ascent = image_spec_value (spec, QCascent, NULL);
|
||||
if (FIXNUMP (ascent))
|
||||
img->ascent = XFASTINT (ascent);
|
||||
img->ascent = XFIXNAT (ascent);
|
||||
else if (EQ (ascent, Qcenter))
|
||||
img->ascent = CENTERED_IMAGE_ASCENT;
|
||||
|
||||
margin = image_spec_value (spec, QCmargin, NULL);
|
||||
if (FIXNUMP (margin))
|
||||
img->vmargin = img->hmargin = XFASTINT (margin);
|
||||
img->vmargin = img->hmargin = XFIXNAT (margin);
|
||||
else if (CONSP (margin))
|
||||
{
|
||||
img->hmargin = XFASTINT (XCAR (margin));
|
||||
img->vmargin = XFASTINT (XCDR (margin));
|
||||
img->hmargin = XFIXNAT (XCAR (margin));
|
||||
img->vmargin = XFIXNAT (XCDR (margin));
|
||||
}
|
||||
|
||||
relief = image_spec_value (spec, QCrelief, NULL);
|
||||
relief_bound = INT_MAX - max (img->hmargin, img->vmargin);
|
||||
if (RANGED_FIXNUMP (- relief_bound, relief, relief_bound))
|
||||
{
|
||||
img->relief = XINT (relief);
|
||||
img->relief = XFIXNUM (relief);
|
||||
img->hmargin += eabs (img->relief);
|
||||
img->vmargin += eabs (img->relief);
|
||||
}
|
||||
|
|
@ -2512,8 +2512,8 @@ xbm_image_p (Lisp_Object object)
|
|||
return 0;
|
||||
|
||||
data = kw[XBM_DATA].value;
|
||||
width = XFASTINT (kw[XBM_WIDTH].value);
|
||||
height = XFASTINT (kw[XBM_HEIGHT].value);
|
||||
width = XFIXNAT (kw[XBM_WIDTH].value);
|
||||
height = XFIXNAT (kw[XBM_HEIGHT].value);
|
||||
|
||||
/* Check type of data, and width and height against contents of
|
||||
data. */
|
||||
|
|
@ -3061,8 +3061,8 @@ xbm_load (struct frame *f, struct image *img)
|
|||
/* Get specified width, and height. */
|
||||
if (!in_memory_file_p)
|
||||
{
|
||||
img->width = XFASTINT (fmt[XBM_WIDTH].value);
|
||||
img->height = XFASTINT (fmt[XBM_HEIGHT].value);
|
||||
img->width = XFIXNAT (fmt[XBM_WIDTH].value);
|
||||
img->height = XFIXNAT (fmt[XBM_HEIGHT].value);
|
||||
eassert (img->width > 0 && img->height > 0);
|
||||
if (!check_image_size (f, img->width, img->height))
|
||||
{
|
||||
|
|
@ -4168,7 +4168,7 @@ xpm_load_image (struct frame *f,
|
|||
if (!NILP (Fxw_display_color_p (frame)))
|
||||
best_key = XPM_COLOR_KEY_C;
|
||||
else if (!NILP (Fx_display_grayscale_p (frame)))
|
||||
best_key = (XFASTINT (Fx_display_planes (frame)) > 2
|
||||
best_key = (XFIXNAT (Fx_display_planes (frame)) > 2
|
||||
? XPM_COLOR_KEY_G : XPM_COLOR_KEY_G4);
|
||||
else
|
||||
best_key = XPM_COLOR_KEY_M;
|
||||
|
|
@ -4267,7 +4267,7 @@ xpm_load_image (struct frame *f,
|
|||
(*get_color_table) (color_table, str, chars_per_pixel);
|
||||
|
||||
XPutPixel (ximg, x, y,
|
||||
(FIXNUMP (color_val) ? XINT (color_val)
|
||||
(FIXNUMP (color_val) ? XFIXNUM (color_val)
|
||||
: FRAME_FOREGROUND_PIXEL (f)));
|
||||
#ifndef HAVE_NS
|
||||
XPutPixel (mask_img, x, y,
|
||||
|
|
@ -5095,7 +5095,7 @@ x_build_heuristic_mask (struct frame *f, struct image *img, Lisp_Object how)
|
|||
|
||||
for (i = 0; i < 3 && CONSP (how) && FIXNATP (XCAR (how)); ++i)
|
||||
{
|
||||
rgb[i] = XFASTINT (XCAR (how)) & 0xffff;
|
||||
rgb[i] = XFIXNAT (XCAR (how)) & 0xffff;
|
||||
how = XCDR (how);
|
||||
}
|
||||
|
||||
|
|
@ -7282,7 +7282,7 @@ tiff_load (struct frame *f, struct image *img)
|
|||
image = image_spec_value (img->spec, QCindex, NULL);
|
||||
if (FIXNUMP (image))
|
||||
{
|
||||
EMACS_INT ino = XFASTINT (image);
|
||||
EMACS_INT ino = XFIXNAT (image);
|
||||
if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t)
|
||||
&& TIFFSetDirectory (tiff, ino)))
|
||||
{
|
||||
|
|
@ -7746,7 +7746,7 @@ gif_load (struct frame *f, struct image *img)
|
|||
/* Which sub-image are we to display? */
|
||||
{
|
||||
Lisp_Object image_number = image_spec_value (img->spec, QCindex, NULL);
|
||||
idx = FIXNUMP (image_number) ? XFASTINT (image_number) : 0;
|
||||
idx = FIXNUMP (image_number) ? XFIXNAT (image_number) : 0;
|
||||
if (idx < 0 || idx >= gif->ImageCount)
|
||||
{
|
||||
image_error ("Invalid image number `%s' in image `%s'",
|
||||
|
|
@ -8107,11 +8107,11 @@ compute_image_size (size_t width, size_t height,
|
|||
|
||||
value = image_spec_value (spec, QCmax_width, NULL);
|
||||
if (FIXNATP (value))
|
||||
max_width = min (XFASTINT (value), INT_MAX);
|
||||
max_width = min (XFIXNAT (value), INT_MAX);
|
||||
|
||||
value = image_spec_value (spec, QCmax_height, NULL);
|
||||
if (FIXNATP (value))
|
||||
max_height = min (XFASTINT (value), INT_MAX);
|
||||
max_height = min (XFIXNAT (value), INT_MAX);
|
||||
|
||||
/* If width and/or height is set in the display spec assume we want
|
||||
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,
|
|||
value = image_spec_value (spec, QCwidth, NULL);
|
||||
if (FIXNATP (value))
|
||||
{
|
||||
desired_width = min (XFASTINT (value) * scale, INT_MAX);
|
||||
desired_width = min (XFIXNAT (value) * scale, INT_MAX);
|
||||
/* :width overrides :max-width. */
|
||||
max_width = -1;
|
||||
}
|
||||
|
|
@ -8128,7 +8128,7 @@ compute_image_size (size_t width, size_t height,
|
|||
value = image_spec_value (spec, QCheight, NULL);
|
||||
if (FIXNATP (value))
|
||||
{
|
||||
desired_height = min (XFASTINT (value) * scale, INT_MAX);
|
||||
desired_height = min (XFIXNAT (value) * scale, INT_MAX);
|
||||
/* :height overrides :max-height. */
|
||||
max_height = -1;
|
||||
}
|
||||
|
|
@ -8573,7 +8573,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
find out things about it. */
|
||||
|
||||
image = image_spec_value (img->spec, QCindex, NULL);
|
||||
ino = FIXNUMP (image) ? XFASTINT (image) : 0;
|
||||
ino = FIXNUMP (image) ? XFIXNAT (image) : 0;
|
||||
image_wand = NewMagickWand ();
|
||||
|
||||
if (filename)
|
||||
|
|
@ -8585,7 +8585,7 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
|
||||
if (FIXNATP (lwidth) && FIXNATP (lheight))
|
||||
{
|
||||
MagickSetSize (image_wand, XFASTINT (lwidth), XFASTINT (lheight));
|
||||
MagickSetSize (image_wand, XFIXNAT (lwidth), XFIXNAT (lheight));
|
||||
MagickSetDepth (image_wand, 8);
|
||||
}
|
||||
filename_hint = imagemagick_filename_hint (img->spec, hint_buffer);
|
||||
|
|
@ -8685,19 +8685,19 @@ imagemagick_load_image (struct frame *f, struct image *img,
|
|||
than the alternatives, but it still reads the entire image into memory
|
||||
before cropping, which is apparently difficult to avoid when using
|
||||
imagemagick. */
|
||||
size_t crop_width = XINT (XCAR (crop));
|
||||
size_t crop_width = XFIXNUM (XCAR (crop));
|
||||
crop = XCDR (crop);
|
||||
if (CONSP (crop) && TYPE_RANGED_FIXNUMP (size_t, XCAR (crop)))
|
||||
{
|
||||
size_t crop_height = XINT (XCAR (crop));
|
||||
size_t crop_height = XFIXNUM (XCAR (crop));
|
||||
crop = XCDR (crop);
|
||||
if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
|
||||
{
|
||||
ssize_t crop_x = XINT (XCAR (crop));
|
||||
ssize_t crop_x = XFIXNUM (XCAR (crop));
|
||||
crop = XCDR (crop);
|
||||
if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
|
||||
{
|
||||
ssize_t crop_y = XINT (XCAR (crop));
|
||||
ssize_t crop_y = XFIXNUM (XCAR (crop));
|
||||
MagickCropImage (image_wand, crop_width, crop_height,
|
||||
crop_x, crop_y);
|
||||
}
|
||||
|
|
@ -9589,10 +9589,10 @@ gs_load (struct frame *f, struct image *img)
|
|||
= 1/72 in, xdpi and ydpi are stored in the frame's X display
|
||||
info. */
|
||||
pt_width = image_spec_value (img->spec, QCpt_width, NULL);
|
||||
in_width = FIXNUMP (pt_width) ? XFASTINT (pt_width) / 72.0 : 0;
|
||||
in_width = FIXNUMP (pt_width) ? XFIXNAT (pt_width) / 72.0 : 0;
|
||||
in_width *= FRAME_RES_X (f);
|
||||
pt_height = image_spec_value (img->spec, QCpt_height, NULL);
|
||||
in_height = FIXNUMP (pt_height) ? XFASTINT (pt_height) / 72.0 : 0;
|
||||
in_height = FIXNUMP (pt_height) ? XFIXNAT (pt_height) / 72.0 : 0;
|
||||
in_height *= FRAME_RES_Y (f);
|
||||
|
||||
if (! (in_width <= INT_MAX && in_height <= INT_MAX
|
||||
|
|
|
|||
72
src/indent.c
72
src/indent.c
|
|
@ -116,7 +116,7 @@ disptab_matches_widthtab (struct Lisp_Char_Table *disptab, struct Lisp_Vector *w
|
|||
|
||||
for (i = 0; i < 256; i++)
|
||||
if (character_width (i, disptab)
|
||||
!= XFASTINT (widthtab->contents[i]))
|
||||
!= XFIXNAT (widthtab->contents[i]))
|
||||
return 0;
|
||||
|
||||
return 1;
|
||||
|
|
@ -235,24 +235,24 @@ skip_invisible (ptrdiff_t pos, ptrdiff_t *next_boundary_p, ptrdiff_t to, Lisp_Ob
|
|||
/* As for text properties, this gives a lower bound
|
||||
for where the invisible text property could change. */
|
||||
proplimit = Fnext_property_change (position, buffer, Qt);
|
||||
if (XFASTINT (overlay_limit) < XFASTINT (proplimit))
|
||||
if (XFIXNAT (overlay_limit) < XFIXNAT (proplimit))
|
||||
proplimit = overlay_limit;
|
||||
/* PROPLIMIT is now a lower bound for the next change
|
||||
in invisible status. If that is plenty far away,
|
||||
use that lower bound. */
|
||||
if (XFASTINT (proplimit) > pos + 100 || XFASTINT (proplimit) >= to)
|
||||
*next_boundary_p = XFASTINT (proplimit);
|
||||
if (XFIXNAT (proplimit) > pos + 100 || XFIXNAT (proplimit) >= to)
|
||||
*next_boundary_p = XFIXNAT (proplimit);
|
||||
/* Otherwise, scan for the next `invisible' property change. */
|
||||
else
|
||||
{
|
||||
/* Don't scan terribly far. */
|
||||
XSETFASTINT (proplimit, min (pos + 100, to));
|
||||
/* No matter what, don't go past next overlay change. */
|
||||
if (XFASTINT (overlay_limit) < XFASTINT (proplimit))
|
||||
if (XFIXNAT (overlay_limit) < XFIXNAT (proplimit))
|
||||
proplimit = overlay_limit;
|
||||
tmp = Fnext_single_property_change (position, Qinvisible,
|
||||
buffer, proplimit);
|
||||
end = XFASTINT (tmp);
|
||||
end = XFIXNAT (tmp);
|
||||
#if 0
|
||||
/* Don't put the boundary in the middle of multibyte form if
|
||||
there is no actual property change. */
|
||||
|
|
@ -486,13 +486,13 @@ check_display_width (ptrdiff_t pos, ptrdiff_t col, ptrdiff_t *endpos)
|
|||
RANGED_FIXNUMP (0, prop, INT_MAX))
|
||||
|| (prop = Fplist_get (plist, QCrelative_width),
|
||||
RANGED_FIXNUMP (0, prop, INT_MAX)))
|
||||
width = XINT (prop);
|
||||
width = XFIXNUM (prop);
|
||||
else if (FLOATP (prop) && 0 <= XFLOAT_DATA (prop)
|
||||
&& XFLOAT_DATA (prop) <= INT_MAX)
|
||||
width = (int)(XFLOAT_DATA (prop) + 0.5);
|
||||
else if ((prop = Fplist_get (plist, QCalign_to),
|
||||
RANGED_FIXNUMP (col, prop, align_to_max)))
|
||||
width = XINT (prop) - col;
|
||||
width = XFIXNUM (prop) - col;
|
||||
else if (FLOATP (prop) && col <= XFLOAT_DATA (prop)
|
||||
&& (XFLOAT_DATA (prop) <= align_to_max))
|
||||
width = (int)(XFLOAT_DATA (prop) + 0.5) - col;
|
||||
|
|
@ -752,7 +752,7 @@ string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (end);
|
||||
e = XINT (end);
|
||||
e = XFIXNUM (end);
|
||||
}
|
||||
|
||||
if (NILP (beg))
|
||||
|
|
@ -760,7 +760,7 @@ string_display_width (Lisp_Object string, Lisp_Object beg, Lisp_Object end)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (beg);
|
||||
b = XINT (beg);
|
||||
b = XFIXNUM (beg);
|
||||
}
|
||||
|
||||
/* Make a pointer for decrementing through the chars before point. */
|
||||
|
|
@ -826,8 +826,8 @@ The return value is the column where the insertion ends. */)
|
|||
CHECK_FIXNUM (minimum);
|
||||
|
||||
fromcol = current_column ();
|
||||
mincol = fromcol + XINT (minimum);
|
||||
if (mincol < XINT (column)) mincol = XINT (column);
|
||||
mincol = fromcol + XFIXNUM (minimum);
|
||||
if (mincol < XFIXNUM (column)) mincol = XFIXNUM (column);
|
||||
|
||||
if (fromcol == mincol)
|
||||
return make_fixnum (mincol);
|
||||
|
|
@ -836,7 +836,7 @@ The return value is the column where the insertion ends. */)
|
|||
{
|
||||
Lisp_Object n;
|
||||
XSETFASTINT (n, mincol / tab_width - fromcol / tab_width);
|
||||
if (XFASTINT (n) != 0)
|
||||
if (XFIXNAT (n) != 0)
|
||||
{
|
||||
Finsert_char (make_fixnum ('\t'), n, Qt);
|
||||
|
||||
|
|
@ -995,7 +995,7 @@ The return value is the current column. */)
|
|||
EMACS_INT goal;
|
||||
|
||||
CHECK_FIXNAT (column);
|
||||
goal = XINT (column);
|
||||
goal = XFIXNUM (column);
|
||||
|
||||
col = goal;
|
||||
pos = ZV;
|
||||
|
|
@ -1129,7 +1129,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
|
|||
struct Lisp_Char_Table *dp = window_display_table (win);
|
||||
EMACS_INT selective
|
||||
= (FIXNUMP (BVAR (current_buffer, selective_display))
|
||||
? XINT (BVAR (current_buffer, selective_display))
|
||||
? XFIXNUM (BVAR (current_buffer, selective_display))
|
||||
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
|
||||
ptrdiff_t selective_rlen
|
||||
= (selective && dp && VECTORP (DISP_INVIS_VECTOR (dp))
|
||||
|
|
@ -1340,7 +1340,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
|
|||
{
|
||||
if (FIXNUMP (Vtruncate_partial_width_windows))
|
||||
truncate
|
||||
= total_width < XFASTINT (Vtruncate_partial_width_windows);
|
||||
= total_width < XFIXNAT (Vtruncate_partial_width_windows);
|
||||
else
|
||||
truncate = 1;
|
||||
}
|
||||
|
|
@ -1533,7 +1533,7 @@ compute_motion (ptrdiff_t from, ptrdiff_t frombyte, EMACS_INT fromvpos,
|
|||
/* Is this character part of the current run? If so, extend
|
||||
the run. */
|
||||
if (pos - 1 == width_run_end
|
||||
&& XFASTINT (width_table[c]) == width_run_width)
|
||||
&& XFIXNAT (width_table[c]) == width_run_width)
|
||||
width_run_end = pos;
|
||||
|
||||
/* 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,
|
|||
width_run_start, width_run_end);
|
||||
|
||||
/* Start recording a new width run. */
|
||||
width_run_width = XFASTINT (width_table[c]);
|
||||
width_run_width = XFIXNAT (width_table[c]);
|
||||
width_run_start = pos - 1;
|
||||
width_run_end = pos;
|
||||
}
|
||||
|
|
@ -1773,29 +1773,29 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
|
|||
CHECK_CONS (offsets);
|
||||
CHECK_FIXNUM_CAR (offsets);
|
||||
CHECK_FIXNUM_CDR (offsets);
|
||||
if (! (0 <= XINT (XCAR (offsets)) && XINT (XCAR (offsets)) <= PTRDIFF_MAX
|
||||
&& 0 <= XINT (XCDR (offsets)) && XINT (XCDR (offsets)) <= INT_MAX))
|
||||
if (! (0 <= XFIXNUM (XCAR (offsets)) && XFIXNUM (XCAR (offsets)) <= PTRDIFF_MAX
|
||||
&& 0 <= XFIXNUM (XCDR (offsets)) && XFIXNUM (XCDR (offsets)) <= INT_MAX))
|
||||
args_out_of_range (XCAR (offsets), XCDR (offsets));
|
||||
hscroll = XINT (XCAR (offsets));
|
||||
tab_offset = XINT (XCDR (offsets));
|
||||
hscroll = XFIXNUM (XCAR (offsets));
|
||||
tab_offset = XFIXNUM (XCDR (offsets));
|
||||
}
|
||||
else
|
||||
hscroll = tab_offset = 0;
|
||||
|
||||
w = decode_live_window (window);
|
||||
|
||||
if (XINT (from) < BEGV || XINT (from) > ZV)
|
||||
if (XFIXNUM (from) < BEGV || XFIXNUM (from) > ZV)
|
||||
args_out_of_range_3 (from, make_fixnum (BEGV), make_fixnum (ZV));
|
||||
if (XINT (to) < BEGV || XINT (to) > ZV)
|
||||
if (XFIXNUM (to) < BEGV || XFIXNUM (to) > ZV)
|
||||
args_out_of_range_3 (to, make_fixnum (BEGV), make_fixnum (ZV));
|
||||
|
||||
pos = compute_motion (XINT (from), CHAR_TO_BYTE (XINT (from)),
|
||||
XINT (XCDR (frompos)),
|
||||
XINT (XCAR (frompos)), 0,
|
||||
XINT (to),
|
||||
pos = compute_motion (XFIXNUM (from), CHAR_TO_BYTE (XFIXNUM (from)),
|
||||
XFIXNUM (XCDR (frompos)),
|
||||
XFIXNUM (XCAR (frompos)), 0,
|
||||
XFIXNUM (to),
|
||||
(NILP (topos)
|
||||
? window_internal_height (w)
|
||||
: XINT (XCDR (topos))),
|
||||
: XFIXNUM (XCDR (topos))),
|
||||
(NILP (topos)
|
||||
? (window_body_width (w, 0)
|
||||
- (
|
||||
|
|
@ -1803,8 +1803,8 @@ visible section of the buffer, and pass LINE and COL as TOPOS. */)
|
|||
FRAME_WINDOW_P (XFRAME (w->frame)) ? 0 :
|
||||
#endif
|
||||
1))
|
||||
: XINT (XCAR (topos))),
|
||||
(NILP (width) ? -1 : XINT (width)),
|
||||
: XFIXNUM (XCAR (topos))),
|
||||
(NILP (width) ? -1 : XFIXNUM (width)),
|
||||
hscroll, tab_offset, w);
|
||||
|
||||
XSETFASTINT (bufpos, pos->bufpos);
|
||||
|
|
@ -1832,7 +1832,7 @@ vmotion (register ptrdiff_t from, register ptrdiff_t from_byte,
|
|||
ptrdiff_t lmargin = hscroll > 0 ? 1 - hscroll : 0;
|
||||
ptrdiff_t selective
|
||||
= (FIXNUMP (BVAR (current_buffer, selective_display))
|
||||
? clip_to_bounds (-1, XINT (BVAR (current_buffer, selective_display)),
|
||||
? clip_to_bounds (-1, XFIXNUM (BVAR (current_buffer, selective_display)),
|
||||
PTRDIFF_MAX)
|
||||
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
|
||||
Lisp_Object window;
|
||||
|
|
@ -2045,8 +2045,8 @@ restore_window_buffer (Lisp_Object list)
|
|||
wset_buffer (w, XCAR (list));
|
||||
list = XCDR (list);
|
||||
set_marker_both (w->pointm, w->contents,
|
||||
XFASTINT (XCAR (list)),
|
||||
XFASTINT (XCAR (XCDR (list))));
|
||||
XFIXNAT (XCAR (list)),
|
||||
XFIXNAT (XCAR (XCDR (list))));
|
||||
}
|
||||
|
||||
DEFUN ("vertical-motion", Fvertical_motion, Svertical_motion, 1, 3, 0,
|
||||
|
|
@ -2118,7 +2118,7 @@ whether or not it is currently displayed in some window. */)
|
|||
if (noninteractive)
|
||||
{
|
||||
struct position pos;
|
||||
pos = *vmotion (PT, PT_BYTE, XINT (lines), w);
|
||||
pos = *vmotion (PT, PT_BYTE, XFIXNUM (lines), w);
|
||||
SET_PT_BOTH (pos.bufpos, pos.bytepos);
|
||||
it.vpos = pos.vpos;
|
||||
}
|
||||
|
|
@ -2128,7 +2128,7 @@ whether or not it is currently displayed in some window. */)
|
|||
int first_x;
|
||||
bool overshoot_handled = 0;
|
||||
bool disp_string_at_start_p = 0;
|
||||
ptrdiff_t nlines = XINT (lines);
|
||||
ptrdiff_t nlines = XFIXNUM (lines);
|
||||
int vpos_init = 0;
|
||||
double start_col UNINIT;
|
||||
int start_x UNINIT;
|
||||
|
|
|
|||
|
|
@ -2287,17 +2287,17 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute,
|
|||
elt = XCAR (tail);
|
||||
if (! CONSP (elt))
|
||||
continue;
|
||||
thisbeg = XINT (XCAR (elt));
|
||||
thisbeg = XFIXNUM (XCAR (elt));
|
||||
|
||||
elt = XCDR (elt);
|
||||
if (! CONSP (elt))
|
||||
continue;
|
||||
thisend = XINT (XCAR (elt));
|
||||
thisend = XFIXNUM (XCAR (elt));
|
||||
|
||||
elt = XCDR (elt);
|
||||
if (! CONSP (elt))
|
||||
continue;
|
||||
thischange = XINT (XCAR (elt));
|
||||
thischange = XFIXNUM (XCAR (elt));
|
||||
|
||||
/* Merge this range into the accumulated range. */
|
||||
change += thischange;
|
||||
|
|
|
|||
|
|
@ -1926,8 +1926,8 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
|
|||
|
||||
if (! NILP (intangible_propval))
|
||||
{
|
||||
while (XINT (pos) > BEGV
|
||||
&& EQ (Fget_char_property (make_fixnum (XINT (pos) - 1),
|
||||
while (XFIXNUM (pos) > BEGV
|
||||
&& EQ (Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
|
||||
Qintangible, Qnil),
|
||||
intangible_propval))
|
||||
pos = Fprevious_char_property_change (pos, Qnil);
|
||||
|
|
@ -1937,7 +1937,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
|
|||
property is `front-sticky', perturb it to be one character
|
||||
earlier -- this ensures that point can never move to the
|
||||
beginning of an invisible/intangible/front-sticky region. */
|
||||
charpos = adjust_for_invis_intang (XINT (pos), 0, -1, 0);
|
||||
charpos = adjust_for_invis_intang (XFIXNUM (pos), 0, -1, 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -1959,7 +1959,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
|
|||
|
||||
if (! NILP (intangible_propval))
|
||||
{
|
||||
while (XINT (pos) < ZV
|
||||
while (XFIXNUM (pos) < ZV
|
||||
&& EQ (Fget_char_property (pos, Qintangible, Qnil),
|
||||
intangible_propval))
|
||||
pos = Fnext_char_property_change (pos, Qnil);
|
||||
|
|
@ -1969,7 +1969,7 @@ set_point_both (ptrdiff_t charpos, ptrdiff_t bytepos)
|
|||
property is `rear-sticky', perturb it to be one character
|
||||
later -- this ensures that point can never move to the
|
||||
end of an invisible/intangible/rear-sticky region. */
|
||||
charpos = adjust_for_invis_intang (XINT (pos), -1, 1, 0);
|
||||
charpos = adjust_for_invis_intang (XFIXNUM (pos), -1, 1, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -2055,7 +2055,7 @@ move_if_not_intangible (ptrdiff_t position)
|
|||
if (! NILP (Vinhibit_point_motion_hooks))
|
||||
/* If intangible is inhibited, always move point to POSITION. */
|
||||
;
|
||||
else if (PT < position && XINT (pos) < ZV)
|
||||
else if (PT < position && XFIXNUM (pos) < ZV)
|
||||
{
|
||||
/* We want to move forward, so check the text before POSITION. */
|
||||
|
||||
|
|
@ -2065,23 +2065,23 @@ move_if_not_intangible (ptrdiff_t position)
|
|||
/* If following char is intangible,
|
||||
skip back over all chars with matching intangible property. */
|
||||
if (! NILP (intangible_propval))
|
||||
while (XINT (pos) > BEGV
|
||||
&& EQ (Fget_char_property (make_fixnum (XINT (pos) - 1),
|
||||
while (XFIXNUM (pos) > BEGV
|
||||
&& EQ (Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
|
||||
Qintangible, Qnil),
|
||||
intangible_propval))
|
||||
pos = Fprevious_char_property_change (pos, Qnil);
|
||||
}
|
||||
else if (XINT (pos) > BEGV)
|
||||
else if (XFIXNUM (pos) > BEGV)
|
||||
{
|
||||
/* We want to move backward, so check the text after POSITION. */
|
||||
|
||||
intangible_propval = Fget_char_property (make_fixnum (XINT (pos) - 1),
|
||||
intangible_propval = Fget_char_property (make_fixnum (XFIXNUM (pos) - 1),
|
||||
Qintangible, Qnil);
|
||||
|
||||
/* If following char is intangible,
|
||||
skip forward over all chars with matching intangible property. */
|
||||
if (! NILP (intangible_propval))
|
||||
while (XINT (pos) < ZV
|
||||
while (XFIXNUM (pos) < ZV
|
||||
&& EQ (Fget_char_property (pos, Qintangible, Qnil),
|
||||
intangible_propval))
|
||||
pos = Fnext_char_property_change (pos, Qnil);
|
||||
|
|
@ -2096,7 +2096,7 @@ move_if_not_intangible (ptrdiff_t position)
|
|||
try moving to POSITION (which means we actually move farther
|
||||
if POSITION is inside of intangible text). */
|
||||
|
||||
if (XINT (pos) != PT)
|
||||
if (XFIXNUM (pos) != PT)
|
||||
SET_PT (position);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ lisp_to_json (Lisp_Object lisp, struct json_configuration *conf)
|
|||
else if (FIXNUMP (lisp))
|
||||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp);
|
||||
return json_check (json_integer (XINT (lisp)));
|
||||
return json_check (json_integer (XFIXNUM (lisp)));
|
||||
}
|
||||
else if (FLOATP (lisp))
|
||||
return json_check (json_real (XFLOAT_DATA (lisp)));
|
||||
|
|
|
|||
152
src/keyboard.c
152
src/keyboard.c
|
|
@ -441,7 +441,7 @@ static bool
|
|||
echo_keystrokes_p (void)
|
||||
{
|
||||
return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
|
||||
: FIXNUMP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
|
||||
: FIXNUMP (Vecho_keystrokes) ? XFIXNUM (Vecho_keystrokes) > 0
|
||||
: false);
|
||||
}
|
||||
|
||||
|
|
@ -467,7 +467,7 @@ echo_add_key (Lisp_Object c)
|
|||
c = EVENT_HEAD (c);
|
||||
|
||||
if (FIXNUMP (c))
|
||||
ptr = push_key_description (XINT (c), ptr);
|
||||
ptr = push_key_description (XFIXNUM (c), ptr);
|
||||
else if (SYMBOLP (c))
|
||||
{
|
||||
Lisp_Object name = SYMBOL_NAME (c);
|
||||
|
|
@ -541,7 +541,7 @@ echo_dash (void)
|
|||
idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 1);
|
||||
last_char = Faref (KVAR (current_kboard, echo_string), idx);
|
||||
|
||||
if (XINT (last_char) == '-' && XINT (prev_char) != ' ')
|
||||
if (XFIXNUM (last_char) == '-' && XFIXNUM (prev_char) != ' ')
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -1525,7 +1525,7 @@ command_loop_1 (void)
|
|||
{
|
||||
Lisp_Object txt
|
||||
= call1 (Fsymbol_value (Qregion_extract_function), Qnil);
|
||||
if (XINT (Flength (txt)) > 0)
|
||||
if (XFIXNUM (Flength (txt)) > 0)
|
||||
/* Don't set empty selections. */
|
||||
call2 (Qgui_set_selection, QPRIMARY, txt);
|
||||
}
|
||||
|
|
@ -1677,7 +1677,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
|
|||
|| !NILP (Foverlay_get (overlay, Qbefore_string))));
|
||||
tmp = Fnext_single_char_property_change
|
||||
(make_fixnum (end), Qinvisible, Qnil, Qnil);
|
||||
end = FIXNATP (tmp) ? XFASTINT (tmp) : ZV;
|
||||
end = FIXNATP (tmp) ? XFIXNAT (tmp) : ZV;
|
||||
}
|
||||
while (beg > BEGV
|
||||
#if 0
|
||||
|
|
@ -1695,7 +1695,7 @@ adjust_point_for_property (ptrdiff_t last_pt, bool modified)
|
|||
|| !NILP (Foverlay_get (overlay, Qbefore_string))));
|
||||
tmp = Fprevious_single_char_property_change
|
||||
(make_fixnum (beg), Qinvisible, Qnil, Qnil);
|
||||
beg = FIXNATP (tmp) ? XFASTINT (tmp) : BEGV;
|
||||
beg = FIXNATP (tmp) ? XFIXNAT (tmp) : BEGV;
|
||||
}
|
||||
|
||||
/* Move away from the inside area. */
|
||||
|
|
@ -2145,7 +2145,7 @@ read_event_from_main_queue (struct timespec *end_time,
|
|||
}
|
||||
|
||||
/* Terminate Emacs in batch mode if at eof. */
|
||||
if (noninteractive && FIXNUMP (c) && XINT (c) < 0)
|
||||
if (noninteractive && FIXNUMP (c) && XFIXNUM (c) < 0)
|
||||
Fkill_emacs (make_fixnum (1));
|
||||
|
||||
if (FIXNUMP (c))
|
||||
|
|
@ -2154,12 +2154,12 @@ read_event_from_main_queue (struct timespec *end_time,
|
|||
if ((extra_keyboard_modifiers & CHAR_CTL)
|
||||
|| ((extra_keyboard_modifiers & 0177) < ' '
|
||||
&& (extra_keyboard_modifiers & 0177) != 0))
|
||||
XSETINT (c, make_ctrl_char (XINT (c)));
|
||||
XSETINT (c, make_ctrl_char (XFIXNUM (c)));
|
||||
|
||||
/* Transfer any other modifier bits directly from
|
||||
extra_keyboard_modifiers to c. Ignore the actual character code
|
||||
in the low 16 bits of extra_keyboard_modifiers. */
|
||||
XSETINT (c, XINT (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL));
|
||||
XSETINT (c, XFIXNUM (c) | (extra_keyboard_modifiers & ~0xff7f & ~CHAR_CTL));
|
||||
}
|
||||
|
||||
return c;
|
||||
|
|
@ -2208,7 +2208,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
|
|||
eassert (n < MAX_ENCODED_BYTES);
|
||||
events[n++] = nextevt;
|
||||
if (FIXNATP (nextevt)
|
||||
&& XINT (nextevt) < (meta_key == 1 ? 0x80 : 0x100))
|
||||
&& XFIXNUM (nextevt) < (meta_key == 1 ? 0x80 : 0x100))
|
||||
{ /* An encoded byte sequence, let's try to decode it. */
|
||||
struct coding_system *coding
|
||||
= TERMINAL_KEYBOARD_CODING (terminal);
|
||||
|
|
@ -2218,7 +2218,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
|
|||
int i;
|
||||
if (meta_key != 2)
|
||||
for (i = 0; i < n; i++)
|
||||
events[i] = make_fixnum (XINT (events[i]) & ~0x80);
|
||||
events[i] = make_fixnum (XFIXNUM (events[i]) & ~0x80);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -2226,7 +2226,7 @@ read_decoded_event_from_main_queue (struct timespec *end_time,
|
|||
unsigned char dest[MAX_ENCODED_BYTES * MAX_MULTIBYTE_LENGTH];
|
||||
int i;
|
||||
for (i = 0; i < n; i++)
|
||||
src[i] = XINT (events[i]);
|
||||
src[i] = XFIXNUM (events[i]);
|
||||
if (meta_key != 2)
|
||||
for (i = 0; i < n; i++)
|
||||
src[i] &= ~0x80;
|
||||
|
|
@ -2403,7 +2403,7 @@ read_char (int commandflag, Lisp_Object map,
|
|||
Also, some things replace the macro with t
|
||||
to force an early exit. */
|
||||
if (EQ (Vexecuting_kbd_macro, Qt)
|
||||
|| executing_kbd_macro_index >= XFASTINT (Flength (Vexecuting_kbd_macro)))
|
||||
|| executing_kbd_macro_index >= XFIXNAT (Flength (Vexecuting_kbd_macro)))
|
||||
{
|
||||
XSETINT (c, -1);
|
||||
goto exit;
|
||||
|
|
@ -2411,8 +2411,8 @@ read_char (int commandflag, Lisp_Object map,
|
|||
|
||||
c = Faref (Vexecuting_kbd_macro, make_fixnum (executing_kbd_macro_index));
|
||||
if (STRINGP (Vexecuting_kbd_macro)
|
||||
&& (XFASTINT (c) & 0x80) && (XFASTINT (c) <= 0xff))
|
||||
XSETFASTINT (c, CHAR_META | (XFASTINT (c) & ~0x80));
|
||||
&& (XFIXNAT (c) & 0x80) && (XFIXNAT (c) <= 0xff))
|
||||
XSETFASTINT (c, CHAR_META | (XFIXNAT (c) & ~0x80));
|
||||
|
||||
executing_kbd_macro_index++;
|
||||
|
||||
|
|
@ -2516,7 +2516,7 @@ read_char (int commandflag, Lisp_Object map,
|
|||
{
|
||||
c = read_char_minibuf_menu_prompt (commandflag, map);
|
||||
|
||||
if (FIXNUMP (c) && XINT (c) == -2)
|
||||
if (FIXNUMP (c) && XFIXNUM (c) == -2)
|
||||
return c; /* wrong_kboard_jmpbuf */
|
||||
|
||||
if (! NILP (c))
|
||||
|
|
@ -2676,10 +2676,10 @@ read_char (int commandflag, Lisp_Object map,
|
|||
if (commandflag != 0 && commandflag != -2
|
||||
&& num_nonmacro_input_events > last_auto_save
|
||||
&& FIXNUMP (Vauto_save_timeout)
|
||||
&& XINT (Vauto_save_timeout) > 0)
|
||||
&& XFIXNUM (Vauto_save_timeout) > 0)
|
||||
{
|
||||
Lisp_Object tem0;
|
||||
EMACS_INT timeout = XFASTINT (Vauto_save_timeout);
|
||||
EMACS_INT timeout = XFIXNAT (Vauto_save_timeout);
|
||||
|
||||
timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4);
|
||||
timeout = delay_level * timeout / 4;
|
||||
|
|
@ -2852,15 +2852,15 @@ read_char (int commandflag, Lisp_Object map,
|
|||
if (FIXNUMP (c))
|
||||
{
|
||||
/* If kbd_buffer_get_event gave us an EOF, return that. */
|
||||
if (XINT (c) == -1)
|
||||
if (XFIXNUM (c) == -1)
|
||||
goto exit;
|
||||
|
||||
if ((STRINGP (KVAR (current_kboard, Vkeyboard_translate_table))
|
||||
&& UNSIGNED_CMP (XFASTINT (c), <,
|
||||
&& UNSIGNED_CMP (XFIXNAT (c), <,
|
||||
SCHARS (KVAR (current_kboard,
|
||||
Vkeyboard_translate_table))))
|
||||
|| (VECTORP (KVAR (current_kboard, Vkeyboard_translate_table))
|
||||
&& UNSIGNED_CMP (XFASTINT (c), <,
|
||||
&& UNSIGNED_CMP (XFIXNAT (c), <,
|
||||
ASIZE (KVAR (current_kboard,
|
||||
Vkeyboard_translate_table))))
|
||||
|| (CHAR_TABLE_P (KVAR (current_kboard, Vkeyboard_translate_table))
|
||||
|
|
@ -2910,7 +2910,7 @@ read_char (int commandflag, Lisp_Object map,
|
|||
save the echo area contents for it to refer to. */
|
||||
if (FIXNUMP (c)
|
||||
&& ! NILP (Vinput_method_function)
|
||||
&& ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127)
|
||||
&& ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127)
|
||||
{
|
||||
previous_echo_area_message = Fcurrent_message ();
|
||||
Vinput_method_previous_message = previous_echo_area_message;
|
||||
|
|
@ -2940,7 +2940,7 @@ read_char (int commandflag, Lisp_Object map,
|
|||
/* Don't run the input method within a key sequence,
|
||||
after the first event of the key sequence. */
|
||||
&& NILP (prev_event)
|
||||
&& ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127)
|
||||
&& ' ' <= XFIXNUM (c) && XFIXNUM (c) < 256 && XFIXNUM (c) != 127)
|
||||
{
|
||||
Lisp_Object keys;
|
||||
ptrdiff_t key_count;
|
||||
|
|
@ -3261,10 +3261,10 @@ record_char (Lisp_Object c)
|
|||
block_input ();
|
||||
if (FIXNUMP (c))
|
||||
{
|
||||
if (XUINT (c) < 0x100)
|
||||
putc_unlocked (XUINT (c), dribble);
|
||||
if (XUFIXNUM (c) < 0x100)
|
||||
putc_unlocked (XUFIXNUM (c), dribble);
|
||||
else
|
||||
fprintf (dribble, " 0x%"pI"x", XUINT (c));
|
||||
fprintf (dribble, " 0x%"pI"x", XUFIXNUM (c));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -5009,7 +5009,7 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
|||
int xret = 0, yret = 0;
|
||||
/* The window or frame under frame pixel coordinates (x,y) */
|
||||
Lisp_Object window_or_frame = f
|
||||
? window_from_coordinates (f, XINT (x), XINT (y), &part, 0)
|
||||
? window_from_coordinates (f, XFIXNUM (x), XFIXNUM (y), &part, 0)
|
||||
: Qnil;
|
||||
|
||||
if (WINDOWP (window_or_frame))
|
||||
|
|
@ -5024,15 +5024,15 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
|||
Lisp_Object object = Qnil;
|
||||
|
||||
/* Pixel coordinates relative to the window corner. */
|
||||
int wx = XINT (x) - WINDOW_LEFT_EDGE_X (w);
|
||||
int wy = XINT (y) - WINDOW_TOP_EDGE_Y (w);
|
||||
int wx = XFIXNUM (x) - WINDOW_LEFT_EDGE_X (w);
|
||||
int wy = XFIXNUM (y) - WINDOW_TOP_EDGE_Y (w);
|
||||
|
||||
/* For text area clicks, return X, Y relative to the corner of
|
||||
this text area. Note that dX, dY etc are set below, by
|
||||
buffer_posn_from_coords. */
|
||||
if (part == ON_TEXT)
|
||||
{
|
||||
xret = XINT (x) - window_box_left (w, TEXT_AREA);
|
||||
xret = XFIXNUM (x) - window_box_left (w, TEXT_AREA);
|
||||
yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
|
||||
}
|
||||
/* 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,
|
|||
: (part == ON_RIGHT_FRINGE || part == ON_RIGHT_MARGIN
|
||||
|| (part == ON_VERTICAL_SCROLL_BAR
|
||||
&& WINDOW_HAS_VERTICAL_SCROLL_BAR_ON_RIGHT (w)))
|
||||
? (XINT (x) - window_box_left (w, TEXT_AREA))
|
||||
? (XFIXNUM (x) - window_box_left (w, TEXT_AREA))
|
||||
: 0;
|
||||
int y2 = wy;
|
||||
|
||||
|
|
@ -5210,8 +5210,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
|
|||
{
|
||||
/* Return mouse pixel coordinates here. */
|
||||
XSETFRAME (window_or_frame, f);
|
||||
xret = XINT (x);
|
||||
yret = XINT (y);
|
||||
xret = XFIXNUM (x);
|
||||
yret = XFIXNUM (y);
|
||||
|
||||
if (FRAME_LIVE_P (f)
|
||||
&& FRAME_INTERNAL_BORDER_WIDTH (f) > 0
|
||||
|
|
@ -5530,7 +5530,7 @@ make_lispy_event (struct input_event *event)
|
|||
in a menu (non-toolkit version). */
|
||||
if (!toolkit_menubar_in_use (f))
|
||||
{
|
||||
pixel_to_glyph_coords (f, XINT (event->x), XINT (event->y),
|
||||
pixel_to_glyph_coords (f, XFIXNUM (event->x), XFIXNUM (event->y),
|
||||
&column, &row, NULL, 1);
|
||||
|
||||
/* In the non-toolkit version, clicks on the menu bar
|
||||
|
|
@ -5555,8 +5555,8 @@ make_lispy_event (struct input_event *event)
|
|||
pos = AREF (items, i + 3);
|
||||
if (NILP (string))
|
||||
break;
|
||||
if (column >= XINT (pos)
|
||||
&& column < XINT (pos) + SCHARS (string))
|
||||
if (column >= XFIXNUM (pos)
|
||||
&& column < XFIXNUM (pos) + SCHARS (string))
|
||||
{
|
||||
item = AREF (items, i);
|
||||
break;
|
||||
|
|
@ -5616,18 +5616,18 @@ make_lispy_event (struct input_event *event)
|
|||
fuzz = double_click_fuzz / 8;
|
||||
|
||||
is_double = (button == last_mouse_button
|
||||
&& (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
|
||||
&& (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
|
||||
&& (eabs (XFIXNUM (event->x) - last_mouse_x) <= fuzz)
|
||||
&& (eabs (XFIXNUM (event->y) - last_mouse_y) <= fuzz)
|
||||
&& button_down_time != 0
|
||||
&& (EQ (Vdouble_click_time, Qt)
|
||||
|| (FIXNATP (Vdouble_click_time)
|
||||
&& (event->timestamp - button_down_time
|
||||
< XFASTINT (Vdouble_click_time)))));
|
||||
< XFIXNAT (Vdouble_click_time)))));
|
||||
}
|
||||
|
||||
last_mouse_button = button;
|
||||
last_mouse_x = XINT (event->x);
|
||||
last_mouse_y = XINT (event->y);
|
||||
last_mouse_x = XFIXNUM (event->x);
|
||||
last_mouse_y = XFIXNUM (event->y);
|
||||
|
||||
/* If this is a button press, squirrel away the location, so
|
||||
we can decide later whether it was a click or a drag. */
|
||||
|
|
@ -5674,8 +5674,8 @@ make_lispy_event (struct input_event *event)
|
|||
if (CONSP (down)
|
||||
&& FIXNUMP (XCAR (down)) && FIXNUMP (XCDR (down)))
|
||||
{
|
||||
xdiff = XINT (XCAR (new_down)) - XINT (XCAR (down));
|
||||
ydiff = XINT (XCDR (new_down)) - XINT (XCDR (down));
|
||||
xdiff = XFIXNUM (XCAR (new_down)) - XFIXNUM (XCAR (down));
|
||||
ydiff = XFIXNUM (XCDR (new_down)) - XFIXNUM (XCDR (down));
|
||||
}
|
||||
|
||||
if (ignore_mouse_drag_p)
|
||||
|
|
@ -5794,13 +5794,13 @@ make_lispy_event (struct input_event *event)
|
|||
symbol_num += 2;
|
||||
|
||||
is_double = (last_mouse_button == - (1 + symbol_num)
|
||||
&& (eabs (XINT (event->x) - last_mouse_x) <= fuzz)
|
||||
&& (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
|
||||
&& (eabs (XFIXNUM (event->x) - last_mouse_x) <= fuzz)
|
||||
&& (eabs (XFIXNUM (event->y) - last_mouse_y) <= fuzz)
|
||||
&& button_down_time != 0
|
||||
&& (EQ (Vdouble_click_time, Qt)
|
||||
|| (FIXNATP (Vdouble_click_time)
|
||||
&& (event->timestamp - button_down_time
|
||||
< XFASTINT (Vdouble_click_time)))));
|
||||
< XFIXNAT (Vdouble_click_time)))));
|
||||
if (is_double)
|
||||
{
|
||||
double_click_count++;
|
||||
|
|
@ -5817,8 +5817,8 @@ make_lispy_event (struct input_event *event)
|
|||
button_down_time = event->timestamp;
|
||||
/* Use a negative value to distinguish wheel from mouse button. */
|
||||
last_mouse_button = - (1 + symbol_num);
|
||||
last_mouse_x = XINT (event->x);
|
||||
last_mouse_y = XINT (event->y);
|
||||
last_mouse_x = XFIXNUM (event->x);
|
||||
last_mouse_y = XFIXNUM (event->y);
|
||||
|
||||
/* Get the symbol we should use for the wheel event. */
|
||||
head = modify_event_symbol (symbol_num,
|
||||
|
|
@ -6260,7 +6260,7 @@ lispy_modifier_list (int modifiers)
|
|||
SYMBOL's Qevent_symbol_element_mask property, and maintains the
|
||||
Qevent_symbol_elements property. */
|
||||
|
||||
#define KEY_TO_CHAR(k) (XINT (k) & ((1 << CHARACTERBITS) - 1))
|
||||
#define KEY_TO_CHAR(k) (XFIXNUM (k) & ((1 << CHARACTERBITS) - 1))
|
||||
|
||||
Lisp_Object
|
||||
parse_modifiers (Lisp_Object symbol)
|
||||
|
|
@ -6268,7 +6268,7 @@ parse_modifiers (Lisp_Object symbol)
|
|||
Lisp_Object elements;
|
||||
|
||||
if (FIXNUMP (symbol))
|
||||
return list2i (KEY_TO_CHAR (symbol), XINT (symbol) & CHAR_MODIFIER_MASK);
|
||||
return list2i (KEY_TO_CHAR (symbol), XFIXNUM (symbol) & CHAR_MODIFIER_MASK);
|
||||
else if (!SYMBOLP (symbol))
|
||||
return Qnil;
|
||||
|
||||
|
|
@ -6336,7 +6336,7 @@ apply_modifiers (int modifiers, Lisp_Object base)
|
|||
modifiers &= INTMASK;
|
||||
|
||||
if (FIXNUMP (base))
|
||||
return make_fixnum (XINT (base) | modifiers);
|
||||
return make_fixnum (XFIXNUM (base) | modifiers);
|
||||
|
||||
/* The click modifier never figures into cache indices. */
|
||||
cache = Fget (base, Qmodifier_cache);
|
||||
|
|
@ -6404,7 +6404,7 @@ reorder_modifiers (Lisp_Object symbol)
|
|||
Lisp_Object parsed;
|
||||
|
||||
parsed = parse_modifiers (symbol);
|
||||
return apply_modifiers (XFASTINT (XCAR (XCDR (parsed))),
|
||||
return apply_modifiers (XFIXNAT (XCAR (XCDR (parsed))),
|
||||
XCAR (parsed));
|
||||
}
|
||||
|
||||
|
|
@ -6491,7 +6491,7 @@ modify_event_symbol (ptrdiff_t symbol_num, int modifiers, Lisp_Object symbol_kin
|
|||
USE_SAFE_ALLOCA;
|
||||
buf = SAFE_ALLOCA (len);
|
||||
esprintf (buf, "%s-%"pI"d", SDATA (name_alist_or_stem),
|
||||
XINT (symbol_int) + 1);
|
||||
XFIXNUM (symbol_int) + 1);
|
||||
value = intern (buf);
|
||||
SAFE_FREE ();
|
||||
}
|
||||
|
|
@ -6578,18 +6578,18 @@ has the same base event type and all the specified modifiers. */)
|
|||
{
|
||||
/* Turn (shift a) into A. */
|
||||
if ((modifiers & shift_modifier) != 0
|
||||
&& (XINT (base) >= 'a' && XINT (base) <= 'z'))
|
||||
&& (XFIXNUM (base) >= 'a' && XFIXNUM (base) <= 'z'))
|
||||
{
|
||||
XSETINT (base, XINT (base) - ('a' - 'A'));
|
||||
XSETINT (base, XFIXNUM (base) - ('a' - 'A'));
|
||||
modifiers &= ~shift_modifier;
|
||||
}
|
||||
|
||||
/* Turn (control a) into C-a. */
|
||||
if (modifiers & ctrl_modifier)
|
||||
return make_fixnum ((modifiers & ~ctrl_modifier)
|
||||
| make_ctrl_char (XINT (base)));
|
||||
| make_ctrl_char (XFIXNUM (base)));
|
||||
else
|
||||
return make_fixnum (modifiers | XINT (base));
|
||||
return make_fixnum (modifiers | XFIXNUM (base));
|
||||
}
|
||||
else if (SYMBOLP (base))
|
||||
return apply_modifiers (modifiers, base);
|
||||
|
|
@ -8527,8 +8527,8 @@ read_char_minibuf_menu_prompt (int commandflag,
|
|||
|
||||
upcased_event = Fupcase (event);
|
||||
downcased_event = Fdowncase (event);
|
||||
char_matches = (XINT (upcased_event) == SREF (s, 0)
|
||||
|| XINT (downcased_event) == SREF (s, 0));
|
||||
char_matches = (XFIXNUM (upcased_event) == SREF (s, 0)
|
||||
|| XFIXNUM (downcased_event) == SREF (s, 0));
|
||||
if (! char_matches)
|
||||
desc = Fsingle_key_description (event, Qnil);
|
||||
|
||||
|
|
@ -8633,10 +8633,10 @@ read_char_minibuf_menu_prompt (int commandflag,
|
|||
while (BUFFERP (obj));
|
||||
kset_defining_kbd_macro (current_kboard, orig_defn_macro);
|
||||
|
||||
if (!FIXNUMP (obj) || XINT (obj) == -2
|
||||
if (!FIXNUMP (obj) || XFIXNUM (obj) == -2
|
||||
|| (! EQ (obj, menu_prompt_more_char)
|
||||
&& (!FIXNUMP (menu_prompt_more_char)
|
||||
|| ! EQ (obj, make_fixnum (Ctl (XINT (menu_prompt_more_char)))))))
|
||||
|| ! EQ (obj, make_fixnum (Ctl (XFIXNUM (menu_prompt_more_char)))))))
|
||||
{
|
||||
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
|
||||
store_kbd_macro_char (obj);
|
||||
|
|
@ -8757,7 +8757,7 @@ keyremap_step (Lisp_Object *keybuf, volatile keyremap *fkey,
|
|||
the binding and restart with fkey->start at the end. */
|
||||
if ((VECTORP (next) || STRINGP (next)) && doit)
|
||||
{
|
||||
int len = XFASTINT (Flength (next));
|
||||
int len = XFIXNAT (Flength (next));
|
||||
int i;
|
||||
|
||||
*diff = len - (fkey->end - fkey->start);
|
||||
|
|
@ -9105,7 +9105,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
current_binding, last_nonmenu_event,
|
||||
&used_mouse_menu, NULL);
|
||||
used_mouse_menu_history[t] = used_mouse_menu;
|
||||
if ((FIXNUMP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
|
||||
if ((FIXNUMP (key) && XFIXNUM (key) == -2) /* wrong_kboard_jmpbuf */
|
||||
/* When switching to a new tty (with a new keyboard),
|
||||
read_char returns the new buffer, rather than -2
|
||||
(Bug#5095). This is because `terminal-init-xterm'
|
||||
|
|
@ -9173,7 +9173,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
/* read_char returns -1 at the end of a macro.
|
||||
Emacs 18 handles this by returning immediately with a
|
||||
zero, so that's what we'll do. */
|
||||
if (FIXNUMP (key) && XINT (key) == -1)
|
||||
if (FIXNUMP (key) && XFIXNUM (key) == -1)
|
||||
{
|
||||
t = 0;
|
||||
/* The Microsoft C compiler can't handle the goto that
|
||||
|
|
@ -9209,7 +9209,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
quit_throw_to_read_char switched buffers,
|
||||
replay to get the right keymap. */
|
||||
if (FIXNUMP (key)
|
||||
&& XINT (key) == quit_char
|
||||
&& XFIXNUM (key) == quit_char
|
||||
&& current_buffer != starting_buffer)
|
||||
{
|
||||
GROW_RAW_KEYBUF;
|
||||
|
|
@ -9409,7 +9409,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
int modifiers;
|
||||
|
||||
breakdown = parse_modifiers (head);
|
||||
modifiers = XINT (XCAR (XCDR (breakdown)));
|
||||
modifiers = XFIXNUM (XCAR (XCDR (breakdown)));
|
||||
/* Attempt to reduce an unbound mouse event to a simpler
|
||||
event that is bound:
|
||||
Drags reduce to clicks.
|
||||
|
|
@ -9642,7 +9642,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
&& FIXNUMP (key))
|
||||
{
|
||||
Lisp_Object new_key;
|
||||
EMACS_INT k = XINT (key);
|
||||
EMACS_INT k = XFIXNUM (key);
|
||||
|
||||
if (k & shift_modifier)
|
||||
XSETINT (new_key, k & ~shift_modifier);
|
||||
|
|
@ -9689,7 +9689,7 @@ read_key_sequence (Lisp_Object *keybuf, Lisp_Object prompt,
|
|||
{
|
||||
Lisp_Object breakdown = parse_modifiers (key);
|
||||
int modifiers
|
||||
= CONSP (breakdown) ? (XINT (XCAR (XCDR (breakdown)))) : 0;
|
||||
= CONSP (breakdown) ? (XFIXNUM (XCAR (XCDR (breakdown)))) : 0;
|
||||
|
||||
if (modifiers & shift_modifier
|
||||
/* Treat uppercase keys as shifted. */
|
||||
|
|
@ -10655,7 +10655,7 @@ See also `current-input-mode'. */)
|
|||
return Qnil;
|
||||
tty = t->display_info.tty;
|
||||
|
||||
if (NILP (quit) || !FIXNUMP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)
|
||||
if (NILP (quit) || !FIXNUMP (quit) || XFIXNUM (quit) < 0 || XFIXNUM (quit) > 0400)
|
||||
error ("QUIT must be an ASCII character");
|
||||
|
||||
#ifndef DOS_NT
|
||||
|
|
@ -10664,7 +10664,7 @@ See also `current-input-mode'. */)
|
|||
#endif
|
||||
|
||||
/* Don't let this value be out of range. */
|
||||
quit_char = XINT (quit) & (tty->meta_key == 0 ? 0177 : 0377);
|
||||
quit_char = XFIXNUM (quit) & (tty->meta_key == 0 ? 0177 : 0377);
|
||||
|
||||
#ifndef DOS_NT
|
||||
init_sys_modes (tty);
|
||||
|
|
@ -10747,7 +10747,7 @@ The `posn-' functions access elements of such lists. */)
|
|||
CHECK_FIXNUM (x);
|
||||
/* We allow X of -1, for the newline in a R2L line that overflowed
|
||||
into the left fringe. */
|
||||
if (XINT (x) != -1)
|
||||
if (XFIXNUM (x) != -1)
|
||||
CHECK_FIXNAT (x);
|
||||
CHECK_FIXNAT (y);
|
||||
|
||||
|
|
@ -10758,12 +10758,12 @@ The `posn-' functions access elements of such lists. */)
|
|||
{
|
||||
struct window *w = decode_live_window (frame_or_window);
|
||||
|
||||
XSETINT (x, (XINT (x)
|
||||
XSETINT (x, (XFIXNUM (x)
|
||||
+ WINDOW_LEFT_EDGE_X (w)
|
||||
+ (NILP (whole)
|
||||
? window_box_left_offset (w, TEXT_AREA)
|
||||
: 0)));
|
||||
XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XINT (y)));
|
||||
XSETINT (y, WINDOW_TO_FRAME_PIXEL_Y (w, XFIXNUM (y)));
|
||||
frame_or_window = w->frame;
|
||||
}
|
||||
|
||||
|
|
@ -10796,15 +10796,15 @@ The `posn-' functions access elements of such lists. */)
|
|||
Lisp_Object x = XCAR (tem);
|
||||
Lisp_Object y = XCAR (XCDR (tem));
|
||||
Lisp_Object aux_info = XCDR (XCDR (tem));
|
||||
int y_coord = XINT (y);
|
||||
int y_coord = XFIXNUM (y);
|
||||
|
||||
/* Point invisible due to hscrolling? X can be -1 when a
|
||||
newline in a R2L line overflows into the left fringe. */
|
||||
if (XINT (x) < -1)
|
||||
if (XFIXNUM (x) < -1)
|
||||
return Qnil;
|
||||
if (!NILP (aux_info) && y_coord < 0)
|
||||
{
|
||||
int rtop = XINT (XCAR (aux_info));
|
||||
int rtop = XFIXNUM (XCAR (aux_info));
|
||||
|
||||
y = make_fixnum (y_coord + rtop);
|
||||
}
|
||||
|
|
|
|||
110
src/keymap.c
110
src/keymap.c
|
|
@ -382,17 +382,17 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
|
|||
else if (FIXNUMP (idx))
|
||||
/* Clobber the high bits that can be present on a machine
|
||||
with more than 24 bits of integer. */
|
||||
XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1)));
|
||||
XSETFASTINT (idx, XFIXNUM (idx) & (CHAR_META | (CHAR_META - 1)));
|
||||
|
||||
/* Handle the special meta -> esc mapping. */
|
||||
if (FIXNUMP (idx) && XFASTINT (idx) & meta_modifier)
|
||||
if (FIXNUMP (idx) && XFIXNAT (idx) & meta_modifier)
|
||||
{
|
||||
/* See if there is a meta-map. If there's none, there is
|
||||
no binding for IDX, unless a default binding exists in MAP. */
|
||||
Lisp_Object event_meta_binding, event_meta_map;
|
||||
/* A strange value in which Meta is set would cause
|
||||
infinite recursion. Protect against that. */
|
||||
if (XINT (meta_prefix_char) & CHAR_META)
|
||||
if (XFIXNUM (meta_prefix_char) & CHAR_META)
|
||||
meta_prefix_char = make_fixnum (27);
|
||||
event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok,
|
||||
noinherit, autoload);
|
||||
|
|
@ -400,7 +400,7 @@ access_keymap_1 (Lisp_Object map, Lisp_Object idx,
|
|||
if (CONSP (event_meta_map))
|
||||
{
|
||||
map = event_meta_map;
|
||||
idx = make_fixnum (XFASTINT (idx) & ~meta_modifier);
|
||||
idx = make_fixnum (XFIXNAT (idx) & ~meta_modifier);
|
||||
}
|
||||
else if (t_ok)
|
||||
/* 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,
|
|||
}
|
||||
else if (VECTORP (binding))
|
||||
{
|
||||
if (FIXNUMP (idx) && XFASTINT (idx) < ASIZE (binding))
|
||||
val = AREF (binding, XFASTINT (idx));
|
||||
if (FIXNUMP (idx) && XFIXNAT (idx) < ASIZE (binding))
|
||||
val = AREF (binding, XFIXNAT (idx));
|
||||
}
|
||||
else if (CHAR_TABLE_P (binding))
|
||||
{
|
||||
/* Character codes with modifiers
|
||||
are not included in a char-table.
|
||||
All character codes without modifiers are included. */
|
||||
if (FIXNUMP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
|
||||
if (FIXNUMP (idx) && (XFIXNAT (idx) & CHAR_MODIFIER_MASK) == 0)
|
||||
{
|
||||
val = Faref (binding, idx);
|
||||
/* 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)
|
|||
it in place. */
|
||||
if (CONSP (key))
|
||||
key = Fcons (XCAR (key), XCDR (key));
|
||||
union map_keymap *md = XINTPTR (args);
|
||||
union map_keymap *md = XFIXNUMPTR (args);
|
||||
map_keymap_item (md->s.fun, md->s.args, key, val, md->s.data);
|
||||
}
|
||||
}
|
||||
|
|
@ -785,7 +785,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
|
|||
else if (FIXNUMP (idx))
|
||||
/* Clobber the high bits that can be present on a machine
|
||||
with more than 24 bits of integer. */
|
||||
XSETFASTINT (idx, XINT (idx) & (CHAR_META | (CHAR_META - 1)));
|
||||
XSETFASTINT (idx, XFIXNUM (idx) & (CHAR_META | (CHAR_META - 1)));
|
||||
|
||||
/* Scan the keymap for a binding of idx. */
|
||||
{
|
||||
|
|
@ -807,22 +807,22 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
|
|||
elt = XCAR (tail);
|
||||
if (VECTORP (elt))
|
||||
{
|
||||
if (FIXNATP (idx) && XFASTINT (idx) < ASIZE (elt))
|
||||
if (FIXNATP (idx) && XFIXNAT (idx) < ASIZE (elt))
|
||||
{
|
||||
CHECK_IMPURE (elt, XVECTOR (elt));
|
||||
ASET (elt, XFASTINT (idx), def);
|
||||
ASET (elt, XFIXNAT (idx), def);
|
||||
return def;
|
||||
}
|
||||
else if (CONSP (idx) && CHARACTERP (XCAR (idx)))
|
||||
{
|
||||
int from = XFASTINT (XCAR (idx));
|
||||
int to = XFASTINT (XCDR (idx));
|
||||
int from = XFIXNAT (XCAR (idx));
|
||||
int to = XFIXNAT (XCDR (idx));
|
||||
|
||||
if (to >= ASIZE (elt))
|
||||
to = ASIZE (elt) - 1;
|
||||
for (; from <= to; from++)
|
||||
ASET (elt, from, def);
|
||||
if (to == XFASTINT (XCDR (idx)))
|
||||
if (to == XFIXNAT (XCDR (idx)))
|
||||
/* We have defined all keys in IDX. */
|
||||
return def;
|
||||
}
|
||||
|
|
@ -833,7 +833,7 @@ store_in_keymap (Lisp_Object keymap, register Lisp_Object idx, Lisp_Object def)
|
|||
/* Character codes with modifiers
|
||||
are not included in a char-table.
|
||||
All character codes without modifiers are included. */
|
||||
if (FIXNATP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK))
|
||||
if (FIXNATP (idx) && !(XFIXNAT (idx) & CHAR_MODIFIER_MASK))
|
||||
{
|
||||
Faset (elt, idx,
|
||||
/* 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)
|
|||
&& CHARACTERP (XCAR (idx))
|
||||
&& CHARACTERP (XCAR (elt)))
|
||||
{
|
||||
int from = XFASTINT (XCAR (idx));
|
||||
int to = XFASTINT (XCDR (idx));
|
||||
int from = XFIXNAT (XCAR (idx));
|
||||
int to = XFIXNAT (XCDR (idx));
|
||||
|
||||
if (from <= XFASTINT (XCAR (elt))
|
||||
&& to >= XFASTINT (XCAR (elt)))
|
||||
if (from <= XFIXNAT (XCAR (elt))
|
||||
&& to >= XFIXNAT (XCAR (elt)))
|
||||
{
|
||||
XSETCDR (elt, def);
|
||||
if (from == to)
|
||||
|
|
@ -1124,7 +1124,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
|
|||
silly_event_symbol_error (c);
|
||||
|
||||
if (FIXNUMP (c)
|
||||
&& (XINT (c) & meta_bit)
|
||||
&& (XFIXNUM (c) & meta_bit)
|
||||
&& !metized)
|
||||
{
|
||||
c = meta_prefix_char;
|
||||
|
|
@ -1133,7 +1133,7 @@ binding KEY to DEF is added at the front of KEYMAP. */)
|
|||
else
|
||||
{
|
||||
if (FIXNUMP (c))
|
||||
XSETINT (c, XINT (c) & ~meta_bit);
|
||||
XSETINT (c, XFIXNUM (c) & ~meta_bit);
|
||||
|
||||
metized = 0;
|
||||
idx++;
|
||||
|
|
@ -1246,8 +1246,8 @@ recognize the default bindings, just as `read-key-sequence' does. */)
|
|||
c = Fevent_convert_list (c);
|
||||
|
||||
/* Turn the 8th bit of string chars into a meta modifier. */
|
||||
if (STRINGP (key) && XINT (c) & 0x80 && !STRING_MULTIBYTE (key))
|
||||
XSETINT (c, (XINT (c) | meta_modifier) & ~0x80);
|
||||
if (STRINGP (key) && XFIXNUM (c) & 0x80 && !STRING_MULTIBYTE (key))
|
||||
XSETINT (c, (XFIXNUM (c) | meta_modifier) & ~0x80);
|
||||
|
||||
/* Allow string since binding for `menu-bar-select-buffer'
|
||||
includes the buffer name in the key sequence. */
|
||||
|
|
@ -1300,7 +1300,7 @@ silly_event_symbol_error (Lisp_Object c)
|
|||
int modifiers;
|
||||
|
||||
parsed = parse_modifiers (c);
|
||||
modifiers = XFASTINT (XCAR (XCDR (parsed)));
|
||||
modifiers = XFIXNAT (XCAR (XCDR (parsed)));
|
||||
base = XCAR (parsed);
|
||||
name = Fsymbol_name (base);
|
||||
/* This alist includes elements such as ("RET" . "\\r"). */
|
||||
|
|
@ -1474,7 +1474,7 @@ current_minor_maps (Lisp_Object **modeptr, Lisp_Object **mapptr)
|
|||
static ptrdiff_t
|
||||
click_position (Lisp_Object position)
|
||||
{
|
||||
EMACS_INT pos = (FIXNUMP (position) ? XINT (position)
|
||||
EMACS_INT pos = (FIXNUMP (position) ? XFIXNUM (position)
|
||||
: MARKERP (position) ? marker_position (position)
|
||||
: PT);
|
||||
if (! (BEGV <= pos && pos <= ZV))
|
||||
|
|
@ -1553,12 +1553,12 @@ like in the respective argument of `key-binding'. */)
|
|||
|
||||
pos = POSN_BUFFER_POSN (position);
|
||||
if (FIXNUMP (pos)
|
||||
&& XINT (pos) >= BEG && XINT (pos) <= Z)
|
||||
&& XFIXNUM (pos) >= BEG && XFIXNUM (pos) <= Z)
|
||||
{
|
||||
local_map = get_local_map (XINT (pos),
|
||||
local_map = get_local_map (XFIXNUM (pos),
|
||||
current_buffer, Qlocal_map);
|
||||
|
||||
keymap = get_local_map (XINT (pos),
|
||||
keymap = get_local_map (XFIXNUM (pos),
|
||||
current_buffer, Qkeymap);
|
||||
}
|
||||
}
|
||||
|
|
@ -1576,8 +1576,8 @@ like in the respective argument of `key-binding'. */)
|
|||
pos = XCDR (string);
|
||||
string = XCAR (string);
|
||||
if (FIXNUMP (pos)
|
||||
&& XINT (pos) >= 0
|
||||
&& XINT (pos) < SCHARS (string))
|
||||
&& XFIXNUM (pos) >= 0
|
||||
&& XFIXNUM (pos) < SCHARS (string))
|
||||
{
|
||||
map = Fget_text_property (pos, Qlocal_map, string);
|
||||
if (!NILP (map))
|
||||
|
|
@ -1854,8 +1854,8 @@ accessible_keymaps_1 (Lisp_Object key, Lisp_Object cmd, Lisp_Object args, void *
|
|||
while (!NILP (tem = Frassq (cmd, maps)))
|
||||
{
|
||||
Lisp_Object prefix = XCAR (tem);
|
||||
ptrdiff_t lim = XINT (Flength (XCAR (tem)));
|
||||
if (lim <= XINT (Flength (thisseq)))
|
||||
ptrdiff_t lim = XFIXNUM (Flength (XCAR (tem)));
|
||||
if (lim <= XFIXNUM (Flength (thisseq)))
|
||||
{ /* This keymap was already seen with a smaller prefix. */
|
||||
ptrdiff_t i = 0;
|
||||
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 *
|
|||
if (is_metized)
|
||||
{
|
||||
int meta_bit = meta_modifier;
|
||||
Lisp_Object last = make_fixnum (XINT (Flength (thisseq)) - 1);
|
||||
Lisp_Object last = make_fixnum (XFIXNUM (Flength (thisseq)) - 1);
|
||||
tem = Fcopy_sequence (thisseq);
|
||||
|
||||
Faset (tem, last, make_fixnum (XINT (key) | meta_bit));
|
||||
Faset (tem, last, make_fixnum (XFIXNUM (key) | meta_bit));
|
||||
|
||||
/* This new sequence is the same length as
|
||||
thisseq, so stick it in the list right
|
||||
|
|
@ -1910,7 +1910,7 @@ then the value includes only maps for prefixes that start with PREFIX. */)
|
|||
(Lisp_Object keymap, Lisp_Object prefix)
|
||||
{
|
||||
Lisp_Object maps, tail;
|
||||
EMACS_INT prefixlen = XFASTINT (Flength (prefix));
|
||||
EMACS_INT prefixlen = XFIXNAT (Flength (prefix));
|
||||
|
||||
if (!NILP (prefix))
|
||||
{
|
||||
|
|
@ -1969,11 +1969,11 @@ then the value includes only maps for prefixes that start with PREFIX. */)
|
|||
data.thisseq = Fcar (XCAR (tail));
|
||||
data.maps = maps;
|
||||
data.tail = tail;
|
||||
last = make_fixnum (XINT (Flength (data.thisseq)) - 1);
|
||||
last = make_fixnum (XFIXNUM (Flength (data.thisseq)) - 1);
|
||||
/* Does the current sequence end in the meta-prefix-char? */
|
||||
data.is_metized = (XINT (last) >= 0
|
||||
data.is_metized = (XFIXNUM (last) >= 0
|
||||
/* Don't metize the last char of PREFIX. */
|
||||
&& XINT (last) >= prefixlen
|
||||
&& XFIXNUM (last) >= prefixlen
|
||||
&& EQ (Faref (data.thisseq, last), meta_prefix_char));
|
||||
|
||||
/* 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'. */)
|
|||
EMACS_INT i;
|
||||
ptrdiff_t i_byte;
|
||||
Lisp_Object *args;
|
||||
EMACS_INT size = XINT (Flength (keys));
|
||||
EMACS_INT size = XFIXNUM (Flength (keys));
|
||||
Lisp_Object list;
|
||||
Lisp_Object sep = build_string (" ");
|
||||
Lisp_Object key;
|
||||
|
|
@ -2006,7 +2006,7 @@ For an approximate inverse of this, see `kbd'. */)
|
|||
USE_SAFE_ALLOCA;
|
||||
|
||||
if (!NILP (prefix))
|
||||
size += XINT (Flength (prefix));
|
||||
size += XFIXNUM (Flength (prefix));
|
||||
|
||||
/* This has one extra element at the end that we don't pass to Fconcat. */
|
||||
EMACS_INT size4;
|
||||
|
|
@ -2043,7 +2043,7 @@ For an approximate inverse of this, see `kbd'. */)
|
|||
else if (VECTORP (list))
|
||||
size = ASIZE (list);
|
||||
else if (CONSP (list))
|
||||
size = XINT (Flength (list));
|
||||
size = XFIXNUM (Flength (list));
|
||||
else
|
||||
wrong_type_argument (Qarrayp, list);
|
||||
|
||||
|
|
@ -2074,7 +2074,7 @@ For an approximate inverse of this, see `kbd'. */)
|
|||
{
|
||||
if (!FIXNUMP (key)
|
||||
|| EQ (key, meta_prefix_char)
|
||||
|| (XINT (key) & meta_modifier))
|
||||
|| (XFIXNUM (key) & meta_modifier))
|
||||
{
|
||||
args[len++] = Fsingle_key_description (meta_prefix_char, Qnil);
|
||||
args[len++] = sep;
|
||||
|
|
@ -2082,7 +2082,7 @@ For an approximate inverse of this, see `kbd'. */)
|
|||
continue;
|
||||
}
|
||||
else
|
||||
XSETINT (key, XINT (key) | meta_modifier);
|
||||
XSETINT (key, XFIXNUM (key) | meta_modifier);
|
||||
add_meta = 0;
|
||||
}
|
||||
else if (EQ (key, meta_prefix_char))
|
||||
|
|
@ -2240,7 +2240,7 @@ around function keys and event symbols. */)
|
|||
if (FIXNUMP (key)) /* Normal character. */
|
||||
{
|
||||
char tem[KEY_DESCRIPTION_SIZE];
|
||||
char *p = push_key_description (XINT (key), tem);
|
||||
char *p = push_key_description (XFIXNUM (key), tem);
|
||||
*p = 0;
|
||||
return make_specified_string (tem, -1, p - tem, 1);
|
||||
}
|
||||
|
|
@ -2306,7 +2306,7 @@ See Info node `(elisp)Describing Characters' for examples. */)
|
|||
|
||||
CHECK_CHARACTER (character);
|
||||
|
||||
c = XINT (character);
|
||||
c = XFIXNUM (character);
|
||||
if (!ASCII_CHAR_P (c))
|
||||
{
|
||||
int len = CHAR_STRING (c, (unsigned char *) str);
|
||||
|
|
@ -2328,7 +2328,7 @@ static int
|
|||
preferred_sequence_p (Lisp_Object seq)
|
||||
{
|
||||
EMACS_INT i;
|
||||
EMACS_INT len = XFASTINT (Flength (seq));
|
||||
EMACS_INT len = XFIXNAT (Flength (seq));
|
||||
int result = 1;
|
||||
|
||||
for (i = 0; i < len; i++)
|
||||
|
|
@ -2342,7 +2342,7 @@ preferred_sequence_p (Lisp_Object seq)
|
|||
return 0;
|
||||
else
|
||||
{
|
||||
int modifiers = XINT (elt) & (CHAR_MODIFIER_MASK & ~CHAR_META);
|
||||
int modifiers = XFIXNUM (elt) & (CHAR_MODIFIER_MASK & ~CHAR_META);
|
||||
if (modifiers == where_is_preferred_modifier)
|
||||
result = 2;
|
||||
else if (modifiers)
|
||||
|
|
@ -2463,12 +2463,12 @@ where_is_internal (Lisp_Object definition, Lisp_Object keymaps,
|
|||
|
||||
this = Fcar (XCAR (maps));
|
||||
map = Fcdr (XCAR (maps));
|
||||
last = make_fixnum (XINT (Flength (this)) - 1);
|
||||
last_is_meta = (XINT (last) >= 0
|
||||
last = make_fixnum (XFIXNUM (Flength (this)) - 1);
|
||||
last_is_meta = (XFIXNUM (last) >= 0
|
||||
&& EQ (Faref (this, last), meta_prefix_char));
|
||||
|
||||
/* if (nomenus && !preferred_sequence_p (this)) */
|
||||
if (nomenus && XINT (last) >= 0
|
||||
if (nomenus && XFIXNUM (last) >= 0
|
||||
&& SYMBOLP (tem = Faref (this, make_fixnum (0)))
|
||||
&& !NILP (Fmemq (XCAR (parse_modifiers (tem)), Vmouse_events)))
|
||||
/* 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
|
|||
if (FIXNUMP (key) && last_is_meta)
|
||||
{
|
||||
sequence = Fcopy_sequence (this);
|
||||
Faset (sequence, last, make_fixnum (XINT (key) | meta_modifier));
|
||||
Faset (sequence, last, make_fixnum (XFIXNUM (key) | meta_modifier));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -3126,8 +3126,8 @@ describe_map_compare (const void *aa, const void *bb)
|
|||
{
|
||||
const struct describe_map_elt *a = aa, *b = bb;
|
||||
if (FIXNUMP (a->event) && FIXNUMP (b->event))
|
||||
return ((XINT (a->event) > XINT (b->event))
|
||||
- (XINT (a->event) < XINT (b->event)));
|
||||
return ((XFIXNUM (a->event) > XFIXNUM (b->event))
|
||||
- (XFIXNUM (a->event) < XFIXNUM (b->event)));
|
||||
if (!FIXNUMP (a->event) && FIXNUMP (b->event))
|
||||
return 1;
|
||||
if (FIXNUMP (a->event) && !FIXNUMP (b->event))
|
||||
|
|
@ -3285,7 +3285,7 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
|
|||
if (FIXNUMP (vect[i].event))
|
||||
{
|
||||
while (i + 1 < slots_used
|
||||
&& EQ (vect[i+1].event, make_fixnum (XINT (vect[i].event) + 1))
|
||||
&& EQ (vect[i+1].event, make_fixnum (XFIXNUM (vect[i].event) + 1))
|
||||
&& !NILP (Fequal (vect[i + 1].definition, definition))
|
||||
&& vect[i].shadowed == vect[i + 1].shadowed)
|
||||
i++;
|
||||
|
|
@ -3407,7 +3407,7 @@ describe_vector (Lisp_Object vector, Lisp_Object prefix, Lisp_Object args,
|
|||
if (!keymap_p)
|
||||
{
|
||||
/* Call Fkey_description first, to avoid GC bug for the other string. */
|
||||
if (!NILP (prefix) && XFASTINT (Flength (prefix)) > 0)
|
||||
if (!NILP (prefix) && XFIXNAT (Flength (prefix)) > 0)
|
||||
{
|
||||
Lisp_Object tem = Fkey_description (prefix, Qnil);
|
||||
AUTO_STRING (space, " ");
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ kqueue_compare_dir_list (Lisp_Object watch_object)
|
|||
|
||||
/* Check size of that file. */
|
||||
Lisp_Object size = Fnth (make_fixnum (4), entry);
|
||||
if (FLOATP (size) || (XINT (size) > 0))
|
||||
if (FLOATP (size) || (XFIXNUM (size) > 0))
|
||||
kqueue_generate_event
|
||||
(watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil);
|
||||
|
||||
|
|
@ -395,7 +395,7 @@ only when the upper directory of the renamed file is watched. */)
|
|||
maxfd = 256;
|
||||
|
||||
/* We assume 50 file descriptors are sufficient for the rest of Emacs. */
|
||||
if ((maxfd - 50) < XINT (Flength (watch_list)))
|
||||
if ((maxfd - 50) < XFIXNUM (Flength (watch_list)))
|
||||
xsignal2
|
||||
(Qfile_notify_error,
|
||||
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'. */)
|
|||
watch_descriptor);
|
||||
|
||||
eassert (FIXNUMP (watch_descriptor));
|
||||
int fd = XINT (watch_descriptor);
|
||||
int fd = XFIXNUM (watch_descriptor);
|
||||
if ( fd >= 0)
|
||||
emacs_close (fd);
|
||||
|
||||
|
|
|
|||
|
|
@ -254,7 +254,7 @@ parse_viewing_conditions (Lisp_Object view, const cmsCIEXYZ *wp,
|
|||
if (CONSP (view) && FIXNATP (XCAR (view))) \
|
||||
{ \
|
||||
CHECK_RANGED_INTEGER (XCAR (view), 1, 4); \
|
||||
vc->field = XINT (XCAR (view)); \
|
||||
vc->field = XFIXNUM (XCAR (view)); \
|
||||
view = XCDR (view); \
|
||||
} \
|
||||
else \
|
||||
|
|
|
|||
60
src/lisp.h
60
src/lisp.h
|
|
@ -382,15 +382,15 @@ typedef EMACS_INT Lisp_Word;
|
|||
#define lisp_h_XCDR(c) XCONS (c)->u.s.u.cdr
|
||||
#define lisp_h_XCONS(a) \
|
||||
(eassert (CONSP (a)), XUNTAG (a, Lisp_Cons, struct Lisp_Cons))
|
||||
#define lisp_h_XHASH(a) XUINT (a)
|
||||
#define lisp_h_XHASH(a) XUFIXNUM (a)
|
||||
#ifndef GC_CHECK_CONS_LIST
|
||||
# define lisp_h_check_cons_list() ((void) 0)
|
||||
#endif
|
||||
#if USE_LSB_TAG
|
||||
# define lisp_h_make_fixnum(n) \
|
||||
XIL ((EMACS_INT) (((EMACS_UINT) (n) << INTTYPEBITS) + Lisp_Int0))
|
||||
# define lisp_h_XFASTINT(a) XINT (a)
|
||||
# define lisp_h_XINT(a) (XLI (a) >> INTTYPEBITS)
|
||||
# define lisp_h_XFIXNAT(a) XFIXNUM (a)
|
||||
# define lisp_h_XFIXNUM(a) (XLI (a) >> INTTYPEBITS)
|
||||
# ifdef __CHKP__
|
||||
# define lisp_h_XSYMBOL(a) \
|
||||
(eassert (SYMBOLP (a)), \
|
||||
|
|
@ -448,8 +448,8 @@ typedef EMACS_INT Lisp_Word;
|
|||
# endif
|
||||
# if USE_LSB_TAG
|
||||
# define make_fixnum(n) lisp_h_make_fixnum (n)
|
||||
# define XFASTINT(a) lisp_h_XFASTINT (a)
|
||||
# define XINT(a) lisp_h_XINT (a)
|
||||
# define XFIXNAT(a) lisp_h_XFIXNAT (a)
|
||||
# define XFIXNUM(a) lisp_h_XFIXNUM (a)
|
||||
# define XSYMBOL(a) lisp_h_XSYMBOL (a)
|
||||
# define XTYPE(a) lisp_h_XTYPE (a)
|
||||
# endif
|
||||
|
|
@ -486,7 +486,7 @@ enum Lisp_Type
|
|||
whose first member indicates the subtype. */
|
||||
Lisp_Misc = 1,
|
||||
|
||||
/* Integer. XINT (obj) is the integer value. */
|
||||
/* Integer. XFIXNUM (obj) is the integer value. */
|
||||
Lisp_Int0 = 2,
|
||||
Lisp_Int1 = USE_LSB_TAG ? 6 : 3,
|
||||
|
||||
|
|
@ -1038,15 +1038,15 @@ INLINE Lisp_Object
|
|||
}
|
||||
|
||||
INLINE EMACS_INT
|
||||
(XINT) (Lisp_Object a)
|
||||
(XFIXNUM) (Lisp_Object a)
|
||||
{
|
||||
return lisp_h_XINT (a);
|
||||
return lisp_h_XFIXNUM (a);
|
||||
}
|
||||
|
||||
INLINE EMACS_INT
|
||||
(XFASTINT) (Lisp_Object a)
|
||||
(XFIXNAT) (Lisp_Object a)
|
||||
{
|
||||
EMACS_INT n = lisp_h_XFASTINT (a);
|
||||
EMACS_INT n = lisp_h_XFIXNAT (a);
|
||||
eassume (0 <= n);
|
||||
return n;
|
||||
}
|
||||
|
|
@ -1079,7 +1079,7 @@ make_fixnum (EMACS_INT n)
|
|||
|
||||
/* Extract A's value as a signed integer. */
|
||||
INLINE EMACS_INT
|
||||
XINT (Lisp_Object a)
|
||||
XFIXNUM (Lisp_Object a)
|
||||
{
|
||||
EMACS_INT i = XLI (a);
|
||||
if (! USE_LSB_TAG)
|
||||
|
|
@ -1090,14 +1090,14 @@ XINT (Lisp_Object a)
|
|||
return i >> INTTYPEBITS;
|
||||
}
|
||||
|
||||
/* Like XINT (A), but may be faster. A must be nonnegative.
|
||||
/* Like XFIXNUM (A), but may be faster. A must be nonnegative.
|
||||
If ! USE_LSB_TAG, this takes advantage of the fact that Lisp
|
||||
integers have zero-bits in their tags. */
|
||||
INLINE EMACS_INT
|
||||
XFASTINT (Lisp_Object a)
|
||||
XFIXNAT (Lisp_Object a)
|
||||
{
|
||||
EMACS_INT int0 = Lisp_Int0;
|
||||
EMACS_INT n = USE_LSB_TAG ? XINT (a) : XLI (a) - (int0 << VALBITS);
|
||||
EMACS_INT n = USE_LSB_TAG ? XFIXNUM (a) : XLI (a) - (int0 << VALBITS);
|
||||
eassume (0 <= n);
|
||||
return n;
|
||||
}
|
||||
|
|
@ -1106,14 +1106,14 @@ XFASTINT (Lisp_Object a)
|
|||
|
||||
/* Extract A's value as an unsigned integer. */
|
||||
INLINE EMACS_UINT
|
||||
XUINT (Lisp_Object a)
|
||||
XUFIXNUM (Lisp_Object a)
|
||||
{
|
||||
EMACS_UINT i = XLI (a);
|
||||
return USE_LSB_TAG ? i >> INTTYPEBITS : i & INTMASK;
|
||||
}
|
||||
|
||||
/* Return A's (Lisp-integer sized) hash. Happens to be like XUINT
|
||||
right now, but XUINT should only be applied to objects we know are
|
||||
/* Return A's (Lisp-integer sized) hash. Happens to be like XUFIXNUM
|
||||
right now, but XUFIXNUM should only be applied to objects we know are
|
||||
integers. */
|
||||
|
||||
INLINE EMACS_INT
|
||||
|
|
@ -1218,7 +1218,7 @@ INLINE bool
|
|||
bits set, which makes this conversion inherently unportable. */
|
||||
|
||||
INLINE void *
|
||||
XINTPTR (Lisp_Object a)
|
||||
XFIXNUMPTR (Lisp_Object a)
|
||||
{
|
||||
return XUNTAG (a, Lisp_Int0, char);
|
||||
}
|
||||
|
|
@ -1227,7 +1227,7 @@ INLINE Lisp_Object
|
|||
make_pointer_integer (void *p)
|
||||
{
|
||||
Lisp_Object a = TAG_PTR (Lisp_Int0, p);
|
||||
eassert (FIXNUMP (a) && XINTPTR (a) == p);
|
||||
eassert (FIXNUMP (a) && XFIXNUMPTR (a) == p);
|
||||
return a;
|
||||
}
|
||||
|
||||
|
|
@ -2378,10 +2378,10 @@ extern Lisp_Object make_misc_ptr (void *);
|
|||
|
||||
/* A mint_ptr object OBJ represents a C-language pointer P efficiently.
|
||||
Preferably (and typically), OBJ is a Lisp integer I such that
|
||||
XINTPTR (I) == P, as this represents P within a single Lisp value
|
||||
XFIXNUMPTR (I) == P, as this represents P within a single Lisp value
|
||||
without requiring any auxiliary memory. However, if P would be
|
||||
damaged by being tagged as an integer and then untagged via
|
||||
XINTPTR, then OBJ is a Lisp_Misc_Ptr with pointer component P.
|
||||
XFIXNUMPTR, then OBJ is a Lisp_Misc_Ptr with pointer component P.
|
||||
|
||||
mint_ptr objects are efficiency hacks intended for C code.
|
||||
Although xmint_ptr can be given any mint_ptr generated by non-buggy
|
||||
|
|
@ -2395,7 +2395,7 @@ INLINE Lisp_Object
|
|||
make_mint_ptr (void *a)
|
||||
{
|
||||
Lisp_Object val = TAG_PTR (Lisp_Int0, a);
|
||||
return FIXNUMP (val) && XINTPTR (val) == a ? val : make_misc_ptr (a);
|
||||
return FIXNUMP (val) && XFIXNUMPTR (val) == a ? val : make_misc_ptr (a);
|
||||
}
|
||||
|
||||
INLINE bool
|
||||
|
|
@ -2409,7 +2409,7 @@ xmint_pointer (Lisp_Object a)
|
|||
{
|
||||
eassert (mint_ptrp (a));
|
||||
if (FIXNUMP (a))
|
||||
return XINTPTR (a);
|
||||
return XFIXNUMPTR (a);
|
||||
return XUNTAG (a, Lisp_Misc, struct Lisp_Misc_Ptr)->pointer;
|
||||
}
|
||||
|
||||
|
|
@ -2766,14 +2766,14 @@ FIXED_OR_FLOATP (Lisp_Object x)
|
|||
INLINE bool
|
||||
FIXNATP (Lisp_Object x)
|
||||
{
|
||||
return FIXNUMP (x) && 0 <= XINT (x);
|
||||
return FIXNUMP (x) && 0 <= XFIXNUM (x);
|
||||
}
|
||||
INLINE bool
|
||||
NATNUMP (Lisp_Object x)
|
||||
{
|
||||
if (BIGNUMP (x))
|
||||
return mpz_cmp_si (XBIGNUM (x)->value, 0) >= 0;
|
||||
return FIXNUMP (x) && 0 <= XINT (x);
|
||||
return FIXNUMP (x) && 0 <= XFIXNUM (x);
|
||||
}
|
||||
INLINE bool
|
||||
NUMBERP (Lisp_Object x)
|
||||
|
|
@ -2784,13 +2784,13 @@ NUMBERP (Lisp_Object x)
|
|||
INLINE bool
|
||||
RANGED_FIXNUMP (intmax_t lo, Lisp_Object x, intmax_t hi)
|
||||
{
|
||||
return FIXNUMP (x) && lo <= XINT (x) && XINT (x) <= hi;
|
||||
return FIXNUMP (x) && lo <= XFIXNUM (x) && XFIXNUM (x) <= hi;
|
||||
}
|
||||
|
||||
#define TYPE_RANGED_FIXNUMP(type, x) \
|
||||
(FIXNUMP (x) \
|
||||
&& (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XINT (x) : 0 <= XINT (x)) \
|
||||
&& XINT (x) <= TYPE_MAXIMUM (type))
|
||||
&& (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XFIXNUM (x) : 0 <= XFIXNUM (x)) \
|
||||
&& XFIXNUM (x) <= TYPE_MAXIMUM (type))
|
||||
|
||||
INLINE bool
|
||||
AUTOLOADP (Lisp_Object x)
|
||||
|
|
@ -2892,7 +2892,7 @@ CHECK_FIXNAT (Lisp_Object x)
|
|||
#define CHECK_RANGED_INTEGER(x, lo, hi) \
|
||||
do { \
|
||||
CHECK_FIXNUM (x); \
|
||||
if (! ((lo) <= XINT (x) && XINT (x) <= (hi))) \
|
||||
if (! ((lo) <= XFIXNUM (x) && XFIXNUM (x) <= (hi))) \
|
||||
args_out_of_range_3 \
|
||||
(x, \
|
||||
make_fixnum ((lo) < 0 && (lo) < MOST_NEGATIVE_FIXNUM \
|
||||
|
|
@ -2921,7 +2921,7 @@ XFLOATINT (Lisp_Object n)
|
|||
{
|
||||
if (BIGNUMP (n))
|
||||
return mpz_get_d (XBIGNUM (n)->value);
|
||||
return FLOATP (n) ? XFLOAT_DATA (n) : XINT (n);
|
||||
return FLOATP (n) ? XFLOAT_DATA (n) : XFIXNUM (n);
|
||||
}
|
||||
|
||||
INLINE void
|
||||
|
|
|
|||
44
src/lread.c
44
src/lread.c
|
|
@ -331,7 +331,7 @@ readchar (Lisp_Object readcharfun, bool *multibyte)
|
|||
|
||||
if (NILP (tem))
|
||||
return -1;
|
||||
return XINT (tem);
|
||||
return XFIXNUM (tem);
|
||||
|
||||
read_multibyte:
|
||||
if (unread_char >= 0)
|
||||
|
|
@ -673,7 +673,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required,
|
|||
do
|
||||
val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
|
||||
FIXED_OR_FLOATP (seconds) ? &end_time : NULL);
|
||||
while (FIXNUMP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */
|
||||
while (FIXNUMP (val) && XFIXNUM (val) == -2); /* wrong_kboard_jmpbuf */
|
||||
|
||||
if (BUFFERP (val))
|
||||
goto retry;
|
||||
|
|
@ -704,7 +704,7 @@ read_filtered_event (bool no_switch_frame, bool ascii_required,
|
|||
/* Merge this symbol's modifier bits
|
||||
with the ASCII equivalent of its basic code. */
|
||||
if (!NILP (tem1))
|
||||
XSETFASTINT (val, XINT (tem1) | XINT (Fcar (Fcdr (tem))));
|
||||
XSETFASTINT (val, XFIXNUM (tem1) | XFIXNUM (Fcar (Fcdr (tem))));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -766,7 +766,7 @@ floating-point value. */)
|
|||
val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
|
||||
|
||||
return (NILP (val) ? Qnil
|
||||
: make_fixnum (char_resolve_modifier_mask (XINT (val))));
|
||||
: make_fixnum (char_resolve_modifier_mask (XFIXNUM (val))));
|
||||
}
|
||||
|
||||
DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0,
|
||||
|
|
@ -810,7 +810,7 @@ floating-point value. */)
|
|||
val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
|
||||
|
||||
return (NILP (val) ? Qnil
|
||||
: make_fixnum (char_resolve_modifier_mask (XINT (val))));
|
||||
: make_fixnum (char_resolve_modifier_mask (XFIXNUM (val))));
|
||||
}
|
||||
|
||||
DEFUN ("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,
|
|||
if (FIXNATP (predicate))
|
||||
{
|
||||
fd = -1;
|
||||
if (INT_MAX < XFASTINT (predicate))
|
||||
if (INT_MAX < XFIXNAT (predicate))
|
||||
last_errno = EINVAL;
|
||||
else if (faccessat (AT_FDCWD, pfn, XFASTINT (predicate),
|
||||
else if (faccessat (AT_FDCWD, pfn, XFIXNAT (predicate),
|
||||
AT_EACCESS)
|
||||
== 0)
|
||||
{
|
||||
|
|
@ -2348,14 +2348,14 @@ character_name_to_code (char const *name, ptrdiff_t name_len)
|
|||
: call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt));
|
||||
|
||||
if (! RANGED_FIXNUMP (0, code, MAX_UNICODE_CHAR)
|
||||
|| char_surrogate_p (XINT (code)))
|
||||
|| char_surrogate_p (XFIXNUM (code)))
|
||||
{
|
||||
AUTO_STRING (format, "\\N{%s}");
|
||||
AUTO_STRING_WITH_LEN (namestr, name, name_len);
|
||||
xsignal1 (Qinvalid_read_syntax, CALLN (Fformat, format, namestr));
|
||||
}
|
||||
|
||||
return XINT (code);
|
||||
return XFIXNUM (code);
|
||||
}
|
||||
|
||||
/* 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)
|
|||
|
||||
if (!EQ (head, Qhash_table))
|
||||
{
|
||||
ptrdiff_t size = XINT (Flength (tmp));
|
||||
ptrdiff_t size = XFIXNUM (Flength (tmp));
|
||||
Lisp_Object record = Fmake_record (CAR_SAFE (tmp),
|
||||
make_fixnum (size - 1),
|
||||
Qnil);
|
||||
|
|
@ -2866,7 +2866,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
/* Sub char-table can't be read as a regular
|
||||
vector because of a two C integer fields. */
|
||||
Lisp_Object tbl, tmp = read_list (1, readcharfun);
|
||||
ptrdiff_t size = XINT (Flength (tmp));
|
||||
ptrdiff_t size = XFIXNUM (Flength (tmp));
|
||||
int i, depth, min_char;
|
||||
struct Lisp_Cons *cell;
|
||||
|
||||
|
|
@ -2875,7 +2875,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
|
||||
if (! RANGED_FIXNUMP (1, XCAR (tmp), 3))
|
||||
error ("Invalid depth in sub char-table");
|
||||
depth = XINT (XCAR (tmp));
|
||||
depth = XFIXNUM (XCAR (tmp));
|
||||
if (chartab_size[depth] != size - 2)
|
||||
error ("Invalid size in sub char-table");
|
||||
cell = XCONS (tmp), tmp = XCDR (tmp), size--;
|
||||
|
|
@ -2883,7 +2883,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
|
||||
if (! RANGED_FIXNUMP (0, XCAR (tmp), MAX_CHAR))
|
||||
error ("Invalid minimum character in sub-char-table");
|
||||
min_char = XINT (XCAR (tmp));
|
||||
min_char = XFIXNUM (XCAR (tmp));
|
||||
cell = XCONS (tmp), tmp = XCDR (tmp), size--;
|
||||
free_cons (cell);
|
||||
|
||||
|
|
@ -2908,7 +2908,7 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
if (c == '"')
|
||||
{
|
||||
Lisp_Object tmp, val;
|
||||
EMACS_INT size_in_chars = bool_vector_bytes (XFASTINT (length));
|
||||
EMACS_INT size_in_chars = bool_vector_bytes (XFIXNAT (length));
|
||||
unsigned char *data;
|
||||
|
||||
UNREAD (c);
|
||||
|
|
@ -2919,17 +2919,17 @@ read1 (Lisp_Object readcharfun, int *pch, bool first_in_list)
|
|||
when the number of bits was a multiple of 8.
|
||||
Accept such input in case it came from an old
|
||||
version. */
|
||||
&& ! (XFASTINT (length)
|
||||
&& ! (XFIXNAT (length)
|
||||
== (SCHARS (tmp) - 1) * BOOL_VECTOR_BITS_PER_CHAR)))
|
||||
invalid_syntax ("#&...");
|
||||
|
||||
val = make_uninit_bool_vector (XFASTINT (length));
|
||||
val = make_uninit_bool_vector (XFIXNAT (length));
|
||||
data = bool_vector_uchar_data (val);
|
||||
memcpy (data, SDATA (tmp), size_in_chars);
|
||||
/* Clear the extraneous bits in the last byte. */
|
||||
if (XINT (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
|
||||
if (XFIXNUM (length) != size_in_chars * BOOL_VECTOR_BITS_PER_CHAR)
|
||||
data[size_in_chars - 1]
|
||||
&= (1 << (XINT (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
|
||||
&= (1 << (XFIXNUM (length) % BOOL_VECTOR_BITS_PER_CHAR)) - 1;
|
||||
return val;
|
||||
}
|
||||
invalid_syntax ("#&...");
|
||||
|
|
@ -3832,11 +3832,11 @@ read_vector (Lisp_Object readcharfun, bool bytecodeflag)
|
|||
|
||||
tem = read_list (1, readcharfun);
|
||||
len = Flength (tem);
|
||||
if (bytecodeflag && XFASTINT (len) <= COMPILED_STACK_DEPTH)
|
||||
if (bytecodeflag && XFIXNAT (len) <= COMPILED_STACK_DEPTH)
|
||||
error ("Invalid byte code");
|
||||
vector = Fmake_vector (len, Qnil);
|
||||
|
||||
size = XFASTINT (len);
|
||||
size = XFIXNAT (len);
|
||||
ptr = XVECTOR (vector)->contents;
|
||||
for (i = 0; i < size; i++)
|
||||
{
|
||||
|
|
@ -3990,7 +3990,7 @@ read_list (bool flag, Lisp_Object readcharfun)
|
|||
multibyte. */
|
||||
|
||||
/* Position is negative for user variables. */
|
||||
EMACS_INT pos = eabs (XINT (XCDR (val)));
|
||||
EMACS_INT pos = eabs (XFIXNUM (XCDR (val)));
|
||||
if (pos >= saved_doc_string_position
|
||||
&& pos < (saved_doc_string_position
|
||||
+ saved_doc_string_length))
|
||||
|
|
@ -4095,7 +4095,7 @@ intern_sym (Lisp_Object sym, Lisp_Object obarray, Lisp_Object index)
|
|||
SET_SYMBOL_VAL (XSYMBOL (sym), sym);
|
||||
}
|
||||
|
||||
ptr = aref_addr (obarray, XINT (index));
|
||||
ptr = aref_addr (obarray, XFIXNUM (index));
|
||||
set_symbol_next (sym, SYMBOLP (*ptr) ? XSYMBOL (*ptr) : NULL);
|
||||
*ptr = sym;
|
||||
return sym;
|
||||
|
|
|
|||
14
src/macros.c
14
src/macros.c
|
|
@ -98,8 +98,8 @@ macro before appending to it. */)
|
|||
{
|
||||
Lisp_Object c;
|
||||
c = Faref (KVAR (current_kboard, Vlast_kbd_macro), make_fixnum (i));
|
||||
if (cvt && FIXNATP (c) && (XFASTINT (c) & 0x80))
|
||||
XSETFASTINT (c, CHAR_META | (XFASTINT (c) & ~0x80));
|
||||
if (cvt && FIXNATP (c) && (XFIXNAT (c) & 0x80))
|
||||
XSETFASTINT (c, CHAR_META | (XFIXNAT (c) & ~0x80));
|
||||
current_kboard->kbd_macro_buffer[i] = c;
|
||||
}
|
||||
|
||||
|
|
@ -162,11 +162,11 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
|
|||
message1 ("Keyboard macro defined");
|
||||
}
|
||||
|
||||
if (XFASTINT (repeat) == 0)
|
||||
if (XFIXNAT (repeat) == 0)
|
||||
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro), repeat, loopfunc);
|
||||
else if (XINT (repeat) > 1)
|
||||
else if (XFIXNUM (repeat) > 1)
|
||||
{
|
||||
XSETINT (repeat, XINT (repeat) - 1);
|
||||
XSETINT (repeat, XFIXNUM (repeat) - 1);
|
||||
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro),
|
||||
repeat, loopfunc);
|
||||
}
|
||||
|
|
@ -267,7 +267,7 @@ pop_kbd_macro (Lisp_Object info)
|
|||
Lisp_Object tem;
|
||||
Vexecuting_kbd_macro = XCAR (info);
|
||||
tem = XCDR (info);
|
||||
executing_kbd_macro_index = XINT (XCAR (tem));
|
||||
executing_kbd_macro_index = XFIXNUM (XCAR (tem));
|
||||
Vreal_this_command = XCDR (tem);
|
||||
run_hook (Qkbd_macro_termination_hook);
|
||||
}
|
||||
|
|
@ -293,7 +293,7 @@ each iteration of the macro. Iteration stops if LOOPFUNC returns nil. */)
|
|||
if (!NILP (count))
|
||||
{
|
||||
count = Fprefix_numeric_value (count);
|
||||
repeat = XINT (count);
|
||||
repeat = XFIXNUM (count);
|
||||
}
|
||||
|
||||
final = indirect_function (macro);
|
||||
|
|
|
|||
|
|
@ -525,7 +525,7 @@ set_marker_internal (Lisp_Object marker, Lisp_Object position,
|
|||
don't want to call buf_charpos_to_bytepos if POSITION
|
||||
is a marker and so we know the bytepos already. */
|
||||
if (FIXNUMP (position))
|
||||
charpos = XINT (position), bytepos = -1;
|
||||
charpos = XFIXNUM (position), bytepos = -1;
|
||||
else if (MARKERP (position))
|
||||
{
|
||||
charpos = XMARKER (position)->charpos;
|
||||
|
|
@ -752,7 +752,7 @@ DEFUN ("buffer-has-markers-at", Fbuffer_has_markers_at, Sbuffer_has_markers_at,
|
|||
register struct Lisp_Marker *tail;
|
||||
register ptrdiff_t charpos;
|
||||
|
||||
charpos = clip_to_bounds (BEG, XINT (position), Z);
|
||||
charpos = clip_to_bounds (BEG, XFIXNUM (position), Z);
|
||||
|
||||
for (tail = BUF_MARKERS (current_buffer); tail; tail = tail->next)
|
||||
if (tail->charpos == charpos)
|
||||
|
|
|
|||
20
src/menu.c
20
src/menu.c
|
|
@ -134,11 +134,11 @@ restore_menu_items (Lisp_Object saved)
|
|||
menu_items_inuse = (! NILP (menu_items) ? Qt : Qnil);
|
||||
menu_items_allocated = (VECTORP (menu_items) ? ASIZE (menu_items) : 0);
|
||||
saved = XCDR (saved);
|
||||
menu_items_used = XINT (XCAR (saved));
|
||||
menu_items_used = XFIXNUM (XCAR (saved));
|
||||
saved = XCDR (saved);
|
||||
menu_items_n_panes = XINT (XCAR (saved));
|
||||
menu_items_n_panes = XFIXNUM (XCAR (saved));
|
||||
saved = XCDR (saved);
|
||||
menu_items_submenu_depth = XINT (XCAR (saved));
|
||||
menu_items_submenu_depth = XFIXNUM (XCAR (saved));
|
||||
}
|
||||
|
||||
/* 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,
|
|||
USE_SAFE_ALLOCA;
|
||||
|
||||
length = Flength (maps);
|
||||
len = XINT (length);
|
||||
len = XFIXNUM (length);
|
||||
|
||||
/* Convert the list MAPS into a vector MAPVEC. */
|
||||
SAFE_ALLOCA_LISP (mapvec, len);
|
||||
|
|
@ -1079,7 +1079,7 @@ into menu items. */)
|
|||
if (!FRAME_LIVE_P (f))
|
||||
return Qnil;
|
||||
|
||||
pixel_to_glyph_coords (f, XINT (x), XINT (y), &col, &row, NULL, 1);
|
||||
pixel_to_glyph_coords (f, XFIXNUM (x), XFIXNUM (y), &col, &row, NULL, 1);
|
||||
if (0 <= row && row < FRAME_MENU_BAR_LINES (f))
|
||||
{
|
||||
Lisp_Object items, item;
|
||||
|
|
@ -1099,10 +1099,10 @@ into menu items. */)
|
|||
pos = AREF (items, i + 3);
|
||||
if (NILP (str))
|
||||
return item;
|
||||
if (XINT (pos) <= col
|
||||
if (XFIXNUM (pos) <= col
|
||||
/* We use <= so the blank between 2 items on a TTY is
|
||||
considered part of the previous item. */
|
||||
&& col <= XINT (pos) + menu_item_width (SDATA (str)))
|
||||
&& col <= XFIXNUM (pos) + menu_item_width (SDATA (str)))
|
||||
{
|
||||
item = AREF (items, i);
|
||||
return item;
|
||||
|
|
@ -1268,8 +1268,8 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
|
|||
? (EMACS_INT) INT_MIN - ypos
|
||||
: MOST_NEGATIVE_FIXNUM),
|
||||
INT_MAX - ypos);
|
||||
xpos += XINT (x);
|
||||
ypos += XINT (y);
|
||||
xpos += XFIXNUM (x);
|
||||
ypos += XFIXNUM (y);
|
||||
|
||||
XSETFRAME (Vmenu_updating_frame, f);
|
||||
}
|
||||
|
|
@ -1309,7 +1309,7 @@ x_popup_menu_1 (Lisp_Object position, Lisp_Object menu)
|
|||
else if (CONSP (menu) && KEYMAPP (XCAR (menu)))
|
||||
{
|
||||
/* We were given a list of keymaps. */
|
||||
EMACS_INT nmaps = XFASTINT (Flength (menu));
|
||||
EMACS_INT nmaps = XFIXNAT (Flength (menu));
|
||||
Lisp_Object *maps;
|
||||
ptrdiff_t i;
|
||||
USE_SAFE_ALLOCA;
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ string_to_object (Lisp_Object val, Lisp_Object defalt)
|
|||
}
|
||||
|
||||
expr_and_pos = Fread_from_string (val, Qnil, Qnil);
|
||||
pos = XINT (Fcdr (expr_and_pos));
|
||||
pos = XFIXNUM (Fcdr (expr_and_pos));
|
||||
if (pos != SCHARS (val))
|
||||
{
|
||||
/* Ignore trailing whitespace; any other trailing junk
|
||||
|
|
@ -198,7 +198,7 @@ read_minibuf_noninteractive (Lisp_Object map, Lisp_Object initial,
|
|||
|
||||
/* Check, whether we need to suppress echoing. */
|
||||
if (CHARACTERP (Vread_hide_char))
|
||||
hide_char = XFASTINT (Vread_hide_char);
|
||||
hide_char = XFIXNAT (Vread_hide_char);
|
||||
|
||||
/* Manipulate tty. */
|
||||
if (hide_char)
|
||||
|
|
@ -299,7 +299,7 @@ Return (point-min) if current buffer is not a minibuffer. */)
|
|||
|
||||
end = Ffield_end (beg, Qnil, Qnil);
|
||||
|
||||
if (XINT (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
|
||||
if (XFIXNUM (end) == ZV && NILP (Fget_char_property (beg, Qfield, Qnil)))
|
||||
return beg;
|
||||
else
|
||||
return end;
|
||||
|
|
@ -311,7 +311,7 @@ DEFUN ("minibuffer-contents", Fminibuffer_contents,
|
|||
If the current buffer is not a minibuffer, return its entire contents. */)
|
||||
(void)
|
||||
{
|
||||
ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ());
|
||||
ptrdiff_t prompt_end = XFIXNUM (Fminibuffer_prompt_end ());
|
||||
return make_buffer_string (prompt_end, ZV, 1);
|
||||
}
|
||||
|
||||
|
|
@ -321,7 +321,7 @@ DEFUN ("minibuffer-contents-no-properties", Fminibuffer_contents_no_properties,
|
|||
If the current buffer is not a minibuffer, return its entire contents. */)
|
||||
(void)
|
||||
{
|
||||
ptrdiff_t prompt_end = XINT (Fminibuffer_prompt_end ());
|
||||
ptrdiff_t prompt_end = XFIXNUM (Fminibuffer_prompt_end ());
|
||||
return make_buffer_string (prompt_end, ZV, 0);
|
||||
}
|
||||
|
||||
|
|
@ -395,11 +395,11 @@ read_minibuf (Lisp_Object map, Lisp_Object initial, Lisp_Object prompt,
|
|||
{
|
||||
CHECK_FIXNUM (backup_n);
|
||||
/* Convert to distance from end of input. */
|
||||
if (XINT (backup_n) < 1)
|
||||
if (XFIXNUM (backup_n) < 1)
|
||||
/* A number too small means the beginning of the string. */
|
||||
pos = - SCHARS (initial);
|
||||
else
|
||||
pos = XINT (backup_n) - 1 - SCHARS (initial);
|
||||
pos = XFIXNUM (backup_n) - 1 - SCHARS (initial);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
@ -788,12 +788,12 @@ read_minibuf_unwind (void)
|
|||
/* Restore prompt, etc, from outer minibuffer level. */
|
||||
Lisp_Object key_vec = Fcar (minibuf_save_list);
|
||||
eassert (VECTORP (key_vec));
|
||||
this_command_key_count = XFASTINT (Flength (key_vec));
|
||||
this_command_key_count = XFIXNAT (Flength (key_vec));
|
||||
this_command_keys = key_vec;
|
||||
minibuf_save_list = Fcdr (minibuf_save_list);
|
||||
minibuf_prompt = Fcar (minibuf_save_list);
|
||||
minibuf_save_list = Fcdr (minibuf_save_list);
|
||||
minibuf_prompt_width = XFASTINT (Fcar (minibuf_save_list));
|
||||
minibuf_prompt_width = XFIXNAT (Fcar (minibuf_save_list));
|
||||
minibuf_save_list = Fcdr (minibuf_save_list);
|
||||
Vhelp_form = Fcar (minibuf_save_list);
|
||||
minibuf_save_list = Fcdr (minibuf_save_list);
|
||||
|
|
@ -1327,7 +1327,7 @@ is used to further constrain the set of candidates. */)
|
|||
eltstring, zero,
|
||||
make_fixnum (compare),
|
||||
completion_ignore_case ? Qt : Qnil);
|
||||
matchsize = EQ (tem, Qt) ? compare : eabs (XINT (tem)) - 1;
|
||||
matchsize = EQ (tem, Qt) ? compare : eabs (XFIXNUM (tem)) - 1;
|
||||
|
||||
if (completion_ignore_case)
|
||||
{
|
||||
|
|
|
|||
12
src/msdos.c
12
src/msdos.c
|
|
@ -224,7 +224,7 @@ them. This happens with wheeled mice on Windows 9X, for example. */)
|
|||
int n;
|
||||
|
||||
CHECK_FIXNUM (nbuttons);
|
||||
n = XINT (nbuttons);
|
||||
n = XFIXNUM (nbuttons);
|
||||
if (n < 2 || n > 3)
|
||||
xsignal2 (Qargs_out_of_range,
|
||||
build_string ("only 2 or 3 mouse buttons are supported"),
|
||||
|
|
@ -540,7 +540,7 @@ dos_set_window_size (int *rows, int *cols)
|
|||
*rows, *cols), Qnil));
|
||||
|
||||
if (FIXNUMP (video_mode)
|
||||
&& (video_mode_value = XINT (video_mode)) > 0)
|
||||
&& (video_mode_value = XFIXNUM (video_mode)) > 0)
|
||||
{
|
||||
regs.x.ax = video_mode_value;
|
||||
int86 (0x10, ®s, ®s);
|
||||
|
|
@ -746,7 +746,7 @@ IT_set_cursor_type (struct frame *f, Lisp_Object cursor_type)
|
|||
{
|
||||
/* Feature: negative WIDTH means cursor at the top
|
||||
of the character cell, zero means invisible cursor. */
|
||||
width = XINT (bar_parms);
|
||||
width = XFIXNUM (bar_parms);
|
||||
msdos_set_cursor_shape (f, width >= 0 ? DEFAULT_CURSOR_START : 0,
|
||||
width);
|
||||
}
|
||||
|
|
@ -754,9 +754,9 @@ IT_set_cursor_type (struct frame *f, Lisp_Object cursor_type)
|
|||
&& FIXNUMP (XCAR (bar_parms))
|
||||
&& FIXNUMP (XCDR (bar_parms)))
|
||||
{
|
||||
int start_line = XINT (XCDR (bar_parms));
|
||||
int start_line = XFIXNUM (XCDR (bar_parms));
|
||||
|
||||
width = XINT (XCAR (bar_parms));
|
||||
width = XFIXNUM (XCAR (bar_parms));
|
||||
msdos_set_cursor_shape (f, start_line, width);
|
||||
}
|
||||
}
|
||||
|
|
@ -1564,7 +1564,7 @@ void
|
|||
IT_set_frame_parameters (struct frame *f, Lisp_Object alist)
|
||||
{
|
||||
Lisp_Object tail;
|
||||
int i, j, length = XINT (Flength (alist));
|
||||
int i, j, length = XFIXNUM (Flength (alist));
|
||||
Lisp_Object *parms
|
||||
= (Lisp_Object *) alloca (length * word_size);
|
||||
Lisp_Object *values
|
||||
|
|
|
|||
30
src/print.c
30
src/print.c
|
|
@ -261,7 +261,7 @@ printchar_to_stream (unsigned int ch, FILE *stream)
|
|||
break;
|
||||
if (! (i < n))
|
||||
break;
|
||||
ch = XFASTINT (AREF (dv, i));
|
||||
ch = XFIXNAT (AREF (dv, i));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -522,7 +522,7 @@ PRINTCHARFUN defaults to the value of `standard-output' (which see). */)
|
|||
printcharfun = Vstandard_output;
|
||||
CHECK_FIXNUM (character);
|
||||
PRINTPREPARE;
|
||||
printchar (XINT (character), printcharfun);
|
||||
printchar (XFIXNUM (character), printcharfun);
|
||||
PRINTFINISH;
|
||||
return character;
|
||||
}
|
||||
|
|
@ -772,7 +772,7 @@ to make it write to the debugging output. */)
|
|||
(Lisp_Object character)
|
||||
{
|
||||
CHECK_FIXNUM (character);
|
||||
printchar_to_stream (XINT (character), stderr);
|
||||
printchar_to_stream (XFIXNUM (character), stderr);
|
||||
return character;
|
||||
}
|
||||
|
||||
|
|
@ -1408,8 +1408,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
|
|||
Negative values of print-length are invalid. Treat them
|
||||
like a print-length of nil. */
|
||||
if (FIXNATP (Vprint_length)
|
||||
&& XFASTINT (Vprint_length) < size_in_bytes)
|
||||
size_in_bytes = XFASTINT (Vprint_length);
|
||||
&& XFIXNAT (Vprint_length) < size_in_bytes)
|
||||
size_in_bytes = XFIXNAT (Vprint_length);
|
||||
|
||||
for (ptrdiff_t i = 0; i < size_in_bytes; i++)
|
||||
{
|
||||
|
|
@ -1521,8 +1521,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
|
|||
ptrdiff_t size = real_size;
|
||||
|
||||
/* Don't print more elements than the specified maximum. */
|
||||
if (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size)
|
||||
size = XFASTINT (Vprint_length);
|
||||
if (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size)
|
||||
size = XFIXNAT (Vprint_length);
|
||||
|
||||
printchar ('(', printcharfun);
|
||||
for (ptrdiff_t i = 0; i < size; i++)
|
||||
|
|
@ -1652,8 +1652,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
|
|||
|
||||
/* Don't print more elements than the specified maximum. */
|
||||
ptrdiff_t n
|
||||
= (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size
|
||||
? XFASTINT (Vprint_length) : size);
|
||||
= (FIXNATP (Vprint_length) && XFIXNAT (Vprint_length) < size
|
||||
? XFIXNAT (Vprint_length) : size);
|
||||
|
||||
print_c_string ("#s(", printcharfun);
|
||||
for (ptrdiff_t i = 0; i < n; i ++)
|
||||
|
|
@ -1714,8 +1714,8 @@ print_vectorlike (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag,
|
|||
|
||||
/* Don't print more elements than the specified maximum. */
|
||||
if (FIXNATP (Vprint_length)
|
||||
&& XFASTINT (Vprint_length) < size)
|
||||
size = XFASTINT (Vprint_length);
|
||||
&& XFIXNAT (Vprint_length) < size)
|
||||
size = XFIXNAT (Vprint_length);
|
||||
|
||||
for (int i = idx; i < size; i++)
|
||||
{
|
||||
|
|
@ -1807,7 +1807,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
|
|||
Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil);
|
||||
if (FIXNUMP (num))
|
||||
{
|
||||
EMACS_INT n = XINT (num);
|
||||
EMACS_INT n = XFIXNUM (num);
|
||||
if (n < 0)
|
||||
{ /* Add a prefix #n= if OBJ has not yet been printed;
|
||||
that is, its status field is nil. */
|
||||
|
|
@ -1832,7 +1832,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
|
|||
{
|
||||
case_Lisp_Int:
|
||||
{
|
||||
int len = sprintf (buf, "%"pI"d", XINT (obj));
|
||||
int len = sprintf (buf, "%"pI"d", XFIXNUM (obj));
|
||||
strout (buf, len, len, printcharfun);
|
||||
}
|
||||
break;
|
||||
|
|
@ -2008,7 +2008,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
|
|||
case Lisp_Cons:
|
||||
/* If deeper than spec'd depth, print placeholder. */
|
||||
if (FIXNUMP (Vprint_level)
|
||||
&& print_depth > XINT (Vprint_level))
|
||||
&& print_depth > XFIXNUM (Vprint_level))
|
||||
print_c_string ("...", printcharfun);
|
||||
else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
|
||||
&& EQ (XCAR (obj), Qquote))
|
||||
|
|
@ -2050,7 +2050,7 @@ print_object (Lisp_Object obj, Lisp_Object printcharfun, bool escapeflag)
|
|||
/* Negative values of print-length are invalid in CL.
|
||||
Treat them like nil, as CMUCL does. */
|
||||
printmax_t print_length = (FIXNATP (Vprint_length)
|
||||
? XFASTINT (Vprint_length)
|
||||
? XFIXNAT (Vprint_length)
|
||||
: TYPE_MAXIMUM (printmax_t));
|
||||
|
||||
printmax_t i = 0;
|
||||
|
|
|
|||
|
|
@ -747,7 +747,7 @@ status_message (struct Lisp_Process *p)
|
|||
{
|
||||
char const *signame;
|
||||
synchronize_system_messages_locale ();
|
||||
signame = strsignal (XFASTINT (code));
|
||||
signame = strsignal (XFIXNAT (code));
|
||||
if (signame == 0)
|
||||
string = build_string ("unknown");
|
||||
else
|
||||
|
|
@ -769,10 +769,10 @@ status_message (struct Lisp_Process *p)
|
|||
else if (EQ (symbol, Qexit))
|
||||
{
|
||||
if (NETCONN1_P (p))
|
||||
return build_string (XFASTINT (code) == 0
|
||||
return build_string (XFIXNAT (code) == 0
|
||||
? "deleted\n"
|
||||
: "connection broken by remote peer\n");
|
||||
if (XFASTINT (code) == 0)
|
||||
if (XFIXNAT (code) == 0)
|
||||
return build_string ("finished\n");
|
||||
AUTO_STRING (prefix, "exited abnormally with code ");
|
||||
string = Fnumber_to_string (code);
|
||||
|
|
@ -1383,7 +1383,7 @@ nil otherwise. */)
|
|||
if (NETCONN_P (process)
|
||||
|| XPROCESS (process)->infd < 0
|
||||
|| (set_window_size (XPROCESS (process)->infd,
|
||||
XINT (height), XINT (width))
|
||||
XFIXNUM (height), XFIXNUM (width))
|
||||
< 0))
|
||||
return Qnil;
|
||||
else
|
||||
|
|
@ -1589,7 +1589,7 @@ Return nil if format of ADDRESS is invalid. */)
|
|||
|
||||
if (nargs <= 5 /* IPv4 */
|
||||
&& i < 4 /* host, not port */
|
||||
&& XINT (p->contents[i]) > 255)
|
||||
&& XFIXNUM (p->contents[i]) > 255)
|
||||
return Qnil;
|
||||
|
||||
args[i + 1] = p->contents[i];
|
||||
|
|
@ -1789,7 +1789,7 @@ usage: (make-process &rest ARGS) */)
|
|||
val = Vcoding_system_for_read;
|
||||
if (NILP (val))
|
||||
{
|
||||
ptrdiff_t nargs2 = 3 + XINT (Flength (command));
|
||||
ptrdiff_t nargs2 = 3 + XFIXNUM (Flength (command));
|
||||
Lisp_Object tem2;
|
||||
SAFE_ALLOCA_LISP (args2, nargs2);
|
||||
ptrdiff_t i = 0;
|
||||
|
|
@ -1819,7 +1819,7 @@ usage: (make-process &rest ARGS) */)
|
|||
{
|
||||
if (EQ (coding_systems, Qt))
|
||||
{
|
||||
ptrdiff_t nargs2 = 3 + XINT (Flength (command));
|
||||
ptrdiff_t nargs2 = 3 + XFIXNUM (Flength (command));
|
||||
Lisp_Object tem2;
|
||||
SAFE_ALLOCA_LISP (args2, nargs2);
|
||||
ptrdiff_t i = 0;
|
||||
|
|
@ -2567,7 +2567,7 @@ static Lisp_Object
|
|||
conv_addrinfo_to_lisp (struct addrinfo *res)
|
||||
{
|
||||
Lisp_Object protocol = make_fixnum (res->ai_protocol);
|
||||
eassert (XINT (protocol) == res->ai_protocol);
|
||||
eassert (XFIXNUM (protocol) == res->ai_protocol);
|
||||
return Fcons (protocol, conv_sockaddr_to_lisp (res->ai_addr, res->ai_addrlen));
|
||||
}
|
||||
|
||||
|
|
@ -2609,7 +2609,7 @@ get_lisp_to_sockaddr_size (Lisp_Object address, int *familyp)
|
|||
p = XVECTOR (XCDR (address));
|
||||
if (MAX_ALLOCA - sizeof sa->sa_family < p->header.size)
|
||||
return 0;
|
||||
*familyp = XINT (XCAR (address));
|
||||
*familyp = XFIXNUM (XCAR (address));
|
||||
return p->header.size + sizeof (sa->sa_family);
|
||||
}
|
||||
return 0;
|
||||
|
|
@ -2639,7 +2639,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
|
|||
{
|
||||
DECLARE_POINTER_ALIAS (sin, struct sockaddr_in, sa);
|
||||
len = sizeof (sin->sin_addr) + 1;
|
||||
hostport = XINT (p->contents[--len]);
|
||||
hostport = XFIXNUM (p->contents[--len]);
|
||||
sin->sin_port = htons (hostport);
|
||||
cp = (unsigned char *)&sin->sin_addr;
|
||||
sa->sa_family = family;
|
||||
|
|
@ -2650,12 +2650,12 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
|
|||
DECLARE_POINTER_ALIAS (sin6, struct sockaddr_in6, sa);
|
||||
DECLARE_POINTER_ALIAS (ip6, uint16_t, &sin6->sin6_addr);
|
||||
len = sizeof (sin6->sin6_addr) / 2 + 1;
|
||||
hostport = XINT (p->contents[--len]);
|
||||
hostport = XFIXNUM (p->contents[--len]);
|
||||
sin6->sin6_port = htons (hostport);
|
||||
for (i = 0; i < len; i++)
|
||||
if (FIXNUMP (p->contents[i]))
|
||||
{
|
||||
int j = XFASTINT (p->contents[i]) & 0xffff;
|
||||
int j = XFIXNAT (p->contents[i]) & 0xffff;
|
||||
ip6[i] = ntohs (j);
|
||||
}
|
||||
sa->sa_family = family;
|
||||
|
|
@ -2687,7 +2687,7 @@ conv_lisp_to_sockaddr (int family, Lisp_Object address, struct sockaddr *sa, int
|
|||
|
||||
for (i = 0; i < len; i++)
|
||||
if (FIXNUMP (p->contents[i]))
|
||||
*cp++ = XFASTINT (p->contents[i]) & 0xff;
|
||||
*cp++ = XFIXNAT (p->contents[i]) & 0xff;
|
||||
}
|
||||
|
||||
#ifdef DATAGRAM_SOCKETS
|
||||
|
|
@ -2819,7 +2819,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
|
|||
{
|
||||
int optval;
|
||||
if (TYPE_RANGED_FIXNUMP (int, val))
|
||||
optval = XINT (val);
|
||||
optval = XFIXNUM (val);
|
||||
else
|
||||
error ("Bad option value for %s", name);
|
||||
ret = setsockopt (s, sopt->optlevel, sopt->optnum,
|
||||
|
|
@ -2858,7 +2858,7 @@ set_socket_option (int s, Lisp_Object opt, Lisp_Object val)
|
|||
linger.l_onoff = 1;
|
||||
linger.l_linger = 0;
|
||||
if (TYPE_RANGED_FIXNUMP (int, val))
|
||||
linger.l_linger = XINT (val);
|
||||
linger.l_linger = XFIXNUM (val);
|
||||
else
|
||||
linger.l_onoff = NILP (val) ? 0 : 1;
|
||||
ret = setsockopt (s, sopt->optlevel, sopt->optnum,
|
||||
|
|
@ -3357,7 +3357,7 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
|
|||
{
|
||||
Lisp_Object addrinfo = XCAR (addrinfos);
|
||||
addrinfos = XCDR (addrinfos);
|
||||
int protocol = XINT (XCAR (addrinfo));
|
||||
int protocol = XFIXNUM (XCAR (addrinfo));
|
||||
Lisp_Object ip_address = XCDR (addrinfo);
|
||||
|
||||
#ifdef WINDOWSNT
|
||||
|
|
@ -3941,7 +3941,7 @@ usage: (make-network-process &rest ARGS) */)
|
|||
else if (EQ (tem, Qipv4))
|
||||
family = AF_INET;
|
||||
else if (TYPE_RANGED_FIXNUMP (int, tem))
|
||||
family = XINT (tem);
|
||||
family = XFIXNUM (tem);
|
||||
else
|
||||
error ("Unknown address family");
|
||||
|
||||
|
|
@ -4010,7 +4010,7 @@ usage: (make-network-process &rest ARGS) */)
|
|||
else if (FIXNUMP (service))
|
||||
{
|
||||
portstring = portbuf;
|
||||
portstringlen = sprintf (portbuf, "%"pI"d", XINT (service));
|
||||
portstringlen = sprintf (portbuf, "%"pI"d", XFIXNUM (service));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -4096,7 +4096,7 @@ usage: (make-network-process &rest ARGS) */)
|
|||
if (EQ (service, Qt))
|
||||
port = 0;
|
||||
else if (FIXNUMP (service))
|
||||
port = XINT (service);
|
||||
port = XFIXNUM (service);
|
||||
else
|
||||
{
|
||||
CHECK_STRING (service);
|
||||
|
|
@ -4170,7 +4170,7 @@ usage: (make-network-process &rest ARGS) */)
|
|||
/* :server QLEN */
|
||||
p->is_server = !NILP (server);
|
||||
if (TYPE_RANGED_FIXNUMP (int, server))
|
||||
p->backlog = XINT (server);
|
||||
p->backlog = XFIXNUM (server);
|
||||
|
||||
/* :nowait BOOL */
|
||||
if (!p->is_server && socktype != SOCK_DGRAM && nowait)
|
||||
|
|
@ -4627,11 +4627,11 @@ is nil, from any process) before the timeout expired. */)
|
|||
{ /* Obsolete calling convention using integers rather than floats. */
|
||||
CHECK_FIXNUM (millisec);
|
||||
if (NILP (seconds))
|
||||
seconds = make_float (XINT (millisec) / 1000.0);
|
||||
seconds = make_float (XFIXNUM (millisec) / 1000.0);
|
||||
else
|
||||
{
|
||||
CHECK_FIXNUM (seconds);
|
||||
seconds = make_float (XINT (millisec) / 1000.0 + XINT (seconds));
|
||||
seconds = make_float (XFIXNUM (millisec) / 1000.0 + XFIXNUM (seconds));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -4642,9 +4642,9 @@ is nil, from any process) before the timeout expired. */)
|
|||
{
|
||||
if (FIXNUMP (seconds))
|
||||
{
|
||||
if (XINT (seconds) > 0)
|
||||
if (XFIXNUM (seconds) > 0)
|
||||
{
|
||||
secs = XINT (seconds);
|
||||
secs = XFIXNUM (seconds);
|
||||
nsecs = 0;
|
||||
}
|
||||
}
|
||||
|
|
@ -6196,8 +6196,8 @@ write_queue_pop (struct Lisp_Process *p, Lisp_Object *obj,
|
|||
*obj = XCAR (entry);
|
||||
offset_length = XCDR (entry);
|
||||
|
||||
*len = XINT (XCDR (offset_length));
|
||||
offset = XINT (XCAR (offset_length));
|
||||
*len = XFIXNUM (XCDR (offset_length));
|
||||
offset = XFIXNUM (XCAR (offset_length));
|
||||
*buf = SSDATA (*obj) + offset;
|
||||
|
||||
return 1;
|
||||
|
|
@ -6451,11 +6451,11 @@ set up yet, this function will block until socket setup has completed. */)
|
|||
|
||||
validate_region (&start, &end);
|
||||
|
||||
start_byte = CHAR_TO_BYTE (XINT (start));
|
||||
end_byte = CHAR_TO_BYTE (XINT (end));
|
||||
start_byte = CHAR_TO_BYTE (XFIXNUM (start));
|
||||
end_byte = CHAR_TO_BYTE (XFIXNUM (end));
|
||||
|
||||
if (XINT (start) < GPT && XINT (end) > GPT)
|
||||
move_gap_both (XINT (start), start_byte);
|
||||
if (XFIXNUM (start) < GPT && XFIXNUM (end) > GPT)
|
||||
move_gap_both (XFIXNUM (start), start_byte);
|
||||
|
||||
if (NETCONN_P (proc))
|
||||
wait_while_connecting (proc);
|
||||
|
|
@ -6864,7 +6864,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */)
|
|||
if (FIXNUMP (sigcode))
|
||||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (int, sigcode);
|
||||
signo = XINT (sigcode);
|
||||
signo = XFIXNUM (sigcode);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7052,7 +7052,7 @@ handle_child_signal (int sig)
|
|||
{
|
||||
pid_t deleted_pid;
|
||||
if (FIXNUMP (xpid))
|
||||
deleted_pid = XINT (xpid);
|
||||
deleted_pid = XFIXNUM (xpid);
|
||||
else
|
||||
deleted_pid = XFLOAT_DATA (xpid);
|
||||
if (child_status_changed (deleted_pid, 0, 0))
|
||||
|
|
|
|||
|
|
@ -80,12 +80,12 @@ static EMACS_INT approximate_median (log_t *log,
|
|||
{
|
||||
eassert (size > 0);
|
||||
if (size < 2)
|
||||
return XINT (HASH_VALUE (log, start));
|
||||
return XFIXNUM (HASH_VALUE (log, start));
|
||||
if (size < 3)
|
||||
/* Not an actual median, but better for our application than
|
||||
choosing either of the two numbers. */
|
||||
return ((XINT (HASH_VALUE (log, start))
|
||||
+ XINT (HASH_VALUE (log, start + 1)))
|
||||
return ((XFIXNUM (HASH_VALUE (log, start))
|
||||
+ XFIXNUM (HASH_VALUE (log, start + 1)))
|
||||
/ 2);
|
||||
else
|
||||
{
|
||||
|
|
@ -110,7 +110,7 @@ static void evict_lower_half (log_t *log)
|
|||
for (i = 0; i < size; i++)
|
||||
/* Evict not only values smaller but also values equal to the median,
|
||||
so as to make sure we evict something no matter what. */
|
||||
if (XINT (HASH_VALUE (log, i)) <= median)
|
||||
if (XFIXNUM (HASH_VALUE (log, i)) <= median)
|
||||
{
|
||||
Lisp_Object key = HASH_KEY (log, i);
|
||||
{ /* FIXME: we could make this more efficient. */
|
||||
|
|
@ -156,7 +156,7 @@ record_backtrace (log_t *log, EMACS_INT count)
|
|||
ptrdiff_t j = hash_lookup (log, backtrace, &hash);
|
||||
if (j >= 0)
|
||||
{
|
||||
EMACS_INT old_val = XINT (HASH_VALUE (log, j));
|
||||
EMACS_INT old_val = XFIXNUM (HASH_VALUE (log, j));
|
||||
EMACS_INT new_val = saturated_add (old_val, count);
|
||||
set_hash_value_slot (log, j, make_fixnum (new_val));
|
||||
}
|
||||
|
|
@ -273,7 +273,7 @@ setup_cpu_timer (Lisp_Object sampling_interval)
|
|||
: EMACS_INT_MAX)))
|
||||
return -1;
|
||||
|
||||
current_sampling_interval = XINT (sampling_interval);
|
||||
current_sampling_interval = XFIXNUM (sampling_interval);
|
||||
interval = make_timespec (current_sampling_interval / billion,
|
||||
current_sampling_interval % billion);
|
||||
emacs_sigaction_init (&action, deliver_profiler_signal);
|
||||
|
|
|
|||
32
src/search.c
32
src/search.c
|
|
@ -402,7 +402,7 @@ string_match_1 (Lisp_Object regexp, Lisp_Object string, Lisp_Object start,
|
|||
ptrdiff_t len = SCHARS (string);
|
||||
|
||||
CHECK_FIXNUM (start);
|
||||
pos = XINT (start);
|
||||
pos = XFIXNUM (start);
|
||||
if (pos < 0 && -pos <= len)
|
||||
pos = len + pos;
|
||||
else if (0 > pos || pos > len)
|
||||
|
|
@ -1037,7 +1037,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
|
|||
if (!NILP (count))
|
||||
{
|
||||
CHECK_FIXNUM (count);
|
||||
n *= XINT (count);
|
||||
n *= XFIXNUM (count);
|
||||
}
|
||||
|
||||
CHECK_STRING (string);
|
||||
|
|
@ -1051,7 +1051,7 @@ search_command (Lisp_Object string, Lisp_Object bound, Lisp_Object noerror,
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (bound);
|
||||
lim = XINT (bound);
|
||||
lim = XFIXNUM (bound);
|
||||
if (n > 0 ? lim < PT : lim > PT)
|
||||
error ("Invalid search bound (wrong side of point)");
|
||||
if (lim > ZV)
|
||||
|
|
@ -1153,7 +1153,7 @@ do \
|
|||
Lisp_Object temp; \
|
||||
temp = Faref (trt, make_fixnum (d)); \
|
||||
if (FIXNUMP (temp)) \
|
||||
out = XINT (temp); \
|
||||
out = XFIXNUM (temp); \
|
||||
else \
|
||||
out = d; \
|
||||
} \
|
||||
|
|
@ -2421,9 +2421,9 @@ since only regular expressions have distinguished subexpressions. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (subexp);
|
||||
if (! (0 <= XINT (subexp) && XINT (subexp) < search_regs.num_regs))
|
||||
if (! (0 <= XFIXNUM (subexp) && XFIXNUM (subexp) < search_regs.num_regs))
|
||||
args_out_of_range (subexp, make_fixnum (search_regs.num_regs));
|
||||
sub = XINT (subexp);
|
||||
sub = XFIXNUM (subexp);
|
||||
}
|
||||
|
||||
if (NILP (string))
|
||||
|
|
@ -2810,7 +2810,7 @@ match_limit (Lisp_Object num, bool beginningp)
|
|||
EMACS_INT n;
|
||||
|
||||
CHECK_FIXNUM (num);
|
||||
n = XINT (num);
|
||||
n = XFIXNUM (num);
|
||||
if (n < 0)
|
||||
args_out_of_range (num, make_fixnum (0));
|
||||
if (search_regs.num_regs <= 0)
|
||||
|
|
@ -2989,7 +2989,7 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
|
|||
|
||||
/* Allocate registers if they don't already exist. */
|
||||
{
|
||||
EMACS_INT length = XFASTINT (Flength (list)) / 2;
|
||||
EMACS_INT length = XFIXNAT (Flength (list)) / 2;
|
||||
|
||||
if (length > search_regs.num_regs)
|
||||
{
|
||||
|
|
@ -3055,15 +3055,15 @@ If optional arg RESEAT is non-nil, make markers on LIST point nowhere. */)
|
|||
XSETFASTINT (marker, 0);
|
||||
|
||||
CHECK_FIXNUM_COERCE_MARKER (marker);
|
||||
if ((XINT (from) < 0
|
||||
? TYPE_MINIMUM (regoff_t) <= XINT (from)
|
||||
: XINT (from) <= TYPE_MAXIMUM (regoff_t))
|
||||
&& (XINT (marker) < 0
|
||||
? TYPE_MINIMUM (regoff_t) <= XINT (marker)
|
||||
: XINT (marker) <= TYPE_MAXIMUM (regoff_t)))
|
||||
if ((XFIXNUM (from) < 0
|
||||
? TYPE_MINIMUM (regoff_t) <= XFIXNUM (from)
|
||||
: XFIXNUM (from) <= TYPE_MAXIMUM (regoff_t))
|
||||
&& (XFIXNUM (marker) < 0
|
||||
? TYPE_MINIMUM (regoff_t) <= XFIXNUM (marker)
|
||||
: XFIXNUM (marker) <= TYPE_MAXIMUM (regoff_t)))
|
||||
{
|
||||
search_regs.start[i] = XINT (from);
|
||||
search_regs.end[i] = XINT (marker);
|
||||
search_regs.start[i] = XFIXNUM (from);
|
||||
search_regs.end[i] = XFIXNUM (marker);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ parse_sound (Lisp_Object sound, Lisp_Object *attrs)
|
|||
{
|
||||
if (FIXNUMP (attrs[SOUND_VOLUME]))
|
||||
{
|
||||
EMACS_INT volume = XINT (attrs[SOUND_VOLUME]);
|
||||
EMACS_INT volume = XFIXNUM (attrs[SOUND_VOLUME]);
|
||||
if (! (0 <= volume && volume <= 100))
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -1401,7 +1401,7 @@ Internal use only, use `play-sound' instead. */)
|
|||
current_sound_device->file = attrs[SOUND_DEVICE];
|
||||
|
||||
if (FIXNUMP (attrs[SOUND_VOLUME]))
|
||||
current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]);
|
||||
current_sound_device->volume = XFIXNAT (attrs[SOUND_VOLUME]);
|
||||
else if (FLOATP (attrs[SOUND_VOLUME]))
|
||||
current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
|
||||
|
||||
|
|
@ -1425,7 +1425,7 @@ Internal use only, use `play-sound' instead. */)
|
|||
file = ENCODE_FILE (file);
|
||||
if (FIXNUMP (attrs[SOUND_VOLUME]))
|
||||
{
|
||||
ui_volume_tmp = XFASTINT (attrs[SOUND_VOLUME]);
|
||||
ui_volume_tmp = XFIXNAT (attrs[SOUND_VOLUME]);
|
||||
}
|
||||
else if (FLOATP (attrs[SOUND_VOLUME]))
|
||||
{
|
||||
|
|
|
|||
90
src/syntax.c
90
src/syntax.c
|
|
@ -615,7 +615,7 @@ find_defun_start (ptrdiff_t pos, ptrdiff_t pos_byte)
|
|||
Lisp_Object boc = Fnth (make_fixnum (8), ppss);
|
||||
if (FIXED_OR_FLOATP (boc))
|
||||
{
|
||||
find_start_value = XINT (boc);
|
||||
find_start_value = XFIXNUM (boc);
|
||||
find_start_value_byte = CHAR_TO_BYTE (find_start_value);
|
||||
}
|
||||
else
|
||||
|
|
@ -952,7 +952,7 @@ back_comment (ptrdiff_t from, ptrdiff_t from_byte, ptrdiff_t stop,
|
|||
{
|
||||
adjusted = true;
|
||||
find_start_value
|
||||
= CONSP (state.levelstarts) ? XINT (XCAR (state.levelstarts))
|
||||
= CONSP (state.levelstarts) ? XFIXNUM (XCAR (state.levelstarts))
|
||||
: state.thislevelstart >= 0 ? state.thislevelstart
|
||||
: find_start_value;
|
||||
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
|
|||
{
|
||||
int char_int;
|
||||
CHECK_CHARACTER (character);
|
||||
char_int = XINT (character);
|
||||
char_int = XFIXNUM (character);
|
||||
SETUP_BUFFER_SYNTAX_TABLE ();
|
||||
return make_fixnum (syntax_code_spec[SYNTAX (char_int)]);
|
||||
}
|
||||
|
|
@ -1130,7 +1130,7 @@ DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0,
|
|||
int char_int;
|
||||
enum syntaxcode code;
|
||||
CHECK_CHARACTER (character);
|
||||
char_int = XINT (character);
|
||||
char_int = XFIXNUM (character);
|
||||
SETUP_BUFFER_SYNTAX_TABLE ();
|
||||
code = SYNTAX (char_int);
|
||||
if (code == Sopen || code == Sclose)
|
||||
|
|
@ -1165,7 +1165,7 @@ the value of a `syntax-table' text property. */)
|
|||
int len;
|
||||
int character = STRING_CHAR_AND_LENGTH (p, len);
|
||||
XSETINT (match, character);
|
||||
if (XFASTINT (match) == ' ')
|
||||
if (XFIXNAT (match) == ' ')
|
||||
match = Qnil;
|
||||
p += len;
|
||||
}
|
||||
|
|
@ -1277,7 +1277,7 @@ usage: (modify-syntax-entry CHAR NEWENTRY &optional SYNTAX-TABLE) */)
|
|||
if (CONSP (c))
|
||||
SET_RAW_SYNTAX_ENTRY_RANGE (syntax_table, c, newentry);
|
||||
else
|
||||
SET_RAW_SYNTAX_ENTRY (syntax_table, XINT (c), newentry);
|
||||
SET_RAW_SYNTAX_ENTRY (syntax_table, XFIXNUM (c), newentry);
|
||||
|
||||
/* We clear the regexp cache, since character classes can now have
|
||||
different values from those in the compiled regexps.*/
|
||||
|
|
@ -1325,7 +1325,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
|
|||
return syntax;
|
||||
}
|
||||
|
||||
syntax_code = XINT (first) & INT_MAX;
|
||||
syntax_code = XFIXNUM (first) & INT_MAX;
|
||||
code = syntax_code & 0377;
|
||||
start1 = SYNTAX_FLAGS_COMSTART_FIRST (syntax_code);
|
||||
start2 = SYNTAX_FLAGS_COMSTART_SECOND (syntax_code);
|
||||
|
|
@ -1348,7 +1348,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
|
|||
if (NILP (match_lisp))
|
||||
insert (" ", 1);
|
||||
else
|
||||
insert_char (XINT (match_lisp));
|
||||
insert_char (XFIXNUM (match_lisp));
|
||||
|
||||
if (start1)
|
||||
insert ("1", 1);
|
||||
|
|
@ -1413,7 +1413,7 @@ DEFUN ("internal-describe-syntax-value", Finternal_describe_syntax_value,
|
|||
if (!NILP (match_lisp))
|
||||
{
|
||||
insert_string (", matches ");
|
||||
insert_char (XINT (match_lisp));
|
||||
insert_char (XFIXNUM (match_lisp));
|
||||
}
|
||||
|
||||
if (start1)
|
||||
|
|
@ -1481,9 +1481,9 @@ scan_words (ptrdiff_t from, EMACS_INT count)
|
|||
if (! NILP (Ffboundp (func)))
|
||||
{
|
||||
pos = call2 (func, make_fixnum (from - 1), make_fixnum (end));
|
||||
if (FIXNUMP (pos) && from < XINT (pos) && XINT (pos) <= ZV)
|
||||
if (FIXNUMP (pos) && from < XFIXNUM (pos) && XFIXNUM (pos) <= ZV)
|
||||
{
|
||||
from = XINT (pos);
|
||||
from = XFIXNUM (pos);
|
||||
from_byte = CHAR_TO_BYTE (from);
|
||||
}
|
||||
}
|
||||
|
|
@ -1530,9 +1530,9 @@ scan_words (ptrdiff_t from, EMACS_INT count)
|
|||
if (! NILP (Ffboundp (func)))
|
||||
{
|
||||
pos = call2 (func, make_fixnum (from), make_fixnum (beg));
|
||||
if (FIXNUMP (pos) && BEGV <= XINT (pos) && XINT (pos) < from)
|
||||
if (FIXNUMP (pos) && BEGV <= XFIXNUM (pos) && XFIXNUM (pos) < from)
|
||||
{
|
||||
from = XINT (pos);
|
||||
from = XFIXNUM (pos);
|
||||
from_byte = CHAR_TO_BYTE (from);
|
||||
}
|
||||
}
|
||||
|
|
@ -1588,14 +1588,14 @@ instead. See Info node `(elisp) Word Motion' for details. */)
|
|||
else
|
||||
CHECK_FIXNUM (arg);
|
||||
|
||||
val = orig_val = scan_words (PT, XINT (arg));
|
||||
val = orig_val = scan_words (PT, XFIXNUM (arg));
|
||||
if (! orig_val)
|
||||
val = XINT (arg) > 0 ? ZV : BEGV;
|
||||
val = XFIXNUM (arg) > 0 ? ZV : BEGV;
|
||||
|
||||
/* Avoid jumping out of an input field. */
|
||||
tmp = Fconstrain_to_field (make_fixnum (val), make_fixnum (PT),
|
||||
Qnil, Qnil, Qnil);
|
||||
val = XFASTINT (tmp);
|
||||
val = XFIXNAT (tmp);
|
||||
|
||||
SET_PT (val);
|
||||
return val == orig_val ? Qt : Qnil;
|
||||
|
|
@ -1679,13 +1679,13 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
|
|||
CHECK_FIXNUM_COERCE_MARKER (lim);
|
||||
|
||||
/* In any case, don't allow scan outside bounds of buffer. */
|
||||
if (XINT (lim) > ZV)
|
||||
if (XFIXNUM (lim) > ZV)
|
||||
XSETFASTINT (lim, ZV);
|
||||
if (XINT (lim) < BEGV)
|
||||
if (XFIXNUM (lim) < BEGV)
|
||||
XSETFASTINT (lim, BEGV);
|
||||
|
||||
multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters))
|
||||
&& (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE));
|
||||
&& (XFIXNUM (lim) - PT != CHAR_TO_BYTE (XFIXNUM (lim)) - PT_BYTE));
|
||||
string_multibyte = SBYTES (string) > SCHARS (string);
|
||||
|
||||
memset (fastmap, 0, sizeof fastmap);
|
||||
|
|
@ -1936,13 +1936,13 @@ skip_chars (bool forwardp, Lisp_Object string, Lisp_Object lim,
|
|||
|
||||
if (forwardp)
|
||||
{
|
||||
endp = (XINT (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
|
||||
stop = (pos < GPT && GPT < XINT (lim)) ? GPT_ADDR : endp;
|
||||
endp = (XFIXNUM (lim) == GPT) ? GPT_ADDR : CHAR_POS_ADDR (XFIXNUM (lim));
|
||||
stop = (pos < GPT && GPT < XFIXNUM (lim)) ? GPT_ADDR : endp;
|
||||
}
|
||||
else
|
||||
{
|
||||
endp = CHAR_POS_ADDR (XINT (lim));
|
||||
stop = (pos >= GPT && GPT > XINT (lim)) ? GAP_END_ADDR : endp;
|
||||
endp = CHAR_POS_ADDR (XFIXNUM (lim));
|
||||
stop = (pos >= GPT && GPT > XFIXNUM (lim)) ? GAP_END_ADDR : endp;
|
||||
}
|
||||
|
||||
/* 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)
|
|||
CHECK_FIXNUM_COERCE_MARKER (lim);
|
||||
|
||||
/* In any case, don't allow scan outside bounds of buffer. */
|
||||
if (XINT (lim) > ZV)
|
||||
if (XFIXNUM (lim) > ZV)
|
||||
XSETFASTINT (lim, ZV);
|
||||
if (XINT (lim) < BEGV)
|
||||
if (XFIXNUM (lim) < BEGV)
|
||||
XSETFASTINT (lim, BEGV);
|
||||
|
||||
if (forwardp ? (PT >= XFASTINT (lim)) : (PT <= XFASTINT (lim)))
|
||||
if (forwardp ? (PT >= XFIXNAT (lim)) : (PT <= XFIXNAT (lim)))
|
||||
return make_fixnum (0);
|
||||
|
||||
multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters))
|
||||
&& (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE));
|
||||
&& (XFIXNUM (lim) - PT != CHAR_TO_BYTE (XFIXNUM (lim)) - PT_BYTE));
|
||||
|
||||
memset (fastmap, 0, sizeof fastmap);
|
||||
|
||||
|
|
@ -2172,8 +2172,8 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
|
|||
while (true)
|
||||
{
|
||||
p = BYTE_POS_ADDR (pos_byte);
|
||||
endp = XINT (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XINT (lim));
|
||||
stop = pos < GPT && GPT < XINT (lim) ? GPT_ADDR : endp;
|
||||
endp = XFIXNUM (lim) == GPT ? GPT_ADDR : CHAR_POS_ADDR (XFIXNUM (lim));
|
||||
stop = pos < GPT && GPT < XFIXNUM (lim) ? GPT_ADDR : endp;
|
||||
|
||||
do
|
||||
{
|
||||
|
|
@ -2205,8 +2205,8 @@ skip_syntaxes (bool forwardp, Lisp_Object string, Lisp_Object lim)
|
|||
else
|
||||
{
|
||||
p = BYTE_POS_ADDR (pos_byte);
|
||||
endp = CHAR_POS_ADDR (XINT (lim));
|
||||
stop = pos >= GPT && GPT > XINT (lim) ? GAP_END_ADDR : endp;
|
||||
endp = CHAR_POS_ADDR (XFIXNUM (lim));
|
||||
stop = pos >= GPT && GPT > XFIXNUM (lim) ? GAP_END_ADDR : endp;
|
||||
|
||||
if (multibyte)
|
||||
{
|
||||
|
|
@ -2275,7 +2275,7 @@ in_classes (int c, Lisp_Object iso_classes)
|
|||
elt = XCAR (iso_classes);
|
||||
iso_classes = XCDR (iso_classes);
|
||||
|
||||
if (re_iswctype (c, XFASTINT (elt)))
|
||||
if (re_iswctype (c, XFIXNAT (elt)))
|
||||
fits_class = 1;
|
||||
}
|
||||
|
||||
|
|
@ -2443,7 +2443,7 @@ between them, return t; otherwise return nil. */)
|
|||
unsigned short int quit_count = 0;
|
||||
|
||||
CHECK_FIXNUM (count);
|
||||
count1 = XINT (count);
|
||||
count1 = XFIXNUM (count);
|
||||
stop = count1 > 0 ? ZV : BEGV;
|
||||
|
||||
from = PT;
|
||||
|
|
@ -3057,7 +3057,7 @@ that point is zero, and signal an error if the depth is nonzero. */)
|
|||
CHECK_FIXNUM (count);
|
||||
CHECK_FIXNUM (depth);
|
||||
|
||||
return scan_lists (XINT (from), XINT (count), XINT (depth), 0);
|
||||
return scan_lists (XFIXNUM (from), XFIXNUM (count), XFIXNUM (depth), 0);
|
||||
}
|
||||
|
||||
DEFUN ("scan-sexps", Fscan_sexps, Sscan_sexps, 2, 2, 0,
|
||||
|
|
@ -3076,7 +3076,7 @@ but before count is used up, nil is returned. */)
|
|||
CHECK_FIXNUM (from);
|
||||
CHECK_FIXNUM (count);
|
||||
|
||||
return scan_lists (XINT (from), XINT (count), 0, 1);
|
||||
return scan_lists (XFIXNUM (from), XFIXNUM (count), 0, 1);
|
||||
}
|
||||
|
||||
DEFUN ("backward-prefix-chars", Fbackward_prefix_chars, Sbackward_prefix_chars,
|
||||
|
|
@ -3217,7 +3217,7 @@ do { prev_from = from; \
|
|||
{
|
||||
Lisp_Object temhd = Fcar (tem);
|
||||
if (RANGED_FIXNUMP (PTRDIFF_MIN, temhd, PTRDIFF_MAX))
|
||||
curlevel->last = XINT (temhd);
|
||||
curlevel->last = XFIXNUM (temhd);
|
||||
if (++curlevel == endlevel)
|
||||
curlevel--; /* error ("Nesting too deep for parser"); */
|
||||
curlevel->prev = -1;
|
||||
|
|
@ -3490,7 +3490,7 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
|
|||
{
|
||||
tem = Fcar (external);
|
||||
if (!NILP (tem))
|
||||
state->depth = XINT (tem);
|
||||
state->depth = XFIXNUM (tem);
|
||||
else
|
||||
state->depth = 0;
|
||||
|
||||
|
|
@ -3500,13 +3500,13 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
|
|||
tem = Fcar (external);
|
||||
/* Check whether we are inside string_fence-style string: */
|
||||
state->instring = (!NILP (tem)
|
||||
? (CHARACTERP (tem) ? XFASTINT (tem) : ST_STRING_STYLE)
|
||||
? (CHARACTERP (tem) ? XFIXNAT (tem) : ST_STRING_STYLE)
|
||||
: -1);
|
||||
|
||||
external = Fcdr (external);
|
||||
tem = Fcar (external);
|
||||
state->incomment = (!NILP (tem)
|
||||
? (FIXNUMP (tem) ? XINT (tem) : -1)
|
||||
? (FIXNUMP (tem) ? XFIXNUM (tem) : -1)
|
||||
: 0);
|
||||
|
||||
external = Fcdr (external);
|
||||
|
|
@ -3521,20 +3521,20 @@ internalize_parse_state (Lisp_Object external, struct lisp_parse_state *state)
|
|||
state->comstyle = (NILP (tem)
|
||||
? 0
|
||||
: (RANGED_FIXNUMP (0, tem, ST_COMMENT_STYLE)
|
||||
? XINT (tem)
|
||||
? XFIXNUM (tem)
|
||||
: ST_COMMENT_STYLE));
|
||||
|
||||
external = Fcdr (external);
|
||||
tem = Fcar (external);
|
||||
state->comstr_start =
|
||||
RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1;
|
||||
RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XFIXNUM (tem) : -1;
|
||||
external = Fcdr (external);
|
||||
tem = Fcar (external);
|
||||
state->levelstarts = tem;
|
||||
|
||||
external = Fcdr (external);
|
||||
tem = Fcar (external);
|
||||
state->prev_syntax = NILP (tem) ? Smax : XINT (tem);
|
||||
state->prev_syntax = NILP (tem) ? Smax : XFIXNUM (tem);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3584,15 +3584,15 @@ Sixth arg COMMENTSTOP non-nil means stop after the start of a comment.
|
|||
if (!NILP (targetdepth))
|
||||
{
|
||||
CHECK_FIXNUM (targetdepth);
|
||||
target = XINT (targetdepth);
|
||||
target = XFIXNUM (targetdepth);
|
||||
}
|
||||
else
|
||||
target = TYPE_MINIMUM (EMACS_INT); /* We won't reach this depth. */
|
||||
|
||||
validate_region (&from, &to);
|
||||
internalize_parse_state (oldstate, &state);
|
||||
scan_sexps_forward (&state, XINT (from), CHAR_TO_BYTE (XINT (from)),
|
||||
XINT (to),
|
||||
scan_sexps_forward (&state, XFIXNUM (from), CHAR_TO_BYTE (XFIXNUM (from)),
|
||||
XFIXNUM (to),
|
||||
target, !NILP (stopbefore),
|
||||
(NILP (commentstop)
|
||||
? 0 : (EQ (commentstop, Qsyntax_table) ? -1 : 1)));
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ INLINE int
|
|||
syntax_property_with_flags (int c, bool via_property)
|
||||
{
|
||||
Lisp_Object ent = syntax_property_entry (c, via_property);
|
||||
return CONSP (ent) ? XINT (XCAR (ent)) : Swhitespace;
|
||||
return CONSP (ent) ? XFIXNUM (XCAR (ent)) : Swhitespace;
|
||||
}
|
||||
INLINE int
|
||||
SYNTAX_WITH_FLAGS (int c)
|
||||
|
|
|
|||
18
src/sysdep.c
18
src/sysdep.c
|
|
@ -2851,7 +2851,7 @@ serial_configure (struct Lisp_Process *p,
|
|||
else
|
||||
tem = Fplist_get (p->childp, QCspeed);
|
||||
CHECK_FIXNUM (tem);
|
||||
err = cfsetspeed (&attr, XINT (tem));
|
||||
err = cfsetspeed (&attr, XFIXNUM (tem));
|
||||
if (err != 0)
|
||||
report_file_error ("Failed cfsetspeed", tem);
|
||||
childp2 = Fplist_put (childp2, QCspeed, tem);
|
||||
|
|
@ -2864,15 +2864,15 @@ serial_configure (struct Lisp_Process *p,
|
|||
if (NILP (tem))
|
||||
tem = make_fixnum (8);
|
||||
CHECK_FIXNUM (tem);
|
||||
if (XINT (tem) != 7 && XINT (tem) != 8)
|
||||
if (XFIXNUM (tem) != 7 && XFIXNUM (tem) != 8)
|
||||
error (":bytesize must be nil (8), 7, or 8");
|
||||
summary[0] = XINT (tem) + '0';
|
||||
summary[0] = XFIXNUM (tem) + '0';
|
||||
#if defined (CSIZE) && defined (CS7) && defined (CS8)
|
||||
attr.c_cflag &= ~CSIZE;
|
||||
attr.c_cflag |= ((XINT (tem) == 7) ? CS7 : CS8);
|
||||
attr.c_cflag |= ((XFIXNUM (tem) == 7) ? CS7 : CS8);
|
||||
#else
|
||||
/* Don't error on bytesize 8, which should be set by cfmakeraw. */
|
||||
if (XINT (tem) != 8)
|
||||
if (XFIXNUM (tem) != 8)
|
||||
error ("Bytesize cannot be changed");
|
||||
#endif
|
||||
childp2 = Fplist_put (childp2, QCbytesize, tem);
|
||||
|
|
@ -2918,16 +2918,16 @@ serial_configure (struct Lisp_Process *p,
|
|||
if (NILP (tem))
|
||||
tem = make_fixnum (1);
|
||||
CHECK_FIXNUM (tem);
|
||||
if (XINT (tem) != 1 && XINT (tem) != 2)
|
||||
if (XFIXNUM (tem) != 1 && XFIXNUM (tem) != 2)
|
||||
error (":stopbits must be nil (1 stopbit), 1, or 2");
|
||||
summary[2] = XINT (tem) + '0';
|
||||
summary[2] = XFIXNUM (tem) + '0';
|
||||
#if defined (CSTOPB)
|
||||
attr.c_cflag &= ~CSTOPB;
|
||||
if (XINT (tem) == 2)
|
||||
if (XFIXNUM (tem) == 2)
|
||||
attr.c_cflag |= CSTOPB;
|
||||
#else
|
||||
/* Don't error on 1 stopbit, which should be set by cfmakeraw. */
|
||||
if (XINT (tem) != 1)
|
||||
if (XFIXNUM (tem) != 1)
|
||||
error ("Stopbits cannot be configured");
|
||||
#endif
|
||||
childp2 = Fplist_put (childp2, QCstopbits, tem);
|
||||
|
|
|
|||
12
src/term.c
12
src/term.c
|
|
@ -2147,7 +2147,7 @@ set_tty_color_mode (struct tty_display_info *tty, struct frame *f)
|
|||
else
|
||||
color_mode = Qnil;
|
||||
|
||||
mode = TYPE_RANGED_FIXNUMP (int, color_mode) ? XINT (color_mode) : 0;
|
||||
mode = TYPE_RANGED_FIXNUMP (int, color_mode) ? XFIXNUM (color_mode) : 0;
|
||||
|
||||
if (mode != tty->previous_color_mode)
|
||||
{
|
||||
|
|
@ -2805,8 +2805,8 @@ mouse_get_xy (int *x, int *y)
|
|||
&time_dummy);
|
||||
if (!NILP (lmx))
|
||||
{
|
||||
*x = XINT (lmx);
|
||||
*y = XINT (lmy);
|
||||
*x = XFIXNUM (lmx);
|
||||
*y = XFIXNUM (lmy);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -3477,7 +3477,7 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
|
|||
pos = AREF (items, i + 3);
|
||||
if (NILP (str))
|
||||
return;
|
||||
ix = XINT (pos);
|
||||
ix = XFIXNUM (pos);
|
||||
if (ix <= *x
|
||||
/* We use <= so the blank between 2 items on a TTY is
|
||||
considered part of the previous item. */
|
||||
|
|
@ -3488,14 +3488,14 @@ tty_menu_new_item_coords (struct frame *f, int which, int *x, int *y)
|
|||
if (which == TTYM_NEXT)
|
||||
{
|
||||
if (i < last_i)
|
||||
*x = XINT (AREF (items, i + 4 + 3));
|
||||
*x = XFIXNUM (AREF (items, i + 4 + 3));
|
||||
else
|
||||
*x = 0; /* Wrap around to the first item. */
|
||||
}
|
||||
else if (prev_x < 0)
|
||||
{
|
||||
/* Wrap around to the last item. */
|
||||
*x = XINT (AREF (items, last_i + 3));
|
||||
*x = XFIXNUM (AREF (items, last_i + 3));
|
||||
}
|
||||
else
|
||||
*x = prev_x;
|
||||
|
|
|
|||
|
|
@ -346,7 +346,7 @@ enum {
|
|||
FIXNUM_BITS, so using it to represent a modifier key means that
|
||||
characters thus modified have different integer equivalents
|
||||
depending on the architecture they're running on. Oh, and
|
||||
applying XINT to a character whose 2^28 bit is set might sign-extend
|
||||
applying XFIXNUM to a character whose 2^28 bit is set might sign-extend
|
||||
it, so you get a bunch of bits in the mask you didn't want.
|
||||
|
||||
The CHAR_ macros are defined in lisp.h. */
|
||||
|
|
|
|||
182
src/textprop.c
182
src/textprop.c
|
|
@ -79,7 +79,7 @@ text_read_only (Lisp_Object propval)
|
|||
static void
|
||||
modify_text_properties (Lisp_Object buffer, Lisp_Object start, Lisp_Object end)
|
||||
{
|
||||
ptrdiff_t b = XINT (start), e = XINT (end);
|
||||
ptrdiff_t b = XFIXNUM (start), e = XFIXNUM (end);
|
||||
struct buffer *buf = XBUFFER (buffer), *old = current_buffer;
|
||||
|
||||
set_buffer_internal (buf);
|
||||
|
|
@ -145,7 +145,7 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
|
|||
if (EQ (*begin, *end) && begin != end)
|
||||
return NULL;
|
||||
|
||||
if (XINT (*begin) > XINT (*end))
|
||||
if (XFIXNUM (*begin) > XFIXNUM (*end))
|
||||
{
|
||||
Lisp_Object n;
|
||||
n = *begin;
|
||||
|
|
@ -157,8 +157,8 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
|
|||
{
|
||||
register struct buffer *b = XBUFFER (object);
|
||||
|
||||
if (!(BUF_BEGV (b) <= XINT (*begin) && XINT (*begin) <= XINT (*end)
|
||||
&& XINT (*end) <= BUF_ZV (b)))
|
||||
if (!(BUF_BEGV (b) <= XFIXNUM (*begin) && XFIXNUM (*begin) <= XFIXNUM (*end)
|
||||
&& XFIXNUM (*end) <= BUF_ZV (b)))
|
||||
args_out_of_range (*begin, *end);
|
||||
i = buffer_intervals (b);
|
||||
|
||||
|
|
@ -166,24 +166,24 @@ validate_interval_range (Lisp_Object object, Lisp_Object *begin,
|
|||
if (BUF_BEGV (b) == BUF_ZV (b))
|
||||
return NULL;
|
||||
|
||||
searchpos = XINT (*begin);
|
||||
searchpos = XFIXNUM (*begin);
|
||||
}
|
||||
else
|
||||
{
|
||||
ptrdiff_t len = SCHARS (object);
|
||||
|
||||
if (! (0 <= XINT (*begin) && XINT (*begin) <= XINT (*end)
|
||||
&& XINT (*end) <= len))
|
||||
if (! (0 <= XFIXNUM (*begin) && XFIXNUM (*begin) <= XFIXNUM (*end)
|
||||
&& XFIXNUM (*end) <= len))
|
||||
args_out_of_range (*begin, *end);
|
||||
XSETFASTINT (*begin, XFASTINT (*begin));
|
||||
XSETFASTINT (*begin, XFIXNAT (*begin));
|
||||
if (begin != end)
|
||||
XSETFASTINT (*end, XFASTINT (*end));
|
||||
XSETFASTINT (*end, XFIXNAT (*end));
|
||||
i = string_intervals (object);
|
||||
|
||||
if (len == 0)
|
||||
return NULL;
|
||||
|
||||
searchpos = XINT (*begin);
|
||||
searchpos = XFIXNUM (*begin);
|
||||
}
|
||||
|
||||
if (!i)
|
||||
|
|
@ -572,7 +572,7 @@ If POSITION is at the end of OBJECT, the value is nil. */)
|
|||
it means it's the end of OBJECT.
|
||||
There are no properties at the very end,
|
||||
since no character follows. */
|
||||
if (XINT (position) == LENGTH (i) + i->position)
|
||||
if (XFIXNUM (position) == LENGTH (i) + i->position)
|
||||
return Qnil;
|
||||
|
||||
return i->plist;
|
||||
|
|
@ -621,14 +621,14 @@ get_char_property_and_overlay (Lisp_Object position, register Lisp_Object prop,
|
|||
Lisp_Object *overlay_vec;
|
||||
struct buffer *obuf = current_buffer;
|
||||
|
||||
if (XINT (position) < BUF_BEGV (XBUFFER (object))
|
||||
|| XINT (position) > BUF_ZV (XBUFFER (object)))
|
||||
if (XFIXNUM (position) < BUF_BEGV (XBUFFER (object))
|
||||
|| XFIXNUM (position) > BUF_ZV (XBUFFER (object)))
|
||||
xsignal1 (Qargs_out_of_range, position);
|
||||
|
||||
set_buffer_temp (XBUFFER (object));
|
||||
|
||||
USE_SAFE_ALLOCA;
|
||||
GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, false);
|
||||
GET_OVERLAYS_AT (XFIXNUM (position), overlay_vec, noverlays, NULL, false);
|
||||
noverlays = sort_overlays (overlay_vec, noverlays, w);
|
||||
|
||||
set_buffer_temp (obuf);
|
||||
|
|
@ -715,7 +715,7 @@ before LIMIT. LIMIT is a no-op if it is greater than (point-max). */)
|
|||
if (! NILP (limit))
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (limit);
|
||||
if (XINT (limit) < XINT (temp))
|
||||
if (XFIXNUM (limit) < XFIXNUM (temp))
|
||||
temp = limit;
|
||||
}
|
||||
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). */)
|
|||
if (! NILP (limit))
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (limit);
|
||||
if (XINT (limit) > XINT (temp))
|
||||
if (XFIXNUM (limit) > XFIXNUM (temp))
|
||||
temp = limit;
|
||||
}
|
||||
return Fprevious_property_change (position, Qnil, temp);
|
||||
|
|
@ -805,17 +805,17 @@ last valid position in OBJECT. */)
|
|||
else
|
||||
CHECK_FIXNUM_COERCE_MARKER (limit);
|
||||
|
||||
if (XFASTINT (position) >= XFASTINT (limit))
|
||||
if (XFIXNAT (position) >= XFIXNAT (limit))
|
||||
{
|
||||
position = limit;
|
||||
if (XFASTINT (position) > ZV)
|
||||
if (XFIXNAT (position) > ZV)
|
||||
XSETFASTINT (position, ZV);
|
||||
}
|
||||
else
|
||||
while (true)
|
||||
{
|
||||
position = Fnext_char_property_change (position, limit);
|
||||
if (XFASTINT (position) >= XFASTINT (limit))
|
||||
if (XFIXNAT (position) >= XFIXNAT (limit))
|
||||
{
|
||||
position = limit;
|
||||
break;
|
||||
|
|
@ -887,23 +887,23 @@ first valid position in OBJECT. */)
|
|||
else
|
||||
CHECK_FIXNUM_COERCE_MARKER (limit);
|
||||
|
||||
if (XFASTINT (position) <= XFASTINT (limit))
|
||||
if (XFIXNAT (position) <= XFIXNAT (limit))
|
||||
{
|
||||
position = limit;
|
||||
if (XFASTINT (position) < BEGV)
|
||||
if (XFIXNAT (position) < BEGV)
|
||||
XSETFASTINT (position, BEGV);
|
||||
}
|
||||
else
|
||||
{
|
||||
Lisp_Object initial_value
|
||||
= Fget_char_property (make_fixnum (XFASTINT (position) - 1),
|
||||
= Fget_char_property (make_fixnum (XFIXNAT (position) - 1),
|
||||
prop, object);
|
||||
|
||||
while (true)
|
||||
{
|
||||
position = Fprevious_char_property_change (position, limit);
|
||||
|
||||
if (XFASTINT (position) <= XFASTINT (limit))
|
||||
if (XFIXNAT (position) <= XFIXNAT (limit))
|
||||
{
|
||||
position = limit;
|
||||
break;
|
||||
|
|
@ -911,7 +911,7 @@ first valid position in OBJECT. */)
|
|||
else
|
||||
{
|
||||
Lisp_Object value
|
||||
= Fget_char_property (make_fixnum (XFASTINT (position) - 1),
|
||||
= Fget_char_property (make_fixnum (XFIXNAT (position) - 1),
|
||||
prop, object);
|
||||
|
||||
if (!EQ (value, initial_value))
|
||||
|
|
@ -976,13 +976,13 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
|
|||
next = next_interval (i);
|
||||
|
||||
while (next && intervals_equal (i, next)
|
||||
&& (NILP (limit) || next->position < XFASTINT (limit)))
|
||||
&& (NILP (limit) || next->position < XFIXNAT (limit)))
|
||||
next = next_interval (next);
|
||||
|
||||
if (!next
|
||||
|| (next->position
|
||||
>= (FIXNUMP (limit)
|
||||
? XFASTINT (limit)
|
||||
? XFIXNAT (limit)
|
||||
: (STRINGP (object)
|
||||
? SCHARS (object)
|
||||
: BUF_ZV (XBUFFER (object))))))
|
||||
|
|
@ -1025,13 +1025,13 @@ past position LIMIT; return LIMIT if nothing is found before LIMIT. */)
|
|||
next = next_interval (i);
|
||||
while (next
|
||||
&& EQ (here_val, textget (next->plist, prop))
|
||||
&& (NILP (limit) || next->position < XFASTINT (limit)))
|
||||
&& (NILP (limit) || next->position < XFIXNAT (limit)))
|
||||
next = next_interval (next);
|
||||
|
||||
if (!next
|
||||
|| (next->position
|
||||
>= (FIXNUMP (limit)
|
||||
? XFASTINT (limit)
|
||||
? XFIXNAT (limit)
|
||||
: (STRINGP (object)
|
||||
? SCHARS (object)
|
||||
: BUF_ZV (XBUFFER (object))))))
|
||||
|
|
@ -1069,19 +1069,19 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
|
|||
return limit;
|
||||
|
||||
/* Start with the interval containing the char before point. */
|
||||
if (i->position == XFASTINT (position))
|
||||
if (i->position == XFIXNAT (position))
|
||||
i = previous_interval (i);
|
||||
|
||||
previous = previous_interval (i);
|
||||
while (previous && intervals_equal (previous, i)
|
||||
&& (NILP (limit)
|
||||
|| (previous->position + LENGTH (previous) > XFASTINT (limit))))
|
||||
|| (previous->position + LENGTH (previous) > XFIXNAT (limit))))
|
||||
previous = previous_interval (previous);
|
||||
|
||||
if (!previous
|
||||
|| (previous->position + LENGTH (previous)
|
||||
<= (FIXNUMP (limit)
|
||||
? XFASTINT (limit)
|
||||
? XFIXNAT (limit)
|
||||
: (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
|
||||
return limit;
|
||||
else
|
||||
|
|
@ -1117,7 +1117,7 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
|
|||
i = validate_interval_range (object, &position, &position, soft);
|
||||
|
||||
/* Start with the interval containing the char before point. */
|
||||
if (i && i->position == XFASTINT (position))
|
||||
if (i && i->position == XFIXNAT (position))
|
||||
i = previous_interval (i);
|
||||
|
||||
if (!i)
|
||||
|
|
@ -1128,13 +1128,13 @@ back past position LIMIT; return LIMIT if nothing is found until LIMIT. */)
|
|||
while (previous
|
||||
&& EQ (here_val, textget (previous->plist, prop))
|
||||
&& (NILP (limit)
|
||||
|| (previous->position + LENGTH (previous) > XFASTINT (limit))))
|
||||
|| (previous->position + LENGTH (previous) > XFIXNAT (limit))))
|
||||
previous = previous_interval (previous);
|
||||
|
||||
if (!previous
|
||||
|| (previous->position + LENGTH (previous)
|
||||
<= (FIXNUMP (limit)
|
||||
? XFASTINT (limit)
|
||||
? XFIXNAT (limit)
|
||||
: (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
|
||||
return limit;
|
||||
else
|
||||
|
|
@ -1164,8 +1164,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
|
|||
if (!i)
|
||||
return Qnil;
|
||||
|
||||
s = XINT (start);
|
||||
len = XINT (end) - s;
|
||||
s = XFIXNUM (start);
|
||||
len = XFIXNUM (end) - s;
|
||||
|
||||
/* If this interval already has the properties, we can skip it. */
|
||||
if (interval_has_all_properties (properties, i))
|
||||
|
|
@ -1221,8 +1221,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
|
|||
if (interval_has_all_properties (properties, i))
|
||||
{
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
|
||||
eassert (modified);
|
||||
return Qt;
|
||||
|
|
@ -1232,8 +1232,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
|
|||
{
|
||||
add_properties (properties, i, object, set_type);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1243,8 +1243,8 @@ add_text_properties_1 (Lisp_Object start, Lisp_Object end,
|
|||
copy_properties (unchanged, i);
|
||||
add_properties (properties, i, object, set_type);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1362,8 +1362,8 @@ set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties,
|
|||
/* If we want no properties for a whole string,
|
||||
get rid of its intervals. */
|
||||
if (NILP (properties) && STRINGP (object)
|
||||
&& XFASTINT (start) == 0
|
||||
&& XFASTINT (end) == SCHARS (object))
|
||||
&& XFIXNAT (start) == 0
|
||||
&& XFIXNAT (end) == SCHARS (object))
|
||||
{
|
||||
if (!string_intervals (object))
|
||||
return Qnil;
|
||||
|
|
@ -1397,8 +1397,8 @@ set_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object properties,
|
|||
set_text_properties_1 (start, end, properties, object, i);
|
||||
|
||||
if (BUFFERP (object) && !NILP (coherent_change_p))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1415,15 +1415,15 @@ set_text_properties_1 (Lisp_Object start, Lisp_Object end, Lisp_Object propertie
|
|||
register ptrdiff_t s, len;
|
||||
INTERVAL unchanged;
|
||||
|
||||
if (XINT (start) < XINT (end))
|
||||
if (XFIXNUM (start) < XFIXNUM (end))
|
||||
{
|
||||
s = XINT (start);
|
||||
len = XINT (end) - s;
|
||||
s = XFIXNUM (start);
|
||||
len = XFIXNUM (end) - s;
|
||||
}
|
||||
else if (XINT (end) < XINT (start))
|
||||
else if (XFIXNUM (end) < XFIXNUM (start))
|
||||
{
|
||||
s = XINT (end);
|
||||
len = XINT (start) - s;
|
||||
s = XFIXNUM (end);
|
||||
len = XFIXNUM (start) - s;
|
||||
}
|
||||
else
|
||||
return;
|
||||
|
|
@ -1515,8 +1515,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
|
|||
if (!i)
|
||||
return Qnil;
|
||||
|
||||
s = XINT (start);
|
||||
len = XINT (end) - s;
|
||||
s = XFIXNUM (start);
|
||||
len = XFIXNUM (end) - s;
|
||||
|
||||
/* If there are no properties on this entire interval, return. */
|
||||
if (! interval_has_some_properties (properties, i))
|
||||
|
|
@ -1573,8 +1573,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
|
|||
{
|
||||
eassert (modified);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1582,8 +1582,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
|
|||
{
|
||||
remove_properties (properties, Qnil, i, object);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1593,8 +1593,8 @@ Use `set-text-properties' if you want to remove all text properties. */)
|
|||
copy_properties (unchanged, i);
|
||||
remove_properties (properties, Qnil, i, object);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
|
||||
|
|
@ -1627,8 +1627,8 @@ Return t if any property was actually removed, nil otherwise. */)
|
|||
if (!i)
|
||||
return Qnil;
|
||||
|
||||
s = XINT (start);
|
||||
len = XINT (end) - s;
|
||||
s = XFIXNUM (start);
|
||||
len = XFIXNUM (end) - s;
|
||||
|
||||
/* If there are no properties on the interval, return. */
|
||||
if (! interval_has_some_properties_list (properties, i))
|
||||
|
|
@ -1671,9 +1671,9 @@ Return t if any property was actually removed, nil otherwise. */)
|
|||
if (modified)
|
||||
{
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start),
|
||||
XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
else
|
||||
|
|
@ -1685,8 +1685,8 @@ Return t if any property was actually removed, nil otherwise. */)
|
|||
modify_text_properties (object, start, end);
|
||||
remove_properties (Qnil, properties, i, object);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
else
|
||||
|
|
@ -1698,8 +1698,8 @@ Return t if any property was actually removed, nil otherwise. */)
|
|||
modify_text_properties (object, start, end);
|
||||
remove_properties (Qnil, properties, i, object);
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start), XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start), XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
}
|
||||
|
|
@ -1717,9 +1717,9 @@ Return t if any property was actually removed, nil otherwise. */)
|
|||
if (modified)
|
||||
{
|
||||
if (BUFFERP (object))
|
||||
signal_after_change (XINT (start),
|
||||
XINT (end) - XINT (start),
|
||||
XINT (end) - XINT (start));
|
||||
signal_after_change (XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start),
|
||||
XFIXNUM (end) - XFIXNUM (start));
|
||||
return Qt;
|
||||
}
|
||||
else
|
||||
|
|
@ -1746,7 +1746,7 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
|
|||
i = validate_interval_range (object, &start, &end, soft);
|
||||
if (!i)
|
||||
return (!NILP (value) || EQ (start, end) ? Qnil : start);
|
||||
e = XINT (end);
|
||||
e = XFIXNUM (end);
|
||||
|
||||
while (i)
|
||||
{
|
||||
|
|
@ -1755,8 +1755,8 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
|
|||
if (EQ (textget (i->plist, property), value))
|
||||
{
|
||||
pos = i->position;
|
||||
if (pos < XINT (start))
|
||||
pos = XINT (start);
|
||||
if (pos < XFIXNUM (start))
|
||||
pos = XFIXNUM (start);
|
||||
return make_fixnum (pos);
|
||||
}
|
||||
i = next_interval (i);
|
||||
|
|
@ -1782,8 +1782,8 @@ markers). If OBJECT is a string, START and END are 0-based indices into it. */
|
|||
i = validate_interval_range (object, &start, &end, soft);
|
||||
if (!i)
|
||||
return (NILP (value) || EQ (start, end)) ? Qnil : start;
|
||||
s = XINT (start);
|
||||
e = XINT (end);
|
||||
s = XFIXNUM (start);
|
||||
e = XFIXNUM (end);
|
||||
|
||||
while (i)
|
||||
{
|
||||
|
|
@ -1811,7 +1811,7 @@ int
|
|||
text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
|
||||
{
|
||||
bool ignore_previous_character;
|
||||
Lisp_Object prev_pos = make_fixnum (XINT (pos) - 1);
|
||||
Lisp_Object prev_pos = make_fixnum (XFIXNUM (pos) - 1);
|
||||
Lisp_Object front_sticky;
|
||||
bool is_rear_sticky = true, is_front_sticky = false; /* defaults */
|
||||
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)
|
|||
if (NILP (buffer))
|
||||
XSETBUFFER (buffer, current_buffer);
|
||||
|
||||
ignore_previous_character = XINT (pos) <= BUF_BEGV (XBUFFER (buffer));
|
||||
ignore_previous_character = XFIXNUM (pos) <= BUF_BEGV (XBUFFER (buffer));
|
||||
|
||||
if (ignore_previous_character || (CONSP (defalt) && !NILP (XCDR (defalt))))
|
||||
is_rear_sticky = false;
|
||||
|
|
@ -1895,7 +1895,7 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
|
|||
{
|
||||
Lisp_Object dest_start, dest_end;
|
||||
|
||||
e = XINT (pos) + (XINT (end) - XINT (start));
|
||||
e = XFIXNUM (pos) + (XFIXNUM (end) - XFIXNUM (start));
|
||||
if (MOST_POSITIVE_FIXNUM < e)
|
||||
args_out_of_range (pos, end);
|
||||
dest_start = pos;
|
||||
|
|
@ -1905,9 +1905,9 @@ copy_text_properties (Lisp_Object start, Lisp_Object end, Lisp_Object src,
|
|||
validate_interval_range (dest, &dest_start, &dest_end, soft);
|
||||
}
|
||||
|
||||
s = XINT (start);
|
||||
e = XINT (end);
|
||||
p = XINT (pos);
|
||||
s = XFIXNUM (start);
|
||||
e = XFIXNUM (end);
|
||||
p = XFIXNUM (pos);
|
||||
|
||||
stuff = Qnil;
|
||||
|
||||
|
|
@ -1975,8 +1975,8 @@ text_property_list (Lisp_Object object, Lisp_Object start, Lisp_Object end, Lisp
|
|||
i = validate_interval_range (object, &start, &end, soft);
|
||||
if (i)
|
||||
{
|
||||
ptrdiff_t s = XINT (start);
|
||||
ptrdiff_t e = XINT (end);
|
||||
ptrdiff_t s = XFIXNUM (start);
|
||||
ptrdiff_t e = XFIXNUM (end);
|
||||
|
||||
while (s < e)
|
||||
{
|
||||
|
|
@ -2027,8 +2027,8 @@ add_text_properties_from_list (Lisp_Object object, Lisp_Object list, Lisp_Object
|
|||
Lisp_Object item, start, end, plist;
|
||||
|
||||
item = XCAR (list);
|
||||
start = make_fixnum (XINT (XCAR (item)) + XINT (delta));
|
||||
end = make_fixnum (XINT (XCAR (XCDR (item))) + XINT (delta));
|
||||
start = make_fixnum (XFIXNUM (XCAR (item)) + XFIXNUM (delta));
|
||||
end = make_fixnum (XFIXNUM (XCAR (XCDR (item))) + XFIXNUM (delta));
|
||||
plist = XCAR (XCDR (XCDR (item)));
|
||||
|
||||
Fadd_text_properties (start, end, plist, object);
|
||||
|
|
@ -2046,7 +2046,7 @@ Lisp_Object
|
|||
extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_end)
|
||||
{
|
||||
Lisp_Object prev = Qnil, head = list;
|
||||
ptrdiff_t max = XINT (new_end);
|
||||
ptrdiff_t max = XFIXNUM (new_end);
|
||||
|
||||
for (; CONSP (list); prev = list, list = XCDR (list))
|
||||
{
|
||||
|
|
@ -2055,9 +2055,9 @@ extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_e
|
|||
|
||||
item = XCAR (list);
|
||||
beg = XCAR (item);
|
||||
end = XINT (XCAR (XCDR (item)));
|
||||
end = XFIXNUM (XCAR (XCDR (item)));
|
||||
|
||||
if (XINT (beg) >= max)
|
||||
if (XFIXNUM (beg) >= max)
|
||||
{
|
||||
/* The start-point is past the end of the new string.
|
||||
Discard this property. */
|
||||
|
|
@ -2066,7 +2066,7 @@ extend_property_ranges (Lisp_Object list, Lisp_Object old_end, Lisp_Object new_e
|
|||
else
|
||||
XSETCDR (prev, XCDR (list));
|
||||
}
|
||||
else if ((end == XINT (old_end) && end != max)
|
||||
else if ((end == XFIXNUM (old_end) && end != max)
|
||||
|| end > max)
|
||||
{
|
||||
/* Either the end-point is past the end of the new string,
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ record_insert (ptrdiff_t beg, ptrdiff_t length)
|
|||
if (CONSP (elt)
|
||||
&& FIXNUMP (XCAR (elt))
|
||||
&& FIXNUMP (XCDR (elt))
|
||||
&& XINT (XCDR (elt)) == beg)
|
||||
&& XFIXNUM (XCDR (elt)) == beg)
|
||||
{
|
||||
XSETCDR (elt, make_fixnum (beg + length));
|
||||
return;
|
||||
|
|
@ -353,7 +353,7 @@ truncate_undo_list (struct buffer *b)
|
|||
/* If by the first boundary we have already passed undo_outer_limit,
|
||||
we're heading for memory full, so offer to clear out the list. */
|
||||
if (FIXNUMP (Vundo_outer_limit)
|
||||
&& size_so_far > XINT (Vundo_outer_limit)
|
||||
&& size_so_far > XFIXNUM (Vundo_outer_limit)
|
||||
&& !NILP (Vundo_outer_limit_function))
|
||||
{
|
||||
Lisp_Object tem;
|
||||
|
|
|
|||
18
src/w32.c
18
src/w32.c
|
|
@ -7043,7 +7043,7 @@ system_process_attributes (Lisp_Object pid)
|
|||
BOOL result = FALSE;
|
||||
|
||||
CHECK_FIXNUM_OR_FLOAT (pid);
|
||||
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
|
||||
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XFIXNUM (pid);
|
||||
|
||||
h_snapshot = create_toolhelp32_snapshot (TH32CS_SNAPPROCESS, 0);
|
||||
|
||||
|
|
@ -10107,7 +10107,7 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
|
|||
else
|
||||
tem = Fplist_get (p->childp, QCspeed);
|
||||
CHECK_FIXNUM (tem);
|
||||
dcb.BaudRate = XINT (tem);
|
||||
dcb.BaudRate = XFIXNUM (tem);
|
||||
childp2 = Fplist_put (childp2, QCspeed, tem);
|
||||
|
||||
/* Configure bytesize. */
|
||||
|
|
@ -10118,10 +10118,10 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
|
|||
if (NILP (tem))
|
||||
tem = make_fixnum (8);
|
||||
CHECK_FIXNUM (tem);
|
||||
if (XINT (tem) != 7 && XINT (tem) != 8)
|
||||
if (XFIXNUM (tem) != 7 && XFIXNUM (tem) != 8)
|
||||
error (":bytesize must be nil (8), 7, or 8");
|
||||
dcb.ByteSize = XINT (tem);
|
||||
summary[0] = XINT (tem) + '0';
|
||||
dcb.ByteSize = XFIXNUM (tem);
|
||||
summary[0] = XFIXNUM (tem) + '0';
|
||||
childp2 = Fplist_put (childp2, QCbytesize, tem);
|
||||
|
||||
/* Configure parity. */
|
||||
|
|
@ -10162,12 +10162,12 @@ serial_configure (struct Lisp_Process *p, Lisp_Object contact)
|
|||
if (NILP (tem))
|
||||
tem = make_fixnum (1);
|
||||
CHECK_FIXNUM (tem);
|
||||
if (XINT (tem) != 1 && XINT (tem) != 2)
|
||||
if (XFIXNUM (tem) != 1 && XFIXNUM (tem) != 2)
|
||||
error (":stopbits must be nil (1 stopbit), 1, or 2");
|
||||
summary[2] = XINT (tem) + '0';
|
||||
if (XINT (tem) == 1)
|
||||
summary[2] = XFIXNUM (tem) + '0';
|
||||
if (XFIXNUM (tem) == 1)
|
||||
dcb.StopBits = ONESTOPBIT;
|
||||
else if (XINT (tem) == 2)
|
||||
else if (XFIXNUM (tem) == 2)
|
||||
dcb.StopBits = TWOSTOPBITS;
|
||||
childp2 = Fplist_put (childp2, QCstopbits, tem);
|
||||
|
||||
|
|
|
|||
|
|
@ -791,7 +791,7 @@ DEFUN ("set-screen-color", Fset_screen_color, Sset_screen_color, 2, 2, 0,
|
|||
Arguments should be indices between 0 and 15, see w32console.el. */)
|
||||
(Lisp_Object foreground, Lisp_Object background)
|
||||
{
|
||||
char_attr_normal = XFASTINT (foreground) + (XFASTINT (background) << 4);
|
||||
char_attr_normal = XFIXNAT (foreground) + (XFIXNAT (background) << 4);
|
||||
|
||||
Frecenter (Qnil, Qt);
|
||||
return Qt;
|
||||
|
|
@ -814,7 +814,7 @@ DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0,
|
|||
(Lisp_Object size)
|
||||
{
|
||||
CONSOLE_CURSOR_INFO cci;
|
||||
cci.dwSize = XFASTINT (size);
|
||||
cci.dwSize = XFIXNAT (size);
|
||||
cci.bVisible = TRUE;
|
||||
(void) SetConsoleCursorInfo (cur_screen, &cci);
|
||||
|
||||
|
|
|
|||
118
src/w32fns.c
118
src/w32fns.c
|
|
@ -462,7 +462,7 @@ if the entry is new. */)
|
|||
CHECK_FIXNUM (blue);
|
||||
CHECK_STRING (name);
|
||||
|
||||
XSETINT (rgb, RGB (XUINT (red), XUINT (green), XUINT (blue)));
|
||||
XSETINT (rgb, RGB (XUFIXNUM (red), XUFIXNUM (green), XUFIXNUM (blue)));
|
||||
|
||||
block_input ();
|
||||
|
||||
|
|
@ -1182,7 +1182,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
|
|||
if (f)
|
||||
{
|
||||
/* Apply gamma correction. */
|
||||
w32_color_ref = XUINT (tem);
|
||||
w32_color_ref = XUFIXNUM (tem);
|
||||
gamma_correct (f, &w32_color_ref);
|
||||
XSETINT (tem, w32_color_ref);
|
||||
}
|
||||
|
|
@ -1198,7 +1198,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
|
|||
/* check if color is already mapped */
|
||||
while (entry)
|
||||
{
|
||||
if (W32_COLOR (entry->entry) == XUINT (tem))
|
||||
if (W32_COLOR (entry->entry) == XUFIXNUM (tem))
|
||||
break;
|
||||
prev = &entry->next;
|
||||
entry = entry->next;
|
||||
|
|
@ -1208,7 +1208,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
|
|||
{
|
||||
/* not already mapped, so add to list */
|
||||
entry = xmalloc (sizeof (struct w32_palette_entry));
|
||||
SET_W32_COLOR (entry->entry, XUINT (tem));
|
||||
SET_W32_COLOR (entry->entry, XUFIXNUM (tem));
|
||||
entry->next = NULL;
|
||||
*prev = entry;
|
||||
one_w32_display_info.num_colors++;
|
||||
|
|
@ -1220,7 +1220,7 @@ w32_defined_color (struct frame *f, const char *color, XColor *color_def,
|
|||
/* Ensure COLORREF value is snapped to nearest color in (default)
|
||||
palette by simulating the PALETTERGB macro. This works whether
|
||||
or not the display device has a palette. */
|
||||
w32_color_ref = XUINT (tem) | 0x2000000;
|
||||
w32_color_ref = XUFIXNUM (tem) | 0x2000000;
|
||||
|
||||
color_def->pixel = w32_color_ref;
|
||||
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)
|
|||
if (!EQ (Qnil, Vx_pointer_shape))
|
||||
{
|
||||
CHECK_FIXNUM (Vx_pointer_shape);
|
||||
cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape));
|
||||
cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XFIXNUM (Vx_pointer_shape));
|
||||
}
|
||||
else
|
||||
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)
|
|||
{
|
||||
CHECK_FIXNUM (Vx_nontext_pointer_shape);
|
||||
nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_nontext_pointer_shape));
|
||||
XFIXNUM (Vx_nontext_pointer_shape));
|
||||
}
|
||||
else
|
||||
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)
|
|||
{
|
||||
CHECK_FIXNUM (Vx_hourglass_pointer_shape);
|
||||
hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_hourglass_pointer_shape));
|
||||
XFIXNUM (Vx_hourglass_pointer_shape));
|
||||
}
|
||||
else
|
||||
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)
|
|||
{
|
||||
CHECK_FIXNUM (Vx_mode_pointer_shape);
|
||||
mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_mode_pointer_shape));
|
||||
XFIXNUM (Vx_mode_pointer_shape));
|
||||
}
|
||||
else
|
||||
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)
|
|||
CHECK_FIXNUM (Vx_sensitive_text_pointer_shape);
|
||||
hand_cursor
|
||||
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_sensitive_text_pointer_shape));
|
||||
XFIXNUM (Vx_sensitive_text_pointer_shape));
|
||||
}
|
||||
else
|
||||
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)
|
|||
CHECK_FIXNUM (Vx_window_horizontal_drag_shape);
|
||||
horizontal_drag_cursor
|
||||
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_window_horizontal_drag_shape));
|
||||
XFIXNUM (Vx_window_horizontal_drag_shape));
|
||||
}
|
||||
else
|
||||
horizontal_drag_cursor
|
||||
|
|
@ -1407,7 +1407,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
CHECK_FIXNUM (Vx_window_vertical_drag_shape);
|
||||
vertical_drag_cursor
|
||||
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
|
||||
XINT (Vx_window_vertical_drag_shape));
|
||||
XFIXNUM (Vx_window_vertical_drag_shape));
|
||||
}
|
||||
else
|
||||
vertical_drag_cursor
|
||||
|
|
@ -1689,7 +1689,7 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva
|
|||
int border;
|
||||
|
||||
CHECK_TYPE_RANGED_INTEGER (int, arg);
|
||||
border = max (XINT (arg), 0);
|
||||
border = max (XFIXNUM (arg), 0);
|
||||
|
||||
if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
|
||||
{
|
||||
|
|
@ -1725,7 +1725,7 @@ x_set_menu_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
|||
if (!FRAME_MINIBUF_ONLY_P (f) && !FRAME_PARENT_FRAME (f))
|
||||
{
|
||||
boolean old = FRAME_EXTERNAL_MENU_BAR (f);
|
||||
boolean new = (FIXNUMP (value) && XINT (value) > 0) ? true : false;
|
||||
boolean new = (FIXNUMP (value) && XFIXNUM (value) > 0) ? true : false;
|
||||
|
||||
FRAME_MENU_BAR_LINES (f) = 0;
|
||||
FRAME_MENU_BAR_HEIGHT (f) = 0;
|
||||
|
|
@ -1780,8 +1780,8 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
|||
return;
|
||||
|
||||
/* Use VALUE only if an integer >= 0. */
|
||||
if (FIXNUMP (value) && XINT (value) >= 0)
|
||||
nlines = XFASTINT (value);
|
||||
if (FIXNUMP (value) && XFIXNUM (value) >= 0)
|
||||
nlines = XFIXNAT (value);
|
||||
else
|
||||
nlines = 0;
|
||||
|
||||
|
|
@ -2027,7 +2027,7 @@ x_set_undecorated (struct frame *f, Lisp_Object new_value, Lisp_Object old_value
|
|||
if (!NILP (new_value) && !FRAME_UNDECORATED (f))
|
||||
{
|
||||
dwStyle = ((dwStyle & ~WS_THICKFRAME & ~WS_CAPTION)
|
||||
| ((FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
|
||||
| ((FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
|
||||
? WS_BORDER : false));
|
||||
SetWindowLong (hwnd, GWL_STYLE, dwStyle);
|
||||
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0,
|
||||
|
|
@ -2334,7 +2334,7 @@ w32_createwindow (struct frame *f, int *coords)
|
|||
if (FRAME_UNDECORATED (f))
|
||||
{
|
||||
/* If we want a thin border, specify it here. */
|
||||
if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
|
||||
if (FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
|
||||
f->output_data.w32->dwStyle |= WS_BORDER;
|
||||
}
|
||||
else
|
||||
|
|
@ -2350,7 +2350,7 @@ w32_createwindow (struct frame *f, int *coords)
|
|||
f->output_data.w32->dwStyle = WS_POPUP;
|
||||
|
||||
/* If we want a thin border, specify it here. */
|
||||
if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
|
||||
if (FIXED_OR_FLOATP (border_width) && (XFIXNUM (border_width) > 0))
|
||||
f->output_data.w32->dwStyle |= WS_BORDER;
|
||||
}
|
||||
else
|
||||
|
|
@ -3117,9 +3117,9 @@ map_keypad_keys (unsigned int virt_key, unsigned int extended)
|
|||
static Lisp_Object w32_grabbed_keys;
|
||||
|
||||
#define HOTKEY(vk, mods) make_fixnum (((vk) & 255) | ((mods) << 8))
|
||||
#define HOTKEY_ID(k) (XFASTINT (k) & 0xbfff)
|
||||
#define HOTKEY_VK_CODE(k) (XFASTINT (k) & 255)
|
||||
#define HOTKEY_MODIFIERS(k) (XFASTINT (k) >> 8)
|
||||
#define HOTKEY_ID(k) (XFIXNAT (k) & 0xbfff)
|
||||
#define HOTKEY_VK_CODE(k) (XFIXNAT (k) & 255)
|
||||
#define HOTKEY_MODIFIERS(k) (XFIXNAT (k) >> 8)
|
||||
|
||||
#define RAW_HOTKEY_ID(k) ((k) & 0xbfff)
|
||||
#define RAW_HOTKEY_VK_CODE(k) ((k) & 255)
|
||||
|
|
@ -4200,7 +4200,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
if (GetAsyncKeyState (wParam) & 1)
|
||||
{
|
||||
if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
|
||||
key = XUINT (Vw32_phantom_key_code) & 255;
|
||||
key = XUFIXNUM (Vw32_phantom_key_code) & 255;
|
||||
else
|
||||
key = VK_SPACE;
|
||||
dpyinfo->faked_key = key;
|
||||
|
|
@ -4216,7 +4216,7 @@ w32_wnd_proc (HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
|
|||
if (GetAsyncKeyState (wParam) & 1)
|
||||
{
|
||||
if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
|
||||
key = XUINT (Vw32_phantom_key_code) & 255;
|
||||
key = XUFIXNUM (Vw32_phantom_key_code) & 255;
|
||||
else
|
||||
key = VK_SPACE;
|
||||
dpyinfo->faked_key = key;
|
||||
|
|
@ -5413,11 +5413,11 @@ my_create_window (struct frame * f)
|
|||
if (EQ (left, Qunbound))
|
||||
coords[0] = CW_USEDEFAULT;
|
||||
else
|
||||
coords[0] = XINT (left);
|
||||
coords[0] = XFIXNUM (left);
|
||||
if (EQ (top, Qunbound))
|
||||
coords[1] = CW_USEDEFAULT;
|
||||
else
|
||||
coords[1] = XINT (top);
|
||||
coords[1] = XFIXNUM (top);
|
||||
|
||||
if (!PostThreadMessage (dwWindowsThreadId, WM_EMACS_CREATEWINDOW,
|
||||
(WPARAM)f, (LPARAM)coords))
|
||||
|
|
@ -5809,7 +5809,7 @@ DEFUN ("x-create-frame", Fx_create_frame, Sx_create_frame,
|
|||
{
|
||||
/* Cast to UINT_PTR shuts up compiler warnings about cast to
|
||||
pointer from integer of different size. */
|
||||
f->output_data.w32->parent_desc = (Window) (UINT_PTR) XFASTINT (parent);
|
||||
f->output_data.w32->parent_desc = (Window) (UINT_PTR) XFIXNAT (parent);
|
||||
f->output_data.w32->explicit_parent = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -7105,33 +7105,33 @@ compute_tip_xy (struct frame *f,
|
|||
}
|
||||
|
||||
if (FIXNUMP (top))
|
||||
*root_y = XINT (top);
|
||||
*root_y = XFIXNUM (top);
|
||||
else if (FIXNUMP (bottom))
|
||||
*root_y = XINT (bottom) - height;
|
||||
else if (*root_y + XINT (dy) <= min_y)
|
||||
*root_y = XFIXNUM (bottom) - height;
|
||||
else if (*root_y + XFIXNUM (dy) <= min_y)
|
||||
*root_y = min_y; /* Can happen for negative dy */
|
||||
else if (*root_y + XINT (dy) + height <= max_y)
|
||||
else if (*root_y + XFIXNUM (dy) + height <= max_y)
|
||||
/* It fits below the pointer */
|
||||
*root_y += XINT (dy);
|
||||
else if (height + XINT (dy) + min_y <= *root_y)
|
||||
*root_y += XFIXNUM (dy);
|
||||
else if (height + XFIXNUM (dy) + min_y <= *root_y)
|
||||
/* It fits above the pointer. */
|
||||
*root_y -= height + XINT (dy);
|
||||
*root_y -= height + XFIXNUM (dy);
|
||||
else
|
||||
/* Put it on the top. */
|
||||
*root_y = min_y;
|
||||
|
||||
if (FIXNUMP (left))
|
||||
*root_x = XINT (left);
|
||||
*root_x = XFIXNUM (left);
|
||||
else if (FIXNUMP (right))
|
||||
*root_x = XINT (right) - width;
|
||||
else if (*root_x + XINT (dx) <= min_x)
|
||||
*root_x = XFIXNUM (right) - width;
|
||||
else if (*root_x + XFIXNUM (dx) <= min_x)
|
||||
*root_x = 0; /* Can happen for negative dx */
|
||||
else if (*root_x + XINT (dx) + width <= max_x)
|
||||
else if (*root_x + XFIXNUM (dx) + width <= max_x)
|
||||
/* It fits to the right of the pointer. */
|
||||
*root_x += XINT (dx);
|
||||
else if (width + XINT (dx) + min_x <= *root_x)
|
||||
*root_x += XFIXNUM (dx);
|
||||
else if (width + XFIXNUM (dx) + min_x <= *root_x)
|
||||
/* It fits to the left of the pointer. */
|
||||
*root_x -= width + XINT (dx);
|
||||
*root_x -= width + XFIXNUM (dx);
|
||||
else
|
||||
/* Put it left justified on the screen -- it ought to fit that way. */
|
||||
*root_x = min_x;
|
||||
|
|
@ -7389,8 +7389,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
|
|||
&& RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
|
||||
&& RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
|
||||
{
|
||||
w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size));
|
||||
w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size));
|
||||
w->total_cols = XFIXNAT (XCAR (Vx_max_tooltip_size));
|
||||
w->total_lines = XFIXNAT (XCDR (Vx_max_tooltip_size));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -7422,8 +7422,8 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
|
|||
size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
|
||||
make_fixnum (w->pixel_height), Qnil);
|
||||
/* Add the frame's internal border to calculated size. */
|
||||
width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
width = XFIXNUM (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
height = XFIXNUM (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
/* Calculate position of tooltip frame. */
|
||||
compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y);
|
||||
|
||||
|
|
@ -7431,7 +7431,7 @@ DEFUN ("x-show-tip", Fx_show_tip, Sx_show_tip, 1, 6, 0,
|
|||
{
|
||||
RECT rect;
|
||||
int pad = (FIXED_OR_FLOATP (Vw32_tooltip_extra_pixels)
|
||||
? max (0, XINT (Vw32_tooltip_extra_pixels))
|
||||
? max (0, XFIXNUM (Vw32_tooltip_extra_pixels))
|
||||
: FRAME_COLUMN_WIDTH (tip_f));
|
||||
|
||||
rect.left = rect.top = 0;
|
||||
|
|
@ -8036,7 +8036,7 @@ If optional parameter FRAME is not specified, use selected frame. */)
|
|||
CHECK_FIXNUM (command);
|
||||
|
||||
if (FRAME_W32_P (f))
|
||||
PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0);
|
||||
PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XFIXNUM (command), 0);
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -8144,7 +8144,7 @@ a ShowWindow flag:
|
|||
result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w,
|
||||
GUI_SDATA (current_dir),
|
||||
(FIXNUMP (show_flag)
|
||||
? XINT (show_flag) : SW_SHOWDEFAULT));
|
||||
? XFIXNUM (show_flag) : SW_SHOWDEFAULT));
|
||||
|
||||
if (result > 32)
|
||||
return Qt;
|
||||
|
|
@ -8301,7 +8301,7 @@ a ShowWindow flag:
|
|||
shexinfo_w.lpParameters = params_w;
|
||||
shexinfo_w.lpDirectory = current_dir_w;
|
||||
shexinfo_w.nShow =
|
||||
(FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
|
||||
(FIXNUMP (show_flag) ? XFIXNUM (show_flag) : SW_SHOWDEFAULT);
|
||||
success = ShellExecuteExW (&shexinfo_w);
|
||||
xfree (doc_w);
|
||||
}
|
||||
|
|
@ -8336,7 +8336,7 @@ a ShowWindow flag:
|
|||
shexinfo_a.lpParameters = params_a;
|
||||
shexinfo_a.lpDirectory = current_dir_a;
|
||||
shexinfo_a.nShow =
|
||||
(FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
|
||||
(FIXNUMP (show_flag) ? XFIXNUM (show_flag) : SW_SHOWDEFAULT);
|
||||
success = ShellExecuteExA (&shexinfo_a);
|
||||
xfree (doc_w);
|
||||
xfree (doc_a);
|
||||
|
|
@ -8419,7 +8419,7 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
|
|||
if (SYMBOLP (c))
|
||||
{
|
||||
c = parse_modifiers (c);
|
||||
lisp_modifiers = XINT (Fcar (Fcdr (c)));
|
||||
lisp_modifiers = XFIXNUM (Fcar (Fcdr (c)));
|
||||
c = Fcar (c);
|
||||
if (!SYMBOLP (c))
|
||||
emacs_abort ();
|
||||
|
|
@ -8432,9 +8432,9 @@ w32_parse_and_hook_hot_key (Lisp_Object key, int hook)
|
|||
}
|
||||
else if (FIXNUMP (c))
|
||||
{
|
||||
lisp_modifiers = XINT (c) & ~CHARACTERBITS;
|
||||
lisp_modifiers = XFIXNUM (c) & ~CHARACTERBITS;
|
||||
/* Many ascii characters are their own virtual key code. */
|
||||
vk_code = XINT (c) & CHARACTERBITS;
|
||||
vk_code = XFIXNUM (c) & CHARACTERBITS;
|
||||
}
|
||||
|
||||
if (vk_code < 0 || vk_code > 255)
|
||||
|
|
@ -8534,7 +8534,7 @@ any key combinations, otherwise nil. */)
|
|||
/* Notify input thread about new hot-key definition, so that it
|
||||
takes effect without needing to switch focus. */
|
||||
PostThreadMessage (dwWindowsThreadId, WM_EMACS_REGISTER_HOT_KEY,
|
||||
(WPARAM) XINT (key), 0);
|
||||
(WPARAM) XFIXNUM (key), 0);
|
||||
}
|
||||
|
||||
return key;
|
||||
|
|
@ -8567,7 +8567,7 @@ DEFUN ("w32-unregister-hot-key", Fw32_unregister_hot_key,
|
|||
/* Notify input thread about hot-key definition being removed, so
|
||||
that it takes effect without needing focus switch. */
|
||||
if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_UNREGISTER_HOT_KEY,
|
||||
(WPARAM) XINT (XCAR (item)), lparam))
|
||||
(WPARAM) XFIXNUM (XCAR (item)), lparam))
|
||||
{
|
||||
MSG msg;
|
||||
GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
|
||||
|
|
@ -8647,7 +8647,7 @@ to change the state. */)
|
|||
if (NILP (new_state))
|
||||
lparam = -1;
|
||||
else
|
||||
lparam = (XUINT (new_state)) & 1;
|
||||
lparam = (XUFIXNUM (new_state)) & 1;
|
||||
if (PostThreadMessage (dwWindowsThreadId, WM_EMACS_TOGGLE_LOCK_KEY,
|
||||
(WPARAM) vk_code, lparam))
|
||||
{
|
||||
|
|
@ -9071,7 +9071,7 @@ The coordinates X and Y are interpreted in pixels relative to a position
|
|||
if (os_subtype == OS_NT
|
||||
&& w32_major_version + w32_minor_version >= 6)
|
||||
ret = SystemParametersInfo (SPI_GETMOUSETRAILS, 0, &trail_num, 0);
|
||||
SetCursorPos (XINT (x), XINT (y));
|
||||
SetCursorPos (XFIXNUM (x), XFIXNUM (y));
|
||||
if (ret)
|
||||
SystemParametersInfo (SPI_SETMOUSETRAILS, trail_num, NULL, 0);
|
||||
unblock_input ();
|
||||
|
|
@ -9432,7 +9432,7 @@ w32_console_toggle_lock_key (int vk_code, Lisp_Object new_state)
|
|||
|
||||
if (NILP (new_state)
|
||||
|| (FIXED_OR_FLOATP (new_state)
|
||||
&& ((XUINT (new_state)) & 1) != cur_state))
|
||||
&& ((XUFIXNUM (new_state)) & 1) != cur_state))
|
||||
{
|
||||
#ifdef WINDOWSNT
|
||||
faked_key = vk_code;
|
||||
|
|
@ -10071,7 +10071,7 @@ DEFUN ("w32-notification-close",
|
|||
struct frame *f = SELECTED_FRAME ();
|
||||
|
||||
if (FIXNUMP (id))
|
||||
delete_tray_notification (f, XINT (id));
|
||||
delete_tray_notification (f, XFIXNUM (id));
|
||||
|
||||
return Qnil;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -920,7 +920,7 @@ w32font_open_internal (struct frame *f, Lisp_Object font_entity,
|
|||
if (!EQ (val, Qraster))
|
||||
logfont.lfOutPrecision = OUT_TT_PRECIS;
|
||||
|
||||
size = XINT (AREF (font_entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX));
|
||||
if (!size)
|
||||
size = pixel_size;
|
||||
|
||||
|
|
@ -1231,7 +1231,7 @@ font_matches_spec (DWORD type, NEWTEXTMETRICEX *font,
|
|||
val = AREF (spec, FONT_SPACING_INDEX);
|
||||
if (FIXNUMP (val))
|
||||
{
|
||||
int spacing = XINT (val);
|
||||
int spacing = XFIXNUM (val);
|
||||
int proportional = (spacing < FONT_SPACING_MONO);
|
||||
|
||||
if ((proportional && !(font->ntmTm.tmPitchAndFamily & 0x01))
|
||||
|
|
@ -1822,8 +1822,8 @@ w32_to_x_charset (int fncharset, char *matching)
|
|||
/* Look for Same charset and a valid codepage (or non-int
|
||||
which means ignore). */
|
||||
if (EQ (w32_charset, charset_type)
|
||||
&& (!FIXNUMP (codepage) || XINT (codepage) == CP_DEFAULT
|
||||
|| IsValidCodePage (XINT (codepage))))
|
||||
&& (!FIXNUMP (codepage) || XFIXNUM (codepage) == CP_DEFAULT
|
||||
|| IsValidCodePage (XFIXNUM (codepage))))
|
||||
{
|
||||
/* If we don't have a match already, then this is the
|
||||
best. */
|
||||
|
|
@ -1957,7 +1957,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
|
|||
tmp = AREF (font_spec, FONT_DPI_INDEX);
|
||||
if (FIXNUMP (tmp))
|
||||
{
|
||||
dpi = XINT (tmp);
|
||||
dpi = XFIXNUM (tmp);
|
||||
}
|
||||
else if (FLOATP (tmp))
|
||||
{
|
||||
|
|
@ -1967,7 +1967,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
|
|||
/* Height */
|
||||
tmp = AREF (font_spec, FONT_SIZE_INDEX);
|
||||
if (FIXNUMP (tmp))
|
||||
logfont->lfHeight = -1 * XINT (tmp);
|
||||
logfont->lfHeight = -1 * XFIXNUM (tmp);
|
||||
else if (FLOATP (tmp))
|
||||
logfont->lfHeight = (int) (-1.0 * dpi * XFLOAT_DATA (tmp) / 72.27 + 0.5);
|
||||
|
||||
|
|
@ -2038,7 +2038,7 @@ fill_in_logfont (struct frame *f, LOGFONT *logfont, Lisp_Object font_spec)
|
|||
tmp = AREF (font_spec, FONT_SPACING_INDEX);
|
||||
if (FIXNUMP (tmp))
|
||||
{
|
||||
int spacing = XINT (tmp);
|
||||
int spacing = XFIXNUM (tmp);
|
||||
if (spacing < FONT_SPACING_MONO)
|
||||
logfont->lfPitchAndFamily
|
||||
= (logfont->lfPitchAndFamily & 0xF0) | VARIABLE_PITCH;
|
||||
|
|
|
|||
|
|
@ -182,7 +182,7 @@ key_event (KEY_EVENT_RECORD *event, struct input_event *emacs_ev, int *isdead)
|
|||
if ((mod_key_state & LEFT_WIN_PRESSED) == 0)
|
||||
{
|
||||
if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
|
||||
faked_key = XUINT (Vw32_phantom_key_code) & 255;
|
||||
faked_key = XUFIXNUM (Vw32_phantom_key_code) & 255;
|
||||
else
|
||||
faked_key = VK_SPACE;
|
||||
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)
|
|||
if ((mod_key_state & RIGHT_WIN_PRESSED) == 0)
|
||||
{
|
||||
if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
|
||||
faked_key = XUINT (Vw32_phantom_key_code) & 255;
|
||||
faked_key = XUFIXNUM (Vw32_phantom_key_code) & 255;
|
||||
else
|
||||
faked_key = VK_SPACE;
|
||||
keybd_event (faked_key, (BYTE) MapVirtualKey (faked_key, 0), 0, 0);
|
||||
|
|
|
|||
|
|
@ -1890,7 +1890,7 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp)
|
|||
/* Override escape char by binding w32-quote-process-args to
|
||||
desired character, or use t for auto-selection. */
|
||||
if (FIXNUMP (Vw32_quote_process_args))
|
||||
escape_char = XINT (Vw32_quote_process_args);
|
||||
escape_char = XFIXNUM (Vw32_quote_process_args);
|
||||
else
|
||||
escape_char = (is_cygnus_app || is_msys_app) ? '"' : '\\';
|
||||
}
|
||||
|
|
@ -3023,7 +3023,7 @@ If successful, the return value is t, otherwise nil. */)
|
|||
externally. This is necessary because real pids on Windows 95 are
|
||||
negative. */
|
||||
|
||||
pid = XINT (process);
|
||||
pid = XFIXNUM (process);
|
||||
cp = find_child_pid (pid);
|
||||
if (cp != NULL)
|
||||
pid = cp->procinfo.dwProcessId;
|
||||
|
|
@ -3188,12 +3188,12 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
|
|||
|
||||
CHECK_FIXNUM (lcid);
|
||||
|
||||
if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED))
|
||||
if (!IsValidLocale (XFIXNUM (lcid), LCID_SUPPORTED))
|
||||
return Qnil;
|
||||
|
||||
if (NILP (longform))
|
||||
{
|
||||
got_abbrev = GetLocaleInfo (XINT (lcid),
|
||||
got_abbrev = GetLocaleInfo (XFIXNUM (lcid),
|
||||
LOCALE_SABBREVLANGNAME | LOCALE_USE_CP_ACP,
|
||||
abbrev_name, sizeof (abbrev_name));
|
||||
if (got_abbrev)
|
||||
|
|
@ -3201,7 +3201,7 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
|
|||
}
|
||||
else if (EQ (longform, Qt))
|
||||
{
|
||||
got_full = GetLocaleInfo (XINT (lcid),
|
||||
got_full = GetLocaleInfo (XFIXNUM (lcid),
|
||||
LOCALE_SLANGUAGE | LOCALE_USE_CP_ACP,
|
||||
full_name, sizeof (full_name));
|
||||
if (got_full)
|
||||
|
|
@ -3209,8 +3209,8 @@ If LCID (a 16-bit number) is not a valid locale, the result is nil. */)
|
|||
}
|
||||
else if (FIXED_OR_FLOATP (longform))
|
||||
{
|
||||
got_full = GetLocaleInfo (XINT (lcid),
|
||||
XINT (longform),
|
||||
got_full = GetLocaleInfo (XFIXNUM (lcid),
|
||||
XFIXNUM (longform),
|
||||
full_name, sizeof (full_name));
|
||||
/* GetLocaleInfo's return value includes the terminating null
|
||||
character, when the returned information is a string, whereas
|
||||
|
|
@ -3301,16 +3301,16 @@ If successful, the new locale id is returned, otherwise nil. */)
|
|||
{
|
||||
CHECK_FIXNUM (lcid);
|
||||
|
||||
if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED))
|
||||
if (!IsValidLocale (XFIXNUM (lcid), LCID_SUPPORTED))
|
||||
return Qnil;
|
||||
|
||||
if (!SetThreadLocale (XINT (lcid)))
|
||||
if (!SetThreadLocale (XFIXNUM (lcid)))
|
||||
return Qnil;
|
||||
|
||||
/* Need to set input thread locale if present. */
|
||||
if (dwWindowsThreadId)
|
||||
/* Reply is not needed. */
|
||||
PostThreadMessage (dwWindowsThreadId, WM_EMACS_SETLOCALE, XINT (lcid), 0);
|
||||
PostThreadMessage (dwWindowsThreadId, WM_EMACS_SETLOCALE, XFIXNUM (lcid), 0);
|
||||
|
||||
return make_fixnum (GetThreadLocale ());
|
||||
}
|
||||
|
|
@ -3360,10 +3360,10 @@ If successful, the new CP is returned, otherwise nil. */)
|
|||
{
|
||||
CHECK_FIXNUM (cp);
|
||||
|
||||
if (!IsValidCodePage (XINT (cp)))
|
||||
if (!IsValidCodePage (XFIXNUM (cp)))
|
||||
return Qnil;
|
||||
|
||||
if (!SetConsoleCP (XINT (cp)))
|
||||
if (!SetConsoleCP (XFIXNUM (cp)))
|
||||
return Qnil;
|
||||
|
||||
return make_fixnum (GetConsoleCP ());
|
||||
|
|
@ -3388,10 +3388,10 @@ If successful, the new CP is returned, otherwise nil. */)
|
|||
{
|
||||
CHECK_FIXNUM (cp);
|
||||
|
||||
if (!IsValidCodePage (XINT (cp)))
|
||||
if (!IsValidCodePage (XFIXNUM (cp)))
|
||||
return Qnil;
|
||||
|
||||
if (!SetConsoleOutputCP (XINT (cp)))
|
||||
if (!SetConsoleOutputCP (XFIXNUM (cp)))
|
||||
return Qnil;
|
||||
|
||||
return make_fixnum (GetConsoleOutputCP ());
|
||||
|
|
@ -3414,13 +3414,13 @@ yield nil. */)
|
|||
|
||||
CHECK_FIXNUM (cp);
|
||||
|
||||
if (!IsValidCodePage (XINT (cp)))
|
||||
if (!IsValidCodePage (XFIXNUM (cp)))
|
||||
return Qnil;
|
||||
|
||||
/* Going through a temporary DWORD_PTR variable avoids compiler warning
|
||||
about cast to pointer from integer of different size, when
|
||||
building --with-wide-int or building for 64bit. */
|
||||
dwcp = XINT (cp);
|
||||
dwcp = XFIXNUM (cp);
|
||||
if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE))
|
||||
return make_fixnum (info.ciCharset);
|
||||
|
||||
|
|
@ -3480,8 +3480,8 @@ If successful, the new layout id is returned, otherwise nil. */)
|
|||
CHECK_FIXNUM_CAR (layout);
|
||||
CHECK_FIXNUM_CDR (layout);
|
||||
|
||||
kl = (HKL) (UINT_PTR) ((XINT (XCAR (layout)) & 0xffff)
|
||||
| (XINT (XCDR (layout)) << 16));
|
||||
kl = (HKL) (UINT_PTR) ((XFIXNUM (XCAR (layout)) & 0xffff)
|
||||
| (XFIXNUM (XCDR (layout)) << 16));
|
||||
|
||||
/* Synchronize layout with input thread. */
|
||||
if (dwWindowsThreadId)
|
||||
|
|
|
|||
|
|
@ -241,7 +241,7 @@ static Lisp_Object
|
|||
render (Lisp_Object oformat)
|
||||
{
|
||||
HGLOBAL htext = NULL;
|
||||
UINT format = XFASTINT (oformat);
|
||||
UINT format = XFIXNAT (oformat);
|
||||
|
||||
ONTRACE (fprintf (stderr, "render\n"));
|
||||
|
||||
|
|
|
|||
|
|
@ -479,7 +479,7 @@ x_set_frame_alpha (struct frame *f)
|
|||
if (FLOATP (Vframe_alpha_lower_limit))
|
||||
alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
|
||||
else if (FIXNUMP (Vframe_alpha_lower_limit))
|
||||
alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0;
|
||||
alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0;
|
||||
|
||||
if (alpha < 0.0)
|
||||
return;
|
||||
|
|
@ -1982,11 +1982,11 @@ x_draw_image_relief (struct glyph_string *s)
|
|||
&& FIXNUMP (XCAR (Vtool_bar_button_margin))
|
||||
&& FIXNUMP (XCDR (Vtool_bar_button_margin)))
|
||||
{
|
||||
extra_x = XINT (XCAR (Vtool_bar_button_margin));
|
||||
extra_y = XINT (XCDR (Vtool_bar_button_margin));
|
||||
extra_x = XFIXNUM (XCAR (Vtool_bar_button_margin));
|
||||
extra_y = XFIXNUM (XCDR (Vtool_bar_button_margin));
|
||||
}
|
||||
else if (FIXNUMP (Vtool_bar_button_margin))
|
||||
extra_x = extra_y = XINT (Vtool_bar_button_margin);
|
||||
extra_x = extra_y = XFIXNUM (Vtool_bar_button_margin);
|
||||
}
|
||||
|
||||
top_p = bot_p = left_p = right_p = 0;
|
||||
|
|
@ -2482,7 +2482,7 @@ x_draw_glyph_string (struct glyph_string *s)
|
|||
= buffer_local_value (Qunderline_minimum_offset,
|
||||
s->w->contents);
|
||||
if (FIXNUMP (val))
|
||||
minimum_offset = XFASTINT (val);
|
||||
minimum_offset = XFIXNAT (val);
|
||||
else
|
||||
minimum_offset = 1;
|
||||
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,
|
|||
static void
|
||||
w32_handle_tool_bar_click (struct frame *f, struct input_event *button_event)
|
||||
{
|
||||
int x = XFASTINT (button_event->x);
|
||||
int y = XFASTINT (button_event->y);
|
||||
int x = XFIXNAT (button_event->x);
|
||||
int y = XFIXNAT (button_event->y);
|
||||
|
||||
if (button_event->modifiers & down_modifier)
|
||||
handle_tool_bar_click (f, x, y, 1, 0);
|
||||
|
|
@ -4996,8 +4996,8 @@ w32_read_socket (struct terminal *terminal,
|
|||
&& WINDOW_TOTAL_LINES (XWINDOW (f->tool_bar_window)))
|
||||
{
|
||||
Lisp_Object window;
|
||||
int x = XFASTINT (inev.x);
|
||||
int y = XFASTINT (inev.y);
|
||||
int x = XFIXNAT (inev.x);
|
||||
int y = XFIXNAT (inev.y);
|
||||
|
||||
window = window_from_coordinates (f, x, y, 0, 1);
|
||||
|
||||
|
|
@ -6145,8 +6145,8 @@ x_calc_absolute_position (struct frame *f)
|
|||
monitor_left = Fnth (make_fixnum (1), geometry);
|
||||
monitor_top = Fnth (make_fixnum (2), geometry);
|
||||
|
||||
display_left = min (display_left, XINT (monitor_left));
|
||||
display_top = min (display_top, XINT (monitor_top));
|
||||
display_left = min (display_left, XFIXNUM (monitor_left));
|
||||
display_top = min (display_top, XFIXNUM (monitor_top));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -478,7 +478,7 @@ struct scroll_bar {
|
|||
|
||||
#ifdef _WIN64
|
||||
/* Building a 64-bit C integer from two 32-bit lisp integers. */
|
||||
#define SCROLL_BAR_PACK(low, high) (XINT (high) << 32 | XINT (low))
|
||||
#define SCROLL_BAR_PACK(low, high) (XFIXNUM (high) << 32 | XFIXNUM (low))
|
||||
|
||||
/* Setting two lisp integers to the low and high words of a 64-bit C int. */
|
||||
#define SCROLL_BAR_UNPACK(low, high, int64) \
|
||||
|
|
@ -486,7 +486,7 @@ struct scroll_bar {
|
|||
XSETINT ((high), ((DWORDLONG)(int64) >> 32) & 0xffffffff))
|
||||
#else /* not _WIN64 */
|
||||
/* Building a 32-bit C unsigned integer from two 16-bit lisp integers. */
|
||||
#define SCROLL_BAR_PACK(low, high) ((UINT_PTR)(XINT (high) << 16 | XINT (low)))
|
||||
#define SCROLL_BAR_PACK(low, high) ((UINT_PTR)(XFIXNUM (high) << 16 | XFIXNUM (low)))
|
||||
|
||||
/* Setting two lisp integers to the low and high words of a 32-bit C int. */
|
||||
#define SCROLL_BAR_UNPACK(low, high, int32) \
|
||||
|
|
|
|||
|
|
@ -879,7 +879,7 @@ uniscribe_check_otf (LOGFONT *font, Lisp_Object otf_spec)
|
|||
int i, retval = 0;
|
||||
|
||||
/* Check the spec is in the right format. */
|
||||
if (!CONSP (otf_spec) || XINT (Flength (otf_spec)) < 3)
|
||||
if (!CONSP (otf_spec) || XFIXNUM (Flength (otf_spec)) < 3)
|
||||
return 0;
|
||||
|
||||
/* Break otf_spec into its components. */
|
||||
|
|
|
|||
136
src/window.c
136
src/window.c
|
|
@ -1118,7 +1118,7 @@ window so that the location of point moves off-window. */)
|
|||
(Lisp_Object window, Lisp_Object ncol)
|
||||
{
|
||||
CHECK_FIXNUM (ncol);
|
||||
return set_window_hscroll (decode_live_window (window), XINT (ncol));
|
||||
return set_window_hscroll (decode_live_window (window), XFIXNUM (ncol));
|
||||
}
|
||||
|
||||
DEFUN ("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
|
|||
else if (!NILP (pos))
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (pos);
|
||||
posint = XINT (pos);
|
||||
posint = XFIXNUM (pos);
|
||||
}
|
||||
else if (w == XWINDOW (selected_window))
|
||||
posint = PT;
|
||||
|
|
@ -1870,7 +1870,7 @@ Return nil if window display is not up-to-date. In that case, use
|
|||
}
|
||||
|
||||
CHECK_FIXNUM (line);
|
||||
n = XINT (line);
|
||||
n = XFIXNUM (line);
|
||||
|
||||
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
|
||||
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. */)
|
|||
else if (FIXED_OR_FLOATP (first))
|
||||
{
|
||||
CHECK_RANGED_INTEGER (first, 0, w->current_matrix->nrows);
|
||||
row = MATRIX_ROW (w->current_matrix, XINT (first));
|
||||
row = MATRIX_ROW (w->current_matrix, XFIXNUM (first));
|
||||
}
|
||||
else
|
||||
error ("Invalid specification of first line");
|
||||
|
|
@ -1988,7 +1988,7 @@ though when run from an idle timer with a delay of zero seconds. */)
|
|||
else if (FIXED_OR_FLOATP (last))
|
||||
{
|
||||
CHECK_RANGED_INTEGER (last, 0, w->current_matrix->nrows);
|
||||
end_row = MATRIX_ROW (w->current_matrix, XINT (last));
|
||||
end_row = MATRIX_ROW (w->current_matrix, XFIXNUM (last));
|
||||
}
|
||||
else
|
||||
error ("Invalid specification of last line");
|
||||
|
|
@ -2492,7 +2492,7 @@ candidate_window_p (Lisp_Object window, Lisp_Object owindow,
|
|||
== FRAME_TERMINAL (XFRAME (selected_frame)));
|
||||
|
||||
}
|
||||
else if (FIXNUMP (all_frames) && XINT (all_frames) == 0)
|
||||
else if (FIXNUMP (all_frames) && XFIXNUM (all_frames) == 0)
|
||||
{
|
||||
candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f)
|
||||
#ifdef HAVE_X_WINDOWS
|
||||
|
|
@ -3495,7 +3495,7 @@ set_window_buffer (Lisp_Object window, Lisp_Object buffer,
|
|||
|
||||
/* Update time stamps of buffer display. */
|
||||
if (FIXNUMP (BVAR (b, display_count)))
|
||||
bset_display_count (b, make_fixnum (XINT (BVAR (b, display_count)) + 1));
|
||||
bset_display_count (b, make_fixnum (XFIXNUM (BVAR (b, display_count)) + 1));
|
||||
bset_display_time (b, Fcurrent_time ());
|
||||
|
||||
w->window_end_pos = 0;
|
||||
|
|
@ -3820,14 +3820,14 @@ Note: This function does not operate on any child windows of WINDOW. */)
|
|||
(Lisp_Object window, Lisp_Object size, Lisp_Object add)
|
||||
{
|
||||
struct window *w = decode_valid_window (window);
|
||||
EMACS_INT size_min = NILP (add) ? 0 : - XINT (w->new_pixel);
|
||||
EMACS_INT size_min = NILP (add) ? 0 : - XFIXNUM (w->new_pixel);
|
||||
EMACS_INT size_max = size_min + min (INT_MAX, MOST_POSITIVE_FIXNUM);
|
||||
|
||||
CHECK_RANGED_INTEGER (size, size_min, size_max);
|
||||
if (NILP (add))
|
||||
wset_new_pixel (w, size);
|
||||
else
|
||||
wset_new_pixel (w, make_fixnum (XINT (w->new_pixel) + XINT (size)));
|
||||
wset_new_pixel (w, make_fixnum (XFIXNUM (w->new_pixel) + XFIXNUM (size)));
|
||||
|
||||
return w->new_pixel;
|
||||
}
|
||||
|
|
@ -3853,7 +3853,7 @@ Note: This function does not operate on any child windows of WINDOW. */)
|
|||
if (NILP (add))
|
||||
wset_new_total (w, size);
|
||||
else
|
||||
wset_new_total (w, make_fixnum (XINT (w->new_total) + XINT (size)));
|
||||
wset_new_total (w, make_fixnum (XFIXNUM (w->new_total) + XFIXNUM (size)));
|
||||
|
||||
return w->new_total;
|
||||
}
|
||||
|
|
@ -3895,7 +3895,7 @@ window_resize_check (struct window *w, bool horflag)
|
|||
{
|
||||
while (c)
|
||||
{
|
||||
if (XINT (c->new_pixel) != XINT (w->new_pixel)
|
||||
if (XFIXNUM (c->new_pixel) != XFIXNUM (w->new_pixel)
|
||||
|| !window_resize_check (c, horflag))
|
||||
return false;
|
||||
|
||||
|
|
@ -3908,14 +3908,14 @@ window_resize_check (struct window *w, bool horflag)
|
|||
/* The sum of the heights of the child windows of W must equal
|
||||
W's height. */
|
||||
{
|
||||
int remaining_pixels = XINT (w->new_pixel);
|
||||
int remaining_pixels = XFIXNUM (w->new_pixel);
|
||||
|
||||
while (c)
|
||||
{
|
||||
if (!window_resize_check (c, horflag))
|
||||
return false;
|
||||
|
||||
remaining_pixels -= XINT (c->new_pixel);
|
||||
remaining_pixels -= XFIXNUM (c->new_pixel);
|
||||
if (remaining_pixels < 0)
|
||||
return false;
|
||||
c = NILP (c->next) ? 0 : XWINDOW (c->next);
|
||||
|
|
@ -3932,14 +3932,14 @@ window_resize_check (struct window *w, bool horflag)
|
|||
/* The sum of the widths of the child windows of W must equal W's
|
||||
width. */
|
||||
{
|
||||
int remaining_pixels = XINT (w->new_pixel);
|
||||
int remaining_pixels = XFIXNUM (w->new_pixel);
|
||||
|
||||
while (c)
|
||||
{
|
||||
if (!window_resize_check (c, horflag))
|
||||
return false;
|
||||
|
||||
remaining_pixels -= XINT (c->new_pixel);
|
||||
remaining_pixels -= XFIXNUM (c->new_pixel);
|
||||
if (remaining_pixels < 0)
|
||||
return false;
|
||||
c = NILP (c->next) ? 0 : XWINDOW (c->next);
|
||||
|
|
@ -3952,7 +3952,7 @@ window_resize_check (struct window *w, bool horflag)
|
|||
{
|
||||
while (c)
|
||||
{
|
||||
if (XINT (c->new_pixel) != XINT (w->new_pixel)
|
||||
if (XFIXNUM (c->new_pixel) != XFIXNUM (w->new_pixel)
|
||||
|| !window_resize_check (c, horflag))
|
||||
return false;
|
||||
|
||||
|
|
@ -3966,7 +3966,7 @@ window_resize_check (struct window *w, bool horflag)
|
|||
/* A leaf window. Make sure it's not too small. The following
|
||||
hardcodes the values of `window-safe-min-width' (2) and
|
||||
`window-safe-min-height' (1) which are defined in window.el. */
|
||||
return (XINT (w->new_pixel) >= (horflag
|
||||
return (XFIXNUM (w->new_pixel) >= (horflag
|
||||
? (2 * FRAME_COLUMN_WIDTH (f))
|
||||
: FRAME_LINE_HEIGHT (f)));
|
||||
}
|
||||
|
|
@ -3992,7 +3992,7 @@ window_resize_apply (struct window *w, bool horflag)
|
|||
parent window has been set *before*. */
|
||||
if (horflag)
|
||||
{
|
||||
w->pixel_width = XFASTINT (w->new_pixel);
|
||||
w->pixel_width = XFIXNAT (w->new_pixel);
|
||||
w->total_cols = w->pixel_width / unit;
|
||||
if (FIXED_OR_FLOATP (w->new_normal))
|
||||
wset_normal_cols (w, w->new_normal);
|
||||
|
|
@ -4001,7 +4001,7 @@ window_resize_apply (struct window *w, bool horflag)
|
|||
}
|
||||
else
|
||||
{
|
||||
w->pixel_height = XFASTINT (w->new_pixel);
|
||||
w->pixel_height = XFIXNAT (w->new_pixel);
|
||||
w->total_lines = w->pixel_height / unit;
|
||||
if (FIXED_OR_FLOATP (w->new_normal))
|
||||
wset_normal_lines (w, w->new_normal);
|
||||
|
|
@ -4076,12 +4076,12 @@ window_resize_apply_total (struct window *w, bool horflag)
|
|||
parent window has been set *before*. */
|
||||
if (horflag)
|
||||
{
|
||||
w->total_cols = XFASTINT (w->new_total);
|
||||
w->total_cols = XFIXNAT (w->new_total);
|
||||
edge = w->left_col;
|
||||
}
|
||||
else
|
||||
{
|
||||
w->total_lines = XFASTINT (w->new_total);
|
||||
w->total_lines = XFIXNAT (w->new_total);
|
||||
edge = w->top_line;
|
||||
}
|
||||
|
||||
|
|
@ -4149,7 +4149,7 @@ be applied on the Elisp level. */)
|
|||
bool horflag = !NILP (horizontal);
|
||||
|
||||
if (!window_resize_check (r, horflag)
|
||||
|| (XINT (r->new_pixel)
|
||||
|| (XFIXNUM (r->new_pixel)
|
||||
!= (horflag ? r->pixel_width : r->pixel_height)))
|
||||
return Qnil;
|
||||
|
||||
|
|
@ -4193,10 +4193,10 @@ values. */)
|
|||
if (NILP (horizontal))
|
||||
{
|
||||
m->top_line = r->top_line + r->total_lines;
|
||||
m->total_lines = XFASTINT (m->new_total);
|
||||
m->total_lines = XFIXNAT (m->new_total);
|
||||
}
|
||||
else
|
||||
m->total_cols = XFASTINT (m->new_total);
|
||||
m->total_cols = XFIXNAT (m->new_total);
|
||||
}
|
||||
|
||||
unblock_input ();
|
||||
|
|
@ -4286,7 +4286,7 @@ resize_frame_windows (struct frame *f, int size, bool horflag, bool pixelwise)
|
|||
resize_root_window (root, delta, horflag ? Qt : Qnil, Qnil,
|
||||
pixelwise ? Qt : Qnil);
|
||||
if (window_resize_check (r, horflag)
|
||||
&& new_pixel_size == XINT (r->new_pixel))
|
||||
&& new_pixel_size == XFIXNUM (r->new_pixel))
|
||||
{
|
||||
window_resize_apply (r, horflag);
|
||||
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)
|
|||
resize_root_window (root, delta, horflag ? Qt : Qnil, Qt,
|
||||
pixelwise ? Qt : Qnil);
|
||||
if (window_resize_check (r, horflag)
|
||||
&& new_pixel_size == XINT (r->new_pixel))
|
||||
&& new_pixel_size == XFIXNUM (r->new_pixel))
|
||||
{
|
||||
window_resize_apply (r, horflag);
|
||||
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. */)
|
|||
|
||||
CHECK_FIXNUM (pixel_size);
|
||||
EMACS_INT total_size
|
||||
= XINT (pixel_size) / (horflag
|
||||
= XFIXNUM (pixel_size) / (horflag
|
||||
? FRAME_COLUMN_WIDTH (f)
|
||||
: FRAME_LINE_HEIGHT (f));
|
||||
|
||||
|
|
@ -4407,7 +4407,7 @@ set correctly. See the code of `split-window' for how this is done. */)
|
|||
/* Temporarily pretend we split the parent window. */
|
||||
wset_new_pixel
|
||||
(p, make_fixnum ((horflag ? p->pixel_width : p->pixel_height)
|
||||
- XINT (pixel_size)));
|
||||
- XFIXNUM (pixel_size)));
|
||||
if (!window_resize_check (p, horflag))
|
||||
error ("Window sizes don't fit");
|
||||
else
|
||||
|
|
@ -4418,7 +4418,7 @@ set correctly. See the code of `split-window' for how this is done. */)
|
|||
{
|
||||
if (!window_resize_check (o, horflag))
|
||||
error ("Resizing old window failed");
|
||||
else if (XINT (pixel_size) + XINT (o->new_pixel)
|
||||
else if (XFIXNUM (pixel_size) + XFIXNUM (o->new_pixel)
|
||||
!= (horflag ? o->pixel_width : o->pixel_height))
|
||||
error ("Sum of sizes of old and new window don't fit");
|
||||
}
|
||||
|
|
@ -4511,7 +4511,7 @@ set correctly. See the code of `split-window' for how this is done. */)
|
|||
while (c)
|
||||
{
|
||||
if (c != n)
|
||||
sum = sum + XINT (c->new_total);
|
||||
sum = sum + XFIXNUM (c->new_total);
|
||||
c = NILP (c->next) ? 0 : XWINDOW (c->next);
|
||||
}
|
||||
wset_new_total (n, make_fixnum ((horflag
|
||||
|
|
@ -4596,7 +4596,7 @@ Signal an error when WINDOW is the only window on its frame. */)
|
|||
}
|
||||
|
||||
if (window_resize_check (r, horflag)
|
||||
&& (XINT (r->new_pixel)
|
||||
&& (XFIXNUM (r->new_pixel)
|
||||
== (horflag ? r->pixel_width : r->pixel_height)))
|
||||
/* We can delete WINDOW now. */
|
||||
{
|
||||
|
|
@ -4735,12 +4735,12 @@ grow_mini_window (struct window *w, int delta, bool pixelwise)
|
|||
|
||||
if (pixelwise)
|
||||
{
|
||||
pixel_height = min (-XINT (height), INT_MAX - w->pixel_height);
|
||||
pixel_height = min (-XFIXNUM (height), INT_MAX - w->pixel_height);
|
||||
line_height = pixel_height / FRAME_LINE_HEIGHT (f);
|
||||
}
|
||||
else
|
||||
{
|
||||
line_height = min (-XINT (height),
|
||||
line_height = min (-XFIXNUM (height),
|
||||
((INT_MAX - w->pixel_height)
|
||||
/ FRAME_LINE_HEIGHT (f)));
|
||||
pixel_height = line_height * FRAME_LINE_HEIGHT (f);
|
||||
|
|
@ -4831,13 +4831,13 @@ DEFUN ("resize-mini-window-internal", Fresize_mini_window_internal, Sresize_mini
|
|||
r = XWINDOW (FRAME_ROOT_WINDOW (f));
|
||||
height = r->pixel_height + w->pixel_height;
|
||||
if (window_resize_check (r, false)
|
||||
&& XINT (w->new_pixel) > 0
|
||||
&& height == XINT (r->new_pixel) + XINT (w->new_pixel))
|
||||
&& XFIXNUM (w->new_pixel) > 0
|
||||
&& height == XFIXNUM (r->new_pixel) + XFIXNUM (w->new_pixel))
|
||||
{
|
||||
block_input ();
|
||||
window_resize_apply (r, false);
|
||||
|
||||
w->pixel_height = XFASTINT (w->new_pixel);
|
||||
w->pixel_height = XFIXNAT (w->new_pixel);
|
||||
w->total_lines = w->pixel_height / FRAME_LINE_HEIGHT (f);
|
||||
w->pixel_top = r->pixel_top + r->pixel_height;
|
||||
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)
|
|||
/* If there are other text lines above the current row,
|
||||
move window start to current row. Else to next row. */
|
||||
if (rbot > 0)
|
||||
spos = XINT (Fline_beginning_position (Qnil));
|
||||
spos = XFIXNUM (Fline_beginning_position (Qnil));
|
||||
else
|
||||
spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV);
|
||||
spos = min (XFIXNUM (Fline_end_position (Qnil)) + 1, ZV);
|
||||
set_marker_restricted (w->start, make_fixnum (spos),
|
||||
w->contents);
|
||||
w->start_at_line_beg = true;
|
||||
|
|
@ -5589,7 +5589,7 @@ window_scroll_line_based (Lisp_Object window, int n, bool whole, bool noerror)
|
|||
SET_PT_BOTH (pos, pos_byte);
|
||||
tem = Fvertical_motion (make_fixnum (ht - this_scroll_margin), window,
|
||||
Qnil);
|
||||
if (XFASTINT (tem) == ht - this_scroll_margin)
|
||||
if (XFIXNAT (tem) == ht - this_scroll_margin)
|
||||
bottom_margin = PT;
|
||||
else
|
||||
bottom_margin = PT + 1;
|
||||
|
|
@ -5680,7 +5680,7 @@ scroll_command (Lisp_Object window, Lisp_Object n, int direction)
|
|||
else
|
||||
{
|
||||
n = Fprefix_numeric_value (n);
|
||||
window_scroll (window, XINT (n) * direction, false, false);
|
||||
window_scroll (window, XFIXNUM (n) * direction, false, false);
|
||||
}
|
||||
|
||||
if (other_window)
|
||||
|
|
@ -5804,7 +5804,7 @@ by this function. This happens in an interactive call. */)
|
|||
struct window *w = XWINDOW (selected_window);
|
||||
EMACS_INT requested_arg = (NILP (arg)
|
||||
? window_body_width (w, 0) - 2
|
||||
: XINT (Fprefix_numeric_value (arg)));
|
||||
: XFIXNUM (Fprefix_numeric_value (arg)));
|
||||
Lisp_Object result = set_window_hscroll (w, w->hscroll + requested_arg);
|
||||
|
||||
if (!NILP (set_minimum))
|
||||
|
|
@ -5829,7 +5829,7 @@ by this function. This happens in an interactive call. */)
|
|||
struct window *w = XWINDOW (selected_window);
|
||||
EMACS_INT requested_arg = (NILP (arg)
|
||||
? window_body_width (w, 0) - 2
|
||||
: XINT (Fprefix_numeric_value (arg)));
|
||||
: XFIXNUM (Fprefix_numeric_value (arg)));
|
||||
Lisp_Object result = set_window_hscroll (w, w->hscroll - requested_arg);
|
||||
|
||||
if (!NILP (set_minimum))
|
||||
|
|
@ -5962,7 +5962,7 @@ and redisplay normally--don't erase and redraw the frame. */)
|
|||
{
|
||||
arg = Fprefix_numeric_value (arg);
|
||||
CHECK_FIXNUM (arg);
|
||||
iarg = XINT (arg);
|
||||
iarg = XFIXNUM (arg);
|
||||
}
|
||||
|
||||
/* Do this after making BUF current
|
||||
|
|
@ -6210,7 +6210,7 @@ from the top of the window. */)
|
|||
XSETFASTINT (arg, lines / 2);
|
||||
else
|
||||
{
|
||||
EMACS_INT iarg = XINT (Fprefix_numeric_value (arg));
|
||||
EMACS_INT iarg = XFIXNUM (Fprefix_numeric_value (arg));
|
||||
|
||||
if (iarg < 0)
|
||||
iarg = iarg + lines;
|
||||
|
|
@ -6233,7 +6233,7 @@ from the top of the window. */)
|
|||
|
||||
/* Skip past a partially visible first line. */
|
||||
if (w->vscroll)
|
||||
XSETINT (arg, XINT (arg) + 1);
|
||||
XSETINT (arg, XFIXNUM (arg) + 1);
|
||||
|
||||
return Fvertical_motion (arg, window, Qnil);
|
||||
}
|
||||
|
|
@ -6471,14 +6471,14 @@ the return value is nil. Otherwise the value is t. */)
|
|||
|
||||
if (!NILP (p->parent))
|
||||
wset_parent
|
||||
(w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->parent))->window);
|
||||
(w, SAVED_WINDOW_N (saved_windows, XFIXNAT (p->parent))->window);
|
||||
else
|
||||
wset_parent (w, Qnil);
|
||||
|
||||
if (!NILP (p->prev))
|
||||
{
|
||||
wset_prev
|
||||
(w, SAVED_WINDOW_N (saved_windows, XFASTINT (p->prev))->window);
|
||||
(w, SAVED_WINDOW_N (saved_windows, XFIXNAT (p->prev))->window);
|
||||
wset_next (XWINDOW (w->prev), p->window);
|
||||
}
|
||||
else
|
||||
|
|
@ -6486,7 +6486,7 @@ the return value is nil. Otherwise the value is t. */)
|
|||
wset_prev (w, Qnil);
|
||||
if (!NILP (w->parent))
|
||||
wset_combination (XWINDOW (w->parent),
|
||||
(XINT (p->total_cols)
|
||||
(XFIXNUM (p->total_cols)
|
||||
!= XWINDOW (w->parent)->total_cols),
|
||||
p->window);
|
||||
}
|
||||
|
|
@ -6494,32 +6494,32 @@ the return value is nil. Otherwise the value is t. */)
|
|||
/* If we squirreled away the buffer, restore it now. */
|
||||
if (BUFFERP (w->combination_limit))
|
||||
wset_buffer (w, w->combination_limit);
|
||||
w->pixel_left = XFASTINT (p->pixel_left);
|
||||
w->pixel_top = XFASTINT (p->pixel_top);
|
||||
w->pixel_width = XFASTINT (p->pixel_width);
|
||||
w->pixel_height = XFASTINT (p->pixel_height);
|
||||
w->pixel_left = XFIXNAT (p->pixel_left);
|
||||
w->pixel_top = XFIXNAT (p->pixel_top);
|
||||
w->pixel_width = XFIXNAT (p->pixel_width);
|
||||
w->pixel_height = XFIXNAT (p->pixel_height);
|
||||
w->pixel_width_before_size_change
|
||||
= XFASTINT (p->pixel_width_before_size_change);
|
||||
= XFIXNAT (p->pixel_width_before_size_change);
|
||||
w->pixel_height_before_size_change
|
||||
= XFASTINT (p->pixel_height_before_size_change);
|
||||
w->left_col = XFASTINT (p->left_col);
|
||||
w->top_line = XFASTINT (p->top_line);
|
||||
w->total_cols = XFASTINT (p->total_cols);
|
||||
w->total_lines = XFASTINT (p->total_lines);
|
||||
= XFIXNAT (p->pixel_height_before_size_change);
|
||||
w->left_col = XFIXNAT (p->left_col);
|
||||
w->top_line = XFIXNAT (p->top_line);
|
||||
w->total_cols = XFIXNAT (p->total_cols);
|
||||
w->total_lines = XFIXNAT (p->total_lines);
|
||||
wset_normal_cols (w, p->normal_cols);
|
||||
wset_normal_lines (w, p->normal_lines);
|
||||
w->hscroll = XFASTINT (p->hscroll);
|
||||
w->hscroll = XFIXNAT (p->hscroll);
|
||||
w->suspend_auto_hscroll = !NILP (p->suspend_auto_hscroll);
|
||||
w->min_hscroll = XFASTINT (p->min_hscroll);
|
||||
w->hscroll_whole = XFASTINT (p->hscroll_whole);
|
||||
w->min_hscroll = XFIXNAT (p->min_hscroll);
|
||||
w->hscroll_whole = XFIXNAT (p->hscroll_whole);
|
||||
wset_display_table (w, p->display_table);
|
||||
w->left_margin_cols = XINT (p->left_margin_cols);
|
||||
w->right_margin_cols = XINT (p->right_margin_cols);
|
||||
w->left_fringe_width = XINT (p->left_fringe_width);
|
||||
w->right_fringe_width = XINT (p->right_fringe_width);
|
||||
w->left_margin_cols = XFIXNUM (p->left_margin_cols);
|
||||
w->right_margin_cols = XFIXNUM (p->right_margin_cols);
|
||||
w->left_fringe_width = XFIXNUM (p->left_fringe_width);
|
||||
w->right_fringe_width = XFIXNUM (p->right_fringe_width);
|
||||
w->fringes_outside_margins = !NILP (p->fringes_outside_margins);
|
||||
w->scroll_bar_width = XINT (p->scroll_bar_width);
|
||||
w->scroll_bar_height = XINT (p->scroll_bar_height);
|
||||
w->scroll_bar_width = XFIXNUM (p->scroll_bar_width);
|
||||
w->scroll_bar_height = XFIXNUM (p->scroll_bar_height);
|
||||
wset_vertical_scroll_bar_type (w, p->vertical_scroll_bar_type);
|
||||
wset_horizontal_scroll_bar_type (w, p->horizontal_scroll_bar_type);
|
||||
wset_dedicated (w, p->dedicated);
|
||||
|
|
@ -7042,7 +7042,7 @@ extract_dimension (Lisp_Object dimension)
|
|||
if (NILP (dimension))
|
||||
return -1;
|
||||
CHECK_RANGED_INTEGER (dimension, 0, INT_MAX);
|
||||
return XINT (dimension);
|
||||
return XFIXNUM (dimension);
|
||||
}
|
||||
|
||||
static struct window *
|
||||
|
|
|
|||
188
src/xdisp.c
188
src/xdisp.c
|
|
@ -1251,7 +1251,7 @@ default_line_pixel_height (struct window *w)
|
|||
if (!NILP (val))
|
||||
{
|
||||
if (RANGED_FIXNUMP (0, val, INT_MAX))
|
||||
height += XFASTINT (val);
|
||||
height += XFIXNAT (val);
|
||||
else if (FLOATP (val))
|
||||
{
|
||||
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,
|
|||
startpos =
|
||||
Fprevious_single_char_property_change (endpos, Qdisplay,
|
||||
Qnil, Qnil);
|
||||
start = XFASTINT (startpos);
|
||||
end = XFASTINT (endpos);
|
||||
start = XFIXNAT (startpos);
|
||||
end = XFIXNAT (endpos);
|
||||
/* Move to the last buffer position before the
|
||||
display property. */
|
||||
start_display (&it3, w, top);
|
||||
|
|
@ -2843,7 +2843,7 @@ init_iterator (struct it *it, struct window *w,
|
|||
&& FRAME_WINDOW_P (it->f))
|
||||
{
|
||||
if (FIXNATP (BVAR (current_buffer, extra_line_spacing)))
|
||||
it->extra_line_spacing = XFASTINT (BVAR (current_buffer, extra_line_spacing));
|
||||
it->extra_line_spacing = XFIXNAT (BVAR (current_buffer, extra_line_spacing));
|
||||
else if (FLOATP (BVAR (current_buffer, extra_line_spacing)))
|
||||
it->extra_line_spacing = (XFLOAT_DATA (BVAR (current_buffer, extra_line_spacing))
|
||||
* FRAME_LINE_HEIGHT (it->f));
|
||||
|
|
@ -2870,7 +2870,7 @@ init_iterator (struct it *it, struct window *w,
|
|||
invisible. */
|
||||
it->selective = (FIXNUMP (BVAR (current_buffer, selective_display))
|
||||
? (clip_to_bounds
|
||||
(-1, XINT (BVAR (current_buffer, selective_display)),
|
||||
(-1, XFIXNUM (BVAR (current_buffer, selective_display)),
|
||||
PTRDIFF_MAX))
|
||||
: (!NILP (BVAR (current_buffer, selective_display))
|
||||
? -1 : 0));
|
||||
|
|
@ -2891,7 +2891,7 @@ init_iterator (struct it *it, struct window *w,
|
|||
= marker_position (w->redisplay_end_trigger);
|
||||
else if (FIXNUMP (w->redisplay_end_trigger))
|
||||
it->redisplay_end_trigger_charpos
|
||||
= clip_to_bounds (PTRDIFF_MIN, XINT (w->redisplay_end_trigger),
|
||||
= clip_to_bounds (PTRDIFF_MIN, XFIXNUM (w->redisplay_end_trigger),
|
||||
PTRDIFF_MAX);
|
||||
|
||||
it->tab_width = SANE_TAB_WIDTH (current_buffer);
|
||||
|
|
@ -2905,7 +2905,7 @@ init_iterator (struct it *it, struct window *w,
|
|||
|| NILP (Vtruncate_partial_width_windows)
|
||||
|| (FIXNUMP (Vtruncate_partial_width_windows)
|
||||
/* PXW: Shall we do something about this? */
|
||||
&& (XINT (Vtruncate_partial_width_windows)
|
||||
&& (XFIXNUM (Vtruncate_partial_width_windows)
|
||||
<= WINDOW_TOTAL_COLS (it->w))))
|
||||
&& NILP (BVAR (current_buffer, truncate_lines)))
|
||||
it->line_wrap = NILP (BVAR (current_buffer, word_wrap))
|
||||
|
|
@ -3599,7 +3599,7 @@ compute_stop_pos (struct it *it)
|
|||
for (next_iv = next_interval (iv);
|
||||
(next_iv
|
||||
&& (NILP (limit)
|
||||
|| XFASTINT (limit) > next_iv->position));
|
||||
|| XFIXNAT (limit) > next_iv->position));
|
||||
next_iv = next_interval (next_iv))
|
||||
{
|
||||
for (p = it_props; p->handler; ++p)
|
||||
|
|
@ -3617,9 +3617,9 @@ compute_stop_pos (struct it *it)
|
|||
if (next_iv)
|
||||
{
|
||||
if (FIXNUMP (limit)
|
||||
&& next_iv->position >= XFASTINT (limit))
|
||||
&& next_iv->position >= XFIXNAT (limit))
|
||||
/* No text property change up to limit. */
|
||||
it->stop_charpos = min (XFASTINT (limit), it->stop_charpos);
|
||||
it->stop_charpos = min (XFIXNAT (limit), it->stop_charpos);
|
||||
else
|
||||
/* Text properties change in next_iv. */
|
||||
it->stop_charpos = min (it->stop_charpos, next_iv->position);
|
||||
|
|
@ -3758,7 +3758,7 @@ compute_display_string_pos (struct text_pos *position,
|
|||
limpos = make_fixnum (lim);
|
||||
do {
|
||||
pos = Fnext_single_char_property_change (pos, Qdisplay, object1, limpos);
|
||||
CHARPOS (tpos) = XFASTINT (pos);
|
||||
CHARPOS (tpos) = XFIXNAT (pos);
|
||||
if (CHARPOS (tpos) >= lim)
|
||||
{
|
||||
*disp_prop = 0;
|
||||
|
|
@ -3819,7 +3819,7 @@ compute_display_string_end (ptrdiff_t charpos, struct bidi_string_data *string)
|
|||
changes. */
|
||||
pos = Fnext_single_char_property_change (pos, Qdisplay, object, Qnil);
|
||||
|
||||
return XFASTINT (pos);
|
||||
return XFIXNAT (pos);
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -4376,7 +4376,7 @@ handle_invisible_prop (struct it *it)
|
|||
eassert (FIXNUMP (end_charpos));
|
||||
if (FIXNUMP (end_charpos))
|
||||
{
|
||||
endpos = XFASTINT (end_charpos);
|
||||
endpos = XFIXNAT (end_charpos);
|
||||
prop = Fget_text_property (end_charpos, Qinvisible, it->string);
|
||||
invis = TEXT_PROP_MEANS_INVISIBLE (prop);
|
||||
if (invis == 2)
|
||||
|
|
@ -4863,11 +4863,11 @@ display_prop_end (struct it *it, Lisp_Object object, struct text_pos start_pos)
|
|||
|
||||
end = Fnext_single_char_property_change (make_fixnum (CHARPOS (start_pos)),
|
||||
Qdisplay, object, Qnil);
|
||||
CHARPOS (end_pos) = XFASTINT (end);
|
||||
CHARPOS (end_pos) = XFIXNAT (end);
|
||||
if (STRINGP (object))
|
||||
compute_string_pos (&end_pos, start_pos, it->string);
|
||||
else
|
||||
BYTEPOS (end_pos) = CHAR_TO_BYTE (XFASTINT (end));
|
||||
BYTEPOS (end_pos) = CHAR_TO_BYTE (XFIXNAT (end));
|
||||
|
||||
return end_pos;
|
||||
}
|
||||
|
|
@ -4965,7 +4965,7 @@ handle_single_display_spec (struct it *it, Lisp_Object spec, Lisp_Object object,
|
|||
&& RANGED_FIXNUMP (0, XCAR (XCDR (it->font_height)), INT_MAX))
|
||||
{
|
||||
/* `(+ N)' or `(- N)' where N is an integer. */
|
||||
int steps = XINT (XCAR (XCDR (it->font_height)));
|
||||
int steps = XFIXNUM (XCAR (XCDR (it->font_height)));
|
||||
if (EQ (XCAR (it->font_height), Qplus))
|
||||
steps = - steps;
|
||||
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,
|
|||
f = FACE_FROM_ID (it->f,
|
||||
lookup_basic_face (it->w, it->f, DEFAULT_FACE_ID));
|
||||
new_height = (XFLOATINT (it->font_height)
|
||||
* XINT (f->lface[LFACE_HEIGHT_INDEX]));
|
||||
* XFIXNUM (f->lface[LFACE_HEIGHT_INDEX]));
|
||||
}
|
||||
else if (enable_eval_p)
|
||||
{
|
||||
|
|
@ -5517,7 +5517,7 @@ string_buffer_position_lim (Lisp_Object string,
|
|||
}
|
||||
}
|
||||
|
||||
return found ? XINT (pos) : 0;
|
||||
return found ? XFIXNUM (pos) : 0;
|
||||
}
|
||||
|
||||
/* Determine which buffer position in current buffer STRING comes from.
|
||||
|
|
@ -5852,7 +5852,7 @@ load_overlay_strings (struct it *it, ptrdiff_t charpos)
|
|||
entries[n].string = (STRING); \
|
||||
entries[n].overlay = (OVERLAY); \
|
||||
priority = Foverlay_get ((OVERLAY), Qpriority); \
|
||||
entries[n].priority = FIXNUMP (priority) ? XINT (priority) : 0; \
|
||||
entries[n].priority = FIXNUMP (priority) ? XFIXNUM (priority) : 0; \
|
||||
entries[n].after_string_p = (AFTER_P); \
|
||||
++n; \
|
||||
} \
|
||||
|
|
@ -10144,7 +10144,7 @@ include the height of both, if present, in the return value. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (from);
|
||||
start = min (max (XINT (from), BEGV), ZV);
|
||||
start = min (max (XFIXNUM (from), BEGV), ZV);
|
||||
}
|
||||
|
||||
if (NILP (to))
|
||||
|
|
@ -10161,16 +10161,16 @@ include the height of both, if present, in the return value. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (to);
|
||||
end = max (start, min (XINT (to), ZV));
|
||||
end = max (start, min (XFIXNUM (to), ZV));
|
||||
}
|
||||
|
||||
if (!NILP (x_limit) && RANGED_FIXNUMP (0, x_limit, INT_MAX))
|
||||
max_x = XINT (x_limit);
|
||||
max_x = XFIXNUM (x_limit);
|
||||
|
||||
if (NILP (y_limit))
|
||||
max_y = INT_MAX;
|
||||
else if (RANGED_FIXNUMP (0, y_limit, INT_MAX))
|
||||
max_y = XINT (y_limit);
|
||||
max_y = XFIXNUM (y_limit);
|
||||
|
||||
itdata = bidi_shelve_cache ();
|
||||
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)
|
|||
if (FIXNATP (Vmessage_log_max))
|
||||
{
|
||||
scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,
|
||||
-XFASTINT (Vmessage_log_max) - 1, false);
|
||||
-XFIXNAT (Vmessage_log_max) - 1, false);
|
||||
del_range_both (BEG, BEG_BYTE, PT, PT_BYTE, false);
|
||||
}
|
||||
}
|
||||
|
|
@ -11000,7 +11000,7 @@ unwind_with_echo_area_buffer (Lisp_Object vector)
|
|||
{
|
||||
set_buffer_internal_1 (XBUFFER (AREF (vector, 0)));
|
||||
Vdeactivate_mark = AREF (vector, 1);
|
||||
windows_or_buffers_changed = XFASTINT (AREF (vector, 2));
|
||||
windows_or_buffers_changed = XFIXNAT (AREF (vector, 2));
|
||||
|
||||
if (WINDOWP (AREF (vector, 3)))
|
||||
{
|
||||
|
|
@ -11012,14 +11012,14 @@ unwind_with_echo_area_buffer (Lisp_Object vector)
|
|||
|
||||
wset_buffer (w, buffer);
|
||||
set_marker_both (w->pointm, buffer,
|
||||
XFASTINT (AREF (vector, 5)),
|
||||
XFASTINT (AREF (vector, 6)));
|
||||
XFIXNAT (AREF (vector, 5)),
|
||||
XFIXNAT (AREF (vector, 6)));
|
||||
set_marker_both (w->old_pointm, buffer,
|
||||
XFASTINT (AREF (vector, 7)),
|
||||
XFASTINT (AREF (vector, 8)));
|
||||
XFIXNAT (AREF (vector, 7)),
|
||||
XFIXNAT (AREF (vector, 8)));
|
||||
set_marker_both (w->start, buffer,
|
||||
XFASTINT (AREF (vector, 9)),
|
||||
XFASTINT (AREF (vector, 10)));
|
||||
XFIXNAT (AREF (vector, 9)),
|
||||
XFIXNAT (AREF (vector, 10)));
|
||||
}
|
||||
|
||||
Vwith_echo_area_save_vector = vector;
|
||||
|
|
@ -11280,7 +11280,7 @@ resize_mini_window (struct window *w, bool exact_p)
|
|||
if (FLOATP (Vmax_mini_window_height))
|
||||
max_height = XFLOAT_DATA (Vmax_mini_window_height) * total_height;
|
||||
else if (FIXNUMP (Vmax_mini_window_height))
|
||||
max_height = XINT (Vmax_mini_window_height) * unit;
|
||||
max_height = XFIXNUM (Vmax_mini_window_height) * unit;
|
||||
else
|
||||
max_height = total_height / 4;
|
||||
|
||||
|
|
@ -11871,8 +11871,8 @@ unwind_format_mode_line (Lisp_Object vector)
|
|||
Lisp_Object target_frame_window = AREF (vector, 8);
|
||||
Lisp_Object old_top_frame = AREF (vector, 9);
|
||||
|
||||
mode_line_target = XINT (AREF (vector, 0));
|
||||
mode_line_noprop_ptr = mode_line_noprop_buf + XINT (AREF (vector, 1));
|
||||
mode_line_target = XFIXNUM (AREF (vector, 0));
|
||||
mode_line_noprop_ptr = mode_line_noprop_buf + XFIXNUM (AREF (vector, 1));
|
||||
mode_line_string_list = AREF (vector, 2);
|
||||
if (! EQ (AREF (vector, 3), Qt))
|
||||
mode_line_proptrans_alist = AREF (vector, 3);
|
||||
|
|
@ -12488,18 +12488,18 @@ build_desired_tool_bar_string (struct frame *f)
|
|||
if (RANGED_FIXNUMP (1, Vtool_bar_button_margin,
|
||||
INT_MAX - max (hmargin, vmargin)))
|
||||
{
|
||||
hmargin += XFASTINT (Vtool_bar_button_margin);
|
||||
vmargin += XFASTINT (Vtool_bar_button_margin);
|
||||
hmargin += XFIXNAT (Vtool_bar_button_margin);
|
||||
vmargin += XFIXNAT (Vtool_bar_button_margin);
|
||||
}
|
||||
else if (CONSP (Vtool_bar_button_margin))
|
||||
{
|
||||
if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin),
|
||||
INT_MAX - hmargin))
|
||||
hmargin += XFASTINT (XCAR (Vtool_bar_button_margin));
|
||||
hmargin += XFIXNAT (XCAR (Vtool_bar_button_margin));
|
||||
|
||||
if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin),
|
||||
INT_MAX - vmargin))
|
||||
vmargin += XFASTINT (XCDR (Vtool_bar_button_margin));
|
||||
vmargin += XFIXNAT (XCDR (Vtool_bar_button_margin));
|
||||
}
|
||||
|
||||
if (auto_raise_tool_bar_buttons_p)
|
||||
|
|
@ -12836,7 +12836,7 @@ redisplay_tool_bar (struct frame *f)
|
|||
int border, rows, height, extra;
|
||||
|
||||
if (TYPE_RANGED_FIXNUMP (int, Vtool_bar_border))
|
||||
border = XINT (Vtool_bar_border);
|
||||
border = XFIXNUM (Vtool_bar_border);
|
||||
else if (EQ (Vtool_bar_border, Qinternal_border_width))
|
||||
border = FRAME_INTERNAL_BORDER_WIDTH (f);
|
||||
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)
|
|||
Qmenu_item, f->current_tool_bar_string);
|
||||
if (! FIXNUMP (prop))
|
||||
return false;
|
||||
*prop_idx = XINT (prop);
|
||||
*prop_idx = XFIXNUM (prop);
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
@ -13205,7 +13205,7 @@ hscroll_window_tree (Lisp_Object window)
|
|||
}
|
||||
else if (TYPE_RANGED_FIXNUMP (int, Vhscroll_step))
|
||||
{
|
||||
hscroll_step_abs = XINT (Vhscroll_step);
|
||||
hscroll_step_abs = XFIXNUM (Vhscroll_step);
|
||||
if (hscroll_step_abs < 0)
|
||||
hscroll_step_abs = 0;
|
||||
}
|
||||
|
|
@ -13562,7 +13562,7 @@ text_outside_line_unchanged_p (struct window *w,
|
|||
beginning of the line. */
|
||||
if (unchanged_p
|
||||
&& FIXNUMP (BVAR (current_buffer, selective_display))
|
||||
&& XINT (BVAR (current_buffer, selective_display)) > 0
|
||||
&& XFIXNUM (BVAR (current_buffer, selective_display)) > 0
|
||||
&& (BEG_UNCHANGED < start || GPT <= start))
|
||||
unchanged_p = false;
|
||||
|
||||
|
|
@ -14144,7 +14144,7 @@ redisplay_internal (void)
|
|||
{ \
|
||||
Lisp_Object entry = Fgethash (make_fixnum (i), a, make_fixnum (0)); \
|
||||
if (FIXNUMP (entry)) \
|
||||
Fputhash (make_fixnum (i), make_fixnum (1 + XINT (entry)), a); \
|
||||
Fputhash (make_fixnum (i), make_fixnum (1 + XFIXNUM (entry)), a); \
|
||||
}
|
||||
|
||||
AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed);
|
||||
|
|
@ -15136,7 +15136,7 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
|
|||
}
|
||||
if (FIXNUMP (chprop))
|
||||
{
|
||||
bpos_covered = bpos_max + XINT (chprop);
|
||||
bpos_covered = bpos_max + XFIXNUM (chprop);
|
||||
/* If the `cursor' property covers buffer positions up
|
||||
to and including point, we should display cursor on
|
||||
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,
|
|||
}
|
||||
if (FIXNUMP (chprop))
|
||||
{
|
||||
bpos_covered = bpos_max + XINT (chprop);
|
||||
bpos_covered = bpos_max + XFIXNUM (chprop);
|
||||
/* If the `cursor' property covers buffer positions up
|
||||
to and including point, we should display cursor on
|
||||
this glyph. */
|
||||
|
|
@ -16943,7 +16943,7 @@ redisplay_window (Lisp_Object window, bool just_this_one_p)
|
|||
Qnil, Qnil);
|
||||
|
||||
if (FIXNATP (invprop_end))
|
||||
alt_pt = XFASTINT (invprop_end);
|
||||
alt_pt = XFIXNAT (invprop_end);
|
||||
else
|
||||
alt_pt = ZV;
|
||||
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)
|
|||
Qnil, Qnil);
|
||||
|
||||
if (FIXNATP (invis_end))
|
||||
alt_pos = XFASTINT (invis_end);
|
||||
alt_pos = XFIXNAT (invis_end);
|
||||
else
|
||||
alt_pos = ZV;
|
||||
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. */)
|
|||
w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
|
||||
fprintf (stderr, "=============================================\n");
|
||||
dump_glyph_matrix (w->current_matrix,
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 0);
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 0);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -19629,13 +19629,13 @@ GLYPHS > 1 or omitted means dump glyphs in long form. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (row);
|
||||
vpos = XINT (row);
|
||||
vpos = XFIXNUM (row);
|
||||
}
|
||||
matrix = XWINDOW (selected_window)->current_matrix;
|
||||
if (vpos >= 0 && vpos < matrix->nrows)
|
||||
dump_glyph_row (MATRIX_ROW (matrix, vpos),
|
||||
vpos,
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2);
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 2);
|
||||
return Qnil;
|
||||
}
|
||||
|
||||
|
|
@ -19661,11 +19661,11 @@ do nothing. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM (row);
|
||||
vpos = XINT (row);
|
||||
vpos = XFIXNUM (row);
|
||||
}
|
||||
if (vpos >= 0 && vpos < m->nrows)
|
||||
dump_glyph_row (MATRIX_ROW (m, vpos), vpos,
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2);
|
||||
TYPE_RANGED_FIXNUMP (int, glyphs) ? XFIXNUM (glyphs) : 2);
|
||||
#endif
|
||||
return Qnil;
|
||||
}
|
||||
|
|
@ -19681,7 +19681,7 @@ With ARG, turn tracing on if and only if ARG is positive. */)
|
|||
else
|
||||
{
|
||||
arg = Fprefix_numeric_value (arg);
|
||||
trace_redisplay_p = XINT (arg) > 0;
|
||||
trace_redisplay_p = XFIXNUM (arg) > 0;
|
||||
}
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -20147,8 +20147,8 @@ append_space_for_newline (struct it *it, bool default_face_p)
|
|||
it->phys_ascent = it->ascent;
|
||||
it->phys_descent = it->descent;
|
||||
if (!NILP (height)
|
||||
&& XINT (height) > it->ascent + it->descent)
|
||||
it->ascent = XINT (height) - it->descent;
|
||||
&& XFIXNUM (height) > it->ascent + it->descent)
|
||||
it->ascent = XFIXNUM (height) - it->descent;
|
||||
|
||||
if (!NILP (total_height))
|
||||
spacing = calc_line_height_property (it, total_height, font,
|
||||
|
|
@ -20161,7 +20161,7 @@ append_space_for_newline (struct it *it, bool default_face_p)
|
|||
}
|
||||
if (FIXNUMP (spacing))
|
||||
{
|
||||
extra_line_spacing = XINT (spacing);
|
||||
extra_line_spacing = XFIXNUM (spacing);
|
||||
if (!NILP (total_height))
|
||||
extra_line_spacing -= (it->phys_ascent + it->phys_descent);
|
||||
}
|
||||
|
|
@ -21129,7 +21129,7 @@ maybe_produce_line_number (struct it *it)
|
|||
if (!it->lnum_width)
|
||||
{
|
||||
if (FIXNATP (Vdisplay_line_numbers_width))
|
||||
it->lnum_width = XFASTINT (Vdisplay_line_numbers_width);
|
||||
it->lnum_width = XFIXNAT (Vdisplay_line_numbers_width);
|
||||
|
||||
/* Max line number to be displayed cannot be more than the one
|
||||
corresponding to the last row of the desired matrix. */
|
||||
|
|
@ -22186,7 +22186,7 @@ display_line (struct it *it, int cursor_vpos)
|
|||
else
|
||||
{
|
||||
eassert (FIXNUMP (overlay_arrow_string));
|
||||
row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
|
||||
row->overlay_arrow_bitmap = XFIXNUM (overlay_arrow_string);
|
||||
}
|
||||
overlay_arrow_seen = true;
|
||||
}
|
||||
|
|
@ -22449,8 +22449,8 @@ the `bidi-class' property of a character. */)
|
|||
|
||||
set_buffer_temp (buf);
|
||||
validate_region (&from, &to);
|
||||
from_pos = XINT (from);
|
||||
to_pos = XINT (to);
|
||||
from_pos = XFIXNUM (from);
|
||||
to_pos = XFIXNUM (to);
|
||||
if (from_pos >= ZV)
|
||||
return Qnil;
|
||||
|
||||
|
|
@ -22519,7 +22519,7 @@ Value is the new character position of point. */)
|
|||
&& !(GLYPH)->avoid_cursor_p)
|
||||
|
||||
CHECK_FIXNUM (direction);
|
||||
dir = XINT (direction);
|
||||
dir = XFIXNUM (direction);
|
||||
if (dir > 0)
|
||||
dir = 1;
|
||||
else
|
||||
|
|
@ -22990,7 +22990,7 @@ Emacs UBA implementation, in particular with the test suite. */)
|
|||
else
|
||||
{
|
||||
CHECK_FIXNUM_COERCE_MARKER (vpos);
|
||||
nrow = XINT (vpos);
|
||||
nrow = XFIXNUM (vpos);
|
||||
}
|
||||
|
||||
/* 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,
|
|||
}
|
||||
else if (FIXNUMP (car))
|
||||
{
|
||||
register int lim = XINT (car);
|
||||
register int lim = XFIXNUM (car);
|
||||
elt = XCDR (elt);
|
||||
if (lim < 0)
|
||||
{
|
||||
|
|
@ -24032,7 +24032,7 @@ store_mode_line_string (const char *string, Lisp_Object lisp_string,
|
|||
}
|
||||
else
|
||||
{
|
||||
len = XFASTINT (Flength (lisp_string));
|
||||
len = XFIXNAT (Flength (lisp_string));
|
||||
if (precision > 0 && len > precision)
|
||||
{
|
||||
len = precision;
|
||||
|
|
@ -24362,7 +24362,7 @@ decode_mode_spec_coding (Lisp_Object coding_system, char *buf, bool eol_flag)
|
|||
eolvalue = AREF (val, 2);
|
||||
|
||||
*buf++ = multibyte
|
||||
? XFASTINT (CODING_ATTR_MNEMONIC (attrs))
|
||||
? XFIXNAT (CODING_ATTR_MNEMONIC (attrs))
|
||||
: ' ';
|
||||
|
||||
if (eol_flag)
|
||||
|
|
@ -24391,7 +24391,7 @@ decode_mode_spec_coding (Lisp_Object coding_system, char *buf, bool eol_flag)
|
|||
}
|
||||
else if (CHARACTERP (eoltype))
|
||||
{
|
||||
int c = XFASTINT (eoltype);
|
||||
int c = XFIXNAT (eoltype);
|
||||
return buf + CHAR_STRING (c, (unsigned char *) buf);
|
||||
}
|
||||
else
|
||||
|
|
@ -24598,7 +24598,7 @@ decode_mode_spec (struct window *w, register int c, int field_width,
|
|||
|
||||
/* If the buffer is very big, don't waste time. */
|
||||
if (FIXNUMP (Vline_number_display_limit)
|
||||
&& BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit))
|
||||
&& BUF_ZV (b) - BUF_BEGV (b) > XFIXNUM (Vline_number_display_limit))
|
||||
{
|
||||
w->base_line_pos = 0;
|
||||
w->base_line_number = 0;
|
||||
|
|
@ -27191,22 +27191,22 @@ produce_image_glyph (struct it *it)
|
|||
slice.height = img->height;
|
||||
|
||||
if (FIXNUMP (it->slice.x))
|
||||
slice.x = XINT (it->slice.x);
|
||||
slice.x = XFIXNUM (it->slice.x);
|
||||
else if (FLOATP (it->slice.x))
|
||||
slice.x = XFLOAT_DATA (it->slice.x) * img->width;
|
||||
|
||||
if (FIXNUMP (it->slice.y))
|
||||
slice.y = XINT (it->slice.y);
|
||||
slice.y = XFIXNUM (it->slice.y);
|
||||
else if (FLOATP (it->slice.y))
|
||||
slice.y = XFLOAT_DATA (it->slice.y) * img->height;
|
||||
|
||||
if (FIXNUMP (it->slice.width))
|
||||
slice.width = XINT (it->slice.width);
|
||||
slice.width = XFIXNUM (it->slice.width);
|
||||
else if (FLOATP (it->slice.width))
|
||||
slice.width = XFLOAT_DATA (it->slice.width) * img->width;
|
||||
|
||||
if (FIXNUMP (it->slice.height))
|
||||
slice.height = XINT (it->slice.height);
|
||||
slice.height = XFIXNUM (it->slice.height);
|
||||
else if (FLOATP (it->slice.height))
|
||||
slice.height = XFLOAT_DATA (it->slice.height) * img->height;
|
||||
|
||||
|
|
@ -27886,7 +27886,7 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font,
|
|||
if (FLOATP (val))
|
||||
height = (int)(XFLOAT_DATA (val) * height);
|
||||
else if (FIXNUMP (val))
|
||||
height *= XINT (val);
|
||||
height *= XFIXNUM (val);
|
||||
|
||||
return make_fixnum (height);
|
||||
}
|
||||
|
|
@ -28376,8 +28376,8 @@ x_produce_glyphs (struct it *it)
|
|||
it->descent += face->box_line_width;
|
||||
}
|
||||
if (!NILP (height)
|
||||
&& XINT (height) > it->ascent + it->descent)
|
||||
it->ascent = XINT (height) - it->descent;
|
||||
&& XFIXNUM (height) > it->ascent + it->descent)
|
||||
it->ascent = XFIXNUM (height) - it->descent;
|
||||
|
||||
if (!NILP (total_height))
|
||||
spacing = calc_line_height_property (it, total_height, font,
|
||||
|
|
@ -28390,7 +28390,7 @@ x_produce_glyphs (struct it *it)
|
|||
}
|
||||
if (FIXNUMP (spacing))
|
||||
{
|
||||
extra_line_spacing = XINT (spacing);
|
||||
extra_line_spacing = XFIXNUM (spacing);
|
||||
if (!NILP (total_height))
|
||||
extra_line_spacing -= (it->phys_ascent + it->phys_descent);
|
||||
}
|
||||
|
|
@ -29096,7 +29096,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width)
|
|||
&& EQ (XCAR (arg), Qbar)
|
||||
&& RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
|
||||
{
|
||||
*width = XINT (XCDR (arg));
|
||||
*width = XFIXNUM (XCDR (arg));
|
||||
return BAR_CURSOR;
|
||||
}
|
||||
|
||||
|
|
@ -29110,7 +29110,7 @@ get_specified_cursor_type (Lisp_Object arg, int *width)
|
|||
&& EQ (XCAR (arg), Qhbar)
|
||||
&& RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
|
||||
{
|
||||
*width = XINT (XCDR (arg));
|
||||
*width = XFIXNUM (XCDR (arg));
|
||||
return HBAR_CURSOR;
|
||||
}
|
||||
|
||||
|
|
@ -30733,13 +30733,13 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
|
|||
return false;
|
||||
if (!CONSP (XCDR (rect)))
|
||||
return false;
|
||||
if (!(tem = XCAR (XCAR (rect)), FIXNUMP (tem) && x >= XINT (tem)))
|
||||
if (!(tem = XCAR (XCAR (rect)), FIXNUMP (tem) && x >= XFIXNUM (tem)))
|
||||
return false;
|
||||
if (!(tem = XCDR (XCAR (rect)), FIXNUMP (tem) && y >= XINT (tem)))
|
||||
if (!(tem = XCDR (XCAR (rect)), FIXNUMP (tem) && y >= XFIXNUM (tem)))
|
||||
return false;
|
||||
if (!(tem = XCAR (XCDR (rect)), FIXNUMP (tem) && x <= XINT (tem)))
|
||||
if (!(tem = XCAR (XCDR (rect)), FIXNUMP (tem) && x <= XFIXNUM (tem)))
|
||||
return false;
|
||||
if (!(tem = XCDR (XCDR (rect)), FIXNUMP (tem) && y <= XINT (tem)))
|
||||
if (!(tem = XCDR (XCDR (rect)), FIXNUMP (tem) && y <= XFIXNUM (tem)))
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
|
@ -30755,8 +30755,8 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
|
|||
&& (ly0 = XCDR (XCAR (circ)), FIXNUMP (ly0)))
|
||||
{
|
||||
double r = XFLOATINT (lr);
|
||||
double dx = XINT (lx0) - x;
|
||||
double dy = XINT (ly0) - y;
|
||||
double dx = XFIXNUM (lx0) - x;
|
||||
double dy = XFIXNUM (ly0) - y;
|
||||
return (dx * dx + dy * dy <= r * r);
|
||||
}
|
||||
}
|
||||
|
|
@ -30784,14 +30784,14 @@ on_hot_spot_p (Lisp_Object hot_spot, int x, int y)
|
|||
if ((lx = poly[n-2], !FIXNUMP (lx))
|
||||
|| (ly = poly[n-1], !FIXNUMP (lx)))
|
||||
return false;
|
||||
x0 = XINT (lx), y0 = XINT (ly);
|
||||
x0 = XFIXNUM (lx), y0 = XFIXNUM (ly);
|
||||
for (i = 0; i < n; i += 2)
|
||||
{
|
||||
int x1 = x0, y1 = y0;
|
||||
if ((lx = poly[i], !FIXNUMP (lx))
|
||||
|| (ly = poly[i+1], !FIXNUMP (ly)))
|
||||
return false;
|
||||
x0 = XINT (lx), y0 = XINT (ly);
|
||||
x0 = XFIXNUM (lx), y0 = XFIXNUM (ly);
|
||||
|
||||
/* Does this segment cross the X line? */
|
||||
if (x0 >= x)
|
||||
|
|
@ -30847,8 +30847,8 @@ Returns the alist element for the first matching AREA in MAP. */)
|
|||
CHECK_FIXNUM (y);
|
||||
|
||||
return find_hot_spot (map,
|
||||
clip_to_bounds (INT_MIN, XINT (x), INT_MAX),
|
||||
clip_to_bounds (INT_MIN, XINT (y), INT_MAX));
|
||||
clip_to_bounds (INT_MIN, XFIXNUM (x), INT_MAX),
|
||||
clip_to_bounds (INT_MIN, XFIXNUM (y), INT_MAX));
|
||||
}
|
||||
#endif /* HAVE_WINDOW_SYSTEM */
|
||||
|
||||
|
|
@ -31090,13 +31090,13 @@ note_mode_line_or_margin_highlight (Lisp_Object window, int x, int y,
|
|||
if (NILP (b))
|
||||
begpos = 0;
|
||||
else
|
||||
begpos = XINT (b);
|
||||
begpos = XFIXNUM (b);
|
||||
|
||||
e = Fnext_single_property_change (pos, Qmouse_face, string, Qnil);
|
||||
if (NILP (e))
|
||||
endpos = SCHARS (string);
|
||||
else
|
||||
endpos = XINT (e);
|
||||
endpos = XFIXNUM (e);
|
||||
|
||||
/* Calculate the glyph position GPOS of GLYPH in the
|
||||
displayed string, relative to the beginning of the
|
||||
|
|
@ -31573,7 +31573,7 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
if (NILP (e))
|
||||
e = make_fixnum (SCHARS (object));
|
||||
mouse_face_from_string_pos (w, hlinfo, object,
|
||||
XINT (s), XINT (e));
|
||||
XFIXNUM (s), XFIXNUM (e));
|
||||
hlinfo->mouse_face_past_end = false;
|
||||
hlinfo->mouse_face_window = window;
|
||||
hlinfo->mouse_face_face_id
|
||||
|
|
@ -31658,10 +31658,10 @@ note_mouse_highlight (struct frame *f, int x, int y)
|
|||
mouse_face_from_buffer_pos (window, hlinfo, pos,
|
||||
NILP (before)
|
||||
? 1
|
||||
: XFASTINT (before),
|
||||
: XFIXNAT (before),
|
||||
NILP (after)
|
||||
? BUF_Z (XBUFFER (buffer))
|
||||
: XFASTINT (after),
|
||||
: XFIXNAT (after),
|
||||
before_string, after_string,
|
||||
disp_string);
|
||||
cursor = No_Cursor;
|
||||
|
|
@ -33316,8 +33316,8 @@ start_hourglass (void)
|
|||
cancel_hourglass ();
|
||||
|
||||
if (FIXNUMP (Vhourglass_delay)
|
||||
&& XINT (Vhourglass_delay) > 0)
|
||||
delay = make_timespec (min (XINT (Vhourglass_delay),
|
||||
&& XFIXNUM (Vhourglass_delay) > 0)
|
||||
delay = make_timespec (min (XFIXNUM (Vhourglass_delay),
|
||||
TYPE_MAXIMUM (time_t)),
|
||||
0);
|
||||
else if (FLOATP (Vhourglass_delay)
|
||||
|
|
|
|||
60
src/xfaces.c
60
src/xfaces.c
|
|
@ -739,8 +739,8 @@ the pixmap. Bits are stored row by row, each row occupies
|
|||
&& RANGED_FIXNUMP (1, width, INT_MAX)
|
||||
&& RANGED_FIXNUMP (1, height, INT_MAX))
|
||||
{
|
||||
int bytes_per_row = (XINT (width) + CHAR_BIT - 1) / CHAR_BIT;
|
||||
if (XINT (height) <= SBYTES (data) / bytes_per_row)
|
||||
int bytes_per_row = (XFIXNUM (width) + CHAR_BIT - 1) / CHAR_BIT;
|
||||
if (XFIXNUM (height) <= SBYTES (data) / bytes_per_row)
|
||||
pixmap_p = true;
|
||||
}
|
||||
}
|
||||
|
|
@ -773,8 +773,8 @@ load_pixmap (struct frame *f, Lisp_Object name)
|
|||
int h, w;
|
||||
Lisp_Object bits;
|
||||
|
||||
w = XINT (Fcar (name));
|
||||
h = XINT (Fcar (Fcdr (name)));
|
||||
w = XFIXNUM (Fcar (name));
|
||||
h = XFIXNUM (Fcar (Fcdr (name)));
|
||||
bits = Fcar (Fcdr (Fcdr (name)));
|
||||
|
||||
bitmap_id = x_create_bitmap_from_data (f, SSDATA (bits),
|
||||
|
|
@ -820,7 +820,7 @@ parse_rgb_list (Lisp_Object rgb_list, XColor *color)
|
|||
#define PARSE_RGB_LIST_FIELD(field) \
|
||||
if (CONSP (rgb_list) && FIXNUMP (XCAR (rgb_list))) \
|
||||
{ \
|
||||
color->field = XINT (XCAR (rgb_list)); \
|
||||
color->field = XFIXNUM (XCAR (rgb_list)); \
|
||||
rgb_list = XCDR (rgb_list); \
|
||||
} \
|
||||
else \
|
||||
|
|
@ -858,7 +858,7 @@ tty_lookup_color (struct frame *f, Lisp_Object color, XColor *tty_color,
|
|||
if (! FIXNUMP (XCAR (XCDR (color_desc))))
|
||||
return false;
|
||||
|
||||
tty_color->pixel = XINT (XCAR (XCDR (color_desc)));
|
||||
tty_color->pixel = XFIXNUM (XCAR (XCDR (color_desc)));
|
||||
|
||||
rgb = XCDR (XCDR (color_desc));
|
||||
if (! parse_rgb_list (rgb, tty_color))
|
||||
|
|
@ -1391,8 +1391,8 @@ compare_fonts_by_sort_order (const void *v1, const void *v2)
|
|||
else
|
||||
{
|
||||
if (FIXNUMP (val1))
|
||||
result = (FIXNUMP (val2) && XINT (val1) >= XINT (val2)
|
||||
? XINT (val1) > XINT (val2)
|
||||
result = (FIXNUMP (val2) && XFIXNUM (val1) >= XFIXNUM (val2)
|
||||
? XFIXNUM (val1) > XFIXNUM (val2)
|
||||
: -1);
|
||||
else
|
||||
result = FIXNUMP (val2) ? 1 : 0;
|
||||
|
|
@ -1457,7 +1457,7 @@ the face font sort order. */)
|
|||
font_props_for_sorting[i++] = FONT_ADSTYLE_INDEX;
|
||||
font_props_for_sorting[i++] = FONT_REGISTRY_INDEX;
|
||||
|
||||
ndrivers = XINT (Flength (list));
|
||||
ndrivers = XFIXNUM (Flength (list));
|
||||
SAFE_ALLOCA_LISP (drivers, ndrivers);
|
||||
for (i = 0; i < ndrivers; i++, list = XCDR (list))
|
||||
drivers[i] = XCAR (list);
|
||||
|
|
@ -1477,7 +1477,7 @@ the face font sort order. */)
|
|||
|
||||
ASET (v, 0, AREF (font, FONT_FAMILY_INDEX));
|
||||
ASET (v, 1, FONT_WIDTH_SYMBOLIC (font));
|
||||
point = PIXEL_TO_POINT (XINT (AREF (font, FONT_SIZE_INDEX)) * 10,
|
||||
point = PIXEL_TO_POINT (XFIXNUM (AREF (font, FONT_SIZE_INDEX)) * 10,
|
||||
FRAME_RES_Y (f));
|
||||
ASET (v, 2, make_fixnum (point));
|
||||
ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font));
|
||||
|
|
@ -1566,7 +1566,7 @@ the WIDTH times as wide as FACE on FRAME. */)
|
|||
avgwidth = FRAME_FONT (f)->average_width;
|
||||
}
|
||||
if (!NILP (width))
|
||||
avgwidth *= XINT (width);
|
||||
avgwidth *= XFIXNUM (width);
|
||||
}
|
||||
|
||||
Lisp_Object font_spec = font_spec_from_name (pattern);
|
||||
|
|
@ -1585,7 +1585,7 @@ the WIDTH times as wide as FACE on FRAME. */)
|
|||
|
||||
font_entity = XCAR (tail);
|
||||
if ((NILP (AREF (font_entity, FONT_SIZE_INDEX))
|
||||
|| XINT (AREF (font_entity, FONT_SIZE_INDEX)) == 0)
|
||||
|| XFIXNUM (AREF (font_entity, FONT_SIZE_INDEX)) == 0)
|
||||
&& ! NILP (AREF (font_spec, FONT_SIZE_INDEX)))
|
||||
{
|
||||
/* This is a scalable font. For backward compatibility,
|
||||
|
|
@ -2051,7 +2051,7 @@ merge_face_heights (Lisp_Object from, Lisp_Object to, Lisp_Object invalid)
|
|||
{
|
||||
if (FIXNUMP (to))
|
||||
/* relative X absolute => absolute */
|
||||
result = make_fixnum (XFLOAT_DATA (from) * XINT (to));
|
||||
result = make_fixnum (XFLOAT_DATA (from) * XFIXNUM (to));
|
||||
else if (FLOATP (to))
|
||||
/* relative X relative => relative */
|
||||
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
|
|||
|
||||
/* If FRAME is 0, change face on all frames, and change the
|
||||
default for new frames. */
|
||||
if (FIXNUMP (frame) && XINT (frame) == 0)
|
||||
if (FIXNUMP (frame) && XFIXNUM (frame) == 0)
|
||||
{
|
||||
Lisp_Object tail;
|
||||
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
|
|||
if (EQ (face, Qdefault))
|
||||
{
|
||||
/* The default face must have an absolute size. */
|
||||
if (!FIXNUMP (value) || XINT (value) <= 0)
|
||||
if (!FIXNUMP (value) || XFIXNUM (value) <= 0)
|
||||
signal_error ("Default face height not absolute and positive",
|
||||
value);
|
||||
}
|
||||
|
|
@ -2873,7 +2873,7 @@ FRAME 0 means change the face on all frames, and change the default
|
|||
Lisp_Object test = merge_face_heights (value,
|
||||
make_fixnum (10),
|
||||
Qnil);
|
||||
if (!FIXNUMP (test) || XINT (test) <= 0)
|
||||
if (!FIXNUMP (test) || XFIXNUM (test) <= 0)
|
||||
signal_error ("Face height does not produce a positive integer",
|
||||
value);
|
||||
}
|
||||
|
|
@ -3008,7 +3008,7 @@ FRAME 0 means change the face on all frames, and change the default
|
|||
else if (NILP (value))
|
||||
valid_p = true;
|
||||
else if (FIXNUMP (value))
|
||||
valid_p = XINT (value) != 0;
|
||||
valid_p = XFIXNUM (value) != 0;
|
||||
else if (STRINGP (value))
|
||||
valid_p = SCHARS (value) > 0;
|
||||
else if (CONSP (value))
|
||||
|
|
@ -3029,7 +3029,7 @@ FRAME 0 means change the face on all frames, and change the default
|
|||
|
||||
if (EQ (k, QCline_width))
|
||||
{
|
||||
if (!FIXNUMP (v) || XINT (v) == 0)
|
||||
if (!FIXNUMP (v) || XFIXNUM (v) == 0)
|
||||
break;
|
||||
}
|
||||
else if (EQ (k, QCcolor))
|
||||
|
|
@ -3538,7 +3538,7 @@ DEFUN ("internal-set-lisp-face-attribute-from-resource",
|
|||
else if (EQ (attr, QCheight))
|
||||
{
|
||||
value = Fstring_to_number (value, Qnil);
|
||||
if (!FIXNUMP (value) || XINT (value) <= 0)
|
||||
if (!FIXNUMP (value) || XFIXNUM (value) <= 0)
|
||||
signal_error ("Invalid face height from X resource", value);
|
||||
}
|
||||
else if (EQ (attr, QCbold) || EQ (attr, QCitalic))
|
||||
|
|
@ -3928,7 +3928,7 @@ return the font name used for CHARACTER. */)
|
|||
if (FRAME_WINDOW_P (f) && !NILP (character))
|
||||
{
|
||||
CHECK_CHARACTER (character);
|
||||
face_id = FACE_FOR_CHAR (f, fface, XINT (character), -1, Qnil);
|
||||
face_id = FACE_FOR_CHAR (f, fface, XFIXNUM (character), -1, Qnil);
|
||||
fface = FACE_FROM_ID_OR_NULL (f, face_id);
|
||||
}
|
||||
return ((fface && fface->font)
|
||||
|
|
@ -4685,7 +4685,7 @@ smaller_face (struct frame *f, int face_id, int steps)
|
|||
|
||||
face = FACE_FROM_ID (f, face_id);
|
||||
memcpy (attrs, face->lface, sizeof attrs);
|
||||
pt = last_pt = XFASTINT (attrs[LFACE_HEIGHT_INDEX]);
|
||||
pt = last_pt = XFIXNAT (attrs[LFACE_HEIGHT_INDEX]);
|
||||
new_face_id = face_id;
|
||||
last_height = FONT_HEIGHT (face->font);
|
||||
|
||||
|
|
@ -5679,9 +5679,9 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
|
|||
{
|
||||
/* Simple box of specified line width in foreground color of the
|
||||
face. */
|
||||
eassert (XINT (box) != 0);
|
||||
eassert (XFIXNUM (box) != 0);
|
||||
face->box = FACE_SIMPLE_BOX;
|
||||
face->box_line_width = XINT (box);
|
||||
face->box_line_width = XFIXNUM (box);
|
||||
face->box_color = face->foreground;
|
||||
face->box_color_defaulted_p = true;
|
||||
}
|
||||
|
|
@ -5708,8 +5708,8 @@ realize_x_face (struct face_cache *cache, Lisp_Object attrs[LFACE_VECTOR_SIZE])
|
|||
|
||||
if (EQ (keyword, QCline_width))
|
||||
{
|
||||
if (FIXNUMP (value) && XINT (value) != 0)
|
||||
face->box_line_width = XINT (value);
|
||||
if (FIXNUMP (value) && XFIXNUM (value) != 0)
|
||||
face->box_line_width = XFIXNUM (value);
|
||||
}
|
||||
else if (EQ (keyword, QCcolor))
|
||||
{
|
||||
|
|
@ -5875,7 +5875,7 @@ map_tty_color (struct frame *f, struct face *face,
|
|||
{
|
||||
/* Associations in tty-defined-color-alist are of the form
|
||||
(NAME INDEX R G B). We need the INDEX part. */
|
||||
pixel = XINT (XCAR (XCDR (def)));
|
||||
pixel = XFIXNUM (XCAR (XCDR (def)));
|
||||
}
|
||||
|
||||
if (pixel == default_pixel && STRINGP (color))
|
||||
|
|
@ -6075,7 +6075,7 @@ face_at_buffer_position (struct window *w, ptrdiff_t pos,
|
|||
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
|
||||
end = Fnext_single_property_change (position, propname, w->contents, limit1);
|
||||
if (FIXNUMP (end))
|
||||
endpos = XINT (end);
|
||||
endpos = XFIXNUM (end);
|
||||
|
||||
/* Look at properties from overlays. */
|
||||
USE_SAFE_ALLOCA;
|
||||
|
|
@ -6204,7 +6204,7 @@ face_for_overlay_string (struct window *w, ptrdiff_t pos,
|
|||
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
|
||||
end = Fnext_single_property_change (position, propname, w->contents, limit1);
|
||||
if (FIXNUMP (end))
|
||||
endpos = XINT (end);
|
||||
endpos = XFIXNUM (end);
|
||||
|
||||
*endptr = endpos;
|
||||
|
||||
|
|
@ -6277,7 +6277,7 @@ face_at_string_position (struct window *w, Lisp_Object string,
|
|||
XSETFASTINT (limit, SCHARS (string));
|
||||
end = Fnext_single_property_change (position, prop_name, string, limit);
|
||||
if (FIXNUMP (end))
|
||||
*endptr = XFASTINT (end);
|
||||
*endptr = XFIXNAT (end);
|
||||
else
|
||||
*endptr = -1;
|
||||
|
||||
|
|
@ -6477,7 +6477,7 @@ DEFUN ("dump-face", Fdump_face, Sdump_face, 0, 1, 0, doc: /* */)
|
|||
{
|
||||
struct face *face;
|
||||
CHECK_FIXNUM (n);
|
||||
face = FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), XINT (n));
|
||||
face = FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), XFIXNUM (n));
|
||||
if (face == NULL)
|
||||
error ("Not a valid face");
|
||||
dump_realized_face (face);
|
||||
|
|
|
|||
68
src/xfns.c
68
src/xfns.c
|
|
@ -1233,7 +1233,7 @@ x_set_mouse_color (struct frame *f, Lisp_Object arg, Lisp_Object oldval)
|
|||
if (!NILP (shape_var))
|
||||
{
|
||||
CHECK_TYPE_RANGED_INTEGER (unsigned, shape_var);
|
||||
cursor_data.cursor_num[i] = XINT (shape_var);
|
||||
cursor_data.cursor_num[i] = XFIXNUM (shape_var);
|
||||
}
|
||||
else
|
||||
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)
|
|||
return;
|
||||
|
||||
if (TYPE_RANGED_FIXNUMP (int, value))
|
||||
nlines = XINT (value);
|
||||
nlines = XFIXNUM (value);
|
||||
else
|
||||
nlines = 0;
|
||||
|
||||
|
|
@ -1619,7 +1619,7 @@ x_set_tool_bar_lines (struct frame *f, Lisp_Object value, Lisp_Object oldval)
|
|||
|
||||
/* Use VALUE only if an int >= 0. */
|
||||
if (RANGED_FIXNUMP (0, value, INT_MAX))
|
||||
nlines = XFASTINT (value);
|
||||
nlines = XFIXNAT (value);
|
||||
else
|
||||
nlines = 0;
|
||||
|
||||
|
|
@ -1716,7 +1716,7 @@ x_set_internal_border_width (struct frame *f, Lisp_Object arg, Lisp_Object oldva
|
|||
int border;
|
||||
|
||||
CHECK_TYPE_RANGED_INTEGER (int, arg);
|
||||
border = max (XINT (arg), 0);
|
||||
border = max (XFIXNUM (arg), 0);
|
||||
|
||||
if (border != FRAME_INTERNAL_BORDER_WIDTH (f))
|
||||
{
|
||||
|
|
@ -3292,7 +3292,7 @@ x_icon (struct frame *f, Lisp_Object parms)
|
|||
block_input ();
|
||||
|
||||
if (! EQ (icon_x, Qunbound))
|
||||
x_wm_set_icon_position (f, XINT (icon_x), XINT (icon_y));
|
||||
x_wm_set_icon_position (f, XFIXNUM (icon_x), XFIXNUM (icon_y));
|
||||
|
||||
#if false /* x_get_arg removes the visibility parameter as a side effect,
|
||||
but x_create_frame still needs it. */
|
||||
|
|
@ -3725,7 +3725,7 @@ This function is an internal primitive--use `make-frame' instead. */)
|
|||
/* Specify the parent under which to make this X window. */
|
||||
if (!NILP (parent))
|
||||
{
|
||||
f->output_data.x->parent_desc = (Window) XFASTINT (parent);
|
||||
f->output_data.x->parent_desc = (Window) XFIXNAT (parent);
|
||||
f->output_data.x->explicit_parent = true;
|
||||
}
|
||||
else
|
||||
|
|
@ -5099,8 +5099,8 @@ frame_geometry (Lisp_Object frame, Lisp_Object attribute)
|
|||
edges = Fx_frame_edges (parent, Qnative_edges);
|
||||
if (!NILP (edges))
|
||||
{
|
||||
x_native += XINT (Fnth (make_fixnum (0), edges));
|
||||
y_native += XINT (Fnth (make_fixnum (1), edges));
|
||||
x_native += XFIXNUM (Fnth (make_fixnum (0), edges));
|
||||
y_native += XFIXNUM (Fnth (make_fixnum (1), edges));
|
||||
}
|
||||
|
||||
outer_left = x_native;
|
||||
|
|
@ -5476,7 +5476,7 @@ The coordinates X and Y are interpreted in pixels relative to a position
|
|||
|
||||
block_input ();
|
||||
XWarpPointer (FRAME_X_DISPLAY (f), None, DefaultRootWindow (FRAME_X_DISPLAY (f)),
|
||||
0, 0, 0, 0, XINT (x), XINT (y));
|
||||
0, 0, 0, 0, XFIXNUM (x), XFIXNUM (y));
|
||||
unblock_input ();
|
||||
|
||||
return Qnil;
|
||||
|
|
@ -5776,10 +5776,10 @@ FRAME. Default is to change on the edit X window. */)
|
|||
{
|
||||
CHECK_FIXNUM (format);
|
||||
|
||||
if (XINT (format) != 8 && XINT (format) != 16
|
||||
&& XINT (format) != 32)
|
||||
if (XFIXNUM (format) != 8 && XFIXNUM (format) != 16
|
||||
&& XFIXNUM (format) != 32)
|
||||
error ("FORMAT must be one of 8, 16 or 32");
|
||||
element_format = XINT (format);
|
||||
element_format = XFIXNUM (format);
|
||||
}
|
||||
|
||||
if (CONSP (value))
|
||||
|
|
@ -6484,10 +6484,10 @@ compute_tip_xy (struct frame *f,
|
|||
geometry = Fassq (Qgeometry, monitor);
|
||||
if (CONSP (geometry))
|
||||
{
|
||||
min_x = XINT (Fnth (make_fixnum (1), geometry));
|
||||
min_y = XINT (Fnth (make_fixnum (2), geometry));
|
||||
max_x = min_x + XINT (Fnth (make_fixnum (3), geometry));
|
||||
max_y = min_y + XINT (Fnth (make_fixnum (4), geometry));
|
||||
min_x = XFIXNUM (Fnth (make_fixnum (1), geometry));
|
||||
min_y = XFIXNUM (Fnth (make_fixnum (2), geometry));
|
||||
max_x = min_x + XFIXNUM (Fnth (make_fixnum (3), geometry));
|
||||
max_y = min_y + XFIXNUM (Fnth (make_fixnum (4), geometry));
|
||||
if (min_x <= *root_x && *root_x < max_x
|
||||
&& min_y <= *root_y && *root_y < max_y)
|
||||
{
|
||||
|
|
@ -6511,33 +6511,33 @@ compute_tip_xy (struct frame *f,
|
|||
}
|
||||
|
||||
if (FIXNUMP (top))
|
||||
*root_y = XINT (top);
|
||||
*root_y = XFIXNUM (top);
|
||||
else if (FIXNUMP (bottom))
|
||||
*root_y = XINT (bottom) - height;
|
||||
else if (*root_y + XINT (dy) <= min_y)
|
||||
*root_y = XFIXNUM (bottom) - height;
|
||||
else if (*root_y + XFIXNUM (dy) <= min_y)
|
||||
*root_y = min_y; /* Can happen for negative dy */
|
||||
else if (*root_y + XINT (dy) + height <= max_y)
|
||||
else if (*root_y + XFIXNUM (dy) + height <= max_y)
|
||||
/* It fits below the pointer */
|
||||
*root_y += XINT (dy);
|
||||
else if (height + XINT (dy) + min_y <= *root_y)
|
||||
*root_y += XFIXNUM (dy);
|
||||
else if (height + XFIXNUM (dy) + min_y <= *root_y)
|
||||
/* It fits above the pointer. */
|
||||
*root_y -= height + XINT (dy);
|
||||
*root_y -= height + XFIXNUM (dy);
|
||||
else
|
||||
/* Put it on the top. */
|
||||
*root_y = min_y;
|
||||
|
||||
if (FIXNUMP (left))
|
||||
*root_x = XINT (left);
|
||||
*root_x = XFIXNUM (left);
|
||||
else if (FIXNUMP (right))
|
||||
*root_x = XINT (right) - width;
|
||||
else if (*root_x + XINT (dx) <= min_x)
|
||||
*root_x = XFIXNUM (right) - width;
|
||||
else if (*root_x + XFIXNUM (dx) <= min_x)
|
||||
*root_x = 0; /* Can happen for negative dx */
|
||||
else if (*root_x + XINT (dx) + width <= max_x)
|
||||
else if (*root_x + XFIXNUM (dx) + width <= max_x)
|
||||
/* It fits to the right of the pointer. */
|
||||
*root_x += XINT (dx);
|
||||
else if (width + XINT (dx) + min_x <= *root_x)
|
||||
*root_x += XFIXNUM (dx);
|
||||
else if (width + XFIXNUM (dx) + min_x <= *root_x)
|
||||
/* It fits to the left of the pointer. */
|
||||
*root_x -= width + XINT (dx);
|
||||
*root_x -= width + XFIXNUM (dx);
|
||||
else
|
||||
/* Put it left justified on the screen -- it ought to fit that way. */
|
||||
*root_x = min_x;
|
||||
|
|
@ -6925,8 +6925,8 @@ Text larger than the specified size is clipped. */)
|
|||
&& RANGED_FIXNUMP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
|
||||
&& RANGED_FIXNUMP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
|
||||
{
|
||||
w->total_cols = XFASTINT (XCAR (Vx_max_tooltip_size));
|
||||
w->total_lines = XFASTINT (XCDR (Vx_max_tooltip_size));
|
||||
w->total_cols = XFIXNAT (XCAR (Vx_max_tooltip_size));
|
||||
w->total_lines = XFIXNAT (XCDR (Vx_max_tooltip_size));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -6958,8 +6958,8 @@ Text larger than the specified size is clipped. */)
|
|||
size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
|
||||
make_fixnum (w->pixel_height), Qnil);
|
||||
/* Add the frame's internal border to calculated size. */
|
||||
width = XINT (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
height = XINT (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
width = XFIXNUM (Fcar (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
height = XFIXNUM (Fcdr (size)) + 2 * FRAME_INTERNAL_BORDER_WIDTH (tip_f);
|
||||
|
||||
/* Calculate position of tooltip frame. */
|
||||
compute_tip_xy (tip_f, parms, dx, dy, width, height, &root_x, &root_y);
|
||||
|
|
|
|||
16
src/xfont.c
16
src/xfont.c
|
|
@ -190,7 +190,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
|
|||
{
|
||||
for (; CONSP (chars); chars = XCDR (chars))
|
||||
{
|
||||
int c = XINT (XCAR (chars));
|
||||
int c = XFIXNUM (XCAR (chars));
|
||||
unsigned code = ENCODE_CHAR (charset, c);
|
||||
XChar2b char2b;
|
||||
|
||||
|
|
@ -213,7 +213,7 @@ xfont_chars_supported (Lisp_Object chars, XFontStruct *xfont,
|
|||
|
||||
for (i = ASIZE (chars) - 1; i >= 0; i--)
|
||||
{
|
||||
int c = XINT (AREF (chars, i));
|
||||
int c = XFIXNUM (AREF (chars, i));
|
||||
unsigned code = ENCODE_CHAR (charset, c);
|
||||
XChar2b char2b;
|
||||
|
||||
|
|
@ -378,8 +378,8 @@ xfont_list_pattern (Display *display, const char *pattern,
|
|||
/* Avoid auto-scaled fonts. */
|
||||
if (FIXNUMP (AREF (entity, FONT_DPI_INDEX))
|
||||
&& FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
|
||||
&& XINT (AREF (entity, FONT_DPI_INDEX)) != 0
|
||||
&& XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0)
|
||||
&& XFIXNUM (AREF (entity, FONT_DPI_INDEX)) != 0
|
||||
&& XFIXNUM (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0)
|
||||
continue;
|
||||
/* Avoid not-allowed scalable fonts. */
|
||||
if (NILP (Vscalable_fonts_allowed))
|
||||
|
|
@ -387,7 +387,7 @@ xfont_list_pattern (Display *display, const char *pattern,
|
|||
int size = 0;
|
||||
|
||||
if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX)))
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
else if (FLOATP (AREF (entity, FONT_SIZE_INDEX)))
|
||||
size = XFLOAT_DATA (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (size == 0 && i_pass == 0)
|
||||
|
|
@ -672,8 +672,8 @@ xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
if (XINT (AREF (entity, FONT_SIZE_INDEX)) != 0)
|
||||
pixel_size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) != 0)
|
||||
pixel_size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
else if (pixel_size == 0)
|
||||
{
|
||||
if (FRAME_FONT (f))
|
||||
|
|
@ -812,7 +812,7 @@ xfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
|
||||
val = Ffont_get (font_object, QCavgwidth);
|
||||
if (FIXNUMP (val))
|
||||
font->average_width = XINT (val) / 10;
|
||||
font->average_width = XFIXNUM (val) / 10;
|
||||
if (font->average_width < 0)
|
||||
font->average_width = - font->average_width;
|
||||
else
|
||||
|
|
|
|||
|
|
@ -220,7 +220,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
|
|||
else if (EQ (key, QChintstyle))
|
||||
{
|
||||
if (FIXNUMP (val))
|
||||
FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val));
|
||||
FcPatternAddInteger (pat, FC_HINT_STYLE, XFIXNUM (val));
|
||||
else if (SYMBOLP (val)
|
||||
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
|
||||
FcPatternAddInteger (pat, FC_HINT_STYLE, ival);
|
||||
|
|
@ -228,7 +228,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
|
|||
else if (EQ (key, QCrgba))
|
||||
{
|
||||
if (FIXNUMP (val))
|
||||
FcPatternAddInteger (pat, FC_RGBA, XINT (val));
|
||||
FcPatternAddInteger (pat, FC_RGBA, XFIXNUM (val));
|
||||
else if (SYMBOLP (val)
|
||||
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
|
||||
FcPatternAddInteger (pat, FC_RGBA, ival);
|
||||
|
|
@ -236,7 +236,7 @@ xftfont_add_rendering_parameters (FcPattern *pat, Lisp_Object entity)
|
|||
else if (EQ (key, QClcdfilter))
|
||||
{
|
||||
if (FIXNUMP (val))
|
||||
FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val));
|
||||
FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XFIXNUM (val));
|
||||
else if (SYMBOLP (val)
|
||||
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
|
||||
FcPatternAddInteger (pat, FC_LCD_FILTER, ival);
|
||||
|
|
@ -271,7 +271,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
val = XCDR (val);
|
||||
filename = XCAR (val);
|
||||
idx = XCDR (val);
|
||||
size = XINT (AREF (entity, FONT_SIZE_INDEX));
|
||||
size = XFIXNUM (AREF (entity, FONT_SIZE_INDEX));
|
||||
if (size == 0)
|
||||
size = pixel_size;
|
||||
pat = FcPatternCreate ();
|
||||
|
|
@ -289,16 +289,16 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
FcPatternAddString (pat, FC_FOUNDRY, (FcChar8 *) SDATA (SYMBOL_NAME (val)));
|
||||
val = AREF (entity, FONT_SPACING_INDEX);
|
||||
if (! NILP (val))
|
||||
FcPatternAddInteger (pat, FC_SPACING, XINT (val));
|
||||
FcPatternAddInteger (pat, FC_SPACING, XFIXNUM (val));
|
||||
val = AREF (entity, FONT_DPI_INDEX);
|
||||
if (! NILP (val))
|
||||
{
|
||||
double dbl = XINT (val);
|
||||
double dbl = XFIXNUM (val);
|
||||
|
||||
FcPatternAddDouble (pat, FC_DPI, dbl);
|
||||
}
|
||||
val = AREF (entity, FONT_AVGWIDTH_INDEX);
|
||||
if (FIXNUMP (val) && XINT (val) == 0)
|
||||
if (FIXNUMP (val) && XFIXNUM (val) == 0)
|
||||
FcPatternAddBool (pat, FC_SCALABLE, FcTrue);
|
||||
/* This is necessary to identify the exact font (e.g. 10x20.pcf.gz
|
||||
over 10x20-ISO8859-1.pcf.gz). */
|
||||
|
|
@ -307,7 +307,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
xftfont_add_rendering_parameters (pat, entity);
|
||||
|
||||
FcPatternAddString (pat, FC_FILE, (FcChar8 *) SDATA (filename));
|
||||
FcPatternAddInteger (pat, FC_INDEX, XINT (idx));
|
||||
FcPatternAddInteger (pat, FC_INDEX, XFIXNUM (idx));
|
||||
|
||||
|
||||
block_input ();
|
||||
|
|
@ -353,7 +353,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
xftfont_info->matrix.yx = 0x10000L * matrix->yx;
|
||||
}
|
||||
if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
|
||||
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
|
||||
spacing = XFIXNUM (AREF (entity, FONT_SPACING_INDEX));
|
||||
else
|
||||
spacing = FC_PROPORTIONAL;
|
||||
if (! ascii_printable[0])
|
||||
|
|
@ -412,7 +412,7 @@ xftfont_open (struct frame *f, Lisp_Object entity, int pixel_size)
|
|||
}
|
||||
font->height = font->ascent + font->descent;
|
||||
|
||||
if (XINT (AREF (entity, FONT_SIZE_INDEX)) == 0)
|
||||
if (XFIXNUM (AREF (entity, FONT_SIZE_INDEX)) == 0)
|
||||
{
|
||||
int upEM = ft_face->units_per_EM;
|
||||
|
||||
|
|
|
|||
|
|
@ -1180,10 +1180,10 @@ menu_position_func (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, gpointer
|
|||
{
|
||||
int min_x, min_y;
|
||||
|
||||
min_x = XINT (XCAR (workarea));
|
||||
min_y = XINT (Fnth (make_fixnum (1), workarea));
|
||||
max_x = min_x + XINT (Fnth (make_fixnum (2), workarea));
|
||||
max_y = min_y + XINT (Fnth (make_fixnum (3), workarea));
|
||||
min_x = XFIXNUM (XCAR (workarea));
|
||||
min_y = XFIXNUM (Fnth (make_fixnum (1), workarea));
|
||||
max_x = min_x + XFIXNUM (Fnth (make_fixnum (2), workarea));
|
||||
max_y = min_y + XFIXNUM (Fnth (make_fixnum (3), workarea));
|
||||
}
|
||||
|
||||
if (max_x < 0 || max_y < 0)
|
||||
|
|
|
|||
|
|
@ -187,8 +187,8 @@ parse_region (Lisp_Object start, Lisp_Object end, Lisp_Object base_url,
|
|||
|
||||
validate_region (&start, &end);
|
||||
|
||||
istart = XINT (start);
|
||||
iend = XINT (end);
|
||||
istart = XFIXNUM (start);
|
||||
iend = XFIXNUM (end);
|
||||
istart_byte = CHAR_TO_BYTE (istart);
|
||||
iend_byte = CHAR_TO_BYTE (iend);
|
||||
|
||||
|
|
|
|||
|
|
@ -474,13 +474,13 @@ x_load_resources (Display *display, const char *xrm_string,
|
|||
|
||||
/* Set double click time of list boxes in the file selection
|
||||
dialog from `double-click-time'. */
|
||||
if (FIXNUMP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0)
|
||||
if (FIXNUMP (Vdouble_click_time) && XFIXNUM (Vdouble_click_time) > 0)
|
||||
{
|
||||
sprintf (line, "%s*fsb*DirList.doubleClickInterval: %"pI"d",
|
||||
myclass, XFASTINT (Vdouble_click_time));
|
||||
myclass, XFIXNAT (Vdouble_click_time));
|
||||
XrmPutLineResource (&rdb, line);
|
||||
sprintf (line, "%s*fsb*ItemsList.doubleClickInterval: %"pI"d",
|
||||
myclass, XFASTINT (Vdouble_click_time));
|
||||
myclass, XFIXNAT (Vdouble_click_time));
|
||||
XrmPutLineResource (&rdb, line);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1693,7 +1693,7 @@ static unsigned long
|
|||
cons_to_x_long (Lisp_Object obj)
|
||||
{
|
||||
if (X_ULONG_MAX <= INTMAX_MAX
|
||||
|| XINT (FIXNUMP (obj) ? obj : XCAR (obj)) < 0)
|
||||
|| XFIXNUM (FIXNUMP (obj) ? obj : XCAR (obj)) < 0)
|
||||
return cons_to_signed (obj, X_LONG_MIN, min (X_ULONG_MAX, INTMAX_MAX));
|
||||
else
|
||||
return cons_to_unsigned (obj, X_ULONG_MAX);
|
||||
|
|
@ -1756,7 +1756,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo,
|
|||
cs->format = 16;
|
||||
cs->size = 1;
|
||||
cs->data[sizeof (short)] = 0;
|
||||
*short_ptr = XINT (obj);
|
||||
*short_ptr = XFIXNUM (obj);
|
||||
if (NILP (type)) type = QINTEGER;
|
||||
}
|
||||
else if (FIXNUMP (obj)
|
||||
|
|
@ -1832,7 +1832,7 @@ lisp_data_to_selection_data (struct x_display_info *dpyinfo,
|
|||
if (format == 32)
|
||||
x_atoms[i] = cons_to_x_long (AREF (obj, i));
|
||||
else
|
||||
shorts[i] = XINT (AREF (obj, i));
|
||||
shorts[i] = XFIXNUM (AREF (obj, i));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1856,10 +1856,10 @@ clean_local_selection_data (Lisp_Object obj)
|
|||
&& FIXNUMP (XCAR (obj))
|
||||
&& FIXNUMP (XCDR (obj)))
|
||||
{
|
||||
if (XINT (XCAR (obj)) == 0)
|
||||
if (XFIXNUM (XCAR (obj)) == 0)
|
||||
return XCDR (obj);
|
||||
if (XINT (XCAR (obj)) == -1)
|
||||
return make_fixnum (- XINT (XCDR (obj)));
|
||||
if (XFIXNUM (XCAR (obj)) == -1)
|
||||
return make_fixnum (- XFIXNUM (XCDR (obj)));
|
||||
}
|
||||
if (VECTORP (obj))
|
||||
{
|
||||
|
|
@ -2313,8 +2313,8 @@ x_fill_property_data (Display *dpy, Lisp_Object data, void *ret, int format)
|
|||
For XDnd, v2 might be y of a window, and can be negative.
|
||||
The XDnd spec. is not explicit about negative values,
|
||||
but let's assume negative v2 is sent modulo 2**16. */
|
||||
unsigned long v1 = XINT (XCAR (o)) & 0xffff;
|
||||
unsigned long v2 = XINT (XCDR (o)) & 0xffff;
|
||||
unsigned long v1 = XFIXNUM (XCAR (o)) & 0xffff;
|
||||
unsigned long v2 = XFIXNUM (XCDR (o)) & 0xffff;
|
||||
val = (v1 << 16) | v2;
|
||||
}
|
||||
else
|
||||
|
|
@ -2560,11 +2560,11 @@ x_send_client_event (Lisp_Object display, Lisp_Object dest, Lisp_Object from,
|
|||
if (x_check_property_data (values) == -1)
|
||||
error ("Bad data in VALUES, must be number, cons or string");
|
||||
|
||||
if (XINT (format) != 8 && XINT (format) != 16 && XINT (format) != 32)
|
||||
if (XFIXNUM (format) != 8 && XFIXNUM (format) != 16 && XFIXNUM (format) != 32)
|
||||
error ("FORMAT must be one of 8, 16 or 32");
|
||||
|
||||
event.xclient.type = ClientMessage;
|
||||
event.xclient.format = XINT (format);
|
||||
event.xclient.format = XFIXNUM (format);
|
||||
|
||||
if (FRAMEP (dest) || NILP (dest))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -393,7 +393,7 @@ parse_settings (unsigned char *prop,
|
|||
struct xsettings *settings)
|
||||
{
|
||||
Lisp_Object byteorder = Fbyteorder ();
|
||||
int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst;
|
||||
int my_bo = XFIXNAT (byteorder) == 'B' ? MSBFirst : LSBFirst;
|
||||
int that_bo = prop[0];
|
||||
CARD32 n_settings;
|
||||
int bytes_parsed = 0;
|
||||
|
|
|
|||
42
src/xterm.c
42
src/xterm.c
|
|
@ -918,7 +918,7 @@ x_set_frame_alpha (struct frame *f)
|
|||
if (FLOATP (Vframe_alpha_lower_limit))
|
||||
alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
|
||||
else if (FIXNUMP (Vframe_alpha_lower_limit))
|
||||
alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0;
|
||||
alpha_min = (XFIXNUM (Vframe_alpha_lower_limit)) / 100.0;
|
||||
|
||||
if (alpha < 0.0)
|
||||
return;
|
||||
|
|
@ -3109,11 +3109,11 @@ x_draw_image_relief (struct glyph_string *s)
|
|||
&& FIXNUMP (XCAR (Vtool_bar_button_margin))
|
||||
&& FIXNUMP (XCDR (Vtool_bar_button_margin)))
|
||||
{
|
||||
extra_x = XINT (XCAR (Vtool_bar_button_margin));
|
||||
extra_y = XINT (XCDR (Vtool_bar_button_margin));
|
||||
extra_x = XFIXNUM (XCAR (Vtool_bar_button_margin));
|
||||
extra_y = XFIXNUM (XCDR (Vtool_bar_button_margin));
|
||||
}
|
||||
else if (FIXNUMP (Vtool_bar_button_margin))
|
||||
extra_x = extra_y = XINT (Vtool_bar_button_margin);
|
||||
extra_x = extra_y = XFIXNUM (Vtool_bar_button_margin);
|
||||
}
|
||||
|
||||
top_p = bot_p = left_p = right_p = false;
|
||||
|
|
@ -3705,7 +3705,7 @@ x_draw_glyph_string (struct glyph_string *s)
|
|||
= buffer_local_value (Qunderline_minimum_offset,
|
||||
s->w->contents);
|
||||
if (FIXNUMP (val))
|
||||
minimum_offset = XFASTINT (val);
|
||||
minimum_offset = XFIXNAT (val);
|
||||
else
|
||||
minimum_offset = 1;
|
||||
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)
|
|||
Lisp_Object tem;
|
||||
|
||||
tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_ctrl = XINT (tem) & INT_MAX;
|
||||
if (FIXNUMP (tem)) mod_ctrl = XFIXNUM (tem) & INT_MAX;
|
||||
tem = Fget (Vx_alt_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_alt = XINT (tem) & INT_MAX;
|
||||
if (FIXNUMP (tem)) mod_alt = XFIXNUM (tem) & INT_MAX;
|
||||
tem = Fget (Vx_meta_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_meta = XINT (tem) & INT_MAX;
|
||||
if (FIXNUMP (tem)) mod_meta = XFIXNUM (tem) & INT_MAX;
|
||||
tem = Fget (Vx_hyper_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_hyper = XINT (tem) & INT_MAX;
|
||||
if (FIXNUMP (tem)) mod_hyper = XFIXNUM (tem) & INT_MAX;
|
||||
tem = Fget (Vx_super_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_super = XINT (tem) & INT_MAX;
|
||||
if (FIXNUMP (tem)) mod_super = XFIXNUM (tem) & INT_MAX;
|
||||
|
||||
return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0)
|
||||
| ((state & ControlMask) ? mod_ctrl : 0)
|
||||
|
|
@ -4854,15 +4854,15 @@ x_emacs_to_x_modifiers (struct x_display_info *dpyinfo, EMACS_INT state)
|
|||
Lisp_Object tem;
|
||||
|
||||
tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_ctrl = XINT (tem);
|
||||
if (FIXNUMP (tem)) mod_ctrl = XFIXNUM (tem);
|
||||
tem = Fget (Vx_alt_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_alt = XINT (tem);
|
||||
if (FIXNUMP (tem)) mod_alt = XFIXNUM (tem);
|
||||
tem = Fget (Vx_meta_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_meta = XINT (tem);
|
||||
if (FIXNUMP (tem)) mod_meta = XFIXNUM (tem);
|
||||
tem = Fget (Vx_hyper_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_hyper = XINT (tem);
|
||||
if (FIXNUMP (tem)) mod_hyper = XFIXNUM (tem);
|
||||
tem = Fget (Vx_super_keysym, Qmodifier_value);
|
||||
if (FIXNUMP (tem)) mod_super = XINT (tem);
|
||||
if (FIXNUMP (tem)) mod_super = XFIXNUM (tem);
|
||||
|
||||
|
||||
return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0)
|
||||
|
|
@ -8363,10 +8363,10 @@ handle_one_xevent (struct x_display_info *dpyinfo,
|
|||
Qnil),
|
||||
FIXNATP (c)))
|
||||
{
|
||||
inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
|
||||
inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFIXNAT (c))
|
||||
? ASCII_KEYSTROKE_EVENT
|
||||
: MULTIBYTE_CHAR_KEYSTROKE_EVENT);
|
||||
inev.ie.code = XFASTINT (c);
|
||||
inev.ie.code = XFIXNAT (c);
|
||||
goto done_keysym;
|
||||
}
|
||||
|
||||
|
|
@ -10254,8 +10254,8 @@ x_calc_absolute_position (struct frame *f)
|
|||
XSETFRAME (frame, f);
|
||||
edges = Fx_frame_edges (frame, Qouter_edges);
|
||||
if (!NILP (edges))
|
||||
width = (XINT (Fnth (make_fixnum (2), edges))
|
||||
- XINT (Fnth (make_fixnum (0), edges)));
|
||||
width = (XFIXNUM (Fnth (make_fixnum (2), edges))
|
||||
- XFIXNUM (Fnth (make_fixnum (0), edges)));
|
||||
}
|
||||
|
||||
if (p)
|
||||
|
|
@ -10296,8 +10296,8 @@ x_calc_absolute_position (struct frame *f)
|
|||
if (NILP (edges))
|
||||
edges = Fx_frame_edges (frame, Qouter_edges);
|
||||
if (!NILP (edges))
|
||||
height = (XINT (Fnth (make_fixnum (3), edges))
|
||||
- XINT (Fnth (make_fixnum (1), edges)));
|
||||
height = (XFIXNUM (Fnth (make_fixnum (3), edges))
|
||||
- XFIXNUM (Fnth (make_fixnum (1), edges)));
|
||||
}
|
||||
|
||||
if (p)
|
||||
|
|
|
|||
|
|
@ -87,8 +87,8 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
|
|||
xw->type = type;
|
||||
xw->title = title;
|
||||
xw->buffer = NILP (buffer) ? Fcurrent_buffer () : Fget_buffer_create (buffer);
|
||||
xw->height = XFASTINT (height);
|
||||
xw->width = XFASTINT (width);
|
||||
xw->height = XFIXNAT (height);
|
||||
xw->width = XFIXNAT (width);
|
||||
xw->kill_without_query = false;
|
||||
XSETXWIDGET (val, xw);
|
||||
Vxwidget_list = Fcons (val, Vxwidget_list);
|
||||
|
|
@ -767,8 +767,8 @@ DEFUN ("xwidget-resize", Fxwidget_resize, Sxwidget_resize, 3, 3, 0,
|
|||
CHECK_RANGED_INTEGER (new_width, 0, INT_MAX);
|
||||
CHECK_RANGED_INTEGER (new_height, 0, INT_MAX);
|
||||
struct xwidget *xw = XXWIDGET (xwidget);
|
||||
int w = XFASTINT (new_width);
|
||||
int h = XFASTINT (new_height);
|
||||
int w = XFIXNAT (new_width);
|
||||
int h = XFIXNAT (new_height);
|
||||
|
||||
xw->width = w;
|
||||
xw->height = h;
|
||||
|
|
|
|||
Loading…
Reference in a new issue