int c;
EMACS_INT nbytes;
- CHECK_NATNUM (length);
+ CHECK_FIXNAT (length);
CHECK_CHARACTER (init);
c = XFASTINT (init);
{
Lisp_Object val;
- CHECK_NATNUM (length);
+ CHECK_FIXNAT (length);
val = make_uninit_bool_vector (XFASTINT (length));
return bool_vector_fill (val, init);
}
(Lisp_Object length, Lisp_Object init)
{
Lisp_Object val = Qnil;
- CHECK_NATNUM (length);
+ CHECK_FIXNAT (length);
for (EMACS_INT size = XFASTINT (length); 0 < size; size--)
{
each initialized to INIT. */)
(Lisp_Object type, Lisp_Object slots, Lisp_Object init)
{
- CHECK_NATNUM (slots);
+ CHECK_FIXNAT (slots);
EMACS_INT size = XFASTINT (slots) + 1;
struct Lisp_Vector *p = allocate_record (size);
p->contents[0] = type;
See also the function `vector'. */)
(Lisp_Object length, Lisp_Object init)
{
- CHECK_NATNUM (length);
+ CHECK_FIXNAT (length);
struct Lisp_Vector *p = allocate_vector (XFASTINT (length));
for (ptrdiff_t i = 0; i < XFASTINT (length); i++)
p->contents[i] = init;
/* The things that fit in a string
are characters that are in 0...127,
after discarding the meta bit and all the bits above it. */
- if (!INTEGERP (args[i])
+ if (!FIXNUMP (args[i])
|| (XINT (args[i]) & ~(-CHAR_META)) >= 0200)
return Fvector (nargs, args);
{
Lisp_Object result;
- result = Fmake_string (make_number (nargs), make_number (0), Qnil);
+ result = Fmake_string (make_fixnum (nargs), make_fixnum (0), Qnil);
for (i = 0; i < nargs; i++)
{
SSET (result, i, XINT (args[i]));
VALGRIND_MAKE_MEM_DEFINED (&obj, sizeof (obj));
#endif
- if (INTEGERP (obj))
+ if (FIXNUMP (obj))
return;
void *po = XPNTR (obj);
int
valid_lisp_object_p (Lisp_Object obj)
{
- if (INTEGERP (obj))
+ if (FIXNUMP (obj))
return 1;
void *p = XPNTR (obj);
static Lisp_Object
purecopy (Lisp_Object obj)
{
- if (INTEGERP (obj)
+ if (FIXNUMP (obj)
|| (! SYMBOLP (obj) && PURE_P (XPNTR (obj)))
|| SUBRP (obj))
return obj; /* Already pure. */
{
ptrdiff_t count = SPECPDL_INDEX ();
- specbind (Qgc_cons_threshold, make_number (MOST_POSITIVE_FIXNUM));
+ specbind (Qgc_cons_threshold, make_fixnum (MOST_POSITIVE_FIXNUM));
return count;
}
static Lisp_Object
bounded_number (EMACS_INT number)
{
- return make_number (min (MOST_POSITIVE_FIXNUM, number));
+ return make_fixnum (min (MOST_POSITIVE_FIXNUM, number));
}
/* Calculate total bytes of live objects. */
unbind_to (count, Qnil);
Lisp_Object total[] = {
- list4 (Qconses, make_number (sizeof (struct Lisp_Cons)),
+ list4 (Qconses, make_fixnum (sizeof (struct Lisp_Cons)),
bounded_number (total_conses),
bounded_number (total_free_conses)),
- list4 (Qsymbols, make_number (sizeof (struct Lisp_Symbol)),
+ list4 (Qsymbols, make_fixnum (sizeof (struct Lisp_Symbol)),
bounded_number (total_symbols),
bounded_number (total_free_symbols)),
- list4 (Qmiscs, make_number (sizeof (union Lisp_Misc)),
+ list4 (Qmiscs, make_fixnum (sizeof (union Lisp_Misc)),
bounded_number (total_markers),
bounded_number (total_free_markers)),
- list4 (Qstrings, make_number (sizeof (struct Lisp_String)),
+ list4 (Qstrings, make_fixnum (sizeof (struct Lisp_String)),
bounded_number (total_strings),
bounded_number (total_free_strings)),
- list3 (Qstring_bytes, make_number (1),
+ list3 (Qstring_bytes, make_fixnum (1),
bounded_number (total_string_bytes)),
list3 (Qvectors,
- make_number (header_size + sizeof (Lisp_Object)),
+ make_fixnum (header_size + sizeof (Lisp_Object)),
bounded_number (total_vectors)),
- list4 (Qvector_slots, make_number (word_size),
+ list4 (Qvector_slots, make_fixnum (word_size),
bounded_number (total_vector_slots),
bounded_number (total_free_vector_slots)),
- list4 (Qfloats, make_number (sizeof (struct Lisp_Float)),
+ list4 (Qfloats, make_fixnum (sizeof (struct Lisp_Float)),
bounded_number (total_floats),
bounded_number (total_free_floats)),
- list4 (Qintervals, make_number (sizeof (struct interval)),
+ list4 (Qintervals, make_fixnum (sizeof (struct interval)),
bounded_number (total_intervals),
bounded_number (total_free_intervals)),
- list3 (Qbuffers, make_number (sizeof (struct buffer)),
+ list3 (Qbuffers, make_fixnum (sizeof (struct buffer)),
bounded_number (total_buffers)),
#ifdef DOUG_LEA_MALLOC
- list4 (Qheap, make_number (1024),
+ list4 (Qheap, make_fixnum (1024),
bounded_number ((mallinfo ().uordblks + 1023) >> 10),
bounded_number ((mallinfo ().fordblks + 1023) >> 10)),
#endif
{
Lisp_Object val = ptr->contents[i];
- if (INTEGERP (val) || (SYMBOLP (val) && XSYMBOL (val)->u.s.gcmarkbit))
+ if (FIXNUMP (val) || (SYMBOLP (val) && XSYMBOL (val)->u.s.gcmarkbit))
continue;
if (SUB_CHAR_TABLE_P (val))
{
emacs_abort ();
val = CHAR_TABLE_REF (bidi_mirror_table, c);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
int v;
clone_per_buffer_values (b->base_buffer, b);
bset_filename (b, Qnil);
bset_file_truename (b, Qnil);
- bset_display_count (b, make_number (0));
+ bset_display_count (b, make_fixnum (0));
bset_backed_up (b, Qnil);
bset_auto_save_file_name (b, Qnil);
set_buffer_internal_1 (b);
bset_file_format (b, Qnil);
bset_auto_save_file_format (b, Qt);
bset_last_selected_window (b, Qnil);
- bset_display_count (b, make_number (0));
+ bset_display_count (b, make_fixnum (0));
bset_display_time (b, Qnil);
bset_enable_multibyte_characters
(b, BVAR (&buffer_defaults, enable_multibyte_characters));
char number[sizeof "-999999"];
/* Use XINT instead of XFASTINT to work around GCC bug 80776. */
- int i = XINT (Frandom (make_number (1000000)));
+ int i = XINT (Frandom (make_fixnum (1000000)));
eassume (0 <= i && i < 1000000);
AUTO_STRING_WITH_LEN (lnumber, number, sprintf (number, "-%d", i));
No argument or nil as argument means use current buffer as BUFFER. */)
(register Lisp_Object buffer)
{
- return make_number (BUF_MODIFF (decode_buffer (buffer)));
+ return make_fixnum (BUF_MODIFF (decode_buffer (buffer)));
}
DEFUN ("buffer-chars-modified-tick", Fbuffer_chars_modified_tick,
buffer as BUFFER. */)
(register Lisp_Object buffer)
{
- return make_number (BUF_CHARS_MODIFF (decode_buffer (buffer)));
+ return make_fixnum (BUF_CHARS_MODIFF (decode_buffer (buffer)));
}
\f
DEFUN ("rename-buffer", Frename_buffer, Srename_buffer, 1, 2,
if (NILP (position))
XSETFASTINT (position, PT);
else
- CHECK_NUMBER (position);
+ CHECK_FIXNUM (position);
if (!NILP (BVAR (current_buffer, read_only))
&& NILP (Vinhibit_read_only)
void
validate_region (register Lisp_Object *b, register Lisp_Object *e)
{
- CHECK_NUMBER_COERCE_MARKER (*b);
- CHECK_NUMBER_COERCE_MARKER (*e);
+ CHECK_FIXNUM_COERCE_MARKER (*b);
+ CHECK_FIXNUM_COERCE_MARKER (*e);
if (XINT (*b) > XINT (*e))
{
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->pointm,
- make_number
+ make_fixnum
(BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
XWINDOW (w)->contents);
/* Blindly copied from pointm part. */
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->old_pointm,
- make_number
+ make_fixnum
(BUF_BEGV (XBUFFER (XWINDOW (w)->contents))),
XWINDOW (w)->contents);
if (MARKERP (XWINDOW (w)->start)
&& (EQ (XWINDOW (w)->contents, buf1)
|| EQ (XWINDOW (w)->contents, buf2)))
Fset_marker (XWINDOW (w)->start,
- make_number
+ make_fixnum
(XBUFFER (XWINDOW (w)->contents)->last_window_start),
XWINDOW (w)->contents);
w = Fnext_window (w, Qt, Qt);
}
}
if (narrowed)
- Fnarrow_to_region (make_number (begv), make_number (zv));
+ Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv));
}
else
{
TEMP_SET_PT (pt);
if (narrowed)
- Fnarrow_to_region (make_number (begv), make_number (zv));
+ Fnarrow_to_region (make_fixnum (begv), make_fixnum (zv));
/* Do this first, so that chars_in_text asks the right question.
set_intervals_multibyte needs it too. */
sortvec[j].priority = 0;
sortvec[j].spriority = 0;
}
- else if (INTEGERP (tem))
+ else if (FIXNUMP (tem))
{
sortvec[j].priority = XINT (tem);
sortvec[j].spriority = 0;
{
Lisp_Object car = XCAR (tem);
Lisp_Object cdr = XCDR (tem);
- sortvec[j].priority = INTEGERP (car) ? XINT (car) : 0;
- sortvec[j].spriority = INTEGERP (cdr) ? XINT (cdr) : 0;
+ sortvec[j].priority = FIXNUMP (car) ? XINT (car) : 0;
+ sortvec[j].spriority = FIXNUMP (cdr) ? XINT (cdr) : 0;
}
j++;
}
ssl->buf[ssl->used].string = str;
ssl->buf[ssl->used].string2 = str2;
ssl->buf[ssl->used].size = size;
- ssl->buf[ssl->used].priority = (INTEGERP (pri) ? XINT (pri) : 0);
+ ssl->buf[ssl->used].priority = (FIXNUMP (pri) ? XINT (pri) : 0);
ssl->used++;
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
if (endpos < startpos)
{
startpos = endpos;
- Fset_marker (OVERLAY_START (overlay), make_number (startpos),
+ Fset_marker (OVERLAY_START (overlay), make_fixnum (startpos),
Qnil);
}
if (endpos < startpos)
{
startpos = endpos;
- Fset_marker (OVERLAY_START (overlay), make_number (startpos),
+ Fset_marker (OVERLAY_START (overlay), make_fixnum (startpos),
Qnil);
}
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
- CHECK_NUMBER_COERCE_MARKER (beg);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (beg);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
{
if (MARKERP (end) && !EQ (Fmarker_buffer (end), buffer))
signal_error ("Marker points into wrong buffer", end);
- CHECK_NUMBER_COERCE_MARKER (beg);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (beg);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (beg) > XINT (end))
{
Lisp_Object *overlay_vec;
Lisp_Object result;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
return Qnil;
Lisp_Object *overlay_vec;
Lisp_Object result;
- CHECK_NUMBER_COERCE_MARKER (beg);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (beg);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (!buffer_has_overlays ())
return Qnil;
ptrdiff_t endpos;
Lisp_Object *overlay_vec;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
- return make_number (ZV);
+ return make_fixnum (ZV);
len = 10;
overlay_vec = xmalloc (len * sizeof *overlay_vec);
}
xfree (overlay_vec);
- return make_number (endpos);
+ return make_fixnum (endpos);
}
DEFUN ("previous-overlay-change", Fprevious_overlay_change,
Lisp_Object *overlay_vec;
ptrdiff_t len;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (!buffer_has_overlays ())
- return make_number (BEGV);
+ return make_fixnum (BEGV);
/* At beginning of buffer, we know the answer;
avoid bug subtracting 1 below. */
0, &prevpos, 1);
xfree (overlay_vec);
- return make_number (prevpos);
+ return make_fixnum (prevpos);
}
\f
/* These functions are for debugging overlays. */
(Lisp_Object pos)
{
ptrdiff_t p;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
p = clip_to_bounds (PTRDIFF_MIN, XINT (pos), PTRDIFF_MAX);
recenter_overlay_lists (current_buffer, p);
/* 0 means not a lisp var, -1 means always local, else mask. */
memset (&buffer_local_flags, 0, sizeof buffer_local_flags);
- bset_filename (&buffer_local_flags, make_number (-1));
- bset_directory (&buffer_local_flags, make_number (-1));
- bset_backed_up (&buffer_local_flags, make_number (-1));
- bset_save_length (&buffer_local_flags, make_number (-1));
- bset_auto_save_file_name (&buffer_local_flags, make_number (-1));
- bset_read_only (&buffer_local_flags, make_number (-1));
- bset_major_mode (&buffer_local_flags, make_number (-1));
- bset_mode_name (&buffer_local_flags, make_number (-1));
- bset_undo_list (&buffer_local_flags, make_number (-1));
- bset_mark_active (&buffer_local_flags, make_number (-1));
- bset_point_before_scroll (&buffer_local_flags, make_number (-1));
- bset_file_truename (&buffer_local_flags, make_number (-1));
- bset_invisibility_spec (&buffer_local_flags, make_number (-1));
- bset_file_format (&buffer_local_flags, make_number (-1));
- bset_auto_save_file_format (&buffer_local_flags, make_number (-1));
- bset_display_count (&buffer_local_flags, make_number (-1));
- bset_display_time (&buffer_local_flags, make_number (-1));
- bset_enable_multibyte_characters (&buffer_local_flags, make_number (-1));
+ bset_filename (&buffer_local_flags, make_fixnum (-1));
+ bset_directory (&buffer_local_flags, make_fixnum (-1));
+ bset_backed_up (&buffer_local_flags, make_fixnum (-1));
+ bset_save_length (&buffer_local_flags, make_fixnum (-1));
+ bset_auto_save_file_name (&buffer_local_flags, make_fixnum (-1));
+ bset_read_only (&buffer_local_flags, make_fixnum (-1));
+ bset_major_mode (&buffer_local_flags, make_fixnum (-1));
+ bset_mode_name (&buffer_local_flags, make_fixnum (-1));
+ bset_undo_list (&buffer_local_flags, make_fixnum (-1));
+ bset_mark_active (&buffer_local_flags, make_fixnum (-1));
+ bset_point_before_scroll (&buffer_local_flags, make_fixnum (-1));
+ bset_file_truename (&buffer_local_flags, make_fixnum (-1));
+ bset_invisibility_spec (&buffer_local_flags, make_fixnum (-1));
+ bset_file_format (&buffer_local_flags, make_fixnum (-1));
+ bset_auto_save_file_format (&buffer_local_flags, make_fixnum (-1));
+ bset_display_count (&buffer_local_flags, make_fixnum (-1));
+ bset_display_time (&buffer_local_flags, make_fixnum (-1));
+ bset_enable_multibyte_characters (&buffer_local_flags, make_fixnum (-1));
/* These used to be stuck at 0 by default, but now that the all-zero value
means Qnil, we have to initialize them explicitly. */
- bset_name (&buffer_local_flags, make_number (0));
- bset_mark (&buffer_local_flags, make_number (0));
- bset_local_var_alist (&buffer_local_flags, make_number (0));
- bset_keymap (&buffer_local_flags, make_number (0));
- bset_downcase_table (&buffer_local_flags, make_number (0));
- bset_upcase_table (&buffer_local_flags, make_number (0));
- bset_case_canon_table (&buffer_local_flags, make_number (0));
- bset_case_eqv_table (&buffer_local_flags, make_number (0));
- bset_minor_modes (&buffer_local_flags, make_number (0));
- bset_width_table (&buffer_local_flags, make_number (0));
- bset_pt_marker (&buffer_local_flags, make_number (0));
- bset_begv_marker (&buffer_local_flags, make_number (0));
- bset_zv_marker (&buffer_local_flags, make_number (0));
- bset_last_selected_window (&buffer_local_flags, make_number (0));
+ bset_name (&buffer_local_flags, make_fixnum (0));
+ bset_mark (&buffer_local_flags, make_fixnum (0));
+ bset_local_var_alist (&buffer_local_flags, make_fixnum (0));
+ bset_keymap (&buffer_local_flags, make_fixnum (0));
+ bset_downcase_table (&buffer_local_flags, make_fixnum (0));
+ bset_upcase_table (&buffer_local_flags, make_fixnum (0));
+ bset_case_canon_table (&buffer_local_flags, make_fixnum (0));
+ bset_case_eqv_table (&buffer_local_flags, make_fixnum (0));
+ bset_minor_modes (&buffer_local_flags, make_fixnum (0));
+ bset_width_table (&buffer_local_flags, make_fixnum (0));
+ bset_pt_marker (&buffer_local_flags, make_fixnum (0));
+ bset_begv_marker (&buffer_local_flags, make_fixnum (0));
+ bset_zv_marker (&buffer_local_flags, make_fixnum (0));
+ bset_last_selected_window (&buffer_local_flags, make_fixnum (0));
idx = 1;
XSETFASTINT (BVAR (&buffer_local_flags, mode_line_format), idx); ++idx;
{
staticpro (&last_overlay_modification_hooks);
last_overlay_modification_hooks
- = Fmake_vector (make_number (10), Qnil);
+ = Fmake_vector (make_fixnum (10), Qnil);
staticpro (&QSFundamental);
staticpro (&Vbuffer_alist);
do \
{ \
Lisp_Object __pos = (pos); \
- if (NUMBERP (__pos)) \
+ if (FIXED_OR_FLOATP (__pos)) \
{ \
charpos = __pos; \
bytepos = buf_charpos_to_bytepos (current_buffer, __pos); \
{
Lisp_Object downcase_table = BVAR (current_buffer, downcase_table);
Lisp_Object down = CHAR_TABLE_REF (downcase_table, c);
- return NATNUMP (down) ? XFASTINT (down) : c;
+ return FIXNATP (down) ? XFASTINT (down) : c;
}
/* Upcase a character C, or make no change if that cannot be done. */
{
Lisp_Object upcase_table = BVAR (current_buffer, upcase_table);
Lisp_Object up = CHAR_TABLE_REF (upcase_table, c);
- return NATNUMP (up) ? XFASTINT (up) : c;
+ return FIXNATP (up) ? XFASTINT (up) : c;
}
/* True if C is upper case. */
CHECK_STRING (bytestr);
CHECK_VECTOR (vector);
- CHECK_NATNUM (maxdepth);
+ CHECK_FIXNAT (maxdepth);
ptrdiff_t const_length = ASIZE (vector);
if (!NILP (args_template))
{
- eassert (INTEGERP (args_template));
+ eassert (FIXNUMP (args_template));
ptrdiff_t at = XINT (args_template);
bool rest = (at & 128) != 0;
int mandatory = at & 127;
ptrdiff_t maxargs = rest ? PTRDIFF_MAX : nonrest;
if (! (mandatory <= nargs && nargs <= maxargs))
Fsignal (Qwrong_number_of_arguments,
- list2 (Fcons (make_number (mandatory), make_number (nonrest)),
- make_number (nargs)));
+ list2 (Fcons (make_fixnum (mandatory), make_fixnum (nonrest)),
+ make_fixnum (nargs)));
ptrdiff_t pushedargs = min (nonrest, nargs);
for (ptrdiff_t i = 0; i < pushedargs; i++, args++)
PUSH (*args);
{
Lisp_Object v1 = TOP;
Lisp_Object v2 = Fget (v1, Qbyte_code_meter);
- if (INTEGERP (v2)
+ if (FIXNUMP (v2)
&& XINT (v2) < MOST_POSITIVE_FIXNUM)
{
XSETINT (v2, XINT (v2) + 1);
CASE (Bnth):
{
Lisp_Object v2 = POP, v1 = TOP;
- CHECK_NUMBER (v1);
+ CHECK_FIXNUM (v1);
for (EMACS_INT n = XINT (v1); 0 < n && CONSP (v2); n--)
{
v2 = XCDR (v2);
NEXT;
CASE (Bsub1):
- TOP = INTEGERP (TOP) ? make_number (XINT (TOP) - 1) : Fsub1 (TOP);
+ TOP = FIXNUMP (TOP) ? make_fixnum (XINT (TOP) - 1) : Fsub1 (TOP);
NEXT;
CASE (Badd1):
- TOP = INTEGERP (TOP) ? make_number (XINT (TOP) + 1) : Fadd1 (TOP);
+ TOP = FIXNUMP (TOP) ? make_fixnum (XINT (TOP) + 1) : Fadd1 (TOP);
NEXT;
CASE (Beqlsign):
TOP = arithcompare (v1, v2, ARITH_EQUAL);
else
{
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v1);
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (v2);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v1);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (v2);
TOP = EQ (v1, v2) ? Qt : Qnil;
}
NEXT;
NEXT;
CASE (Bnegate):
- TOP = INTEGERP (TOP) ? make_number (- XINT (TOP)) : Fminus (1, &TOP);
+ TOP = FIXNUMP (TOP) ? make_fixnum (- XINT (TOP)) : Fminus (1, &TOP);
NEXT;
CASE (Bplus):
}
CASE (Bpoint):
- PUSH (make_natnum (PT));
+ PUSH (make_fixed_natnum (PT));
NEXT;
CASE (Bgoto_char):
}
CASE (Bpoint_min):
- PUSH (make_natnum (BEGV));
+ PUSH (make_fixed_natnum (BEGV));
NEXT;
CASE (Bchar_after):
NEXT;
CASE (Bcurrent_column):
- PUSH (make_natnum (current_column ()));
+ PUSH (make_fixed_natnum (current_column ()));
NEXT;
CASE (Bindent_to):
{
/* Exchange args and then do nth. */
Lisp_Object v2 = POP, v1 = TOP;
- CHECK_NUMBER (v2);
+ CHECK_FIXNUM (v2);
for (EMACS_INT n = XINT (v2); 0 < n && CONSP (v1); n--)
{
v1 = XCDR (v1);
NEXT;
CASE (Bnumberp):
- TOP = NUMBERP (TOP) ? Qt : Qnil;
+ TOP = FIXED_OR_FLOATP (TOP) ? Qt : Qnil;
NEXT;
CASE (Bintegerp):
- TOP = INTEGERP (TOP) ? Qt : Qnil;
+ TOP = FIXNUMP (TOP) ? Qt : Qnil;
NEXT;
#if BYTE_CODE_SAFE
{ /* Do a linear search if there are not many cases
FIXME: 5 is arbitrarily chosen. */
Lisp_Object hash_code = h->test.cmpfn
- ? make_number (h->test.hashfn (&h->test, v1)) : Qnil;
+ ? make_fixnum (h->test.hashfn (&h->test, v1)) : Qnil;
for (i = h->count; 0 <= --i; )
if (EQ (v1, HASH_KEY (h, i))
if (i >= 0)
{
Lisp_Object val = HASH_VALUE (h, i);
- if (BYTE_CODE_SAFE && !INTEGERP (val))
+ if (BYTE_CODE_SAFE && !FIXNUMP (val))
emacs_abort ();
op = XINT (val);
goto op_branch;
Lisp_Object
get_byte_code_arity (Lisp_Object args_template)
{
- eassert (NATNUMP (args_template));
+ eassert (FIXNATP (args_template));
EMACS_INT at = XINT (args_template);
bool rest = (at & 128) != 0;
int mandatory = at & 127;
EMACS_INT nonrest = at >> 8;
- return Fcons (make_number (mandatory),
- rest ? Qmany : make_number (nonrest));
+ return Fcons (make_fixnum (mandatory),
+ rest ? Qmany : make_fixnum (nonrest));
}
void
integer, it is incremented each time that symbol's function is called. */);
byte_metering_on = false;
- Vbyte_code_meter = Fmake_vector (make_number (256), make_number (0));
+ Vbyte_code_meter = Fmake_vector (make_fixnum (256), make_fixnum (0));
DEFSYM (Qbyte_code_meter, "byte-code-meter");
{
int i = 256;
while (i--)
ASET (Vbyte_code_meter, i,
- Fmake_vector (make_number (256), make_number (0)));
+ Fmake_vector (make_fixnum (256), make_fixnum (0)));
}
#endif
}
carelt = XCAR (elt);
/* If it is (if X Y), look at Y. */
if (EQ (carelt, Qif)
- && EQ (Fnthcdr (make_number (3), elt), Qnil))
- elt = Fnth (make_number (2), elt);
+ && EQ (Fnthcdr (make_fixnum (3), elt), Qnil))
+ elt = Fnth (make_fixnum (2), elt);
/* If it is (when ... Y), look at Y. */
else if (EQ (carelt, Qwhen))
{
case 'c': /* Character. */
/* Prompt in `minibuffer-prompt' face. */
- Fput_text_property (make_number (0),
- make_number (SCHARS (callint_message)),
+ Fput_text_property (make_fixnum (0),
+ make_fixnum (SCHARS (callint_message)),
Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_char (callint_message, Qnil, Qnil);
message1_nolog (0);
ptrdiff_t speccount1 = SPECPDL_INDEX ();
specbind (Qcursor_in_echo_area, Qt);
/* Prompt in `minibuffer-prompt' face. */
- Fput_text_property (make_number (0),
- make_number (SCHARS (callint_message)),
+ Fput_text_property (make_fixnum (0),
+ make_fixnum (SCHARS (callint_message)),
Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_key_sequence (callint_message,
Qnil, Qnil, Qnil, Qnil);
/* If the key sequence ends with a down-event,
discard the following up-event. */
Lisp_Object teml
- = Faref (args[i], make_number (XINT (Flength (args[i])) - 1));
+ = Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1));
if (CONSP (teml))
teml = XCAR (teml);
if (SYMBOLP (teml))
ptrdiff_t speccount1 = SPECPDL_INDEX ();
specbind (Qcursor_in_echo_area, Qt);
/* Prompt in `minibuffer-prompt' face. */
- Fput_text_property (make_number (0),
- make_number (SCHARS (callint_message)),
+ Fput_text_property (make_fixnum (0),
+ make_fixnum (SCHARS (callint_message)),
Qface, Qminibuffer_prompt, callint_message);
args[i] = Fread_key_sequence_vector (callint_message,
Qnil, Qt, Qnil, Qnil);
/* If the key sequence ends with a down-event,
discard the following up-event. */
Lisp_Object teml
- = Faref (args[i], make_number (XINT (Flength (args[i])) - 1));
+ = Faref (args[i], make_fixnum (XINT (Flength (args[i])) - 1));
if (CONSP (teml))
teml = XCAR (teml);
if (SYMBOLP (teml))
case 'U': /* Up event from last k or K. */
if (!NILP (up_event))
{
- args[i] = Fmake_vector (make_number (1), up_event);
+ args[i] = Fmake_vector (make_fixnum (1), up_event);
up_event = Qnil;
visargs[i] = Fkey_description (args[i], Qnil);
}
XSETFASTINT (val, 1);
else if (EQ (raw, Qminus))
XSETINT (val, -1);
- else if (CONSP (raw) && INTEGERP (XCAR (raw)))
+ else if (CONSP (raw) && FIXNUMP (XCAR (raw)))
XSETINT (val, XINT (XCAR (raw)));
- else if (INTEGERP (raw))
+ else if (FIXNUMP (raw))
val = raw;
else
XSETFASTINT (val, 1);
#ifdef MSDOS
static Lisp_Object synch_process_tempfile;
#else
-# define synch_process_tempfile make_number (0)
+# define synch_process_tempfile make_fixnum (0)
#endif
/* Indexes of file descriptors that need closing on call_process_kill. */
#ifndef subprocesses
/* Without asynchronous processes we cannot have BUFFER == 0. */
if (nargs >= 3
- && (INTEGERP (CONSP (args[2]) ? XCAR (args[2]) : args[2])))
+ && (FIXNUMP (CONSP (args[2]) ? XCAR (args[2]) : args[2])))
error ("Operating system cannot handle asynchronous subprocesses");
#endif /* subprocesses */
buffer = Qnil;
}
- if (! (NILP (buffer) || EQ (buffer, Qt) || INTEGERP (buffer)))
+ if (! (NILP (buffer) || EQ (buffer, Qt) || FIXNUMP (buffer)))
{
Lisp_Object spec_buffer;
spec_buffer = buffer;
for (i = 0; i < CALLPROC_FDS; i++)
callproc_fd[i] = -1;
#ifdef MSDOS
- synch_process_tempfile = make_number (0);
+ synch_process_tempfile = make_fixnum (0);
#endif
record_unwind_protect_ptr (call_process_kill, callproc_fd);
int ok;
ok = openp (Vexec_path, args[0], Vexec_suffixes, &path,
- make_number (X_OK), false);
+ make_fixnum (X_OK), false);
if (ok < 0)
report_file_error ("Searching for program", args[0]);
}
path = ENCODE_FILE (path);
new_argv[0] = SSDATA (path);
- discard_output = INTEGERP (buffer) || (NILP (buffer) && NILP (output_file));
+ discard_output = FIXNUMP (buffer) || (NILP (buffer) && NILP (output_file));
#ifdef MSDOS
if (! discard_output && ! STRINGP (output_file))
{
synch_process_pid = pid;
- if (INTEGERP (buffer))
+ if (FIXNUMP (buffer))
{
if (tempfile_index < 0)
record_deleted_pid (pid, Qnil);
#endif /* not MSDOS */
- if (INTEGERP (buffer))
+ if (FIXNUMP (buffer))
return unbind_to (count, Qnil);
if (BUFFERP (buffer))
coding-system used to decode the process output. */
if (inherit_process_coding_system)
call1 (intern ("after-insert-file-set-buffer-file-coding-system"),
- make_number (total_read));
+ make_fixnum (total_read));
}
bool wait_ok = true;
}
eassert (WIFEXITED (status));
- return make_number (WEXITSTATUS (status));
+ return make_fixnum (WEXITSTATUS (status));
}
\f
/* Create a temporary file suitable for storing the input data of
staticpro (&Vtemp_file_name_pattern);
#ifdef MSDOS
- synch_process_tempfile = make_number (0);
+ synch_process_tempfile = make_fixnum (0);
staticpro (&synch_process_tempfile);
#endif
if (! multibyte)
MAKE_CHAR_UNIBYTE (cased);
- return make_natnum (cased | flags);
+ return make_fixed_natnum (cased | flags);
}
static Lisp_Object
struct casing_context ctx;
prepare_casing_context (&ctx, flag, false);
- if (NATNUMP (obj))
+ if (FIXNATP (obj))
return do_casify_natnum (&ctx, obj);
else if (!STRINGP (obj))
wrong_type_argument (Qchar_or_string_p, obj);
static Lisp_Object
casify_word (enum case_action flag, Lisp_Object arg)
{
- CHECK_NUMBER (arg);
+ CHECK_FIXNUM (arg);
ptrdiff_t farend = scan_words (PT, XINT (arg));
if (!farend)
farend = XINT (arg) <= 0 ? BEGV : ZV;
- SET_PT (casify_region (flag, make_number (PT), make_number (farend)));
+ SET_PT (casify_region (flag, make_fixnum (PT), make_fixnum (farend)));
return Qnil;
}
Lisp_Object up = XCHAR_TABLE (case_table)->extras[0];
Lisp_Object canon = XCHAR_TABLE (case_table)->extras[1];
- if (NATNUMP (elt))
+ if (FIXNATP (elt))
Fset_char_table_range (canon, range, Faref (case_table, Faref (up, elt)));
}
static void
set_identity (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
{
- if (NATNUMP (elt))
+ if (FIXNATP (elt))
{
int from, to;
to++;
for (; from < to; from++)
- CHAR_TABLE_SET (table, from, make_number (from));
+ CHAR_TABLE_SET (table, from, make_fixnum (from));
}
}
static void
shuffle (Lisp_Object table, Lisp_Object c, Lisp_Object elt)
{
- if (NATNUMP (elt))
+ if (FIXNATP (elt))
{
int from, to;
for (; from < to; from++)
{
Lisp_Object tem = Faref (table, elt);
- Faset (table, elt, make_number (from));
- Faset (table, make_number (from), tem);
+ Faset (table, elt, make_fixnum (from));
+ Faset (table, make_fixnum (from), tem);
}
}
}
Lisp_Object down, up, eqv;
DEFSYM (Qcase_table, "case-table");
- Fput (Qcase_table, Qchar_table_extra_slots, make_number (3));
+ Fput (Qcase_table, Qchar_table_extra_slots, make_fixnum (3));
down = Fmake_char_table (Qcase_table, Qnil);
Vascii_downcase_table = down;
for (i = 0; i < 128; i++)
{
int c = (i >= 'A' && i <= 'Z') ? i + ('a' - 'A') : i;
- CHAR_TABLE_SET (down, i, make_number (c));
+ CHAR_TABLE_SET (down, i, make_fixnum (c));
}
set_char_table_extras (down, 1, Fcopy_sequence (down));
for (i = 0; i < 128; i++)
{
int c = (i >= 'a' && i <= 'z') ? i + ('A' - 'a') : i;
- CHAR_TABLE_SET (up, i, make_number (c));
+ CHAR_TABLE_SET (up, i, make_fixnum (c));
}
eqv = Fmake_char_table (Qcase_table, Qnil);
int c = ((i >= 'A' && i <= 'Z') ? i + ('a' - 'A')
: ((i >= 'a' && i <= 'z') ? i + ('A' - 'a')
: i));
- CHAR_TABLE_SET (eqv, i, make_number (c));
+ CHAR_TABLE_SET (eqv, i, make_fixnum (c));
}
set_char_table_extras (down, 2, eqv);
while (--len >= 0)
{
unsigned char cat = SREF (categories, len);
- Lisp_Object category = make_number (cat);
+ Lisp_Object category = make_fixnum (cat);
CHECK_CATEGORY (category);
set_category_set (val, cat, 1);
for (i = ' '; i <= '~'; i++)
if (NILP (CATEGORY_DOCSTRING (table, i)))
- return make_number (i);
+ return make_fixnum (i);
return Qnil;
}
set_char_table_defalt (val, MAKE_CATEGORY_SET);
for (i = 0; i < (1 << CHARTAB_SIZE_BITS_0); i++)
set_char_table_contents (val, i, MAKE_CATEGORY_SET);
- Fset_char_table_extra_slot (val, make_number (0),
- Fmake_vector (make_number (95), Qnil));
+ Fset_char_table_extra_slot (val, make_fixnum (0),
+ Fmake_vector (make_fixnum (95), Qnil));
return val;
}
int start, end;
int from, to;
- if (INTEGERP (character))
+ if (FIXNUMP (character))
{
CHECK_CHARACTER (character);
start = end = XFASTINT (character);
{
/* This has to be done here, before we call Fmake_char_table. */
DEFSYM (Qcategory_table, "category-table");
- Fput (Qcategory_table, Qchar_table_extra_slots, make_number (2));
+ Fput (Qcategory_table, Qchar_table_extra_slots, make_fixnum (2));
Vstandard_category_table = Fmake_char_table (Qcategory_table, Qnil);
/* Set a category set which contains nothing to the default. */
set_char_table_defalt (Vstandard_category_table, MAKE_CATEGORY_SET);
- Fset_char_table_extra_slot (Vstandard_category_table, make_number (0),
- Fmake_vector (make_number (95), Qnil));
+ Fset_char_table_extra_slot (Vstandard_category_table, make_fixnum (0),
+ Fmake_vector (make_fixnum (95), Qnil));
}
void
INLINE_HEADER_BEGIN
-#define CATEGORYP(x) RANGED_INTEGERP (0x20, x, 0x7E)
+#define CATEGORYP(x) RANGED_FIXNUMP (0x20, x, 0x7E)
#define CHECK_CATEGORY(x) \
CHECK_TYPE (CATEGORYP (x), Qcategoryp, x)
(BOOL_VECTOR_P (x) && bool_vector_size (x) == 128)
/* Return a new empty category set. */
-#define MAKE_CATEGORY_SET (Fmake_bool_vector (make_number (128), Qnil))
+#define MAKE_CATEGORY_SET (Fmake_bool_vector (make_fixnum (128), Qnil))
#define CHECK_CATEGORY_SET(x) \
CHECK_TYPE (CATEGORY_SET_P (x), Qcategorysetp, x)
#define CATEGORY_SET(c) char_category_set (c)
/* Return true if CATEGORY_SET contains CATEGORY.
- Faster than '!NILP (Faref (category_set, make_number (category)))'. */
+ Faster than '!NILP (Faref (category_set, make_fixnum (category)))'. */
INLINE bool
CATEGORY_MEMBER (EMACS_INT category, Lisp_Object category_set)
{
/* Return the doc string of CATEGORY in category table TABLE. */
#define CATEGORY_DOCSTRING(table, category) \
- AREF (Fchar_table_extra_slot (table, make_number (0)), ((category) - ' '))
+ AREF (Fchar_table_extra_slot (table, make_fixnum (0)), ((category) - ' '))
/* Set the doc string of CATEGORY to VALUE in category table TABLE. */
#define SET_CATEGORY_DOCSTRING(table, category, value) \
- ASET (Fchar_table_extra_slot (table, make_number (0)), ((category) - ' '), value)
+ ASET (Fchar_table_extra_slot (table, make_fixnum (0)), ((category) - ' '), value)
/* Return the version number of category table TABLE. Not used for
the moment. */
#define CATEGORY_TABLE_VERSION (table) \
- Fchar_table_extra_slot (table, make_number (1))
+ Fchar_table_extra_slot (table, make_fixnum (1))
/* Return true if there is a word boundary between two
word-constituent characters C1 and C2 if they appear in this order.
: -1));
h = GET_HASH_TABLE (eop);
- eop = hash_lookup (h, make_number (reg[RRR]), NULL);
+ eop = hash_lookup (h, make_fixnum (reg[RRR]), NULL);
if (eop >= 0)
{
Lisp_Object opl;
i = CCL_DECODE_CHAR (reg[RRR], reg[rrr]);
h = GET_HASH_TABLE (eop);
- eop = hash_lookup (h, make_number (i), NULL);
+ eop = hash_lookup (h, make_fixnum (i), NULL);
if (eop >= 0)
{
Lisp_Object opl;
opl = HASH_VALUE (h, eop);
- if (! (INTEGERP (opl) && IN_INT_RANGE (XINT (opl))))
+ if (! (FIXNUMP (opl) && IN_INT_RANGE (XINT (opl))))
CCL_INVALID_CMD;
reg[RRR] = XINT (opl);
reg[7] = 1; /* r7 true for success */
/* check map type,
[STARTPOINT VAL1 VAL2 ...] or
[t ELEMENT STARTPOINT ENDPOINT] */
- if (INTEGERP (content))
+ if (FIXNUMP (content))
{
point = XINT (content);
if (!(point <= op && op - point + 1 < size)) continue;
else if (EQ (content, Qt))
{
if (size != 4) continue;
- if (INTEGERP (AREF (map, 2))
+ if (FIXNUMP (AREF (map, 2))
&& XINT (AREF (map, 2)) <= op
- && INTEGERP (AREF (map, 3))
+ && FIXNUMP (AREF (map, 3))
&& op < XINT (AREF (map, 3)))
content = AREF (map, 1);
else
if (NILP (content))
continue;
- else if (INTEGERP (content) && IN_INT_RANGE (XINT (content)))
+ else if (FIXNUMP (content) && IN_INT_RANGE (XINT (content)))
{
reg[RRR] = i;
reg[rrr] = XINT (content);
{
attrib = XCAR (content);
value = XCDR (content);
- if (! (INTEGERP (attrib) && INTEGERP (value)
+ if (! (FIXNUMP (attrib) && FIXNUMP (value)
&& IN_INT_RANGE (XINT (value))))
continue;
reg[RRR] = i;
/* check map type,
[STARTPOINT VAL1 VAL2 ...] or
[t ELEMENT STARTPOINT ENDPOINT] */
- if (INTEGERP (content))
+ if (FIXNUMP (content))
{
point = XINT (content);
if (!(point <= op && op - point + 1 < size)) continue;
else if (EQ (content, Qt))
{
if (size != 4) continue;
- if (INTEGERP (AREF (map, 2))
+ if (FIXNUMP (AREF (map, 2))
&& XINT (AREF (map, 2)) <= op
- && INTEGERP (AREF (map, 3))
+ && FIXNUMP (AREF (map, 3))
&& op < XINT (AREF (map, 3)))
content = AREF (map, 1);
else
continue;
reg[RRR] = i;
- if (INTEGERP (content) && IN_INT_RANGE (XINT (content)))
+ if (FIXNUMP (content) && IN_INT_RANGE (XINT (content)))
{
op = XINT (content);
i += map_set_rest_length - 1;
{
attrib = XCAR (content);
value = XCDR (content);
- if (! (INTEGERP (attrib) && INTEGERP (value)
+ if (! (FIXNUMP (attrib) && FIXNUMP (value)
&& IN_INT_RANGE (XINT (value))))
continue;
op = XINT (value);
map = XCDR (map);
if (! (VECTORP (map)
&& 0 < ASIZE (map)
- && INTEGERP (AREF (map, 0))
+ && FIXNUMP (AREF (map, 0))
&& XINT (AREF (map, 0)) <= op
&& op - XINT (AREF (map, 0)) + 1 < ASIZE (map)))
{
content = AREF (map, point);
if (NILP (content))
reg[RRR] = -1;
- else if (TYPE_RANGED_INTEGERP (int, content))
+ else if (TYPE_RANGED_FIXNUMP (int, content))
reg[rrr] = XINT (content);
else if (EQ (content, Qt));
else if (CONSP (content))
{
attrib = XCAR (content);
value = XCDR (content);
- if (!INTEGERP (attrib)
- || !TYPE_RANGED_INTEGERP (int, value))
+ if (!FIXNUMP (attrib)
+ || !TYPE_RANGED_FIXNUMP (int, value))
continue;
reg[rrr] = XINT (value);
break;
for (i = 0; i < veclen; i++)
{
contents = AREF (result, i);
- if (TYPE_RANGED_INTEGERP (int, contents))
+ if (TYPE_RANGED_FIXNUMP (int, contents))
continue;
else if (CONSP (contents)
&& SYMBOLP (XCAR (contents))
(SYMBOL . PROPERTY). (get SYMBOL PROPERTY) should give
an index number. */
val = Fget (XCAR (contents), XCDR (contents));
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
ASET (result, i, val);
else
unresolved = 1;
may lead to a bug if, for instance, a translation table
and a code conversion map have the same name. */
val = Fget (contents, Qtranslation_table_id);
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
ASET (result, i, val);
else
{
val = Fget (contents, Qcode_conversion_map_id);
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
ASET (result, i, val);
else
{
val = Fget (contents, Qccl_program_idx);
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
ASET (result, i, val);
else
unresolved = 1;
return Qnil;
val = Fget (ccl_prog, Qccl_program_idx);
- if (! NATNUMP (val)
+ if (! FIXNATP (val)
|| XINT (val) >= ASIZE (Vccl_program_table))
return Qnil;
slot = AREF (Vccl_program_table, XINT (val));
return Qnil;
val = Fget (object, Qccl_program_idx);
- return ((! NATNUMP (val)
+ return ((! FIXNATP (val)
|| XINT (val) >= ASIZE (Vccl_program_table))
? Qnil : Qt);
}
error ("Length of vector REGISTERS is not 8");
for (i = 0; i < 8; i++)
- ccl.reg[i] = (TYPE_RANGED_INTEGERP (int, AREF (reg, i))
+ ccl.reg[i] = (TYPE_RANGED_FIXNUMP (int, AREF (reg, i))
? XINT (AREF (reg, i))
: 0);
error ("Error in CCL program at %dth code", ccl.ic);
for (i = 0; i < 8; i++)
- ASET (reg, i, make_number (ccl.reg[i]));
+ ASET (reg, i, make_fixnum (ccl.reg[i]));
return Qnil;
}
for (i = 0; i < 8; i++)
{
if (NILP (AREF (status, i)))
- ASET (status, i, make_number (0));
- if (TYPE_RANGED_INTEGERP (int, AREF (status, i)))
+ ASET (status, i, make_fixnum (0));
+ if (TYPE_RANGED_FIXNUMP (int, AREF (status, i)))
ccl.reg[i] = XINT (AREF (status, i));
}
- if (INTEGERP (AREF (status, i)))
+ if (FIXNUMP (AREF (status, i)))
{
i = XFASTINT (AREF (status, 8));
if (ccl.ic < i && i < ccl.size)
error ("CCL program interrupted at %dth code", ccl.ic);
for (i = 0; i < 8; i++)
- ASET (status, i, make_number (ccl.reg[i]));
- ASET (status, 8, make_number (ccl.ic));
+ ASET (status, i, make_fixnum (ccl.reg[i]));
+ ASET (status, 8, make_fixnum (ccl.ic));
val = make_specified_string ((const char *) outbuf, produced_chars,
outp - outbuf, NILP (unibyte_p));
ASET (slot, 1, ccl_prog);
ASET (slot, 2, resolved);
ASET (slot, 3, Qt);
- return make_number (idx);
+ return make_fixnum (idx);
}
}
ASET (Vccl_program_table, idx, elt);
}
- Fput (name, Qccl_program_idx, make_number (idx));
- return make_number (idx);
+ Fput (name, Qccl_program_idx, make_fixnum (idx));
+ return make_fixnum (idx);
}
/* Register code conversion map.
if (EQ (symbol, XCAR (slot)))
{
- idx = make_number (i);
+ idx = make_fixnum (i);
XSETCDR (slot, map);
Fput (symbol, Qcode_conversion_map, map);
Fput (symbol, Qcode_conversion_map_id, idx);
Vcode_conversion_map_vector = larger_vector (Vcode_conversion_map_vector,
1, -1);
- idx = make_number (i);
+ idx = make_fixnum (i);
Fput (symbol, Qcode_conversion_map, map);
Fput (symbol, Qcode_conversion_map_id, idx);
ASET (Vcode_conversion_map_vector, i, Fcons (symbol, map));
syms_of_ccl (void)
{
staticpro (&Vccl_program_table);
- Vccl_program_table = Fmake_vector (make_number (32), Qnil);
+ Vccl_program_table = Fmake_vector (make_fixnum (32), Qnil);
DEFSYM (Qccl, "ccl");
DEFSYM (Qcclp, "cclp");
DEFVAR_LISP ("code-conversion-map-vector", Vcode_conversion_map_vector,
doc: /* Vector of code conversion maps. */);
- Vcode_conversion_map_vector = Fmake_vector (make_number (16), Qnil);
+ Vcode_conversion_map_vector = Fmake_vector (make_fixnum (16), Qnil);
DEFVAR_LISP ("font-ccl-encoder-alist", Vfont_ccl_encoder_alist,
doc: /* Alist of fontname patterns vs corresponding CCL program.
attributes: const)
(void)
{
- return make_number (MAX_CHAR);
+ return make_fixnum (MAX_CHAR);
}
DEFUN ("unibyte-char-to-multibyte", Funibyte_char_to_multibyte,
if (c >= 0x100)
error ("Not a unibyte character: %d", c);
MAKE_CHAR_MULTIBYTE (c);
- return make_number (c);
+ return make_fixnum (c);
}
DEFUN ("multibyte-char-to-unibyte", Fmultibyte_char_to_unibyte,
else
{
int cu = CHAR_TO_BYTE_SAFE (cm);
- return make_number (cu);
+ return make_fixnum (cu);
}
}
CHECK_CHARACTER (ch);
c = XINT (ch);
width = char_width (c, buffer_display_table ());
- return make_number (width);
+ return make_fixnum (width);
}
/* Return width of string STR of length LEN when displayed in the
{
EMACS_INT c;
- CHECK_NUMBER (character);
+ CHECK_FIXNUM (character);
c = XINT (character);
- return make_number (char_resolve_modifier_mask (c));
+ return make_fixnum (char_resolve_modifier_mask (c));
}
DEFUN ("get-byte", Fget_byte, Sget_byte, 0, 2, 0,
}
else
{
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (XINT (position) < BEGV || XINT (position) >= ZV)
- args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
+ args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
pos = XFASTINT (position);
p = CHAR_POS_ADDR (pos);
}
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
- return make_number (*p);
+ return make_fixnum (*p);
}
else
{
}
else
{
- CHECK_NATNUM (position);
+ CHECK_FIXNAT (position);
if (XINT (position) >= SCHARS (string))
args_out_of_range (string, position);
pos = XFASTINT (position);
p = SDATA (string) + string_char_to_byte (string, pos);
}
if (! STRING_MULTIBYTE (string))
- return make_number (*p);
+ return make_fixnum (*p);
}
c = STRING_CHAR (p);
if (CHAR_BYTE8_P (c))
c = CHAR_TO_BYTE8 (c);
else if (! ASCII_CHAR_P (c))
error ("Not an ASCII nor an 8-bit character: %d", c);
- return make_number (c);
+ return make_fixnum (c);
}
/* Return true if C is an alphabetic character. */
alphabeticp (int c)
{
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (! INTEGERP (category))
+ if (! FIXNUMP (category))
return false;
EMACS_INT gen_cat = XINT (category);
alphanumericp (int c)
{
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (! INTEGERP (category))
+ if (! FIXNUMP (category))
return false;
EMACS_INT gen_cat = XINT (category);
graphicp (int c)
{
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (! INTEGERP (category))
+ if (! FIXNUMP (category))
return false;
EMACS_INT gen_cat = XINT (category);
printablep (int c)
{
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (! INTEGERP (category))
+ if (! FIXNUMP (category))
return false;
EMACS_INT gen_cat = XINT (category);
blankp (int c)
{
Lisp_Object category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (! INTEGERP (category))
+ if (! FIXNUMP (category))
return false;
return XINT (category) == UNICODE_CATEGORY_Zs; /* separator, space */
Vector recording all translation tables ever defined.
Each element is a pair (SYMBOL . TABLE) relating the table to the
symbol naming it. The ID of a translation table is an index into this vector. */);
- Vtranslation_table_vector = Fmake_vector (make_number (16), Qnil);
+ Vtranslation_table_vector = Fmake_vector (make_fixnum (16), Qnil);
DEFVAR_LISP ("auto-fill-chars", Vauto_fill_chars,
doc: /*
DEFVAR_LISP ("char-width-table", Vchar_width_table,
doc: /*
A char-table for width (columns) of each character. */);
- Vchar_width_table = Fmake_char_table (Qnil, make_number (1));
- char_table_set_range (Vchar_width_table, 0x80, 0x9F, make_number (4));
+ Vchar_width_table = Fmake_char_table (Qnil, make_fixnum (1));
+ char_table_set_range (Vchar_width_table, 0x80, 0x9F, make_fixnum (4));
char_table_set_range (Vchar_width_table, MAX_5_BYTE_CHAR + 1, MAX_CHAR,
- make_number (4));
+ make_fixnum (4));
DEFVAR_LISP ("printable-chars", Vprintable_chars,
doc: /* A char-table for each printable character. */);
Vprintable_chars = Fmake_char_table (Qnil, Qnil);
Fset_char_table_range (Vprintable_chars,
- Fcons (make_number (32), make_number (126)), Qt);
+ Fcons (make_fixnum (32), make_fixnum (126)), Qt);
Fset_char_table_range (Vprintable_chars,
- Fcons (make_number (160),
- make_number (MAX_5_BYTE_CHAR)), Qt);
+ Fcons (make_fixnum (160),
+ make_fixnum (MAX_5_BYTE_CHAR)), Qt);
DEFVAR_LISP ("char-script-table", Vchar_script_table,
doc: /* Char table of script symbols.
It has one extra slot whose value is a list of script symbols. */);
DEFSYM (Qchar_script_table, "char-script-table");
- Fput (Qchar_script_table, Qchar_table_extra_slots, make_number (1));
+ Fput (Qchar_script_table, Qchar_table_extra_slots, make_fixnum (1));
Vchar_script_table = Fmake_char_table (Qchar_script_table, Qnil);
DEFVAR_LISP ("script-representative-chars", Vscript_representative_chars,
#define MAX_MULTIBYTE_LENGTH 5
/* Nonzero iff X is a character. */
-#define CHARACTERP(x) (NATNUMP (x) && XFASTINT (x) <= MAX_CHAR)
+#define CHARACTERP(x) (FIXNATP (x) && XFASTINT (x) <= MAX_CHAR)
/* Nonzero iff C is valid as a character code. */
#define CHAR_VALID_P(c) UNSIGNED_CMP (c, <=, MAX_CHAR)
{
int n = CODE_POINT_TO_INDEX (charset, max_code) + 1;
- vec = Fmake_vector (make_number (n), make_number (-1));
+ vec = Fmake_vector (make_fixnum (n), make_fixnum (-1));
set_charset_attr (charset, charset_decoder, vec);
}
else
{
if (charset->method == CHARSET_METHOD_MAP)
for (; from_index < lim_index; from_index++, from_c++)
- ASET (vec, from_index, make_number (from_c));
+ ASET (vec, from_index, make_fixnum (from_c));
else
for (; from_index < lim_index; from_index++, from_c++)
CHAR_TABLE_SET (Vchar_unify_table,
CHARSET_CODE_OFFSET (charset) + from_index,
- make_number (from_c));
+ make_fixnum (from_c));
}
else if (control_flag == 2)
{
code = INDEX_TO_CODE_POINT (charset, code);
if (NILP (CHAR_TABLE_REF (table, from_c)))
- CHAR_TABLE_SET (table, from_c, make_number (code));
+ CHAR_TABLE_SET (table, from_c, make_fixnum (code));
}
else
for (; from_index < lim_index; from_index++, from_c++)
{
if (NILP (CHAR_TABLE_REF (table, from_c)))
- CHAR_TABLE_SET (table, from_c, make_number (from_index));
+ CHAR_TABLE_SET (table, from_c, make_fixnum (from_index));
}
}
else if (control_flag == 3)
else
from = to = XFASTINT (val);
val = AREF (vec, i + 1);
- CHECK_NATNUM (val);
+ CHECK_FIXNAT (val);
c = XFASTINT (val);
if (from < min_code || to > max_code || from > to || c > MAX_CHAR)
if (idx >= from_idx && idx <= to_idx)
{
if (NILP (XCAR (range)))
- XSETCAR (range, make_number (c));
+ XSETCAR (range, make_fixnum (c));
}
else if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (c_function)
(*c_function) (arg, range);
else
{
if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c));
+ XSETCDR (range, make_fixnum (c));
if (c_function)
(*c_function) (arg, range);
else
map_charset_for_dump (c_function, function, arg, from, to);
}
- range = Fcons (make_number (from_c), make_number (to_c));
+ range = Fcons (make_fixnum (from_c), make_fixnum (to_c));
if (NILP (function))
(*c_function) (arg, range);
else
if (nargs != charset_arg_max)
Fsignal (Qwrong_number_of_arguments,
Fcons (intern ("define-charset-internal"),
- make_number (nargs)));
+ make_fixnum (nargs)));
- attrs = Fmake_vector (make_number (charset_attr_max), Qnil);
+ attrs = Fmake_vector (make_fixnum (charset_attr_max), Qnil);
CHECK_SYMBOL (args[charset_arg_name]);
ASET (attrs, charset_name, args[charset_arg_name]);
Lisp_Object min_byte_obj, max_byte_obj;
int min_byte, max_byte;
- min_byte_obj = Faref (val, make_number (i * 2));
- max_byte_obj = Faref (val, make_number (i * 2 + 1));
+ 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);
CHECK_RANGED_INTEGER (max_byte_obj, min_byte, 255);
charset.iso_final = -1;
else
{
- CHECK_NUMBER (val);
+ CHECK_FIXNUM (val);
if (XINT (val) < '0' || XINT (val) > 127)
error ("Invalid iso-final-char: %"pI"d", XINT (val));
charset.iso_final = XINT (val);
charset.emacs_mule_id = -1;
else
{
- CHECK_NATNUM (val);
+ 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);
val = args[charset_arg_subset];
parent = Fcar (val);
CHECK_CHARSET_GET_CHARSET (parent, parent_charset);
- parent_min_code = Fnth (make_number (1), val);
- CHECK_NATNUM (parent_min_code);
- parent_max_code = Fnth (make_number (2), val);
- CHECK_NATNUM (parent_max_code);
- parent_code_offset = Fnth (make_number (3), val);
- CHECK_NUMBER (parent_code_offset);
+ parent_min_code = Fnth (make_fixnum (1), val);
+ CHECK_FIXNAT (parent_min_code);
+ parent_max_code = Fnth (make_fixnum (2), val);
+ CHECK_FIXNAT (parent_max_code);
+ parent_code_offset = Fnth (make_fixnum (3), val);
+ CHECK_FIXNUM (parent_code_offset);
val = make_uninit_vector (4);
- ASET (val, 0, make_number (parent_charset->id));
+ ASET (val, 0, make_fixnum (parent_charset->id));
ASET (val, 1, parent_min_code);
ASET (val, 2, parent_max_code);
ASET (val, 3, parent_code_offset);
CHECK_CHARSET_GET_ID (elt, this_id);
offset = 0;
}
- XSETCAR (val, Fcons (make_number (this_id), make_number (offset)));
+ XSETCAR (val, Fcons (make_fixnum (this_id), make_fixnum (offset)));
this_charset = CHARSET_FROM_ID (this_id);
if (charset.min_char > this_charset->min_char)
new_definition_p = 1;
}
- ASET (attrs, charset_id, make_number (id));
+ ASET (attrs, charset_id, make_fixnum (id));
charset.id = id;
charset_table[id] = charset;
charset.iso_final) = id;
if (new_definition_p)
Viso_2022_charset_list = nconc2 (Viso_2022_charset_list,
- list1 (make_number (id)));
+ list1 (make_fixnum (id)));
if (ISO_CHARSET_TABLE (1, 0, 'J') == id)
charset_jisx0201_roman = id;
else if (ISO_CHARSET_TABLE (2, 0, '@') == id)
emacs_mule_bytes[charset.emacs_mule_id] = charset.dimension + 2;
if (new_definition_p)
Vemacs_mule_charset_list = nconc2 (Vemacs_mule_charset_list,
- list1 (make_number (id)));
+ list1 (make_fixnum (id)));
}
if (new_definition_p)
Vcharset_list = Fcons (args[charset_arg_name], Vcharset_list);
if (charset.supplementary_p)
Vcharset_ordered_list = nconc2 (Vcharset_ordered_list,
- list1 (make_number (id)));
+ list1 (make_fixnum (id)));
else
{
Lisp_Object tail;
break;
}
if (EQ (tail, Vcharset_ordered_list))
- Vcharset_ordered_list = Fcons (make_number (id),
+ Vcharset_ordered_list = Fcons (make_fixnum (id),
Vcharset_ordered_list);
else if (NILP (tail))
Vcharset_ordered_list = nconc2 (Vcharset_ordered_list,
- list1 (make_number (id)));
+ list1 (make_fixnum (id)));
else
{
val = Fcons (XCAR (tail), XCDR (tail));
XSETCDR (tail, val);
- XSETCAR (tail, make_number (id));
+ XSETCAR (tail, make_fixnum (id));
}
}
charset_ordered_list_tick++;
int i;
args[charset_arg_name] = name;
- args[charset_arg_dimension] = make_number (dimension);
+ args[charset_arg_dimension] = make_fixnum (dimension);
val = make_uninit_vector (8);
for (i = 0; i < 8; i++)
- ASET (val, i, make_number (code_space[i]));
+ ASET (val, i, make_fixnum (code_space[i]));
args[charset_arg_code_space] = val;
- args[charset_arg_min_code] = make_number (min_code);
- args[charset_arg_max_code] = make_number (max_code);
+ args[charset_arg_min_code] = make_fixnum (min_code);
+ args[charset_arg_max_code] = make_fixnum (max_code);
args[charset_arg_iso_final]
- = (iso_final < 0 ? Qnil : make_number (iso_final));
- args[charset_arg_iso_revision] = make_number (iso_revision);
+ = (iso_final < 0 ? Qnil : make_fixnum (iso_final));
+ args[charset_arg_iso_revision] = make_fixnum (iso_revision);
args[charset_arg_emacs_mule_id]
- = (emacs_mule_id < 0 ? Qnil : make_number (emacs_mule_id));
+ = (emacs_mule_id < 0 ? Qnil : make_fixnum (emacs_mule_id));
args[charset_arg_ascii_compatible_p] = ascii_compatible ? Qt : Qnil;
args[charset_arg_supplementary_p] = supplementary ? Qt : Qnil;
args[charset_arg_invalid_code] = Qnil;
- args[charset_arg_code_offset] = make_number (code_offset);
+ args[charset_arg_code_offset] = make_fixnum (code_offset);
args[charset_arg_map] = Qnil;
args[charset_arg_subset] = Qnil;
args[charset_arg_superset] = Qnil;
check_iso_charset_parameter (Lisp_Object dimension, Lisp_Object chars,
Lisp_Object final_char)
{
- CHECK_NUMBER (dimension);
- CHECK_NUMBER (chars);
+ CHECK_FIXNUM (dimension);
+ CHECK_FIXNUM (chars);
CHECK_CHARACTER (final_char);
if (! (1 <= XINT (dimension) && XINT (dimension) <= 3))
(Lisp_Object dimension, Lisp_Object chars)
{
bool chars_flag = check_iso_charset_parameter (dimension, chars,
- make_number ('0'));
+ make_fixnum ('0'));
for (int final_char = '0'; final_char <= '?'; final_char++)
if (ISO_CHARSET_TABLE (XINT (dimension), chars_flag, final_char) < 0)
- return make_number (final_char);
+ return make_fixnum (final_char);
return Qnil;
}
from_byte = CHAR_TO_BYTE (from);
- charsets = Fmake_vector (make_number (charset_table_used), Qnil);
+ charsets = Fmake_vector (make_fixnum (charset_table_used), Qnil);
while (1)
{
find_charsets_in_text (BYTE_POS_ADDR (from_byte), stop - from,
CHECK_STRING (str);
- charsets = Fmake_vector (make_number (charset_table_used), Qnil);
+ charsets = Fmake_vector (make_fixnum (charset_table_used), Qnil);
find_charsets_in_text (SDATA (str), SCHARS (str), SBYTES (str),
charsets, table,
STRING_MULTIBYTE (str));
{
struct charset *charset;
- if (INTEGERP (val))
+ if (FIXNUMP (val))
return XFASTINT (val);
if (NILP (val))
return c;
{
Lisp_Object deunified = CHAR_TABLE_REF (deunifier, c);
- if (INTEGERP (deunified))
+ if (FIXNUMP (deunified))
code_index = XINT (deunified);
}
else
code = cons_to_unsigned (code_point, UINT_MAX);
charsetp = CHARSET_FROM_ID (id);
c = DECODE_CHAR (charsetp, code);
- return (c >= 0 ? make_number (c) : Qnil);
+ return (c >= 0 ? make_fixnum (c) : Qnil);
}
? 0 : CHARSET_MIN_CODE (charsetp));
else
{
- CHECK_NATNUM (code1);
+ CHECK_FIXNAT (code1);
if (XFASTINT (code1) >= 0x100)
- args_out_of_range (make_number (0xFF), code1);
+ args_out_of_range (make_fixnum (0xFF), code1);
code = XFASTINT (code1);
if (dimension > 1)
code |= charsetp->code_space[(dimension - 2) * 4];
else
{
- CHECK_NATNUM (code2);
+ CHECK_FIXNAT (code2);
if (XFASTINT (code2) >= 0x100)
- args_out_of_range (make_number (0xFF), code2);
+ args_out_of_range (make_fixnum (0xFF), code2);
code |= XFASTINT (code2);
}
code |= charsetp->code_space[(dimension - 3) * 4];
else
{
- CHECK_NATNUM (code3);
+ CHECK_FIXNAT (code3);
if (XFASTINT (code3) >= 0x100)
- args_out_of_range (make_number (0xFF), code3);
+ args_out_of_range (make_fixnum (0xFF), code3);
code |= XFASTINT (code3);
}
code |= charsetp->code_space[0];
else
{
- CHECK_NATNUM (code4);
+ CHECK_FIXNAT (code4);
if (XFASTINT (code4) >= 0x100)
- args_out_of_range (make_number (0xFF), code4);
+ args_out_of_range (make_fixnum (0xFF), code4);
code |= XFASTINT (code4);
}
}
c = DECODE_CHAR (charsetp, code);
if (c < 0)
error ("Invalid code(s)");
- return make_number (c);
+ return make_fixnum (c);
}
dimension = CHARSET_DIMENSION (charset);
for (val = Qnil; dimension > 0; dimension--)
{
- val = Fcons (make_number (code & 0xFF), val);
+ val = Fcons (make_fixnum (code & 0xFF), val);
code >>= 8;
}
return Fcons (CHARSET_NAME (charset), val);
struct charset *charset;
ch = Fchar_after (pos);
- if (! INTEGERP (ch))
+ if (! FIXNUMP (ch))
return ch;
charset = CHAR_CHARSET (XINT (ch));
return (CHARSET_NAME (charset));
for (i = 0; i < nargs; i++)
{
CHECK_CHARSET_GET_ID (args[i], id);
- if (! NILP (Fmemq (make_number (id), old_list)))
+ if (! NILP (Fmemq (make_fixnum (id), old_list)))
{
- old_list = Fdelq (make_number (id), old_list);
- new_head = Fcons (make_number (id), new_head);
+ old_list = Fdelq (make_fixnum (id), old_list);
+ new_head = Fcons (make_fixnum (id), new_head);
}
}
Vcharset_non_preferred_head = old_list;
int id;
CHECK_CHARSET_GET_ID (charset, id);
- return make_number (id);
+ return make_fixnum (id);
}
struct charset_sort_data
n_extras = 0;
else
{
- CHECK_NATNUM (n);
+ CHECK_FIXNAT (n);
if (XINT (n) > 10)
args_out_of_range (n, Qnil);
n_extras = XINT (n);
}
size = CHAR_TABLE_STANDARD_SLOTS + n_extras;
- vector = Fmake_vector (make_number (size), init);
+ vector = Fmake_vector (make_fixnum (size), init);
XSETPVECTYPE (XVECTOR (vector), PVEC_CHAR_TABLE);
set_char_table_parent (vector, Qnil);
set_char_table_purpose (vector, purpose);
int size = PVSIZE (table);
int i;
- copy = Fmake_vector (make_number (size), Qnil);
+ copy = Fmake_vector (make_fixnum (size), Qnil);
XSETPVECTYPE (XVECTOR (copy), PVEC_CHAR_TABLE);
set_char_table_defalt (copy, XCHAR_TABLE (table)->defalt);
set_char_table_parent (copy, XCHAR_TABLE (table)->parent);
(Lisp_Object char_table, Lisp_Object n)
{
CHECK_CHAR_TABLE (char_table);
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
if (XINT (n) < 0
|| XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
args_out_of_range (char_table, n);
(Lisp_Object char_table, Lisp_Object n, Lisp_Object value)
{
CHECK_CHAR_TABLE (char_table);
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
if (XINT (n) < 0
|| XINT (n) >= CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (char_table)))
args_out_of_range (char_table, n);
if (SUB_CHAR_TABLE_P (this))
{
if (to >= nextc)
- XSETCDR (range, make_number (nextc - 1));
+ XSETCDR (range, make_fixnum (nextc - 1));
val = map_sub_char_table (c_function, function, this, arg,
val, range, top);
}
set_char_table_parent (parent, Qnil);
val = CHAR_TABLE_REF (parent, from);
set_char_table_parent (parent, temp);
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
val = map_sub_char_table (c_function, function,
parent, arg, val, range,
parent);
}
if (! NILP (val) && different_value)
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (EQ (XCAR (range), XCDR (range)))
{
if (c_function)
}
val = this;
from = c;
- XSETCAR (range, make_number (c));
+ XSETCAR (range, make_fixnum (c));
}
}
- XSETCDR (range, make_number (to));
+ XSETCDR (range, make_fixnum (to));
}
return val;
}
Lisp_Object range, val, parent;
uniprop_decoder_t decoder = UNIPROP_GET_DECODER (table);
- range = Fcons (make_number (0), make_number (MAX_CHAR));
+ range = Fcons (make_fixnum (0), make_fixnum (MAX_CHAR));
parent = XCHAR_TABLE (table)->parent;
val = XCHAR_TABLE (table)->ascii;
{
if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (c_function)
(*c_function) (arg, range);
else
{
if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (c_function)
(*c_function) (arg, range);
else
else
{
if (NILP (XCAR (range)))
- XSETCAR (range, make_number (c));
+ XSETCAR (range, make_fixnum (c));
}
}
}
{
if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (c_function)
(*c_function) (arg, range);
else
}
if (! NILP (XCAR (range)))
{
- XSETCDR (range, make_number (c - 1));
+ XSETCDR (range, make_fixnum (c - 1));
if (c_function)
(*c_function) (arg, range);
else
{
int v = STRING_CHAR_ADVANCE (p);
set_sub_char_table_contents
- (sub, idx++, v > 0 ? make_number (v) : Qnil);
+ (sub, idx++, v > 0 ? make_fixnum (v) : Qnil);
}
}
else if (*p == 2)
}
}
while (count-- > 0)
- set_sub_char_table_contents (sub, idx++, make_number (v));
+ set_sub_char_table_contents (sub, idx++, make_fixnum (v));
}
}
/* It seems that we don't need this function because C code won't need
{
EMACS_INT i;
- if (! INTEGERP (XCHAR_TABLE (table)->extras[1]))
+ if (! FIXNUMP (XCHAR_TABLE (table)->extras[1]))
return NULL;
i = XINT (XCHAR_TABLE (table)->extras[1]);
if (i < 0 || i >= uniprop_decoder_count)
break;
if (i == size)
wrong_type_argument (build_string ("Unicode property value"), value);
- return make_number (i);
+ return make_fixnum (i);
}
Lisp_Object *value_table = XVECTOR (XCHAR_TABLE (table)->extras[4])->contents;
int i, size = ASIZE (XCHAR_TABLE (table)->extras[4]);
- CHECK_NUMBER (value);
+ CHECK_FIXNUM (value);
for (i = 0; i < size; i++)
if (EQ (value, value_table[i]))
break;
- value = make_number (i);
+ value = make_fixnum (i);
if (i == size)
set_char_table_extras (table, 4,
CALLN (Fvconcat,
XCHAR_TABLE (table)->extras[4],
- Fmake_vector (make_number (1), value)));
- return make_number (i);
+ Fmake_vector (make_fixnum (1), value)));
+ return make_fixnum (i);
}
static uniprop_encoder_t uniprop_encoder[] =
{
EMACS_INT i;
- if (! INTEGERP (XCHAR_TABLE (table)->extras[2]))
+ if (! FIXNUMP (XCHAR_TABLE (table)->extras[2]))
return NULL;
i = XINT (XCHAR_TABLE (table)->extras[2]);
if (i < 0 || i >= uniprop_encoder_count)
|| ! UNIPROP_TABLE_P (table))
return Qnil;
val = XCHAR_TABLE (table)->extras[1];
- if (INTEGERP (val)
+ if (FIXNUMP (val)
? (XINT (val) < 0 || XINT (val) >= uniprop_decoder_count)
: ! NILP (val))
return Qnil;
doc: /* Return buffer position N characters after (before if N negative) point. */)
(Lisp_Object n)
{
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
- return make_number (PT + XINT (n));
+ return make_fixnum (PT + XINT (n));
}
/* Add N to point; or subtract N if FORWARD is false. N defaults to 1.
if (NILP (n))
XSETFASTINT (n, 1);
else
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
new_point = PT + (forward ? XINT (n) : - XINT (n));
count = 1;
else
{
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
count = XINT (n);
}
&& (FETCH_BYTE (PT_BYTE - 1) != '\n'))))
shortage--;
- return make_number (count <= 0 ? - shortage : shortage);
+ return make_fixnum (count <= 0 ? - shortage : shortage);
}
DEFUN ("beginning-of-line", Fbeginning_of_line, Sbeginning_of_line, 0, 1, "^p",
if (NILP (n))
XSETFASTINT (n, 1);
else
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
SET_PT (XINT (Fline_beginning_position (n)));
if (NILP (n))
XSETFASTINT (n, 1);
else
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
while (1)
{
/* If we skipped something intangible
and now we're not really at eol,
keep going. */
- n = make_number (1);
+ n = make_fixnum (1);
else
break;
}
{
EMACS_INT pos;
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
if (eabs (XINT (n)) < 2)
call0 (Qundo_auto_amalgamate);
`post-self-insert-hook'. */)
(Lisp_Object n)
{
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
if (XINT (n) < 0)
error ("Negative repetition argument %"pI"d", XINT (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_number (c)))) != 0)
+ && (cwidth = XFASTINT (Fchar_width (make_fixnum (c)))) != 0)
{
ptrdiff_t pos = PT;
ptrdiff_t pos_byte = PT_BYTE;
character. In that case, the new point is set after
that character. */
ptrdiff_t actual_clm
- = XFASTINT (Fmove_to_column (make_number (target_clm), Qnil));
+ = XFASTINT (Fmove_to_column (make_fixnum (target_clm), Qnil));
chars_to_delete = PT - pos;
int mc = ((NILP (BVAR (current_buffer, enable_multibyte_characters))
&& SINGLE_BYTE_CHAR_P (c))
? UNIBYTE_TO_CHAR (c) : c);
- Lisp_Object string = Fmake_string (make_number (n), make_number (mc),
+ Lisp_Object string = Fmake_string (make_fixnum (n), make_fixnum (mc),
Qnil);
if (spaces_to_insert)
{
- tem = Fmake_string (make_number (spaces_to_insert),
- make_number (' '), Qnil);
+ tem = Fmake_string (make_fixnum (spaces_to_insert),
+ make_fixnum (' '), Qnil);
string = concat2 (string, tem);
}
replace_range (PT, PT + chars_to_delete, string, 1, 1, 1, 0);
- Fforward_char (make_number (n));
+ Fforward_char (make_fixnum (n));
}
else if (n > 1)
{
} while (0)
static void
-CHECK_NATNUM_CAR (Lisp_Object x)
+CHECK_FIXNAT_CAR (Lisp_Object x)
{
Lisp_Object tmp = XCAR (x);
- CHECK_NATNUM (tmp);
+ CHECK_FIXNAT (tmp);
XSETCAR (x, tmp);
}
static void
-CHECK_NATNUM_CDR (Lisp_Object x)
+CHECK_FIXNAT_CDR (Lisp_Object x)
{
Lisp_Object tmp = XCDR (x);
- CHECK_NATNUM (tmp);
+ CHECK_FIXNAT (tmp);
XSETCDR (x, tmp);
}
case CODING_ANNOTATE_CHARSET_MASK:
preferred_charset_id = charbuf[3];
if (preferred_charset_id >= 0
- && NILP (Fmemq (make_number (preferred_charset_id),
+ && NILP (Fmemq (make_fixnum (preferred_charset_id),
charset_list)))
preferred_charset_id = -1;
break;
case CODING_ANNOTATE_CHARSET_MASK:
preferred_charset_id = charbuf[2];
if (preferred_charset_id >= 0
- && NILP (Fmemq (make_number (preferred_charset_id),
+ && NILP (Fmemq (make_fixnum (preferred_charset_id),
charset_list)))
preferred_charset_id = -1;
break;
break;
found = CATEGORY_MASK_CHARSET;
}
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
charset = CHARSET_FROM_ID (XFASTINT (val));
dim = CHARSET_DIMENSION (charset);
code = c;
val = AREF (valids, c);
- if (! INTEGERP (val) && ! CONSP (val))
+ if (! FIXNUMP (val) && ! CONSP (val))
goto invalid_code;
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
charset = CHARSET_FROM_ID (XFASTINT (val));
dim = CHARSET_DIMENSION (charset);
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (translation_table)) > 1)
{
val = XCHAR_TABLE (translation_table)->extras[1];
- if (NATNUMP (val) && *max_lookup < XFASTINT (val))
+ if (FIXNATP (val) && *max_lookup < XFASTINT (val))
*max_lookup = min (XFASTINT (val), MAX_LOOKUP_MAX);
}
else if (CONSP (translation_table))
&& CHAR_TABLE_EXTRA_SLOTS (XCHAR_TABLE (XCAR (tail))) > 1)
{
Lisp_Object tailval = XCHAR_TABLE (XCAR (tail))->extras[1];
- if (NATNUMP (tailval) && *max_lookup < XFASTINT (tailval))
+ if (FIXNATP (tailval) && *max_lookup < XFASTINT (tailval))
*max_lookup = min (XFASTINT (tailval), MAX_LOOKUP_MAX);
}
}
static Lisp_Object
get_translation (Lisp_Object trans, int *buf, int *buf_end, ptrdiff_t *nchars)
{
- if (INTEGERP (trans) || VECTORP (trans))
+ if (FIXNUMP (trans) || VECTORP (trans))
{
*nchars = 1;
return trans;
if (! NILP (trans))
{
trans = get_translation (trans, buf, buf_end, &from_nchars);
- if (INTEGERP (trans))
+ if (FIXNUMP (trans))
c = XINT (trans);
else if (VECTORP (trans))
{
for (i = j = 0; i < len && charbuf[i] != -1; i++, j++)
{
if (charbuf[i] >= 0)
- args[j] = make_number (charbuf[i]);
+ args[j] = make_fixnum (charbuf[i]);
else
{
i++;
- args[j] = make_number (charbuf[i] % 0x100);
+ args[j] = make_fixnum (charbuf[i] % 0x100);
}
}
components = (i == j ? Fstring (j, args) : Fvector (j, args));
ptrdiff_t from = pos - charbuf[2];
struct charset *charset = CHARSET_FROM_ID (charbuf[3]);
- Fput_text_property (make_number (from), make_number (pos),
+ Fput_text_property (make_fixnum (from), make_fixnum (pos),
Qcharset, CHARSET_NAME (charset),
coding->dst_object);
}
buf++;
}
}
- else if (INTEGERP (components))
+ else if (FIXNUMP (components))
{
len = 1;
*buf++ = XINT (components);
Lisp_Object val, next;
int id;
- val = Fget_text_property (make_number (pos), Qcharset, coding->src_object);
+ val = Fget_text_property (make_fixnum (pos), Qcharset, coding->src_object);
if (! NILP (val) && CHARSETP (val))
id = XINT (CHARSET_SYMBOL_ID (val));
else
id = -1;
ADD_CHARSET_DATA (buf, 0, id);
- next = Fnext_single_property_change (make_number (pos), Qcharset,
+ next = Fnext_single_property_change (make_fixnum (pos), Qcharset,
coding->src_object,
- make_number (limit));
+ make_fixnum (limit));
*stop = XINT (next);
return buf;
}
lookup_buf_end = lookup_buf + i;
trans = get_translation (trans, lookup_buf, lookup_buf_end,
&from_nchars);
- if (INTEGERP (trans))
+ if (FIXNUMP (trans))
c = XINT (trans);
else if (VECTORP (trans))
{
bset_undo_list (current_buffer, Qt);
TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte);
val = call1 (CODING_ATTR_POST_READ (attrs),
- make_number (coding->produced_char));
- CHECK_NATNUM (val);
+ make_fixnum (coding->produced_char));
+ CHECK_FIXNAT (val);
coding->produced_char += Z - prev_Z;
coding->produced += Z_BYTE - prev_Z_BYTE;
}
bset_undo_list (current_buffer, Qt);
TEMP_SET_PT_BOTH (coding->dst_pos, coding->dst_pos_byte);
val = safe_call1 (CODING_ATTR_POST_READ (attrs),
- make_number (coding->produced_char));
- CHECK_NATNUM (val);
+ make_fixnum (coding->produced_char));
+ CHECK_FIXNAT (val);
coding->produced_char += Z - prev_Z;
coding->produced += Z_BYTE - prev_Z_BYTE;
unbind_to (count1, Qnil);
}
safe_call2 (CODING_ATTR_PRE_WRITE (attrs),
- make_number (BEG), make_number (Z));
+ make_fixnum (BEG), make_fixnum (Z));
if (XBUFFER (coding->src_object) != current_buffer)
kill_src_buffer = 1;
coding->src_object = Fcurrent_buffer ();
if (!STRING_MULTIBYTE (str) &&
SBYTES (str) & 1)
{
- str = Fsubstring (str, make_number (0), make_number (-1));
+ str = Fsubstring (str, make_fixnum (0), make_fixnum (-1));
}
return code_convert_string_norecord (str, Qutf_16le, 0);
{
detect_info.found = CATEGORY_MASK_RAW_TEXT;
id = CODING_SYSTEM_ID (Qno_conversion);
- val = list1 (make_number (id));
+ val = list1 (make_fixnum (id));
}
else if (! detect_info.rejected && ! detect_info.found)
{
detect_info.found = CATEGORY_MASK_ANY;
id = coding_categories[coding_category_undecided].id;
- val = list1 (make_number (id));
+ val = list1 (make_fixnum (id));
}
else if (highest)
{
if (detect_info.found)
{
detect_info.found = 1 << category;
- val = list1 (make_number (this->id));
+ val = list1 (make_fixnum (this->id));
}
else
for (i = 0; i < coding_category_raw_text; i++)
{
detect_info.found = 1 << coding_priorities[i];
id = coding_categories[coding_priorities[i]].id;
- val = list1 (make_number (id));
+ val = list1 (make_fixnum (id));
break;
}
}
found |= 1 << category;
id = coding_categories[category].id;
if (id >= 0)
- val = list1 (make_number (id));
+ val = list1 (make_fixnum (id));
}
}
for (i = coding_category_raw_text - 1; i >= 0; i--)
if (detect_info.found & (1 << category))
{
id = coding_categories[category].id;
- val = Fcons (make_number (id), val);
+ val = Fcons (make_fixnum (id), val);
}
}
detect_info.found |= found;
this = coding_categories + coding_category_utf_8_sig;
else
this = coding_categories + coding_category_utf_8_nosig;
- val = list1 (make_number (this->id));
+ val = list1 (make_fixnum (this->id));
}
}
else if (base_category == coding_category_utf_16_auto)
this = coding_categories + coding_category_utf_16_be_nosig;
else
this = coding_categories + coding_category_utf_16_le_nosig;
- val = list1 (make_number (this->id));
+ val = list1 (make_fixnum (this->id));
}
}
else
{
detect_info.found = 1 << XINT (CODING_ATTR_CATEGORY (attrs));
- val = list1 (make_number (coding.id));
+ val = list1 (make_fixnum (coding.id));
}
/* Then, detect eol-format if necessary. */
}
else
{
- CHECK_NUMBER_COERCE_MARKER (start);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (start);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
args_out_of_range (start, end);
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
n = 1;
else
{
- CHECK_NATNUM (count);
+ CHECK_FIXNAT (count);
n = XINT (count);
}
&& ! char_charset (translate_char (translation_table, c),
charset_list, NULL))
{
- positions = Fcons (make_number (from), positions);
+ positions = Fcons (make_fixnum (from), positions);
n--;
if (n == 0)
break;
}
else
{
- CHECK_NUMBER_COERCE_MARKER (start);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (start);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (start) < BEG || XINT (end) > Z || XINT (start) > XINT (end))
args_out_of_range (start, end);
if (NILP (BVAR (current_buffer, enable_multibyte_characters)))
{
elt = XCDR (XCAR (tail));
if (! char_encodable_p (c, XCAR (elt)))
- XSETCDR (elt, Fcons (make_number (pos), XCDR (elt)));
+ XSETCDR (elt, Fcons (make_fixnum (pos), XCDR (elt)));
}
if (charset_map_loaded)
{
Vlast_coding_system_used = CODING_ID_NAME (coding.id);
return (BUFFERP (dst_object)
- ? make_number (coding.produced_char)
+ ? make_fixnum (coding.produced_char)
: coding.dst_object);
}
Vlast_coding_system_used = CODING_ID_NAME (coding.id);
return (BUFFERP (dst_object)
- ? make_number (coding.produced_char)
+ ? make_fixnum (coding.produced_char)
: coding.dst_object);
}
EMACS_INT ch;
int c;
- CHECK_NATNUM (code);
+ CHECK_FIXNAT (code);
ch = XFASTINT (code);
CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec);
attrs = AREF (spec, 0);
c = DECODE_CHAR (charset, c);
if (c < 0)
error ("Invalid code: %"pI"d", ch);
- return make_number (c);
+ return make_fixnum (c);
}
error ("Can't encode by shift_jis encoding: %c", c);
JIS_TO_SJIS (code);
- return make_number (code);
+ return make_fixnum (code);
}
DEFUN ("decode-big5-char", Fdecode_big5_char, Sdecode_big5_char, 1, 1, 0,
EMACS_INT ch;
int c;
- CHECK_NATNUM (code);
+ CHECK_FIXNAT (code);
ch = XFASTINT (code);
CHECK_CODING_SYSTEM_GET_SPEC (Vbig5_coding_system, spec);
attrs = AREF (spec, 0);
c = DECODE_CHAR (charset, c);
if (c < 0)
error ("Invalid code: %"pI"d", ch);
- return make_number (c);
+ return make_fixnum (c);
}
DEFUN ("encode-big5-char", Fencode_big5_char, Sencode_big5_char, 1, 1, 0,
if (code == CHARSET_INVALID_CODE (charset))
error ("Can't encode by Big5 encoding: %c", c);
- return make_number (code);
+ return make_fixnum (code);
}
\f
tset_charset_list
(term, (terminal_coding->common_flags & CODING_REQUIRE_ENCODING_MASK
? coding_charset_list (terminal_coding)
- : list1 (make_number (charset_ascii))));
+ : list1 (make_fixnum (charset_ascii))));
return Qnil;
}
error ("Too few arguments");
operation = args[0];
if (!SYMBOLP (operation)
- || (target_idx = Fget (operation, Qtarget_idx), !NATNUMP (target_idx)))
+ || (target_idx = Fget (operation, Qtarget_idx), !FIXNATP (target_idx)))
error ("Invalid first argument");
if (nargs <= 1 + XFASTINT (target_idx))
error ("Too few arguments for operation `%s'",
|| (EQ (operation, Qinsert_file_contents) && CONSP (target)
&& STRINGP (XCAR (target)) && BUFFERP (XCDR (target)))
|| (EQ (operation, Qopen_network_stream)
- && (INTEGERP (target) || EQ (target, Qt)))))
+ && (FIXNUMP (target) || EQ (target, Qt)))))
error ("Invalid argument %"pI"d of operation `%s'",
XFASTINT (target_idx) + 1, SDATA (SYMBOL_NAME (operation)));
if (CONSP (target))
&& ((STRINGP (target)
&& STRINGP (XCAR (elt))
&& fast_string_match (XCAR (elt), target) >= 0)
- || (INTEGERP (target) && EQ (target, XCAR (elt)))))
+ || (FIXNUMP (target) && EQ (target, XCAR (elt)))))
{
val = XCDR (elt);
/* Here, if VAL is both a valid coding system and a valid
if (nargs < coding_arg_max)
goto short_args;
- attrs = Fmake_vector (make_number (coding_attr_last_index), Qnil);
+ attrs = Fmake_vector (make_fixnum (coding_attr_last_index), Qnil);
name = args[coding_arg_name];
CHECK_SYMBOL (name);
}
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
{
- if (! RANGED_INTEGERP (0, XCAR (tail), INT_MAX - 1))
+ 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));
error ("Can't handle charset `%s'",
SDATA (SYMBOL_NAME (CHARSET_NAME (charset))));
- XSETCAR (tail, make_number (charset->id));
+ XSETCAR (tail, make_fixnum (charset->id));
if (max_charset_id < charset->id)
max_charset_id = charset->id;
}
val = args[coding_arg_default_char];
if (NILP (val))
- ASET (attrs, coding_attr_default_char, make_number (' '));
+ ASET (attrs, coding_attr_default_char, make_fixnum (' '));
else
{
CHECK_CHARACTER (val);
If Nth element is a list of charset IDs, N is the first byte
of one of them. The list is sorted by dimensions of the
charsets. A charset of smaller dimension comes first. */
- val = Fmake_vector (make_number (256), Qnil);
+ val = Fmake_vector (make_fixnum (256), Qnil);
for (tail = charset_list; CONSP (tail); tail = XCDR (tail))
{
tmp = AREF (val, i);
if (NILP (tmp))
tmp = XCAR (tail);
- else if (NUMBERP (tmp))
+ else if (FIXED_OR_FLOATP (tmp))
{
dim2 = CHARSET_DIMENSION (CHARSET_FROM_ID (XFASTINT (tmp)));
if (dim < dim2)
ASET (attrs, coding_attr_ccl_encoder, val);
val = args[coding_arg_ccl_valids];
- valids = Fmake_string (make_number (256), make_number (0), Qnil);
+ valids = Fmake_string (make_fixnum (256), make_fixnum (0), Qnil);
for (tail = val; CONSP (tail); tail = XCDR (tail))
{
int from, to;
val = XCAR (tail);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
if (! (0 <= XINT (val) && XINT (val) <= 255))
- args_out_of_range_3 (val, make_number (0), make_number (255));
+ args_out_of_range_3 (val, make_fixnum (0), make_fixnum (255));
from = to = XINT (val);
}
else
{
CHECK_CONS (val);
- CHECK_NATNUM_CAR (val);
- CHECK_NUMBER_CDR (val);
+ CHECK_FIXNAT_CAR (val);
+ CHECK_FIXNUM_CDR (val);
if (XINT (XCAR (val)) > 255)
args_out_of_range_3 (XCAR (val),
- make_number (0), make_number (255));
+ make_fixnum (0), make_fixnum (255));
from = XINT (XCAR (val));
if (! (from <= XINT (XCDR (val)) && XINT (XCDR (val)) <= 255))
args_out_of_range_3 (XCDR (val),
- XCAR (val), make_number (255));
+ XCAR (val), make_fixnum (255));
to = XINT (XCDR (val));
}
for (i = from; i <= to; i++)
struct charset *charset;
CHECK_CHARSET_GET_CHARSET (val, charset);
- ASET (initial, i, make_number (CHARSET_ID (charset)));
+ ASET (initial, i, make_fixnum (CHARSET_ID (charset)));
if (i == 0 && CHARSET_ASCII_COMPATIBLE_P (charset))
ASET (attrs, coding_attr_ascii_compat, Qt);
}
else
- ASET (initial, i, make_number (-1));
+ ASET (initial, i, make_fixnum (-1));
}
reg_usage = args[coding_arg_iso2022_reg_usage];
CHECK_CONS (reg_usage);
- CHECK_NUMBER_CAR (reg_usage);
- CHECK_NUMBER_CDR (reg_usage);
+ CHECK_FIXNUM_CAR (reg_usage);
+ CHECK_FIXNUM_CDR (reg_usage);
request = Fcopy_sequence (args[coding_arg_iso2022_request]);
for (tail = request; CONSP (tail); tail = XCDR (tail))
CHECK_CONS (val);
tmp1 = XCAR (val);
CHECK_CHARSET_GET_ID (tmp1, id);
- CHECK_NATNUM_CDR (val);
+ CHECK_FIXNAT_CDR (val);
if (XINT (XCDR (val)) >= 4)
error ("Invalid graphic register number: %"pI"d", XINT (XCDR (val)));
- XSETCAR (val, make_number (id));
+ XSETCAR (val, make_fixnum (id));
}
flags = args[coding_arg_iso2022_flags];
- CHECK_NATNUM (flags);
+ CHECK_FIXNAT (flags);
i = XINT (flags) & INT_MAX;
if (EQ (args[coding_arg_charset_list], Qiso_2022))
i |= CODING_ISO_FLAG_FULL_SUPPORT;
- flags = make_number (i);
+ flags = make_fixnum (i);
ASET (attrs, coding_attr_iso_initial, initial);
ASET (attrs, coding_attr_iso_usage, reg_usage);
error ("Invalid coding system type: %s",
SDATA (SYMBOL_NAME (coding_type)));
- ASET (attrs, coding_attr_category, make_number (category));
+ ASET (attrs, coding_attr_category, make_fixnum (category));
ASET (attrs, coding_attr_plist,
Fcons (QCcategory,
Fcons (AREF (Vcoding_category_table, category),
short_args:
Fsignal (Qwrong_number_of_arguments,
Fcons (intern ("define-coding-system-internal"),
- make_number (nargs)));
+ make_fixnum (nargs)));
}
else if (EQ (prop, QCdefault_char))
{
if (NILP (val))
- val = make_number (' ');
+ val = make_fixnum (' ');
else
CHECK_CHARACTER (val);
ASET (attrs, coding_attr_default_char, val);
if (VECTORP (eol_type))
return Fcopy_sequence (eol_type);
n = EQ (eol_type, Qunix) ? 0 : EQ (eol_type, Qdos) ? 1 : 2;
- return make_number (n);
+ return make_fixnum (n);
}
#endif /* emacs */
Fset (Qcoding_system_history, Qnil);
/* Target FILENAME is the first argument. */
- Fput (Qinsert_file_contents, Qtarget_idx, make_number (0));
+ Fput (Qinsert_file_contents, Qtarget_idx, make_fixnum (0));
/* Target FILENAME is the third argument. */
- Fput (Qwrite_region, Qtarget_idx, make_number (2));
+ Fput (Qwrite_region, Qtarget_idx, make_fixnum (2));
DEFSYM (Qcall_process, "call-process");
/* Target PROGRAM is the first argument. */
- Fput (Qcall_process, Qtarget_idx, make_number (0));
+ Fput (Qcall_process, Qtarget_idx, make_fixnum (0));
DEFSYM (Qcall_process_region, "call-process-region");
/* Target PROGRAM is the third argument. */
- Fput (Qcall_process_region, Qtarget_idx, make_number (2));
+ Fput (Qcall_process_region, Qtarget_idx, make_fixnum (2));
DEFSYM (Qstart_process, "start-process");
/* Target PROGRAM is the third argument. */
- Fput (Qstart_process, Qtarget_idx, make_number (2));
+ Fput (Qstart_process, Qtarget_idx, make_fixnum (2));
DEFSYM (Qopen_network_stream, "open-network-stream");
/* Target SERVICE is the fourth argument. */
- Fput (Qopen_network_stream, Qtarget_idx, make_number (3));
+ Fput (Qopen_network_stream, Qtarget_idx, make_fixnum (3));
DEFSYM (Qunix, "unix");
DEFSYM (Qdos, "dos");
build_pure_c_string ("Invalid coding system"));
DEFSYM (Qtranslation_table, "translation-table");
- Fput (Qtranslation_table, Qchar_table_extra_slots, make_number (2));
+ Fput (Qtranslation_table, Qchar_table_extra_slots, make_fixnum (2));
DEFSYM (Qtranslation_table_id, "translation-table-id");
/* Coding system emacs-mule and raw-text are for converting only
DEFSYM (QCascii_compatible_p, ":ascii-compatible-p");
Vcoding_category_table
- = Fmake_vector (make_number (coding_category_max), Qnil);
+ = Fmake_vector (make_fixnum (coding_category_max), Qnil);
staticpro (&Vcoding_category_table);
/* Followings are target of code detection. */
ASET (Vcoding_category_table, coding_category_iso_7,
`accept-latin-extra-code' t (e.g. iso-latin-1) on reading a file
or reading output of a subprocess.
Only 128th through 159th elements have a meaning. */);
- Vlatin_extra_code_table = Fmake_vector (make_number (256), Qnil);
+ Vlatin_extra_code_table = Fmake_vector (make_fixnum (256), Qnil);
DEFVAR_LISP ("select-safe-coding-system-function",
Vselect_safe_coding_system_function,
QCname,
args[coding_arg_name] = Qno_conversion,
QCmnemonic,
- args[coding_arg_mnemonic] = make_number ('='),
+ args[coding_arg_mnemonic] = make_fixnum ('='),
intern_c_string (":coding-type"),
args[coding_arg_coding_type] = Qraw_text,
QCascii_compatible_p,
args[coding_arg_ascii_compatible_p] = Qt,
QCdefault_char,
- args[coding_arg_default_char] = make_number (0),
+ args[coding_arg_default_char] = make_fixnum (0),
intern_c_string (":for-unibyte"),
args[coding_arg_for_unibyte] = Qt,
intern_c_string (":docstring"),
Fdefine_coding_system_internal (coding_arg_max, args);
plist[1] = args[coding_arg_name] = Qundecided;
- plist[3] = args[coding_arg_mnemonic] = make_number ('-');
+ plist[3] = args[coding_arg_mnemonic] = make_fixnum ('-');
plist[5] = args[coding_arg_coding_type] = Qundecided;
/* This is already set.
plist[7] = args[coding_arg_ascii_compatible_p] = Qt; */
"automatic conversion on decoding.");
plist[15] = args[coding_arg_eol_type] = Qnil;
args[coding_arg_plist] = CALLMANY (Flist, plist);
- args[coding_arg_undecided_inhibit_null_byte_detection] = make_number (0);
- args[coding_arg_undecided_inhibit_iso_escape_detection] = make_number (0);
+ args[coding_arg_undecided_inhibit_null_byte_detection] = make_fixnum (0);
+ args[coding_arg_undecided_inhibit_iso_escape_detection] = make_fixnum (0);
Fdefine_coding_system_internal (coding_arg_undecided_max, args);
setup_coding_system (Qno_conversion, &safe_terminal_coding);
goto invalid_composition;
id = XCAR (prop);
- if (INTEGERP (id))
+ if (FIXNUMP (id))
{
/* PROP should be Form-B. */
if (XINT (id) < 0 || XINT (id) >= n_compositions)
if (!CONSP (id))
goto invalid_composition;
length = XCAR (id);
- if (!INTEGERP (length) || XINT (length) != nchars)
+ if (!FIXNUMP (length) || XINT (length) != nchars)
goto invalid_composition;
components = XCDR (id);
by consulting composition_hash_table. The key for this table is
COMPONENTS (converted to a vector COMPONENTS-VEC) or, if it is
nil, vector of characters in the composition range. */
- if (INTEGERP (components))
- key = Fmake_vector (make_number (1), components);
+ if (FIXNUMP (components))
+ key = Fmake_vector (make_fixnum (1), components);
else if (STRINGP (components) || CONSP (components))
key = Fvconcat (1, &components);
else if (VECTORP (components))
for (i = 0; i < nchars; i++)
{
FETCH_STRING_CHAR_ADVANCE (ch, string, charpos, bytepos);
- ASET (key, i, make_number (ch));
+ ASET (key, i, make_fixnum (ch));
}
else
for (i = 0; i < nchars; i++)
{
FETCH_CHAR_ADVANCE (ch, charpos, bytepos);
- ASET (key, i, make_number (ch));
+ ASET (key, i, make_fixnum (ch));
}
}
else
key = HASH_KEY (hash_table, hash_index);
id = HASH_VALUE (hash_table, hash_index);
XSETCAR (prop, id);
- XSETCDR (prop, Fcons (make_number (nchars), Fcons (key, XCDR (prop))));
+ XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop))));
return XINT (id);
}
composition rule). */
for (i = 0; i < len; i++)
{
- if (!INTEGERP (key_contents[i]))
+ if (!FIXNUMP (key_contents[i]))
goto invalid_composition;
}
}
the cons cell of PROP because it is not shared. */
XSETFASTINT (id, n_compositions);
XSETCAR (prop, id);
- XSETCDR (prop, Fcons (make_number (nchars), Fcons (key, XCDR (prop))));
+ XSETCDR (prop, Fcons (make_fixnum (nchars), Fcons (key, XCDR (prop))));
/* Register the composition in composition_hash_table. */
hash_index = hash_put (hash_table, key, id, hash_code);
method = (NILP (components)
? COMPOSITION_RELATIVE
- : ((INTEGERP (components) || STRINGP (components))
+ : ((FIXNUMP (components) || STRINGP (components))
? COMPOSITION_WITH_ALTCHARS
: COMPOSITION_WITH_RULE_ALTCHARS));
if (limit > pos) /* search forward */
{
- val = Fnext_single_property_change (make_number (pos), Qcomposition,
- object, make_number (limit));
+ val = Fnext_single_property_change (make_fixnum (pos), Qcomposition,
+ object, make_fixnum (limit));
pos = XINT (val);
if (pos == limit)
return 0;
if (get_property_and_range (pos - 1, Qcomposition, prop, start, end,
object))
return 1;
- val = Fprevious_single_property_change (make_number (pos), Qcomposition,
- object, make_number (limit));
+ val = Fprevious_single_property_change (make_fixnum (pos), Qcomposition,
+ object, make_fixnum (limit));
pos = XINT (val);
if (pos == limit)
return 0;
&& !composition_valid_p (start, end, prop))
to = end;
if (!NILP (Ffboundp (func)))
- call2 (func, make_number (from), make_number (to));
+ call2 (func, make_fixnum (from), make_fixnum (to));
}
/* Make invalid compositions adjacent to or inside FROM and TO valid.
if (end > to)
max_pos = end;
if (from < end)
- Fput_text_property (make_number (from), make_number (end),
+ Fput_text_property (make_fixnum (from), make_fixnum (end),
Qcomposition,
Fcons (XCAR (prop), XCDR (prop)), Qnil);
run_composition_function (start, end, prop);
the former to the copy of it. */
if (to < end)
{
- Fput_text_property (make_number (start), make_number (to),
+ Fput_text_property (make_fixnum (start), make_fixnum (to),
Qcomposition,
Fcons (XCAR (prop), XCDR (prop)), Qnil);
max_pos = end;
specbind (Qinhibit_read_only, Qt);
specbind (Qinhibit_modification_hooks, Qt);
specbind (Qinhibit_point_motion_hooks, Qt);
- Fremove_list_of_text_properties (make_number (min_pos),
- make_number (max_pos),
+ Fremove_list_of_text_properties (make_fixnum (min_pos),
+ make_fixnum (max_pos),
list1 (Qauto_composed), Qnil);
unbind_to (count, Qnil);
}
{
Lisp_Object prop;
- prop = Fcons (Fcons (make_number (end - start), components),
+ prop = Fcons (Fcons (make_fixnum (end - start), components),
modification_func);
- Fput_text_property (make_number (start), make_number (end),
+ Fput_text_property (make_fixnum (start), make_fixnum (end),
Qcomposition, prop, string);
}
len = j;
}
- copy = Fmake_vector (make_number (len + 2), Qnil);
+ copy = Fmake_vector (make_fixnum (len + 2), Qnil);
LGSTRING_SET_HEADER (copy, Fcopy_sequence (header));
for (i = 0; i < len; i++)
LGSTRING_SET_GLYPH (copy, i, Fcopy_sequence (LGSTRING_GLYPH (gstring, i)));
i = hash_put (h, LGSTRING_HEADER (copy), copy, hash);
- LGSTRING_SET_ID (copy, make_number (i));
+ LGSTRING_SET_ID (copy, make_fixnum (i));
return copy;
}
Clear composition cache. */)
(void)
{
- Lisp_Object args[] = {QCtest, Qequal, QCsize, make_number (311)};
+ Lisp_Object args[] = {QCtest, Qequal, QCsize, make_fixnum (311)};
gstring_hash_table = CALLMANY (Fmake_hash_table, args);
/* Fixme: We call Fclear_face_cache to force complete re-building of
display glyphs. But, it may be better to call this function from
&& ! CODING_SYSTEM_P (LGSTRING_FONT (gstring))))
return 0;
for (i = 1; i < ASIZE (LGSTRING_HEADER (gstring)); i++)
- if (! NATNUMP (AREF (LGSTRING_HEADER (gstring), i)))
+ if (! FIXNATP (AREF (LGSTRING_HEADER (gstring), i)))
return 0;
- if (! NILP (LGSTRING_ID (gstring)) && ! NATNUMP (LGSTRING_ID (gstring)))
+ if (! NILP (LGSTRING_ID (gstring)) && ! FIXNATP (LGSTRING_ID (gstring)))
return 0;
for (i = 0; i < LGSTRING_GLYPH_LEN (gstring); i++)
{
if (VECTORP (header))
{
if (ASIZE (header) != len + 1)
- args_out_of_range (header, make_number (len + 1));
+ args_out_of_range (header, make_fixnum (len + 1));
}
else
{
FETCH_CHAR_ADVANCE_NO_CHECK (c, from, from_byte);
else
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, from, from_byte);
- ASET (header, i + 1, make_number (c));
+ ASET (header, i + 1, make_fixnum (c));
}
return header;
}
Lisp_Object string)
{
ptrdiff_t count = SPECPDL_INDEX ();
- Lisp_Object pos = make_number (charpos);
+ Lisp_Object pos = make_fixnum (charpos);
ptrdiff_t to;
ptrdiff_t pt = PT, pt_byte = PT_BYTE;
Lisp_Object re, font_object, lgstring;
return unbind_to (count, Qnil);
}
#endif
- lgstring = Fcomposition_get_gstring (pos, make_number (to), font_object,
+ lgstring = Fcomposition_get_gstring (pos, make_fixnum (to), font_object,
string);
if (NILP (LGSTRING_ID (lgstring)))
{
record_unwind_protect (restore_point_unwind,
build_marker (current_buffer, pt, pt_byte));
lgstring = safe_call (6, Vauto_composition_function, AREF (rule, 2),
- pos, make_number (to), font_object, string);
+ pos, make_fixnum (to), font_object, string);
}
return unbind_to (count, lgstring);
}
return (c > ' '
&& (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER
|| (val = CHAR_TABLE_REF (Vunicode_category_table, c),
- (INTEGERP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
+ (FIXNUMP (val) && (XINT (val) <= UNICODE_CATEGORY_So)))));
}
/* Update cmp_it->stop_pos to the next position after CHARPOS (and
{
Lisp_Object elt = XCAR (val);
if (VECTORP (elt) && ASIZE (elt) == 3
- && NATNUMP (AREF (elt, 1))
+ && FIXNATP (AREF (elt, 1))
&& charpos - 1 - XFASTINT (AREF (elt, 1)) >= start)
{
cmp_it->rule_idx = ridx;
{
Lisp_Object elt = XCAR (val);
if (VECTORP (elt) && ASIZE (elt) == 3
- && NATNUMP (AREF (elt, 1))
+ && FIXNATP (AREF (elt, 1))
&& charpos - XFASTINT (AREF (elt, 1)) > endpos)
{
ptrdiff_t back = XFASTINT (AREF (elt, 1));
{
elt = XCAR (val);
if (! VECTORP (elt) || ASIZE (elt) != 3
- || ! INTEGERP (AREF (elt, 1)))
+ || ! FIXNUMP (AREF (elt, 1)))
continue;
if (XFASTINT (AREF (elt, 1)) != cmp_it->lookback)
goto no_composition;
{
Lisp_Object elt = XCAR (val);
- if (VECTORP (elt) && ASIZE (elt) == 3 && NATNUMP (AREF (elt, 1)))
+ if (VECTORP (elt) && ASIZE (elt) == 3 && FIXNATP (AREF (elt, 1)))
{
EMACS_INT check_pos = cur.pos - XFASTINT (AREF (elt, 1));
struct position_record check;
return gstring;
if (LGSTRING_GLYPH_LEN (gstring_work) < topos - frompos)
- gstring_work = Fmake_vector (make_number (topos - frompos + 2), Qnil);
+ gstring_work = Fmake_vector (make_fixnum (topos - frompos + 2), Qnil);
LGSTRING_SET_HEADER (gstring_work, header);
LGSTRING_SET_ID (gstring_work, Qnil);
fill_gstring_body (gstring_work);
{
validate_region (&start, &end);
if (!NILP (components)
- && !INTEGERP (components)
+ && !FIXNUMP (components)
&& !CONSP (components)
&& !STRINGP (components))
CHECK_VECTOR (components);
ptrdiff_t start, end, from, to;
int id;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (!NILP (limit))
{
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
to = min (XINT (limit), ZV);
}
else
&& ! NILP (Vauto_composition_mode)
&& find_automatic_composition (from, to, &start, &end, &gstring,
string))
- return list3 (make_number (start), make_number (end), gstring);
+ return list3 (make_fixnum (start), make_fixnum (end), gstring);
return Qnil;
}
if ((end <= XINT (pos) || start > XINT (pos)))
if (find_automatic_composition (from, to, &s, &e, &gstring, string)
&& (e <= XINT (pos) ? e > end : s < start))
- return list3 (make_number (s), make_number (e), gstring);
+ return list3 (make_fixnum (s), make_fixnum (e), gstring);
}
if (!composition_valid_p (start, end, prop))
- return list3 (make_number (start), make_number (end), Qnil);
+ return list3 (make_fixnum (start), make_fixnum (end), Qnil);
if (NILP (detail_p))
- return list3 (make_number (start), make_number (end), Qt);
+ return list3 (make_fixnum (start), make_fixnum (end), Qt);
if (composition_registered_p (prop))
id = COMPOSITION_ID (prop);
relative_p = (method == COMPOSITION_WITH_RULE_ALTCHARS
? Qnil : Qt);
mod_func = COMPOSITION_MODIFICATION_FUNC (prop);
- tail = list4 (components, relative_p, mod_func, make_number (width));
+ tail = list4 (components, relative_p, mod_func, make_fixnum (width));
}
else
tail = Qnil;
- return Fcons (make_number (start), Fcons (make_number (end), tail));
+ return Fcons (make_fixnum (start), Fcons (make_fixnum (end), tail));
}
\f
created compositions are repeatedly used in an Emacs session,
and thus it's not worth to save memory in such a way. So, we
make the table not weak. */
- Lisp_Object args[] = {QCtest, Qequal, QCsize, make_number (311)};
+ Lisp_Object args[] = {QCtest, Qequal, QCsize, make_fixnum (311)};
composition_hash_table = CALLMANY (Fmake_hash_table, args);
staticpro (&composition_hash_table);
staticpro (&gstring_work_headers);
gstring_work_headers = make_uninit_vector (8);
for (i = 0; i < 8; i++)
- ASET (gstring_work_headers, i, Fmake_vector (make_number (i + 2), Qnil));
+ ASET (gstring_work_headers, i, Fmake_vector (make_fixnum (i + 2), Qnil));
staticpro (&gstring_work);
- gstring_work = Fmake_vector (make_number (10), Qnil);
+ gstring_work = Fmake_vector (make_fixnum (10), Qnil);
/* Text property `composition' should be nonsticky by default. */
Vtext_property_default_nonsticky
INLINE bool
composition_registered_p (Lisp_Object prop)
{
- return INTEGERP (XCAR (prop));
+ return FIXNUMP (XCAR (prop));
}
/* Return ID number of the already registered composition. */
Lisp_Object temp = XCDR (XCAR (prop));
return (NILP (temp)
? COMPOSITION_RELATIVE
- : INTEGERP (temp) || STRINGP (temp)
+ : FIXNUMP (temp) || STRINGP (temp)
? COMPOSITION_WITH_ALTCHARS
: COMPOSITION_WITH_RULE_ALTCHARS);
}
&& (NILP (XCDR (XCAR (prop)))
|| STRINGP (XCDR (XCAR (prop)))
|| VECTORP (XCDR (XCAR (prop)))
- || INTEGERP (XCDR (XCAR (prop)))
+ || FIXNUMP (XCDR (XCAR (prop)))
|| CONSP (XCDR (XCAR (prop))))))
&& COMPOSITION_LENGTH (prop) == end - start);
}
LGLYPH_SIZE
};
-#define LGLYPH_NEW() Fmake_vector (make_number (LGLYPH_SIZE), Qnil)
+#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_ASCENT(g) XINT (AREF ((g), LGLYPH_IX_ASCENT))
#define LGLYPH_DESCENT(g) XINT (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_number (val))
-#define LGLYPH_SET_TO(g, val) ASET ((g), LGLYPH_IX_TO, make_number (val))
-#define LGLYPH_SET_CHAR(g, val) ASET ((g), LGLYPH_IX_CHAR, make_number (val))
+#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))
+#define LGLYPH_SET_CHAR(g, val) ASET ((g), LGLYPH_IX_CHAR, make_fixnum (val))
/* Callers must assure that VAL is not negative! */
#define LGLYPH_SET_CODE(g, val) \
ASET (g, LGLYPH_IX_CODE, \
val == FONT_INVALID_CODE ? Qnil : INTEGER_TO_CONS (val))
-#define LGLYPH_SET_WIDTH(g, val) ASET ((g), LGLYPH_IX_WIDTH, make_number (val))
-#define LGLYPH_SET_LBEARING(g, val) ASET ((g), LGLYPH_IX_LBEARING, make_number (val))
-#define LGLYPH_SET_RBEARING(g, val) ASET ((g), LGLYPH_IX_RBEARING, make_number (val))
-#define LGLYPH_SET_ASCENT(g, val) ASET ((g), LGLYPH_IX_ASCENT, make_number (val))
-#define LGLYPH_SET_DESCENT(g, val) ASET ((g), LGLYPH_IX_DESCENT, make_number (val))
+#define LGLYPH_SET_WIDTH(g, val) ASET ((g), LGLYPH_IX_WIDTH, make_fixnum (val))
+#define LGLYPH_SET_LBEARING(g, val) ASET ((g), LGLYPH_IX_LBEARING, make_fixnum (val))
+#define LGLYPH_SET_RBEARING(g, val) ASET ((g), LGLYPH_IX_RBEARING, make_fixnum (val))
+#define LGLYPH_SET_ASCENT(g, val) ASET ((g), LGLYPH_IX_ASCENT, make_fixnum (val))
+#define LGLYPH_SET_DESCENT(g, val) ASET ((g), LGLYPH_IX_DESCENT, make_fixnum (val))
#define LGLYPH_SET_ADJUSTMENT(g, val) ASET ((g), LGLYPH_IX_ADJUSTMENT, (val))
#define LGLYPH_XOFF(g) (VECTORP (LGLYPH_ADJUSTMENT (g)) \
/* Tell regex.c to use a type compatible with Emacs. */
#define RE_TRANSLATE_TYPE Lisp_Object
#define RE_TRANSLATE(TBL, C) char_table_translate (TBL, C)
-#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_number (0)))
+#define RE_TRANSLATE_P(TBL) (!EQ (TBL, make_fixnum (0)))
#endif
/* Tell time_rz.c to use Emacs's getter and setter for TZ.
static _Noreturn void
wrong_length_argument (Lisp_Object a1, Lisp_Object a2, Lisp_Object a3)
{
- Lisp_Object size1 = make_number (bool_vector_size (a1));
- Lisp_Object size2 = make_number (bool_vector_size (a2));
+ Lisp_Object size1 = make_fixnum (bool_vector_size (a1));
+ Lisp_Object size2 = make_fixnum (bool_vector_size (a2));
if (NILP (a3))
xsignal2 (Qwrong_length_argument, size1, size2);
else
xsignal3 (Qwrong_length_argument, size1, size2,
- make_number (bool_vector_size (a3)));
+ make_fixnum (bool_vector_size (a3)));
}
_Noreturn void
attributes: const)
(Lisp_Object object)
{
- if (INTEGERP (object))
+ if (FIXNUMP (object))
return Qt;
return Qnil;
}
doc: /* Return t if OBJECT is an integer or a marker (editor pointer). */)
(register Lisp_Object object)
{
- if (MARKERP (object) || INTEGERP (object))
+ if (MARKERP (object) || FIXNUMP (object))
return Qt;
return Qnil;
}
attributes: const)
(Lisp_Object object)
{
- if (NATNUMP (object))
+ if (FIXNATP (object))
return Qt;
return Qnil;
}
attributes: const)
(Lisp_Object object)
{
- if (NUMBERP (object))
+ if (FIXED_OR_FLOATP (object))
return Qt;
else
return Qnil;
doc: /* Return t if OBJECT is a number or a marker. */)
(Lisp_Object object)
{
- if (NUMBERP (object) || MARKERP (object))
+ if (FIXED_OR_FLOATP (object) || MARKERP (object))
return Qt;
return Qnil;
}
CHECK_SUBR (subr);
minargs = XSUBR (subr)->min_args;
maxargs = XSUBR (subr)->max_args;
- return Fcons (make_number (minargs),
+ return Fcons (make_fixnum (minargs),
maxargs == MANY ? Qmany
: maxargs == UNEVALLED ? Qunevalled
- : make_number (maxargs));
+ : make_fixnum (maxargs));
}
DEFUN ("subr-name", Fsubr_name, Ssubr_name, 1, 1, 0,
switch (XFWDTYPE (valcontents))
{
case Lisp_Fwd_Int:
- CHECK_NUMBER (newval);
+ CHECK_FIXNUM (newval);
*XINTFWD (valcontents)->intvar = XINT (newval);
break;
else if ((prop = Fget (predicate, Qrange), !NILP (prop)))
{
Lisp_Object min = XCAR (prop), max = XCDR (prop);
- if (! NUMBERP (newval)
+ if (! FIXED_OR_FLOATP (newval)
|| NILP (CALLN (Fleq, min, newval, max)))
wrong_range (min, max, newval);
}
{
register EMACS_INT idxval;
- CHECK_NUMBER (idx);
+ CHECK_FIXNUM (idx);
idxval = XINT (idx);
if (STRINGP (array))
{
if (idxval < 0 || idxval >= SCHARS (array))
args_out_of_range (array, idx);
if (! STRING_MULTIBYTE (array))
- return make_number ((unsigned char) SREF (array, idxval));
+ return make_fixnum ((unsigned char) SREF (array, idxval));
idxval_byte = string_char_to_byte (array, idxval);
c = STRING_CHAR (SDATA (array) + idxval_byte);
- return make_number (c);
+ return make_fixnum (c);
}
else if (BOOL_VECTOR_P (array))
{
{
register EMACS_INT idxval;
- CHECK_NUMBER (idx);
+ CHECK_FIXNUM (idx);
idxval = XINT (idx);
if (! RECORDP (array))
CHECK_ARRAY (array, Qarrayp);
bool fneq;
bool test;
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num1);
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (num2);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (num1);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (num2);
/* If either arg is floating point, set F1 and F2 to the 'double'
approximations of the two arguments, and set FNEQ if floating-point
(eassert (FIXNUM_OVERFLOW_P (i)), \
(! (FIXNUM_OVERFLOW_P ((extremum) >> 16) \
&& FIXNUM_OVERFLOW_P ((i) >> 16)) \
- ? Fcons (make_number ((i) >> 16), make_number ((i) & 0xffff)) \
+ ? Fcons (make_fixnum ((i) >> 16), make_fixnum ((i) & 0xffff)) \
: ! (FIXNUM_OVERFLOW_P ((extremum) >> 16 >> 24) \
&& FIXNUM_OVERFLOW_P ((i) >> 16 >> 24)) \
- ? Fcons (make_number ((i) >> 16 >> 24), \
- Fcons (make_number ((i) >> 16 & 0xffffff), \
- make_number ((i) & 0xffff))) \
+ ? Fcons (make_fixnum ((i) >> 16 >> 24), \
+ Fcons (make_fixnum ((i) >> 16 & 0xffffff), \
+ make_fixnum ((i) & 0xffff))) \
: make_float (i)))
Lisp_Object
{
bool valid = false;
uintmax_t val UNINIT;
- if (INTEGERP (c))
+ if (FIXNUMP (c))
{
valid = XINT (c) >= 0;
val = XINT (c);
valid = val == d;
}
}
- else if (CONSP (c) && NATNUMP (XCAR (c)))
+ else if (CONSP (c) && FIXNATP (XCAR (c)))
{
uintmax_t top = XFASTINT (XCAR (c));
Lisp_Object rest = XCDR (c);
if (top <= UINTMAX_MAX >> 24 >> 16
&& CONSP (rest)
- && NATNUMP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
- && NATNUMP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
+ && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
+ && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
{
uintmax_t mid = XFASTINT (XCAR (rest));
val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest));
{
if (CONSP (rest))
rest = XCAR (rest);
- if (NATNUMP (rest) && XFASTINT (rest) < 1 << 16)
+ if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16)
{
val = top << 16 | XFASTINT (rest);
valid = true;
{
bool valid = false;
intmax_t val UNINIT;
- if (INTEGERP (c))
+ if (FIXNUMP (c))
{
val = XINT (c);
valid = true;
valid = val == d;
}
}
- else if (CONSP (c) && INTEGERP (XCAR (c)))
+ else if (CONSP (c) && FIXNUMP (XCAR (c)))
{
intmax_t top = XINT (XCAR (c));
Lisp_Object rest = XCDR (c);
if (top >= INTMAX_MIN >> 24 >> 16 && top <= INTMAX_MAX >> 24 >> 16
&& CONSP (rest)
- && NATNUMP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
- && NATNUMP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
+ && FIXNATP (XCAR (rest)) && XFASTINT (XCAR (rest)) < 1 << 24
+ && FIXNATP (XCDR (rest)) && XFASTINT (XCDR (rest)) < 1 << 16)
{
intmax_t mid = XFASTINT (XCAR (rest));
val = top << 24 << 16 | mid << 16 | XFASTINT (XCDR (rest));
{
if (CONSP (rest))
rest = XCAR (rest);
- if (NATNUMP (rest) && XFASTINT (rest) < 1 << 16)
+ if (FIXNATP (rest) && XFASTINT (rest) < 1 << 16)
{
val = top << 16 | XFASTINT (rest);
valid = true;
char buffer[max (FLOAT_TO_STRING_BUFSIZE, INT_BUFSIZE_BOUND (EMACS_INT))];
int len;
- CHECK_NUMBER_OR_FLOAT (number);
+ CHECK_FIXNUM_OR_FLOAT (number);
if (FLOATP (number))
len = float_to_string (buffer, XFLOAT_DATA (number));
b = 10;
else
{
- CHECK_NUMBER (base);
+ CHECK_FIXNUM (base);
if (! (XINT (base) >= 2 && XINT (base) <= 16))
xsignal1 (Qargs_out_of_range, base);
b = XINT (base);
int flags = S2N_IGNORE_TRAILING | S2N_OVERFLOW_TO_FLOAT;
Lisp_Object val = string_to_number (p, b, flags);
- return NILP (val) ? make_number (0) : val;
+ return NILP (val) ? make_fixnum (0) : val;
}
\f
enum arithop
ok_accum = accum;
}
- /* Using args[argnum] as argument to CHECK_NUMBER_... */
+ /* Using args[argnum] as argument to CHECK_FIXNUM_... */
val = args[argnum];
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val);
if (FLOATP (val))
return float_arith_driver (ok_accum, ok_args, code,
for (; argnum < nargs; argnum++)
{
- val = args[argnum]; /* using args[argnum] as argument to CHECK_NUMBER_... */
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val);
+ val = args[argnum]; /* using args[argnum] as argument to CHECK_FIXNUM_... */
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val);
if (FLOATP (val))
{
{
Lisp_Object val;
- CHECK_NUMBER_COERCE_MARKER (x);
- CHECK_NUMBER_COERCE_MARKER (y);
+ CHECK_FIXNUM_COERCE_MARKER (x);
+ CHECK_FIXNUM_COERCE_MARKER (y);
if (XINT (y) == 0)
xsignal0 (Qarith_error);
Lisp_Object val;
EMACS_INT i1, i2;
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (x);
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (y);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (x);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (y);
if (FLOATP (x) || FLOATP (y))
return fmod_float (x, y);
enum Arith_Comparison comparison)
{
Lisp_Object accum = args[0];
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (accum);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (accum);
for (ptrdiff_t argnum = 1; argnum < nargs; argnum++)
{
Lisp_Object val = args[argnum];
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (val);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (val);
if (!NILP (arithcompare (val, accum, comparison)))
accum = val;
else if (FLOATP (val) && isnan (XFLOAT_DATA (val)))
representation. */)
(Lisp_Object value)
{
- CHECK_NUMBER (value);
+ CHECK_FIXNUM (value);
EMACS_INT v = XINT (value) < 0 ? -1 - XINT (value) : XINT (value);
- return make_number (EMACS_UINT_WIDTH <= UINT_WIDTH
+ return make_fixnum (EMACS_UINT_WIDTH <= UINT_WIDTH
? count_one_bits (v)
: EMACS_UINT_WIDTH <= ULONG_WIDTH
? count_one_bits_l (v)
Lisp_Object val;
- CHECK_NUMBER (value);
- CHECK_NUMBER (count);
+ CHECK_FIXNUM (value);
+ CHECK_FIXNUM (count);
if (XINT (count) >= EMACS_INT_WIDTH)
XSETINT (val, 0);
Markers are converted to integers. */)
(register Lisp_Object number)
{
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (number);
if (FLOATP (number))
return (make_float (1.0 + XFLOAT_DATA (number)));
Markers are converted to integers. */)
(register Lisp_Object number)
{
- CHECK_NUMBER_OR_FLOAT_COERCE_MARKER (number);
+ CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER (number);
if (FLOATP (number))
return (make_float (-1.0 + XFLOAT_DATA (number)));
doc: /* Return the bitwise complement of NUMBER. NUMBER must be an integer. */)
(register Lisp_Object number)
{
- CHECK_NUMBER (number);
+ CHECK_FIXNUM (number);
XSETINT (number, ~XINT (number));
return number;
}
unsigned i = 0x04030201;
int order = *(char *)&i == 1 ? 108 : 66;
- return make_number (order);
+ return make_fixnum (order);
}
/* Because we round up the bool vector allocate size to word_size
for (i = 0; i < nwords; i++)
count += count_one_bits_word (adata[i]);
- return make_number (count);
+ return make_fixnum (count);
}
DEFUN ("bool-vector-count-consecutive", Fbool_vector_count_consecutive,
ptrdiff_t nr_words;
CHECK_BOOL_VECTOR (a);
- CHECK_NATNUM (i);
+ CHECK_FIXNAT (i);
nr_bits = bool_vector_size (a);
if (XFASTINT (i) > nr_bits) /* Allow one past the end for convenience */
count = count_trailing_zero_bits (mword);
pos++;
if (count + offset < BITS_PER_BITS_WORD)
- return make_number (count);
+ return make_fixnum (count);
}
/* Scan whole words until we either reach the end of the vector or
count -= BITS_PER_BITS_WORD - nr_bits % BITS_PER_BITS_WORD;
}
- return make_number (count);
+ return make_fixnum (count);
}
\f
DEFVAR_LISP ("most-positive-fixnum", Vmost_positive_fixnum,
doc: /* The largest value that is representable in a Lisp integer.
This variable cannot be set; trying to do so will signal an error. */);
- Vmost_positive_fixnum = make_number (MOST_POSITIVE_FIXNUM);
+ Vmost_positive_fixnum = make_fixnum (MOST_POSITIVE_FIXNUM);
make_symbol_constant (intern_c_string ("most-positive-fixnum"));
DEFVAR_LISP ("most-negative-fixnum", Vmost_negative_fixnum,
doc: /* The smallest value that is representable in a Lisp integer.
This variable cannot be set; trying to do so will signal an error. */);
- Vmost_negative_fixnum = make_number (MOST_NEGATIVE_FIXNUM);
+ Vmost_negative_fixnum = make_fixnum (MOST_NEGATIVE_FIXNUM);
make_symbol_constant (intern_c_string ("most-negative-fixnum"));
DEFSYM (Qwatchers, "watchers");
arguments to a D-Bus message. */
#define XD_OBJECT_TO_DBUS_TYPE(object) \
((EQ (object, Qt) || EQ (object, Qnil)) ? DBUS_TYPE_BOOLEAN \
- : (NATNUMP (object)) ? DBUS_TYPE_UINT32 \
- : (INTEGERP (object)) ? DBUS_TYPE_INT32 \
+ : (FIXNATP (object)) ? DBUS_TYPE_UINT32 \
+ : (FIXNUMP (object)) ? DBUS_TYPE_INT32 \
: (FLOATP (object)) ? DBUS_TYPE_DOUBLE \
: (STRINGP (object)) ? DBUS_TYPE_STRING \
: (XD_DBUS_TYPE_P (object)) ? xd_symbol_to_dbus_type (object) \
{
case DBUS_TYPE_BYTE:
case DBUS_TYPE_UINT16:
- CHECK_NATNUM (object);
+ CHECK_FIXNAT (object);
sprintf (signature, "%c", dtype);
break;
break;
case DBUS_TYPE_INT16:
- CHECK_NUMBER (object);
+ CHECK_FIXNUM (object);
sprintf (signature, "%c", dtype);
break;
case DBUS_TYPE_INT32:
case DBUS_TYPE_INT64:
case DBUS_TYPE_DOUBLE:
- CHECK_NUMBER_OR_FLOAT (object);
+ CHECK_FIXNUM_OR_FLOAT (object);
sprintf (signature, "%c", dtype);
break;
static intmax_t
xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi)
{
- CHECK_NUMBER_OR_FLOAT (x);
- if (INTEGERP (x))
+ CHECK_FIXNUM_OR_FLOAT (x);
+ if (FIXNUMP (x))
{
if (lo <= XINT (x) && XINT (x) <= hi)
return XINT (x);
static uintmax_t
xd_extract_unsigned (Lisp_Object x, uintmax_t hi)
{
- CHECK_NUMBER_OR_FLOAT (x);
- if (INTEGERP (x))
+ CHECK_FIXNUM_OR_FLOAT (x);
+ if (FIXNUMP (x))
{
if (0 <= XINT (x) && XINT (x) <= hi)
return XINT (x);
if (xd_in_read_queued_messages)
Fthrow (Qdbus_error, Qnil);
else
- args_out_of_range_3 (x, make_number (0), make_fixnum_or_float (hi));
+ args_out_of_range_3 (x, make_fixnum (0), make_fixnum_or_float (hi));
}
/* Append C value, extracted from Lisp OBJECT, to iteration ITER.
switch (dtype)
{
case DBUS_TYPE_BYTE:
- CHECK_NATNUM (object);
+ CHECK_FIXNAT (object);
{
unsigned char val = XFASTINT (object) & 0xFF;
XD_DEBUG_MESSAGE ("%c %u", dtype, val);
if (!dbus_message_iter_open_container (iter, dtype,
signature, &subiter))
XD_SIGNAL3 (build_string ("Cannot open container"),
- make_number (dtype), build_string (signature));
+ make_fixnum (dtype), build_string (signature));
break;
case DBUS_TYPE_VARIANT:
if (!dbus_message_iter_open_container (iter, dtype,
signature, &subiter))
XD_SIGNAL3 (build_string ("Cannot open container"),
- make_number (dtype), build_string (signature));
+ make_fixnum (dtype), build_string (signature));
break;
case DBUS_TYPE_STRUCT:
XD_DEBUG_MESSAGE ("%c %s", dtype, XD_OBJECT_TO_STRING (object));
if (!dbus_message_iter_open_container (iter, dtype, NULL, &subiter))
XD_SIGNAL2 (build_string ("Cannot open container"),
- make_number (dtype));
+ make_fixnum (dtype));
break;
}
/* Close the subiteration. */
if (!dbus_message_iter_close_container (iter, &subiter))
XD_SIGNAL2 (build_string ("Cannot close container"),
- make_number (dtype));
+ make_fixnum (dtype));
}
}
dbus_message_iter_get_basic (iter, &val);
val = val & 0xFF;
XD_DEBUG_MESSAGE ("%c %u", dtype, val);
- return make_number (val);
+ return make_fixnum (val);
}
case DBUS_TYPE_BOOLEAN:
dbus_message_iter_get_basic (iter, &val);
pval = val;
XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
- return make_number (val);
+ return make_fixnum (val);
}
case DBUS_TYPE_UINT16:
dbus_message_iter_get_basic (iter, &val);
pval = val;
XD_DEBUG_MESSAGE ("%c %d", dtype, pval);
- return make_number (val);
+ return make_fixnum (val);
}
case DBUS_TYPE_INT32:
refcount = xd_get_connection_references (connection);
XD_DEBUG_MESSAGE ("Bus %s, Reference counter %"pD"d",
XD_OBJECT_TO_STRING (bus), refcount);
- return make_number (refcount);
+ return make_fixnum (refcount);
}
DEFUN ("dbus-get-unique-name", Fdbus_get_unique_name, Sdbus_get_unique_name,
service = args[2];
handler = Qnil;
- CHECK_NATNUM (message_type);
+ CHECK_FIXNAT (message_type);
if (! (DBUS_MESSAGE_TYPE_INVALID < XFASTINT (message_type)
&& XFASTINT (message_type) < DBUS_NUM_MESSAGE_TYPES))
XD_SIGNAL2 (build_string ("Invalid message type"), message_type);
if (nargs < count)
xsignal2 (Qwrong_number_of_arguments,
Qdbus_message_internal,
- make_number (nargs));
+ make_fixnum (nargs));
if ((mtype == DBUS_MESSAGE_TYPE_METHOD_CALL)
|| (mtype == DBUS_MESSAGE_TYPE_SIGNAL))
/* Check for timeout parameter. */
if ((count + 2 <= nargs) && EQ (args[count], QCtimeout))
{
- CHECK_NATNUM (args[count+1]);
+ CHECK_FIXNAT (args[count+1]);
timeout = min (XFASTINT (args[count+1]), INT_MAX);
count = count+2;
}
event.arg = Fcons ((uname == NULL ? Qnil : build_string (uname)),
event.arg);
event.arg = Fcons (make_fixnum_or_float (serial), event.arg);
- event.arg = Fcons (make_number (mtype), event.arg);
+ event.arg = Fcons (make_fixnum (mtype), event.arg);
/* Add the bus symbol to the event. */
event.arg = Fcons (bus, event.arg);
DEFVAR_LISP ("dbus-message-type-invalid",
Vdbus_message_type_invalid,
doc: /* This value is never a valid message type. */);
- Vdbus_message_type_invalid = make_number (DBUS_MESSAGE_TYPE_INVALID);
+ Vdbus_message_type_invalid = make_fixnum (DBUS_MESSAGE_TYPE_INVALID);
DEFVAR_LISP ("dbus-message-type-method-call",
Vdbus_message_type_method_call,
doc: /* Message type of a method call message. */);
- Vdbus_message_type_method_call = make_number (DBUS_MESSAGE_TYPE_METHOD_CALL);
+ Vdbus_message_type_method_call = make_fixnum (DBUS_MESSAGE_TYPE_METHOD_CALL);
DEFVAR_LISP ("dbus-message-type-method-return",
Vdbus_message_type_method_return,
doc: /* Message type of a method return message. */);
Vdbus_message_type_method_return
- = make_number (DBUS_MESSAGE_TYPE_METHOD_RETURN);
+ = make_fixnum (DBUS_MESSAGE_TYPE_METHOD_RETURN);
DEFVAR_LISP ("dbus-message-type-error",
Vdbus_message_type_error,
doc: /* Message type of an error reply message. */);
- Vdbus_message_type_error = make_number (DBUS_MESSAGE_TYPE_ERROR);
+ Vdbus_message_type_error = make_fixnum (DBUS_MESSAGE_TYPE_ERROR);
DEFVAR_LISP ("dbus-message-type-signal",
Vdbus_message_type_signal,
doc: /* Message type of a signal message. */);
- Vdbus_message_type_signal = make_number (DBUS_MESSAGE_TYPE_SIGNAL);
+ Vdbus_message_type_signal = make_fixnum (DBUS_MESSAGE_TYPE_SIGNAL);
DEFVAR_LISP ("dbus-registered-objects-table",
Vdbus_registered_objects_table,
/* Reject entries where the encoded strings match, but the
decoded don't. For example, "a" should not match "a-ring" on
file systems that store decomposed characters. */
- Lisp_Object zero = make_number (0);
+ Lisp_Object zero = make_fixnum (0);
if (check_decoded && SCHARS (file) <= SCHARS (name))
{
/* FIXME: This is a copy of the code below. */
ptrdiff_t compare = SCHARS (file);
Lisp_Object cmp
- = Fcompare_strings (name, zero, make_number (compare),
- file, zero, make_number (compare),
+ = Fcompare_strings (name, zero, make_fixnum (compare),
+ file, zero, make_fixnum (compare),
completion_ignore_case ? Qt : Qnil);
if (!EQ (cmp, Qt))
continue;
/* FIXME: This is a copy of the code in Ftry_completion. */
ptrdiff_t compare = min (bestmatchsize, SCHARS (name));
Lisp_Object cmp
- = Fcompare_strings (bestmatch, zero, make_number (compare),
- name, zero, make_number (compare),
+ = 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;
==
(matchsize + directoryp == SCHARS (bestmatch)))
&& (cmp = Fcompare_strings (name, zero,
- make_number (SCHARS (file)),
+ make_fixnum (SCHARS (file)),
file, zero,
Qnil,
Qnil),
EQ (Qt, cmp))
&& (cmp = Fcompare_strings (bestmatch, zero,
- make_number (SCHARS (file)),
+ make_fixnum (SCHARS (file)),
file, zero,
Qnil,
Qnil),
it does not require any change to be made. */
if (matchcount == 1 && !NILP (Fequal (bestmatch, file)))
return Qt;
- bestmatch = Fsubstring (bestmatch, make_number (0),
- make_number (bestmatchsize));
+ bestmatch = Fsubstring (bestmatch, make_fixnum (0),
+ make_fixnum (bestmatchsize));
return bestmatch;
}
return CALLN (Flist,
file_type,
- make_number (s.st_nlink),
+ make_fixnum (s.st_nlink),
(uname
? DECODE_SYSTEM (build_unibyte_string (uname))
: make_fixnum_or_float (s.st_uid)),
{
return (CONSP (gc)
? (CHARACTERP (XCAR (gc))
- && RANGED_INTEGERP (0, XCDR (gc), MAX_FACE_ID))
- : (RANGED_INTEGERP
+ && RANGED_FIXNUMP (0, XCDR (gc), MAX_FACE_ID))
+ : (RANGED_FIXNUMP
(0, gc,
(MAX_FACE_ID < TYPE_MAXIMUM (EMACS_INT) >> CHARACTERBITS
? ((EMACS_INT) MAX_FACE_ID << CHARACTERBITS) | MAX_CHAR
if (!NILP (milliseconds))
{
- CHECK_NUMBER (milliseconds);
+ CHECK_FIXNUM (milliseconds);
duration += XINT (milliseconds) / 1000.0;
}
if (display_option > 1)
redisplay_preserve_echo_area (2);
- if (INTEGERP (timeout))
+ if (FIXNUMP (timeout))
{
sec = XINT (timeout);
if (sec <= 0)
|| n + 20 < ASIZE (state) / 2)
/* Add 20 extra so we grow it less often. */
{
- state = Fmake_vector (make_number (n + 20), Qlambda);
+ state = Fmake_vector (make_fixnum (n + 20), Qlambda);
if (! NILP (variable))
Fset (variable, state);
else
{
Vinitial_window_system = Qx;
#ifdef HAVE_X11
- Vwindow_system_version = make_number (11);
+ Vwindow_system_version = make_fixnum (11);
#endif
#ifdef USE_NCURSES
/* In some versions of ncurses,
if (!inhibit_window_system)
{
Vinitial_window_system = Qw32;
- Vwindow_system_version = make_number (1);
+ Vwindow_system_version = make_fixnum (1);
return;
}
#endif /* HAVE_NTGUI */
)
{
Vinitial_window_system = Qns;
- Vwindow_system_version = make_number (10);
+ Vwindow_system_version = make_fixnum (10);
return;
}
#endif
defsubr (&Sdump_redisplay_history);
#endif
- frame_and_buffer_state = Fmake_vector (make_number (20), Qlambda);
+ frame_and_buffer_state = Fmake_vector (make_fixnum (20), Qlambda);
staticpro (&frame_and_buffer_state);
/* This is the "purpose" slot of a display table. */
/* Given BASE and LEN returned by the two previous macros,
return nonzero if GLYPH code G is aliased to a different code. */
#define GLYPH_ALIAS_P(base,len,g) \
- (GLYPH_FACE (g) == DEFAULT_FACE_ID && GLYPH_CHAR (g) < (len) && INTEGERP (base[GLYPH_CHAR (g)]))
+ (GLYPH_FACE (g) == DEFAULT_FACE_ID && GLYPH_CHAR (g) < (len) && FIXNUMP (base[GLYPH_CHAR (g)]))
/* Follow all aliases for G in the glyph table given by (BASE,
LENGTH), and set G to the final glyph. */
ptrdiff_t count = SPECPDL_INDEX ();
USE_SAFE_ALLOCA;
- if (INTEGERP (filepos))
+ if (FIXNUMP (filepos))
{
file = Vdoc_file_name;
pos = filepos;
if (CONSP (fun) && EQ (XCAR (fun), Qmacro))
fun = XCDR (fun);
if (SUBRP (fun))
- doc = make_number (XSUBR (fun)->doc);
+ doc = make_fixnum (XSUBR (fun)->doc);
else if (MODULE_FUNCTIONP (fun))
doc = XMODULE_FUNCTION (fun)->documentation;
else if (COMPILEDP (fun))
Lisp_Object tem = AREF (fun, COMPILED_DOC_STRING);
if (STRINGP (tem))
doc = tem;
- else if (NATNUMP (tem) || CONSP (tem))
+ else if (FIXNATP (tem) || CONSP (tem))
doc = tem;
else
return Qnil;
doc = tem;
/* Handle a doc reference--but these never come last
in the function body, so reject them if they are last. */
- else if ((NATNUMP (tem) || (CONSP (tem) && INTEGERP (XCDR (tem))))
+ else if ((FIXNATP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem))))
&& !NILP (XCDR (tem1)))
doc = tem;
else
/* If DOC is 0, it's typically because of a dumped file missing
from the DOC file (bug in src/Makefile.in). */
- if (EQ (doc, make_number (0)))
+ if (EQ (doc, make_fixnum (0)))
doc = Qnil;
- if (INTEGERP (doc) || CONSP (doc))
+ if (FIXNUMP (doc) || CONSP (doc))
{
Lisp_Object tem;
tem = get_doc_string (doc, 0, 0);
documentation_property:
tem = Fget (symbol, prop);
- if (EQ (tem, make_number (0)))
+ if (EQ (tem, make_fixnum (0)))
tem = Qnil;
- if (INTEGERP (tem) || (CONSP (tem) && INTEGERP (XCDR (tem))))
+ if (FIXNUMP (tem) || (CONSP (tem) && FIXNUMP (XCDR (tem))))
{
Lisp_Object doc = tem;
tem = get_doc_string (tem, 0, 0);
|| (EQ (tem, Qclosure) && (fun = XCDR (fun), 1)))
{
tem = Fcdr (Fcdr (fun));
- if (CONSP (tem) && INTEGERP (XCAR (tem)))
+ if (CONSP (tem) && FIXNUMP (XCAR (tem)))
/* FIXME: This modifies typically pure hash-cons'd data, so its
correctness is quite delicate. */
- XSETCAR (tem, make_number (offset));
+ XSETCAR (tem, make_fixnum (offset));
}
}
/* This bytecode object must have a slot for the
docstring, since we've found a docstring for it. */
if (PVSIZE (fun) > COMPILED_DOC_STRING)
- ASET (fun, COMPILED_DOC_STRING, make_number (offset));
+ ASET (fun, COMPILED_DOC_STRING, make_fixnum (offset));
else
{
AUTO_STRING (format, "No docstring slot for %s");
|| !NILP (Fmemq (sym, delayed_init)))
&& strncmp (end, "\nSKIP", 5))
Fput (sym, Qvariable_documentation,
- make_number ((pos + end + 1 - buf)
+ make_fixnum ((pos + end + 1 - buf)
* (end[1] == '*' ? -1 : 1)));
}
Lisp_Object dv = DISP_CHAR_VECTOR (XCHAR_TABLE (Vstandard_display_table),
LEFT_SINGLE_QUOTATION_MARK);
return (VECTORP (dv) && ASIZE (dv) == 1
- && EQ (AREF (dv, 0), make_number ('`')));
+ && EQ (AREF (dv, 0), make_fixnum ('`')));
}
/* Return the current effective text quoting style. */
int no;
union REGS inregs, outregs;
- CHECK_NUMBER (interrupt);
+ CHECK_FIXNUM (interrupt);
no = (unsigned long) XINT (interrupt);
CHECK_VECTOR (registers);
if (no < 0 || no > 0xff || ASIZE (registers) != 8)
return Qnil;
for (i = 0; i < 8; i++)
- CHECK_NUMBER (AREF (registers, i));
+ CHECK_FIXNUM (AREF (registers, i));
inregs.x.ax = (unsigned long) XFASTINT (AREF (registers, 0));
inregs.x.bx = (unsigned long) XFASTINT (AREF (registers, 1));
int86 (no, &inregs, &outregs);
- ASET (registers, 0, make_number (outregs.x.ax));
- ASET (registers, 1, make_number (outregs.x.bx));
- ASET (registers, 2, make_number (outregs.x.cx));
- ASET (registers, 3, make_number (outregs.x.dx));
- ASET (registers, 4, make_number (outregs.x.si));
- ASET (registers, 5, make_number (outregs.x.di));
- ASET (registers, 6, make_number (outregs.x.cflag));
- ASET (registers, 7, make_number (outregs.x.flags));
+ ASET (registers, 0, make_fixnum (outregs.x.ax));
+ ASET (registers, 1, make_fixnum (outregs.x.bx));
+ ASET (registers, 2, make_fixnum (outregs.x.cx));
+ ASET (registers, 3, make_fixnum (outregs.x.dx));
+ ASET (registers, 4, make_fixnum (outregs.x.si));
+ ASET (registers, 5, make_fixnum (outregs.x.di));
+ ASET (registers, 6, make_fixnum (outregs.x.cflag));
+ ASET (registers, 7, make_fixnum (outregs.x.flags));
return registers;
}
int offs, len;
char *buf;
- CHECK_NUMBER (address);
+ CHECK_FIXNUM (address);
offs = (unsigned long) XINT (address);
CHECK_VECTOR (vector);
len = ASIZE (vector);
dosmemget (offs, len, buf);
for (i = 0; i < len; i++)
- ASET (vector, i, make_number (buf[i]));
+ ASET (vector, i, make_fixnum (buf[i]));
return vector;
}
int offs, len;
char *buf;
- CHECK_NUMBER (address);
+ CHECK_FIXNUM (address);
offs = (unsigned long) XINT (address);
CHECK_VECTOR (vector);
len = ASIZE (vector);
for (i = 0; i < len; i++)
{
- CHECK_NUMBER (AREF (vector, i));
+ CHECK_FIXNUM (AREF (vector, i));
buf[i] = (unsigned char) XFASTINT (AREF (vector, i)) & 0xFF;
}
The current keyboard layout is available in dos-keyboard-code. */)
(Lisp_Object country_code, Lisp_Object allkeys)
{
- CHECK_NUMBER (country_code);
+ CHECK_FIXNUM (country_code);
if (!dos_set_keyboard (XINT (country_code), !NILP (allkeys)))
return Qnil;
return Qt;
regs.x.ax = 0x3000;
intdos (®s, ®s);
- Vdos_version = Fcons (make_number (regs.h.al), make_number (regs.h.ah));
+ Vdos_version = Fcons (make_fixnum (regs.h.al), make_fixnum (regs.h.ah));
/* Obtain the country code via DPMI, use DJGPP transfer buffer. */
dpmiregs.x.ax = 0x3800;
{
dos_windows_version = dpmiregs.x.ax;
Vdos_windows_version =
- Fcons (make_number (dpmiregs.h.al), make_number (dpmiregs.h.ah));
+ Fcons (make_fixnum (dpmiregs.h.al), make_fixnum (dpmiregs.h.ah));
/* Save the current title of this virtual machine, so we can restore
it before exiting. Otherwise, Windows 95 will continue to use
int proc_id;
Lisp_Object attrs = Qnil;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
if (proc_id == getpid ())
Vlocale_coding_system, 0);
attrs = Fcons (Fcons (Qcomm, decoded_cmd), attrs);
/* Pretend we have 0 as PPID. */
- attrs = Fcons (Fcons (Qppid, make_number (0)), attrs);
+ attrs = Fcons (Fcons (Qppid, make_fixnum (0)), attrs);
attrs = Fcons (Fcons (Qpgrp, pid), attrs);
attrs = Fcons (Fcons (Qttname, build_string ("/dev/tty")), attrs);
/* We are never idle! */
tem = Fget_internal_run_time ();
attrs = Fcons (Fcons (Qtime, tem), attrs);
- attrs = Fcons (Fcons (Qthcount, make_number (1)), attrs);
+ attrs = Fcons (Fcons (Qthcount, make_fixnum (1)), attrs);
attrs = Fcons (Fcons (Qstart,
Fsymbol_value (intern ("before-init-time"))),
attrs);
if (NILP (zone))
return local_tz;
- else if (EQ (zone, Qt) || EQ (zone, make_number (0)))
+ else if (EQ (zone, Qt) || EQ (zone, make_fixnum (0)))
{
zone_string = "UTC0";
new_tz = utc_tz;
}
else
{
- bool plain_integer = INTEGERP (zone);
+ bool plain_integer = FIXNUMP (zone);
if (EQ (zone, Qwall))
zone_string = 0;
else if (STRINGP (zone))
zone_string = SSDATA (ENCODE_SYSTEM (zone));
- else if (plain_integer || (CONSP (zone) && INTEGERP (XCAR (zone))
+ else if (plain_integer || (CONSP (zone) && FIXNUMP (XCAR (zone))
&& CONSP (XCDR (zone))))
{
Lisp_Object abbr;
(Lisp_Object byte)
{
unsigned char b;
- CHECK_NUMBER (byte);
+ CHECK_FIXNUM (byte);
if (XINT (byte) < 0 || XINT (byte) > 255)
error ("Invalid byte");
b = XINT (byte);
{
if (MARKERP (position))
set_point_from_marker (position);
- else if (INTEGERP (position))
+ else if (FIXNUMP (position))
SET_PT (clip_to_bounds (BEGV, XINT (position), ZV));
else
wrong_type_argument (Qinteger_or_marker_p, position);
error ("The mark is not set now, so there is no region");
/* Clip to the current narrowing (bug#11770). */
- return make_number ((PT < XFASTINT (m)) == beginningp
+ return make_fixnum ((PT < XFASTINT (m)) == beginningp
? PT
: clip_to_bounds (BEGV, XFASTINT (m), ZV));
}
at POSITION. */)
(Lisp_Object position, register Lisp_Object prop, Lisp_Object object)
{
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (NILP (object))
XSETBUFFER (object, current_buffer);
return Fget_text_property (position, prop, object);
else if (stickiness < 0
&& XINT (position) > BUF_BEGV (XBUFFER (object)))
- return Fget_text_property (make_number (XINT (position) - 1),
+ return Fget_text_property (make_fixnum (XINT (position) - 1),
prop, object);
else
return Qnil;
if (NILP (pos))
XSETFASTINT (pos, PT);
else
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
after_field
= get_char_property_and_overlay (pos, Qfield, Qnil, NULL);
before_field
= (XFASTINT (pos) > BEGV
- ? get_char_property_and_overlay (make_number (XINT (pos) - 1),
+ ? get_char_property_and_overlay (make_fixnum (XINT (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. */
{
ptrdiff_t beg;
find_field (pos, escape_from_edge, limit, &beg, Qnil, 0);
- return make_number (beg);
+ return make_fixnum (beg);
}
DEFUN ("field-end", Ffield_end, Sfield_end, 0, 3, 0,
{
ptrdiff_t end;
find_field (pos, escape_from_edge, Qnil, 0, limit, &end);
- return make_number (end);
+ return make_fixnum (end);
}
DEFUN ("constrain-to-field", Fconstrain_to_field, Sconstrain_to_field, 2, 5, 0,
XSETFASTINT (new_pos, PT);
}
- CHECK_NUMBER_COERCE_MARKER (new_pos);
- CHECK_NUMBER_COERCE_MARKER (old_pos);
+ CHECK_FIXNUM_COERCE_MARKER (new_pos);
+ CHECK_FIXNUM_COERCE_MARKER (old_pos);
fwd = (XINT (new_pos) > XINT (old_pos));
- prev_old = make_number (XINT (old_pos) - 1);
- prev_new = make_number (XINT (new_pos) - 1);
+ prev_old = make_fixnum (XINT (old_pos) - 1);
+ prev_new = make_fixnum (XINT (new_pos) - 1);
if (NILP (Vinhibit_field_text_motion)
&& !EQ (new_pos, old_pos)
if (NILP (n))
XSETFASTINT (n, 1);
else
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
scan_newline_from_point (XINT (n) - 1, &charpos, &bytepos);
/* Return END constrained to the current input field. */
- return Fconstrain_to_field (make_number (charpos), make_number (PT),
+ return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT),
XINT (n) != 1 ? Qt : Qnil,
Qt, Qnil);
}
if (NILP (n))
XSETFASTINT (n, 1);
else
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
clipped_n = clip_to_bounds (PTRDIFF_MIN + 1, XINT (n), PTRDIFF_MAX);
end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0),
NULL);
/* Return END_POS constrained to the current input field. */
- return Fconstrain_to_field (make_number (end_pos), make_number (orig),
+ return Fconstrain_to_field (make_fixnum (end_pos), make_fixnum (orig),
Qnil, Qt, Qnil);
}
/* Set window point if WINDOW is live and shows the current buffer. */
Lisp_Object contents = XWINDOW (window)->contents;
if (BUFFERP (contents) && XBUFFER (contents) == current_buffer)
- Fset_window_point (window, make_number (PT));
+ Fset_window_point (window, make_fixnum (PT));
}
}
(Lisp_Object buffer)
{
if (NILP (buffer))
- return make_number (Z - BEG);
+ return make_fixnum (Z - BEG);
else
{
CHECK_BUFFER (buffer);
- return make_number (BUF_Z (XBUFFER (buffer))
+ return make_fixnum (BUF_Z (XBUFFER (buffer))
- BUF_BEG (XBUFFER (buffer)));
}
}
If POSITION is out of range, the value is nil. */)
(Lisp_Object position)
{
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (XINT (position) < BEG || XINT (position) > Z)
return Qnil;
- return make_number (CHAR_TO_BYTE (XINT (position)));
+ return make_fixnum (CHAR_TO_BYTE (XINT (position)));
}
DEFUN ("byte-to-position", Fbyte_to_position, Sbyte_to_position, 1, 1, 0,
{
ptrdiff_t pos_byte;
- CHECK_NUMBER (bytepos);
+ CHECK_FIXNUM (bytepos);
pos_byte = XINT (bytepos);
if (pos_byte < BEG_BYTE || pos_byte > Z_BYTE)
return Qnil;
character. */
while (!CHAR_HEAD_P (FETCH_BYTE (pos_byte)))
pos_byte--;
- return make_number (BYTE_TO_CHAR (pos_byte));
+ return make_fixnum (BYTE_TO_CHAR (pos_byte));
}
\f
DEFUN ("following-char", Ffollowing_char, Sfollowing_char, 0, 0, 0,
}
else
{
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (XINT (pos) < BEGV || XINT (pos) >= ZV)
return Qnil;
pos_byte = CHAR_TO_BYTE (XINT (pos));
}
- return make_number (FETCH_CHAR (pos_byte));
+ return make_fixnum (FETCH_CHAR (pos_byte));
}
DEFUN ("char-before", Fchar_before, Schar_before, 0, 1, 0,
}
else
{
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (XINT (pos) <= BEGV || XINT (pos) > ZV)
return Qnil;
if (NILP (uid))
return Vuser_full_name;
- else if (NUMBERP (uid))
+ else if (FIXED_OR_FLOATP (uid))
{
uid_t u;
CONS_TO_INTEGER (uid, uid_t, u);
/* Substitute the login name for the &, upcasing the first character. */
if (q)
{
- Lisp_Object login = Fuser_login_name (make_number (pw->pw_uid));
+ Lisp_Object login = Fuser_login_name (make_fixnum (pw->pw_uid));
USE_SAFE_ALLOCA;
char *r = SAFE_ALLOCA (strlen (p) + SBYTES (login) + 1);
memcpy (r, p, q - p);
switch (max (alen, blen))
{
default:
- val = Fcons (make_number (t.ps), val);
+ val = Fcons (make_fixnum (t.ps), val);
FALLTHROUGH;
case 3:
- val = Fcons (make_number (t.us), val);
+ val = Fcons (make_fixnum (t.us), val);
FALLTHROUGH;
case 2:
- val = Fcons (make_number (t.lo), val);
- val = Fcons (make_number (t.hi), val);
+ val = Fcons (make_fixnum (t.lo), val);
+ val = Fcons (make_fixnum (t.hi), val);
break;
}
Lisp_Object *plow, Lisp_Object *pusec,
Lisp_Object *ppsec)
{
- Lisp_Object high = make_number (0);
+ Lisp_Object high = make_fixnum (0);
Lisp_Object low = specified_time;
- Lisp_Object usec = make_number (0);
- Lisp_Object psec = make_number (0);
+ Lisp_Object usec = make_fixnum (0);
+ Lisp_Object psec = make_fixnum (0);
int len = 4;
if (CONSP (specified_time))
/* When combining components, require LOW to be an integer,
as otherwise it would be a pain to add up times. */
- if (! INTEGERP (low))
+ if (! FIXNUMP (low))
return 0;
}
- else if (INTEGERP (specified_time))
+ else if (FIXNUMP (specified_time))
len = 2;
*phigh = high;
struct lisp_time *result, double *dresult)
{
EMACS_INT hi, lo, us, ps;
- if (! (INTEGERP (high)
- && INTEGERP (usec) && INTEGERP (psec)))
+ if (! (FIXNUMP (high)
+ && FIXNUMP (usec) && FIXNUMP (psec)))
return 0;
- if (! INTEGERP (low))
+ if (! FIXNUMP (low))
{
if (FLOATP (low))
{
int val = disassemble_lisp_time (specified_time, &high, &low, &usec, &psec);
if (val != 0)
{
- val = decode_time_components (high, low, make_number (0),
- make_number (0), &t, 0);
+ val = decode_time_components (high, low, make_fixnum (0),
+ make_fixnum (0), &t, 0);
if (0 < val
&& ! ((TYPE_SIGNED (time_t)
? TIME_T_MIN >> LO_TIME_BITS <= t.hi
EMACS_INT tm_year_base = TM_YEAR_BASE;
return CALLN (Flist,
- make_number (local_tm.tm_sec),
- make_number (local_tm.tm_min),
- make_number (local_tm.tm_hour),
- make_number (local_tm.tm_mday),
- make_number (local_tm.tm_mon + 1),
- make_number (local_tm.tm_year + tm_year_base),
- make_number (local_tm.tm_wday),
+ make_fixnum (local_tm.tm_sec),
+ make_fixnum (local_tm.tm_min),
+ make_fixnum (local_tm.tm_hour),
+ make_fixnum (local_tm.tm_mday),
+ make_fixnum (local_tm.tm_mon + 1),
+ make_fixnum (local_tm.tm_year + tm_year_base),
+ make_fixnum (local_tm.tm_wday),
local_tm.tm_isdst ? Qt : Qnil,
(HAVE_TM_GMTOFF
- ? make_number (tm_gmtoff (&local_tm))
+ ? make_fixnum (tm_gmtoff (&local_tm))
: gmtime_r (&time_spec, &gmt_tm)
- ? make_number (tm_diff (&local_tm, &gmt_tm))
+ ? make_fixnum (tm_diff (&local_tm, &gmt_tm))
: Qnil));
}
static int
check_tm_member (Lisp_Object obj, int offset)
{
- CHECK_NUMBER (obj);
+ CHECK_FIXNUM (obj);
EMACS_INT n = XINT (obj);
int result;
if (INT_SUBTRACT_WRAPV (n, offset, &result))
long int offset = (HAVE_TM_GMTOFF
? tm_gmtoff (&local_tm)
: tm_diff (&local_tm, &gmt_tm));
- zone_offset = make_number (offset);
+ zone_offset = make_fixnum (offset);
if (SCHARS (zone_name) == 0)
{
/* No local time zone name is available; use numeric zone instead. */
CHECK_CHARACTER (character);
if (NILP (count))
XSETFASTINT (count, 1);
- CHECK_NUMBER (count);
+ CHECK_FIXNUM (count);
c = XFASTINT (character);
if (!NILP (BVAR (current_buffer, enable_multibyte_characters)))
from adjoining text, if those properties are sticky. */)
(Lisp_Object byte, Lisp_Object count, Lisp_Object inherit)
{
- CHECK_NUMBER (byte);
+ CHECK_FIXNUM (byte);
if (XINT (byte) < 0 || XINT (byte) > 255)
- args_out_of_range_3 (byte, make_number (0), make_number (255));
+ args_out_of_range_3 (byte, make_fixnum (0), make_fixnum (255));
if (XINT (byte) >= 128
&& ! NILP (BVAR (current_buffer, enable_multibyte_characters)))
XSETFASTINT (byte, BYTE8_TO_CHAR (XINT (byte)));
{
update_buffer_properties (start, end);
- tem = Fnext_property_change (make_number (start), Qnil, make_number (end));
- tem1 = Ftext_properties_at (make_number (start), Qnil);
+ 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))
copy_intervals_to_string (result, current_buffer, start,
if (!NILP (Vbuffer_access_fontified_property))
{
Lisp_Object tem
- = Ftext_property_any (make_number (start), make_number (end),
+ = Ftext_property_any (make_fixnum (start), make_fixnum (end),
Vbuffer_access_fontified_property,
Qnil, Qnil);
if (NILP (tem))
}
CALLN (Frun_hook_with_args, Qbuffer_access_fontify_functions,
- make_number (start), make_number (end));
+ make_fixnum (start), make_fixnum (end));
}
}
b = BUF_BEGV (bp);
else
{
- CHECK_NUMBER_COERCE_MARKER (start);
+ CHECK_FIXNUM_COERCE_MARKER (start);
b = XINT (start);
}
if (NILP (end))
e = BUF_ZV (bp);
else
{
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (end);
e = XINT (end);
}
begp1 = BUF_BEGV (bp1);
else
{
- CHECK_NUMBER_COERCE_MARKER (start1);
+ CHECK_FIXNUM_COERCE_MARKER (start1);
begp1 = XINT (start1);
}
if (NILP (end1))
endp1 = BUF_ZV (bp1);
else
{
- CHECK_NUMBER_COERCE_MARKER (end1);
+ CHECK_FIXNUM_COERCE_MARKER (end1);
endp1 = XINT (end1);
}
begp2 = BUF_BEGV (bp2);
else
{
- CHECK_NUMBER_COERCE_MARKER (start2);
+ CHECK_FIXNUM_COERCE_MARKER (start2);
begp2 = XINT (start2);
}
if (NILP (end2))
endp2 = BUF_ZV (bp2);
else
{
- CHECK_NUMBER_COERCE_MARKER (end2);
+ CHECK_FIXNUM_COERCE_MARKER (end2);
endp2 = XINT (end2);
}
}
if (c1 != c2)
- return make_number (c1 < c2 ? -1 - chars : chars + 1);
+ return make_fixnum (c1 < c2 ? -1 - chars : chars + 1);
chars++;
rarely_quit (chars);
/* The strings match as far as they go.
If one is shorter, that one is less. */
if (chars < endp1 - begp1)
- return make_number (chars + 1);
+ return make_fixnum (chars + 1);
else if (chars < endp2 - begp2)
- return make_number (- chars - 1);
+ return make_fixnum (- chars - 1);
/* Same length too => they are equal. */
- return make_number (0);
+ return make_fixnum (0);
}
\f
if (beg_b < end_b)
{
SET_PT (beg_a);
- Finsert_buffer_substring (source, make_natnum (beg_b),
- make_natnum (end_b));
+ Finsert_buffer_substring (source, make_fixed_natnum (beg_b),
+ make_fixed_natnum (end_b));
}
}
--i;
}
else
{
- string = Fmake_string (make_number (1), val, Qnil);
+ string = Fmake_string (make_fixnum (1), val, Qnil);
}
replace_range (pos, pos + len, string, 1, 0, 1, 0);
pos_byte += SBYTES (string);
pos++;
}
- return make_number (cnt);
+ return make_fixnum (cnt);
}
DEFUN ("delete-region", Fdelete_region, Sdelete_region, 2, 2, "r",
or markers) bounding the text that should remain visible. */)
(register Lisp_Object start, Lisp_Object end)
{
- CHECK_NUMBER_COERCE_MARKER (start);
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (start);
+ CHECK_FIXNUM_COERCE_MARKER (end);
if (XINT (start) > XINT (end))
{
for (i = 1; i < nargs; i += 2)
properties = Fcons (args[i], Fcons (args[i + 1], properties));
- Fadd_text_properties (make_number (0),
- make_number (SCHARS (string)),
+ Fadd_text_properties (make_fixnum (0),
+ make_fixnum (SCHARS (string)),
properties, string);
return string;
}
}
else if (conversion == 'c')
{
- if (INTEGERP (arg) && ! ASCII_CHAR_P (XINT (arg)))
+ if (FIXNUMP (arg) && ! ASCII_CHAR_P (XINT (arg)))
{
if (!multibyte)
{
|| conversion == 'X'))
error ("Invalid format operation %%%c",
STRING_CHAR ((unsigned char *) format - 1));
- else if (! (INTEGERP (arg) || (FLOATP (arg) && conversion != 'c')))
+ else if (! (FIXNUMP (arg) || (FLOATP (arg) && conversion != 'c')))
error ("Format specifier doesn't match argument type");
else
{
if (INT_AS_LDBL)
{
*f = 'L';
- f += INTEGERP (arg);
+ f += FIXNUMP (arg);
}
}
else if (conversion != 'c')
ptrdiff_t sprintf_bytes;
if (float_conversion)
{
- if (INT_AS_LDBL && INTEGERP (arg))
+ if (INT_AS_LDBL && FIXNUMP (arg))
{
/* Although long double may have a rounding error if
DIG_BITS_LBOUND * LDBL_MANT_DIG < FIXNUM_BITS - 1,
}
else if (conversion == 'd' || conversion == 'i')
{
- if (INTEGERP (arg))
+ if (FIXNUMP (arg))
{
printmax_t x = XINT (arg);
sprintf_bytes = sprintf (sprintf_buf, convspec, prec, x);
{
/* Don't sign-extend for octal or hex printing. */
uprintmax_t x;
- if (INTEGERP (arg))
+ if (FIXNUMP (arg))
x = XUINT (arg);
else
{
if (string_intervals (args[0]) || arg_intervals)
{
/* Add text properties from the format string. */
- Lisp_Object len = make_number (SCHARS (args[0]));
- Lisp_Object props = text_property_list (args[0], make_number (0),
+ Lisp_Object len = make_fixnum (SCHARS (args[0]));
+ Lisp_Object props = text_property_list (args[0], make_fixnum (0),
len, Qnil);
if (CONSP (props))
{
}
}
- XSETCAR (item, make_number (translated));
+ XSETCAR (item, make_fixnum (translated));
/* Likewise adjust the property end position. */
pos = XINT (XCAR (XCDR (item)));
}
}
- XSETCAR (XCDR (item), make_number (translated));
+ XSETCAR (XCDR (item), make_fixnum (translated));
}
- add_text_properties_from_list (val, props, make_number (0));
+ add_text_properties_from_list (val, props, make_fixnum (0));
}
/* Add text properties from arguments. */
for (ptrdiff_t i = 0; i < nspec; i++)
if (info[i].intervals)
{
- len = make_number (SCHARS (info[i].argument));
- Lisp_Object new_len = make_number (info[i].end - info[i].start);
+ len = make_fixnum (SCHARS (info[i].argument));
+ Lisp_Object new_len = make_fixnum (info[i].end - info[i].start);
props = text_property_list (info[i].argument,
- make_number (0), len, Qnil);
+ make_fixnum (0), len, Qnil);
props = extend_property_ranges (props, len, new_len);
/* If successive arguments have properties, be sure that
the value of `composition' property be the copy. */
if (1 < i && info[i - 1].end)
make_composition_value_copy (props);
add_text_properties_from_list (val, props,
- make_number (info[i].start));
+ make_fixnum (info[i].start));
}
}
EMACS_INT refcount = XFASTINT (value) + 1;
if (MOST_POSITIVE_FIXNUM < refcount)
xsignal0 (Qoverflow_error);
- value = make_natnum (refcount);
+ value = make_fixed_natnum (refcount);
set_hash_value_slot (h, i, value);
}
else
{
- hash_put (h, new_obj, make_natnum (1), hashcode);
+ hash_put (h, new_obj, make_fixed_natnum (1), hashcode);
}
return lisp_to_value (module_assertions ? global_env : env, new_obj);
{
EMACS_INT refcount = XFASTINT (HASH_VALUE (h, i)) - 1;
if (refcount > 0)
- set_hash_value_slot (h, i, make_natnum (refcount));
+ set_hash_value_slot (h, i, make_fixed_natnum (refcount));
else
{
eassert (refcount == 0);
? (min_arity <= MOST_POSITIVE_FIXNUM
&& max_arity == emacs_variadic_function)
: min_arity <= max_arity && max_arity <= MOST_POSITIVE_FIXNUM)))
- xsignal2 (Qinvalid_arity, make_number (min_arity), make_number (max_arity));
+ xsignal2 (Qinvalid_arity, make_fixnum (min_arity), make_fixnum (max_arity));
struct Lisp_Module_Function *function = allocate_module_function ();
function->min_arity = min_arity;
{
MODULE_FUNCTION_BEGIN (0);
Lisp_Object l = value_to_lisp (n);
- CHECK_NUMBER (l);
+ CHECK_FIXNUM (l);
return XINT (l);
}
MODULE_FUNCTION_BEGIN (module_nil);
if (FIXNUM_OVERFLOW_P (n))
xsignal0 (Qoverflow_error);
- return lisp_to_value (env, make_number (n));
+ return lisp_to_value (env, make_fixnum (n));
}
static double
CHECK_VECTOR (lvec);
if (! (0 <= i && i < ASIZE (lvec)))
args_out_of_range_3 (make_fixnum_or_float (i),
- make_number (0), make_number (ASIZE (lvec) - 1));
+ make_fixnum (0), make_fixnum (ASIZE (lvec) - 1));
}
static void
{
if (FIXNUM_OVERFLOW_P (r))
xsignal0 (Qoverflow_error);
- xsignal2 (Qmodule_init_failed, file, make_number (r));
+ xsignal2 (Qmodule_init_failed, file, make_fixnum (r));
}
module_signal_or_throw (&env_priv);
eassume (0 <= func->min_arity);
if (! (func->min_arity <= nargs
&& (func->max_arity < 0 || nargs <= func->max_arity)))
- xsignal2 (Qwrong_number_of_arguments, function, make_number (nargs));
+ xsignal2 (Qwrong_number_of_arguments, function, make_fixnum (nargs));
emacs_env pub;
struct emacs_env_private priv;
{
ptrdiff_t minargs = function->min_arity;
ptrdiff_t maxargs = function->max_arity;
- return Fcons (make_number (minargs),
- maxargs == MANY ? Qmany : make_number (maxargs));
+ return Fcons (make_fixnum (minargs),
+ maxargs == MANY ? Qmany : make_fixnum (maxargs));
}
\f
/* Compress O into the space of a pointer, possibly losing information. */
EMACS_UINT u = XLI (o);
- if (INTEGERP (o))
+ if (FIXNUMP (o))
{
uintptr_t i = (u << VALBITS) + XTYPE (o);
return (emacs_value) i;
totally_unblock_input ();
if (sig == SIGTERM || sig == SIGHUP || sig == SIGINT)
- Fkill_emacs (make_number (sig));
+ Fkill_emacs (make_fixnum (sig));
shut_down_emacs (sig, Qnil);
emacs_backtrace (backtrace_limit);
{
Lisp_Object found;
int yes = openp (Vexec_path, Vinvocation_name,
- Vexec_suffixes, &found, make_number (X_OK), false);
+ Vexec_suffixes, &found, make_fixnum (X_OK), false);
if (yes == 1)
{
/* Add /: to the front of the name
unlink (SSDATA (listfile));
}
- if (INTEGERP (arg))
+ if (FIXNUMP (arg))
exit_code = (XINT (arg) < 0
? XINT (arg) | INT_MIN
: XINT (arg) & INT_MAX);
&& strncmp (path, emacs_dir_env, emacs_dir_len) == 0)
element = Fexpand_file_name (Fsubstring
(element,
- make_number (emacs_dir_len),
+ make_fixnum (emacs_dir_len),
Qnil),
build_unibyte_string (emacs_dir));
#endif
/* Restore limits after leaving the debugger. */
record_unwind_protect (restore_stack_limits,
- Fcons (make_number (old_max),
- make_number (old_depth)));
+ Fcons (make_fixnum (old_max),
+ make_fixnum (old_depth)));
#ifdef HAVE_WINDOW_SYSTEM
if (display_hourglass_p)
Lisp_Object sym = XCAR (tail), lex_binding;
tail = XCDR (tail);
if (!CONSP (tail))
- xsignal2 (Qwrong_number_of_arguments, Qsetq, make_number (nargs + 1));
+ xsignal2 (Qwrong_number_of_arguments, Qsetq, make_fixnum (nargs + 1));
Lisp_Object arg = XCAR (tail);
tail = XCDR (tail);
val = eval_sub (arg);
&& !AUTOLOADP (XSYMBOL (function)->u.s.function))
return Qnil;
- if (!NILP (Vpurify_flag) && EQ (docstring, make_number (0)))
+ if (!NILP (Vpurify_flag) && EQ (docstring, make_fixnum (0)))
/* `read1' in lread.c has found the docstring starting with "\
and assumed the docstring will be provided by Snarf-documentation, so it
passed us 0 instead. But that leads to accidental sharing in purecopy's
hash-consing, so we use a (hopefully) unique integer instead. */
- docstring = make_number (XHASH (function));
+ docstring = make_fixnum (XHASH (function));
return Fdefalias (function,
list5 (Qautoload, file, docstring, interactive, type),
Qnil);
first = XCAR (queue);
second = Fcdr (first);
first = Fcar (first);
- if (EQ (first, make_number (0)))
+ if (EQ (first, make_fixnum (0)))
Vfeatures = second;
else
Ffset (first, second);
if (!CONSP (fundef) || !EQ (Qautoload, XCAR (fundef)))
return fundef;
- Lisp_Object kind = Fnth (make_number (4), fundef);
+ Lisp_Object kind = Fnth (make_fixnum (4), fundef);
if (EQ (macro_only, Qmacro)
&& !(EQ (kind, Qt) || EQ (kind, Qmacro)))
return fundef;
{
Lisp_Object fun;
XSETSUBR (fun, subr);
- xsignal2 (Qwrong_number_of_arguments, fun, make_number (numargs));
+ xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (numargs));
}
else if (subr->max_args == UNEVALLED)
if (size <= COMPILED_STACK_DEPTH)
xsignal1 (Qinvalid_function, fun);
syms_left = AREF (fun, COMPILED_ARGLIST);
- if (INTEGERP (syms_left))
+ if (FIXNUMP (syms_left))
/* A byte-code object with an integer args template means we
shouldn't bind any arguments, instead just call the byte-code
interpreter directly; it will push arguments as necessary.
else if (i < nargs)
arg = arg_vector[i++];
else if (!optional)
- xsignal2 (Qwrong_number_of_arguments, fun, make_number (nargs));
+ xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (nargs));
else
arg = Qnil;
if (!NILP (syms_left))
xsignal1 (Qinvalid_function, fun);
else if (i < nargs)
- xsignal2 (Qwrong_number_of_arguments, fun, make_number (nargs));
+ xsignal2 (Qwrong_number_of_arguments, fun, make_fixnum (nargs));
if (!EQ (lexenv, Vinternal_interpreter_environment))
/* Instantiate a new lexical environment. */
if (size <= COMPILED_STACK_DEPTH)
xsignal1 (Qinvalid_function, fun);
syms_left = AREF (fun, COMPILED_ARGLIST);
- if (INTEGERP (syms_left))
+ if (FIXNUMP (syms_left))
return get_byte_code_arity (syms_left);
}
else
xsignal1 (Qinvalid_function, fun);
if (EQ (next, Qand_rest))
- return Fcons (make_number (minargs), Qmany);
+ return Fcons (make_fixnum (minargs), Qmany);
else if (EQ (next, Qand_optional))
optional = true;
else
if (!NILP (syms_left))
xsignal1 (Qinvalid_function, fun);
- return Fcons (make_number (minargs), make_number (maxargs));
+ return Fcons (make_fixnum (minargs), make_fixnum (maxargs));
}
DEFUN ("fetch-bytecode", Ffetch_bytecode, Sfetch_bytecode,
{
register EMACS_INT i;
- CHECK_NATNUM (nframes);
+ CHECK_FIXNAT (nframes);
union specbinding *pdl = get_backtrace_starting_at (base);
/* Find the frame requested. */
The debugger is entered when that frame exits, if the flag is non-nil. */)
(Lisp_Object level, Lisp_Object flag)
{
- CHECK_NUMBER (level);
+ CHECK_FIXNUM (level);
union specbinding *pdl = get_backtrace_frame(level, Qnil);
if (backtrace_p (pdl))
{
union specbinding *frame = get_backtrace_frame (nframes, base);
union specbinding *prevframe
- = get_backtrace_frame (make_number (XFASTINT (nframes) - 1), base);
+ = get_backtrace_frame (make_fixnum (XFASTINT (nframes) - 1), base);
ptrdiff_t distance = specpdl_ptr - frame;
Lisp_Object result = Qnil;
eassert (distance >= 0);
memset (data + prefix_len, 'X', nX);
memcpy (data + prefix_len + nX, SSDATA (encoded_suffix), suffix_len);
int kind = (NILP (dir_flag) ? GT_FILE
- : EQ (dir_flag, make_number (0)) ? GT_NOCREATE
+ : EQ (dir_flag, make_fixnum (0)) ? GT_NOCREATE
: GT_DIR);
int fd = gen_tempname (data, suffix_len, O_BINARY | O_CLOEXEC, kind);
bool failed = fd < 0;
For that reason, you should normally use `make-temp-file' instead. */)
(Lisp_Object prefix)
{
- return Fmake_temp_file_internal (prefix, make_number (0),
+ return Fmake_temp_file_internal (prefix, make_fixnum (0),
empty_unibyte_string, Qnil);
}
#ifdef WINDOWSNT
if (NILP (ok_if_already_exists)
- || INTEGERP (ok_if_already_exists))
+ || FIXNUMP (ok_if_already_exists))
barf_or_query_if_file_exists (newname, false, "copy to it",
- INTEGERP (ok_if_already_exists), false);
+ FIXNUMP (ok_if_already_exists), false);
result = w32_copy_file (SSDATA (encoded_file), SSDATA (encoded_newname),
!NILP (keep_time), !NILP (preserve_uid_gid),
new_mask);
if (ofd < 0 && errno == EEXIST)
{
- if (NILP (ok_if_already_exists) || INTEGERP (ok_if_already_exists))
+ if (NILP (ok_if_already_exists) || FIXNUMP (ok_if_already_exists))
barf_or_query_if_file_exists (newname, true, "copy to it",
- INTEGERP (ok_if_already_exists), false);
+ FIXNUMP (ok_if_already_exists), false);
already_exists = true;
ofd = emacs_open (SSDATA (encoded_newname), O_WRONLY, 0);
}
bool plain_rename = (case_only_rename
|| (!NILP (ok_if_already_exists)
- && !INTEGERP (ok_if_already_exists)));
+ && !FIXNUMP (ok_if_already_exists)));
int rename_errno UNINIT;
if (!plain_rename)
{
#endif
barf_or_query_if_file_exists (newname, rename_errno == EEXIST,
"rename to it",
- INTEGERP (ok_if_already_exists),
+ FIXNUMP (ok_if_already_exists),
false);
plain_rename = true;
break;
if (errno == EEXIST)
{
if (NILP (ok_if_already_exists)
- || INTEGERP (ok_if_already_exists))
+ || FIXNUMP (ok_if_already_exists))
barf_or_query_if_file_exists (newname, true, "make it a new name",
- INTEGERP (ok_if_already_exists), false);
+ FIXNUMP (ok_if_already_exists), false);
unlink (SSDATA (newname));
if (link (SSDATA (encoded_file), SSDATA (encoded_newname)) == 0)
return Qnil;
Lisp_Object encoded_target, encoded_linkname;
CHECK_STRING (target);
- if (INTEGERP (ok_if_already_exists))
+ if (FIXNUMP (ok_if_already_exists))
{
if (SREF (target, 0) == '~')
target = Fexpand_file_name (target, Qnil);
else if (SREF (target, 0) == '/' && SREF (target, 1) == ':')
- target = Fsubstring_no_properties (target, make_number (2), Qnil);
+ target = Fsubstring_no_properties (target, make_fixnum (2), Qnil);
}
linkname = expand_cp_target (target, linkname);
if (errno == EEXIST)
{
if (NILP (ok_if_already_exists)
- || INTEGERP (ok_if_already_exists))
+ || FIXNUMP (ok_if_already_exists))
barf_or_query_if_file_exists (linkname, true, "make it a link",
- INTEGERP (ok_if_already_exists), false);
+ FIXNUMP (ok_if_already_exists), false);
unlink (SSDATA (encoded_linkname));
if (symlink (SSDATA (encoded_target), SSDATA (encoded_linkname)) == 0)
return Qnil;
if (stat (SSDATA (absname), &st) < 0)
return Qnil;
- return make_number (st.st_mode & 07777);
+ return make_fixnum (st.st_mode & 07777);
}
DEFUN ("set-file-modes", Fset_file_modes, Sset_file_modes, 2, 2,
Lisp_Object handler;
absname = Fexpand_file_name (filename, BVAR (current_buffer, directory));
- CHECK_NUMBER (mode);
+ CHECK_FIXNUM (mode);
/* If the file name has special constructs in it,
call the corresponding file handler. */
(Lisp_Object mode)
{
mode_t oldrealmask, oldumask, newumask;
- CHECK_NUMBER (mode);
+ CHECK_FIXNUM (mode);
oldrealmask = realmask;
newumask = ~ XINT (mode) & 0777;
((char *) BEG_ADDR + PT_BYTE - BEG_BYTE
+ data->s.inserted),
data->s.trytry);
- return make_number (nbytes);
+ return make_fixnum (nbytes);
}
static off_t
file_offset (Lisp_Object val)
{
- if (RANGED_INTEGERP (0, val, TYPE_MAXIMUM (off_t)))
+ if (RANGED_FIXNUMP (0, val, TYPE_MAXIMUM (off_t)))
return XINT (val);
if (FLOATP (val))
Lisp_Object car = XCAR (window_markers);
Lisp_Object marker = XCAR (car);
Lisp_Object oldpos = XCDR (car);
- if (MARKERP (marker) && INTEGERP (oldpos)
+ if (MARKERP (marker) && FIXNUMP (oldpos)
&& XINT (oldpos) > same_at_start
&& XINT (oldpos) < same_at_end)
{
double growth = newsize / (double)oldsize;
ptrdiff_t newpos
= same_at_start + growth * (XINT (oldpos) - same_at_start);
- Fset_marker (marker, make_number (newpos), Qnil);
+ Fset_marker (marker, make_fixnum (newpos), Qnil);
}
}
}
val = call6 (handler, Qinsert_file_contents, filename,
visit, beg, end, replace);
if (CONSP (val) && CONSP (XCDR (val))
- && RANGED_INTEGERP (0, XCAR (XCDR (val)), ZV - PT))
+ && RANGED_FIXNUMP (0, XCAR (XCDR (val)), ZV - PT))
inserted = XINT (XCAR (XCDR (val)));
goto handled;
}
insert_1_both ((char *) read_buf, nread, nread, 0, 0, 0);
TEMP_SET_PT_BOTH (BEG, BEG_BYTE);
coding_system = call2 (Vset_auto_coding_function,
- filename, make_number (nread));
+ filename, make_fixnum (nread));
set_buffer_internal (prev);
/* Discard the unwind protect for recovering the
if (inserted > 0 && ! NILP (Vset_auto_coding_function))
{
coding_system = call2 (Vset_auto_coding_function,
- filename, make_number (inserted));
+ filename, make_fixnum (inserted));
}
if (NILP (coding_system))
if (! NILP (Ffboundp (Qafter_insert_file_set_coding)))
{
- insval = call2 (Qafter_insert_file_set_coding, make_number (inserted),
+ insval = call2 (Qafter_insert_file_set_coding, make_fixnum (inserted),
visit);
if (! NILP (insval))
{
- if (! RANGED_INTEGERP (0, insval, ZV - PT))
+ if (! RANGED_FIXNUMP (0, insval, ZV - PT))
wrong_type_argument (intern ("inserted-chars"), insval);
inserted = XFASTINT (insval);
}
if (NILP (replace))
{
insval = call3 (Qformat_decode,
- Qnil, make_number (inserted), visit);
- if (! RANGED_INTEGERP (0, insval, ZV - PT))
+ Qnil, make_fixnum (inserted), visit);
+ if (! RANGED_FIXNUMP (0, insval, ZV - PT))
wrong_type_argument (intern ("inserted-chars"), insval);
inserted = XFASTINT (insval);
}
TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
insval = call3 (Qformat_decode,
- Qnil, make_number (oinserted), visit);
- if (! RANGED_INTEGERP (0, insval, ZV - PT))
+ Qnil, make_fixnum (oinserted), visit);
+ if (! RANGED_FIXNUMP (0, insval, ZV - PT))
wrong_type_argument (intern ("inserted-chars"), insval);
if (ochars_modiff == CHARS_MODIFF)
/* format_decode didn't modify buffer's characters => move
{
if (NILP (replace))
{
- insval = call1 (XCAR (p), make_number (inserted));
+ insval = call1 (XCAR (p), make_fixnum (inserted));
if (!NILP (insval))
{
- if (! RANGED_INTEGERP (0, insval, ZV - PT))
+ if (! RANGED_FIXNUMP (0, insval, ZV - PT))
wrong_type_argument (intern ("inserted-chars"), insval);
inserted = XFASTINT (insval);
}
EMACS_INT ochars_modiff = CHARS_MODIFF;
TEMP_SET_PT_BOTH (BEGV, BEGV_BYTE);
- insval = call1 (XCAR (p), make_number (oinserted));
+ insval = call1 (XCAR (p), make_fixnum (oinserted));
if (!NILP (insval))
{
- if (! RANGED_INTEGERP (0, insval, ZV - PT))
+ if (! RANGED_FIXNUMP (0, insval, ZV - PT))
wrong_type_argument (intern ("inserted-chars"), insval);
if (ochars_modiff == CHARS_MODIFF)
/* after_insert_file_functions didn't modify
/* Adjust the last undo record for the size change during
the format conversion. */
Lisp_Object tem = XCAR (old_undo);
- if (CONSP (tem) && INTEGERP (XCAR (tem))
- && INTEGERP (XCDR (tem))
+ if (CONSP (tem) && FIXNUMP (XCAR (tem))
+ && FIXNUMP (XCDR (tem))
&& XFASTINT (XCDR (tem)) == PT + old_inserted)
- XSETCDR (tem, make_number (PT + inserted));
+ XSETCDR (tem, make_fixnum (PT + inserted));
}
}
else
/* Retval needs to be dealt with in all cases consistently. */
if (NILP (val))
- val = list2 (orig_filename, make_number (inserted));
+ val = list2 (orig_filename, make_fixnum (inserted));
return unbind_to (count, val);
}
fn = SSDATA (encoded_filename);
open_flags = O_WRONLY | O_CREAT;
open_flags |= EQ (mustbenew, Qexcl) ? O_EXCL : !NILP (append) ? 0 : O_TRUNC;
- if (NUMBERP (append))
+ if (FIXED_OR_FLOATP (append))
offset = file_offset (append);
else if (!NILP (append))
open_flags |= O_APPEND;
record_unwind_protect_int (close_file_unwind, desc);
}
- if (NUMBERP (append))
+ if (FIXED_OR_FLOATP (append))
{
off_t ret = lseek (desc, offset, SEEK_SET);
if (ret < 0)
}
if (!auto_saving && !noninteractive)
- message_with_string ((NUMBERP (append)
+ message_with_string ((FIXED_OR_FLOATP (append)
? "Updated %s"
: ! NILP (append)
? "Added to %s"
has written annotations to a temporary buffer, which is now
current. */
res = call5 (Qformat_annotate_function, XCAR (p), start, end,
- original_buffer, make_number (i));
+ original_buffer, make_fixnum (i));
if (current_buffer != given_buffer)
{
XSETFASTINT (start, BEGV);
{
tem = Fcar_safe (Fcar (*annot));
nextpos = pos - 1;
- if (INTEGERP (tem))
+ if (FIXNUMP (tem))
nextpos = XFASTINT (tem);
/* If there are no more annotations in this range,
{
int ns = current_buffer->modtime.tv_nsec;
if (ns < 0)
- return make_number (UNKNOWN_MODTIME_NSECS - ns);
+ return make_fixnum (UNKNOWN_MODTIME_NSECS - ns);
return make_lisp_time (current_buffer->modtime);
}
if (!NILP (time_flag))
{
struct timespec mtime;
- if (INTEGERP (time_flag))
+ if (FIXNUMP (time_flag))
{
CHECK_RANGED_INTEGER (time_flag, -1, 0);
mtime = make_timespec (0, UNKNOWN_MODTIME_NSECS - XINT (time_flag));
/* But make sure we can overwrite it later! */
auto_save_mode_bits = (st.st_mode | 0600) & 0777;
else if (modes = Ffile_modes (BVAR (current_buffer, filename)),
- INTEGERP (modes))
+ FIXNUMP (modes))
/* Remote files don't cooperate with stat. */
auto_save_mode_bits = (XINT (modes) | 0600) & 0777;
}
/* Turn off auto-saving until there's a real save,
and prevent any more warnings. */
XSETINT (BVAR (b, save_length), -1);
- Fsleep_for (make_number (1), Qnil);
+ Fsleep_for (make_fixnum (1), Qnil);
continue;
}
if (!auto_saved && NILP (no_message))
{
/* If we are going to restore an old message,
give time to read ours. */
- sit_for (make_number (1), 0, 0);
+ sit_for (make_fixnum (1), 0, 0);
restore_message ();
}
else if (!auto_save_error_occurred)
double
extract_float (Lisp_Object num)
{
- CHECK_NUMBER_OR_FLOAT (num);
+ CHECK_FIXNUM_OR_FLOAT (num);
return XFLOATINT (num);
}
\f
double f = extract_float (x);
int exponent;
double sgnfcand = frexp (f, &exponent);
- return Fcons (make_float (sgnfcand), make_number (exponent));
+ return Fcons (make_float (sgnfcand), make_fixnum (exponent));
}
DEFUN ("ldexp", Fldexp, Sldexp, 2, 2, 0,
EXPONENT must be an integer. */)
(Lisp_Object sgnfcand, Lisp_Object exponent)
{
- CHECK_NUMBER (exponent);
+ CHECK_FIXNUM (exponent);
int e = min (max (INT_MIN, XINT (exponent)), INT_MAX);
return make_float (ldexp (extract_float (sgnfcand), e));
}
doc: /* Return the exponential ARG1 ** ARG2. */)
(Lisp_Object arg1, Lisp_Object arg2)
{
- CHECK_NUMBER_OR_FLOAT (arg1);
- CHECK_NUMBER_OR_FLOAT (arg2);
- if (INTEGERP (arg1) /* common lisp spec */
- && INTEGERP (arg2) /* don't promote, if both are ints, and */
+ CHECK_FIXNUM_OR_FLOAT (arg1);
+ 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 */
{ /* this can be improved by pre-calculating */
EMACS_INT y; /* some binary powers of x then accumulating */
doc: /* Return the absolute value of ARG. */)
(register Lisp_Object arg)
{
- CHECK_NUMBER_OR_FLOAT (arg);
+ CHECK_FIXNUM_OR_FLOAT (arg);
if (FLOATP (arg))
arg = make_float (fabs (XFLOAT_DATA (arg)));
doc: /* Return the floating point number equal to ARG. */)
(register Lisp_Object arg)
{
- CHECK_NUMBER_OR_FLOAT (arg);
+ CHECK_FIXNUM_OR_FLOAT (arg);
- if (INTEGERP (arg))
+ if (FIXNUMP (arg))
return make_float ((double) XINT (arg));
else /* give 'em the same float back */
return arg;
(Lisp_Object arg)
{
EMACS_INT value;
- CHECK_NUMBER_OR_FLOAT (arg);
+ CHECK_FIXNUM_OR_FLOAT (arg);
if (FLOATP (arg))
{
: EMACS_UINT_WIDTH - 1 - ecount_leading_zeros (i));
}
- return make_number (value);
+ return make_fixnum (value);
}
EMACS_INT (*int_round2) (EMACS_INT, EMACS_INT),
const char *name)
{
- CHECK_NUMBER_OR_FLOAT (arg);
+ CHECK_FIXNUM_OR_FLOAT (arg);
double d;
if (NILP (divisor))
}
else
{
- CHECK_NUMBER_OR_FLOAT (divisor);
+ CHECK_FIXNUM_OR_FLOAT (divisor);
if (!FLOATP (arg) && !FLOATP (divisor))
{
if (XINT (divisor) == 0)
xsignal0 (Qarith_error);
- return make_number (int_round2 (XINT (arg), XINT (divisor)));
+ return make_fixnum (int_round2 (XINT (arg), XINT (divisor)));
}
double f1 = FLOATP (arg) ? XFLOAT_DATA (arg) : XINT (arg);
{
EMACS_INT ir = dr;
if (! FIXNUM_OVERFLOW_P (ir))
- return make_number (ir);
+ return make_fixnum (ir);
}
xsignal2 (Qrange_error, build_string (name), arg);
}
seed_random (SSDATA (limit), SBYTES (limit));
val = get_random ();
- if (INTEGERP (limit) && 0 < XINT (limit))
+ if (FIXNUMP (limit) && 0 < XINT (limit))
while (true)
{
/* Return the remainder, except reject the rare case where
remainder isn't random. */
EMACS_INT remainder = val % XINT (limit);
if (val - remainder <= INTMASK - XINT (limit) + 1)
- return make_number (remainder);
+ return make_fixnum (remainder);
val = get_random ();
}
- return make_number (val);
+ return make_fixnum (val);
}
\f
/* Random data-structure functions. */
CHECK_LIST_END (sequence, sequence);
if (MOST_POSITIVE_FIXNUM < i)
error ("List too long");
- val = make_number (i);
+ val = make_fixnum (i);
}
else if (NILP (sequence))
XSETFASTINT (val, 0);
(Lisp_Object string)
{
CHECK_STRING (string);
- return make_number (SBYTES (string));
+ return make_fixnum (SBYTES (string));
}
DEFUN ("string-distance", Fstring_distance, Sstring_distance, 2, 3, 0,
}
SAFE_FREE ();
- return make_number (column[len1]);
+ return make_fixnum (column[len1]);
}
DEFUN ("string-equal", Fstring_equal, Sstring_equal, 2, 2, 0,
/* For backward compatibility, silently bring too-large positive end
values into range. */
- if (INTEGERP (end1) && SCHARS (str1) < XINT (end1))
- end1 = make_number (SCHARS (str1));
- if (INTEGERP (end2) && SCHARS (str2) < XINT (end2))
- end2 = make_number (SCHARS (str2));
+ if (FIXNUMP (end1) && SCHARS (str1) < XINT (end1))
+ end1 = make_fixnum (SCHARS (str1));
+ if (FIXNUMP (end2) && SCHARS (str2) < XINT (end2))
+ end2 = make_fixnum (SCHARS (str2));
validate_subarray (str1, start1, end1, SCHARS (str1), &from1, &to1);
validate_subarray (str2, start2, end2, SCHARS (str2), &from2, &to2);
if (! NILP (ignore_case))
{
- c1 = XINT (Fupcase (make_number (c1)));
- c2 = XINT (Fupcase (make_number (c2)));
+ c1 = XINT (Fupcase (make_fixnum (c1)));
+ c2 = XINT (Fupcase (make_fixnum (c2)));
}
if (c1 == c2)
past the character that we are comparing;
hence we don't add or subtract 1 here. */
if (c1 < c2)
- return make_number (- i1 + from1);
+ return make_fixnum (- i1 + from1);
else
- return make_number (i1 - from1);
+ return make_fixnum (i1 - from1);
}
if (i1 < to1)
- return make_number (i1 - from1 + 1);
+ return make_fixnum (i1 - from1 + 1);
if (i2 < to2)
- return make_number (- i1 + from1 - 1);
+ return make_fixnum (- i1 + from1 - 1);
return Qt;
}
some_multibyte = 1;
}
else if (BOOL_VECTOR_P (this) && bool_vector_size (this) > 0)
- wrong_type_argument (Qintegerp, Faref (this, make_number (0)));
+ wrong_type_argument (Qintegerp, Faref (this, make_fixnum (0)));
else if (CONSP (this))
for (; CONSP (this); this = XCDR (this))
{
/* Create the output object. */
if (target_type == Lisp_Cons)
- val = Fmake_list (make_number (result_len), Qnil);
+ val = Fmake_list (make_fixnum (result_len), Qnil);
else if (target_type == Lisp_Vectorlike)
- val = Fmake_vector (make_number (result_len), Qnil);
+ val = Fmake_vector (make_fixnum (result_len), Qnil);
else if (some_multibyte)
val = make_uninit_multibyte_string (result_len, result_len_byte);
else
{
this = args[textprops[argnum].argnum];
props = text_property_list (this,
- make_number (0),
- make_number (SCHARS (this)),
+ make_fixnum (0),
+ make_fixnum (SCHARS (this)),
Qnil);
/* If successive arguments have properties, be sure that the
value of `composition' property be the copy. */
if (last_to_end == textprops[argnum].to)
make_composition_value_copy (props);
add_text_properties_from_list (val, props,
- make_number (textprops[argnum].to));
+ make_fixnum (textprops[argnum].to));
last_to_end = textprops[argnum].to + SCHARS (this);
}
}
{
EMACS_INT f, t;
- if (INTEGERP (from))
+ if (FIXNUMP (from))
{
f = XINT (from);
if (f < 0)
else
wrong_type_argument (Qintegerp, from);
- if (INTEGERP (to))
+ if (FIXNUMP (to))
{
t = XINT (to);
if (t < 0)
res = make_specified_string (SSDATA (string) + from_byte,
ito - ifrom, to_byte - from_byte,
STRING_MULTIBYTE (string));
- copy_text_properties (make_number (ifrom), make_number (ito),
- string, make_number (0), res, Qnil);
+ copy_text_properties (make_fixnum (ifrom), make_fixnum (ito),
+ string, make_fixnum (0), res, Qnil);
}
else
res = Fvector (ito - ifrom, aref_addr (string, ifrom));
ptrdiff_t size = CHECK_VECTOR_OR_STRING (string);
if (!(0 <= from && from <= to && to <= size))
- args_out_of_range_3 (string, make_number (from), make_number (to));
+ args_out_of_range_3 (string, make_fixnum (from), make_fixnum (to));
if (STRINGP (string))
{
res = make_specified_string (SSDATA (string) + from_byte,
to - from, to_byte - from_byte,
STRING_MULTIBYTE (string));
- copy_text_properties (make_number (from), make_number (to),
- string, make_number (0), res, Qnil);
+ copy_text_properties (make_fixnum (from), make_fixnum (to),
+ string, make_fixnum (0), res, Qnil);
}
else
res = Fvector (to - from, aref_addr (string, from));
doc: /* Take cdr N times on LIST, return the result. */)
(Lisp_Object n, Lisp_Object list)
{
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
Lisp_Object tail = list;
for (EMACS_INT num = XINT (n); 0 < num; num--)
{
doc: /* Return element of SEQUENCE at index N. */)
(register Lisp_Object sequence, Lisp_Object n)
{
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
if (CONSP (sequence) || NILP (sequence))
return Fcar (Fnthcdr (n, sequence));
cbytes = 1;
}
- if (!INTEGERP (elt) || c != XINT (elt))
+ if (!FIXNUMP (elt) || c != XINT (elt))
{
++nchars;
nbytes += cbytes;
cbytes = 1;
}
- if (!INTEGERP (elt) || c != XINT (elt))
+ if (!FIXNUMP (elt) || c != XINT (elt))
{
unsigned char *from = SDATA (seq) + ibyte;
unsigned char *to = SDATA (tem) + nbytes;
USE_SAFE_ALLOCA;
SAFE_ALLOCA_LISP (tmp, halflen);
for (ptrdiff_t i = 0; i < halflen; i++)
- tmp[i] = make_number (0);
+ tmp[i] = make_fixnum (0);
sort_vector_inplace (predicate, len, XVECTOR (vector)->contents, tmp);
SAFE_FREE ();
}
Fding (Qnil);
Fdiscard_input ();
message1 ("Please answer yes or no.");
- Fsleep_for (make_number (2), Qnil);
+ Fsleep_for (make_fixnum (2), Qnil);
}
}
\f
while (loads-- > 0)
{
Lisp_Object load = (NILP (use_floats)
- ? make_number (100.0 * load_ave[loads])
+ ? make_fixnum (100.0 * load_ave[loads])
: make_float (load_ave[loads]));
ret = Fcons (load, ret);
}
CHECK_SYMBOL (feature);
CHECK_LIST (subfeatures);
if (!NILP (Vautoload_queue))
- Vautoload_queue = Fcons (Fcons (make_number (0), Vfeatures),
+ Vautoload_queue = Fcons (Fcons (make_fixnum (0), Vfeatures),
Vautoload_queue);
tem = Fmemq (feature, Vfeatures);
if (NILP (tem))
#ifdef DAY_1
else if (EQ (item, Qdays)) /* e.g. for calendar-day-name-array */
{
- Lisp_Object v = Fmake_vector (make_number (7), Qnil);
+ Lisp_Object v = Fmake_vector (make_fixnum (7), Qnil);
const int days[7] = {DAY_1, DAY_2, DAY_3, DAY_4, DAY_5, DAY_6, DAY_7};
int i;
synchronize_system_time_locale ();
#ifdef MON_1
else if (EQ (item, Qmonths)) /* e.g. for calendar-month-name-array */
{
- Lisp_Object v = Fmake_vector (make_number (12), Qnil);
+ Lisp_Object v = Fmake_vector (make_fixnum (12), Qnil);
const int months[12] = {MON_1, MON_2, MON_3, MON_4, MON_5, MON_6, MON_7,
MON_8, MON_9, MON_10, MON_11, MON_12};
int i;
SET_PT (old_pos);
/* We return the length of the encoded text. */
- return make_number (encoded_length);
+ return make_fixnum (encoded_length);
}
DEFUN ("base64-encode-string", Fbase64_encode_string, Sbase64_encode_string,
old_pos = XFASTINT (beg);
SET_PT (old_pos > ZV ? ZV : old_pos);
- return make_number (inserted_chars);
+ return make_fixnum (inserted_chars);
}
DEFUN ("base64-decode-string", Fbase64_decode_string, Sbase64_decode_string,
static void
set_hash_next_slot (struct Lisp_Hash_Table *h, ptrdiff_t idx, ptrdiff_t val)
{
- gc_aset (h->next, idx, make_number (val));
+ gc_aset (h->next, idx, make_fixnum (val));
}
static void
set_hash_hash (struct Lisp_Hash_Table *h, Lisp_Object hash)
static void
set_hash_index_slot (struct Lisp_Hash_Table *h, ptrdiff_t idx, ptrdiff_t val)
{
- gc_aset (h->index, idx, make_number (val));
+ gc_aset (h->index, idx, make_fixnum (val));
}
/* If OBJ is a Lisp hash table, return a pointer to its struct
h->rehash_threshold = rehash_threshold;
h->rehash_size = rehash_size;
h->count = 0;
- h->key_and_value = Fmake_vector (make_number (2 * size), Qnil);
- h->hash = Fmake_vector (make_number (size), Qnil);
- h->next = Fmake_vector (make_number (size), make_number (-1));
- h->index = Fmake_vector (make_number (index_size), make_number (-1));
+ h->key_and_value = Fmake_vector (make_fixnum (2 * size), Qnil);
+ h->hash = Fmake_vector (make_fixnum (size), Qnil);
+ h->next = Fmake_vector (make_fixnum (size), make_fixnum (-1));
+ h->index = Fmake_vector (make_fixnum (index_size), make_fixnum (-1));
h->pure = pure;
/* Set up the free list. */
set_hash_key_and_value (h, larger_vector (h->key_and_value,
2 * (new_size - old_size), -1));
set_hash_hash (h, larger_vector (h->hash, new_size - old_size, -1));
- set_hash_index (h, Fmake_vector (make_number (index_size),
- make_number (-1)));
+ set_hash_index (h, Fmake_vector (make_fixnum (index_size),
+ make_fixnum (-1)));
set_hash_next (h, larger_vecalloc (h->next, new_size - old_size, -1));
/* Update the free list. Do it so that new entries are added at
set_hash_value_slot (h, i, value);
/* Remember its hash code. */
- set_hash_hash_slot (h, i, make_number (hash));
+ set_hash_hash_slot (h, i, make_fixnum (hash));
/* Add new entry to its collision chain. */
start_of_bucket = hash % ASIZE (h->index);
}
for (i = 0; i < ASIZE (h->index); ++i)
- ASET (h->index, i, make_number (-1));
+ ASET (h->index, i, make_fixnum (-1));
h->next_free = 0;
h->count = 0;
If (eq A B), then (= (sxhash-eq A) (sxhash-eq B)). */)
(Lisp_Object obj)
{
- return make_number (hashfn_eq (NULL, obj));
+ return make_fixnum (hashfn_eq (NULL, obj));
}
DEFUN ("sxhash-eql", Fsxhash_eql, Ssxhash_eql, 1, 1, 0,
If (eql A B), then (= (sxhash-eql A) (sxhash-eql B)). */)
(Lisp_Object obj)
{
- return make_number (hashfn_eql (NULL, obj));
+ return make_fixnum (hashfn_eql (NULL, obj));
}
DEFUN ("sxhash-equal", Fsxhash_equal, Ssxhash_equal, 1, 1, 0,
If (equal A B), then (= (sxhash-equal A) (sxhash-equal B)). */)
(Lisp_Object obj)
{
- return make_number (hashfn_equal (NULL, obj));
+ return make_fixnum (hashfn_equal (NULL, obj));
}
DEFUN ("make-hash-table", Fmake_hash_table, Smake_hash_table, 0, MANY, 0,
EMACS_INT size;
if (NILP (size_arg))
size = DEFAULT_HASH_SIZE;
- else if (NATNUMP (size_arg))
+ else if (FIXNATP (size_arg))
size = XFASTINT (size_arg);
else
signal_error ("Invalid hash table size", size_arg);
i = get_key_arg (QCrehash_size, nargs, args, used);
if (!i)
rehash_size = DEFAULT_REHASH_SIZE;
- else if (INTEGERP (args[i]) && 0 < XINT (args[i]))
+ else if (FIXNUMP (args[i]) && 0 < XINT (args[i]))
rehash_size = - XINT (args[i]);
else if (FLOATP (args[i]) && 0 < (float) (XFLOAT_DATA (args[i]) - 1))
rehash_size = (float) (XFLOAT_DATA (args[i]) - 1);
doc: /* Return the number of elements in TABLE. */)
(Lisp_Object table)
{
- return make_number (check_hash_table (table)->count);
+ return make_fixnum (check_hash_table (table)->count);
}
if (rehash_size < 0)
{
EMACS_INT s = -rehash_size;
- return make_number (min (s, MOST_POSITIVE_FIXNUM));
+ return make_fixnum (min (s, MOST_POSITIVE_FIXNUM));
}
else
return make_float (rehash_size + 1);
(Lisp_Object table)
{
struct Lisp_Hash_Table *h = check_hash_table (table);
- return make_number (HASH_TABLE_SIZE (h));
+ return make_fixnum (HASH_TABLE_SIZE (h));
}
b = BEGV;
else
{
- CHECK_NUMBER_COERCE_MARKER (start);
+ CHECK_FIXNUM_COERCE_MARKER (start);
b = XINT (start);
}
e = ZV;
else
{
- CHECK_NUMBER_COERCE_MARKER (end);
+ CHECK_FIXNUM_COERCE_MARKER (end);
e = XINT (end);
}
&& !NILP (Ffboundp (Vselect_safe_coding_system_function)))
/* Confirm that VAL can surely encode the current region. */
coding_system = call4 (Vselect_safe_coding_system_function,
- make_number (b), make_number (e),
+ make_fixnum (b), make_fixnum (e),
coding_system, Qnil);
if (force_raw_text)
#ifdef HAVE_GNUTLS3
/* Format: (iv-auto REQUIRED-LENGTH). */
- if (! NATNUMP (start))
+ if (! FIXNATP (start))
error ("Without a length, `iv-auto' can't be used; see ELisp manual");
else
{
= Fcopy_alist (AREF (entity, FONT_EXTRA_INDEX));
}
if (size > 0)
- font->props[FONT_SIZE_INDEX] = make_number (pixelsize);
+ font->props[FONT_SIZE_INDEX] = make_fixnum (pixelsize);
return font_object;
}
(n += str[i++] - '0') <= MOST_POSITIVE_FIXNUM; )
{
if (i == len)
- return make_number (n);
+ return make_fixnum (n);
if (INT_MULTIPLY_WRAPV (n, 10, &n))
break;
}
int dpi, pixel_size;
Lisp_Object val;
- if (INTEGERP (size))
+ if (FIXNUMP (size))
return XINT (size);
if (NILP (size))
return 0;
eassert (FLOATP (size));
point_size = XFLOAT_DATA (size);
val = AREF (spec, FONT_DPI_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
dpi = XINT (val);
else
dpi = FRAME_RES_Y (f);
for (j = 1; j < ASIZE (AREF (table, i)); j++)
if (EQ (val, AREF (AREF (table, i), j)))
{
- CHECK_NUMBER (AREF (AREF (table, i), 0));
+ CHECK_FIXNUM (AREF (AREF (table, i), 0));
return ((XINT (AREF (AREF (table, i), 0)) << 8)
| (i << 4) | (j - 1));
}
elt = AREF (AREF (table, i), j);
if (xstrcasecmp (s, SSDATA (SYMBOL_NAME (elt))) == 0)
{
- CHECK_NUMBER (AREF (AREF (table, i), 0));
+ CHECK_FIXNUM (AREF (AREF (table, i), 0));
return ((XINT (AREF (AREF (table, i), 0)) << 8)
| (i << 4) | (j - 1));
}
if (! noerror)
return -1;
eassert (len < 255);
- elt = Fmake_vector (make_number (2), make_number (100));
+ elt = Fmake_vector (make_fixnum (2), make_fixnum (100));
ASET (elt, 1, val);
ASET (font_style_table, prop - FONT_WEIGHT_INDEX,
- CALLN (Fvconcat, table, Fmake_vector (make_number (1), elt)));
+ CALLN (Fvconcat, table, Fmake_vector (make_fixnum (1), elt)));
return (100 << 8) | (i << 4);
}
else
int n;
CHECK_VECTOR (AREF (table, i));
- CHECK_NUMBER (AREF (AREF (table, i), 0));
+ CHECK_FIXNUM (AREF (AREF (table, i), 0));
n = XINT (AREF (AREF (table, i), 0));
if (numeric == n)
return (n << 8) | (i << 4);
}
else
goto invalid_entry;
- val = Fcons (make_number (encoding_id), make_number (repertory_id));
+ val = Fcons (make_fixnum (encoding_id), make_fixnum (repertory_id));
font_charset_alist
= nconc2 (font_charset_alist, list1 (Fcons (registry, val)));
}
enum font_property_index prop = (EQ (style, QCweight) ? FONT_WEIGHT_INDEX
: EQ (style, QCslant) ? FONT_SLANT_INDEX
: FONT_WIDTH_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
EMACS_INT n = XINT (val);
CHECK_VECTOR (AREF (font_style_table, prop - FONT_WEIGHT_INDEX));
val = Qerror;
else
{
- CHECK_NUMBER (AREF (elt, 0));
+ CHECK_FIXNUM (AREF (elt, 0));
if (XINT (AREF (elt, 0)) != (n >> 8))
val = Qerror;
}
{
int n = font_style_to_value (prop, val, 0);
- val = n >= 0 ? make_number (n) : Qerror;
+ val = n >= 0 ? make_fixnum (n) : Qerror;
}
else
val = Qerror;
static Lisp_Object
font_prop_validate_non_neg (Lisp_Object prop, Lisp_Object val)
{
- return (NATNUMP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0)
+ return (FIXNATP (val) || (FLOATP (val) && XFLOAT_DATA (val) >= 0)
? val : Qerror);
}
static Lisp_Object
font_prop_validate_spacing (Lisp_Object prop, Lisp_Object val)
{
- if (NILP (val) || (NATNUMP (val) && XINT (val) <= FONT_SPACING_CHARCELL))
+ if (NILP (val) || (FIXNATP (val) && XINT (val) <= FONT_SPACING_CHARCELL))
return val;
if (SYMBOLP (val) && SBYTES (SYMBOL_NAME (val)) == 1)
{
char spacing = SDATA (SYMBOL_NAME (val))[0];
if (spacing == 'c' || spacing == 'C')
- return make_number (FONT_SPACING_CHARCELL);
+ return make_fixnum (FONT_SPACING_CHARCELL);
if (spacing == 'm' || spacing == 'M')
- return make_number (FONT_SPACING_MONO);
+ return make_fixnum (FONT_SPACING_MONO);
if (spacing == 'p' || spacing == 'P')
- return make_number (FONT_SPACING_PROPORTIONAL);
+ return make_fixnum (FONT_SPACING_PROPORTIONAL);
if (spacing == 'd' || spacing == 'D')
- return make_number (FONT_SPACING_DUAL);
+ return make_fixnum (FONT_SPACING_DUAL);
}
return Qerror;
}
int from, to;
unsigned mask;
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
EMACS_INT numeric = XINT (val);
if (! NILP (tmp[n - 1]) && j < XLFD_REGISTRY_INDEX)
return -1;
memclear (field + j, (XLFD_LAST_INDEX - j) * word_size);
- if (INTEGERP (field[XLFD_ENCODING_INDEX]))
+ if (FIXNUMP (field[XLFD_ENCODING_INDEX]))
field[XLFD_ENCODING_INDEX]
= Fintern (Fnumber_to_string (field[XLFD_ENCODING_INDEX]), Qnil);
return 0;
{
if ((n = font_style_to_value (j, INTERN_FIELD_SYM (i), 0)) < 0)
return -1;
- ASET (font, j, make_number (n));
+ ASET (font, j, make_fixnum (n));
}
}
ASET (font, FONT_ADSTYLE_INDEX, INTERN_FIELD_SYM (XLFD_ADSTYLE_INDEX));
1));
p = f[XLFD_PIXEL_INDEX];
if (*p == '[' && (pixel_size = parse_matrix (p)) >= 0)
- ASET (font, FONT_SIZE_INDEX, make_number (pixel_size));
+ ASET (font, FONT_SIZE_INDEX, make_fixnum (pixel_size));
else
{
val = INTERN_FIELD (XLFD_PIXEL_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
ASET (font, FONT_SIZE_INDEX, val);
else if (FONT_ENTITY_P (font))
return -1;
}
val = INTERN_FIELD (XLFD_RESY_INDEX);
- if (! NILP (val) && ! INTEGERP (val))
+ if (! NILP (val) && ! FIXNUMP (val))
return -1;
ASET (font, FONT_DPI_INDEX, val);
val = INTERN_FIELD (XLFD_SPACING_INDEX);
if (! NILP (val))
{
val = font_prop_validate_spacing (QCspacing, val);
- if (! INTEGERP (val))
+ if (! FIXNUMP (val))
return -1;
ASET (font, FONT_SPACING_INDEX, val);
}
if (*p == '~')
p++;
val = font_intern_prop (p, f[XLFD_REGISTRY_INDEX] - 1 - p, 0);
- if (! NILP (val) && ! INTEGERP (val))
+ if (! NILP (val) && ! FIXNUMP (val))
return -1;
ASET (font, FONT_AVGWIDTH_INDEX, val);
}
{
if ((n = font_style_to_value (j, prop[i], 1)) < 0)
return -1;
- ASET (font, j, make_number (n));
+ ASET (font, j, make_fixnum (n));
}
ASET (font, FONT_ADSTYLE_INDEX, prop[XLFD_ADSTYLE_INDEX]);
val = prop[XLFD_REGISTRY_INDEX];
if (! NILP (val))
ASET (font, FONT_REGISTRY_INDEX, Fintern (val, Qnil));
- if (INTEGERP (prop[XLFD_PIXEL_INDEX]))
+ if (FIXNUMP (prop[XLFD_PIXEL_INDEX]))
ASET (font, FONT_SIZE_INDEX, prop[XLFD_PIXEL_INDEX]);
- else if (INTEGERP (prop[XLFD_POINT_INDEX]))
+ else if (FIXNUMP (prop[XLFD_POINT_INDEX]))
{
double point_size = XINT (prop[XLFD_POINT_INDEX]);
ASET (font, FONT_SIZE_INDEX, make_float (point_size / 10));
}
- if (INTEGERP (prop[XLFD_RESX_INDEX]))
+ if (FIXNUMP (prop[XLFD_RESX_INDEX]))
ASET (font, FONT_DPI_INDEX, prop[XLFD_RESY_INDEX]);
if (! NILP (prop[XLFD_SPACING_INDEX]))
{
val = font_prop_validate_spacing (QCspacing,
prop[XLFD_SPACING_INDEX]);
- if (! INTEGERP (val))
+ if (! FIXNUMP (val))
return -1;
ASET (font, FONT_SPACING_INDEX, val);
}
- if (INTEGERP (prop[XLFD_AVGWIDTH_INDEX]))
+ if (FIXNUMP (prop[XLFD_AVGWIDTH_INDEX]))
ASET (font, FONT_AVGWIDTH_INDEX, prop[XLFD_AVGWIDTH_INDEX]);
}
}
val = AREF (font, FONT_SIZE_INDEX);
- eassert (NUMBERP (val) || NILP (val));
+ eassert (FIXED_OR_FLOATP (val) || NILP (val));
char font_size_index_buf[sizeof "-*"
+ max (INT_STRLEN_BOUND (EMACS_INT),
1 + DBL_MAX_10_EXP + 1)];
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
EMACS_INT v = XINT (val);
if (v <= 0)
f[XLFD_PIXEL_INDEX] = "*-*";
char dpi_index_buf[sizeof "-" + 2 * INT_STRLEN_BOUND (EMACS_INT)];
- if (INTEGERP (AREF (font, FONT_DPI_INDEX)))
+ if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
{
EMACS_INT v = XINT (AREF (font, FONT_DPI_INDEX));
f[XLFD_RESX_INDEX] = p = dpi_index_buf;
else
f[XLFD_RESX_INDEX] = "*-*";
- if (INTEGERP (AREF (font, FONT_SPACING_INDEX)))
+ if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
{
EMACS_INT spacing = XINT (AREF (font, FONT_SPACING_INDEX));
f[XLFD_SPACING_INDEX] = "*";
char avgwidth_index_buf[INT_BUFSIZE_BOUND (EMACS_INT)];
- if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX)))
+ 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)));
FONT_SET_STYLE (font, FONT_SLANT_INDEX, val);
else if (PROP_MATCH ("charcell"))
ASET (font, FONT_SPACING_INDEX,
- make_number (FONT_SPACING_CHARCELL));
+ make_fixnum (FONT_SPACING_CHARCELL));
else if (PROP_MATCH ("mono"))
ASET (font, FONT_SPACING_INDEX,
- make_number (FONT_SPACING_MONO));
+ make_fixnum (FONT_SPACING_MONO));
else if (PROP_MATCH ("proportional"))
ASET (font, FONT_SPACING_INDEX,
- make_number (FONT_SPACING_PROPORTIONAL));
+ make_fixnum (FONT_SPACING_PROPORTIONAL));
#undef PROP_MATCH
}
else
}
val = AREF (font, FONT_SIZE_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
if (XINT (val) != 0)
pixel_size = XINT (val);
p += len;
}
- if (INTEGERP (AREF (font, FONT_DPI_INDEX)))
+ if (FIXNUMP (AREF (font, FONT_DPI_INDEX)))
{
int len = snprintf (p, lim - p, ":dpi=%"pI"d",
XINT (AREF (font, FONT_DPI_INDEX)));
p += len;
}
- if (INTEGERP (AREF (font, FONT_SPACING_INDEX)))
+ if (FIXNUMP (AREF (font, FONT_SPACING_INDEX)))
{
int len = snprintf (p, lim - p, ":spacing=%"pI"d",
XINT (AREF (font, FONT_SPACING_INDEX)));
p += len;
}
- if (INTEGERP (AREF (font, FONT_AVGWIDTH_INDEX)))
+ if (FIXNUMP (AREF (font, FONT_AVGWIDTH_INDEX)))
{
int len = snprintf (p, lim - p,
(XINT (AREF (font, FONT_AVGWIDTH_INDEX)) == 0
goto err;
CHECK_FONT_OBJECT (LGSTRING_FONT (gstring));
if (!NILP (LGSTRING_SLOT (gstring, LGSTRING_IX_LBEARING)))
- CHECK_NUMBER (LGSTRING_SLOT (gstring, LGSTRING_IX_LBEARING));
+ CHECK_FIXNUM (LGSTRING_SLOT (gstring, LGSTRING_IX_LBEARING));
if (!NILP (LGSTRING_SLOT (gstring, LGSTRING_IX_RBEARING)))
- CHECK_NUMBER (LGSTRING_SLOT (gstring, LGSTRING_IX_RBEARING));
+ CHECK_FIXNUM (LGSTRING_SLOT (gstring, LGSTRING_IX_RBEARING));
if (!NILP (LGSTRING_SLOT (gstring, LGSTRING_IX_WIDTH)))
- CHECK_NATNUM (LGSTRING_SLOT (gstring, LGSTRING_IX_WIDTH));
+ CHECK_FIXNAT (LGSTRING_SLOT (gstring, LGSTRING_IX_WIDTH));
if (!NILP (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT)))
- CHECK_NUMBER (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT));
+ CHECK_FIXNUM (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT));
if (!NILP (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT)))
- CHECK_NUMBER (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT));
+ CHECK_FIXNUM (LGSTRING_SLOT (gstring, LGSTRING_IX_ASCENT));
for (i = 0; i < LGSTRING_GLYPH_LEN (gstring); i++)
{
goto err;
if (NILP (AREF (val, LGLYPH_IX_CHAR)))
break;
- CHECK_NATNUM (AREF (val, LGLYPH_IX_FROM));
- CHECK_NATNUM (AREF (val, LGLYPH_IX_TO));
+ CHECK_FIXNAT (AREF (val, LGLYPH_IX_FROM));
+ CHECK_FIXNAT (AREF (val, LGLYPH_IX_TO));
CHECK_CHARACTER (AREF (val, LGLYPH_IX_CHAR));
if (!NILP (AREF (val, LGLYPH_IX_CODE)))
- CHECK_NATNUM (AREF (val, LGLYPH_IX_CODE));
+ CHECK_FIXNAT (AREF (val, LGLYPH_IX_CODE));
if (!NILP (AREF (val, LGLYPH_IX_WIDTH)))
- CHECK_NATNUM (AREF (val, LGLYPH_IX_WIDTH));
+ CHECK_FIXNAT (AREF (val, LGLYPH_IX_WIDTH));
if (!NILP (AREF (val, LGLYPH_IX_ADJUSTMENT)))
{
val = AREF (val, LGLYPH_IX_ADJUSTMENT);
if (ASIZE (val) < 3)
goto err;
for (j = 0; j < 3; j++)
- CHECK_NUMBER (AREF (val, j));
+ CHECK_FIXNUM (AREF (val, j));
}
}
return i;
{
int len = device_table->StartSize - device_table->EndSize + 1;
- return Fcons (make_number (len),
+ return Fcons (make_fixnum (len),
make_unibyte_string (device_table->DeltaValue, len));
}
Lisp_Object
font_otf_ValueRecord (int value_format, OTF_ValueRecord *value_record)
{
- Lisp_Object val = Fmake_vector (make_number (8), Qnil);
+ Lisp_Object val = Fmake_vector (make_fixnum (8), Qnil);
if (value_format & OTF_XPlacement)
- ASET (val, 0, make_number (value_record->XPlacement));
+ ASET (val, 0, make_fixnum (value_record->XPlacement));
if (value_format & OTF_YPlacement)
- ASET (val, 1, make_number (value_record->YPlacement));
+ ASET (val, 1, make_fixnum (value_record->YPlacement));
if (value_format & OTF_XAdvance)
- ASET (val, 2, make_number (value_record->XAdvance));
+ ASET (val, 2, make_fixnum (value_record->XAdvance));
if (value_format & OTF_YAdvance)
- ASET (val, 3, make_number (value_record->YAdvance));
+ ASET (val, 3, make_fixnum (value_record->YAdvance));
if (value_format & OTF_XPlaDevice)
ASET (val, 4, font_otf_DeviceTable (&value_record->XPlaDevice));
if (value_format & OTF_YPlaDevice)
{
Lisp_Object val;
- val = Fmake_vector (make_number (anchor->AnchorFormat + 1), Qnil);
- ASET (val, 0, make_number (anchor->XCoordinate));
- ASET (val, 1, make_number (anchor->YCoordinate));
+ val = Fmake_vector (make_fixnum (anchor->AnchorFormat + 1), Qnil);
+ ASET (val, 0, make_fixnum (anchor->XCoordinate));
+ ASET (val, 1, make_fixnum (anchor->YCoordinate));
if (anchor->AnchorFormat == 2)
- ASET (val, 2, make_number (anchor->f.f1.AnchorPoint));
+ ASET (val, 2, make_fixnum (anchor->f.f1.AnchorPoint));
else
{
ASET (val, 3, font_otf_DeviceTable (&anchor->f.f2.XDeviceTable));
prefer_prop[i] = AREF (prefer, i);
if (FLOATP (prefer_prop[FONT_SIZE_INDEX]))
prefer_prop[FONT_SIZE_INDEX]
- = make_number (font_pixel_size (f, prefer));
+ = make_fixnum (font_pixel_size (f, prefer));
if (NILP (XCDR (list)))
{
for (i = FONT_FOUNDRY_INDEX; i < FONT_SIZE_INDEX; i++)
prop[i] = AREF (spec, i);
prop[FONT_SIZE_INDEX]
- = make_number (font_pixel_size (XFRAME (selected_frame), spec));
+ = make_fixnum (font_pixel_size (XFRAME (selected_frame), spec));
props = prop;
}
val = XCDR (val);
if (NILP (val))
{
- val = list2 (driver->type, make_number (1));
+ val = list2 (driver->type, make_fixnum (1));
XSETCDR (cache, Fcons (val, XCDR (cache)));
}
else
{
val = XCDR (XCAR (val));
- XSETCAR (val, make_number (XINT (XCAR (val)) + 1));
+ XSETCAR (val, make_fixnum (XINT (XCAR (val)) + 1));
}
}
cache = val, val = XCDR (val);
eassert (! NILP (val));
tmp = XCDR (XCAR (val));
- XSETCAR (tmp, make_number (XINT (XCAR (tmp)) - 1));
+ XSETCAR (tmp, make_fixnum (XINT (XCAR (tmp)) - 1));
if (XINT (XCAR (tmp)) == 0)
{
font_clear_cache (f, XCAR (val), driver);
continue;
}
for (prop = FONT_WEIGHT_INDEX; prop < FONT_SIZE_INDEX; prop++)
- if (INTEGERP (AREF (spec, prop))
+ if (FIXNUMP (AREF (spec, prop))
&& ((XINT (AREF (spec, prop)) >> 8)
!= (XINT (AREF (entity, prop)) >> 8)))
prop = FONT_SPEC_MAX;
prop = FONT_SPEC_MAX;
}
if (prop < FONT_SPEC_MAX
- && INTEGERP (AREF (spec, FONT_DPI_INDEX))
- && INTEGERP (AREF (entity, FONT_DPI_INDEX))
+ && FIXNUMP (AREF (spec, FONT_DPI_INDEX))
+ && FIXNUMP (AREF (entity, FONT_DPI_INDEX))
&& XINT (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
- && INTEGERP (AREF (spec, FONT_AVGWIDTH_INDEX))
- && INTEGERP (AREF (entity, FONT_AVGWIDTH_INDEX))
+ && FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
+ && FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
&& XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) != 0
&& ! EQ (AREF (spec, FONT_AVGWIDTH_INDEX),
AREF (entity, FONT_AVGWIDTH_INDEX)))
eassert (FONT_SPEC_P (spec));
- if (INTEGERP (AREF (spec, FONT_SIZE_INDEX)))
+ if (FIXNUMP (AREF (spec, FONT_SIZE_INDEX)))
size = XINT (AREF (spec, FONT_SIZE_INDEX));
else if (FLOATP (AREF (spec, FONT_SIZE_INDEX)))
size = font_pixel_size (f, spec);
size = AREF (spec, FONT_SIZE_INDEX);
if (FLOATP (size))
- ASET (work, FONT_SIZE_INDEX, make_number (font_pixel_size (f, spec)));
+ ASET (work, FONT_SIZE_INDEX, make_fixnum (font_pixel_size (f, spec)));
FONT_SET_STYLE (work, FONT_WEIGHT_INDEX, attrs[LFACE_WEIGHT_INDEX]);
FONT_SET_STYLE (work, FONT_SLANT_INDEX, attrs[LFACE_SLANT_INDEX]);
FONT_SET_STYLE (work, FONT_WIDTH_INDEX, attrs[LFACE_SWIDTH_INDEX]);
if (psize > pixel_size + 15)
return Qnil;
}
- ASET (font_object, FONT_SIZE_INDEX, make_number (pixel_size));
+ ASET (font_object, FONT_SIZE_INDEX, make_fixnum (pixel_size));
FONT_ADD_LOG ("open", entity, font_object);
ASET (entity, FONT_OBJLIST_INDEX,
Fcons (font_object, AREF (entity, FONT_OBJLIST_INDEX)));
FONT_SET_STYLE (prefer, FONT_SLANT_INDEX, attrs[LFACE_SLANT_INDEX]);
if (NILP (AREF (prefer, FONT_WIDTH_INDEX)))
FONT_SET_STYLE (prefer, FONT_WIDTH_INDEX, attrs[LFACE_SWIDTH_INDEX]);
- ASET (prefer, FONT_SIZE_INDEX, make_number (pixel_size));
+ ASET (prefer, FONT_SIZE_INDEX, make_fixnum (pixel_size));
return font_sort_entities (entities, prefer, f, c);
}
work = copy_font_spec (spec);
ASET (work, FONT_TYPE_INDEX, AREF (spec, FONT_TYPE_INDEX));
pixel_size = font_pixel_size (f, spec);
- if (pixel_size == 0 && INTEGERP (attrs[LFACE_HEIGHT_INDEX]))
+ if (pixel_size == 0 && FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
{
double pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
{
int size;
- if (INTEGERP (AREF (entity, FONT_SIZE_INDEX))
+ if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX))
&& XINT (AREF (entity, FONT_SIZE_INDEX)) > 0)
size = XINT (AREF (entity, FONT_SIZE_INDEX));
else
else
{
double pt;
- if (INTEGERP (attrs[LFACE_HEIGHT_INDEX]))
+ if (FIXNUMP (attrs[LFACE_HEIGHT_INDEX]))
pt = XINT (attrs[LFACE_HEIGHT_INDEX]);
else
{
struct face *def = FACE_FROM_ID (f, DEFAULT_FACE_ID);
Lisp_Object height = def->lface[LFACE_HEIGHT_INDEX];
- eassert (INTEGERP (height));
+ eassert (FIXNUMP (height));
pt = XINT (height);
}
if (size == 0)
{
Lisp_Object ffsize = get_frame_param (f, Qfontsize);
- size = (NUMBERP (ffsize)
+ size = (FIXED_OR_FLOATP (ffsize)
? POINT_TO_PIXEL (XINT (ffsize), FRAME_RES_Y (f)) : 0);
}
#endif
Lisp_Object lsize = Ffont_get (spec, QCsize);
if ((FLOATP (lsize) && XFLOAT_DATA (lsize) == font_size)
- || (INTEGERP (lsize) && XINT (lsize) == font_size))
+ || (FIXNUMP (lsize) && XINT (lsize) == font_size))
{
ASET (spec, FONT_FAMILY_INDEX,
font_intern_prop (p, tail - p, 1));
attrs[LFACE_SWIDTH_INDEX] = attrs[LFACE_WEIGHT_INDEX]
= attrs[LFACE_SLANT_INDEX] = Qnormal;
#ifndef HAVE_NS
- attrs[LFACE_HEIGHT_INDEX] = make_number (120);
+ attrs[LFACE_HEIGHT_INDEX] = make_fixnum (120);
#else
- attrs[LFACE_HEIGHT_INDEX] = make_number (0);
+ attrs[LFACE_HEIGHT_INDEX] = make_fixnum (0);
#endif
attrs[LFACE_FONT_INDEX] = Qnil;
if (strcmp (boolean_properties[i], keystr) == 0)
{
- const char *str = INTEGERP (val) ? (XINT (val) ? "true" : "false")
+ const char *str = FIXNUMP (val) ? (XINT (val) ? "true" : "false")
: SYMBOLP (val) ? SSDATA (SYMBOL_NAME (val))
: "true";
else
FETCH_STRING_CHAR_ADVANCE_NO_CHECK (c, string, pos, pos_byte);
category = CHAR_TABLE_REF (Vunicode_category_table, c);
- if (INTEGERP (category)
+ if (FIXNUMP (category)
&& (XINT (category) == UNICODE_CATEGORY_Cf
|| CHAR_VARIATION_SELECTOR_P (c)))
continue;
}
val = AREF (font, FONT_SIZE_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
Lisp_Object font_dpi = AREF (font, FONT_DPI_INDEX);
- int dpi = INTEGERP (font_dpi) ? XINT (font_dpi) : FRAME_RES_Y (f);
+ int dpi = FIXNUMP (font_dpi) ? XINT (font_dpi) : FRAME_RES_Y (f);
plist[n++] = QCheight;
- plist[n++] = make_number (PIXEL_TO_POINT (XINT (val) * 10, dpi));
+ plist[n++] = make_fixnum (PIXEL_TO_POINT (XINT (val) * 10, dpi));
}
else if (FLOATP (val))
{
plist[n++] = QCheight;
- plist[n++] = make_number (10 * (int) XFLOAT_DATA (val));
+ plist[n++] = make_fixnum (10 * (int) XFLOAT_DATA (val));
}
val = FONT_WEIGHT_FOR_FACE (font);
CHECK_FONT_SPEC (font_spec);
if (! NILP (num))
{
- CHECK_NUMBER (num);
+ CHECK_FIXNUM (num);
n = XINT (num);
if (n <= 0)
return Qnil;
Optional 2nd argument FRAME, if non-nil, specifies the target frame. */)
(Lisp_Object font_spec, Lisp_Object frame)
{
- Lisp_Object val = Flist_fonts (font_spec, frame, make_number (1), Qnil);
+ Lisp_Object val = Flist_fonts (font_spec, frame, make_fixnum (1), Qnil);
if (CONSP (val))
val = XCAR (val);
for (i = 0; i < 3; i++)
{
n = font->driver->shape (gstring);
- if (INTEGERP (n))
+ if (FIXNUMP (n))
break;
gstring = larger_vector (gstring,
LGSTRING_GLYPH_LEN (gstring), -1);
{
int vs = (i < 16 ? 0xFE00 + i : 0xE0100 + (i - 16));
Lisp_Object code = INTEGER_TO_CONS (variations[i]);
- val = Fcons (Fcons (make_number (vs), code), val);
+ val = Fcons (Fcons (make_fixnum (vs), code), val);
}
return val;
}
Lisp_Object window;
struct window *w;
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (! (BEGV <= XINT (position) && XINT (position) < ZV))
- args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
+ args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
pos = XINT (position);
pos_byte = CHAR_TO_BYTE (pos);
if (NILP (ch))
c = FETCH_CHAR (pos_byte);
else
{
- CHECK_NATNUM (ch);
+ CHECK_FIXNAT (ch);
c = XINT (ch);
}
window = Fget_buffer_window (Fcurrent_buffer (), Qnil);
CHECK_CONS (val);
len = check_gstring (gstring_in);
CHECK_VECTOR (gstring_out);
- CHECK_NATNUM (from);
- CHECK_NATNUM (to);
- CHECK_NATNUM (index);
+ CHECK_FIXNAT (from);
+ CHECK_FIXNAT (to);
+ CHECK_FIXNAT (index);
if (XINT (from) >= XINT (to) || XINT (to) > len)
- args_out_of_range_3 (from, to, make_number (len));
+ args_out_of_range_3 (from, to, make_fixnum (len));
if (XINT (index) >= ASIZE (gstring_out))
- args_out_of_range (index, make_number (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);
if (num < 0)
return Qnil;
- return make_number (num);
+ return make_fixnum (num);
}
DEFUN ("font-otf-alternates", Ffont_otf_alternates, Sfont_otf_alternates,
CHECK_CHARACTER (character);
CHECK_CONS (otf_features);
- gstring_in = Ffont_make_gstring (font_object, make_number (1));
+ gstring_in = Ffont_make_gstring (font_object, make_fixnum (1));
g = LGSTRING_GLYPH (gstring_in, 0);
LGLYPH_SET_CHAR (g, XINT (character));
- gstring_out = Ffont_make_gstring (font_object, make_number (10));
+ 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)
gstring_out = Ffont_make_gstring (font_object,
- make_number (ASIZE (gstring_out) * 2));
+ make_fixnum (ASIZE (gstring_out) * 2));
alternates = Qnil;
for (i = 0; i < num; i++)
{
int c = LGLYPH_CHAR (g);
unsigned code = LGLYPH_CODE (g);
- alternates = Fcons (Fcons (make_number (code),
- c > 0 ? make_number (c) : Qnil),
+ alternates = Fcons (Fcons (make_fixnum (code),
+ c > 0 ? make_fixnum (c) : Qnil),
alternates);
}
return Fnreverse (alternates);
isize = XINT (AREF (font_entity, FONT_SIZE_INDEX));
else
{
- CHECK_NUMBER_OR_FLOAT (size);
+ CHECK_FIXNUM_OR_FLOAT (size);
if (FLOATP (size))
isize = POINT_TO_PIXEL (XFLOAT_DATA (size), FRAME_RES_Y (f));
else
ASET (val, 0, AREF (font_object, FONT_NAME_INDEX));
ASET (val, 1, AREF (font_object, FONT_FILE_INDEX));
- ASET (val, 2, make_number (font->pixel_size));
- ASET (val, 3, make_number (font->max_width));
- ASET (val, 4, make_number (font->ascent));
- ASET (val, 5, make_number (font->descent));
- ASET (val, 6, make_number (font->space_width));
- ASET (val, 7, make_number (font->average_width));
+ ASET (val, 2, make_fixnum (font->pixel_size));
+ ASET (val, 3, make_fixnum (font->max_width));
+ ASET (val, 4, make_fixnum (font->ascent));
+ ASET (val, 5, make_fixnum (font->descent));
+ ASET (val, 6, make_fixnum (font->space_width));
+ ASET (val, 7, make_fixnum (font->average_width));
if (font->driver->otf_capability)
ASET (val, 8, Fcons (Qopentype, font->driver->otf_capability (font)));
else
{
int c;
FETCH_CHAR_ADVANCE (c, charpos, bytepos);
- chars[i] = make_number (c);
+ chars[i] = make_fixnum (c);
}
}
else if (STRINGP (object))
for (i = 0; i < len; i++)
{
c = STRING_CHAR_ADVANCE (p);
- chars[i] = make_number (c);
+ chars[i] = make_fixnum (c);
}
}
else
for (i = 0; i < len; i++)
- chars[i] = make_number (p[ifrom + i]);
+ chars[i] = make_fixnum (p[ifrom + i]);
}
else if (VECTORP (object))
{
{
if (XBUFFER (w->contents) != current_buffer)
error ("Specified window is not displaying the current buffer");
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (! (BEGV <= XINT (position) && XINT (position) < ZV))
- args_out_of_range_3 (position, make_number (BEGV), make_number (ZV));
+ args_out_of_range_3 (position, make_fixnum (BEGV), make_fixnum (ZV));
}
else
{
- CHECK_NUMBER (position);
+ CHECK_FIXNUM (position);
CHECK_STRING (string);
if (! (0 <= XINT (position) && XINT (position) < SCHARS (string)))
args_out_of_range (string, position);
code = alloca (sizeof (unsigned) * len);
for (i = 0; i < len; i++)
{
- Lisp_Object ch = Faref (string, make_number (i));
+ Lisp_Object ch = Faref (string, make_fixnum (i));
Lisp_Object val;
int c = XINT (ch);
if (font->driver->done_face)
font->driver->done_face (f, face);
face->fontp = NULL;
- return make_number (len);
+ return make_fixnum (len);
}
#endif
info = make_uninit_vector (14);
ASET (info, 0, AREF (font_object, FONT_NAME_INDEX));
ASET (info, 1, AREF (font_object, FONT_FULLNAME_INDEX));
- ASET (info, 2, make_number (font->pixel_size));
- ASET (info, 3, make_number (font->height));
- ASET (info, 4, make_number (font->baseline_offset));
- ASET (info, 5, make_number (font->relative_compose));
- ASET (info, 6, make_number (font->default_ascent));
- ASET (info, 7, make_number (font->max_width));
- ASET (info, 8, make_number (font->ascent));
- ASET (info, 9, make_number (font->descent));
- ASET (info, 10, make_number (font->space_width));
- ASET (info, 11, make_number (font->average_width));
+ ASET (info, 2, make_fixnum (font->pixel_size));
+ ASET (info, 3, make_fixnum (font->height));
+ ASET (info, 4, make_fixnum (font->baseline_offset));
+ ASET (info, 5, make_fixnum (font->relative_compose));
+ ASET (info, 6, make_fixnum (font->default_ascent));
+ ASET (info, 7, make_fixnum (font->max_width));
+ ASET (info, 8, make_fixnum (font->ascent));
+ ASET (info, 9, make_fixnum (font->descent));
+ ASET (info, 10, make_fixnum (font->space_width));
+ ASET (info, 11, make_fixnum (font->average_width));
ASET (info, 12, AREF (font_object, FONT_FILE_INDEX));
if (font->driver->otf_capability)
ASET (info, 13, Fcons (Qopentype, font->driver->otf_capability (font)));
for (i = 0; i < nelement; i++)
{
for (j = 0; entry[i].names[j]; j++);
- elt = Fmake_vector (make_number (j + 1), Qnil);
- ASET (elt, 0, make_number (entry[i].numeric));
+ elt = Fmake_vector (make_fixnum (j + 1), Qnil);
+ ASET (elt, 0, make_fixnum (entry[i].numeric));
for (j = 0; entry[i].names[j]; j++)
ASET (elt, j + 1, intern_c_string (entry[i].names[j]));
ASET (table, i, elt);
scratch_font_prefer = Ffont_spec (0, NULL);
staticpro (&Vfont_log_deferred);
- Vfont_log_deferred = Fmake_vector (make_number (3), Qnil);
+ Vfont_log_deferred = Fmake_vector (make_fixnum (3), Qnil);
#if 0
#ifdef HAVE_LIBOTF
/* Return the numeric weight value of FONT. */
#define FONT_WEIGHT_NUMERIC(font) \
- (INTEGERP (AREF ((font), FONT_WEIGHT_INDEX)) \
+ (FIXNUMP (AREF ((font), FONT_WEIGHT_INDEX)) \
? (XINT (AREF ((font), FONT_WEIGHT_INDEX)) >> 8) : -1)
/* Return the numeric slant value of FONT. */
#define FONT_SLANT_NUMERIC(font) \
- (INTEGERP (AREF ((font), FONT_SLANT_INDEX)) \
+ (FIXNUMP (AREF ((font), FONT_SLANT_INDEX)) \
? (XINT (AREF ((font), FONT_SLANT_INDEX)) >> 8) : -1)
/* Return the numeric width value of FONT. */
#define FONT_WIDTH_NUMERIC(font) \
- (INTEGERP (AREF ((font), FONT_WIDTH_INDEX)) \
+ (FIXNUMP (AREF ((font), FONT_WIDTH_INDEX)) \
? (XINT (AREF ((font), FONT_WIDTH_INDEX)) >> 8) : -1)
/* Return the symbolic weight value of FONT. */
#define FONT_WEIGHT_SYMBOLIC(font) \
style-related font property index (FONT_WEIGHT/SLANT/WIDTH_INDEX).
VAL (integer or symbol) is the numeric or symbolic style value. */
#define FONT_SET_STYLE(font, prop, val) \
- ASET ((font), prop, make_number (font_style_to_value (prop, val, true)))
+ ASET ((font), prop, make_fixnum (font_style_to_value (prop, val, true)))
#ifndef MSDOS
#define FONT_WIDTH(f) ((f)->max_width)
#define RFONT_DEF_FACE(rfont_def) AREF (rfont_def, 0)
#define RFONT_DEF_SET_FACE(rfont_def, face_id) \
- ASET ((rfont_def), 0, make_number (face_id))
+ ASET ((rfont_def), 0, make_fixnum (face_id))
#define RFONT_DEF_FONT_DEF(rfont_def) AREF (rfont_def, 1)
#define RFONT_DEF_SPEC(rfont_def) FONT_DEF_SPEC (AREF (rfont_def, 1))
#define RFONT_DEF_OBJECT(rfont_def) AREF (rfont_def, 2)
preferable. */
#define RFONT_DEF_SCORE(rfont_def) XINT (AREF (rfont_def, 3))
#define RFONT_DEF_SET_SCORE(rfont_def, score) \
- ASET ((rfont_def), 3, make_number (score))
+ ASET ((rfont_def), 3, make_fixnum (score))
#define RFONT_DEF_NEW(rfont_def, font_def) \
do { \
- (rfont_def) = Fmake_vector (make_number (4), Qnil); \
+ (rfont_def) = Fmake_vector (make_fixnum (4), Qnil); \
ASET ((rfont_def), 1, (font_def)); \
RFONT_DEF_SET_SCORE ((rfont_def), 0); \
} while (0)
(NILP (add) \
? (NILP (range) \
? (set_fontset_fallback \
- (fontset, Fmake_vector (make_number (1), (elt)))) \
+ (fontset, Fmake_vector (make_fixnum (1), (elt)))) \
: ((void) \
Fset_char_table_range (fontset, range, \
- Fmake_vector (make_number (1), elt)))) \
+ Fmake_vector (make_fixnum (1), elt)))) \
: fontset_add ((fontset), (range), (elt), (add)))
static void
Lisp_Object args[2];
int idx = (EQ (add, Qappend) ? 0 : 1);
- args[1 - idx] = Fmake_vector (make_number (1), elt);
+ args[1 - idx] = Fmake_vector (make_fixnum (1), elt);
if (CONSP (range))
{
qsort (XVECTOR (vec)->contents, size, word_size,
fontset_compare_rfontdef);
EMACS_INT low_tick_bits = charset_ordered_list_tick & MOST_POSITIVE_FIXNUM;
- XSETCAR (font_group, make_number (low_tick_bits));
+ XSETCAR (font_group, make_fixnum (low_tick_bits));
}
/* Return a font-group (actually a cons (CHARSET_ORDERED_LIST_TICK
for C, or the fontset does not have fallback fonts. */
if (NILP (font_group))
{
- font_group = make_number (0);
+ font_group = make_fixnum (0);
if (c >= 0)
/* Record that FONTSET does not specify fonts for C. As
there's a possibility that a font is found in a fallback
RFONT_DEF_SET_SCORE (rfont_def, i);
ASET (font_group, i, rfont_def);
}
- font_group = Fcons (make_number (-1), font_group);
+ font_group = Fcons (make_fixnum (-1), font_group);
if (c >= 0)
char_table_set_range (fontset, from, to, font_group);
else
/* This is a sign of not to try the other fonts. */
return Qt;
}
- if (INTEGERP (RFONT_DEF_FACE (rfont_def))
+ if (FIXNUMP (RFONT_DEF_FACE (rfont_def))
&& XINT (RFONT_DEF_FACE (rfont_def)) < 0)
/* We couldn't open this font last time. */
continue;
RFONT_DEF_NEW (rfont_def, font_def);
RFONT_DEF_SET_OBJECT (rfont_def, font_object);
RFONT_DEF_SET_SCORE (rfont_def, RFONT_DEF_SCORE (rfont_def));
- new_vec = Fmake_vector (make_number (ASIZE (vec) + 1), Qnil);
+ new_vec = Fmake_vector (make_fixnum (ASIZE (vec) + 1), Qnil);
found_index++;
for (j = 0; j < found_index; j++)
ASET (new_vec, j, AREF (vec, j));
}
/* Record that no font in this font group supports C. */
- FONTSET_SET (fontset, make_number (c), make_number (0));
+ FONTSET_SET (fontset, make_fixnum (c), make_fixnum (0));
return Qnil;
found:
Lisp_Object base_fontset;
/* Try a font-group of FONTSET. */
- FONT_DEFERRED_LOG ("current fontset: font for", make_number (c), Qnil);
+ FONT_DEFERRED_LOG ("current fontset: font for", make_fixnum (c), Qnil);
rfont_def = fontset_find_font (fontset, c, face, id, 0);
if (VECTORP (rfont_def))
return rfont_def;
if (NILP (rfont_def))
- FONTSET_SET (fontset, make_number (c), make_number (0));
+ FONTSET_SET (fontset, make_fixnum (c), make_fixnum (0));
/* Try a font-group of the default fontset. */
base_fontset = FONTSET_BASE (fontset);
set_fontset_default
(fontset,
make_fontset (FONTSET_FRAME (fontset), Qnil, Vdefault_fontset));
- FONT_DEFERRED_LOG ("default fontset: font for", make_number (c), Qnil);
+ FONT_DEFERRED_LOG ("default fontset: font for", make_fixnum (c), Qnil);
default_rfont_def
= fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 0);
if (VECTORP (default_rfont_def))
return default_rfont_def;
if (NILP (default_rfont_def))
- FONTSET_SET (FONTSET_DEFAULT (fontset), make_number (c),
- make_number (0));
+ FONTSET_SET (FONTSET_DEFAULT (fontset), make_fixnum (c),
+ make_fixnum (0));
}
/* Try a fallback font-group of FONTSET. */
if (! EQ (rfont_def, Qt))
{
- FONT_DEFERRED_LOG ("current fallback: font for", make_number (c), Qnil);
+ FONT_DEFERRED_LOG ("current fallback: font for", make_fixnum (c), Qnil);
rfont_def = fontset_find_font (fontset, c, face, id, 1);
if (VECTORP (rfont_def))
return rfont_def;
/* Remember that FONTSET has no font for C. */
- FONTSET_SET (fontset, make_number (c), Qt);
+ FONTSET_SET (fontset, make_fixnum (c), Qt);
}
/* Try a fallback font-group of the default fontset. */
if (! EQ (base_fontset, Vdefault_fontset)
&& ! EQ (default_rfont_def, Qt))
{
- FONT_DEFERRED_LOG ("default fallback: font for", make_number (c), Qnil);
+ FONT_DEFERRED_LOG ("default fallback: font for", make_fixnum (c), Qnil);
rfont_def = fontset_find_font (FONTSET_DEFAULT (fontset), c, face, id, 1);
if (VECTORP (rfont_def))
return rfont_def;
/* Remember that the default fontset has no font for C. */
- FONTSET_SET (FONTSET_DEFAULT (fontset), make_number (c), Qt);
+ FONTSET_SET (FONTSET_DEFAULT (fontset), make_fixnum (c), Qt);
}
return Qnil;
fontset = Fmake_char_table (Qfontset, Qnil);
- set_fontset_id (fontset, make_number (id));
+ set_fontset_id (fontset, make_fixnum (id));
if (NILP (base))
set_fontset_name (fontset, name);
else
}
else
{
- charset = Fget_char_property (make_number (pos), Qcharset, object);
+ charset = Fget_char_property (make_fixnum (pos), Qcharset, object);
if (CHARSETP (charset))
{
Lisp_Object val;
rfont_def = fontset_font (fontset, c, face, id);
if (VECTORP (rfont_def))
{
- if (INTEGERP (RFONT_DEF_FACE (rfont_def)))
+ if (FIXNUMP (RFONT_DEF_FACE (rfont_def)))
face_id = XINT (RFONT_DEF_FACE (rfont_def));
else
{
}
else
{
- if (INTEGERP (FONTSET_NOFONT_FACE (fontset)))
+ if (FIXNUMP (FONTSET_NOFONT_FACE (fontset)))
face_id = XINT (FONTSET_NOFONT_FACE (fontset));
else
{
face_id = face_for_font (f, Qnil, face);
- set_fontset_nofont_face (fontset, make_number (face_id));
+ set_fontset_nofont_face (fontset, make_fixnum (face_id));
}
}
eassert (face_id >= 0);
}
else
{
- charset = Fget_char_property (make_number (pos), Qcharset, object);
+ charset = Fget_char_property (make_fixnum (pos), Qcharset, object);
if (CHARSETP (charset))
{
Lisp_Object val;
if (to < 0x80)
return;
from = 0x80;
- range = Fcons (make_number (0x80), XCDR (range));
+ range = Fcons (make_fixnum (0x80), XCDR (range));
}
#define SCRIPT_FROM XINT (XCAR (XCAR (script_range_list)))
if (CONSP (script_range_list))
{
if (SCRIPT_FROM < from)
- range = Fcons (make_number (SCRIPT_FROM), XCDR (range));
+ range = Fcons (make_fixnum (SCRIPT_FROM), XCDR (range));
while (CONSP (script_range_list) && SCRIPT_TO <= to)
POP_SCRIPT_RANGE ();
if (CONSP (script_range_list) && SCRIPT_FROM <= to)
- XSETCAR (XCAR (script_range_list), make_number (to + 1));
+ XSETCAR (XCAR (script_range_list), make_fixnum (to + 1));
}
FONTSET_ADD (fontset, range, font_def, add);
if (NILP (val))
return Qnil;
repertory = AREF (val, 1);
- if (INTEGERP (repertory))
+ if (FIXNUMP (repertory))
{
struct charset *charset = CHARSET_FROM_ID (XINT (repertory));
{
Lisp_Object vec;
- vec = Fmake_vector (make_number (3), Qnil);
+ vec = Fmake_vector (make_fixnum (3), Qnil);
ASET (vec, 0, FONTSET_ID (fontset));
if (BASE_FONTSET_P (fontset))
syms_of_fontset (void)
{
DEFSYM (Qfontset, "fontset");
- Fput (Qfontset, Qchar_table_extra_slots, make_number (8));
+ Fput (Qfontset, Qchar_table_extra_slots, make_fixnum (8));
DEFSYM (Qfontset_info, "fontset-info");
- Fput (Qfontset_info, Qchar_table_extra_slots, make_number (1));
+ Fput (Qfontset_info, Qchar_table_extra_slots, make_fixnum (1));
DEFSYM (Qappend, "append");
DEFSYM (Qlatin, "latin");
Vcached_fontset_data = Qnil;
staticpro (&Vcached_fontset_data);
- Vfontset_table = Fmake_vector (make_number (32), Qnil);
+ Vfontset_table = Fmake_vector (make_fixnum (32), Qnil);
staticpro (&Vfontset_table);
Vdefault_fontset = Fmake_char_table (Qfontset, Qnil);
staticpro (&Vdefault_fontset);
- set_fontset_id (Vdefault_fontset, make_number (0));
+ set_fontset_id (Vdefault_fontset, make_fixnum (0));
set_fontset_name
(Vdefault_fontset,
build_pure_c_string ("-*-*-*-*-*-*-*-*-*-*-*-*-fontset-default"));
XSETFRAME (frame, f);
if (CONSP (frame_size_history)
- && INTEGERP (XCAR (frame_size_history))
+ && FIXNUMP (XCAR (frame_size_history))
&& 0 < XINT (XCAR (frame_size_history)))
frame_size_history =
- Fcons (make_number (XINT (XCAR (frame_size_history)) - 1),
+ Fcons (make_fixnum (XINT (XCAR (frame_size_history)) - 1),
Fcons (list4
(frame, fun_symbol,
((width > 0)
- ? list4 (make_number (FRAME_TEXT_WIDTH (f)),
- make_number (FRAME_TEXT_HEIGHT (f)),
- make_number (width),
- make_number (height))
+ ? list4 (make_fixnum (FRAME_TEXT_WIDTH (f)),
+ make_fixnum (FRAME_TEXT_HEIGHT (f)),
+ make_fixnum (width),
+ make_fixnum (height))
: Qnil),
rest),
XCDR (frame_size_history)));
if (FRAME_MINIBUF_ONLY_P (f))
return;
- if (TYPE_RANGED_INTEGERP (int, value))
+ if (TYPE_RANGED_FIXNUMP (int, value))
nlines = XINT (value);
else
nlines = 0;
(Lisp_Object frame, Lisp_Object horizontal,
Lisp_Object ignore, Lisp_Object pixelwise)
{
- return make_number (0);
+ return make_fixnum (0);
}
/**
int retval;
if ((!NILP (horizontal)
- && NUMBERP (par_size = get_frame_param (f, Qmin_width)))
+ && FIXED_OR_FLOATP (par_size = get_frame_param (f, Qmin_width)))
|| (NILP (horizontal)
- && NUMBERP (par_size = get_frame_param (f, Qmin_height))))
+ && FIXED_OR_FLOATP (par_size = get_frame_param (f, Qmin_height))))
{
int min_size = XINT (par_size);
frame_size_history_add
(f, Qadjust_frame_size_1, new_text_width, new_text_height,
- list2 (parameter, make_number (inhibit)));
+ list2 (parameter, make_fixnum (inhibit)));
/* The following two values are calculated from the old window body
sizes and any "new" settings for scroll bars, dividers, fringes and
frame_size_history_add
(f, Qadjust_frame_size_3, new_text_width, new_text_height,
- list4 (make_number (old_pixel_width), make_number (old_pixel_height),
- make_number (new_pixel_width), make_number (new_pixel_height)));
+ list4 (make_fixnum (old_pixel_width), make_fixnum (old_pixel_height),
+ make_fixnum (new_pixel_width), make_fixnum (new_pixel_height)));
/* Assign new sizes. */
FRAME_TEXT_WIDTH (f) = new_text_width;
#endif
/* The default value of menu-bar-mode is t. */
- set_menu_bar_lines (f, make_number (1), Qnil);
+ set_menu_bar_lines (f, make_fixnum (1), Qnil);
/* Allocate glyph matrices. */
adjust_frame_glyphs (f);
FRAME_FOCUS_FRAME (c)))
return candidate;
}
- else if (INTEGERP (minibuf) && XINT (minibuf) == 0)
+ else if (FIXNUMP (minibuf) && XINT (minibuf) == 0)
{
if (FRAME_VISIBLE_P (c) || FRAME_ICONIFIED_P (c))
return candidate;
if (WINDOWP (minibuf_window) && EQ (f->minibuffer_window, minibuf_window))
{
- Lisp_Object frames, this, window = make_number (0);
+ Lisp_Object frames, this, window = make_fixnum (0);
if (!EQ (frame, selected_frame)
&& FRAME_HAS_MINIBUF_P (XFRAME (selected_frame)))
if (! FRAME_WINDOW_P (f))
{
if (EQ (prop, Qmenu_bar_lines))
- set_menu_bar_lines (f, val, make_number (FRAME_MENU_BAR_LINES (f)));
+ set_menu_bar_lines (f, val, make_fixnum (FRAME_MENU_BAR_LINES (f)));
else if (EQ (prop, Qname))
set_term_frame_name (f, val);
}
? (f->new_height / FRAME_LINE_HEIGHT (f))
: f->new_height)
: FRAME_LINES (f));
- store_in_alist (&alist, Qheight, make_number (height));
+ store_in_alist (&alist, Qheight, make_fixnum (height));
width = (f->new_width
? (f->new_pixelwise
? (f->new_width / FRAME_COLUMN_WIDTH (f))
: f->new_width)
: FRAME_COLS (f));
- store_in_alist (&alist, Qwidth, make_number (width));
+ store_in_alist (&alist, Qwidth, make_fixnum (width));
store_in_alist (&alist, Qmodeline, (FRAME_WANTS_MODELINE_P (f) ? Qt : Qnil));
store_in_alist (&alist, Qunsplittable, (FRAME_NO_SPLIT_P (f) ? Qt : Qnil));
store_in_alist (&alist, Qbuffer_list, f->buffer_list);
else if (EQ (parameter, Qline_spacing) && f->extra_line_spacing == 0)
/* If this is non-zero, we can't determine whether the user specified
an integer or float value without looking through 'param_alist'. */
- value = make_number (0);
+ value = make_fixnum (0);
else if (EQ (parameter, Qfont) && FRAME_X_P (f))
value = FRAME_FONT (f)->props[FONT_NAME_INDEX];
#endif /* HAVE_WINDOW_SYSTEM */
struct frame *f = decode_any_frame (frame);
if (FRAME_WINDOW_P (f))
- return make_number (FRAME_LINE_HEIGHT (f));
+ return make_fixnum (FRAME_LINE_HEIGHT (f));
else
#endif
- return make_number (1);
+ return make_fixnum (1);
}
struct frame *f = decode_any_frame (frame);
if (FRAME_WINDOW_P (f))
- return make_number (FRAME_COLUMN_WIDTH (f));
+ return make_fixnum (FRAME_COLUMN_WIDTH (f));
else
#endif
- return make_number (1);
+ return make_fixnum (1);
}
DEFUN ("frame-native-width", Fframe_native_width,
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
- return make_number (FRAME_PIXEL_WIDTH (f));
+ return make_fixnum (FRAME_PIXEL_WIDTH (f));
else
#endif
- return make_number (FRAME_TOTAL_COLS (f));
+ return make_fixnum (FRAME_TOTAL_COLS (f));
}
DEFUN ("frame-native-height", Fframe_native_height,
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f))
- return make_number (FRAME_PIXEL_HEIGHT (f));
+ return make_fixnum (FRAME_PIXEL_HEIGHT (f));
else
#endif
- return make_number (FRAME_TOTAL_LINES (f));
+ return make_fixnum (FRAME_TOTAL_LINES (f));
}
DEFUN ("tool-bar-pixel-width", Ftool_bar_pixel_width,
struct frame *f = decode_any_frame (frame);
if (FRAME_WINDOW_P (f))
- return make_number (FRAME_TOOLBAR_WIDTH (f));
+ return make_fixnum (FRAME_TOOLBAR_WIDTH (f));
#endif
- return make_number (0);
+ return make_fixnum (0);
}
DEFUN ("frame-text-cols", Fframe_text_cols, Sframe_text_cols, 0, 1, 0,
doc: /* Return width in columns of FRAME's text area. */)
(Lisp_Object frame)
{
- return make_number (FRAME_COLS (decode_any_frame (frame)));
+ return make_fixnum (FRAME_COLS (decode_any_frame (frame)));
}
DEFUN ("frame-text-lines", Fframe_text_lines, Sframe_text_lines, 0, 1, 0,
doc: /* Return height in lines of FRAME's text area. */)
(Lisp_Object frame)
{
- return make_number (FRAME_LINES (decode_any_frame (frame)));
+ return make_fixnum (FRAME_LINES (decode_any_frame (frame)));
}
DEFUN ("frame-total-cols", Fframe_total_cols, Sframe_total_cols, 0, 1, 0,
doc: /* Return number of total columns of FRAME. */)
(Lisp_Object frame)
{
- return make_number (FRAME_TOTAL_COLS (decode_any_frame (frame)));
+ return make_fixnum (FRAME_TOTAL_COLS (decode_any_frame (frame)));
}
DEFUN ("frame-total-lines", Fframe_total_lines, Sframe_total_lines, 0, 1, 0,
doc: /* Return number of total lines of FRAME. */)
(Lisp_Object frame)
{
- return make_number (FRAME_TOTAL_LINES (decode_any_frame (frame)));
+ return make_fixnum (FRAME_TOTAL_LINES (decode_any_frame (frame)));
}
DEFUN ("frame-text-width", Fframe_text_width, Sframe_text_width, 0, 1, 0,
doc: /* Return text area width of FRAME in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_TEXT_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_TEXT_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-text-height", Fframe_text_height, Sframe_text_height, 0, 1, 0,
doc: /* Return text area height of FRAME in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_TEXT_HEIGHT (decode_any_frame (frame)));
+ return make_fixnum (FRAME_TEXT_HEIGHT (decode_any_frame (frame)));
}
DEFUN ("frame-scroll-bar-width", Fscroll_bar_width, Sscroll_bar_width, 0, 1, 0,
doc: /* Return scroll bar width of FRAME in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_SCROLL_BAR_AREA_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_SCROLL_BAR_AREA_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-scroll-bar-height", Fscroll_bar_height, Sscroll_bar_height, 0, 1, 0,
doc: /* Return scroll bar height of FRAME in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_SCROLL_BAR_AREA_HEIGHT (decode_any_frame (frame)));
+ return make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (decode_any_frame (frame)));
}
DEFUN ("frame-fringe-width", Ffringe_width, Sfringe_width, 0, 1, 0,
doc: /* Return fringe width of FRAME in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_TOTAL_FRINGE_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_TOTAL_FRINGE_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-internal-border-width", Fframe_internal_border_width, Sframe_internal_border_width, 0, 1, 0,
doc: /* Return width of FRAME's internal border in pixels. */)
(Lisp_Object frame)
{
- return make_number (FRAME_INTERNAL_BORDER_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-right-divider-width", Fright_divider_width, Sright_divider_width, 0, 1, 0,
doc: /* Return width (in pixels) of vertical window dividers on FRAME. */)
(Lisp_Object frame)
{
- return make_number (FRAME_RIGHT_DIVIDER_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_RIGHT_DIVIDER_WIDTH (decode_any_frame (frame)));
}
DEFUN ("frame-bottom-divider-width", Fbottom_divider_width, Sbottom_divider_width, 0, 1, 0,
doc: /* Return width (in pixels) of horizontal window dividers on FRAME. */)
(Lisp_Object frame)
{
- return make_number (FRAME_BOTTOM_DIVIDER_WIDTH (decode_any_frame (frame)));
+ return make_fixnum (FRAME_BOTTOM_DIVIDER_WIDTH (decode_any_frame (frame)));
}
DEFUN ("set-frame-height", Fset_frame_height, Sset_frame_height, 2, 4, 0,
{
register struct frame *f = decode_live_frame (frame);
- return Fcons (make_number (f->left_pos), make_number (f->top_pos));
+ return Fcons (make_fixnum (f->left_pos), make_fixnum (f->top_pos));
}
DEFUN ("set-frame-position", Fset_frame_position,
}
/* Workarea available. */
- parent_left = XINT (Fnth (make_number (0), workarea));
- parent_top = XINT (Fnth (make_number (1), workarea));
- parent_width = XINT (Fnth (make_number (2), workarea));
- parent_height = XINT (Fnth (make_number (3), workarea));
+ 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_done = 1;
}
}
if (!NILP (outer_edges))
{
outer_minus_text_width
- = (XINT (Fnth (make_number (2), outer_edges))
- - XINT (Fnth (make_number (0), outer_edges))
+ = (XINT (Fnth (make_fixnum (2), outer_edges))
+ - XINT (Fnth (make_fixnum (0), outer_edges))
- FRAME_TEXT_WIDTH (f));
outer_minus_text_height
- = (XINT (Fnth (make_number (3), outer_edges))
- - XINT (Fnth (make_number (1), outer_edges))
+ = (XINT (Fnth (make_fixnum (3), outer_edges))
+ - XINT (Fnth (make_fixnum (1), outer_edges))
- FRAME_TEXT_HEIGHT (f));
}
else
if (EQ (prop, Qwidth))
{
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
width = XFASTINT (val) * FRAME_COLUMN_WIDTH (f) ;
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
- && RANGED_INTEGERP (0, XCDR (val), INT_MAX))
+ && RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
width = XFASTINT (XCDR (val));
else if (FLOATP (val))
width = frame_float (f, val, FRAME_FLOAT_WIDTH, &parent_done,
}
else if (EQ (prop, Qheight))
{
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
height = XFASTINT (val) * FRAME_LINE_HEIGHT (f);
else if (CONSP (val) && EQ (XCAR (val), Qtext_pixels)
- && RANGED_INTEGERP (0, XCDR (val), INT_MAX))
+ && RANGED_FIXNUMP (0, XCDR (val), INT_MAX))
height = XFASTINT (XCDR (val));
else if (FLOATP (val))
height = frame_float (f, val, FRAME_FLOAT_HEIGHT, &parent_done,
store_frame_param (f, prop, val);
param_index = Fget (prop, Qx_frame_parameter);
- if (NATNUMP (param_index)
+ 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);
{
left_no_change = 1;
if (f->left_pos < 0)
- left = list2 (Qplus, make_number (f->left_pos));
+ left = list2 (Qplus, make_fixnum (f->left_pos));
else
XSETINT (left, f->left_pos);
}
{
top_no_change = 1;
if (f->top_pos < 0)
- top = list2 (Qplus, make_number (f->top_pos));
+ top = list2 (Qplus, make_fixnum (f->top_pos));
else
XSETINT (top, f->top_pos);
}
/* If one of the icon positions was not set, preserve or default it. */
- if (! TYPE_RANGED_INTEGERP (int, icon_left))
+ if (! TYPE_RANGED_FIXNUMP (int, icon_left))
{
#ifdef HAVE_X_WINDOWS
icon_left_no_change = 1;
if (NILP (icon_left))
XSETINT (icon_left, 0);
}
- if (! TYPE_RANGED_INTEGERP (int, icon_top))
+ if (! TYPE_RANGED_FIXNUMP (int, icon_top))
{
#ifdef HAVE_X_WINDOWS
icon_top_no_change = 1;
if ((!NILP (left) || !NILP (top))
&& ! (left_no_change && top_no_change)
- && ! (NUMBERP (left) && XINT (left) == f->left_pos
- && NUMBERP (top) && XINT (top) == f->top_pos))
+ && ! (FIXED_OR_FLOATP (left) && XINT (left) == f->left_pos
+ && FIXED_OR_FLOATP (top) && XINT (top) == f->top_pos))
{
int leftpos = 0;
int toppos = 0;
f->size_hint_flags &= ~ (XNegative | YNegative);
if (EQ (left, Qminus))
f->size_hint_flags |= XNegative;
- else if (TYPE_RANGED_INTEGERP (int, left))
+ else if (TYPE_RANGED_FIXNUMP (int, left))
{
leftpos = XINT (left);
if (leftpos < 0)
}
else if (CONSP (left) && EQ (XCAR (left), Qminus)
&& CONSP (XCDR (left))
- && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
+ && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
{
leftpos = - XINT (XCAR (XCDR (left)));
f->size_hint_flags |= XNegative;
}
else if (CONSP (left) && EQ (XCAR (left), Qplus)
&& CONSP (XCDR (left))
- && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (left))))
+ && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
leftpos = XINT (XCAR (XCDR (left)));
else if (FLOATP (left))
leftpos = frame_float (f, left, FRAME_FLOAT_LEFT, &parent_done,
if (EQ (top, Qminus))
f->size_hint_flags |= YNegative;
- else if (TYPE_RANGED_INTEGERP (int, top))
+ else if (TYPE_RANGED_FIXNUMP (int, top))
{
toppos = XINT (top);
if (toppos < 0)
}
else if (CONSP (top) && EQ (XCAR (top), Qminus)
&& CONSP (XCDR (top))
- && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
+ && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
{
toppos = - XINT (XCAR (XCDR (top)));
f->size_hint_flags |= YNegative;
}
else if (CONSP (top) && EQ (XCAR (top), Qplus)
&& CONSP (XCDR (top))
- && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (top))))
+ && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
toppos = XINT (XCAR (XCDR (top)));
else if (FLOATP (top))
toppos = frame_float (f, top, FRAME_FLOAT_TOP, &parent_done,
store_in_alist (alistptr, Qtop, list2 (Qplus, tem));
store_in_alist (alistptr, Qborder_width,
- make_number (f->border_width));
+ make_fixnum (f->border_width));
store_in_alist (alistptr, Qinternal_border_width,
- make_number (FRAME_INTERNAL_BORDER_WIDTH (f)));
+ make_fixnum (FRAME_INTERNAL_BORDER_WIDTH (f)));
store_in_alist (alistptr, Qright_divider_width,
- make_number (FRAME_RIGHT_DIVIDER_WIDTH (f)));
+ make_fixnum (FRAME_RIGHT_DIVIDER_WIDTH (f)));
store_in_alist (alistptr, Qbottom_divider_width,
- make_number (FRAME_BOTTOM_DIVIDER_WIDTH (f)));
+ make_fixnum (FRAME_BOTTOM_DIVIDER_WIDTH (f)));
store_in_alist (alistptr, Qleft_fringe,
- make_number (FRAME_LEFT_FRINGE_WIDTH (f)));
+ make_fixnum (FRAME_LEFT_FRINGE_WIDTH (f)));
store_in_alist (alistptr, Qright_fringe,
- make_number (FRAME_RIGHT_FRINGE_WIDTH (f)));
+ make_fixnum (FRAME_RIGHT_FRINGE_WIDTH (f)));
store_in_alist (alistptr, Qscroll_bar_width,
(! FRAME_HAS_VERTICAL_SCROLL_BARS (f)
- ? make_number (0)
+ ? make_fixnum (0)
: FRAME_CONFIG_SCROLL_BAR_WIDTH (f) > 0
- ? make_number (FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
+ ? make_fixnum (FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
/* nil means "use default width"
for non-toolkit scroll bar.
ruler-mode.el depends on this. */
: Qnil));
store_in_alist (alistptr, Qscroll_bar_height,
(! FRAME_HAS_HORIZONTAL_SCROLL_BARS (f)
- ? make_number (0)
+ ? make_fixnum (0)
: FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) > 0
- ? make_number (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
+ ? make_fixnum (FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
/* nil means "use default height"
for non-toolkit scroll bar. */
: Qnil));
if (FRAME_X_OUTPUT (f)->parent_desc == FRAME_DISPLAY_INFO (f)->root_window)
tem = Qnil;
else
- tem = make_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc);
+ tem = make_fixed_natnum ((uintptr_t) FRAME_X_OUTPUT (f)->parent_desc);
store_in_alist (alistptr, Qexplicit_name, (f->explicit_name ? Qt : Qnil));
store_in_alist (alistptr, Qparent_id, tem);
store_in_alist (alistptr, Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f));
{
if (NILP (new_value))
f->extra_line_spacing = 0;
- else if (RANGED_INTEGERP (0, new_value, INT_MAX))
+ else if (RANGED_FIXNUMP (0, new_value, INT_MAX))
f->extra_line_spacing = XFASTINT (new_value);
else if (FLOATP (new_value))
{
if (NILP (new_value))
f->gamma = 0;
- else if (NUMBERP (new_value) && XFLOATINT (new_value) > 0)
+ else if (FIXED_OR_FLOATP (new_value) && XFLOATINT (new_value) > 0)
/* The value 0.4545 is the normal viewing gamma. */
f->gamma = 1.0 / (0.4545 * XFLOATINT (new_value));
else
if (CONSP (bgcolor) && (bgcolor = XCDR (bgcolor), STRINGP (bgcolor)))
{
Lisp_Object parm_index = Fget (Qbackground_color, Qx_frame_parameter);
- if (NATNUMP (parm_index)
+ 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)])
int old_width = FRAME_LEFT_FRINGE_WIDTH (f);
int new_width;
- new_width = (RANGED_INTEGERP (-INT_MAX, new_value, INT_MAX)
+ new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
? eabs (XINT (new_value)) : 8);
if (new_width != old_width)
int old_width = FRAME_RIGHT_FRINGE_WIDTH (f);
int new_width;
- new_width = (RANGED_INTEGERP (-INT_MAX, new_value, INT_MAX)
+ new_width = (RANGED_FIXNUMP (-INT_MAX, new_value, INT_MAX)
? eabs (XINT (new_value)) : 8);
if (new_width != old_width)
SET_FRAME_GARBAGED (f);
}
- else if (RANGED_INTEGERP (1, arg, INT_MAX)
+ else if (RANGED_FIXNUMP (1, arg, INT_MAX)
&& XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_WIDTH (f))
{
FRAME_CONFIG_SCROLL_BAR_WIDTH (f) = XFASTINT (arg);
SET_FRAME_GARBAGED (f);
}
- else if (RANGED_INTEGERP (1, arg, INT_MAX)
+ else if (RANGED_FIXNUMP (1, arg, INT_MAX)
&& XFASTINT (arg) != FRAME_CONFIG_SCROLL_BAR_HEIGHT (f))
{
FRAME_CONFIG_SCROLL_BAR_HEIGHT (f) = XFASTINT (arg);
if (! (0 <= alpha && alpha <= 1.0))
args_out_of_range (make_float (0.0), make_float (1.0));
}
- else if (INTEGERP (item))
+ else if (FIXNUMP (item))
{
EMACS_INT ialpha = XINT (item);
if (! (0 <= ialpha && ialpha <= 100))
- args_out_of_range (make_number (0), make_number (100));
+ args_out_of_range (make_fixnum (0), make_fixnum (100));
alpha = ialpha / 100.0;
}
else
switch (type)
{
case RES_TYPE_NUMBER:
- return make_number (atoi (SSDATA (tem)));
+ return make_fixnum (atoi (SSDATA (tem)));
case RES_TYPE_BOOLEAN_NUMBER:
if (!strcmp (SSDATA (tem), "on")
|| !strcmp (SSDATA (tem), "true"))
- return make_number (1);
- return make_number (atoi (SSDATA (tem)));
+ return make_fixnum (1);
+ return make_fixnum (atoi (SSDATA (tem)));
break;
case RES_TYPE_FLOAT:
Lisp_Object element;
if (x >= 0 && (geometry & XNegative))
- element = list3 (Qleft, Qminus, make_number (-x));
+ element = list3 (Qleft, Qminus, make_fixnum (-x));
else if (x < 0 && ! (geometry & XNegative))
- element = list3 (Qleft, Qplus, make_number (x));
+ element = list3 (Qleft, Qplus, make_fixnum (x));
else
- element = Fcons (Qleft, make_number (x));
+ element = Fcons (Qleft, make_fixnum (x));
result = Fcons (element, result);
}
Lisp_Object element;
if (y >= 0 && (geometry & YNegative))
- element = list3 (Qtop, Qminus, make_number (-y));
+ element = list3 (Qtop, Qminus, make_fixnum (-y));
else if (y < 0 && ! (geometry & YNegative))
- element = list3 (Qtop, Qplus, make_number (y));
+ element = list3 (Qtop, Qplus, make_fixnum (y));
else
- element = Fcons (Qtop, make_number (y));
+ element = Fcons (Qtop, make_fixnum (y));
result = Fcons (element, result);
}
if (geometry & WidthValue)
- result = Fcons (Fcons (Qwidth, make_number (width)), result);
+ result = Fcons (Fcons (Qwidth, make_fixnum (width)), result);
if (geometry & HeightValue)
- result = Fcons (Fcons (Qheight, make_number (height)), result);
+ result = Fcons (Fcons (Qheight, make_fixnum (height)), result);
return result;
}
? tool_bar_button_relief
: DEFAULT_TOOL_BAR_BUTTON_RELIEF);
- if (RANGED_INTEGERP (1, Vtool_bar_button_margin, INT_MAX))
+ if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
margin = XFASTINT (Vtool_bar_button_margin);
else if (CONSP (Vtool_bar_button_margin)
- && RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
+ && RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
margin = XFASTINT (XCDR (Vtool_bar_button_margin));
else
margin = 0;
{
if (CONSP (width) && EQ (XCAR (width), Qtext_pixels))
{
- CHECK_NUMBER (XCDR (width));
+ CHECK_FIXNUM (XCDR (width));
if ((XINT (XCDR (width)) < 0 || XINT (XCDR (width)) > INT_MAX))
xsignal1 (Qargs_out_of_range, XCDR (width));
}
else
{
- CHECK_NUMBER (width);
+ CHECK_FIXNUM (width);
if ((XINT (width) < 0 || XINT (width) > INT_MAX))
xsignal1 (Qargs_out_of_range, width);
{
if (CONSP (height) && EQ (XCAR (height), Qtext_pixels))
{
- CHECK_NUMBER (XCDR (height));
+ CHECK_FIXNUM (XCDR (height));
if ((XINT (XCDR (height)) < 0 || XINT (XCDR (height)) > INT_MAX))
xsignal1 (Qargs_out_of_range, XCDR (height));
}
else
{
- CHECK_NUMBER (height);
+ CHECK_FIXNUM (height);
if ((XINT (height) < 0) || (XINT (height) > INT_MAX))
xsignal1 (Qargs_out_of_range, height);
}
else if (CONSP (top) && EQ (XCAR (top), Qminus)
&& CONSP (XCDR (top))
- && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
+ && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (top)), INT_MAX))
{
f->top_pos = - XINT (XCAR (XCDR (top)));
window_prompting |= YNegative;
}
else if (CONSP (top) && EQ (XCAR (top), Qplus)
&& CONSP (XCDR (top))
- && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (top))))
+ && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (top))))
{
f->top_pos = XINT (XCAR (XCDR (top)));
}
}
else if (CONSP (left) && EQ (XCAR (left), Qminus)
&& CONSP (XCDR (left))
- && RANGED_INTEGERP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
+ && RANGED_FIXNUMP (-INT_MAX, XCAR (XCDR (left)), INT_MAX))
{
f->left_pos = - XINT (XCAR (XCDR (left)));
window_prompting |= XNegative;
}
else if (CONSP (left) && EQ (XCAR (left), Qplus)
&& CONSP (XCDR (left))
- && TYPE_RANGED_INTEGERP (int, XCAR (XCDR (left))))
+ && TYPE_RANGED_FIXNUMP (int, XCAR (XCDR (left))))
{
f->left_pos = XINT (XCAR (XCDR (left)));
}
Lisp_Object v = (frame_parms[i].sym < 0
? intern_c_string (frame_parms[i].name)
: builtin_lisp_symbol (frame_parms[i].sym));
- Fput (v, Qx_frame_parameter, make_number (i));
+ Fput (v, Qx_frame_parameter, make_fixnum (i));
}
}
doc: /* The lower limit of the frame opacity (alpha transparency).
The value should range from 0 (invisible) to 100 (completely opaque).
You can also use a floating number between 0.0 and 1.0. */);
- Vframe_alpha_lower_limit = make_number (20);
+ Vframe_alpha_lower_limit = make_fixnum (20);
#endif
DEFVAR_LISP ("default-frame-alist", Vdefault_frame_alist,
INLINE double
NUMVAL (Lisp_Object x)
{
- return NUMBERP (x) ? XFLOATINT (x) : -1;
+ return FIXED_OR_FLOATP (x) ? XFLOATINT (x) : -1;
}
INLINE double
canonical char width is to be used. X must be a Lisp integer or
float. Value is a C integer. */
#define FRAME_PIXEL_X_FROM_CANON_X(F, X) \
- (INTEGERP (X) \
+ (FIXNUMP (X) \
? XINT (X) * FRAME_COLUMN_WIDTH (F) \
: (int) (XFLOAT_DATA (X) * FRAME_COLUMN_WIDTH (F)))
canonical character height is to be used. X must be a Lisp integer
or float. Value is a C integer. */
#define FRAME_PIXEL_Y_FROM_CANON_Y(F, Y) \
- (INTEGERP (Y) \
+ (FIXNUMP (Y) \
? XINT (Y) * FRAME_LINE_HEIGHT (F) \
: (int) (XFLOAT_DATA (Y) * FRAME_LINE_HEIGHT (F)))
#define FRAME_CANON_X_FROM_PIXEL_X(F, X) \
((X) % FRAME_COLUMN_WIDTH (F) != 0 \
? make_float ((double) (X) / FRAME_COLUMN_WIDTH (F)) \
- : make_number ((X) / FRAME_COLUMN_WIDTH (F)))
+ : make_fixnum ((X) / FRAME_COLUMN_WIDTH (F)))
/* Convert pixel-value Y to canonical units. F is the frame whose
canonical character height is to be used. Y is a C integer.
#define FRAME_CANON_Y_FROM_PIXEL_Y(F, Y) \
((Y) % FRAME_LINE_HEIGHT (F) \
? make_float ((double) (Y) / FRAME_LINE_HEIGHT (F)) \
- : make_number ((Y) / FRAME_LINE_HEIGHT (F)))
+ : make_fixnum ((Y) / FRAME_LINE_HEIGHT (F)))
\f
EMACS_INT bn;
bitmap = Fget (bitmap, Qfringe);
- if (!INTEGERP (bitmap))
+ if (!FIXNUMP (bitmap))
return 0;
bn = XINT (bitmap);
return Qnil;
bitmaps = Vfringe_bitmaps;
- num = make_number (bn);
+ num = make_fixnum (bn);
while (CONSP (bitmaps))
{
{
if (ln1 > ix2)
{
- bm = Fnth (make_number (ix2), bm1);
+ bm = Fnth (make_fixnum (ix2), bm1);
if (!EQ (bm, Qt))
goto found;
}
{
if (ln1 > ix1)
{
- bm = Fnth (make_number (ix1), bm1);
+ bm = Fnth (make_fixnum (ix1), bm1);
if (!EQ (bm, Qt))
goto found;
}
{
if (ln2 > ix2)
{
- bm = Fnth (make_number (ix2), bm2);
+ bm = Fnth (make_fixnum (ix2), bm2);
if (!EQ (bm, Qt))
goto found;
}
if (ln1 > ix1)
{
- bm = Fnth (make_number (ix1), bm1);
+ bm = Fnth (make_fixnum (ix1), bm1);
if (!EQ (bm, Qt))
goto found;
}
if (ln2 > ix1)
{
- bm = Fnth (make_number (ix1), bm2);
+ bm = Fnth (make_fixnum (ix1), bm2);
if (!EQ (bm, Qt))
goto found;
return NO_FRINGE_BITMAP;
fb.height = h;
else
{
- CHECK_NUMBER (height);
+ CHECK_FIXNUM (height);
fb.height = max (0, min (XINT (height), 255));
if (fb.height > h)
{
fb.width = 8;
else
{
- CHECK_NUMBER (width);
+ CHECK_FIXNUM (width);
fb.width = max (0, min (XINT (width), 255));
}
}
Vfringe_bitmaps = Fcons (bitmap, Vfringe_bitmaps);
- Fput (bitmap, Qfringe, make_number (n));
+ Fput (bitmap, Qfringe, make_fixnum (n));
}
fb.dynamic = true;
b[j++] = 0;
for (i = 0; i < h && j < fb.height; i++)
{
- Lisp_Object elt = Faref (bits, make_number (i));
- b[j++] = NUMBERP (elt) ? XINT (elt) : 0;
+ Lisp_Object elt = Faref (bits, make_fixnum (i));
+ b[j++] = FIXED_OR_FLOATP (elt) ? XINT (elt) : 0;
}
for (i = 0; i < fill2 && j < fb.height; i++)
b[j++] = 0;
if (!NILP (pos))
{
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
if (! (BEGV <= XINT (pos) && XINT (pos) <= ZV))
args_out_of_range (window, pos);
textpos = XINT (pos);
return Qnil;
file = (char *) str;
- key = Fcons (build_unibyte_string (file), make_number (idx));
+ key = Fcons (build_unibyte_string (file), make_fixnum (idx));
cache = ftfont_lookup_cache (key, FTFONT_CACHE_FOR_ENTITY);
entity = XCAR (cache);
if (! NILP (entity))
{
if (numeric >= FC_WEIGHT_REGULAR && numeric < FC_WEIGHT_MEDIUM)
numeric = FC_WEIGHT_MEDIUM;
- FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX, make_number (numeric));
+ FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX, make_fixnum (numeric));
}
if (FcPatternGetInteger (p, FC_SLANT, 0, &numeric) == FcResultMatch)
{
numeric += 100;
- FONT_SET_STYLE (entity, FONT_SLANT_INDEX, make_number (numeric));
+ FONT_SET_STYLE (entity, FONT_SLANT_INDEX, make_fixnum (numeric));
}
if (FcPatternGetInteger (p, FC_WIDTH, 0, &numeric) == FcResultMatch)
{
- FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_number (numeric));
+ FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_fixnum (numeric));
}
if (FcPatternGetDouble (p, FC_PIXEL_SIZE, 0, &dbl) == FcResultMatch)
{
- ASET (entity, FONT_SIZE_INDEX, make_number (dbl));
+ ASET (entity, FONT_SIZE_INDEX, make_fixnum (dbl));
}
else
- ASET (entity, FONT_SIZE_INDEX, make_number (0));
+ ASET (entity, FONT_SIZE_INDEX, make_fixnum (0));
if (FcPatternGetInteger (p, FC_SPACING, 0, &numeric) == FcResultMatch)
- ASET (entity, FONT_SPACING_INDEX, make_number (numeric));
+ ASET (entity, FONT_SPACING_INDEX, make_fixnum (numeric));
if (FcPatternGetDouble (p, FC_DPI, 0, &dbl) == FcResultMatch)
{
int dpi = dbl;
- ASET (entity, FONT_DPI_INDEX, make_number (dpi));
+ ASET (entity, FONT_DPI_INDEX, make_fixnum (dpi));
}
if (FcPatternGetBool (p, FC_SCALABLE, 0, &b) == FcResultMatch
&& b == FcTrue)
{
- ASET (entity, FONT_SIZE_INDEX, make_number (0));
- ASET (entity, FONT_AVGWIDTH_INDEX, make_number (0));
+ ASET (entity, FONT_SIZE_INDEX, make_fixnum (0));
+ ASET (entity, FONT_AVGWIDTH_INDEX, make_fixnum (0));
}
else
{
if (FT_Get_BDF_Property (ft_face, "AVERAGE_WIDTH", &rec) == 0
&& rec.type == BDF_PROPERTY_TYPE_INTEGER)
- ASET (entity, FONT_AVGWIDTH_INDEX, make_number (rec.u.integer));
+ ASET (entity, FONT_AVGWIDTH_INDEX, make_fixnum (rec.u.integer));
FT_Done_Face (ft_face);
}
}
/* Fontconfig doesn't support reverse-italic/oblique. */
return NULL;
- if (INTEGERP (AREF (spec, FONT_DPI_INDEX)))
+ if (FIXNUMP (AREF (spec, FONT_DPI_INDEX)))
dpi = XINT (AREF (spec, FONT_DPI_INDEX));
- if (INTEGERP (AREF (spec, FONT_AVGWIDTH_INDEX))
+ if (FIXNUMP (AREF (spec, FONT_AVGWIDTH_INDEX))
&& XINT (AREF (spec, FONT_AVGWIDTH_INDEX)) == 0)
scalable = 1;
key = XCAR (XCAR (extra)), val = XCDR (XCAR (extra));
if (EQ (key, QCdpi))
{
- if (INTEGERP (val))
+ if (FIXNUMP (val))
dpi = XINT (val);
}
else if (EQ (key, QClang))
}
val = Qnil;
}
- if (INTEGERP (AREF (spec, FONT_SPACING_INDEX)))
+ if (FIXNUMP (AREF (spec, FONT_SPACING_INDEX)))
spacing = XINT (AREF (spec, FONT_SPACING_INDEX));
family = AREF (spec, FONT_FAMILY_INDEX);
if (! NILP (family))
!= FcResultMatch)
continue;
for (j = 0; j < ASIZE (chars); j++)
- if (TYPE_RANGED_INTEGERP (FcChar32, AREF (chars, j))
+ if (TYPE_RANGED_FIXNUMP (FcChar32, AREF (chars, j))
&& FcCharSetHasChar (charset, XFASTINT (AREF (chars, j))))
break;
if (j == ASIZE (chars))
if (! pattern)
return Qnil;
- if (INTEGERP (AREF (spec, FONT_SIZE_INDEX)))
+ if (FIXNUMP (AREF (spec, FONT_SIZE_INDEX)))
{
FcValue value;
font->encoding_charset = font->repertory_charset = -1;
upEM = ft_face->units_per_EM;
- scalable = (INTEGERP (AREF (entity, FONT_AVGWIDTH_INDEX))
+ scalable = (FIXNUMP (AREF (entity, FONT_AVGWIDTH_INDEX))
&& XINT (AREF (entity, FONT_AVGWIDTH_INDEX)) == 0);
if (scalable)
{
font->descent = - ft_face->size->metrics.descender >> 6;
font->height = ft_face->size->metrics.height >> 6;
}
- if (INTEGERP (AREF (entity, FONT_SPACING_INDEX)))
+ if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
else
spacing = FC_PROPORTIONAL;
struct ftfont_info *ftfont_info = (struct ftfont_info *) font;
Lisp_Object val, cache;
- val = Fcons (font->props[FONT_FILE_INDEX], make_number (ftfont_info->index));
+ val = Fcons (font->props[FONT_FILE_INDEX], make_fixnum (ftfont_info->index));
cache = ftfont_lookup_cache (val, FTFONT_CACHE_FOR_FACE);
eassert (CONSP (cache));
val = XCDR (cache);
flt = mflt_find (LGLYPH_CHAR (LGSTRING_GLYPH (lgstring, 0)),
&flt_font_ft.flt_font);
if (! flt)
- return make_number (0);
+ return make_fixnum (0);
}
MFLTGlyphFT *glyphs = (MFLTGlyphFT *) gstring.glyphs;
{
Lisp_Object vec = make_uninit_vector (3);
- ASET (vec, 0, make_number (g->g.xoff >> 6));
- ASET (vec, 1, make_number (g->g.yoff >> 6));
- ASET (vec, 2, make_number (g->g.xadv >> 6));
+ ASET (vec, 0, make_fixnum (g->g.xoff >> 6));
+ ASET (vec, 1, make_fixnum (g->g.yoff >> 6));
+ ASET (vec, 2, make_fixnum (g->g.xadv >> 6));
LGLYPH_SET_ADJUSTMENT (lglyph, vec);
}
}
- return make_number (i);
+ return make_fixnum (i);
}
Lisp_Object
/* Determine callback function. */
monitor_object = make_pointer_integer (monitor);
- eassert (INTEGERP (monitor_object));
+ eassert (FIXNUMP (monitor_object));
watch_object = assq_no_quit (monitor_object, watch_list);
if (CONSP (watch_object))
Lisp_Object watch_descriptor = make_pointer_integer (monitor);
/* Check the dicey assumption that make_pointer_integer is safe. */
- if (! INTEGERP (watch_descriptor))
+ if (! FIXNUMP (watch_descriptor))
{
g_object_unref (monitor);
xsignal2 (Qfile_notify_error, build_string ("Unsupported file watcher"),
xsignal2 (Qfile_notify_error, build_string ("Not a watch descriptor"),
watch_descriptor);
- eassert (INTEGERP (watch_descriptor));
+ eassert (FIXNUMP (watch_descriptor));
GFileMonitor *monitor = XINTPTR (watch_descriptor);
if (!g_file_monitor_is_cancelled (monitor) &&
!g_file_monitor_cancel (monitor))
}
check_memory_full (err);
- return make_number (err);
+ return make_fixnum (err);
}
static void
{
CHECK_PROCESS (proc);
- return make_number (GNUTLS_INITSTAGE (proc));
+ return make_fixnum (GNUTLS_INITSTAGE (proc));
}
DEFUN ("gnutls-errorp", Fgnutls_errorp, Sgnutls_errorp, 1, 1, 0,
if (SYMBOLP (err))
{
code = Fget (err, Qgnutls_code);
- if (NUMBERP (code))
+ if (FIXED_OR_FLOATP (code))
{
err = code;
}
}
}
- if (! TYPE_RANGED_INTEGERP (int, err))
+ if (! TYPE_RANGED_FIXNUMP (int, err))
error ("Not an error symbol or code");
if (0 == gnutls_error_is_fatal (XINT (err)))
if (SYMBOLP (err))
{
code = Fget (err, Qgnutls_code);
- if (NUMBERP (code))
+ if (FIXED_OR_FLOATP (code))
{
err = code;
}
}
}
- if (! TYPE_RANGED_INTEGERP (int, err))
+ if (! TYPE_RANGED_FIXNUMP (int, err))
return build_string ("Not an error symbol or code");
return build_string (emacs_gnutls_strerror (XINT (err)));
check_memory_full (version);
if (version >= GNUTLS_E_SUCCESS)
res = nconc2 (res, list2 (intern (":version"),
- make_number (version)));
+ make_fixnum (version)));
}
/* Serial. */
check_memory_full (bits);
if (bits > 0)
result = nconc2 (result, list2 (intern (":diffie-hellman-prime-bits"),
- make_number (bits)));
+ make_fixnum (bits)));
}
/* Key exchange. */
state = XPROCESS (proc)->gnutls_state;
- if (TYPE_RANGED_INTEGERP (int, loglevel))
+ if (TYPE_RANGED_FIXNUMP (int, loglevel))
{
gnutls_global_set_log_function (gnutls_log_function);
# ifdef HAVE_GNUTLS3
XPROCESS (proc)->gnutls_x509_cred = x509_cred;
verify_flags = Fplist_get (proplist, QCverify_flags);
- if (TYPE_RANGED_INTEGERP (unsigned int, verify_flags))
+ if (TYPE_RANGED_FIXNUMP (unsigned int, verify_flags))
{
gnutls_verify_flags = XFASTINT (verify_flags);
GNUTLS_LOG (2, max_log_level, "setting verification flags");
GNUTLS_INITSTAGE (proc) = GNUTLS_STAGE_PRIORITY;
- if (INTEGERP (prime_bits))
+ if (FIXNUMP (prime_bits))
gnutls_dh_set_prime_bits (state, XUINT (prime_bits));
ret = EQ (type, Qgnutls_x509pki)
Lisp_Object cp
= listn (CONSTYPE_HEAP, 15, cipher_symbol,
- QCcipher_id, make_number (gca),
+ QCcipher_id, make_fixnum (gca),
QCtype, Qgnutls_type_cipher,
QCcipher_aead_capable, cipher_tag_size == 0 ? Qnil : Qt,
- QCcipher_tagsize, make_number (cipher_tag_size),
+ QCcipher_tagsize, make_fixnum (cipher_tag_size),
QCcipher_blocksize,
- make_number (gnutls_cipher_get_block_size (gca)),
+ make_fixnum (gnutls_cipher_get_block_size (gca)),
QCcipher_keysize,
- make_number (gnutls_cipher_get_key_size (gca)),
+ make_fixnum (gnutls_cipher_get_key_size (gca)),
QCcipher_ivsize,
- make_number (gnutls_cipher_get_iv_size (gca)));
+ make_fixnum (gnutls_cipher_get_iv_size (gca)));
ciphers = Fcons (cp, ciphers);
}
if (SYMBOLP (cipher))
info = XCDR (Fassq (cipher, Fgnutls_ciphers ()));
- else if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, cipher))
+ else if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, cipher))
gca = XINT (cipher);
else
info = cipher;
if (!NILP (info) && CONSP (info))
{
Lisp_Object v = Fplist_get (info, QCcipher_id);
- if (TYPE_RANGED_INTEGERP (gnutls_cipher_algorithm_t, v))
+ if (TYPE_RANGED_FIXNUMP (gnutls_cipher_algorithm_t, v))
gca = XINT (v);
}
nonce_size = gnutls_mac_get_nonce_size (gma);
#endif
Lisp_Object mp = listn (CONSTYPE_HEAP, 11, gma_symbol,
- QCmac_algorithm_id, make_number (gma),
+ QCmac_algorithm_id, make_fixnum (gma),
QCtype, Qgnutls_type_mac_algorithm,
QCmac_algorithm_length,
- make_number (gnutls_hmac_get_len (gma)),
+ make_fixnum (gnutls_hmac_get_len (gma)),
QCmac_algorithm_keysize,
- make_number (gnutls_mac_get_key_size (gma)),
+ make_fixnum (gnutls_mac_get_key_size (gma)),
QCmac_algorithm_noncesize,
- make_number (nonce_size));
+ make_fixnum (nonce_size));
mac_algorithms = Fcons (mp, mac_algorithms);
}
Lisp_Object gda_symbol = intern (gnutls_digest_get_name (gda));
Lisp_Object mp = listn (CONSTYPE_HEAP, 7, gda_symbol,
- QCdigest_algorithm_id, make_number (gda),
+ QCdigest_algorithm_id, make_fixnum (gda),
QCtype, Qgnutls_type_digest_algorithm,
QCdigest_algorithm_length,
- make_number (gnutls_hash_get_len (gda)));
+ make_fixnum (gnutls_hash_get_len (gda)));
digest_algorithms = Fcons (mp, digest_algorithms);
}
if (SYMBOLP (hash_method))
info = XCDR (Fassq (hash_method, Fgnutls_macs ()));
- else if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, hash_method))
+ else if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, hash_method))
gma = XINT (hash_method);
else
info = hash_method;
if (!NILP (info) && CONSP (info))
{
Lisp_Object v = Fplist_get (info, QCmac_algorithm_id);
- if (TYPE_RANGED_INTEGERP (gnutls_mac_algorithm_t, v))
+ if (TYPE_RANGED_FIXNUMP (gnutls_mac_algorithm_t, v))
gma = XINT (v);
}
if (SYMBOLP (digest_method))
info = XCDR (Fassq (digest_method, Fgnutls_digests ()));
- else if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, digest_method))
+ else if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, digest_method))
gda = XINT (digest_method);
else
info = digest_method;
if (!NILP (info) && CONSP (info))
{
Lisp_Object v = Fplist_get (info, QCdigest_algorithm_id);
- if (TYPE_RANGED_INTEGERP (gnutls_digest_algorithm_t, v))
+ if (TYPE_RANGED_FIXNUMP (gnutls_digest_algorithm_t, v))
gda = XINT (v);
}
DEFSYM (Qlibgnutls_version, "libgnutls-version");
Fset (Qlibgnutls_version,
#ifdef HAVE_GNUTLS
- make_number (GNUTLS_VERSION_MAJOR * 10000
+ make_fixnum (GNUTLS_VERSION_MAJOR * 10000
+ GNUTLS_VERSION_MINOR * 100
+ GNUTLS_VERSION_PATCH)
#else
- make_number (-1)
+ make_fixnum (-1)
#endif
);
#ifdef HAVE_GNUTLS
DEFSYM (Qgnutls_e_interrupted, "gnutls-e-interrupted");
Fput (Qgnutls_e_interrupted, Qgnutls_code,
- make_number (GNUTLS_E_INTERRUPTED));
+ make_fixnum (GNUTLS_E_INTERRUPTED));
DEFSYM (Qgnutls_e_again, "gnutls-e-again");
Fput (Qgnutls_e_again, Qgnutls_code,
- make_number (GNUTLS_E_AGAIN));
+ make_fixnum (GNUTLS_E_AGAIN));
DEFSYM (Qgnutls_e_invalid_session, "gnutls-e-invalid-session");
Fput (Qgnutls_e_invalid_session, Qgnutls_code,
- make_number (GNUTLS_E_INVALID_SESSION));
+ make_fixnum (GNUTLS_E_INVALID_SESSION));
DEFSYM (Qgnutls_e_not_ready_for_handshake, "gnutls-e-not-ready-for-handshake");
Fput (Qgnutls_e_not_ready_for_handshake, Qgnutls_code,
- make_number (GNUTLS_E_APPLICATION_ERROR_MIN));
+ make_fixnum (GNUTLS_E_APPLICATION_ERROR_MIN));
defsubr (&Sgnutls_get_initstage);
defsubr (&Sgnutls_asynchronous_parameters);
{
frame_size_history_add
(f, Qxg_frame_set_char_size_1, width, height,
- list2 (make_number (gheight), make_number (totalheight)));
+ list2 (make_fixnum (gheight), make_fixnum (totalheight)));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
gwidth, totalheight);
{
frame_size_history_add
(f, Qxg_frame_set_char_size_2, width, height,
- list2 (make_number (gwidth), make_number (totalwidth)));
+ list2 (make_fixnum (gwidth), make_fixnum (totalwidth)));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
totalwidth, gheight);
{
frame_size_history_add
(f, Qxg_frame_set_char_size_3, width, height,
- list2 (make_number (totalwidth), make_number (totalheight)));
+ list2 (make_fixnum (totalwidth), make_fixnum (totalheight)));
gtk_window_resize (GTK_WINDOW (FRAME_GTK_OUTER_WIDGET (f)),
totalwidth, totalheight);
gint page_nr, gpointer user_data)
{
Lisp_Object frames = *((Lisp_Object *) user_data);
- struct frame *f = XFRAME (Fnth (make_number (page_nr), frames));
+ struct frame *f = XFRAME (Fnth (make_fixnum (page_nr), frames));
cairo_t *cr = gtk_print_context_get_cairo_context (context);
x_cr_draw_frame (cr, f);
block_input ();
- if (RANGED_INTEGERP (1, Vtool_bar_button_margin, INT_MAX))
+ if (RANGED_FIXNUMP (1, Vtool_bar_button_margin, INT_MAX))
{
hmargin = XFASTINT (Vtool_bar_button_margin);
vmargin = XFASTINT (Vtool_bar_button_margin);
}
else if (CONSP (Vtool_bar_button_margin))
{
- if (RANGED_INTEGERP (1, XCAR (Vtool_bar_button_margin), INT_MAX))
+ if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin), INT_MAX))
hmargin = XFASTINT (XCAR (Vtool_bar_button_margin));
- if (RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
+ if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin), INT_MAX))
vmargin = XFASTINT (XCDR (Vtool_bar_button_margin));
}
/* Search bitmap-file-path for the file, if appropriate. */
if (openp (Vx_bitmap_file_path, file, Qnil, &found,
- make_number (R_OK), false)
+ make_fixnum (R_OK), false)
< 0)
return -1;
break;
case IMAGE_POSITIVE_INTEGER_VALUE:
- if (! RANGED_INTEGERP (1, value, INT_MAX))
+ if (! RANGED_FIXNUMP (1, value, INT_MAX))
return 0;
break;
case IMAGE_NON_NEGATIVE_INTEGER_VALUE_OR_PAIR:
- if (RANGED_INTEGERP (0, value, INT_MAX))
+ if (RANGED_FIXNUMP (0, value, INT_MAX))
break;
if (CONSP (value)
- && RANGED_INTEGERP (0, XCAR (value), INT_MAX)
- && RANGED_INTEGERP (0, XCDR (value), INT_MAX))
+ && RANGED_FIXNUMP (0, XCAR (value), INT_MAX)
+ && RANGED_FIXNUMP (0, XCDR (value), INT_MAX))
break;
return 0;
case IMAGE_ASCENT_VALUE:
if (SYMBOLP (value) && EQ (value, Qcenter))
break;
- else if (RANGED_INTEGERP (0, value, 100))
+ else if (RANGED_FIXNUMP (0, value, 100))
break;
return 0;
/* Unlike the other integer-related cases, this one does not
verify that VALUE fits in 'int'. This is because callers
want EMACS_INT. */
- if (!INTEGERP (value) || XINT (value) < 0)
+ if (!FIXNUMP (value) || XINT (value) < 0)
return 0;
break;
return 0;
case IMAGE_NUMBER_VALUE:
- if (! NUMBERP (value))
+ if (! FIXED_OR_FLOATP (value))
return 0;
break;
case IMAGE_INTEGER_VALUE:
- if (! TYPE_RANGED_INTEGERP (int, value))
+ if (! TYPE_RANGED_FIXNUMP (int, value))
return 0;
break;
size = Fcons (make_float ((double) width / FRAME_COLUMN_WIDTH (f)),
make_float ((double) height / FRAME_LINE_HEIGHT (f)));
else
- size = Fcons (make_number (width), make_number (height));
+ size = Fcons (make_fixnum (width), make_fixnum (height));
}
else
error ("Invalid image specification");
if (width <= 0 || height <= 0)
return 0;
- if (INTEGERP (Vmax_image_size))
+ if (FIXNUMP (Vmax_image_size))
return (width <= XINT (Vmax_image_size)
&& height <= XINT (Vmax_image_size));
else if (FLOATP (Vmax_image_size))
}
}
}
- else if (INTEGERP (Vimage_cache_eviction_delay))
+ else if (FIXNUMP (Vimage_cache_eviction_delay))
{
/* Free cache based on timestamp. */
struct timespec old, t;
Lisp_Object value;
value = image_spec_value (spec, QCwidth, NULL);
- img->width = (INTEGERP (value)
+ img->width = (FIXNUMP (value)
? XFASTINT (value) : DEFAULT_IMAGE_WIDTH);
value = image_spec_value (spec, QCheight, NULL);
- img->height = (INTEGERP (value)
+ img->height = (FIXNUMP (value)
? XFASTINT (value) : DEFAULT_IMAGE_HEIGHT);
}
else
int relief_bound;
ascent = image_spec_value (spec, QCascent, NULL);
- if (INTEGERP (ascent))
+ if (FIXNUMP (ascent))
img->ascent = XFASTINT (ascent);
else if (EQ (ascent, Qcenter))
img->ascent = CENTERED_IMAGE_ASCENT;
margin = image_spec_value (spec, QCmargin, NULL);
- if (INTEGERP (margin))
+ if (FIXNUMP (margin))
img->vmargin = img->hmargin = XFASTINT (margin);
else if (CONSP (margin))
{
relief = image_spec_value (spec, QCrelief, NULL);
relief_bound = INT_MAX - max (img->hmargin, img->vmargin);
- if (RANGED_INTEGERP (- relief_bound, relief, relief_bound))
+ if (RANGED_FIXNUMP (- relief_bound, relief, relief_bound))
{
img->relief = XINT (relief);
img->hmargin += eabs (img->relief);
x_destroy_x_image (*ximg);
*ximg = NULL;
image_error ("Image too large (%dx%d)",
- make_number (width), make_number (height));
+ make_fixnum (width), make_fixnum (height));
return 0;
}
/* Try to find FILE in data-directory/images, then x-bitmap-file-path. */
fd = openp (search_path, file, Qnil, &file_found,
- pfd ? Qt : make_number (R_OK), false);
+ pfd ? Qt : make_fixnum (R_OK), false);
if (fd >= 0 || fd == -2)
{
file_found = ENCODE_FILE (file_found);
{
if (!inhibit_image_error)
image_error ("Image too large (%dx%d)",
- make_number (*width), make_number (*height));
+ make_fixnum (*width), make_fixnum (*height));
goto failure;
}
bytes_per_line = (*width + 7) / 8 + padding_p;
{
*put_func = xpm_put_color_table_v;
*get_func = xpm_get_color_table_v;
- return Fmake_vector (make_number (256), Qnil);
+ return Fmake_vector (make_fixnum (256), Qnil);
}
static void
color_val = Qt;
else if (x_defined_color (f, SSDATA (XCDR (specified_color)),
&cdef, 0))
- color_val = make_number (cdef.pixel);
+ color_val = make_fixnum (cdef.pixel);
}
}
if (NILP (color_val) && max_key > 0)
if (xstrcasecmp (max_color, "None") == 0)
color_val = Qt;
else if (x_defined_color (f, max_color, &cdef, 0))
- color_val = make_number (cdef.pixel);
+ color_val = make_fixnum (cdef.pixel);
}
if (!NILP (color_val))
(*put_color_table) (color_table, beg, chars_per_pixel, color_val);
(*get_color_table) (color_table, str, chars_per_pixel);
XPutPixel (ximg, x, y,
- (INTEGERP (color_val) ? XINT (color_val)
+ (FIXNUMP (color_val) ? XINT (color_val)
: FRAME_FOREGROUND_PIXEL (f)));
#ifndef HAVE_NS
XPutPixel (mask_img, x, y,
if (CONSP (matrix))
{
for (i = 0;
- i < 9 && CONSP (matrix) && NUMBERP (XCAR (matrix));
+ i < 9 && CONSP (matrix) && FIXED_OR_FLOATP (XCAR (matrix));
++i, matrix = XCDR (matrix))
trans[i] = XFLOATINT (XCAR (matrix));
}
else if (VECTORP (matrix) && ASIZE (matrix) >= 9)
{
- for (i = 0; i < 9 && NUMBERP (AREF (matrix, i)); ++i)
+ for (i = 0; i < 9 && FIXED_OR_FLOATP (AREF (matrix, i)); ++i)
trans[i] = XFLOATINT (AREF (matrix, i));
}
if (NILP (color_adjust))
- color_adjust = make_number (0xffff / 2);
+ color_adjust = make_fixnum (0xffff / 2);
- if (i == 9 && NUMBERP (color_adjust))
+ if (i == 9 && FIXED_OR_FLOATP (color_adjust))
x_detect_edges (f, img, trans, XFLOATINT (color_adjust));
}
{
int rgb[3], i;
- for (i = 0; i < 3 && CONSP (how) && NATNUMP (XCAR (how)); ++i)
+ for (i = 0; i < 3 && CONSP (how) && FIXNATP (XCAR (how)); ++i)
{
rgb[i] = XFASTINT (XCAR (how)) & 0xffff;
how = XCDR (how);
}
image = image_spec_value (img->spec, QCindex, NULL);
- if (INTEGERP (image))
+ if (FIXNUMP (image))
{
EMACS_INT ino = XFASTINT (image);
if (! (TYPE_MINIMUM (tdir_t) <= ino && ino <= TYPE_MAXIMUM (tdir_t)
if (count > 1)
img->lisp_data = Fcons (Qcount,
- Fcons (make_number (count),
+ Fcons (make_fixnum (count),
img->lisp_data));
TIFFClose (tiff);
/* Which sub-image are we to display? */
{
Lisp_Object image_number = image_spec_value (img->spec, QCindex, NULL);
- idx = INTEGERP (image_number) ? XFASTINT (image_number) : 0;
+ idx = FIXNUMP (image_number) ? XFASTINT (image_number) : 0;
if (idx < 0 || idx >= gif->ImageCount)
{
image_error ("Invalid image number `%s' in image `%s'",
/* Append (... FUNCTION "BYTES") */
{
img->lisp_data
- = Fcons (make_number (ext->Function),
+ = Fcons (make_fixnum (ext->Function),
Fcons (make_unibyte_string ((char *) ext->Bytes,
ext->ByteCount),
img->lisp_data));
if (gif->ImageCount > 1)
img->lisp_data = Fcons (Qcount,
- Fcons (make_number (gif->ImageCount),
+ Fcons (make_fixnum (gif->ImageCount),
img->lisp_data));
if (gif_close (gif, &gif_err) == GIF_ERROR)
double scale = 1;
value = image_spec_value (spec, QCscale, NULL);
- if (NUMBERP (value))
+ if (FIXED_OR_FLOATP (value))
scale = XFLOATINT (value);
value = image_spec_value (spec, QCmax_width, NULL);
- if (NATNUMP (value))
+ if (FIXNATP (value))
max_width = min (XFASTINT (value), INT_MAX);
value = image_spec_value (spec, QCmax_height, NULL);
- if (NATNUMP (value))
+ if (FIXNATP (value))
max_height = min (XFASTINT (value), INT_MAX);
/* If width and/or height is set in the display spec assume we want
unspecified should be calculated from the specified to preserve
aspect ratio. */
value = image_spec_value (spec, QCwidth, NULL);
- if (NATNUMP (value))
+ if (FIXNATP (value))
{
desired_width = min (XFASTINT (value) * scale, INT_MAX);
/* :width overrides :max-width. */
}
value = image_spec_value (spec, QCheight, NULL);
- if (NATNUMP (value))
+ if (FIXNATP (value))
{
desired_height = min (XFASTINT (value) * scale, INT_MAX);
/* :height overrides :max-height. */
find out things about it. */
image = image_spec_value (img->spec, QCindex, NULL);
- ino = INTEGERP (image) ? XFASTINT (image) : 0;
+ ino = FIXNUMP (image) ? XFASTINT (image) : 0;
image_wand = NewMagickWand ();
if (filename)
Lisp_Object lwidth = image_spec_value (img->spec, QCwidth, NULL);
Lisp_Object lheight = image_spec_value (img->spec, QCheight, NULL);
- if (NATNUMP (lwidth) && NATNUMP (lheight))
+ if (FIXNATP (lwidth) && FIXNATP (lheight))
{
MagickSetSize (image_wand, XFASTINT (lwidth), XFASTINT (lheight));
MagickSetDepth (image_wand, 8);
if (MagickGetNumberImages (image_wand) > 1)
img->lisp_data =
Fcons (Qcount,
- Fcons (make_number (MagickGetNumberImages (image_wand)),
+ Fcons (make_fixnum (MagickGetNumberImages (image_wand)),
img->lisp_data));
/* If we have an animated image, get the new wand based on the
efficient. */
crop = image_spec_value (img->spec, QCcrop, NULL);
- if (CONSP (crop) && TYPE_RANGED_INTEGERP (size_t, XCAR (crop)))
+ if (CONSP (crop) && TYPE_RANGED_FIXNUMP (size_t, XCAR (crop)))
{
/* After some testing, it seems MagickCropImage is the fastest crop
function in ImageMagick. This crop function seems to do less copying
imagemagick. */
size_t crop_width = XINT (XCAR (crop));
crop = XCDR (crop);
- if (CONSP (crop) && TYPE_RANGED_INTEGERP (size_t, XCAR (crop)))
+ if (CONSP (crop) && TYPE_RANGED_FIXNUMP (size_t, XCAR (crop)))
{
size_t crop_height = XINT (XCAR (crop));
crop = XCDR (crop);
- if (CONSP (crop) && TYPE_RANGED_INTEGERP (ssize_t, XCAR (crop)))
+ if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
{
ssize_t crop_x = XINT (XCAR (crop));
crop = XCDR (crop);
- if (CONSP (crop) && TYPE_RANGED_INTEGERP (ssize_t, XCAR (crop)))
+ if (CONSP (crop) && TYPE_RANGED_FIXNUMP (ssize_t, XCAR (crop)))
{
ssize_t crop_y = XINT (XCAR (crop));
MagickCropImage (image_wand, crop_width, crop_height,
if (CONSP (tem))
{
for (i = 0; i < 4; ++i, tem = XCDR (tem))
- if (!CONSP (tem) || !INTEGERP (XCAR (tem)))
+ if (!CONSP (tem) || !FIXNUMP (XCAR (tem)))
return 0;
if (!NILP (tem))
return 0;
if (ASIZE (tem) != 4)
return 0;
for (i = 0; i < 4; ++i)
- if (!INTEGERP (AREF (tem, i)))
+ if (!FIXNUMP (AREF (tem, i)))
return 0;
}
else
= 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 = INTEGERP (pt_width) ? XFASTINT (pt_width) / 72.0 : 0;
+ in_width = FIXNUMP (pt_width) ? XFASTINT (pt_width) / 72.0 : 0;
in_width *= FRAME_RES_X (f);
pt_height = image_spec_value (img->spec, QCpt_height, NULL);
- in_height = INTEGERP (pt_height) ? XFASTINT (pt_height) / 72.0 : 0;
+ in_height = FIXNUMP (pt_height) ? XFASTINT (pt_height) / 72.0 : 0;
in_height *= FRAME_RES_Y (f);
if (! (in_width <= INT_MAX && in_height <= INT_MAX
loader = intern ("gs-load-image");
img->lisp_data = call6 (loader, frame, img->spec,
- make_number (img->width),
- make_number (img->height),
+ make_fixnum (img->width),
+ make_fixnum (img->height),
window_and_pixmap_id,
pixel_colors);
return PROCESSP (img->lisp_data);
id = lookup_image (SELECTED_FRAME (), spec);
debug_print (spec);
- return make_number (id);
+ return make_fixnum (id);
}
#endif /* GLYPH_DEBUG */
DEFSYM (Qlibpng_version, "libpng-version");
Fset (Qlibpng_version,
#if HAVE_PNG
- make_number (PNG_LIBPNG_VER)
+ make_fixnum (PNG_LIBPNG_VER)
#else
- make_number (-1)
+ make_fixnum (-1)
#endif
);
DEFSYM (Qlibgif_version, "libgif-version");
Fset (Qlibgif_version,
#ifdef HAVE_GIF
- make_number (GIFLIB_MAJOR * 10000
+ make_fixnum (GIFLIB_MAJOR * 10000
+ GIFLIB_MINOR * 100
+ GIFLIB_RELEASE)
#else
- make_number (-1)
+ make_fixnum (-1)
#endif
);
DEFSYM (Qlibjpeg_version, "libjpeg-version");
Fset (Qlibjpeg_version,
#if HAVE_JPEG
- make_number (JPEG_LIB_VERSION)
+ make_fixnum (JPEG_LIB_VERSION)
#else
- make_number (-1)
+ make_fixnum (-1)
#endif
);
#endif
The value can also be nil, meaning the cache is never cleared.
The function `clear-image-cache' disregards this variable. */);
- Vimage_cache_eviction_delay = make_number (300);
+ Vimage_cache_eviction_delay = make_fixnum (300);
#ifdef HAVE_IMAGEMAGICK
DEFVAR_INT ("imagemagick-render-type", imagemagick_render_type,
doc: /* Integer indicating which ImageMagick rendering method to use.
Lisp_Object val, overlay;
if (CONSP (val = get_char_property_and_overlay
- (make_number (pos), Qdisplay, Qnil, &overlay))
+ (make_fixnum (pos), Qdisplay, Qnil, &overlay))
&& EQ (Qspace, XCAR (val)))
{ /* FIXME: Use calc_pixel_width_or_height. */
Lisp_Object plist = XCDR (val), prop;
: MOST_POSITIVE_FIXNUM);
if ((prop = Fplist_get (plist, QCwidth),
- RANGED_INTEGERP (0, prop, INT_MAX))
+ RANGED_FIXNUMP (0, prop, INT_MAX))
|| (prop = Fplist_get (plist, QCrelative_width),
- RANGED_INTEGERP (0, prop, INT_MAX)))
+ RANGED_FIXNUMP (0, prop, INT_MAX)))
width = XINT (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_INTEGERP (col, prop, align_to_max)))
+ RANGED_FIXNUMP (col, prop, align_to_max)))
width = XINT (prop) - col;
else if (FLOATP (prop) && col <= XFLOAT_DATA (prop)
&& (XFLOAT_DATA (prop) <= align_to_max))
e = SCHARS (string);
else
{
- CHECK_NUMBER (end);
+ CHECK_FIXNUM (end);
e = XINT (end);
}
b = 0;
else
{
- CHECK_NUMBER (beg);
+ CHECK_FIXNUM (beg);
b = XINT (beg);
}
register ptrdiff_t fromcol;
int tab_width = SANE_TAB_WIDTH (current_buffer);
- CHECK_NUMBER (column);
+ CHECK_FIXNUM (column);
if (NILP (minimum))
XSETFASTINT (minimum, 0);
- CHECK_NUMBER (minimum);
+ CHECK_FIXNUM (minimum);
fromcol = current_column ();
mincol = fromcol + XINT (minimum);
if (mincol < XINT (column)) mincol = XINT (column);
if (fromcol == mincol)
- return make_number (mincol);
+ return make_fixnum (mincol);
if (indent_tabs_mode)
{
XSETFASTINT (n, mincol / tab_width - fromcol / tab_width);
if (XFASTINT (n) != 0)
{
- Finsert_char (make_number ('\t'), n, Qt);
+ Finsert_char (make_fixnum ('\t'), n, Qt);
fromcol = (mincol / tab_width) * tab_width;
}
}
XSETFASTINT (column, mincol - fromcol);
- Finsert_char (make_number (' '), column, Qt);
+ Finsert_char (make_fixnum (' '), column, Qt);
last_known_column = mincol;
last_known_column_point = PT;
ptrdiff_t posbyte;
find_newline (PT, PT_BYTE, BEGV, BEGV_BYTE, -1, NULL, &posbyte, 1);
- return make_number (position_indentation (posbyte));
+ return make_fixnum (position_indentation (posbyte));
}
static ptrdiff_t
EMACS_INT col;
EMACS_INT goal;
- CHECK_NATNUM (column);
+ CHECK_FIXNAT (column);
goal = XINT (column);
col = goal;
first so that a marker at the end of the tab gets
adjusted. */
SET_PT_BOTH (PT - 1, PT_BYTE - 1);
- Finsert_char (make_number (' '), make_number (goal - prev_col), Qt);
+ Finsert_char (make_fixnum (' '), make_fixnum (goal - prev_col), Qt);
/* Now delete the tab, and indent to COL. */
del_range (PT, PT + 1);
goal_pt = PT;
goal_pt_byte = PT_BYTE;
- Findent_to (make_number (col), Qnil);
+ Findent_to (make_fixnum (col), Qnil);
SET_PT_BOTH (goal_pt, goal_pt_byte);
/* Set the last_known... vars consistently. */
/* If line ends prematurely, add space to the end. */
if (col < goal && EQ (force, Qt))
- Findent_to (make_number (col = goal), Qnil);
+ Findent_to (make_fixnum (col = goal), Qnil);
last_known_column = col;
last_known_column_point = PT;
last_known_column_modified = MODIFF;
- return make_number (col);
+ return make_fixnum (col);
}
\f
/* compute_motion: compute buffer posn given screen posn and vice versa */
bool ctl_arrow = !NILP (BVAR (current_buffer, ctl_arrow));
struct Lisp_Char_Table *dp = window_display_table (win);
EMACS_INT selective
- = (INTEGERP (BVAR (current_buffer, selective_display))
+ = (FIXNUMP (BVAR (current_buffer, selective_display))
? XINT (BVAR (current_buffer, selective_display))
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
ptrdiff_t selective_rlen
if (!NILP (Vtruncate_partial_width_windows)
&& (total_width < FRAME_COLS (XFRAME (WINDOW_FRAME (win)))))
{
- if (INTEGERP (Vtruncate_partial_width_windows))
+ if (FIXNUMP (Vtruncate_partial_width_windows))
truncate
= total_width < XFASTINT (Vtruncate_partial_width_windows);
else
ptrdiff_t hscroll;
int tab_offset;
- CHECK_NUMBER_COERCE_MARKER (from);
+ CHECK_FIXNUM_COERCE_MARKER (from);
CHECK_CONS (frompos);
- CHECK_NUMBER_CAR (frompos);
- CHECK_NUMBER_CDR (frompos);
- CHECK_NUMBER_COERCE_MARKER (to);
+ CHECK_FIXNUM_CAR (frompos);
+ CHECK_FIXNUM_CDR (frompos);
+ CHECK_FIXNUM_COERCE_MARKER (to);
if (!NILP (topos))
{
CHECK_CONS (topos);
- CHECK_NUMBER_CAR (topos);
- CHECK_NUMBER_CDR (topos);
+ CHECK_FIXNUM_CAR (topos);
+ CHECK_FIXNUM_CDR (topos);
}
if (!NILP (width))
- CHECK_NUMBER (width);
+ CHECK_FIXNUM (width);
if (!NILP (offsets))
{
CHECK_CONS (offsets);
- CHECK_NUMBER_CAR (offsets);
- CHECK_NUMBER_CDR (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))
args_out_of_range (XCAR (offsets), XCDR (offsets));
w = decode_live_window (window);
if (XINT (from) < BEGV || XINT (from) > ZV)
- args_out_of_range_3 (from, make_number (BEGV), make_number (ZV));
+ args_out_of_range_3 (from, make_fixnum (BEGV), make_fixnum (ZV));
if (XINT (to) < BEGV || XINT (to) > ZV)
- args_out_of_range_3 (to, make_number (BEGV), make_number (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)),
register ptrdiff_t first;
ptrdiff_t lmargin = hscroll > 0 ? 1 - hscroll : 0;
ptrdiff_t selective
- = (INTEGERP (BVAR (current_buffer, selective_display))
+ = (FIXNUMP (BVAR (current_buffer, selective_display))
? clip_to_bounds (-1, XINT (BVAR (current_buffer, selective_display)),
PTRDIFF_MAX)
: !NILP (BVAR (current_buffer, selective_display)) ? -1 : 0);
&& indented_beyond_p (prevline, bytepos, selective))
/* Watch out for newlines with `invisible' property.
When moving upward, check the newline before. */
- || (propval = Fget_char_property (make_number (prevline - 1),
+ || (propval = Fget_char_property (make_fixnum (prevline - 1),
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
&& indented_beyond_p (prevline, bytepos, selective))
/* Watch out for newlines with `invisible' property.
When moving downward, check the newline after. */
- || (propval = Fget_char_property (make_number (prevline),
+ || (propval = Fget_char_property (make_fixnum (prevline),
Qinvisible,
text_prop_object),
TEXT_PROP_MEANS_INVISIBLE (propval))))
return make_float ((double) pixel_width / FRAME_COLUMN_WIDTH (f));
}
else if (!NILP (pixelwise))
- return make_number (pixel_width);
- return make_number (width);
+ return make_fixnum (pixel_width);
+ return make_fixnum (width);
}
/* In window W (derived from WINDOW), return x coordinate for column
lines = XCDR (lines);
}
- CHECK_NUMBER (lines);
+ CHECK_FIXNUM (lines);
w = decode_live_window (window);
if (XBUFFER (w->contents) != current_buffer)
{
/* Set the window's buffer temporarily to the current buffer. */
Lisp_Object old = list4 (window, w->contents,
- make_number (marker_position (w->pointm)),
- make_number (marker_byte_position (w->pointm)));
+ make_fixnum (marker_position (w->pointm)),
+ make_fixnum (marker_byte_position (w->pointm)));
record_unwind_protect (restore_window_buffer, old);
wset_buffer (w, Fcurrent_buffer ());
set_marker_both (w->pointm, w->contents,
bidi_unshelve_cache (itdata, 0);
}
- return unbind_to (count, make_number (it.vpos));
+ return unbind_to (count, make_fixnum (it.vpos));
}
{
Lisp_Object name;
uint32_t mask;
- CONS_TO_INTEGER (Fnth (make_number (3), watch), uint32_t, mask);
+ CONS_TO_INTEGER (Fnth (make_fixnum (3), watch), uint32_t, mask);
if (! (mask & ev->mask))
return Qnil;
mask_to_aspects (ev->mask),
name,
INTEGER_TO_CONS (ev->cookie)),
- Fnth (make_number (2), watch));
+ Fnth (make_fixnum (2), watch));
}
/* Add a new watch to watch-descriptor WD watching FILENAME and using
/* Assign a watch ID that is not already in use, by looking
for a gap in the existing sorted list. */
for (; ! NILP (XCDR (tail)); tail = XCDR (tail), id++)
- if (!EQ (XCAR (XCAR (XCDR (tail))), make_number (id)))
+ if (!EQ (XCAR (XCAR (XCDR (tail))), make_fixnum (id)))
break;
if (MOST_POSITIVE_FIXNUM < id)
emacs_abort ();
/* Insert the newly-assigned ID into the previously-discovered gap,
which is possibly at the end of the list. Inserting it there
keeps the list sorted. */
- watch_id = make_number (id);
+ watch_id = make_fixnum (id);
watch = list4 (watch_id, filename, callback, mask);
XSETCDR (tail, Fcons (watch, XCDR (tail)));
valid_watch_descriptor (Lisp_Object wd)
{
return (CONSP (wd)
- && (RANGED_INTEGERP (0, XCAR (wd), INT_MAX)
+ && (RANGED_FIXNUMP (0, XCAR (wd), INT_MAX)
|| (CONSP (XCAR (wd))
- && RANGED_INTEGERP ((MOST_POSITIVE_FIXNUM >> 16) + 1,
+ && RANGED_FIXNUMP ((MOST_POSITIVE_FIXNUM >> 16) + 1,
XCAR (XCAR (wd)), INT_MAX >> 16)
- && RANGED_INTEGERP (0, XCDR (XCAR (wd)), (1 << 16) - 1)))
- && NATNUMP (XCDR (wd)));
+ && RANGED_FIXNUMP (0, XCDR (XCAR (wd)), (1 << 16) - 1)))
+ && FIXNATP (XCDR (wd)));
}
DEFUN ("inotify-rm-watch", Finotify_rm_watch, Sinotify_rm_watch, 1, 1, 0,
offset_intervals (current_buffer, PT, nchars);
if (!inherit && buffer_intervals (current_buffer))
- set_text_properties (make_number (PT), make_number (PT + nchars),
+ set_text_properties (make_fixnum (PT), make_fixnum (PT + nchars),
Qnil, Qnil, Qnil);
adjust_point (nchars, nbytes);
if (preserve_ptr)
{
Lisp_Object preserve_marker;
- preserve_marker = Fcopy_marker (make_number (*preserve_ptr), Qnil);
+ preserve_marker = Fcopy_marker (make_fixnum (*preserve_ptr), Qnil);
verify_interval_modification (current_buffer, start, end);
*preserve_ptr = marker_position (preserve_marker);
unchain_marker (XMARKER (preserve_marker));
#define PRESERVE_VALUE \
if (preserve_ptr && NILP (preserve_marker)) \
- preserve_marker = Fcopy_marker (make_number (*preserve_ptr), Qnil)
+ preserve_marker = Fcopy_marker (make_fixnum (*preserve_ptr), Qnil)
#define RESTORE_VALUE \
if (! NILP (preserve_marker)) \
ptrdiff_t count = SPECPDL_INDEX ();
struct rvoe_arg rvoe_arg;
- start = make_number (start_int);
- end = make_number (end_int);
+ start = make_fixnum (start_int);
+ end = make_fixnum (end_int);
preserve_marker = Qnil;
start_marker = Qnil;
end_marker = Qnil;
/* Actually run the hook functions. */
CALLN (Frun_hook_with_args, Qafter_change_functions,
- make_number (charpos), make_number (charpos + lenins),
- make_number (lendel));
+ make_fixnum (charpos), make_fixnum (charpos + lenins),
+ make_fixnum (lendel));
/* There was no error: unarm the reset_on_error. */
rvoe_arg.errorp = 0;
}
if (buffer_has_overlays ())
- report_overlay_modification (make_number (charpos),
- make_number (charpos + lenins),
+ report_overlay_modification (make_fixnum (charpos),
+ make_fixnum (charpos + lenins),
1,
- make_number (charpos),
- make_number (charpos + lenins),
- make_number (lendel));
+ make_fixnum (charpos),
+ make_fixnum (charpos + lenins),
+ make_fixnum (lendel));
/* After an insertion, call the text properties
insert-behind-hooks or insert-in-front-hooks. */
if (lendel == 0)
- report_interval_modification (make_number (charpos),
- make_number (charpos + lenins));
+ report_interval_modification (make_fixnum (charpos),
+ make_fixnum (charpos + lenins));
unbind_to (count, Qnil);
}
if (!inherit && tree && length > 0)
{
XSETBUFFER (buf, buffer);
- set_text_properties_1 (make_number (position),
- make_number (position + length),
+ set_text_properties_1 (make_fixnum (position),
+ make_fixnum (position + length),
Qnil, buf,
find_interval (tree, position));
}
/* POS + ADJ would be beyond the buffer bounds, so do no adjustment. */
return pos;
- test_pos = make_number (pos + test_offs);
+ test_pos = make_fixnum (pos + test_offs);
invis_propval
= get_char_property_and_overlay (test_pos, Qinvisible, Qnil,
such that an insertion at POS would inherit it. */
&& (NILP (invis_overlay)
/* Invisible property is from a text-property. */
- ? (text_property_stickiness (Qinvisible, make_number (pos), Qnil)
+ ? (text_property_stickiness (Qinvisible, make_fixnum (pos), Qnil)
== (test_offs == 0 ? 1 : -1))
/* Invisible property is from an overlay. */
: (test_offs == 0
if (! NILP (intangible_propval))
{
while (XINT (pos) > BEGV
- && EQ (Fget_char_property (make_number (XINT (pos) - 1),
+ && EQ (Fget_char_property (make_fixnum (XINT (pos) - 1),
Qintangible, Qnil),
intangible_propval))
pos = Fprevious_char_property_change (pos, Qnil);
/* If preceding char is intangible,
skip forward over all chars with matching intangible property. */
- intangible_propval = Fget_char_property (make_number (charpos - 1),
+ intangible_propval = Fget_char_property (make_fixnum (charpos - 1),
Qintangible, Qnil);
if (! NILP (intangible_propval))
enter_after = Qnil;
if (! EQ (leave_before, enter_before) && !NILP (leave_before))
- call2 (leave_before, make_number (old_position),
- make_number (charpos));
+ call2 (leave_before, make_fixnum (old_position),
+ make_fixnum (charpos));
if (! EQ (leave_after, enter_after) && !NILP (leave_after))
- call2 (leave_after, make_number (old_position),
- make_number (charpos));
+ call2 (leave_after, make_fixnum (old_position),
+ make_fixnum (charpos));
if (! EQ (enter_before, leave_before) && !NILP (enter_before))
- call2 (enter_before, make_number (old_position),
- make_number (charpos));
+ call2 (enter_before, make_fixnum (old_position),
+ make_fixnum (charpos));
if (! EQ (enter_after, leave_after) && !NILP (enter_after))
- call2 (enter_after, make_number (old_position),
- make_number (charpos));
+ call2 (enter_after, make_fixnum (old_position),
+ make_fixnum (charpos));
}
}
\f
skip back over all chars with matching intangible property. */
if (! NILP (intangible_propval))
while (XINT (pos) > BEGV
- && EQ (Fget_char_property (make_number (XINT (pos) - 1),
+ && EQ (Fget_char_property (make_fixnum (XINT (pos) - 1),
Qintangible, Qnil),
intangible_propval))
pos = Fprevious_char_property_change (pos, Qnil);
{
/* We want to move backward, so check the text after POSITION. */
- intangible_propval = Fget_char_property (make_number (XINT (pos) - 1),
+ intangible_propval = Fget_char_property (make_fixnum (XINT (pos) - 1),
Qintangible, Qnil);
/* If following char is intangible,
#endif
xsignal (symbol,
list5 (json_build_string (error->text),
- json_build_string (error->source), make_natnum (error->line),
- make_natnum (error->column), make_natnum (error->position)));
+ json_build_string (error->source), make_fixed_natnum (error->line),
+ make_fixed_natnum (error->column), make_fixed_natnum (error->position)));
}
static void
return json_check (json_false ());
else if (EQ (lisp, Qt))
return json_check (json_true ());
- else if (INTEGERP (lisp))
+ else if (FIXNUMP (lisp))
{
CHECK_TYPE_RANGED_INTEGER (json_int_t, lisp);
return json_check (json_integer (XINT (lisp)));
size_t size = json_array_size (json);
if (FIXNUM_OVERFLOW_P (size))
xsignal0 (Qoverflow_error);
- Lisp_Object result = Fmake_vector (make_natnum (size), Qunbound);
+ Lisp_Object result = Fmake_vector (make_fixed_natnum (size), Qunbound);
for (ptrdiff_t i = 0; i < size; ++i)
ASET (result, i,
json_to_lisp (json_array_get (json, i), conf));
if (FIXNUM_OVERFLOW_P (size))
xsignal0 (Qoverflow_error);
result = CALLN (Fmake_hash_table, QCtest, Qequal, QCsize,
- make_natnum (size));
+ make_fixed_natnum (size));
struct Lisp_Hash_Table *h = XHASH_TABLE (result);
const char *key_str;
json_t *value;
echo_keystrokes_p (void)
{
return (FLOATP (Vecho_keystrokes) ? XFLOAT_DATA (Vecho_keystrokes) > 0.0
- : INTEGERP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
+ : FIXNUMP (Vecho_keystrokes) ? XINT (Vecho_keystrokes) > 0
: false);
}
/* If someone has passed us a composite event, use its head symbol. */
c = EVENT_HEAD (c);
- if (INTEGERP (c))
+ if (FIXNUMP (c))
ptr = push_key_description (XINT (c), ptr);
else if (SYMBOLP (c))
{
{
Lisp_Object last_char, prev_char, idx;
- idx = make_number (SCHARS (KVAR (current_kboard, echo_string)) - 2);
+ idx = make_fixnum (SCHARS (KVAR (current_kboard, echo_string)) - 2);
prev_char = Faref (KVAR (current_kboard, echo_string), idx);
- idx = make_number (SCHARS (KVAR (current_kboard, echo_string)) - 1);
+ 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 (STRINGP (es) && SCHARS (es) > nchars)
kset_echo_string (current_kboard,
Fsubstring (KVAR (current_kboard, echo_string),
- make_number (0), make_number (nchars)));
+ make_fixnum (0), make_fixnum (nchars)));
truncate_echo_area (nchars);
}
Vquit_flag = Qnil;
Vinhibit_quit = Qnil;
- return make_number (0);
+ return make_fixnum (0);
}
/* Take actions on handling an error. DATA is the data that describes
print_error_message (data, Qexternal_debugging_output,
SSDATA (context), signal);
Fterpri (Qexternal_debugging_output, Qnil);
- Fkill_emacs (make_number (-1));
+ Fkill_emacs (make_fixnum (-1));
}
else
{
if (minibuf_level
&& !NILP (echo_area_buffer[0])
&& EQ (minibuf_window, echo_area_window)
- && NUMBERP (Vminibuffer_message_timeout))
+ && FIXED_OR_FLOATP (Vminibuffer_message_timeout))
{
/* Bind inhibit-quit to t so that C-g gets read in
rather than quitting back to the minibuffer. */
if (!NILP (Vquit_flag))
{
Vquit_flag = Qnil;
- Vunread_command_events = list1 (make_number (quit_char));
+ Vunread_command_events = list1 (make_fixnum (quit_char));
}
}
/* We don't want to echo the keystrokes while navigating the
menus. */
- specbind (Qecho_keystrokes, make_number (0));
+ specbind (Qecho_keystrokes, make_fixnum (0));
Lisp_Object keybuf[READ_KEY_ELTS];
int i = read_key_sequence (keybuf, Qnil, false, true, true, true);
if (check_display
&& PT > BEGV && PT < ZV
&& !NILP (val = get_char_property_and_overlay
- (make_number (PT), Qdisplay, selected_window,
+ (make_fixnum (PT), Qdisplay, selected_window,
&overlay))
&& display_prop_intangible_p (val, overlay, PT, PT_BYTE)
&& (!OVERLAYP (overlay)
than skip both boundaries. However, this code
also stops anywhere in a non-sticky text-property,
which breaks (e.g.) Org mode. */
- && (val = Fget_pos_property (make_number (end),
+ && (val = Fget_pos_property (make_fixnum (end),
Qinvisible, Qnil),
TEXT_PROP_MEANS_INVISIBLE (val))
#endif
&& !NILP (val = get_char_property_and_overlay
- (make_number (end), Qinvisible, Qnil, &overlay))
+ (make_fixnum (end), Qinvisible, Qnil, &overlay))
&& (inv = TEXT_PROP_MEANS_INVISIBLE (val)))
{
ellipsis = ellipsis || inv > 1
&& (!NILP (Foverlay_get (overlay, Qafter_string))
|| !NILP (Foverlay_get (overlay, Qbefore_string))));
tmp = Fnext_single_char_property_change
- (make_number (end), Qinvisible, Qnil, Qnil);
- end = NATNUMP (tmp) ? XFASTINT (tmp) : ZV;
+ (make_fixnum (end), Qinvisible, Qnil, Qnil);
+ end = FIXNATP (tmp) ? XFASTINT (tmp) : ZV;
}
while (beg > BEGV
#if 0
- && (val = Fget_pos_property (make_number (beg),
+ && (val = Fget_pos_property (make_fixnum (beg),
Qinvisible, Qnil),
TEXT_PROP_MEANS_INVISIBLE (val))
#endif
&& !NILP (val = get_char_property_and_overlay
- (make_number (beg - 1), Qinvisible, Qnil, &overlay))
+ (make_fixnum (beg - 1), Qinvisible, Qnil, &overlay))
&& (inv = TEXT_PROP_MEANS_INVISIBLE (val)))
{
ellipsis = ellipsis || inv > 1
&& (!NILP (Foverlay_get (overlay, Qafter_string))
|| !NILP (Foverlay_get (overlay, Qbefore_string))));
tmp = Fprevious_single_char_property_change
- (make_number (beg), Qinvisible, Qnil, Qnil);
- beg = NATNUMP (tmp) ? XFASTINT (tmp) : BEGV;
+ (make_fixnum (beg), Qinvisible, Qnil, Qnil);
+ beg = FIXNATP (tmp) ? XFASTINT (tmp) : BEGV;
}
/* Move away from the inside area. */
to the other end would mean moving backwards and thus
could lead to an infinite loop. */
;
- else if (val = Fget_pos_property (make_number (PT),
+ else if (val = Fget_pos_property (make_fixnum (PT),
Qinvisible, Qnil),
TEXT_PROP_MEANS_INVISIBLE (val)
&& (val = (Fget_pos_property
- (make_number (PT == beg ? end : beg),
+ (make_fixnum (PT == beg ? end : beg),
Qinvisible, Qnil)),
!TEXT_PROP_MEANS_INVISIBLE (val)))
(check_composition = check_display = true,
stop_other_atimers (poll_timer);
stop_polling ();
- specbind (Qpolling_period, make_number (new));
+ specbind (Qpolling_period, make_fixnum (new));
/* Start a new alarm with the new period. */
start_polling ();
#endif
if (single_kboard)
goto start;
current_kboard = kb;
- return make_number (-2);
+ return make_fixnum (-2);
}
/* Terminate Emacs in batch mode if at eof. */
- if (noninteractive && INTEGERP (c) && XINT (c) < 0)
- Fkill_emacs (make_number (1));
+ if (noninteractive && FIXNUMP (c) && XINT (c) < 0)
+ Fkill_emacs (make_fixnum (1));
- if (INTEGERP (c))
+ if (FIXNUMP (c))
{
/* Add in any extra modifiers, where appropriate. */
if ((extra_keyboard_modifiers & CHAR_CTL)
int meta_key = terminal->display_info.tty->meta_key;
eassert (n < MAX_ENCODED_BYTES);
events[n++] = nextevt;
- if (NATNUMP (nextevt)
+ if (FIXNATP (nextevt)
&& XINT (nextevt) < (meta_key == 1 ? 0x80 : 0x100))
{ /* An encoded byte sequence, let's try to decode it. */
struct coding_system *coding
int i;
if (meta_key != 2)
for (i = 0; i < n; i++)
- events[i] = make_number (XINT (events[i]) & ~0x80);
+ events[i] = make_fixnum (XINT (events[i]) & ~0x80);
}
else
{
eassert (coding->carryover_bytes == 0);
n = 0;
while (n < coding->produced_char)
- events[n++] = make_number (STRING_CHAR_ADVANCE (p));
+ events[n++] = make_fixnum (STRING_CHAR_ADVANCE (p));
}
}
}
/* Undo what read_char_x_menu_prompt did when it unread
additional keys returned by Fx_popup_menu. */
if (CONSP (c)
- && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
+ && (SYMBOLP (XCAR (c)) || FIXNUMP (XCAR (c)))
&& NILP (XCDR (c)))
c = XCAR (c);
additional keys returned by Fx_popup_menu. */
if (CONSP (c)
&& EQ (XCDR (c), Qdisabled)
- && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c))))
+ && (SYMBOLP (XCAR (c)) || FIXNUMP (XCAR (c))))
{
was_disabled = true;
c = XCAR (c);
/* Undo what read_char_x_menu_prompt did when it unread
additional keys returned by Fx_popup_menu. */
if (CONSP (c)
- && (SYMBOLP (XCAR (c)) || INTEGERP (XCAR (c)))
+ && (SYMBOLP (XCAR (c)) || FIXNUMP (XCAR (c)))
&& NILP (XCDR (c)))
c = XCAR (c);
reread = true;
goto exit;
}
- c = Faref (Vexecuting_kbd_macro, make_number (executing_kbd_macro_index));
+ 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));
{
c = read_char_minibuf_menu_prompt (commandflag, map);
- if (INTEGERP (c) && XINT (c) == -2)
+ if (FIXNUMP (c) && XINT (c) == -2)
return c; /* wrong_kboard_jmpbuf */
if (! NILP (c))
XSETCDR (last, list1 (c));
kb->kbd_queue_has_data = true;
current_kboard = kb;
- return make_number (-2); /* wrong_kboard_jmpbuf */
+ return make_fixnum (-2); /* wrong_kboard_jmpbuf */
}
}
goto non_reread;
/* Auto save if enough time goes by without input. */
if (commandflag != 0 && commandflag != -2
&& num_nonmacro_input_events > last_auto_save
- && INTEGERP (Vauto_save_timeout)
+ && FIXNUMP (Vauto_save_timeout)
&& XINT (Vauto_save_timeout) > 0)
{
Lisp_Object tem0;
timeout = delay_level * timeout / 4;
save_getcjmp (save_jump);
restore_getcjmp (local_getcjmp);
- tem0 = sit_for (make_number (timeout), 1, 1);
+ tem0 = sit_for (make_fixnum (timeout), 1, 1);
restore_getcjmp (save_jump);
if (EQ (tem0, Qt)
interpret the next key sequence using the wrong translation
tables and function keymaps. */
if (NILP (c) && current_kboard != orig_kboard)
- return make_number (-2); /* wrong_kboard_jmpbuf */
+ return make_fixnum (-2); /* wrong_kboard_jmpbuf */
/* If this has become non-nil here, it has been set by a timer
or sentinel or filter. */
if (kb->kbd_queue_has_data)
{
current_kboard = kb;
- return make_number (-2); /* wrong_kboard_jmpbuf */
+ return make_fixnum (-2); /* wrong_kboard_jmpbuf */
}
}
goto exit;
}
- if (EQ (c, make_number (-2)))
+ if (EQ (c, make_fixnum (-2)))
return c;
if (CONSP (c) && EQ (XCAR (c), Qt))
/* The command may have changed the keymaps. Pretend there
is input in another keyboard and return. This will
recalculate keymaps. */
- c = make_number (-2);
+ c = make_fixnum (-2);
goto exit;
}
else
}
/* Handle things that only apply to characters. */
- if (INTEGERP (c))
+ if (FIXNUMP (c))
{
/* If kbd_buffer_get_event gave us an EOF, return that. */
if (XINT (c) == -1)
/* Wipe the echo area.
But first, if we are about to use an input method,
save the echo area contents for it to refer to. */
- if (INTEGERP (c)
+ if (FIXNUMP (c)
&& ! NILP (Vinput_method_function)
&& ' ' <= XINT (c) && XINT (c) < 256 && XINT (c) != 127)
{
reread_for_input_method:
from_macro:
/* Pass this to the input method, if appropriate. */
- if (INTEGERP (c)
+ if (FIXNUMP (c)
&& ! NILP (Vinput_method_function)
/* Don't run the input method within a key sequence,
after the first event of the key sequence. */
unbind_to (count, Qnil);
redisplay ();
- if (EQ (c, make_number (040)))
+ if (EQ (c, make_fixnum (040)))
{
cancel_echoing ();
do
if (dribble)
{
block_input ();
- if (INTEGERP (c))
+ if (FIXNUMP (c))
{
if (XUINT (c) < 0x100)
putc_unlocked (XUINT (c), dribble);
{
kset_kbd_queue
(kb, list2 (make_lispy_switch_frame (event->ie.frame_or_window),
- make_number (c)));
+ make_fixnum (c)));
kb->kbd_queue_has_data = true;
union buffered_input_event *sp;
for (sp = kbd_fetch_ptr; sp != kbd_store_ptr; sp++)
vec = XVECTOR (timer)->contents;
if (! NILP (vec[0]))
return 0;
- if (! INTEGERP (vec[2]))
+ if (! FIXNUMP (vec[2]))
return false;
struct lisp_time t;
string = mode_line_string (w, part, &col, &row, &charpos,
&object, &dx, &dy, &width, &height);
if (STRINGP (string))
- string_info = Fcons (string, make_number (charpos));
+ string_info = Fcons (string, make_fixnum (charpos));
textpos = -1;
xret = wx;
string = marginal_area_string (w, part, &col, &row, &charpos,
&object, &dx, &dy, &width, &height);
if (STRINGP (string))
- string_info = Fcons (string, make_number (charpos));
+ string_info = Fcons (string, make_fixnum (charpos));
xret = wx;
yret = wy - WINDOW_HEADER_LINE_HEIGHT (w);
}
if (NILP (posn))
{
- posn = make_number (textpos);
+ posn = make_fixnum (textpos);
if (STRINGP (string2))
string_info = Fcons (string2,
- make_number (CHARPOS (p.string_pos)));
+ make_fixnum (CHARPOS (p.string_pos)));
}
if (NILP (object))
object = object2;
/* Object info. */
extra_info
= list3 (object,
- Fcons (make_number (dx), make_number (dy)),
- Fcons (make_number (width), make_number (height)));
+ Fcons (make_fixnum (dx), make_fixnum (dy)),
+ Fcons (make_fixnum (width), make_fixnum (height)));
/* String info. */
extra_info = Fcons (string_info,
- Fcons (textpos < 0 ? Qnil : make_number (textpos),
- Fcons (Fcons (make_number (col),
- make_number (row)),
+ Fcons (textpos < 0 ? Qnil : make_fixnum (textpos),
+ Fcons (Fcons (make_fixnum (col),
+ make_fixnum (row)),
extra_info)));
}
return Fcons (window_or_frame,
Fcons (posn,
- Fcons (Fcons (make_number (xret),
- make_number (yret)),
- Fcons (make_number (t),
+ Fcons (Fcons (make_fixnum (xret),
+ make_fixnum (yret)),
+ Fcons (make_fixnum (t),
extra_info))));
}
make_scroll_bar_position (struct input_event *ev, Lisp_Object type)
{
return list5 (ev->frame_or_window, type, Fcons (ev->x, ev->y),
- make_number (ev->timestamp),
+ make_fixnum (ev->timestamp),
builtin_lisp_symbol (scroll_bar_parts[ev->part]));
}
Lisp_Object frame = event->frame_or_window;
Lisp_Object object = event->arg;
Lisp_Object position
- = make_number (Time_to_position (event->timestamp));
+ = make_fixnum (Time_to_position (event->timestamp));
Lisp_Object window = event->x;
Lisp_Object help = event->y;
clear_event (event);
/* Make an event (language-change FRAME CODEPAGE LANGUAGE-ID). */
return list4 (Qlanguage_change,
event->frame_or_window,
- make_number (event->code),
- make_number (event->modifiers));
+ make_fixnum (event->code),
+ make_fixnum (event->modifiers));
case MULTIMEDIA_KEY_EVENT:
if (event->code < ARRAYELTS (lispy_multimedia_keys)
position = list4 (event->frame_or_window,
Qmenu_bar,
Fcons (event->x, event->y),
- make_number (event->timestamp));
+ make_fixnum (event->timestamp));
return list2 (item, position);
}
&& (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
&& button_down_time != 0
&& (EQ (Vdouble_click_time, Qt)
- || (NATNUMP (Vdouble_click_time)
+ || (FIXNATP (Vdouble_click_time)
&& (event->timestamp - button_down_time
< XFASTINT (Vdouble_click_time)))));
}
new_down = Fcar (Fcdr (Fcdr (position)));
if (CONSP (down)
- && INTEGERP (XCAR (down)) && INTEGERP (XCDR (down)))
+ && FIXNUMP (XCAR (down)) && FIXNUMP (XCDR (down)))
{
xdiff = XINT (XCAR (new_down)) - XINT (XCAR (down));
ydiff = XINT (XCDR (new_down)) - XINT (XCDR (down));
if (event->modifiers & drag_modifier)
return list3 (head, start_pos, position);
else if (event->modifiers & (double_modifier | triple_modifier))
- return list3 (head, position, make_number (double_click_count));
+ return list3 (head, position, make_fixnum (double_click_count));
else
return list2 (head, position);
}
&& (eabs (XINT (event->y) - last_mouse_y) <= fuzz)
&& button_down_time != 0
&& (EQ (Vdouble_click_time, Qt)
- || (NATNUMP (Vdouble_click_time)
+ || (FIXNATP (Vdouble_click_time)
&& (event->timestamp - button_down_time
< XFASTINT (Vdouble_click_time)))));
if (is_double)
ASIZE (wheel_syms));
}
- if (NUMBERP (event->arg))
- return list4 (head, position, make_number (double_click_count),
+ if (FIXED_OR_FLOATP (event->arg))
+ return list4 (head, position, make_fixnum (double_click_count),
event->arg);
else if (event->modifiers & (double_modifier | triple_modifier))
- return list3 (head, position, make_number (double_click_count));
+ return list3 (head, position, make_fixnum (double_click_count));
else
return list2 (head, position);
}
list5 (bar_window,
Qvertical_scroll_bar,
Fcons (x, y),
- make_number (t),
+ make_fixnum (t),
part_sym));
}
/* Or is it an ordinary mouse movement? */
{
Lisp_Object elements;
- if (INTEGERP (symbol))
+ if (FIXNUMP (symbol))
return list2i (KEY_TO_CHAR (symbol), XINT (symbol) & CHAR_MODIFIER_MASK);
else if (!SYMBOLP (symbol))
return Qnil;
/* Mask out upper bits. We don't know where this value's been. */
modifiers &= INTMASK;
- if (INTEGERP (base))
- return make_number (XINT (base) | modifiers);
+ if (FIXNUMP (base))
+ return make_fixnum (XINT (base) | modifiers);
/* The click modifier never figures into cache indices. */
cache = Fget (base, Qmodifier_cache);
if (SYMBOLP (base) && SCHARS (SYMBOL_NAME (base)) == 1)
XSETINT (base, SREF (SYMBOL_NAME (base), 0));
- if (INTEGERP (base))
+ if (FIXNUMP (base))
{
/* Turn (shift a) into A. */
if ((modifiers & shift_modifier) != 0
/* Turn (control a) into C-a. */
if (modifiers & ctrl_modifier)
- return make_number ((modifiers & ~ctrl_modifier)
+ return make_fixnum ((modifiers & ~ctrl_modifier)
| make_ctrl_char (XINT (base)));
else
- return make_number (modifiers | XINT (base));
+ return make_fixnum (modifiers | XINT (base));
}
else if (SYMBOLP (base))
return apply_modifiers (modifiers, base);
{
Lisp_Object elt;
elt = XCAR (tail);
- if (! (INTEGERP (elt) || SYMBOLP (elt)))
+ if (! (FIXNUMP (elt) || SYMBOLP (elt)))
return 0;
}
if (!NILP (old))
menu_bar_items_vector = old;
else
- menu_bar_items_vector = Fmake_vector (make_number (24), Qnil);
+ menu_bar_items_vector = Fmake_vector (make_fixnum (24), Qnil);
menu_bar_items_index = 0;
/* Build our list of keymaps.
ASET (menu_bar_items_vector, i,
AREF (item_properties, ITEM_PROPERTY_NAME)); i++;
ASET (menu_bar_items_vector, i, list1 (item)); i++;
- ASET (menu_bar_items_vector, i, make_number (0)); i++;
+ ASET (menu_bar_items_vector, i, make_fixnum (0)); i++;
menu_bar_items_index = i;
}
/* We did find an item for this KEY. Add ITEM to its list of maps. */
/* Create item_properties vector if necessary. */
if (NILP (item_properties))
item_properties
- = Fmake_vector (make_number (ITEM_PROPERTY_ENABLE + 1), Qnil);
+ = Fmake_vector (make_fixnum (ITEM_PROPERTY_ENABLE + 1), Qnil);
/* Initialize optional entries. */
for (i = ITEM_PROPERTY_DEF; i < ITEM_PROPERTY_ENABLE; i++)
}
else
tool_bar_item_properties
- = Fmake_vector (make_number (TOOL_BAR_ITEM_NSLOTS), Qnil);
+ = Fmake_vector (make_fixnum (TOOL_BAR_ITEM_NSLOTS), Qnil);
/* Set defaults. */
set_prop (TOOL_BAR_ITEM_KEY, key);
if (VECTORP (reuse))
tool_bar_items_vector = reuse;
else
- tool_bar_items_vector = Fmake_vector (make_number (64), Qnil);
+ tool_bar_items_vector = Fmake_vector (make_fixnum (64), Qnil);
ntool_bar_items = 0;
}
{
record_menu_key (XCAR (tem));
if (SYMBOLP (XCAR (tem))
- || INTEGERP (XCAR (tem)))
+ || FIXNUMP (XCAR (tem)))
XSETCAR (tem, Fcons (XCAR (tem), Qdisabled));
}
}
/* Ignore the element if it has no prompt string. */
- if (INTEGERP (event) && parse_menu_item (elt, -1))
+ if (FIXNUMP (event) && parse_menu_item (elt, -1))
{
/* True if the char to type matches the string. */
bool char_matches;
/* Add as much of string as fits. */
thiswidth = min (SCHARS (desc), width - i);
menu_strings
- = Fcons (Fsubstring (desc, make_number (0),
- make_number (thiswidth)),
+ = Fcons (Fsubstring (desc, make_fixnum (0),
+ make_fixnum (thiswidth)),
menu_strings);
i += thiswidth;
PUSH_C_STR (" = ", menu_strings);
/* Add as much of string as fits. */
thiswidth = min (SCHARS (s), width - i);
menu_strings
- = Fcons (Fsubstring (s, make_number (0),
- make_number (thiswidth)),
+ = Fcons (Fsubstring (s, make_fixnum (0),
+ make_fixnum (thiswidth)),
menu_strings);
i += thiswidth;
}
while (BUFFERP (obj));
kset_defining_kbd_macro (current_kboard, orig_defn_macro);
- if (!INTEGERP (obj) || XINT (obj) == -2
+ if (!FIXNUMP (obj) || XINT (obj) == -2
|| (! EQ (obj, menu_prompt_more_char)
- && (!INTEGERP (menu_prompt_more_char)
- || ! EQ (obj, make_number (Ctl (XINT (menu_prompt_more_char)))))))
+ && (!FIXNUMP (menu_prompt_more_char)
+ || ! EQ (obj, make_fixnum (Ctl (XINT (menu_prompt_more_char)))))))
{
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
store_kbd_macro_char (obj);
/* Overwrite the old keys with the new ones. */
for (i = 0; i < len; i++)
keybuf[fkey->start + i]
- = Faref (next, make_number (i));
+ = Faref (next, make_fixnum (i));
fkey->start = fkey->end += *diff;
fkey->map = fkey->parent;
current_binding, last_nonmenu_event,
&used_mouse_menu, NULL);
used_mouse_menu_history[t] = used_mouse_menu;
- if ((INTEGERP (key) && XINT (key) == -2) /* wrong_kboard_jmpbuf */
+ if ((FIXNUMP (key) && XINT (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'
/* 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 (INTEGERP (key) && XINT (key) == -1)
+ if (FIXNUMP (key) && XINT (key) == -1)
{
t = 0;
/* The Microsoft C compiler can't handle the goto that
/* If we have a quit that was typed in another frame, and
quit_throw_to_read_char switched buffers,
replay to get the right keymap. */
- if (INTEGERP (key)
+ if (FIXNUMP (key)
&& XINT (key) == quit_char
&& current_buffer != starting_buffer)
{
use the corresponding lower-case letter instead. */
if (NILP (current_binding)
&& /* indec.start >= t && fkey.start >= t && */ keytran.start >= t
- && INTEGERP (key))
+ && FIXNUMP (key))
{
Lisp_Object new_key;
EMACS_INT k = XINT (key);
if (k & shift_modifier)
XSETINT (new_key, k & ~shift_modifier);
- else if (CHARACTERP (make_number (k & ~CHAR_MODIFIER_MASK)))
+ else if (CHARACTERP (make_fixnum (k & ~CHAR_MODIFIER_MASK)))
{
int dc = downcase (k & ~CHAR_MODIFIER_MASK);
if (dc == (k & ~CHAR_MODIFIER_MASK))
if (modifiers & shift_modifier
/* Treat uppercase keys as shifted. */
- || (INTEGERP (key)
+ || (FIXNUMP (key)
&& (KEY_TO_CHAR (key)
< XCHAR_TABLE (BVAR (current_buffer, downcase_table))->header.size)
&& uppercasep (KEY_TO_CHAR (key))))
= (modifiers & shift_modifier
? apply_modifiers (modifiers & ~shift_modifier,
XCAR (breakdown))
- : make_number (downcase (KEY_TO_CHAR (key)) | modifiers));
+ : make_fixnum (downcase (KEY_TO_CHAR (key)) | modifiers));
original_uppercase = key;
original_uppercase_position = t - 1;
/* Kludge alert: this makes M-x be in the form expected by
novice.el. (248 is \370, a.k.a. "Meta-x".) Any better ideas? */
if (key0 == 248)
- add_command_key (make_number ('x' | meta_modifier));
+ add_command_key (make_fixnum ('x' | meta_modifier));
else
- add_command_key (make_number (key0));
+ add_command_key (make_fixnum (key0));
for (ptrdiff_t i = 1; i < SCHARS (keys); i++)
{
int key_i;
FETCH_STRING_CHAR_ADVANCE (key_i, keys, charidx, byteidx);
if (CHAR_BYTE8_P (key_i))
key_i = CHAR_TO_BYTE8 (key_i);
- add_command_key (make_number (key_i));
+ add_command_key (make_fixnum (key_i));
}
return Qnil;
}
{
EMACS_INT sum;
INT_ADD_WRAPV (command_loop_level, minibuf_level, &sum);
- return make_number (sum);
+ return make_fixnum (sum);
}
DEFUN ("open-dribble-file", Fopen_dribble_file, Sopen_dribble_file, 1, 1,
return Qnil;
tty = t->display_info.tty;
- if (NILP (quit) || !INTEGERP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)
+ if (NILP (quit) || !FIXNUMP (quit) || XINT (quit) < 0 || XINT (quit) > 0400)
error ("QUIT must be an ASCII character");
#ifndef DOS_NT
{
flow = FRAME_TTY (sf)->flow_control ? Qt : Qnil;
meta = (FRAME_TTY (sf)->meta_key == 2
- ? make_number (0)
+ ? make_fixnum (0)
: (CURTTY ()->meta_key == 1 ? Qt : Qnil));
}
else
flow = Qnil;
meta = Qt;
}
- Lisp_Object quit = make_number (quit_char);
+ Lisp_Object quit = make_fixnum (quit_char);
return list4 (interrupt, flow, meta, quit);
}
The `posn-' functions access elements of such lists. */)
(Lisp_Object x, Lisp_Object y, Lisp_Object frame_or_window, Lisp_Object whole)
{
- CHECK_NUMBER (x);
+ 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)
- CHECK_NATNUM (x);
- CHECK_NATNUM (y);
+ CHECK_FIXNAT (x);
+ CHECK_FIXNAT (y);
if (NILP (frame_or_window))
frame_or_window = selected_window;
{
int rtop = XINT (XCAR (aux_info));
- y = make_number (y_coord + rtop);
+ y = make_fixnum (y_coord + rtop);
}
tem = Fposn_at_x_y (x, y, window, Qnil);
}
}
}
- button_down_location = Fmake_vector (make_number (5), Qnil);
+ button_down_location = Fmake_vector (make_fixnum (5), Qnil);
staticpro (&button_down_location);
- mouse_syms = Fmake_vector (make_number (5), Qnil);
+ mouse_syms = Fmake_vector (make_fixnum (5), Qnil);
staticpro (&mouse_syms);
- wheel_syms = Fmake_vector (make_number (ARRAYELTS (lispy_wheel_names)),
+ wheel_syms = Fmake_vector (make_fixnum (ARRAYELTS (lispy_wheel_names)),
Qnil);
staticpro (&wheel_syms);
int i;
int len = ARRAYELTS (modifier_names);
- modifier_symbols = Fmake_vector (make_number (len), Qnil);
+ modifier_symbols = Fmake_vector (make_fixnum (len), Qnil);
for (i = 0; i < len; i++)
if (modifier_names[i])
ASET (modifier_symbols, i, intern_c_string (modifier_names[i]));
staticpro (&modifier_symbols);
}
- recent_keys = Fmake_vector (make_number (NUM_RECENT_KEYS), Qnil);
+ recent_keys = Fmake_vector (make_fixnum (NUM_RECENT_KEYS), Qnil);
staticpro (&recent_keys);
- this_command_keys = Fmake_vector (make_number (40), Qnil);
+ this_command_keys = Fmake_vector (make_fixnum (40), Qnil);
staticpro (&this_command_keys);
- raw_keybuf = Fmake_vector (make_number (30), Qnil);
+ raw_keybuf = Fmake_vector (make_fixnum (30), Qnil);
staticpro (&raw_keybuf);
DEFSYM (Qcommand_execute, "command-execute");
doc: /* Nonzero means echo unfinished commands after this many seconds of pause.
The value may be integer or floating point.
If the value is zero, don't echo at all. */);
- Vecho_keystrokes = make_number (1);
+ Vecho_keystrokes = make_fixnum (1);
DEFVAR_INT ("polling-period", polling_period,
doc: /* Interval between polling for input during Lisp execution.
Measured in milliseconds. The value nil means disable double-click
recognition; t means double-clicks have no time limit and are detected
by position only. */);
- Vdouble_click_time = make_number (500);
+ Vdouble_click_time = make_fixnum (500);
DEFVAR_INT ("double-click-fuzz", double_click_fuzz,
doc: /* Maximum mouse movement between clicks to make a double-click.
doc: /* How long to display an echo-area message when the minibuffer is active.
If the value is a number, it should be specified in seconds.
If the value is not a number, such messages never time out. */);
- Vminibuffer_message_timeout = make_number (2);
+ Vminibuffer_message_timeout = make_fixnum (2);
DEFVAR_LISP ("throw-on-input", Vthrow_on_input,
doc: /* If non-nil, any keyboard input throws to this symbol.
#define EVENT_END(event) (CAR_SAFE (CDR_SAFE (CDR_SAFE (event))))
/* Extract the click count from a multi-click event. */
-#define EVENT_CLICK_COUNT(event) (Fnth (make_number (2), (event)))
+#define EVENT_CLICK_COUNT(event) (Fnth (make_fixnum (2), (event)))
/* Extract the fields of a position. */
#define POSN_WINDOW(posn) (CAR_SAFE (posn))
#define POSN_SET_POSN(posn,x) (XSETCAR (XCDR (posn), (x)))
#define POSN_WINDOW_POSN(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (posn))))
#define POSN_TIMESTAMP(posn) (CAR_SAFE (CDR_SAFE (CDR_SAFE (CDR_SAFE (posn)))))
-#define POSN_SCROLLBAR_PART(posn) (Fnth (make_number (4), (posn)))
+#define POSN_SCROLLBAR_PART(posn) (Fnth (make_fixnum (4), (posn)))
/* A cons (STRING . STRING-CHARPOS), or nil in mouse-click events.
It's a cons if the click is over a string in the mode line. */
-#define POSN_STRING(posn) (Fnth (make_number (4), (posn)))
+#define POSN_STRING(posn) (Fnth (make_fixnum (4), (posn)))
/* If POSN_STRING is nil, event refers to buffer location. */
#define POSN_INBUFFER_P(posn) (NILP (POSN_STRING (posn)))
-#define POSN_BUFFER_POSN(posn) (Fnth (make_number (5), (posn)))
+#define POSN_BUFFER_POSN(posn) (Fnth (make_fixnum (5), (posn)))
/* Getting the kind of an event head. */
#define EVENT_HEAD_KIND(event_head) \
void
initial_define_key (Lisp_Object keymap, int key, const char *defname)
{
- store_in_keymap (keymap, make_number (key), intern_c_string (defname));
+ store_in_keymap (keymap, make_fixnum (key), intern_c_string (defname));
}
void
{
Lisp_Object tail;
- tail = Fnth (make_number (4), tem);
+ tail = Fnth (make_fixnum (4), tem);
if (EQ (tail, Qkeymap))
{
if (autoload)
be put in the canonical order. */
if (SYMBOLP (idx))
idx = reorder_modifiers (idx);
- else if (INTEGERP (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)));
/* Handle the special meta -> esc mapping. */
- if (INTEGERP (idx) && XFASTINT (idx) & meta_modifier)
+ if (FIXNUMP (idx) && XFASTINT (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. */
/* A strange value in which Meta is set would cause
infinite recursion. Protect against that. */
if (XINT (meta_prefix_char) & CHAR_META)
- meta_prefix_char = make_number (27);
+ meta_prefix_char = make_fixnum (27);
event_meta_binding = access_keymap_1 (map, meta_prefix_char, t_ok,
noinherit, autoload);
event_meta_map = get_keymap (event_meta_binding, 0, autoload);
if (CONSP (event_meta_map))
{
map = event_meta_map;
- idx = make_number (XFASTINT (idx) & ~meta_modifier);
+ idx = make_fixnum (XFASTINT (idx) & ~meta_modifier);
}
else if (t_ok)
/* Set IDX to t, so that we only find a default binding. */
}
else if (VECTORP (binding))
{
- if (INTEGERP (idx) && XFASTINT (idx) < ASIZE (binding))
+ if (FIXNUMP (idx) && XFASTINT (idx) < ASIZE (binding))
val = AREF (binding, XFASTINT (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 (INTEGERP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
+ if (FIXNUMP (idx) && (XFASTINT (idx) & CHAR_MODIFIER_MASK) == 0)
{
val = Faref (binding, idx);
/* nil has a special meaning for char-tables, so
be put in the canonical order. */
if (SYMBOLP (idx))
idx = reorder_modifiers (idx);
- else if (INTEGERP (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)));
elt = XCAR (tail);
if (VECTORP (elt))
{
- if (NATNUMP (idx) && XFASTINT (idx) < ASIZE (elt))
+ if (FIXNATP (idx) && XFASTINT (idx) < ASIZE (elt))
{
CHECK_IMPURE (elt, XVECTOR (elt));
ASET (elt, XFASTINT (idx), def);
/* Character codes with modifiers
are not included in a char-table.
All character codes without modifiers are included. */
- if (NATNUMP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK))
+ if (FIXNATP (idx) && !(XFASTINT (idx) & CHAR_MODIFIER_MASK))
{
Faset (elt, idx,
/* nil has a special meaning for char-tables, so
if (VECTORP (def) && ASIZE (def) > 0 && CONSP (AREF (def, 0)))
{ /* DEF is apparently an XEmacs-style keyboard macro. */
- Lisp_Object tmp = Fmake_vector (make_number (ASIZE (def)), Qnil);
+ Lisp_Object tmp = Fmake_vector (make_fixnum (ASIZE (def)), Qnil);
ptrdiff_t i = ASIZE (def);
while (--i >= 0)
{
idx = 0;
while (1)
{
- c = Faref (key, make_number (idx));
+ c = Faref (key, make_fixnum (idx));
if (CONSP (c))
{
if (SYMBOLP (c))
silly_event_symbol_error (c);
- if (INTEGERP (c)
+ if (FIXNUMP (c)
&& (XINT (c) & meta_bit)
&& !metized)
{
}
else
{
- if (INTEGERP (c))
+ if (FIXNUMP (c))
XSETINT (c, XINT (c) & ~meta_bit);
metized = 0;
idx++;
}
- if (!INTEGERP (c) && !SYMBOLP (c)
+ if (!FIXNUMP (c) && !SYMBOLP (c)
&& (!CONSP (c)
/* If C is a range, it must be a leaf. */
- || (INTEGERP (XCAR (c)) && idx != length)))
+ || (FIXNUMP (XCAR (c)) && idx != length)))
message_with_string ("Key sequence contains invalid event %s", c, 1);
if (idx == length)
error; key might be a vector, not a string. */
error ("Key sequence %s starts with non-prefix key %s%s",
SDATA (Fkey_description (key, Qnil)),
- SDATA (Fkey_description (Fsubstring (key, make_number (0),
- make_number (idx)),
+ SDATA (Fkey_description (Fsubstring (key, make_fixnum (0),
+ make_fixnum (idx)),
Qnil)),
trailing_esc);
}
else
command = Flookup_key (Fcons (Qkeymap, keymaps),
command_remapping_vector, Qnil);
- return INTEGERP (command) ? Qnil : command;
+ return FIXNUMP (command) ? Qnil : command;
}
/* Value is number if KEY is too long; nil if valid but has no definition. */
idx = 0;
while (1)
{
- c = Faref (key, make_number (idx++));
+ c = Faref (key, make_fixnum (idx++));
if (CONSP (c) && lucid_event_type_list_p (c))
c = Fevent_convert_list (c);
/* Allow string since binding for `menu-bar-select-buffer'
includes the buffer name in the key sequence. */
- if (!INTEGERP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c))
+ if (!FIXNUMP (c) && !SYMBOLP (c) && !CONSP (c) && !STRINGP (c))
message_with_string ("Key sequence contains invalid event %s", c, 1);
cmd = access_keymap (keymap, c, t_ok, 0, 1);
keymap = get_keymap (cmd, 0, 1);
if (!CONSP (keymap))
- return make_number (idx);
+ return make_fixnum (idx);
maybe_quit ();
}
static ptrdiff_t
click_position (Lisp_Object position)
{
- EMACS_INT pos = (INTEGERP (position) ? XINT (position)
+ EMACS_INT pos = (FIXNUMP (position) ? XINT (position)
: MARKERP (position) ? marker_position (position)
: PT);
if (! (BEGV <= pos && pos <= ZV))
Lisp_Object pos;
pos = POSN_BUFFER_POSN (position);
- if (INTEGERP (pos)
+ if (FIXNUMP (pos)
&& XINT (pos) >= BEG && XINT (pos) <= Z)
{
local_map = get_local_map (XINT (pos),
pos = XCDR (string);
string = XCAR (string);
- if (INTEGERP (pos)
+ if (FIXNUMP (pos)
&& XINT (pos) >= 0
&& XINT (pos) < SCHARS (string))
{
value = Flookup_key (Fcons (Qkeymap, Fcurrent_active_maps (Qt, position)),
key, accept_default);
- if (NILP (value) || INTEGERP (value))
+ if (NILP (value) || FIXNUMP (value))
return Qnil;
/* If the result of the ordinary keymap lookup is an interactive
for (i = j = 0; i < nmaps; i++)
if (!NILP (maps[i])
&& !NILP (binding = Flookup_key (maps[i], key, accept_default))
- && !INTEGERP (binding))
+ && !FIXNUMP (binding))
{
if (KEYMAPP (binding))
maps[j++] = Fcons (modes[i], binding);
Lisp_Object maps = d->maps;
Lisp_Object tail = d->tail;
Lisp_Object thisseq = d->thisseq;
- bool is_metized = d->is_metized && INTEGERP (key);
+ bool is_metized = d->is_metized && FIXNUMP (key);
Lisp_Object tem;
cmd = get_keymap (get_keyelt (cmd, 0), 0, 0);
if (lim <= XINT (Flength (thisseq)))
{ /* This keymap was already seen with a smaller prefix. */
ptrdiff_t i = 0;
- while (i < lim && EQ (Faref (prefix, make_number (i)),
- Faref (thisseq, make_number (i))))
+ while (i < lim && EQ (Faref (prefix, make_fixnum (i)),
+ Faref (thisseq, make_fixnum (i))))
i++;
if (i >= lim)
/* `prefix' is a prefix of `thisseq' => there's a cycle. */
if (is_metized)
{
int meta_bit = meta_modifier;
- Lisp_Object last = make_number (XINT (Flength (thisseq)) - 1);
+ Lisp_Object last = make_fixnum (XINT (Flength (thisseq)) - 1);
tem = Fcopy_sequence (thisseq);
- Faset (tem, last, make_number (XINT (key) | meta_bit));
+ Faset (tem, last, make_fixnum (XINT (key) | meta_bit));
/* This new sequence is the same length as
thisseq, so stick it in the list right
int i, i_byte, c;
Lisp_Object copy;
- copy = Fmake_vector (make_number (SCHARS (prefix)), Qnil);
+ copy = Fmake_vector (make_fixnum (SCHARS (prefix)), Qnil);
for (i = 0, i_byte = 0; i < SCHARS (prefix);)
{
int i_before = i;
FETCH_STRING_CHAR_ADVANCE (c, prefix, i, i_byte);
if (SINGLE_BYTE_CHAR_P (c) && (c & 0200))
c ^= 0200 | meta_modifier;
- ASET (copy, i_before, make_number (c));
+ ASET (copy, i_before, make_fixnum (c));
}
prefix = copy;
}
data.thisseq = Fcar (XCAR (tail));
data.maps = maps;
data.tail = tail;
- last = make_number (XINT (Flength (data.thisseq)) - 1);
+ last = make_fixnum (XINT (Flength (data.thisseq)) - 1);
/* Does the current sequence end in the meta-prefix-char? */
data.is_metized = (XINT (last) >= 0
/* Don't metize the last char of PREFIX. */
if (add_meta)
{
- if (!INTEGERP (key)
+ if (!FIXNUMP (key)
|| EQ (key, meta_prefix_char)
|| (XINT (key) & meta_modifier))
{
c2 = c & ~(alt_modifier | ctrl_modifier | hyper_modifier
| meta_modifier | shift_modifier | super_modifier);
- if (! CHARACTERP (make_number (c2)))
+ if (! CHARACTERP (make_fixnum (c2)))
{
/* KEY_DESCRIPTION_SIZE is large enough for this. */
p += sprintf (p, "[%d]", c);
if (CONSP (key) && lucid_event_type_list_p (key))
key = Fevent_convert_list (key);
- if (CONSP (key) && INTEGERP (XCAR (key)) && INTEGERP (XCDR (key)))
+ if (CONSP (key) && FIXNUMP (XCAR (key)) && FIXNUMP (XCDR (key)))
/* An interval from a map-char-table. */
{
AUTO_STRING (dot_dot, "..");
key = EVENT_HEAD (key);
- if (INTEGERP (key)) /* Normal character. */
+ if (FIXNUMP (key)) /* Normal character. */
{
char tem[KEY_DESCRIPTION_SIZE];
char *p = push_key_description (XINT (key), tem);
XSETFASTINT (ii, i);
elt = Faref (seq, ii);
- if (!INTEGERP (elt))
+ if (!FIXNUMP (elt))
return 0;
else
{
for (tail = shadow; CONSP (tail); tail = XCDR (tail))
{
value = Flookup_key (XCAR (tail), key, flag);
- if (NATNUMP (value))
+ if (FIXNATP (value))
{
value = Flookup_key (XCAR (tail),
- Fsubstring (key, make_number (0), value), flag);
+ Fsubstring (key, make_fixnum (0), value), flag);
if (!NILP (value))
return Qnil;
}
this = Fcar (XCAR (maps));
map = Fcdr (XCAR (maps));
- last = make_number (XINT (Flength (this)) - 1);
+ last = make_fixnum (XINT (Flength (this)) - 1);
last_is_meta = (XINT (last) >= 0
&& EQ (Faref (this, last), meta_prefix_char));
/* if (nomenus && !preferred_sequence_p (this)) */
if (nomenus && XINT (last) >= 0
- && SYMBOLP (tem = Faref (this, make_number (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
keymaps bound to `menu-bar' and `tool-bar' and other
if (! NILP (sequence))
{
Lisp_Object tem1;
- tem1 = Faref (sequence, make_number (ASIZE (sequence) - 1));
+ tem1 = Faref (sequence, make_fixnum (ASIZE (sequence) - 1));
if (STRINGP (tem1))
- Faset (sequence, make_number (ASIZE (sequence) - 1),
+ Faset (sequence, make_fixnum (ASIZE (sequence) - 1),
build_string ("(any string)"));
}
return;
/* We have found a match. Construct the key sequence where we found it. */
- if (INTEGERP (key) && last_is_meta)
+ if (FIXNUMP (key) && last_is_meta)
{
sequence = Fcopy_sequence (this);
- Faset (sequence, last, make_number (XINT (key) | meta_modifier));
+ Faset (sequence, last, make_fixnum (XINT (key) | meta_modifier));
}
else
{
bufend = push_key_description (translate[c], buf);
insert (buf, bufend - buf);
- Findent_to (make_number (16), make_number (1));
+ Findent_to (make_fixnum (16), make_fixnum (1));
bufend = push_key_description (c, buf);
insert (buf, bufend - buf);
elt_prefix = Fcar (elt);
if (ASIZE (elt_prefix) >= 1)
{
- tem = Faref (elt_prefix, make_number (0));
+ tem = Faref (elt_prefix, make_fixnum (0));
if (EQ (tem, Qmenu_bar))
maps = Fdelq (elt, maps);
}
else
{
shmap = Flookup_key (shmap, Fcar (elt), Qt);
- if (INTEGERP (shmap))
+ if (FIXNUMP (shmap))
shmap = Qnil;
}
else
description_column = 16;
- Findent_to (make_number (description_column), make_number (1));
+ Findent_to (make_fixnum (description_column), make_fixnum (1));
previous_description_column = description_column;
if (SYMBOLP (definition))
{
register Lisp_Object tem1;
- Findent_to (make_number (16), make_number (1));
+ Findent_to (make_fixnum (16), make_fixnum (1));
if (SYMBOLP (definition))
{
describe_map_compare (const void *aa, const void *bb)
{
const struct describe_map_elt *a = aa, *b = bb;
- if (INTEGERP (a->event) && INTEGERP (b->event))
+ if (FIXNUMP (a->event) && FIXNUMP (b->event))
return ((XINT (a->event) > XINT (b->event))
- (XINT (a->event) < XINT (b->event)));
- if (!INTEGERP (a->event) && INTEGERP (b->event))
+ if (!FIXNUMP (a->event) && FIXNUMP (b->event))
return 1;
- if (INTEGERP (a->event) && !INTEGERP (b->event))
+ if (FIXNUMP (a->event) && !FIXNUMP (b->event))
return -1;
if (SYMBOLP (a->event) && SYMBOLP (b->event))
return (!NILP (Fstring_lessp (a->event, b->event)) ? -1
/* This vector gets used to present single keys to Flookup_key. Since
that is done once per keymap element, we don't want to cons up a
fresh vector every time. */
- kludge = Fmake_vector (make_number (1), Qnil);
+ kludge = Fmake_vector (make_fixnum (1), Qnil);
definition = Qnil;
map = call1 (Qkeymap_canonicalize, map);
/* Ignore bindings whose "prefix" are not really valid events.
(We get these in the frames and buffers menu.) */
- if (!(SYMBOLP (event) || INTEGERP (event)))
+ if (!(SYMBOLP (event) || FIXNUMP (event)))
continue;
if (nomenu && EQ (event, Qmenu_bar))
definition = vect[i].definition;
/* Find consecutive chars that are identically defined. */
- if (INTEGERP (vect[i].event))
+ if (FIXNUMP (vect[i].event))
{
while (i + 1 < slots_used
- && EQ (vect[i+1].event, make_number (XINT (vect[i].event) + 1))
+ && EQ (vect[i+1].event, make_fixnum (XINT (vect[i].event) + 1))
&& !NILP (Fequal (vect[i + 1].definition, definition))
&& vect[i].shadowed == vect[i + 1].shadowed)
i++;
static void
describe_vector_princ (Lisp_Object elt, Lisp_Object fun)
{
- Findent_to (make_number (16), make_number (1));
+ Findent_to (make_fixnum (16), make_fixnum (1));
call1 (fun, elt);
Fterpri (Qnil, Qnil);
}
/* This vector gets used to present single keys to Flookup_key. Since
that is done once per vector element, we don't want to cons up a
fresh vector every time. */
- kludge = Fmake_vector (make_number (1), Qnil);
+ kludge = Fmake_vector (make_fixnum (1), Qnil);
if (partial)
suppress = intern ("suppress-keymap");
if (!NILP (tem)) continue;
}
- character = make_number (starting_i);
+ character = make_fixnum (starting_i);
ASET (kludge, 0, character);
/* If this binding is shadowed by some other map, ignore it. */
{
insert (" .. ", 4);
- ASET (kludge, 0, make_number (i));
+ ASET (kludge, 0, make_fixnum (i));
if (!NILP (elt_prefix))
insert1 (elt_prefix);
/* Now we are ready to set up this property, so we can
create char tables. */
- Fput (Qkeymap, Qchar_table_extra_slots, make_number (0));
+ Fput (Qkeymap, Qchar_table_extra_slots, make_fixnum (0));
/* Initialize the keymaps standardly used.
Each one is the value of a Lisp variable, and is also
DEFSYM (Qremap, "remap");
DEFSYM (QCadvertised_binding, ":advertised-binding");
- command_remapping_vector = Fmake_vector (make_number (2), Qremap);
+ command_remapping_vector = Fmake_vector (make_fixnum (2), Qremap);
staticpro (&command_remapping_vector);
where_is_cache_keymaps = Qt;
result = Fcons
(list5 (/* inode. */
- Fnth (make_number (11), XCAR (dl)),
+ Fnth (make_fixnum (11), XCAR (dl)),
/* filename. */
XCAR (XCAR (dl)),
/* last modification time. */
- Fnth (make_number (6), XCAR (dl)),
+ Fnth (make_fixnum (6), XCAR (dl)),
/* last status change time. */
- Fnth (make_number (7), XCAR (dl)),
+ Fnth (make_fixnum (7), XCAR (dl)),
/* size. */
- Fnth (make_number (8), XCAR (dl))),
+ Fnth (make_fixnum (8), XCAR (dl))),
result);
}
return result;
struct input_event event;
/* Check, whether all actions shall be monitored. */
- flags = Fnth (make_number (2), watch_object);
+ flags = Fnth (make_fixnum (2), watch_object);
action = actions;
do {
if (NILP (action))
NILP (file1)
? Fcons (file, Qnil)
: list2 (file, file1))),
- Fnth (make_number (3), watch_object));
+ Fnth (make_fixnum (3), watch_object));
kbd_buffer_store_event (&event);
}
}
pending_dl = Qnil;
deleted_dl = Qnil;
- old_directory_files = Fnth (make_number (4), watch_object);
+ old_directory_files = Fnth (make_fixnum (4), watch_object);
old_dl = kqueue_directory_listing (old_directory_files);
/* When the directory is not accessible anymore, it has been deleted. */
if (strcmp (SSDATA (XCAR (XCDR (old_entry))),
SSDATA (XCAR (XCDR (new_entry)))) == 0) {
/* Modification time has been changed, the file has been written. */
- if (NILP (Fequal (Fnth (make_number (2), old_entry),
- Fnth (make_number (2), new_entry))))
+ if (NILP (Fequal (Fnth (make_fixnum (2), old_entry),
+ Fnth (make_fixnum (2), new_entry))))
kqueue_generate_event
(watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (old_entry)), Qnil);
/* Status change time has been changed, the file attributes
have changed. */
- if (NILP (Fequal (Fnth (make_number (3), old_entry),
- Fnth (make_number (3), new_entry))))
+ if (NILP (Fequal (Fnth (make_fixnum (3), old_entry),
+ Fnth (make_fixnum (3), new_entry))))
kqueue_generate_event
(watch_object, Fcons (Qattrib, Qnil),
XCAR (XCDR (old_entry)), Qnil);
(watch_object, Fcons (Qcreate, Qnil), XCAR (XCDR (entry)), Qnil);
/* Check size of that file. */
- Lisp_Object size = Fnth (make_number (4), entry);
+ Lisp_Object size = Fnth (make_fixnum (4), entry);
if (FLOATP (size) || (XINT (size) > 0))
kqueue_generate_event
(watch_object, Fcons (Qwrite, Qnil), XCAR (XCDR (entry)), Qnil);
report_file_error ("Pending events list not empty", pending_dl);
/* Replace old directory listing with the new one. */
- XSETCDR (Fnthcdr (make_number (3), watch_object),
+ XSETCDR (Fnthcdr (make_fixnum (3), watch_object),
Fcons (new_directory_files, Qnil));
return;
}
}
/* Determine descriptor and file name. */
- descriptor = make_number (kev.ident);
+ descriptor = make_fixnum (kev.ident);
watch_object = assq_no_quit (descriptor, watch_list);
if (CONSP (watch_object))
file = XCAR (XCDR (watch_object));
actions = Fcons (Qdelete, actions);
if (kev.fflags & NOTE_WRITE) {
/* Check, whether this is a directory event. */
- if (NILP (Fnth (make_number (4), watch_object)))
+ if (NILP (Fnth (make_fixnum (4), watch_object)))
actions = Fcons (Qwrite, actions);
else
kqueue_compare_dir_list (watch_object);
}
/* Store watch object in watch list. */
- Lisp_Object watch_descriptor = make_number (fd);
+ Lisp_Object watch_descriptor = make_fixnum (fd);
if (NILP (Ffile_directory_p (file)))
watch_object = list4 (watch_descriptor, file, flags, callback);
else {
xsignal2 (Qfile_notify_error, build_string ("Not a watch descriptor"),
watch_descriptor);
- eassert (INTEGERP (watch_descriptor));
+ eassert (FIXNUMP (watch_descriptor));
int fd = XINT (watch_descriptor);
if ( fd >= 0)
emacs_close (fd);
parse_lab_list (Lisp_Object lab_list, cmsCIELab *color)
{
#define PARSE_LAB_LIST_FIELD(field) \
- if (CONSP (lab_list) && NUMBERP (XCAR (lab_list))) \
+ if (CONSP (lab_list) && FIXED_OR_FLOATP (XCAR (lab_list))) \
{ \
color->field = XFLOATINT (XCAR (lab_list)); \
lab_list = XCDR (lab_list); \
signal_error ("Invalid color", color1);
if (NILP (kL))
Kl = 1.0f;
- else if (!(NUMBERP (kL) && (Kl = XFLOATINT(kL))))
+ else if (!(FIXED_OR_FLOATP (kL) && (Kl = XFLOATINT(kL))))
wrong_type_argument(Qnumberp, kL);
if (NILP (kC))
Kc = 1.0f;
- else if (!(NUMBERP (kC) && (Kc = XFLOATINT(kC))))
+ else if (!(FIXED_OR_FLOATP (kC) && (Kc = XFLOATINT(kC))))
wrong_type_argument(Qnumberp, kC);
if (NILP (kL))
Kh = 1.0f;
- else if (!(NUMBERP (kH) && (Kh = XFLOATINT(kH))))
+ else if (!(FIXED_OR_FLOATP (kH) && (Kh = XFLOATINT(kH))))
wrong_type_argument(Qnumberp, kH);
return make_float (cmsCIE2000DeltaE (&Lab1, &Lab2, Kl, Kc, Kh));
parse_xyz_list (Lisp_Object xyz_list, cmsCIEXYZ *color)
{
#define PARSE_XYZ_LIST_FIELD(field) \
- if (CONSP (xyz_list) && NUMBERP (XCAR (xyz_list))) \
+ if (CONSP (xyz_list) && FIXED_OR_FLOATP (XCAR (xyz_list))) \
{ \
color->field = 100.0 * XFLOATINT (XCAR (xyz_list)); \
xyz_list = XCDR (xyz_list); \
parse_jch_list (Lisp_Object jch_list, cmsJCh *color)
{
#define PARSE_JCH_LIST_FIELD(field) \
- if (CONSP (jch_list) && NUMBERP (XCAR (jch_list))) \
+ if (CONSP (jch_list) && FIXED_OR_FLOATP (XCAR (jch_list))) \
{ \
color->field = XFLOATINT (XCAR (jch_list)); \
jch_list = XCDR (jch_list); \
parse_jab_list (Lisp_Object jab_list, lcmsJab_t *color)
{
#define PARSE_JAB_LIST_FIELD(field) \
- if (CONSP (jab_list) && NUMBERP (XCAR (jab_list))) \
+ if (CONSP (jab_list) && FIXED_OR_FLOATP (XCAR (jab_list))) \
{ \
color->field = XFLOATINT (XCAR (jab_list)); \
jab_list = XCDR (jab_list); \
cmsViewingConditions *vc)
{
#define PARSE_VIEW_CONDITION_FLOAT(field) \
- if (CONSP (view) && NUMBERP (XCAR (view))) \
+ if (CONSP (view) && FIXED_OR_FLOATP (XCAR (view))) \
{ \
vc->field = XFLOATINT (XCAR (view)); \
view = XCDR (view); \
else \
return false;
#define PARSE_VIEW_CONDITION_INT(field) \
- if (CONSP (view) && NATNUMP (XCAR (view))) \
+ if (CONSP (view) && FIXNATP (XCAR (view))) \
{ \
CHECK_RANGED_INTEGER (XCAR (view), 1, 4); \
vc->field = XINT (XCAR (view)); \
}
#endif
- CHECK_NUMBER_OR_FLOAT (temperature);
+ CHECK_FIXNUM_OR_FLOAT (temperature);
tempK = XFLOATINT (temperature);
if (!(cmsWhitePointFromTemp (&whitepoint, tempK)))
# endif
#endif
-#define lisp_h_CHECK_NUMBER(x) CHECK_TYPE (INTEGERP (x), Qintegerp, x)
+#define lisp_h_CHECK_FIXNUM(x) CHECK_TYPE (FIXNUMP (x), Qintegerp, x)
#define lisp_h_CHECK_SYMBOL(x) CHECK_TYPE (SYMBOLP (x), Qsymbolp, x)
#define lisp_h_CHECK_TYPE(ok, predicate, x) \
((ok) ? (void) 0 : wrong_type_argument (predicate, x))
#define lisp_h_CONSP(x) (XTYPE (x) == Lisp_Cons)
#define lisp_h_EQ(x, y) (XLI (x) == XLI (y))
#define lisp_h_FLOATP(x) (XTYPE (x) == Lisp_Float)
-#define lisp_h_INTEGERP(x) ((XTYPE (x) & (Lisp_Int0 | ~Lisp_Int1)) == Lisp_Int0)
+#define lisp_h_FIXNUMP(x) ((XTYPE (x) & (Lisp_Int0 | ~Lisp_Int1)) == Lisp_Int0)
#define lisp_h_MARKERP(x) (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Marker)
#define lisp_h_MISCP(x) (XTYPE (x) == Lisp_Misc)
#define lisp_h_NILP(x) EQ (x, Qnil)
# define lisp_h_check_cons_list() ((void) 0)
#endif
#if USE_LSB_TAG
-# define lisp_h_make_number(n) \
+# 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 XIL(i) lisp_h_XIL (i)
# define XLP(o) lisp_h_XLP (o)
# define XPL(p) lisp_h_XPL (p)
-# define CHECK_NUMBER(x) lisp_h_CHECK_NUMBER (x)
+# define CHECK_FIXNUM(x) lisp_h_CHECK_FIXNUM (x)
# define CHECK_SYMBOL(x) lisp_h_CHECK_SYMBOL (x)
# define CHECK_TYPE(ok, predicate, x) lisp_h_CHECK_TYPE (ok, predicate, x)
# define CONSP(x) lisp_h_CONSP (x)
# define EQ(x, y) lisp_h_EQ (x, y)
# define FLOATP(x) lisp_h_FLOATP (x)
-# define INTEGERP(x) lisp_h_INTEGERP (x)
+# define FIXNUMP(x) lisp_h_FIXNUMP (x)
# define MARKERP(x) lisp_h_MARKERP (x)
# define MISCP(x) lisp_h_MISCP (x)
# define NILP(x) lisp_h_NILP (x)
# define check_cons_list() lisp_h_check_cons_list ()
# endif
# if USE_LSB_TAG
-# define make_number(n) lisp_h_make_number (n)
+# define make_fixnum(n) lisp_h_make_fixnum (n)
# define XFASTINT(a) lisp_h_XFASTINT (a)
# define XINT(a) lisp_h_XINT (a)
# define XSYMBOL(a) lisp_h_XSYMBOL (a)
#if USE_LSB_TAG
INLINE Lisp_Object
-(make_number) (EMACS_INT n)
+(make_fixnum) (EMACS_INT n)
{
- return lisp_h_make_number (n);
+ return lisp_h_make_fixnum (n);
}
INLINE EMACS_INT
/* Make a Lisp integer representing the value of the low order
bits of N. */
INLINE Lisp_Object
-make_number (EMACS_INT n)
+make_fixnum (EMACS_INT n)
{
EMACS_INT int0 = Lisp_Int0;
if (USE_LSB_TAG)
return lisp_h_XHASH (a);
}
-/* Like make_number (N), but may be faster. N must be in nonnegative range. */
+/* Like make_fixnum (N), but may be faster. N must be in nonnegative range. */
INLINE Lisp_Object
-make_natnum (EMACS_INT n)
+make_fixed_natnum (EMACS_INT n)
{
eassert (0 <= n && n <= MOST_POSITIVE_FIXNUM);
EMACS_INT int0 = Lisp_Int0;
- return USE_LSB_TAG ? make_number (n) : XIL (n + (int0 << VALBITS));
+ return USE_LSB_TAG ? make_fixnum (n) : XIL (n + (int0 << VALBITS));
}
/* Return true if X and Y are the same object. */
}
INLINE bool
-(INTEGERP) (Lisp_Object x)
+(FIXNUMP) (Lisp_Object x)
{
- return lisp_h_INTEGERP (x);
+ return lisp_h_FIXNUMP (x);
}
-#define XSETINT(a, b) ((a) = make_number (b))
-#define XSETFASTINT(a, b) ((a) = make_natnum (b))
+#define XSETINT(a, b) ((a) = make_fixnum (b))
+#define XSETFASTINT(a, b) ((a) = make_fixed_natnum (b))
#define XSETCONS(a, b) ((a) = make_lisp_ptr (b, Lisp_Cons))
#define XSETVECTOR(a, b) ((a) = make_lisp_ptr (b, Lisp_Vectorlike))
#define XSETSTRING(a, b) ((a) = make_lisp_ptr (b, Lisp_String))
make_pointer_integer (void *p)
{
Lisp_Object a = TAG_PTR (Lisp_Int0, p);
- eassert (INTEGERP (a) && XINTPTR (a) == p);
+ eassert (FIXNUMP (a) && XINTPTR (a) == p);
return a;
}
make_mint_ptr (void *a)
{
Lisp_Object val = TAG_PTR (Lisp_Int0, a);
- return INTEGERP (val) && XINTPTR (val) == a ? val : make_misc_ptr (a);
+ return FIXNUMP (val) && XINTPTR (val) == a ? val : make_misc_ptr (a);
}
INLINE bool
mint_ptrp (Lisp_Object x)
{
- return INTEGERP (x) || (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Ptr);
+ return FIXNUMP (x) || (MISCP (x) && XMISCTYPE (x) == Lisp_Misc_Ptr);
}
INLINE void *
xmint_pointer (Lisp_Object a)
{
eassert (mint_ptrp (a));
- if (INTEGERP (a))
+ if (FIXNUMP (a))
return XINTPTR (a);
return XUNTAG (a, Lisp_Misc, struct Lisp_Misc_Ptr)->pointer;
}
/* Data type checking. */
INLINE bool
-NUMBERP (Lisp_Object x)
+FIXED_OR_FLOATP (Lisp_Object x)
{
- return INTEGERP (x) || FLOATP (x);
+ return FIXNUMP (x) || FLOATP (x);
}
INLINE bool
-NATNUMP (Lisp_Object x)
+FIXNATP (Lisp_Object x)
{
- return INTEGERP (x) && 0 <= XINT (x);
+ return FIXNUMP (x) && 0 <= XINT (x);
}
INLINE bool
-RANGED_INTEGERP (intmax_t lo, Lisp_Object x, intmax_t hi)
+RANGED_FIXNUMP (intmax_t lo, Lisp_Object x, intmax_t hi)
{
- return INTEGERP (x) && lo <= XINT (x) && XINT (x) <= hi;
+ return FIXNUMP (x) && lo <= XINT (x) && XINT (x) <= hi;
}
-#define TYPE_RANGED_INTEGERP(type, x) \
- (INTEGERP (x) \
+#define TYPE_RANGED_FIXNUMP(type, x) \
+ (FIXNUMP (x) \
&& (TYPE_SIGNED (type) ? TYPE_MINIMUM (type) <= XINT (x) : 0 <= XINT (x)) \
&& XINT (x) <= TYPE_MAXIMUM (type))
}
INLINE void
-(CHECK_NUMBER) (Lisp_Object x)
+(CHECK_FIXNUM) (Lisp_Object x)
{
- lisp_h_CHECK_NUMBER (x);
+ lisp_h_CHECK_FIXNUM (x);
}
INLINE void
CHECK_TYPE (ARRAYP (x), predicate, x);
}
INLINE void
-CHECK_NATNUM (Lisp_Object x)
+CHECK_FIXNAT (Lisp_Object x)
{
- CHECK_TYPE (NATNUMP (x), Qwholenump, x);
+ CHECK_TYPE (FIXNATP (x), Qwholenump, x);
}
#define CHECK_RANGED_INTEGER(x, lo, hi) \
do { \
- CHECK_NUMBER (x); \
+ CHECK_FIXNUM (x); \
if (! ((lo) <= XINT (x) && XINT (x) <= (hi))) \
args_out_of_range_3 \
(x, \
- make_number ((lo) < 0 && (lo) < MOST_NEGATIVE_FIXNUM \
+ make_fixnum ((lo) < 0 && (lo) < MOST_NEGATIVE_FIXNUM \
? MOST_NEGATIVE_FIXNUM \
: (lo)), \
- make_number (min (hi, MOST_POSITIVE_FIXNUM))); \
+ make_fixnum (min (hi, MOST_POSITIVE_FIXNUM))); \
} while (false)
#define CHECK_TYPE_RANGED_INTEGER(type, x) \
do { \
CHECK_RANGED_INTEGER (x, 0, TYPE_MAXIMUM (type)); \
} while (false)
-#define CHECK_NUMBER_COERCE_MARKER(x) \
+#define CHECK_FIXNUM_COERCE_MARKER(x) \
do { \
if (MARKERP ((x))) \
XSETFASTINT (x, marker_position (x)); \
else \
- CHECK_TYPE (INTEGERP (x), Qinteger_or_marker_p, x); \
+ CHECK_TYPE (FIXNUMP (x), Qinteger_or_marker_p, x); \
} while (false)
INLINE double
}
INLINE void
-CHECK_NUMBER_OR_FLOAT (Lisp_Object x)
+CHECK_FIXNUM_OR_FLOAT (Lisp_Object x)
{
- CHECK_TYPE (NUMBERP (x), Qnumberp, x);
+ CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumberp, x);
}
-#define CHECK_NUMBER_OR_FLOAT_COERCE_MARKER(x) \
+#define CHECK_FIXNUM_OR_FLOAT_COERCE_MARKER(x) \
do { \
if (MARKERP (x)) \
XSETFASTINT (x, marker_position (x)); \
else \
- CHECK_TYPE (NUMBERP (x), Qnumber_or_marker_p, x); \
+ CHECK_TYPE (FIXED_OR_FLOATP (x), Qnumber_or_marker_p, x); \
} while (false)
/* Since we can't assign directly to the CAR or CDR fields of a cons
cell, use these when checking that those fields contain numbers. */
INLINE void
-CHECK_NUMBER_CAR (Lisp_Object x)
+CHECK_FIXNUM_CAR (Lisp_Object x)
{
Lisp_Object tmp = XCAR (x);
- CHECK_NUMBER (tmp);
+ CHECK_FIXNUM (tmp);
XSETCAR (x, tmp);
}
INLINE void
-CHECK_NUMBER_CDR (Lisp_Object x)
+CHECK_FIXNUM_CDR (Lisp_Object x)
{
Lisp_Object tmp = XCDR (x);
- CHECK_NUMBER (tmp);
+ CHECK_FIXNUM (tmp);
XSETCDR (x, tmp);
}
\f
I should not have side effects. */
#define INTEGER_TO_CONS(i) \
(! FIXNUM_OVERFLOW_P (i) \
- ? make_number (i) \
+ ? make_fixnum (i) \
: EXPR_SIGNED (i) ? intbig_to_lisp (i) : uintbig_to_lisp (i))
extern Lisp_Object intbig_to_lisp (intmax_t);
extern Lisp_Object uintbig_to_lisp (uintmax_t);
INLINE Lisp_Object
list2i (EMACS_INT x, EMACS_INT y)
{
- return list2 (make_number (x), make_number (y));
+ return list2 (make_fixnum (x), make_fixnum (y));
}
INLINE Lisp_Object
list3i (EMACS_INT x, EMACS_INT y, EMACS_INT w)
{
- return list3 (make_number (x), make_number (y), make_number (w));
+ return list3 (make_fixnum (x), make_fixnum (y), make_fixnum (w));
}
INLINE Lisp_Object
list4i (EMACS_INT x, EMACS_INT y, EMACS_INT w, EMACS_INT h)
{
- return list4 (make_number (x), make_number (y),
- make_number (w), make_number (h));
+ return list4 (make_fixnum (x), make_fixnum (y),
+ make_fixnum (w), make_fixnum (h));
}
extern Lisp_Object make_uninit_bool_vector (EMACS_INT);
in a Lisp fixnum. */
#define make_fixnum_or_float(val) \
- (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_number (val))
+ (FIXNUM_OVERFLOW_P (val) ? make_float (val) : make_fixnum (val))
/* SAFE_ALLOCA normally allocates memory on the stack, but if size is
larger than MAX_ALLOCA, use xmalloc to avoid overflowing the stack. */
unread_char = c;
}
else
- call1 (readcharfun, make_number (c));
+ call1 (readcharfun, make_fixnum (c));
}
static int
delayed_switch_frame = Qnil;
/* Compute timeout. */
- if (NUMBERP (seconds))
+ if (FIXED_OR_FLOATP (seconds))
{
double duration = XFLOATINT (seconds);
struct timespec wait_time = dtotimespec (duration);
retry:
do
val = read_char (0, Qnil, (input_method ? Qnil : Qt), 0,
- NUMBERP (seconds) ? &end_time : NULL);
- while (INTEGERP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */
+ FIXED_OR_FLOATP (seconds) ? &end_time : NULL);
+ while (FIXNUMP (val) && XINT (val) == -2); /* wrong_kboard_jmpbuf */
if (BUFFERP (val))
goto retry;
goto retry;
}
- if (ascii_required && !(NUMBERP (seconds) && NILP (val)))
+ if (ascii_required && !(FIXED_OR_FLOATP (seconds) && NILP (val)))
{
/* Convert certain symbols to their ASCII equivalents. */
if (SYMBOLP (val))
}
/* If we don't have a character now, deal with it appropriately. */
- if (!INTEGERP (val))
+ if (!FIXNUMP (val))
{
if (error_nonascii)
{
val = read_filtered_event (1, 1, 1, ! NILP (inherit_input_method), seconds);
return (NILP (val) ? Qnil
- : make_number (char_resolve_modifier_mask (XINT (val))));
+ : make_fixnum (char_resolve_modifier_mask (XINT (val))));
}
DEFUN ("read-event", Fread_event, Sread_event, 0, 3, 0,
val = read_filtered_event (1, 1, 0, ! NILP (inherit_input_method), seconds);
return (NILP (val) ? Qnil
- : make_number (char_resolve_modifier_mask (XINT (val))));
+ : make_fixnum (char_resolve_modifier_mask (XINT (val))));
}
DEFUN ("get-file-char", Fget_file_char, Sget_file_char, 0, 0, 0,
{
if (!infile)
error ("get-file-char misused");
- return make_number (readbyte_from_stdio ());
+ return make_fixnum (readbyte_from_stdio ());
}
if (!NILP (nomessage) && !force_load_messages)
{
Lisp_Object msg_file;
- msg_file = Fsubstring (found, make_number (0), make_number (-1));
+ msg_file = Fsubstring (found, make_fixnum (0), make_fixnum (-1));
message_with_string ("Source file `%s' newer than byte-compiled file",
msg_file, 1);
}
string = make_string (fn, fnlen);
handler = Ffind_file_name_handler (string, Qfile_exists_p);
if ((!NILP (handler) || (!NILP (predicate) && !EQ (predicate, Qt)))
- && !NATNUMP (predicate))
+ && !FIXNATP (predicate))
{
bool exists;
if (NILP (predicate) || EQ (predicate, Qt))
pfn = SSDATA (encoded_fn);
/* Check that we can access or open it. */
- if (NATNUMP (predicate))
+ if (FIXNATP (predicate))
{
fd = -1;
if (INT_MAX < XFASTINT (predicate))
if (fd >= 0)
{
- if (newer && !NATNUMP (predicate))
+ if (newer && !FIXNATP (predicate))
{
struct timespec mtime = get_stat_mtime (&st);
/* Set point and ZV around stuff to be read. */
Fgoto_char (start);
if (!NILP (end))
- Fnarrow_to_region (make_number (BEGV), end);
+ Fnarrow_to_region (make_fixnum (BEGV), end);
/* Just for cleanliness, convert END to a marker
if it is an integer. */
- if (INTEGERP (end))
+ if (FIXNUMP (end))
end = Fpoint_max_marker ();
}
CHECK_STRING (string);
/* `read_internal_start' sets `read_from_string_index'. */
ret = read_internal_start (string, start, end);
- return Fcons (ret, make_number (read_from_string_index));
+ return Fcons (ret, make_fixnum (read_from_string_index));
}
/* Function to set up the global context we need in toplevel read
return val;
xsignal1 (Qinvalid_read_syntax,
- Fmake_string (make_number (1), make_number (c), Qnil));
+ Fmake_string (make_fixnum (1), make_fixnum (c), Qnil));
}
\f
/* Grow a read buffer BUF that contains OFFSET useful bytes of data,
? string_to_number (name + 1, 16, 0)
: call2 (Qchar_from_name, make_unibyte_string (name, name_len), Qt));
- if (! RANGED_INTEGERP (0, code, MAX_UNICODE_CHAR)
+ if (! RANGED_FIXNUMP (0, code, MAX_UNICODE_CHAR)
|| char_surrogate_p (XINT (code)))
{
AUTO_STRING (format, "\\N{%s}");
AUTO_STRING (format,
"Invalid character U+%04X in character name");
xsignal1 (Qinvalid_read_syntax,
- CALLN (Fformat, format, make_natnum (c)));
+ CALLN (Fformat, format, make_fixed_natnum (c)));
}
/* Treat multiple adjacent whitespace characters as a
single space character. This makes it easier to use
{
ptrdiff_t size = XINT (Flength (tmp));
Lisp_Object record = Fmake_record (CAR_SAFE (tmp),
- make_number (size - 1),
+ make_fixnum (size - 1),
Qnil);
for (int i = 1; i < size; i++)
{
if (size == 0)
error ("Zero-sized sub char-table");
- if (! RANGED_INTEGERP (1, XCAR (tmp), 3))
+ if (! RANGED_FIXNUMP (1, XCAR (tmp), 3))
error ("Invalid depth in sub char-table");
depth = XINT (XCAR (tmp));
if (chartab_size[depth] != size - 2)
cell = XCONS (tmp), tmp = XCDR (tmp), size--;
free_cons (cell);
- if (! RANGED_INTEGERP (0, XCAR (tmp), MAX_CHAR))
+ if (! RANGED_FIXNUMP (0, XCAR (tmp), MAX_CHAR))
error ("Invalid minimum character in sub-char-table");
min_char = XINT (XCAR (tmp));
cell = XCONS (tmp), tmp = XCDR (tmp), size--;
struct Lisp_Hash_Table *h
= XHASH_TABLE (read_objects_map);
EMACS_UINT hash;
- Lisp_Object number = make_number (n);
+ Lisp_Object number = make_fixnum (n);
ptrdiff_t i = hash_lookup (h, number, &hash);
if (i >= 0)
/* If it can be recursive, remember it for
future substitutions. */
if (! SYMBOLP (tem)
- && ! NUMBERP (tem)
+ && ! FIXED_OR_FLOATP (tem)
&& ! (STRINGP (tem) && !string_intervals (tem)))
{
struct Lisp_Hash_Table *h2
{
struct Lisp_Hash_Table *h
= XHASH_TABLE (read_objects_map);
- ptrdiff_t i = hash_lookup (h, make_number (n), NULL);
+ ptrdiff_t i = hash_lookup (h, make_fixnum (n), NULL);
if (i >= 0)
return HASH_VALUE (h, i);
}
Other literal whitespace like NL, CR, and FF are not accepted,
as there are well-established escape sequences for these. */
if (c == ' ' || c == '\t')
- return make_number (c);
+ return make_fixnum (c);
if (c == '(' || c == ')' || c == '[' || c == ']'
|| c == '"' || c == ';')
{
CHECK_LIST (Vlread_unescaped_character_literals);
- Lisp_Object char_obj = make_natnum (c);
+ Lisp_Object char_obj = make_fixed_natnum (c);
if (NILP (Fmemq (char_obj, Vlread_unescaped_character_literals)))
Vlread_unescaped_character_literals =
Fcons (char_obj, Vlread_unescaped_character_literals);
&& strchr ("\"';()[]#?`,.", next_char) != NULL));
UNREAD (next_char);
if (ok)
- return make_number (c);
+ return make_fixnum (c);
invalid_syntax ("?");
}
return zero instead. This is for doc strings
that we are really going to find in etc/DOC.nn.nn. */
if (!NILP (Vpurify_flag) && NILP (Vdoc_file_name) && cancel)
- return unbind_to (count, make_number (0));
+ return unbind_to (count, make_fixnum (0));
if (! force_multibyte && force_singlebyte)
{
int ch = STRING_CHAR ((unsigned char *) read_buffer);
if (confusable_symbol_character_p (ch))
xsignal2 (Qinvalid_read_syntax, build_string ("strange quote"),
- CALLN (Fstring, make_number (ch)));
+ CALLN (Fstring, make_fixnum (ch)));
}
{
Lisp_Object result;
if (EQ (Vread_with_symbol_positions, Qt)
|| EQ (Vread_with_symbol_positions, readcharfun))
Vread_symbol_positions_list
- = Fcons (Fcons (result, make_number (start_position)),
+ = Fcons (Fcons (result, make_fixnum (start_position)),
Vread_symbol_positions_list);
return unbind_to (count, result);
}
bother looking them up; we're done. */
if (SYMBOLP (subtree)
|| (STRINGP (subtree) && !string_intervals (subtree))
- || NUMBERP (subtree))
+ || FIXED_OR_FLOATP (subtree))
return subtree;
/* If we've been to this node before, don't explore it again. */
else if (n <= (negative ? -MOST_NEGATIVE_FIXNUM : MOST_POSITIVE_FIXNUM))
{
EMACS_INT signed_n = n;
- return make_number (negative ? -signed_n : signed_n);
+ return make_fixnum (negative ? -signed_n : signed_n);
}
else
value = n;
if (ch == ')')
{
if (doc_reference == 1)
- return make_number (0);
- if (doc_reference == 2 && INTEGERP (XCDR (val)))
+ return make_fixnum (0);
+ if (doc_reference == 2 && FIXNUMP (XCDR (val)))
{
char *saved = NULL;
file_offset saved_position;
if (! EQ (sym, Qunbound))
{
Lisp_Object bucket = oblookup (initial_obarray, str, len, len);
- eassert (INTEGERP (bucket));
+ eassert (FIXNUMP (bucket));
intern_sym (sym, initial_obarray, bucket);
}
}
string = SYMBOL_NAME (name);
tem = oblookup (obarray, SSDATA (string), SCHARS (string), SBYTES (string));
- if (INTEGERP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
+ if (FIXNUMP (tem) || (SYMBOLP (name) && !EQ (name, tem)))
return Qnil;
else
return tem;
tem = oblookup (obarray, SSDATA (string),
SCHARS (string),
SBYTES (string));
- if (INTEGERP (tem))
+ if (FIXNUMP (tem))
return Qnil;
/* If arg was a symbol, don't delete anything but that symbol itself. */
if (SYMBOLP (name) && !EQ (name, tem))
ASET (obarray, hash, sym);
}
else
- ASET (obarray, hash, make_number (0));
+ ASET (obarray, hash, make_fixnum (0));
}
else
{
hash = hash_string (ptr, size_byte) % obsize;
bucket = AREF (obarray, hash);
oblookup_last_bucket_number = hash;
- if (EQ (bucket, make_number (0)))
+ if (EQ (bucket, make_fixnum (0)))
;
else if (!SYMBOLP (bucket))
error ("Bad data in guts of obarray"); /* Like CADR error message. */
void
init_obarray (void)
{
- Vobarray = Fmake_vector (make_number (OBARRAY_SIZE), make_number (0));
+ Vobarray = Fmake_vector (make_fixnum (OBARRAY_SIZE), make_fixnum (0));
initial_obarray = Vobarray;
staticpro (&initial_obarray);
for (i = 0; i < len; i++)
{
Lisp_Object c;
- c = Faref (KVAR (current_kboard, Vlast_kbd_macro), make_number (i));
- if (cvt && NATNUMP (c) && (XFASTINT (c) & 0x80))
+ 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));
current_kboard->kbd_macro_buffer[i] = c;
}
for consistency of behavior. */
if (NILP (no_exec))
Fexecute_kbd_macro (KVAR (current_kboard, Vlast_kbd_macro),
- make_number (1), Qnil);
+ make_fixnum (1), Qnil);
message1 ("Appending to kbd macro...");
}
if (NILP (repeat))
XSETFASTINT (repeat, 1);
else
- CHECK_NUMBER (repeat);
+ CHECK_FIXNUM (repeat);
if (!NILP (KVAR (current_kboard, defining_kbd_macro)))
{
error ("Keyboard macros must be strings or vectors");
tem = Fcons (Vexecuting_kbd_macro,
- Fcons (make_number (executing_kbd_macro_index),
+ Fcons (make_fixnum (executing_kbd_macro_index),
Vreal_this_command));
record_unwind_protect (pop_kbd_macro, tem);
{
CHECK_MARKER (marker);
if (XMARKER (marker)->buffer)
- return make_number (XMARKER (marker)->charpos);
+ return make_fixnum (XMARKER (marker)->charpos);
return Qnil;
}
{
register ptrdiff_t charpos, bytepos;
- /* Do not use CHECK_NUMBER_COERCE_MARKER because we
+ /* Do not use CHECK_FIXNUM_COERCE_MARKER because we
don't want to call buf_charpos_to_bytepos if POSITION
is a marker and so we know the bytepos already. */
- if (INTEGERP (position))
+ if (FIXNUMP (position))
charpos = XINT (position), bytepos = -1;
else if (MARKERP (position))
{
register Lisp_Object new;
if (!NILP (marker))
- CHECK_TYPE (INTEGERP (marker) || MARKERP (marker), Qinteger_or_marker_p, marker);
+ CHECK_TYPE (FIXNUMP (marker) || MARKERP (marker), Qinteger_or_marker_p, marker);
new = Fmake_marker ();
Fset_marker (new, marker,
if (NILP (menu_items))
{
menu_items_allocated = 60;
- menu_items = Fmake_vector (make_number (menu_items_allocated), Qnil);
+ menu_items = Fmake_vector (make_fixnum (menu_items_allocated), Qnil);
}
menu_items_inuse = Qt;
save_menu_items (void)
{
Lisp_Object saved = list4 (!NILP (menu_items_inuse) ? menu_items : Qnil,
- make_number (menu_items_used),
- make_number (menu_items_n_panes),
- make_number (menu_items_submenu_depth));
+ make_fixnum (menu_items_used),
+ make_fixnum (menu_items_n_panes),
+ make_fixnum (menu_items_submenu_depth));
record_unwind_protect (restore_menu_items, saved);
menu_items_inuse = Qnil;
menu_items = Qnil;
int cur_x, cur_y;
x_relative_mouse_position (new_f, &cur_x, &cur_y);
- /* cur_x/y may be negative, so use make_number. */
- x = make_number (cur_x);
- y = make_number (cur_y);
+ /* cur_x/y may be negative, so use make_fixnum. */
+ x = make_fixnum (cur_x);
+ y = make_fixnum (cur_y);
}
}
else
{
/* This function is written to be most efficient when there's a prompt. */
Lisp_Object beg, end, tem;
- beg = make_number (BEGV);
+ beg = make_fixnum (BEGV);
tem = Fmemq (Fcurrent_buffer (), Vminibuffer_list);
if (NILP (tem))
CHECK_STRING (initial);
if (!NILP (backup_n))
{
- CHECK_NUMBER (backup_n);
+ CHECK_FIXNUM (backup_n);
/* Convert to distance from end of input. */
if (XINT (backup_n) < 1)
/* A number too small means the beginning of the string. */
&& NILP (Vexecuting_kbd_macro))
{
val = read_minibuf_noninteractive (map, initial, prompt,
- make_number (pos),
+ make_fixnum (pos),
expflag, histvar, histpos, defalt,
allow_props, inherit_input_method);
return unbind_to (count, val);
minibuf_save_list));
minibuf_save_list
= Fcons (minibuf_prompt,
- Fcons (make_number (minibuf_prompt_width),
+ Fcons (make_fixnum (minibuf_prompt_width),
Fcons (Vhelp_form,
Fcons (Vcurrent_prefix_arg,
Fcons (Vminibuffer_history_position,
Finsert (1, &minibuf_prompt);
if (PT > BEG)
{
- Fput_text_property (make_number (BEG), make_number (PT),
+ Fput_text_property (make_fixnum (BEG), make_fixnum (PT),
Qfront_sticky, Qt, Qnil);
- Fput_text_property (make_number (BEG), make_number (PT),
+ Fput_text_property (make_fixnum (BEG), make_fixnum (PT),
Qrear_nonsticky, Qt, Qnil);
- Fput_text_property (make_number (BEG), make_number (PT),
+ Fput_text_property (make_fixnum (BEG), make_fixnum (PT),
Qfield, Qt, Qnil);
if (CONSP (Vminibuffer_prompt_properties))
{
Lisp_Object val = XCAR (list);
list = XCDR (list);
if (EQ (key, Qface))
- Fadd_face_text_property (make_number (BEG),
- make_number (PT), val, Qt, Qnil);
+ Fadd_face_text_property (make_fixnum (BEG),
+ make_fixnum (PT), val, Qt, Qnil);
else
- Fput_text_property (make_number (BEG), make_number (PT),
+ Fput_text_property (make_fixnum (BEG), make_fixnum (PT),
key, val, Qnil);
}
}
if (!NILP (initial))
{
Finsert (1, &initial);
- Fforward_char (make_number (pos));
+ Fforward_char (make_fixnum (pos));
}
clear_message (1, 1);
Lisp_Object
get_minibuffer (EMACS_INT depth)
{
- Lisp_Object tail = Fnthcdr (make_number (depth), Vminibuffer_list);
+ Lisp_Object tail = Fnthcdr (make_fixnum (depth), Vminibuffer_list);
if (NILP (tail))
{
tail = list1 (Qnil);
{
CHECK_STRING (prompt);
return read_minibuf (Vminibuffer_local_ns_map, initial, prompt,
- 0, Qminibuffer_history, make_number (0), Qnil, 0,
+ 0, Qminibuffer_history, make_fixnum (0), Qnil, 0,
!NILP (inherit_input_method));
}
return call3 (collection, string, predicate, Qnil);
bestmatch = bucket = Qnil;
- zero = make_number (0);
+ zero = make_fixnum (0);
/* If COLLECTION is not a list, set TAIL just for gc pro. */
tail = collection;
if (STRINGP (eltstring)
&& SCHARS (string) <= SCHARS (eltstring)
&& (tem = Fcompare_strings (eltstring, zero,
- make_number (SCHARS (string)),
+ make_fixnum (SCHARS (string)),
string, zero, Qnil,
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
{
compare = min (bestmatchsize, SCHARS (eltstring));
tem = Fcompare_strings (bestmatch, zero,
- make_number (compare),
+ make_fixnum (compare),
eltstring, zero,
- make_number (compare),
+ make_fixnum (compare),
completion_ignore_case ? Qt : Qnil);
matchsize = EQ (tem, Qt) ? compare : eabs (XINT (tem)) - 1;
==
(matchsize == SCHARS (bestmatch))
&& (tem = Fcompare_strings (eltstring, zero,
- make_number (SCHARS (string)),
+ make_fixnum (SCHARS (string)),
string, zero,
Qnil,
Qnil),
EQ (Qt, tem))
&& (tem = Fcompare_strings (bestmatch, zero,
- make_number (SCHARS (string)),
+ make_fixnum (SCHARS (string)),
string, zero,
Qnil,
Qnil),
if (type == 0)
return call3 (collection, string, predicate, Qt);
allmatches = bucket = Qnil;
- zero = make_number (0);
+ zero = make_fixnum (0);
/* If COLLECTION is not a list, set TAIL just for gc pro. */
tail = collection;
&& SREF (string, 0) == ' ')
|| SREF (eltstring, 0) != ' ')
&& (tem = Fcompare_strings (eltstring, zero,
- make_number (SCHARS (string)),
+ make_fixnum (SCHARS (string)),
string, zero,
- make_number (SCHARS (string)),
+ make_fixnum (SCHARS (string)),
completion_ignore_case ? Qt : Qnil),
EQ (Qt, tem)))
{
if (SYMBOLP (tail))
while (1)
{
- if (EQ (Fcompare_strings (string, make_number (0), Qnil,
+ if (EQ (Fcompare_strings (string, make_fixnum (0), Qnil,
Fsymbol_name (tail),
- make_number (0) , Qnil, Qt),
+ make_fixnum (0) , Qnil, Qt),
Qt))
{
tem = tail;
thiscar = Fsymbol_name (thiscar);
else if (!STRINGP (thiscar))
continue;
- tem = Fcompare_strings (thiscar, make_number (0), Qnil,
- key, make_number (0), Qnil,
+ tem = Fcompare_strings (thiscar, make_fixnum (0), Qnil,
+ key, make_fixnum (0), Qnil,
case_fold);
if (EQ (tem, Qt))
return elt;
doc: /* Return current depth of activations of minibuffer, a nonnegative integer. */)
(void)
{
- return make_number (minibuf_level);
+ return make_fixnum (minibuf_level);
}
DEFUN ("minibuffer-prompt", Fminibuffer_prompt, Sminibuffer_prompt, 0, 0, 0,
{
int n;
- CHECK_NUMBER (nbuttons);
+ CHECK_FIXNUM (nbuttons);
n = XINT (nbuttons);
if (n < 2 || n > 3)
xsignal2 (Qargs_out_of_range,
*bar_window = Qnil;
mouse_get_xy (&ix, &iy);
*time = event_timestamp ();
- *x = make_number (mouse_last_x = ix);
- *y = make_number (mouse_last_y = iy);
+ *x = make_fixnum (mouse_last_x = ix);
+ *y = make_fixnum (mouse_last_y = iy);
}
static void
(video_name, "screen-dimensions-%dx%d",
*rows, *cols), Qnil));
- if (INTEGERP (video_mode)
+ if (FIXNUMP (video_mode)
&& (video_mode_value = XINT (video_mode)) > 0)
{
regs.x.ax = video_mode_value;
Lisp_Object bar_parms = XCDR (cursor_type);
int width;
- if (INTEGERP (bar_parms))
+ if (FIXNUMP (bar_parms))
{
/* Feature: negative WIDTH means cursor at the top
of the character cell, zero means invisible cursor. */
width);
}
else if (CONSP (bar_parms)
- && INTEGERP (XCAR (bar_parms))
- && INTEGERP (XCDR (bar_parms)))
+ && FIXNUMP (XCAR (bar_parms))
+ && FIXNUMP (XCDR (bar_parms)))
{
int start_line = XINT (XCDR (bar_parms));
if (EQ (BVAR (b,cursor_type), Qt))
new_cursor = frame_desired_cursor;
else if (NILP (BVAR (b, cursor_type))) /* nil means no cursor */
- new_cursor = Fcons (Qbar, make_number (0));
+ new_cursor = Fcons (Qbar, make_fixnum (0));
else
new_cursor = BVAR (b, cursor_type);
}
}
Vinitial_window_system = Qpc;
- Vwindow_system_version = make_number (27); /* RE Emacs version */
+ Vwindow_system_version = make_fixnum (27); /* RE Emacs version */
tty->terminal->type = output_msdos_raw;
/* If Emacs was dumped on DOS/V machine, forget the stale VRAM
sc = regs.h.ah;
total_doskeys += 2;
- ASET (recent_doskeys, recent_doskeys_index, make_number (c));
+ ASET (recent_doskeys, recent_doskeys_index, make_fixnum (c));
recent_doskeys_index++;
if (recent_doskeys_index == NUM_RECENT_DOSKEYS)
recent_doskeys_index = 0;
- ASET (recent_doskeys, recent_doskeys_index, make_number (sc));
+ ASET (recent_doskeys, recent_doskeys_index, make_fixnum (sc));
recent_doskeys_index++;
if (recent_doskeys_index == NUM_RECENT_DOSKEYS)
recent_doskeys_index = 0;
if (code == 0)
continue;
- if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight))
+ if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight))
{
clear_mouse_face (hlinfo);
hlinfo->mouse_face_hidden = 1;
event.code = button_num;
event.modifiers = dos_get_modifiers (0)
| (press ? down_modifier : up_modifier);
- event.x = make_number (x);
- event.y = make_number (y);
+ event.x = make_fixnum (x);
+ event.y = make_fixnum (y);
event.frame_or_window = selected_frame;
event.arg = Qnil;
event.timestamp = event_timestamp ();
void
syms_of_msdos (void)
{
- recent_doskeys = Fmake_vector (make_number (NUM_RECENT_DOSKEYS), Qnil);
+ recent_doskeys = Fmake_vector (make_fixnum (NUM_RECENT_DOSKEYS), Qnil);
staticpro (&recent_doskeys);
#ifndef HAVE_X_WINDOWS
DEFVAR_LISP ("dos-unsupported-char-glyph", Vdos_unsupported_char_glyph,
doc: /* Glyph to display instead of chars not supported by current codepage.
This variable is used only by MS-DOS terminals. */);
- Vdos_unsupported_char_glyph = make_number ('\177');
+ Vdos_unsupported_char_glyph = make_fixnum ('\177');
#endif
printchar (unsigned int ch, Lisp_Object fun)
{
if (!NILP (fun) && !EQ (fun, Qt))
- call1 (fun, make_number (ch));
+ call1 (fun, make_fixnum (ch));
else
{
unsigned char str[MAX_MULTIBYTE_LENGTH];
{
if (NILP (printcharfun))
printcharfun = Vstandard_output;
- CHECK_NUMBER (character);
+ CHECK_FIXNUM (character);
PRINTPREPARE;
printchar (XINT (character), printcharfun);
PRINTFINISH;
to make it write to the debugging output. */)
(Lisp_Object character)
{
- CHECK_NUMBER (character);
+ CHECK_FIXNUM (character);
printchar_to_stream (XINT (character), stderr);
return character;
}
&& SYMBOLP (obj)
&& !SYMBOL_INTERNED_P (obj)))
{ /* OBJ appears more than once. Let's remember that. */
- if (!INTEGERP (num))
+ if (!FIXNUMP (num))
{
print_number_index++;
/* Negative number indicates it hasn't been printed yet. */
- Fputhash (obj, make_number (- print_number_index),
+ Fputhash (obj, make_fixnum (- print_number_index),
Vprint_number_table);
}
print_depth--;
{
if (NILP (print_prune_charset_plist))
print_prune_charset_plist = list1 (Qcharset);
- Fremove_text_properties (make_number (0),
- make_number (SCHARS (string)),
+ Fremove_text_properties (make_fixnum (0),
+ make_fixnum (SCHARS (string)),
print_prune_charset_plist, string);
}
else
- Fset_text_properties (make_number (0), make_number (SCHARS (string)),
+ Fset_text_properties (make_fixnum (0), make_fixnum (SCHARS (string)),
Qnil, string);
}
return string;
/* Don't print more bytes than the specified maximum.
Negative values of print-length are invalid. Treat them
like a print-length of nil. */
- if (NATNUMP (Vprint_length)
+ if (FIXNATP (Vprint_length)
&& XFASTINT (Vprint_length) < size_in_bytes)
size_in_bytes = XFASTINT (Vprint_length);
ptrdiff_t size = real_size;
/* Don't print more elements than the specified maximum. */
- if (NATNUMP (Vprint_length) && XFASTINT (Vprint_length) < size)
+ if (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size)
size = XFASTINT (Vprint_length);
printchar ('(', printcharfun);
/* Don't print more elements than the specified maximum. */
ptrdiff_t n
- = (NATNUMP (Vprint_length) && XFASTINT (Vprint_length) < size
+ = (FIXNATP (Vprint_length) && XFASTINT (Vprint_length) < size
? XFASTINT (Vprint_length) : size);
print_c_string ("#s(", printcharfun);
}
/* Don't print more elements than the specified maximum. */
- if (NATNUMP (Vprint_length)
+ if (FIXNATP (Vprint_length)
&& XFASTINT (Vprint_length) < size)
size = XFASTINT (Vprint_length);
{
/* With the print-circle feature. */
Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil);
- if (INTEGERP (num))
+ if (FIXNUMP (num))
{
EMACS_INT n = XINT (num);
if (n < 0)
int len = sprintf (buf, "#%"pI"d=", -n);
strout (buf, len, len, printcharfun);
/* OBJ is going to be printed. Remember that fact. */
- Fputhash (obj, make_number (- n), Vprint_number_table);
+ Fputhash (obj, make_fixnum (- n), Vprint_number_table);
}
else
{
case Lisp_Cons:
/* If deeper than spec'd depth, print placeholder. */
- if (INTEGERP (Vprint_level)
+ if (FIXNUMP (Vprint_level)
&& print_depth > XINT (Vprint_level))
print_c_string ("...", printcharfun);
else if (print_quoted && CONSP (XCDR (obj)) && NILP (XCDR (XCDR (obj)))
/* Negative values of print-length are invalid in CL.
Treat them like nil, as CMUCL does. */
- printmax_t print_length = (NATNUMP (Vprint_length)
+ printmax_t print_length = (FIXNATP (Vprint_length)
? XFASTINT (Vprint_length)
: TYPE_MAXIMUM (printmax_t));
if (i != 0)
{
Lisp_Object num = Fgethash (obj, Vprint_number_table, Qnil);
- if (INTEGERP (num))
+ if (FIXNUMP (num))
{
print_c_string (" . ", printcharfun);
print_object (obj, printcharfun, escapeflag);
if (NILP (interval->plist))
return;
printchar (' ', printcharfun);
- print_object (make_number (interval->position), printcharfun, 1);
+ print_object (make_fixnum (interval->position), printcharfun, 1);
printchar (' ', printcharfun);
- print_object (make_number (interval->position + LENGTH (interval)),
+ print_object (make_fixnum (interval->position + LENGTH (interval)),
printcharfun, 1);
printchar (' ', printcharfun);
print_object (interval->plist, printcharfun, 1);
status_convert (int w)
{
if (WIFSTOPPED (w))
- return Fcons (Qstop, Fcons (make_number (WSTOPSIG (w)), Qnil));
+ return Fcons (Qstop, Fcons (make_fixnum (WSTOPSIG (w)), Qnil));
else if (WIFEXITED (w))
- return Fcons (Qexit, Fcons (make_number (WEXITSTATUS (w)),
+ return Fcons (Qexit, Fcons (make_fixnum (WEXITSTATUS (w)),
WCOREDUMP (w) ? Qt : Qnil));
else if (WIFSIGNALED (w))
- return Fcons (Qsignal, Fcons (make_number (WTERMSIG (w)),
+ return Fcons (Qsignal, Fcons (make_fixnum (WTERMSIG (w)),
WCOREDUMP (w) ? Qt : Qnil));
else
return Qrun;
if (SYMBOLP (l))
{
*symbol = l;
- *code = make_number (0);
+ *code = make_fixnum (0);
*coredump = 0;
}
else
c1 = STRING_CHAR (SDATA (string));
c2 = downcase (c1);
if (c1 != c2)
- Faset (string, make_number (0), make_number (c2));
+ Faset (string, make_fixnum (0), make_fixnum (c2));
}
AUTO_STRING (suffix, coredump ? " (core dumped)\n" : "\n");
return concat2 (string, suffix);
p->raw_status_new = 0;
if (NETCONN1_P (p) || SERIALCONN1_P (p) || PIPECONN1_P (p))
{
- pset_status (p, list2 (Qexit, make_number (0)));
+ pset_status (p, list2 (Qexit, make_fixnum (0)));
p->tick = ++process_tick;
status_notify (p, NULL);
redisplay_preserve_echo_area (13);
update_status (p);
symbol = CONSP (p->status) ? XCAR (p->status) : p->status;
if (! (EQ (symbol, Qsignal) || EQ (symbol, Qexit)))
- pset_status (p, list2 (Qsignal, make_number (SIGKILL)));
+ pset_status (p, list2 (Qsignal, make_fixnum (SIGKILL)));
p->tick = ++process_tick;
status_notify (p, NULL);
update_status (XPROCESS (process));
if (CONSP (XPROCESS (process)->status))
return XCAR (XCDR (XPROCESS (process)->status));
- return make_number (0);
+ return make_fixnum (0);
}
DEFUN ("process-id", Fprocess_id, Sprocess_id, 1, 1, 0,
for (i = 0; i < nargs; i++)
{
- if (! RANGED_INTEGERP (0, p->contents[i], 65535))
+ if (! RANGED_FIXNUMP (0, p->contents[i], 65535))
return Qnil;
if (nargs <= 5 /* IPv4 */
{
tem = Qnil;
openp (Vexec_path, program, Vexec_suffixes, &tem,
- make_number (X_OK), false);
+ make_fixnum (X_OK), false);
if (NILP (tem))
report_file_error ("Searching for program", program);
tem = Fexpand_file_name (tem, Qnil);
{
DECLARE_POINTER_ALIAS (sin, struct sockaddr_in, sa);
len = sizeof (sin->sin_addr) + 1;
- address = Fmake_vector (make_number (len), Qnil);
+ address = Fmake_vector (make_fixnum (len), Qnil);
p = XVECTOR (address);
- p->contents[--len] = make_number (ntohs (sin->sin_port));
+ p->contents[--len] = make_fixnum (ntohs (sin->sin_port));
cp = (unsigned char *) &sin->sin_addr;
break;
}
DECLARE_POINTER_ALIAS (sin6, struct sockaddr_in6, sa);
DECLARE_POINTER_ALIAS (ip6, uint16_t, &sin6->sin6_addr);
len = sizeof (sin6->sin6_addr) / 2 + 1;
- address = Fmake_vector (make_number (len), Qnil);
+ address = Fmake_vector (make_fixnum (len), Qnil);
p = XVECTOR (address);
- p->contents[--len] = make_number (ntohs (sin6->sin6_port));
+ p->contents[--len] = make_fixnum (ntohs (sin6->sin6_port));
for (i = 0; i < len; i++)
- p->contents[i] = make_number (ntohs (ip6[i]));
+ p->contents[i] = make_fixnum (ntohs (ip6[i]));
return address;
}
#endif
#endif
default:
len -= offsetof (struct sockaddr, sa_family) + sizeof (sa->sa_family);
- address = Fcons (make_number (sa->sa_family),
- Fmake_vector (make_number (len), Qnil));
+ address = Fcons (make_fixnum (sa->sa_family),
+ Fmake_vector (make_fixnum (len), Qnil));
p = XVECTOR (XCDR (address));
cp = (unsigned char *) &sa->sa_family + sizeof (sa->sa_family);
break;
i = 0;
while (i < len)
- p->contents[i++] = make_number (*cp++);
+ p->contents[i++] = make_fixnum (*cp++);
return address;
}
static Lisp_Object
conv_addrinfo_to_lisp (struct addrinfo *res)
{
- Lisp_Object protocol = make_number (res->ai_protocol);
+ Lisp_Object protocol = make_fixnum (res->ai_protocol);
eassert (XINT (protocol) == res->ai_protocol);
return Fcons (protocol, conv_sockaddr_to_lisp (res->ai_addr, res->ai_addrlen));
}
return sizeof (struct sockaddr_un);
}
#endif
- else if (CONSP (address) && TYPE_RANGED_INTEGERP (int, XCAR (address))
+ else if (CONSP (address) && TYPE_RANGED_FIXNUMP (int, XCAR (address))
&& VECTORP (XCDR (address)))
{
struct sockaddr *sa;
hostport = XINT (p->contents[--len]);
sin6->sin6_port = htons (hostport);
for (i = 0; i < len; i++)
- if (INTEGERP (p->contents[i]))
+ if (FIXNUMP (p->contents[i]))
{
int j = XFASTINT (p->contents[i]) & 0xffff;
ip6[i] = ntohs (j);
}
for (i = 0; i < len; i++)
- if (INTEGERP (p->contents[i]))
+ if (FIXNUMP (p->contents[i]))
*cp++ = XFASTINT (p->contents[i]) & 0xff;
}
case SOPT_INT:
{
int optval;
- if (TYPE_RANGED_INTEGERP (int, val))
+ if (TYPE_RANGED_FIXNUMP (int, val))
optval = XINT (val);
else
error ("Bad option value for %s", name);
linger.l_onoff = 1;
linger.l_linger = 0;
- if (TYPE_RANGED_INTEGERP (int, val))
+ if (TYPE_RANGED_FIXNUMP (int, val))
linger.l_linger = XINT (val);
else
linger.l_onoff = NILP (val) ? 0 : 1;
if (NILP (Fplist_member (contact, QCspeed)))
error (":speed not specified");
if (!NILP (Fplist_get (contact, QCspeed)))
- CHECK_NUMBER (Fplist_get (contact, QCspeed));
+ CHECK_FIXNUM (Fplist_get (contact, QCspeed));
name = Fplist_get (contact, QCname);
if (NILP (name))
DECLARE_POINTER_ALIAS (psa1, struct sockaddr, &sa1);
if (getsockname (s, psa1, &len1) == 0)
{
- Lisp_Object service = make_number (ntohs (sa1.sin_port));
+ Lisp_Object service = make_fixnum (ntohs (sa1.sin_port));
contact = Fplist_put (contact, QCservice, service);
/* Save the port number so that we can stash it in
the process object later. */
if (!get_lisp_to_sockaddr_size (address, &family))
error ("Malformed :address");
- addrinfos = list1 (Fcons (make_number (any_protocol), address));
+ addrinfos = list1 (Fcons (make_fixnum (any_protocol), address));
goto open_socket;
}
#endif
else if (EQ (tem, Qipv4))
family = AF_INET;
- else if (TYPE_RANGED_INTEGERP (int, tem))
+ else if (TYPE_RANGED_FIXNUMP (int, tem))
family = XINT (tem);
else
error ("Unknown address family");
CHECK_STRING (service);
if (sizeof address_un.sun_path <= SBYTES (service))
error ("Service name too long");
- addrinfos = list1 (Fcons (make_number (any_protocol), service));
+ addrinfos = list1 (Fcons (make_fixnum (any_protocol), service));
goto open_socket;
}
#endif
portstring = "0";
portstringlen = 1;
}
- else if (INTEGERP (service))
+ else if (FIXNUMP (service))
{
portstring = portbuf;
portstringlen = sprintf (portbuf, "%"pI"d", XINT (service));
if (EQ (service, Qt))
port = 0;
- else if (INTEGERP (service))
+ else if (FIXNUMP (service))
port = XINT (service);
else
{
/* :server QLEN */
p->is_server = !NILP (server);
- if (TYPE_RANGED_INTEGERP (int, server))
+ if (TYPE_RANGED_FIXNUMP (int, server))
p->backlog = XINT (server);
/* :nowait BOOL */
{
if (flags & 1)
{
- elt = Fcons (make_number (fnum), elt);
+ elt = Fcons (make_fixnum (fnum), elt);
}
}
}
#if defined (SIOCGIFHWADDR) && defined (HAVE_STRUCT_IFREQ_IFR_HWADDR)
if (ioctl (s, SIOCGIFHWADDR, &rq) == 0)
{
- Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
+ Lisp_Object hwaddr = Fmake_vector (make_fixnum (6), Qnil);
register struct Lisp_Vector *p = XVECTOR (hwaddr);
int n;
any = 1;
for (n = 0; n < 6; n++)
- p->contents[n] = make_number (((unsigned char *)
+ p->contents[n] = make_fixnum (((unsigned char *)
&rq.ifr_hwaddr.sa_data[0])
[n]);
- elt = Fcons (make_number (rq.ifr_hwaddr.sa_family), hwaddr);
+ elt = Fcons (make_fixnum (rq.ifr_hwaddr.sa_family), hwaddr);
}
#elif defined (HAVE_GETIFADDRS) && defined (LLADDR)
if (getifaddrs (&ifap) != -1)
{
- Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
+ Lisp_Object hwaddr = Fmake_vector (make_fixnum (6), Qnil);
register struct Lisp_Vector *p = XVECTOR (hwaddr);
struct ifaddrs *it;
memcpy (linkaddr, LLADDR (sdl), sdl->sdl_alen);
for (n = 0; n < 6; n++)
- p->contents[n] = make_number (linkaddr[n]);
+ p->contents[n] = make_fixnum (linkaddr[n]);
- elt = Fcons (make_number (it->ifa_addr->sa_family), hwaddr);
+ elt = Fcons (make_fixnum (it->ifa_addr->sa_family), hwaddr);
break;
}
}
if (!NILP (millisec))
{ /* Obsolete calling convention using integers rather than floats. */
- CHECK_NUMBER (millisec);
+ CHECK_FIXNUM (millisec);
if (NILP (seconds))
seconds = make_float (XINT (millisec) / 1000.0);
else
{
- CHECK_NUMBER (seconds);
+ CHECK_FIXNUM (seconds);
seconds = make_float (XINT (millisec) / 1000.0 + XINT (seconds));
}
}
if (!NILP (seconds))
{
- if (INTEGERP (seconds))
+ if (FIXNUMP (seconds))
{
if (XINT (seconds) > 0)
{
Qnil,
!NILP (process) ? XPROCESS (process) : NULL,
(NILP (just_this_one) ? 0
- : !INTEGERP (just_this_one) ? 1 : -1))
+ : !FIXNUMP (just_this_one) ? 1 : -1))
<= 0)
? Qnil : Qt);
}
if (!would_block (code) && !NILP (ps->log))
call3 (ps->log, server, Qnil,
concat3 (build_string ("accept failed with code"),
- Fnumber_to_string (make_number (code)),
+ Fnumber_to_string (make_fixnum (code)),
build_string ("\n")));
return;
}
args[nargs++] = procname_format_in;
nargs++;
unsigned char *ip = (unsigned char *)&saddr.in.sin_addr.s_addr;
- service = make_number (ntohs (saddr.in.sin_port));
+ service = make_fixnum (ntohs (saddr.in.sin_port));
for (int i = 0; i < 4; i++)
- args[nargs++] = make_number (ip[i]);
+ args[nargs++] = make_fixnum (ip[i]);
args[nargs++] = service;
}
break;
args[nargs++] = procname_format_in6;
nargs++;
DECLARE_POINTER_ALIAS (ip6, uint16_t, &saddr.in6.sin6_addr);
- service = make_number (ntohs (saddr.in.sin_port));
+ service = make_fixnum (ntohs (saddr.in.sin_port));
for (int i = 0; i < 8; i++)
- args[nargs++] = make_number (ip6[i]);
+ args[nargs++] = make_fixnum (ip6[i]);
args[nargs++] = service;
}
break;
default:
args[nargs++] = procname_format_default;
nargs++;
- args[nargs++] = make_number (connect_counter);
+ args[nargs++] = make_fixnum (connect_counter);
break;
}
deactivate_process (proc);
if (EQ (XPROCESS (proc)->status, Qrun))
pset_status (XPROCESS (proc),
- list2 (Qexit, make_number (0)));
+ list2 (Qexit, make_fixnum (0)));
}
else
{
update_status (XPROCESS (proc));
if (EQ (XPROCESS (proc)->status, Qrun))
pset_status (XPROCESS (proc),
- list2 (Qexit, make_number (256)));
+ list2 (Qexit, make_fixnum (256)));
}
}
if (FD_ISSET (channel, &Writeok)
else
{
p->tick = ++process_tick;
- pset_status (p, list2 (Qfailed, make_number (xerrno)));
+ pset_status (p, list2 (Qfailed, make_fixnum (xerrno)));
}
deactivate_process (proc);
if (!NILP (addrinfos))
cmd_error_internal (error_val, "error in process filter: ");
Vinhibit_quit = Qt;
update_echo_area ();
- Fsleep_for (make_number (2), Qnil);
+ Fsleep_for (make_fixnum (2), Qnil);
return Qt;
}
/* If the restriction isn't what it should be, set it. */
if (old_begv != BEGV || old_zv != ZV)
- Fnarrow_to_region (make_number (old_begv), make_number (old_zv));
+ Fnarrow_to_region (make_fixnum (old_begv), make_fixnum (old_zv));
bset_read_only (current_buffer, old_read_only);
SET_PT_BOTH (opoint, opoint_byte);
obj = make_unibyte_string (buf, len);
}
- entry = Fcons (obj, Fcons (make_number (offset), make_number (len)));
+ entry = Fcons (obj, Fcons (make_fixnum (offset), make_fixnum (len)));
if (front)
pset_write_queue (p, Fcons (entry, p->write_queue));
else if (errno == EPIPE)
{
p->raw_status_new = 0;
- pset_status (p, list2 (Qexit, make_number (256)));
+ pset_status (p, list2 (Qexit, make_fixnum (256)));
p->tick = ++process_tick;
deactivate_process (proc);
error ("process %s no longer connected to pipe; closed it",
if (gid == p->pid)
return Qnil;
if (gid != -1)
- return make_number (gid);
+ return make_fixnum (gid);
return Qt;
}
\f
tem = string_to_number (SSDATA (process), 10, S2N_OVERFLOW_TO_FLOAT);
process = tem;
}
- else if (!NUMBERP (process))
+ else if (!FIXED_OR_FLOATP (process))
process = get_process (process);
if (NILP (process))
return process;
- if (NUMBERP (process))
+ if (FIXED_OR_FLOATP (process))
CONS_TO_INTEGER (process, pid_t, pid);
else
{
error ("Cannot signal process %s", SDATA (XPROCESS (process)->name));
}
- if (INTEGERP (sigcode))
+ if (FIXNUMP (sigcode))
{
CHECK_TYPE_RANGED_INTEGER (int, sigcode);
signo = XINT (sigcode);
error ("Undefined signal name %s", name);
}
- return make_number (kill (pid, signo));
+ return make_fixnum (kill (pid, signo));
}
DEFUN ("process-send-eof", Fprocess_send_eof, Sprocess_send_eof, 0, 1, 0,
if (! CONSP (head))
continue;
xpid = XCAR (head);
- if (all_pids_are_fixnums ? INTEGERP (xpid) : NUMBERP (xpid))
+ if (all_pids_are_fixnums ? FIXNUMP (xpid) : FIXED_OR_FLOATP (xpid))
{
pid_t deleted_pid;
- if (INTEGERP (xpid))
+ if (FIXNUMP (xpid))
deleted_pid = XINT (xpid);
else
deleted_pid = XFLOAT_DATA (xpid);
cmd_error_internal (error_val, "error in process sentinel: ");
Vinhibit_quit = Qt;
update_echo_area ();
- Fsleep_for (make_number (2), Qnil);
+ Fsleep_for (make_fixnum (2), Qnil);
return Qt;
}
ptrdiff_t i = ASIZE (h->key_and_value) >> 1;
while (i > 0)
set_hash_key_slot (h, --i,
- Fmake_vector (make_number (max_stack_depth), Qnil));
+ Fmake_vector (make_fixnum (max_stack_depth), Qnil));
return log;
}
{
EMACS_INT old_val = XINT (HASH_VALUE (log, j));
EMACS_INT new_val = saturated_add (old_val, count);
- set_hash_value_slot (log, j, make_number (new_val));
+ set_hash_value_slot (log, j, make_fixnum (new_val));
}
else
{ /* BEWARE! hash_put in general can allocate memory.
But currently it only does that if log->next_free is -1. */
eassert (0 <= log->next_free);
- ptrdiff_t j = hash_put (log, backtrace, make_number (count), hash);
+ ptrdiff_t j = hash_put (log, backtrace, make_fixnum (count), hash);
/* Let's make sure we've put `backtrace' right where it
already was to start with. */
eassert (index == j);
struct timespec interval;
int billion = 1000000000;
- if (! RANGED_INTEGERP (1, sampling_interval,
+ if (! RANGED_FIXNUMP (1, sampling_interval,
(TYPE_MAXIMUM (time_t) < EMACS_INT_MAX / billion
? ((EMACS_INT) TYPE_MAXIMUM (time_t) * billion
+ (billion - 1))
cpu_log = (profiler_cpu_running
? make_log (profiler_log_size, profiler_max_stack_depth)
: Qnil);
- Fputhash (Fmake_vector (make_number (1), QAutomatic_GC),
- make_number (cpu_gc_count),
+ Fputhash (Fmake_vector (make_fixnum (1), QAutomatic_GC),
+ make_fixnum (cpu_gc_count),
result);
cpu_gc_count = 0;
return result;
eassert (!cp->busy);
cp->regexp = Qnil;
- cp->buf.translate = (! NILP (translate) ? translate : make_number (0));
+ cp->buf.translate = (! NILP (translate) ? translate : make_fixnum (0));
cp->posix = posix;
cp->buf.multibyte = STRING_MULTIBYTE (pattern);
cp->buf.charset_unibyte = charset_unibyte;
&& !cp->busy
&& STRING_MULTIBYTE (cp->regexp) == STRING_MULTIBYTE (pattern)
&& !NILP (Fstring_equal (cp->regexp, pattern))
- && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_number (0)))
+ && EQ (cp->buf.translate, (! NILP (translate) ? translate : make_fixnum (0)))
&& cp->posix == posix
&& (EQ (cp->syntax_table, Qt)
|| EQ (cp->syntax_table, BVAR (current_buffer, syntax_table)))
{
ptrdiff_t len = SCHARS (string);
- CHECK_NUMBER (start);
+ CHECK_FIXNUM (start);
pos = XINT (start);
if (pos < 0 && -pos <= len)
pos = len + pos;
= string_byte_to_char (string, search_regs.end[i]);
}
- return make_number (string_byte_to_char (string, val));
+ return make_fixnum (string_byte_to_char (string, val));
}
DEFUN ("string-match", Fstring_match, Sstring_match, 2, 3, 0,
if (!NILP (count))
{
- CHECK_NUMBER (count);
+ CHECK_FIXNUM (count);
n *= XINT (count);
}
}
else
{
- CHECK_NUMBER_COERCE_MARKER (bound);
+ CHECK_FIXNUM_COERCE_MARKER (bound);
lim = XINT (bound);
if (n > 0 ? lim < PT : lim > PT)
error ("Invalid search bound (wrong side of point)");
eassert (BEGV <= np && np <= ZV);
SET_PT (np);
- return make_number (np);
+ return make_fixnum (np);
}
\f
/* Return true if REGEXP it matches just one constant string. */
if (! NILP (trt)) \
{ \
Lisp_Object temp; \
- temp = Faref (trt, make_number (d)); \
- if (INTEGERP (temp)) \
+ temp = Faref (trt, make_fixnum (d)); \
+ if (FIXNUMP (temp)) \
out = XINT (temp); \
else \
out = d; \
sub = 0;
else
{
- CHECK_NUMBER (subexp);
+ CHECK_FIXNUM (subexp);
if (! (0 <= XINT (subexp) && XINT (subexp) < search_regs.num_regs))
- args_out_of_range (subexp, make_number (search_regs.num_regs));
+ args_out_of_range (subexp, make_fixnum (search_regs.num_regs));
sub = XINT (subexp);
}
if (search_regs.start[sub] < BEGV
|| search_regs.start[sub] > search_regs.end[sub]
|| search_regs.end[sub] > ZV)
- args_out_of_range (make_number (search_regs.start[sub]),
- make_number (search_regs.end[sub]));
+ args_out_of_range (make_fixnum (search_regs.start[sub]),
+ make_fixnum (search_regs.end[sub]));
}
else
{
if (search_regs.start[sub] < 0
|| search_regs.start[sub] > search_regs.end[sub]
|| search_regs.end[sub] > SCHARS (string))
- args_out_of_range (make_number (search_regs.start[sub]),
- make_number (search_regs.end[sub]));
+ args_out_of_range (make_fixnum (search_regs.start[sub]),
+ make_fixnum (search_regs.end[sub]));
}
if (NILP (fixedcase))
{
Lisp_Object before, after;
- before = Fsubstring (string, make_number (0),
- make_number (search_regs.start[sub]));
- after = Fsubstring (string, make_number (search_regs.end[sub]), Qnil);
+ before = Fsubstring (string, make_fixnum (0),
+ make_fixnum (search_regs.start[sub]));
+ after = Fsubstring (string, make_fixnum (search_regs.end[sub]), Qnil);
/* Substitute parts of the match into NEWTEXT
if desired. */
middle = Qnil;
accum = concat3 (accum, middle,
Fsubstring (string,
- make_number (substart),
- make_number (subend)));
+ make_fixnum (substart),
+ make_fixnum (subend)));
lastpos = pos;
lastpos_byte = pos_byte;
}
}
if (case_action == all_caps)
- Fupcase_region (make_number (search_regs.start[sub]),
- make_number (newpoint),
+ Fupcase_region (make_fixnum (search_regs.start[sub]),
+ make_fixnum (newpoint),
Qnil);
else if (case_action == cap_initial)
- Fupcase_initials_region (make_number (search_regs.start[sub]),
- make_number (newpoint));
+ Fupcase_initials_region (make_fixnum (search_regs.start[sub]),
+ make_fixnum (newpoint));
if (search_regs.start[sub] != sub_start
|| search_regs.end[sub] != sub_end
{
EMACS_INT n;
- CHECK_NUMBER (num);
+ CHECK_FIXNUM (num);
n = XINT (num);
if (n < 0)
- args_out_of_range (num, make_number (0));
+ args_out_of_range (num, make_fixnum (0));
if (search_regs.num_regs <= 0)
error ("No match data, because no search succeeded");
if (n >= search_regs.num_regs
|| search_regs.start[n] < 0)
return Qnil;
- return (make_number ((beginningp) ? search_regs.start[n]
+ return (make_fixnum ((beginningp) ? search_regs.start[n]
: search_regs.end[n]));
}
{
data[2 * i] = Fmake_marker ();
Fset_marker (data[2 * i],
- make_number (start),
+ make_fixnum (start),
last_thing_searched);
data[2 * i + 1] = Fmake_marker ();
Fset_marker (data[2 * i + 1],
- make_number (search_regs.end[i]),
+ make_fixnum (search_regs.end[i]),
last_thing_searched);
}
else
XSETBUFFER (last_thing_searched, XMARKER (marker)->buffer);
}
- CHECK_NUMBER_COERCE_MARKER (marker);
+ CHECK_FIXNUM_COERCE_MARKER (marker);
from = marker;
if (!NILP (reseat) && MARKERP (m))
if (MARKERP (marker) && XMARKER (marker)->buffer == 0)
XSETFASTINT (marker, 0);
- CHECK_NUMBER_COERCE_MARKER (marker);
+ CHECK_FIXNUM_COERCE_MARKER (marker);
if ((XINT (from) < 0
? TYPE_MINIMUM (regoff_t) <= XINT (from)
: XINT (from) <= TYPE_MAXIMUM (regoff_t))
NULL, true);
if (shortage != 0 || i >= nl_count_cache)
break;
- ASET (cache_newlines, i, make_number (found - 1));
+ ASET (cache_newlines, i, make_fixnum (found - 1));
}
/* Fill the rest of slots with an invalid position. */
for ( ; i < nl_count_cache; i++)
- ASET (cache_newlines, i, make_number (-1));
+ ASET (cache_newlines, i, make_fixnum (-1));
}
/* Now do the same, but without using the cache. */
NULL, true);
if (shortage != 0 || i >= nl_count_buf)
break;
- ASET (buf_newlines, i, make_number (found - 1));
+ ASET (buf_newlines, i, make_fixnum (found - 1));
}
for ( ; i < nl_count_buf; i++)
- ASET (buf_newlines, i, make_number (-1));
+ ASET (buf_newlines, i, make_fixnum (-1));
}
/* Construct the value and return it. */
/* Volume must be in the range 0..100 or unspecified. */
if (!NILP (attrs[SOUND_VOLUME]))
{
- if (INTEGERP (attrs[SOUND_VOLUME]))
+ if (FIXNUMP (attrs[SOUND_VOLUME]))
{
EMACS_INT volume = XINT (attrs[SOUND_VOLUME]);
if (! (0 <= volume && volume <= 100))
/* Set up a device. */
current_sound_device->file = attrs[SOUND_DEVICE];
- if (INTEGERP (attrs[SOUND_VOLUME]))
+ if (FIXNUMP (attrs[SOUND_VOLUME]))
current_sound_device->volume = XFASTINT (attrs[SOUND_VOLUME]);
else if (FLOATP (attrs[SOUND_VOLUME]))
current_sound_device->volume = XFLOAT_DATA (attrs[SOUND_VOLUME]) * 100;
file = Fexpand_file_name (attrs[SOUND_FILE], Vdata_directory);
file = ENCODE_FILE (file);
- if (INTEGERP (attrs[SOUND_VOLUME]))
+ if (FIXNUMP (attrs[SOUND_VOLUME]))
{
ui_volume_tmp = XFASTINT (attrs[SOUND_VOLUME]);
}
{
EMACS_INT modiffs = CHARS_MODIFF;
safe_call1 (Qinternal__syntax_propertize,
- make_number (min (zv, 1 + charpos)));
+ make_fixnum (min (zv, 1 + charpos)));
if (modiffs != CHARS_MODIFF)
error ("parse-sexp-propertize-function modified the buffer!");
if (syntax_propertize__done <= charpos
if (!NILP (Vcomment_use_syntax_ppss))
{
EMACS_INT modiffs = CHARS_MODIFF;
- Lisp_Object ppss = call1 (Qsyntax_ppss, make_number (pos));
+ Lisp_Object ppss = call1 (Qsyntax_ppss, make_fixnum (pos));
if (modiffs != CHARS_MODIFF)
error ("syntax-ppss modified the buffer!");
TEMP_SET_PT_BOTH (opoint, opoint_byte);
- Lisp_Object boc = Fnth (make_number (8), ppss);
- if (NUMBERP (boc))
+ Lisp_Object boc = Fnth (make_fixnum (8), ppss);
+ if (FIXED_OR_FLOATP (boc))
{
find_start_value = XINT (boc);
find_start_value_byte = CHAR_TO_BYTE (find_start_value);
CHECK_CHARACTER (character);
char_int = XINT (character);
SETUP_BUFFER_SYNTAX_TABLE ();
- return make_number (syntax_code_spec[SYNTAX (char_int)]);
+ return make_fixnum (syntax_code_spec[SYNTAX (char_int)]);
}
DEFUN ("matching-paren", Fmatching_paren, Smatching_paren, 1, 1, 0,
return AREF (Vsyntax_code_object, val);
else
/* Since we can't use a shared object, let's make a new one. */
- return Fcons (make_number (val), match);
+ return Fcons (make_fixnum (val), match);
}
/* I really don't know why this is interactive
first = XCAR (value);
match_lisp = XCDR (value);
- if (!INTEGERP (first) || !(NILP (match_lisp) || CHARACTERP (match_lisp)))
+ if (!FIXNUMP (first) || !(NILP (match_lisp) || CHARACTERP (match_lisp)))
{
insert_string ("invalid");
return syntax;
func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch0);
if (! NILP (Ffboundp (func)))
{
- pos = call2 (func, make_number (from - 1), make_number (end));
- if (INTEGERP (pos) && from < XINT (pos) && XINT (pos) <= ZV)
+ pos = call2 (func, make_fixnum (from - 1), make_fixnum (end));
+ if (FIXNUMP (pos) && from < XINT (pos) && XINT (pos) <= ZV)
{
from = XINT (pos);
from_byte = CHAR_TO_BYTE (from);
func = CHAR_TABLE_REF (Vfind_word_boundary_function_table, ch1);
if (! NILP (Ffboundp (func)))
{
- pos = call2 (func, make_number (from), make_number (beg));
- if (INTEGERP (pos) && BEGV <= XINT (pos) && XINT (pos) < from)
+ pos = call2 (func, make_fixnum (from), make_fixnum (beg));
+ if (FIXNUMP (pos) && BEGV <= XINT (pos) && XINT (pos) < from)
{
from = XINT (pos);
from_byte = CHAR_TO_BYTE (from);
if (NILP (arg))
XSETFASTINT (arg, 1);
else
- CHECK_NUMBER (arg);
+ CHECK_FIXNUM (arg);
val = orig_val = scan_words (PT, XINT (arg));
if (! orig_val)
val = XINT (arg) > 0 ? ZV : BEGV;
/* Avoid jumping out of an input field. */
- tmp = Fconstrain_to_field (make_number (val), make_number (PT),
+ tmp = Fconstrain_to_field (make_fixnum (val), make_fixnum (PT),
Qnil, Qnil, Qnil);
val = XFASTINT (tmp);
if (NILP (lim))
XSETINT (lim, forwardp ? ZV : BEGV);
else
- CHECK_NUMBER_COERCE_MARKER (lim);
+ CHECK_FIXNUM_COERCE_MARKER (lim);
/* In any case, don't allow scan outside bounds of buffer. */
if (XINT (lim) > ZV)
error ("Invalid ISO C character class");
if (cc != -1)
{
- iso_classes = Fcons (make_number (cc), iso_classes);
+ iso_classes = Fcons (make_fixnum (cc), iso_classes);
i_byte = ch - str;
continue;
}
error ("Invalid ISO C character class");
if (cc != -1)
{
- iso_classes = Fcons (make_number (cc), iso_classes);
+ iso_classes = Fcons (make_fixnum (cc), iso_classes);
i_byte = ch - str;
continue;
}
SET_PT_BOTH (pos, pos_byte);
SAFE_FREE ();
- return make_number (PT - start_point);
+ return make_fixnum (PT - start_point);
}
}
if (NILP (lim))
XSETINT (lim, forwardp ? ZV : BEGV);
else
- CHECK_NUMBER_COERCE_MARKER (lim);
+ CHECK_FIXNUM_COERCE_MARKER (lim);
/* In any case, don't allow scan outside bounds of buffer. */
if (XINT (lim) > ZV)
XSETFASTINT (lim, BEGV);
if (forwardp ? (PT >= XFASTINT (lim)) : (PT <= XFASTINT (lim)))
- return make_number (0);
+ return make_fixnum (0);
multibyte = (!NILP (BVAR (current_buffer, enable_multibyte_characters))
&& (XINT (lim) - PT != CHAR_TO_BYTE (XINT (lim)) - PT_BYTE));
done:
SET_PT_BOTH (pos, pos_byte);
- return make_number (PT - start_point);
+ return make_fixnum (PT - start_point);
}
}
int dummy2;
unsigned short int quit_count = 0;
- CHECK_NUMBER (count);
+ CHECK_FIXNUM (count);
count1 = XINT (count);
stop = count1 > 0 ? ZV : BEGV;
if (depth < min_depth)
xsignal3 (Qscan_error,
build_string ("Containing expression ends prematurely"),
- make_number (last_good), make_number (from));
+ make_fixnum (last_good), make_fixnum (from));
break;
case Sstring:
if (depth < min_depth)
xsignal3 (Qscan_error,
build_string ("Containing expression ends prematurely"),
- make_number (last_good), make_number (from));
+ make_fixnum (last_good), make_fixnum (from));
break;
case Sendcomment:
lose:
xsignal3 (Qscan_error,
build_string ("Unbalanced parentheses"),
- make_number (last_good), make_number (from));
+ make_fixnum (last_good), make_fixnum (from));
}
DEFUN ("scan-lists", Fscan_lists, Sscan_lists, 3, 3, 0,
that point is zero, and signal an error if the depth is nonzero. */)
(Lisp_Object from, Lisp_Object count, Lisp_Object depth)
{
- CHECK_NUMBER (from);
- CHECK_NUMBER (count);
- CHECK_NUMBER (depth);
+ CHECK_FIXNUM (from);
+ CHECK_FIXNUM (count);
+ CHECK_FIXNUM (depth);
return scan_lists (XINT (from), XINT (count), XINT (depth), 0);
}
but before count is used up, nil is returned. */)
(Lisp_Object from, Lisp_Object count)
{
- CHECK_NUMBER (from);
- CHECK_NUMBER (count);
+ CHECK_FIXNUM (from);
+ CHECK_FIXNUM (count);
return scan_lists (XINT (from), XINT (count), 0, 1);
}
while (!NILP (tem)) /* >= second enclosing sexps. */
{
Lisp_Object temhd = Fcar (tem);
- if (RANGED_INTEGERP (PTRDIFF_MIN, temhd, PTRDIFF_MAX))
+ if (RANGED_FIXNUMP (PTRDIFF_MIN, temhd, PTRDIFF_MAX))
curlevel->last = XINT (temhd);
if (++curlevel == endlevel)
curlevel--; /* error ("Nesting too deep for parser"); */
state->location_byte = from_byte;
state->levelstarts = Qnil;
while (curlevel > levelstart)
- state->levelstarts = Fcons (make_number ((--curlevel)->last),
+ state->levelstarts = Fcons (make_fixnum ((--curlevel)->last),
state->levelstarts);
state->prev_syntax = (SYNTAX_FLAGS_COMSTARTEND_FIRST (prev_from_syntax)
|| state->quoted) ? prev_from_syntax : Smax;
external = Fcdr (external);
tem = Fcar (external);
state->incomment = (!NILP (tem)
- ? (INTEGERP (tem) ? XINT (tem) : -1)
+ ? (FIXNUMP (tem) ? XINT (tem) : -1)
: 0);
external = Fcdr (external);
tem = Fcar (external);
state->comstyle = (NILP (tem)
? 0
- : (RANGED_INTEGERP (0, tem, ST_COMMENT_STYLE)
+ : (RANGED_FIXNUMP (0, tem, ST_COMMENT_STYLE)
? XINT (tem)
: ST_COMMENT_STYLE));
external = Fcdr (external);
tem = Fcar (external);
state->comstr_start =
- RANGED_INTEGERP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1;
+ RANGED_FIXNUMP (PTRDIFF_MIN, tem, PTRDIFF_MAX) ? XINT (tem) : -1;
external = Fcdr (external);
tem = Fcar (external);
state->levelstarts = tem;
if (!NILP (targetdepth))
{
- CHECK_NUMBER (targetdepth);
+ CHECK_FIXNUM (targetdepth);
target = XINT (targetdepth);
}
else
SET_PT_BOTH (state.location, state.location_byte);
return
- Fcons (make_number (state.depth),
+ Fcons (make_fixnum (state.depth),
Fcons (state.prevlevelstart < 0
- ? Qnil : make_number (state.prevlevelstart),
+ ? Qnil : make_fixnum (state.prevlevelstart),
Fcons (state.thislevelstart < 0
- ? Qnil : make_number (state.thislevelstart),
+ ? Qnil : make_fixnum (state.thislevelstart),
Fcons (state.instring >= 0
? (state.instring == ST_STRING_STYLE
- ? Qt : make_number (state.instring)) : Qnil,
+ ? Qt : make_fixnum (state.instring)) : Qnil,
Fcons (state.incomment < 0 ? Qt :
(state.incomment == 0 ? Qnil :
- make_number (state.incomment)),
+ make_fixnum (state.incomment)),
Fcons (state.quoted ? Qt : Qnil,
- Fcons (make_number (state.mindepth),
+ Fcons (make_fixnum (state.mindepth),
Fcons ((state.comstyle
? (state.comstyle == ST_COMMENT_STYLE
? Qsyntax_table
- : make_number (state.comstyle))
+ : make_fixnum (state.comstyle))
: Qnil),
Fcons (((state.incomment
|| (state.instring >= 0))
- ? make_number (state.comstr_start)
+ ? make_fixnum (state.comstr_start)
: Qnil),
Fcons (state.levelstarts,
Fcons (state.prev_syntax == Smax
? Qnil
- : make_number (state.prev_syntax),
+ : make_fixnum (state.prev_syntax),
Qnil)))))))))));
}
\f
/* Create objects which can be shared among syntax tables. */
Vsyntax_code_object = make_uninit_vector (Smax);
for (i = 0; i < Smax; i++)
- ASET (Vsyntax_code_object, i, Fcons (make_number (i), Qnil));
+ ASET (Vsyntax_code_object, i, Fcons (make_fixnum (i), Qnil));
/* Now we are ready to set up this property, so we can
create syntax tables. */
- Fput (Qsyntax_table, Qchar_table_extra_slots, make_number (0));
+ Fput (Qsyntax_table, Qchar_table_extra_slots, make_fixnum (0));
temp = AREF (Vsyntax_code_object, Swhitespace);
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '%', temp);
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '(',
- Fcons (make_number (Sopen), make_number (')')));
+ Fcons (make_fixnum (Sopen), make_fixnum (')')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ')',
- Fcons (make_number (Sclose), make_number ('(')));
+ Fcons (make_fixnum (Sclose), make_fixnum ('(')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '[',
- Fcons (make_number (Sopen), make_number (']')));
+ Fcons (make_fixnum (Sopen), make_fixnum (']')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, ']',
- Fcons (make_number (Sclose), make_number ('[')));
+ Fcons (make_fixnum (Sclose), make_fixnum ('[')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '{',
- Fcons (make_number (Sopen), make_number ('}')));
+ Fcons (make_fixnum (Sopen), make_fixnum ('}')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '}',
- Fcons (make_number (Sclose), make_number ('{')));
+ Fcons (make_fixnum (Sclose), make_fixnum ('{')));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '"',
- Fcons (make_number (Sstring), Qnil));
+ Fcons (make_fixnum (Sstring), Qnil));
SET_RAW_SYNTAX_ENTRY (Vstandard_syntax_table, '\\',
- Fcons (make_number (Sescape), Qnil));
+ Fcons (make_fixnum (Sescape), Qnil));
temp = AREF (Vsyntax_code_object, Ssymbol);
for (i = 0; i < 10; i++)
tem = Fplist_get (contact, QCspeed);
else
tem = Fplist_get (p->childp, QCspeed);
- CHECK_NUMBER (tem);
+ CHECK_FIXNUM (tem);
err = cfsetspeed (&attr, XINT (tem));
if (err != 0)
report_file_error ("Failed cfsetspeed", tem);
else
tem = Fplist_get (p->childp, QCbytesize);
if (NILP (tem))
- tem = make_number (8);
- CHECK_NUMBER (tem);
+ tem = make_fixnum (8);
+ CHECK_FIXNUM (tem);
if (XINT (tem) != 7 && XINT (tem) != 8)
error (":bytesize must be nil (8), 7, or 8");
summary[0] = XINT (tem) + '0';
else
tem = Fplist_get (p->childp, QCstopbits);
if (NILP (tem))
- tem = make_number (1);
- CHECK_NUMBER (tem);
+ tem = make_fixnum (1);
+ CHECK_FIXNUM (tem);
if (XINT (tem) != 1 && XINT (tem) != 2)
error (":stopbits must be nil (1 stopbit), 1, or 2");
summary[2] = XINT (tem) + '0';
Lisp_Object decoded_cmd;
ptrdiff_t count;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
CONS_TO_INTEGER (pid, pid_t, proc_id);
sprintf (procfn, "/proc/%"pMd, proc_id);
if (stat (procfn, &st) < 0)
ltime_from_jiffies (cstime + cutime,
clocks_per_sec)),
attrs);
- attrs = Fcons (Fcons (Qpri, make_number (priority)), attrs);
- attrs = Fcons (Fcons (Qnice, make_number (niceness)), attrs);
+ attrs = Fcons (Fcons (Qpri, make_fixnum (priority)), attrs);
+ attrs = Fcons (Fcons (Qnice, make_fixnum (niceness)), attrs);
attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (thcount)),
attrs);
tnow = current_timespec ();
Lisp_Object decoded_cmd;
ptrdiff_t count;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
CONS_TO_INTEGER (pid, pid_t, proc_id);
sprintf (procfn, "/proc/%"pMd, proc_id);
if (stat (procfn, &st) < 0)
attrs = Fcons (Fcons (Qtime, make_lisp_time (pinfo.pr_time)), attrs);
attrs = Fcons (Fcons (Qctime, make_lisp_time (pinfo.pr_ctime)), attrs);
- attrs = Fcons (Fcons (Qpri, make_number (pinfo.pr_lwp.pr_pri)), attrs);
- attrs = Fcons (Fcons (Qnice, make_number (pinfo.pr_lwp.pr_nice)), attrs);
+ attrs = Fcons (Fcons (Qpri, make_fixnum (pinfo.pr_lwp.pr_pri)), attrs);
+ attrs = Fcons (Fcons (Qnice, make_fixnum (pinfo.pr_lwp.pr_nice)), attrs);
attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (pinfo.pr_nlwp)),
attrs);
Lisp_Object attrs = Qnil;
Lisp_Object decoded_comm;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
CONS_TO_INTEGER (pid, int, proc_id);
mib[3] = proc_id;
attrs = Fcons (Fcons (Qtpgid, make_fixnum_or_float (proc.ki_tpgid)), attrs);
attrs = Fcons (Fcons (Qminflt, make_fixnum_or_float (proc.ki_rusage.ru_minflt)), attrs);
attrs = Fcons (Fcons (Qmajflt, make_fixnum_or_float (proc.ki_rusage.ru_majflt)), attrs);
- attrs = Fcons (Fcons (Qcminflt, make_number (proc.ki_rusage_ch.ru_minflt)), attrs);
- attrs = Fcons (Fcons (Qcmajflt, make_number (proc.ki_rusage_ch.ru_majflt)), attrs);
+ attrs = Fcons (Fcons (Qcminflt, make_fixnum (proc.ki_rusage_ch.ru_minflt)), attrs);
+ attrs = Fcons (Fcons (Qcmajflt, make_fixnum (proc.ki_rusage_ch.ru_majflt)), attrs);
attrs = Fcons (Fcons (Qutime, make_lisp_timeval (proc.ki_rusage.ru_utime)),
attrs);
attrs = Fcons (Fcons (Qthcount, make_fixnum_or_float (proc.ki_numthreads)),
attrs);
- attrs = Fcons (Fcons (Qpri, make_number (proc.ki_pri.pri_native)), attrs);
- attrs = Fcons (Fcons (Qnice, make_number (proc.ki_nice)), attrs);
+ attrs = Fcons (Fcons (Qpri, make_fixnum (proc.ki_pri.pri_native)), attrs);
+ attrs = Fcons (Fcons (Qnice, make_fixnum (proc.ki_nice)), attrs);
attrs = Fcons (Fcons (Qstart, make_lisp_timeval (proc.ki_start)), attrs);
- attrs = Fcons (Fcons (Qvsize, make_number (proc.ki_size >> 10)), attrs);
- attrs = Fcons (Fcons (Qrss, make_number (proc.ki_rssize * pagesize >> 10)),
+ attrs = Fcons (Fcons (Qvsize, make_fixnum (proc.ki_size >> 10)), attrs);
+ attrs = Fcons (Fcons (Qrss, make_fixnum (proc.ki_rssize * pagesize >> 10)),
attrs);
now = current_timespec ();
Lisp_Object attrs = Qnil;
Lisp_Object decoded_comm;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
CONS_TO_INTEGER (pid, int, proc_id);
mib[3] = proc_id;
}
starttime = proc.kp_proc.p_starttime;
- attrs = Fcons (Fcons (Qnice, make_number (proc.kp_proc.p_nice)), attrs);
+ attrs = Fcons (Fcons (Qnice, make_fixnum (proc.kp_proc.p_nice)), attrs);
attrs = Fcons (Fcons (Qstart, make_lisp_timeval (starttime)), attrs);
now = current_timespec ();
char *sequence = tgetstr (keys[i].cap, address);
if (sequence)
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence),
- Fmake_vector (make_number (1),
+ Fmake_vector (make_fixnum (1),
intern (keys[i].name)));
}
/* Define f0 first, so that f10 takes precedence in case the
key sequences happens to be the same. */
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
- Fmake_vector (make_number (1), intern ("f0")));
+ Fmake_vector (make_fixnum (1), intern ("f0")));
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k_semi),
- Fmake_vector (make_number (1), intern ("f10")));
+ Fmake_vector (make_fixnum (1), intern ("f10")));
}
else if (k0)
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (k0),
- Fmake_vector (make_number (1), intern (k0_name)));
+ Fmake_vector (make_fixnum (1), intern (k0_name)));
}
/* Set up cookies for numbered function keys above f10. */
{
sprintf (fkey, "f%d", i);
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence),
- Fmake_vector (make_number (1),
+ Fmake_vector (make_fixnum (1),
intern (fkey)));
}
}
char *sequence = tgetstr (cap2, address); \
if (sequence) \
Fdefine_key (KVAR (kboard, Vinput_decode_map), build_string (sequence), \
- Fmake_vector (make_number (1), \
+ Fmake_vector (make_fixnum (1), \
intern (sym))); \
}
{
struct terminal *t = decode_tty_terminal (terminal);
- return make_number (t ? t->display_info.tty->TN_max_colors : 0);
+ return make_fixnum (t ? t->display_info.tty->TN_max_colors : 0);
}
#ifndef DOS_NT
tem = assq_no_quit (Qtty_color_mode, f->param_alist);
val = CONSP (tem) ? XCDR (tem) : Qnil;
- if (INTEGERP (val))
+ if (FIXNUMP (val))
color_mode = val;
else if (SYMBOLP (tty_color_mode_alist))
{
else
color_mode = Qnil;
- mode = TYPE_RANGED_INTEGERP (int, color_mode) ? XINT (color_mode) : 0;
+ mode = TYPE_RANGED_FIXNUMP (int, color_mode) ? XINT (color_mode) : 0;
if (mode != tty->previous_color_mode)
{
pane_name = first_item[MENU_ITEMS_ITEM_NAME];
/* (menu-item MENU-NAME PANE-NUMBER) */
- menu_object = list3 (Qmenu_item, pane_name, make_number (pane));
+ menu_object = list3 (Qmenu_item, pane_name, make_fixnum (pane));
show_help_echo (help_string ? build_string (help_string) : Qnil,
- Qnil, menu_object, make_number (item));
+ Qnil, menu_object, make_fixnum (item));
}
struct tty_pop_down_menu
case TTYM_NEXT:
case TTYM_PREV:
tty_menu_new_item_coords (f, status, &item_x, &item_y);
- entry = Fcons (make_number (item_x), make_number (item_y));
+ entry = Fcons (make_fixnum (item_x), make_fixnum (item_y));
break;
case TTYM_FAILURE:
struct unimapdesc unimapdesc = { entry_ct, entries };
if (ioctl (fd, GIO_UNIMAP, &unimapdesc) == 0)
{
- glyphtab = Fmake_char_table (Qnil, make_number (-1));
+ glyphtab = Fmake_char_table (Qnil, make_fixnum (-1));
for (int i = 0; i < unimapdesc.entry_ct; i++)
char_table_set (glyphtab, entries[i].unicode,
- make_number (entries[i].fontpos));
+ make_fixnum (entries[i].fontpos));
break;
}
if (errno != ENOMEM)
ptrdiff_t searchpos;
CHECK_STRING_OR_BUFFER (object);
- CHECK_NUMBER_COERCE_MARKER (*begin);
- CHECK_NUMBER_COERCE_MARKER (*end);
+ CHECK_FIXNUM_COERCE_MARKER (*begin);
+ CHECK_FIXNUM_COERCE_MARKER (*end);
/* If we are asked for a point, but from a subr which operates
on a range, then return nothing. */
}
if (!(beg <= position && position <= end))
- args_out_of_range (make_number (position), make_number (position));
+ args_out_of_range (make_fixnum (position), make_fixnum (position));
if (beg == end || !i)
return NULL;
{
struct window *w = 0;
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (NILP (object))
XSETBUFFER (object, current_buffer);
temp = Fnext_overlay_change (position);
if (! NILP (limit))
{
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
if (XINT (limit) < XINT (temp))
temp = limit;
}
temp = Fprevious_overlay_change (position);
if (! NILP (limit))
{
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
if (XINT (limit) > XINT (temp))
temp = limit;
}
if (NILP (position))
{
if (NILP (limit))
- position = make_number (SCHARS (object));
+ position = make_fixnum (SCHARS (object));
else
{
- CHECK_NUMBER (limit);
+ CHECK_FIXNUM (limit);
position = limit;
}
}
Fset_buffer (object);
}
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
initial_value = Fget_char_property (position, prop, object);
if (NILP (limit))
XSETFASTINT (limit, ZV);
else
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
if (XFASTINT (position) >= XFASTINT (limit))
{
if (NILP (position))
{
if (NILP (limit))
- position = make_number (0);
+ position = make_fixnum (0);
else
{
- CHECK_NUMBER (limit);
+ CHECK_FIXNUM (limit);
position = limit;
}
}
Fset_buffer (object);
}
- CHECK_NUMBER_COERCE_MARKER (position);
+ CHECK_FIXNUM_COERCE_MARKER (position);
if (NILP (limit))
XSETFASTINT (limit, BEGV);
else
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
if (XFASTINT (position) <= XFASTINT (limit))
{
else
{
Lisp_Object initial_value
- = Fget_char_property (make_number (XFASTINT (position) - 1),
+ = Fget_char_property (make_fixnum (XFASTINT (position) - 1),
prop, object);
while (true)
else
{
Lisp_Object value
- = Fget_char_property (make_number (XFASTINT (position) - 1),
+ = Fget_char_property (make_fixnum (XFASTINT (position) - 1),
prop, object);
if (!EQ (value, initial_value))
XSETBUFFER (object, current_buffer);
if (!NILP (limit) && !EQ (limit, Qt))
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
i = validate_interval_range (object, &position, &position, soft);
if (!next
|| (next->position
- >= (INTEGERP (limit)
+ >= (FIXNUMP (limit)
? XFASTINT (limit)
: (STRINGP (object)
? SCHARS (object)
: BUF_ZV (XBUFFER (object))))))
return limit;
else
- return make_number (next->position);
+ return make_fixnum (next->position);
}
DEFUN ("next-single-property-change", Fnext_single_property_change,
XSETBUFFER (object, current_buffer);
if (!NILP (limit))
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
i = validate_interval_range (object, &position, &position, soft);
if (!i)
if (!next
|| (next->position
- >= (INTEGERP (limit)
+ >= (FIXNUMP (limit)
? XFASTINT (limit)
: (STRINGP (object)
? SCHARS (object)
: BUF_ZV (XBUFFER (object))))))
return limit;
else
- return make_number (next->position);
+ return make_fixnum (next->position);
}
DEFUN ("previous-property-change", Fprevious_property_change,
XSETBUFFER (object, current_buffer);
if (!NILP (limit))
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
i = validate_interval_range (object, &position, &position, soft);
if (!i)
if (!previous
|| (previous->position + LENGTH (previous)
- <= (INTEGERP (limit)
+ <= (FIXNUMP (limit)
? XFASTINT (limit)
: (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
return limit;
else
- return make_number (previous->position + LENGTH (previous));
+ return make_fixnum (previous->position + LENGTH (previous));
}
DEFUN ("previous-single-property-change", Fprevious_single_property_change,
XSETBUFFER (object, current_buffer);
if (!NILP (limit))
- CHECK_NUMBER_COERCE_MARKER (limit);
+ CHECK_FIXNUM_COERCE_MARKER (limit);
i = validate_interval_range (object, &position, &position, soft);
if (!previous
|| (previous->position + LENGTH (previous)
- <= (INTEGERP (limit)
+ <= (FIXNUMP (limit)
? XFASTINT (limit)
: (STRINGP (object) ? 0 : BUF_BEGV (XBUFFER (object))))))
return limit;
else
- return make_number (previous->position + LENGTH (previous));
+ return make_fixnum (previous->position + LENGTH (previous));
}
\f
/* Used by add-text-properties and add-face-text-property. */
pos = i->position;
if (pos < XINT (start))
pos = XINT (start);
- return make_number (pos);
+ return make_fixnum (pos);
}
i = next_interval (i);
}
{
if (i->position > s)
s = i->position;
- return make_number (s);
+ return make_fixnum (s);
}
i = next_interval (i);
}
text_property_stickiness (Lisp_Object prop, Lisp_Object pos, Lisp_Object buffer)
{
bool ignore_previous_character;
- Lisp_Object prev_pos = make_number (XINT (pos) - 1);
+ Lisp_Object prev_pos = make_fixnum (XINT (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);
if (!i)
return Qnil;
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
{
Lisp_Object dest_start, dest_end;
if (! NILP (plist))
/* Must defer modifications to the interval tree in case
src and dest refer to the same string or buffer. */
- stuff = Fcons (list3 (make_number (p), make_number (p + len), plist),
+ stuff = Fcons (list3 (make_fixnum (p), make_fixnum (p + len), plist),
stuff);
i = next_interval (i);
}
if (!NILP (plist))
- result = Fcons (list3 (make_number (s), make_number (s + len),
+ result = Fcons (list3 (make_fixnum (s), make_fixnum (s + len),
plist),
result);
Lisp_Object item, start, end, plist;
item = XCAR (list);
- start = make_number (XINT (XCAR (item)) + XINT (delta));
- end = make_number (XINT (XCAR (XCDR (item))) + XINT (delta));
+ start = make_fixnum (XINT (XCAR (item)) + XINT (delta));
+ end = make_fixnum (XINT (XCAR (XCDR (item))) + XINT (delta));
plist = XCAR (XCDR (XCDR (item)));
Fadd_text_properties (start, end, plist, object);
hooks = Fnreverse (hooks);
while (! EQ (hooks, Qnil))
{
- call_mod_hooks (Fcar (hooks), make_number (start),
- make_number (end));
+ call_mod_hooks (Fcar (hooks), make_fixnum (start),
+ make_fixnum (end));
hooks = Fcdr (hooks);
}
}
&& point_before_last_command_or_undo != beg
&& buffer_before_last_command_or_undo == current_buffer )
bset_undo_list (current_buffer,
- Fcons (make_number (point_before_last_command_or_undo),
+ Fcons (make_fixnum (point_before_last_command_or_undo),
BVAR (current_buffer, undo_list)));
}
Lisp_Object elt;
elt = XCAR (BVAR (current_buffer, undo_list));
if (CONSP (elt)
- && INTEGERP (XCAR (elt))
- && INTEGERP (XCDR (elt))
+ && FIXNUMP (XCAR (elt))
+ && FIXNUMP (XCDR (elt))
&& XINT (XCDR (elt)) == beg)
{
- XSETCDR (elt, make_number (beg + length));
+ XSETCDR (elt, make_fixnum (beg + length));
return;
}
}
XSETMISC (marker, m);
bset_undo_list
(current_buffer,
- Fcons (Fcons (marker, make_number (adjustment)),
+ Fcons (Fcons (marker, make_fixnum (adjustment)),
BVAR (current_buffer, undo_list)));
}
}
/* 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 (INTEGERP (Vundo_outer_limit)
+ if (FIXNUMP (Vundo_outer_limit)
&& size_so_far > XINT (Vundo_outer_limit)
&& !NILP (Vundo_outer_limit_function))
{
Lisp_Object tem;
/* Normally the function this calls is undo-outer-limit-truncate. */
- tem = call1 (Vundo_outer_limit_function, make_number (size_so_far));
+ tem = call1 (Vundo_outer_limit_function, make_fixnum (size_so_far));
if (! NILP (tem))
{
/* The function is responsible for making
`undo-outer-limit-function' with one argument, the size.
The text above describes the behavior of the function
that variable usually specifies. */);
- Vundo_outer_limit = make_number (12000000);
+ Vundo_outer_limit = make_fixnum (12000000);
DEFVAR_LISP ("undo-outer-limit-function", Vundo_outer_limit_function,
doc: /* Function to call when an undo list exceeds `undo-outer-limit'.
message3 (make_unibyte_string (system_error_msg, sizeof (system_error_msg) - 1));
break;
}
- sit_for (make_number (2), 0, 2);
+ sit_for (make_fixnum (2), 0, 2);
}
done:
double pcpu;
BOOL result = FALSE;
- CHECK_NUMBER_OR_FLOAT (pid);
+ CHECK_FIXNUM_OR_FLOAT (pid);
proc_id = FLOATP (pid) ? XFLOAT_DATA (pid) : XINT (pid);
h_snapshot = create_toolhelp32_snapshot (TH32CS_SNAPPROCESS, 0);
attrs = Fcons (Fcons (Qppid,
make_fixnum_or_float (pe.th32ParentProcessID)),
attrs);
- attrs = Fcons (Fcons (Qpri, make_number (pe.pcPriClassBase)),
+ attrs = Fcons (Fcons (Qpri, make_fixnum (pe.pcPriClassBase)),
attrs);
attrs = Fcons (Fcons (Qthcount,
make_fixnum_or_float (pe.cntThreads)),
res);
else if (strcmp (namebuf, SSDATA (ifname)) == 0)
{
- Lisp_Object hwaddr = Fmake_vector (make_number (6), Qnil);
+ Lisp_Object hwaddr = Fmake_vector (make_fixnum (6), Qnil);
register struct Lisp_Vector *p = XVECTOR (hwaddr);
Lisp_Object flags = Qnil;
int n;
/* Hardware address and its family. */
for (n = 0; n < adapter->AddressLength; n++)
- p->contents[n] = make_number ((int) adapter->Address[n]);
+ p->contents[n] = make_fixnum ((int) adapter->Address[n]);
/* Windows does not support AF_LINK or AF_PACKET family
of addresses. Use an arbitrary family number that is
identical to what GNU/Linux returns. */
- res = Fcons (Fcons (make_number (1), hwaddr), res);
+ res = Fcons (Fcons (make_fixnum (1), hwaddr), res);
/* Network mask. */
sa.sin_family = AF_INET;
Fcons (intern ("up"), Qnil))), Qnil);
/* 772 is what 3 different GNU/Linux systems report for
the loopback interface. */
- res = Fcons (Fcons (make_number (772),
- Fmake_vector (make_number (6),
- make_number (0))),
+ res = Fcons (Fcons (make_fixnum (772),
+ Fmake_vector (make_fixnum (6),
+ make_fixnum (0))),
res);
sa.sin_addr.s_addr = sys_inet_addr ("255.0.0.0");
res = Fcons (conv_sockaddr_to_lisp ((struct sockaddr *) &sa,
val = make_uninit_vector (vsize);
for (i = 0; i < vsize; i++)
- ASET (val, i, make_number (dbuf[i]));
+ ASET (val, i, make_fixnum (dbuf[i]));
retval = val;
break;
tem = Fplist_get (contact, QCspeed);
else
tem = Fplist_get (p->childp, QCspeed);
- CHECK_NUMBER (tem);
+ CHECK_FIXNUM (tem);
dcb.BaudRate = XINT (tem);
childp2 = Fplist_put (childp2, QCspeed, tem);
else
tem = Fplist_get (p->childp, QCbytesize);
if (NILP (tem))
- tem = make_number (8);
- CHECK_NUMBER (tem);
+ tem = make_fixnum (8);
+ CHECK_FIXNUM (tem);
if (XINT (tem) != 7 && XINT (tem) != 8)
error (":bytesize must be nil (8), 7, or 8");
dcb.ByteSize = XINT (tem);
else
tem = Fplist_get (p->childp, QCstopbits);
if (NILP (tem))
- tem = make_number (1);
- CHECK_NUMBER (tem);
+ tem = make_fixnum (1);
+ CHECK_FIXNUM (tem);
if (XINT (tem) != 1 && XINT (tem) != 2)
error (":stopbits must be nil (1 stopbit), 1, or 2");
summary[2] = XINT (tem) + '0';
/* Initialize input mode: interrupt_input off, no flow control, allow
8 bit character input, standard quit char. */
- Fset_input_mode (Qnil, Qnil, make_number (2), Qnil);
+ Fset_input_mode (Qnil, Qnil, make_fixnum (2), Qnil);
}
/* hmmm... perhaps these let us bracket screen changes so that we can flush
to colors. */)
(void)
{
- return Fcons (make_number (char_attr_normal & 0x000f),
- Fcons (make_number ((char_attr_normal >> 4) & 0x000f), Qnil));
+ return Fcons (make_fixnum (char_attr_normal & 0x000f),
+ Fcons (make_fixnum ((char_attr_normal >> 4) & 0x000f), Qnil));
}
DEFUN ("set-cursor-size", Fset_cursor_size, Sset_cursor_size, 1, 1, 0,
}
status = listn (CONSTYPE_HEAP, 8,
- Fcons (make_number ('L'), line_status),
- Fcons (make_number ('B'), battery_status),
- Fcons (make_number ('b'), battery_status_symbol),
- Fcons (make_number ('p'), load_percentage),
- Fcons (make_number ('s'), seconds),
- Fcons (make_number ('m'), minutes),
- Fcons (make_number ('h'), hours),
- Fcons (make_number ('t'), remain));
+ Fcons (make_fixnum ('L'), line_status),
+ Fcons (make_fixnum ('B'), battery_status),
+ Fcons (make_fixnum ('b'), battery_status_symbol),
+ Fcons (make_fixnum ('p'), load_percentage),
+ Fcons (make_fixnum ('s'), seconds),
+ Fcons (make_fixnum ('m'), minutes),
+ Fcons (make_fixnum ('h'), hours),
+ Fcons (make_fixnum ('t'), remain));
}
return status;
}
Lisp_Object oldrgb = Qnil;
Lisp_Object entry;
- CHECK_NUMBER (red);
- CHECK_NUMBER (green);
- CHECK_NUMBER (blue);
+ CHECK_FIXNUM (red);
+ CHECK_FIXNUM (green);
+ CHECK_FIXNUM (blue);
CHECK_STRING (name);
XSETINT (rgb, RGB (XUINT (red), XUINT (green), XUINT (blue)));
for (i = 0; i < ARRAYELTS (w32_color_map); pc++, i++)
cmap = Fcons (Fcons (build_string (pc->name),
- make_number (pc->colorref)),
+ make_fixnum (pc->colorref)),
cmap);
unblock_input ();
unsigned r, g, b;
if (sscanf (color_buffer, " %u %u %u", &r, &g, &b) == 3)
*system_colors = Fcons (Fcons (build_string (full_name_buffer),
- make_number (RGB (r, g, b))),
+ make_fixnum (RGB (r, g, b))),
*system_colors);
name_size = sizeof (full_name_buffer) - SYSTEM_COLOR_PREFIX_LEN;
if (!EQ (Qnil, Vx_pointer_shape))
{
- CHECK_NUMBER (Vx_pointer_shape);
+ CHECK_FIXNUM (Vx_pointer_shape);
cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f), XINT (Vx_pointer_shape));
}
else
if (!EQ (Qnil, Vx_nontext_pointer_shape))
{
- CHECK_NUMBER (Vx_nontext_pointer_shape);
+ CHECK_FIXNUM (Vx_nontext_pointer_shape);
nontext_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_nontext_pointer_shape));
}
if (!EQ (Qnil, Vx_hourglass_pointer_shape))
{
- CHECK_NUMBER (Vx_hourglass_pointer_shape);
+ CHECK_FIXNUM (Vx_hourglass_pointer_shape);
hourglass_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_hourglass_pointer_shape));
}
x_check_errors (FRAME_W32_DISPLAY (f), "bad nontext pointer cursor: %s");
if (!EQ (Qnil, Vx_mode_pointer_shape))
{
- CHECK_NUMBER (Vx_mode_pointer_shape);
+ CHECK_FIXNUM (Vx_mode_pointer_shape);
mode_cursor = XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_mode_pointer_shape));
}
if (!EQ (Qnil, Vx_sensitive_text_pointer_shape))
{
- CHECK_NUMBER (Vx_sensitive_text_pointer_shape);
+ CHECK_FIXNUM (Vx_sensitive_text_pointer_shape);
hand_cursor
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_sensitive_text_pointer_shape));
if (!NILP (Vx_window_horizontal_drag_shape))
{
- CHECK_NUMBER (Vx_window_horizontal_drag_shape);
+ CHECK_FIXNUM (Vx_window_horizontal_drag_shape);
horizontal_drag_cursor
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_window_horizontal_drag_shape));
if (!NILP (Vx_window_vertical_drag_shape))
{
- CHECK_NUMBER (Vx_window_vertical_drag_shape);
+ CHECK_FIXNUM (Vx_window_vertical_drag_shape);
vertical_drag_cursor
= XCreateFontCursor (FRAME_W32_DISPLAY (f),
XINT (Vx_window_vertical_drag_shape));
if (!FRAME_MINIBUF_ONLY_P (f) && !FRAME_PARENT_FRAME (f))
{
boolean old = FRAME_EXTERNAL_MENU_BAR (f);
- boolean new = (INTEGERP (value) && XINT (value) > 0) ? true : false;
+ boolean new = (FIXNUMP (value) && XINT (value) > 0) ? true : false;
FRAME_MENU_BAR_LINES (f) = 0;
FRAME_MENU_BAR_HEIGHT (f) = 0;
x_clear_under_internal_border (f);
/* Don't store anything but 1 or 0 in the parameter. */
- store_frame_param (f, Qmenu_bar_lines, make_number (new ? 1 : 0));
+ store_frame_param (f, Qmenu_bar_lines, make_fixnum (new ? 1 : 0));
}
}
}
return;
/* Use VALUE only if an integer >= 0. */
- if (INTEGERP (value) && XINT (value) >= 0)
+ if (FIXNUMP (value) && XINT (value) >= 0)
nlines = XFASTINT (value);
else
nlines = 0;
FRAME_TOOL_BAR_HEIGHT (f) = height;
FRAME_TOOL_BAR_LINES (f) = lines;
/* Store `tool-bar-lines' and `height' frame parameters. */
- store_frame_param (f, Qtool_bar_lines, make_number (lines));
- store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
+ store_frame_param (f, Qtool_bar_lines, make_fixnum (lines));
+ store_frame_param (f, Qheight, make_fixnum (FRAME_LINES (f)));
if (FRAME_W32_WINDOW (f) && FRAME_TOOL_BAR_HEIGHT (f) == 0)
{
if (!NILP (new_value) && !FRAME_UNDECORATED (f))
{
dwStyle = ((dwStyle & ~WS_THICKFRAME & ~WS_CAPTION)
- | ((NUMBERP (border_width) && (XINT (border_width) > 0))
+ | ((FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
? WS_BORDER : false));
SetWindowLong (hwnd, GWL_STYLE, dwStyle);
SetWindowPos (hwnd, HWND_TOP, 0, 0, 0, 0,
if (FRAME_UNDECORATED (f))
{
/* If we want a thin border, specify it here. */
- if (NUMBERP (border_width) && (XINT (border_width) > 0))
+ if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
f->output_data.w32->dwStyle |= WS_BORDER;
}
else
f->output_data.w32->dwStyle = WS_POPUP;
/* If we want a thin border, specify it here. */
- if (NUMBERP (border_width) && (XINT (border_width) > 0))
+ if (FIXED_OR_FLOATP (border_width) && (XINT (border_width) > 0))
f->output_data.w32->dwStyle |= WS_BORDER;
}
else
(Windows 2000 and later). */
static Lisp_Object w32_grabbed_keys;
-#define HOTKEY(vk, mods) make_number (((vk) & 255) | ((mods) << 8))
+#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)
Lisp_Object key = XCAR (keylist);
/* Deleted entries get set to nil. */
- if (!INTEGERP (key))
+ if (!FIXNUMP (key))
continue;
RegisterHotKey (hwnd, HOTKEY_ID (key),
{
Lisp_Object key = XCAR (keylist);
- if (!INTEGERP (key))
+ if (!FIXNUMP (key))
continue;
UnregisterHotKey (hwnd, HOTKEY_ID (key));
press of Space which we will ignore. */
if (GetAsyncKeyState (wParam) & 1)
{
- if (NUMBERP (Vw32_phantom_key_code))
+ if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
key = XUINT (Vw32_phantom_key_code) & 255;
else
key = VK_SPACE;
{
if (GetAsyncKeyState (wParam) & 1)
{
- if (NUMBERP (Vw32_phantom_key_code))
+ if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
key = XUINT (Vw32_phantom_key_code) & 255;
else
key = VK_SPACE;
icon_y = x_get_arg (dpyinfo, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
{
- CHECK_NUMBER (icon_x);
- CHECK_NUMBER (icon_y);
+ CHECK_FIXNUM (icon_x);
+ CHECK_FIXNUM (icon_y);
}
else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
error ("Both left and top icon corners of icon must be specified");
if (EQ (parent, Qunbound))
parent = Qnil;
else if (!NILP (parent))
- CHECK_NUMBER (parent);
+ CHECK_FIXNUM (parent);
/* make_frame_without_minibuffer can run Lisp code and garbage collect. */
/* No need to protect DISPLAY because that's not used after passing
x_default_font_parameter (f, parameters);
/* Default BorderWidth to 0 to match other platforms. */
- x_default_parameter (f, parameters, Qborder_width, make_number (0),
+ x_default_parameter (f, parameters, Qborder_width, make_fixnum (0),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
/* We recognize either internalBorderWidth or internalBorder
parameters);
}
- x_default_parameter (f, parameters, Qinternal_border_width, make_number (0),
+ x_default_parameter (f, parameters, Qinternal_border_width, make_fixnum (0),
"internalBorderWidth", "InternalBorder", RES_TYPE_NUMBER);
- x_default_parameter (f, parameters, Qright_divider_width, make_number (0),
+ x_default_parameter (f, parameters, Qright_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
- x_default_parameter (f, parameters, Qbottom_divider_width, make_number (0),
+ x_default_parameter (f, parameters, Qbottom_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
x_default_parameter (f, parameters, Qvertical_scroll_bars, Qright,
"verticalScrollBars", "ScrollBars", RES_TYPE_SYMBOL);
because `frame-windows-min-size' needs them. */
tem = x_get_arg (dpyinfo, parameters, Qmin_width, NULL, NULL,
RES_TYPE_NUMBER);
- if (NUMBERP (tem))
+ if (FIXED_OR_FLOATP (tem))
store_frame_param (f, Qmin_width, tem);
tem = x_get_arg (dpyinfo, parameters, Qmin_height, NULL, NULL,
RES_TYPE_NUMBER);
- if (NUMBERP (tem))
+ if (FIXED_OR_FLOATP (tem))
store_frame_param (f, Qmin_height, tem);
adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, true,
{
x_default_parameter (f, parameters, Qmenu_bar_lines,
NILP (Vmenu_bar_mode)
- ? make_number (0) : make_number (1),
+ ? make_fixnum (0) : make_fixnum (1),
NULL, NULL, RES_TYPE_NUMBER);
}
else
/* No menu bar for child frames. */
- store_frame_param (f, Qmenu_bar_lines, make_number (0));
+ store_frame_param (f, Qmenu_bar_lines, make_fixnum (0));
x_default_parameter (f, parameters, Qtool_bar_lines,
NILP (Vtool_bar_mode)
- ? make_number (0) : make_number (1),
+ ? make_fixnum (0) : make_fixnum (1),
NULL, NULL, RES_TYPE_NUMBER);
x_default_parameter (f, parameters, Qbuffer_predicate, Qnil,
{
struct w32_display_info *dpyinfo = check_x_display_info (display);
- return make_number (x_display_pixel_width (dpyinfo));
+ return make_fixnum (x_display_pixel_width (dpyinfo));
}
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
{
struct w32_display_info *dpyinfo = check_x_display_info (display);
- return make_number (x_display_pixel_height (dpyinfo));
+ return make_fixnum (x_display_pixel_height (dpyinfo));
}
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
{
struct w32_display_info *dpyinfo = check_x_display_info (display);
- return make_number (dpyinfo->n_planes * dpyinfo->n_cbits);
+ return make_fixnum (dpyinfo->n_planes * dpyinfo->n_cbits);
}
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
* anyway. */
cap = 1 << min (dpyinfo->n_planes * dpyinfo->n_cbits, 24);
- return make_number (cap);
+ return make_fixnum (cap);
}
DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object display)
{
- return make_number (1);
+ return make_fixnum (1);
}
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
doc: /* SKIP: real doc in xfns.c. */)
(Lisp_Object display)
{
- return make_number (1);
+ return make_fixnum (1);
}
DEFUN ("x-display-mm-height", Fx_display_mm_height,
/ GetDeviceCaps (hdc, VERTRES));
ReleaseDC (NULL, hdc);
- return make_number (x_display_pixel_height (dpyinfo) * mm_per_pixel + 0.5);
+ return make_fixnum (x_display_pixel_height (dpyinfo) * mm_per_pixel + 0.5);
}
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
/ GetDeviceCaps (hdc, HORZRES));
ReleaseDC (NULL, hdc);
- return make_number (x_display_pixel_width (dpyinfo) * mm_per_pixel + 0.5);
+ return make_fixnum (x_display_pixel_width (dpyinfo) * mm_per_pixel + 0.5);
}
DEFUN ("x-display-backing-store", Fx_display_backing_store,
monitor_list = XCDR (monitor_list);
}
- monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
+ monitor_frames = Fmake_vector (make_fixnum (n_monitors), Qnil);
FOR_EACH_FRAME (rest, frame)
{
struct frame *f = XFRAME (frame);
that are needed to determine window geometry. */
x_default_font_parameter (f, parms);
- x_default_parameter (f, parms, Qborder_width, make_number (2),
+ x_default_parameter (f, parms, Qborder_width, make_fixnum (2),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
/* This defaults to 2 in order to match xterm. We recognize either
internalBorderWidth or internalBorder (which is what xterm calls
parms);
}
- x_default_parameter (f, parms, Qinternal_border_width, make_number (1),
+ x_default_parameter (f, parms, Qinternal_border_width, make_fixnum (1),
"internalBorderWidth", "internalBorderWidth",
RES_TYPE_NUMBER);
/* Also do the stuff which must be set before the window exists. */
/* Move the tooltip window where the mouse pointer is. Resize and
show it. */
- if ((!INTEGERP (left) && !INTEGERP (right))
- || (!INTEGERP (top) && !INTEGERP (bottom)))
+ if ((!FIXNUMP (left) && !FIXNUMP (right))
+ || (!FIXNUMP (top) && !FIXNUMP (bottom)))
{
POINT pt;
}
}
- if (INTEGERP (top))
+ if (FIXNUMP (top))
*root_y = XINT (top);
- else if (INTEGERP (bottom))
+ else if (FIXNUMP (bottom))
*root_y = XINT (bottom) - height;
else if (*root_y + XINT (dy) <= min_y)
*root_y = min_y; /* Can happen for negative dy */
/* Put it on the top. */
*root_y = min_y;
- if (INTEGERP (left))
+ if (FIXNUMP (left))
*root_x = XINT (left);
- else if (INTEGERP (right))
+ else if (FIXNUMP (right))
*root_x = XINT (right) - width;
else if (*root_x + XINT (dx) <= min_x)
*root_x = 0; /* Can happen for negative dx */
decode_window_system_frame (frame);
if (NILP (timeout))
- timeout = make_number (5);
+ timeout = make_fixnum (5);
else
- CHECK_NATNUM (timeout);
+ CHECK_FIXNAT (timeout);
if (NILP (dx))
- dx = make_number (5);
+ dx = make_fixnum (5);
else
- CHECK_NUMBER (dx);
+ CHECK_FIXNUM (dx);
if (NILP (dy))
- dy = make_number (-10);
+ dy = make_fixnum (-10);
else
- CHECK_NUMBER (dy);
+ CHECK_FIXNUM (dy);
if (FRAMEP (tip_frame) && FRAME_LIVE_P (XFRAME (tip_frame)))
{
if (NILP (Fassq (Qname, parms)))
parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms);
if (NILP (Fassq (Qinternal_border_width, parms)))
- parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms);
+ parms = Fcons (Fcons (Qinternal_border_width, make_fixnum (3)), parms);
if (NILP (Fassq (Qborder_width, parms)))
- parms = Fcons (Fcons (Qborder_width, make_number (1)), parms);
+ parms = Fcons (Fcons (Qborder_width, make_fixnum (1)), parms);
if (NILP (Fassq (Qborder_color, parms)))
parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")),
parms);
tip_buf = Fget_buffer_create (tip);
/* We will mark the tip window a "pseudo-window" below, and such
windows cannot have display margins. */
- bset_left_margin_cols (XBUFFER (tip_buf), make_number (0));
- bset_right_margin_cols (XBUFFER (tip_buf), make_number (0));
+ bset_left_margin_cols (XBUFFER (tip_buf), make_fixnum (0));
+ bset_right_margin_cols (XBUFFER (tip_buf), make_fixnum (0));
set_window_buffer (window, tip_buf, false, false);
w = XWINDOW (window);
w->pseudo_window_p = true;
w->pixel_top = 0;
if (CONSP (Vx_max_tooltip_size)
- && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
- && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
+ && 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));
try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
/* Calculate size of tooltip window. */
size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
- make_number (w->pixel_height), 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);
/* Show tooltip frame. */
{
RECT rect;
- int pad = (NUMBERP (Vw32_tooltip_extra_pixels)
+ int pad = (FIXED_OR_FLOATP (Vw32_tooltip_extra_pixels)
? max (0, XINT (Vw32_tooltip_extra_pixels))
: FRAME_COLUMN_WIDTH (tip_f));
{
struct frame *f = decode_window_system_frame (frame);
- CHECK_NUMBER (command);
+ CHECK_FIXNUM (command);
if (FRAME_W32_P (f))
PostMessage (FRAME_W32_WINDOW (f), WM_SYSCOMMAND, XINT (command), 0);
}
result = (intptr_t) ShellExecuteW (NULL, ops_w, doc_w, params_w,
GUI_SDATA (current_dir),
- (INTEGERP (show_flag)
+ (FIXNUMP (show_flag)
? XINT (show_flag) : SW_SHOWDEFAULT));
if (result > 32)
if (c_isalpha (*p) && p[1] == ':' && IS_DIRECTORY_SEP (p[2]))
document = Fsubstring_no_properties (document,
- make_number (file_url_len), Qnil);
+ make_fixnum (file_url_len), Qnil);
}
/* We have a situation here. If DOCUMENT is a relative file name,
but its name includes leading directories, i.e. it lives not in
shexinfo_w.lpParameters = params_w;
shexinfo_w.lpDirectory = current_dir_w;
shexinfo_w.nShow =
- (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
+ (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
success = ShellExecuteExW (&shexinfo_w);
xfree (doc_w);
}
shexinfo_a.lpParameters = params_a;
shexinfo_a.lpDirectory = current_dir_a;
shexinfo_a.nShow =
- (INTEGERP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
+ (FIXNUMP (show_flag) ? XINT (show_flag) : SW_SHOWDEFAULT);
success = ShellExecuteExA (&shexinfo_a);
xfree (doc_w);
xfree (doc_a);
if (CONSP (c) && lucid_event_type_list_p (c))
c = Fevent_convert_list (c);
- if (! INTEGERP (c) && ! SYMBOLP (c))
+ if (! FIXNUMP (c) && ! SYMBOLP (c))
error ("Key definition is invalid");
/* Work out the base key and the modifiers. */
else
vk_code = lookup_vk_code (vkname);
}
- else if (INTEGERP (c))
+ else if (FIXNUMP (c))
{
lisp_modifiers = XINT (c) & ~CHARACTERBITS;
/* Many ascii characters are their own virtual key code. */
{
Lisp_Object item;
- if (!INTEGERP (key))
+ if (!FIXNUMP (key))
key = w32_parse_and_hook_hot_key (key, 0);
if (w32_kbdhook_active)
int vk_code, w32_modifiers;
Lisp_Object key;
- CHECK_NUMBER (hotkeyid);
+ CHECK_FIXNUM (hotkeyid);
vk_code = HOTKEY_VK_CODE (hotkeyid);
w32_modifiers = HOTKEY_MODIFIERS (hotkeyid);
if (vk_code < 256 && lispy_function_keys[vk_code])
key = intern (lispy_function_keys[vk_code]);
else
- key = make_number (vk_code);
+ key = make_fixnum (vk_code);
key = Fcons (key, Qnil);
if (w32_modifiers & MOD_SHIFT)
return Qnil;
if (!dwWindowsThreadId)
- return make_number (w32_console_toggle_lock_key (vk_code, new_state));
+ return make_fixnum (w32_console_toggle_lock_key (vk_code, new_state));
if (NILP (new_state))
lparam = -1;
{
MSG msg;
GetMessage (&msg, NULL, WM_EMACS_DONE, WM_EMACS_DONE);
- return make_number (msg.wParam);
+ return make_fixnum (msg.wParam);
}
return Qnil;
}
return listn (CONSTYPE_HEAP, 10,
Fcons (Qouter_position,
- Fcons (make_number (left), make_number (top))),
+ Fcons (make_fixnum (left), make_fixnum (top))),
Fcons (Qouter_size,
- Fcons (make_number (right - left),
- make_number (bottom - top))),
+ Fcons (make_fixnum (right - left),
+ make_fixnum (bottom - top))),
Fcons (Qexternal_border_size,
- Fcons (make_number (external_border_width),
- make_number (external_border_height))),
+ Fcons (make_fixnum (external_border_width),
+ make_fixnum (external_border_height))),
Fcons (Qtitle_bar_size,
- Fcons (make_number (title_bar_width),
- make_number (title_bar_height))),
+ Fcons (make_fixnum (title_bar_width),
+ make_fixnum (title_bar_height))),
Fcons (Qmenu_bar_external, Qt),
Fcons (Qmenu_bar_size,
- Fcons (make_number
+ Fcons (make_fixnum
(menu_bar.rcBar.right - menu_bar.rcBar.left),
- make_number (menu_bar_height))),
+ make_fixnum (menu_bar_height))),
Fcons (Qtool_bar_external, Qnil),
Fcons (Qtool_bar_position, tool_bar_height ? Qtop : Qnil),
Fcons (Qtool_bar_size,
- Fcons (make_number
+ Fcons (make_fixnum
(tool_bar_height
? (right - left - 2 * external_border_width
- 2 * internal_border_width)
: 0),
- make_number (tool_bar_height))),
+ make_fixnum (tool_bar_height))),
Fcons (Qinternal_border_width,
- make_number (internal_border_width)));
+ make_fixnum (internal_border_width)));
}
DEFUN ("w32-frame-edges", Fw32_frame_edges, Sw32_frame_edges, 0, 2, 0,
unblock_input ();
if (success)
- return list4 (make_number (rectangle.left),
- make_number (rectangle.top),
- make_number (rectangle.right),
- make_number (rectangle.bottom));
+ return list4 (make_fixnum (rectangle.left),
+ make_fixnum (rectangle.top),
+ make_fixnum (rectangle.right),
+ make_fixnum (rectangle.bottom));
else
return Qnil;
}
{
int internal_border_width = FRAME_INTERNAL_BORDER_WIDTH (f);
- return list4 (make_number (left + internal_border_width),
- make_number (top
+ return list4 (make_fixnum (left + internal_border_width),
+ make_fixnum (top
+ FRAME_TOOL_BAR_HEIGHT (f)
+ internal_border_width),
- make_number (right - internal_border_width),
- make_number (bottom - internal_border_width));
+ make_fixnum (right - internal_border_width),
+ make_fixnum (bottom - internal_border_width));
}
else
- return list4 (make_number (left), make_number (top),
- make_number (right), make_number (bottom));
+ return list4 (make_fixnum (left), make_fixnum (top),
+ make_fixnum (right), make_fixnum (bottom));
}
}
GetCursorPos (&pt);
unblock_input ();
- return Fcons (make_number (pt.x), make_number (pt.y));
+ return Fcons (make_fixnum (pt.x), make_fixnum (pt.y));
}
DEFUN ("w32-set-mouse-absolute-pixel-position", Fw32_set_mouse_absolute_pixel_position,
int cur_state = (GetKeyState (vk_code) & 1);
if (NILP (new_state)
- || (NUMBERP (new_state)
+ || (FIXED_OR_FLOATP (new_state)
&& ((XUINT (new_state)) & 1) != cur_state))
{
#ifdef WINDOWSNT
/* Do it! */
retval = add_tray_notification (f, icon, tip, severity, timeout, title, msg);
- return (retval < 0 ? Qnil : make_number (retval));
+ return (retval < 0 ? Qnil : make_fixnum (retval));
}
DEFUN ("w32-notification-close",
{
struct frame *f = SELECTED_FRAME ();
- if (INTEGERP (id))
+ if (FIXNUMP (id))
delete_tray_notification (f, XINT (id));
return Qnil;
DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size,
doc: /* SKIP: real doc in xfns.c. */);
- Vx_max_tooltip_size = Fcons (make_number (80), make_number (40));
+ Vx_max_tooltip_size = Fcons (make_fixnum (80), make_fixnum (40));
DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager,
doc: /* SKIP: real doc in xfns.c. */);
ASET (entity, FONT_ADSTYLE_INDEX, tem);
if (physical_font->ntmTm.tmPitchAndFamily & 0x01)
- ASET (entity, FONT_SPACING_INDEX, make_number (FONT_SPACING_PROPORTIONAL));
+ ASET (entity, FONT_SPACING_INDEX, make_fixnum (FONT_SPACING_PROPORTIONAL));
else
- ASET (entity, FONT_SPACING_INDEX, make_number (FONT_SPACING_CHARCELL));
+ ASET (entity, FONT_SPACING_INDEX, make_fixnum (FONT_SPACING_CHARCELL));
if (requested_font->lfQuality != DEFAULT_QUALITY)
{
intern_font_name (lf->lfFaceName));
FONT_SET_STYLE (entity, FONT_WEIGHT_INDEX,
- make_number (w32_decode_weight (lf->lfWeight)));
+ make_fixnum (w32_decode_weight (lf->lfWeight)));
FONT_SET_STYLE (entity, FONT_SLANT_INDEX,
- make_number (lf->lfItalic ? 200 : 100));
+ make_fixnum (lf->lfItalic ? 200 : 100));
/* TODO: PANOSE struct has this info, but need to call GetOutlineTextMetrics
to get it. */
- FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_number (100));
+ FONT_SET_STYLE (entity, FONT_WIDTH_INDEX, make_fixnum (100));
if (font_type & RASTER_FONTTYPE)
ASET (entity, FONT_SIZE_INDEX,
- make_number (physical_font->ntmTm.tmHeight
+ make_fixnum (physical_font->ntmTm.tmHeight
+ physical_font->ntmTm.tmExternalLeading));
else
- ASET (entity, FONT_SIZE_INDEX, make_number (0));
+ ASET (entity, FONT_SIZE_INDEX, make_fixnum (0));
/* Cache Unicode codepoints covered by this font, as there is no other way
of getting this information easily. */
/* Check spacing */
val = AREF (spec, FONT_SPACING_INDEX);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
{
int spacing = XINT (val);
int proportional = (spacing < FONT_SPACING_MONO);
/* Look for Same charset and a valid codepage (or non-int
which means ignore). */
if (EQ (w32_charset, charset_type)
- && (!INTEGERP (codepage) || XINT (codepage) == CP_DEFAULT
+ && (!FIXNUMP (codepage) || XINT (codepage) == CP_DEFAULT
|| IsValidCodePage (XINT (codepage))))
{
/* If we don't have a match already, then this is the
int dpi = FRAME_RES_Y (f);
tmp = AREF (font_spec, FONT_DPI_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
{
dpi = XINT (tmp);
}
/* Height */
tmp = AREF (font_spec, FONT_SIZE_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
logfont->lfHeight = -1 * XINT (tmp);
else if (FLOATP (tmp))
logfont->lfHeight = (int) (-1.0 * dpi * XFLOAT_DATA (tmp) / 72.27 + 0.5);
/* Weight */
tmp = AREF (font_spec, FONT_WEIGHT_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
logfont->lfWeight = w32_encode_weight (FONT_WEIGHT_NUMERIC (font_spec));
/* Italic */
tmp = AREF (font_spec, FONT_SLANT_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
{
int slant = FONT_SLANT_NUMERIC (font_spec);
logfont->lfItalic = slant > 150 ? 1 : 0;
/* Set pitch based on the spacing property. */
tmp = AREF (font_spec, FONT_SPACING_INDEX);
- if (INTEGERP (tmp))
+ if (FIXNUMP (tmp))
{
int spacing = XINT (tmp);
if (spacing < FONT_SPACING_MONO)
Space which we will ignore. */
if ((mod_key_state & LEFT_WIN_PRESSED) == 0)
{
- if (NUMBERP (Vw32_phantom_key_code))
+ if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
faked_key = XUINT (Vw32_phantom_key_code) & 255;
else
faked_key = VK_SPACE;
{
if ((mod_key_state & RIGHT_WIN_PRESSED) == 0)
{
- if (NUMBERP (Vw32_phantom_key_code))
+ if (FIXED_OR_FLOATP (Vw32_phantom_key_code))
faked_key = XUINT (Vw32_phantom_key_code) & 255;
else
faked_key = VK_SPACE;
{
program = build_string (cmdname);
full = Qnil;
- openp (Vexec_path, program, Vexec_suffixes, &full, make_number (X_OK), 0);
+ openp (Vexec_path, program, Vexec_suffixes, &full, make_fixnum (X_OK), 0);
if (NILP (full))
{
errno = EINVAL;
do_quoting = 1;
/* Override escape char by binding w32-quote-process-args to
desired character, or use t for auto-selection. */
- if (INTEGERP (Vw32_quote_process_args))
+ if (FIXNUMP (Vw32_quote_process_args))
escape_char = XINT (Vw32_quote_process_args);
else
escape_char = (is_cygnus_app || is_msys_app) ? '"' : '\\';
DWORD pid;
child_process *cp;
- CHECK_NUMBER (process);
+ CHECK_FIXNUM (process);
/* Allow pid to be an internally generated one, or one obtained
externally. This is necessary because real pids on Windows 95 are
char abbrev_name[32] = { 0 };
char full_name[256] = { 0 };
- CHECK_NUMBER (lcid);
+ CHECK_FIXNUM (lcid);
if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED))
return Qnil;
if (got_full)
return DECODE_SYSTEM (build_string (full_name));
}
- else if (NUMBERP (longform))
+ else if (FIXED_OR_FLOATP (longform))
{
got_full = GetLocaleInfo (XINT (lcid),
XINT (longform),
human-readable form. */)
(void)
{
- return make_number (GetThreadLocale ());
+ return make_fixnum (GetThreadLocale ());
}
static DWORD
enum_locale_fn (LPTSTR localeNum)
{
DWORD id = int_from_hex (localeNum);
- Vw32_valid_locale_ids = Fcons (make_number (id), Vw32_valid_locale_ids);
+ Vw32_valid_locale_ids = Fcons (make_fixnum (id), Vw32_valid_locale_ids);
return TRUE;
}
(Lisp_Object userp)
{
if (NILP (userp))
- return make_number (GetSystemDefaultLCID ());
- return make_number (GetUserDefaultLCID ());
+ return make_fixnum (GetSystemDefaultLCID ());
+ return make_fixnum (GetUserDefaultLCID ());
}
If successful, the new locale id is returned, otherwise nil. */)
(Lisp_Object lcid)
{
- CHECK_NUMBER (lcid);
+ CHECK_FIXNUM (lcid);
if (!IsValidLocale (XINT (lcid), LCID_SUPPORTED))
return Qnil;
/* Reply is not needed. */
PostThreadMessage (dwWindowsThreadId, WM_EMACS_SETLOCALE, XINT (lcid), 0);
- return make_number (GetThreadLocale ());
+ return make_fixnum (GetThreadLocale ());
}
enum_codepage_fn (LPTSTR codepageNum)
{
DWORD id = atoi (codepageNum);
- Vw32_valid_codepages = Fcons (make_number (id), Vw32_valid_codepages);
+ Vw32_valid_codepages = Fcons (make_fixnum (id), Vw32_valid_codepages);
return TRUE;
}
doc: /* Return current Windows codepage for console input. */)
(void)
{
- return make_number (GetConsoleCP ());
+ return make_fixnum (GetConsoleCP ());
}
If successful, the new CP is returned, otherwise nil. */)
(Lisp_Object cp)
{
- CHECK_NUMBER (cp);
+ CHECK_FIXNUM (cp);
if (!IsValidCodePage (XINT (cp)))
return Qnil;
if (!SetConsoleCP (XINT (cp)))
return Qnil;
- return make_number (GetConsoleCP ());
+ return make_fixnum (GetConsoleCP ());
}
doc: /* Return current Windows codepage for console output. */)
(void)
{
- return make_number (GetConsoleOutputCP ());
+ return make_fixnum (GetConsoleOutputCP ());
}
If successful, the new CP is returned, otherwise nil. */)
(Lisp_Object cp)
{
- CHECK_NUMBER (cp);
+ CHECK_FIXNUM (cp);
if (!IsValidCodePage (XINT (cp)))
return Qnil;
if (!SetConsoleOutputCP (XINT (cp)))
return Qnil;
- return make_number (GetConsoleOutputCP ());
+ return make_fixnum (GetConsoleOutputCP ());
}
CHARSETINFO info;
DWORD_PTR dwcp;
- CHECK_NUMBER (cp);
+ CHECK_FIXNUM (cp);
if (!IsValidCodePage (XINT (cp)))
return Qnil;
building --with-wide-int or building for 64bit. */
dwcp = XINT (cp);
if (TranslateCharsetInfo ((DWORD *) dwcp, &info, TCI_SRCCODEPAGE))
- return make_number (info.ciCharset);
+ return make_fixnum (info.ciCharset);
return Qnil;
}
{
HKL kl = layouts[num_layouts];
- obj = Fcons (Fcons (make_number (LOWORD (kl)),
- make_number (HIWORD (kl))),
+ obj = Fcons (Fcons (make_fixnum (LOWORD (kl)),
+ make_fixnum (HIWORD (kl))),
obj);
}
}
{
HKL kl = GetKeyboardLayout (dwWindowsThreadId);
- return Fcons (make_number (LOWORD (kl)),
- make_number (HIWORD (kl)));
+ return Fcons (make_fixnum (LOWORD (kl)),
+ make_fixnum (HIWORD (kl)));
}
HKL kl;
CHECK_CONS (layout);
- CHECK_NUMBER_CAR (layout);
- CHECK_NUMBER_CDR (layout);
+ CHECK_FIXNUM_CAR (layout);
+ CHECK_FIXNUM_CDR (layout);
kl = (HKL) (UINT_PTR) ((XINT (XCAR (layout)) & 0xffff)
| (XINT (XCDR (layout)) << 16));
render_locale ();
if (current_clipboard_type == CF_UNICODETEXT)
- render (make_number (CF_TEXT));
- render (make_number (current_clipboard_type));
+ render (make_fixnum (CF_TEXT));
+ render (make_fixnum (current_clipboard_type));
CloseClipboard ();
{
case WM_RENDERFORMAT:
ONTRACE (fprintf (stderr, "WM_RENDERFORMAT\n"));
- run_protected (render, make_number (wp));
+ run_protected (render, make_fixnum (wp));
return 0;
case WM_RENDERALLFORMATS:
eol_type = Fcoding_system_eol_type (coding_system);
/* Already a DOS coding system? */
- if (EQ (eol_type, make_number (1)))
+ if (EQ (eol_type, make_fixnum (1)))
return coding_system;
/* Get EOL_TYPE vector of the base of CODING_SYSTEM. */
/* If for some reason we don't have a clipboard_owner, we
just set the text format as chosen by the configuration
and than forget about the whole thing. */
- ok = !NILP (render (make_number (current_clipboard_type)));
+ ok = !NILP (render (make_fixnum (current_clipboard_type)));
current_text = Qnil;
current_coding_system = Qnil;
}
/* We generate a vector because that's what xselect.c
does in this case. */
- val = Fmake_vector (make_number (fmtcount), Qnil);
+ val = Fmake_vector (make_fixnum (fmtcount), Qnil);
/* Note: when stepping with GDB through this code, the
loop below terminates immediately because
EnumClipboardFormats for some reason returns with
if (FLOATP (Vframe_alpha_lower_limit))
alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
- else if (INTEGERP (Vframe_alpha_lower_limit))
+ else if (FIXNUMP (Vframe_alpha_lower_limit))
alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0;
if (alpha < 0.0)
if (s->face->id == TOOL_BAR_FACE_ID)
{
if (CONSP (Vtool_bar_button_margin)
- && INTEGERP (XCAR (Vtool_bar_button_margin))
- && INTEGERP (XCDR (Vtool_bar_button_margin)))
+ && 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));
}
- else if (INTEGERP (Vtool_bar_button_margin))
+ else if (FIXNUMP (Vtool_bar_button_margin))
extra_x = extra_y = XINT (Vtool_bar_button_margin);
}
Lisp_Object val
= buffer_local_value (Qunderline_minimum_offset,
s->w->contents);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
minimum_offset = XFASTINT (val);
else
minimum_offset = 1;
if (f && !FRAME_ICONIFIED_P (f))
{
- if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
+ if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
&& !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
if (f && !FRAME_ICONIFIED_P (f))
{
- if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
+ if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
&& !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
if (f && !FRAME_ICONIFIED_P (f))
{
- if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
+ if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
&& !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
{
clear_mouse_face (hlinfo);
geometry = Fassoc (Qgeometry, attributes, Qnil);
if (!NILP (geometry))
{
- monitor_left = Fnth (make_number (1), geometry);
- monitor_top = Fnth (make_number (2), geometry);
+ 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));
{
frame_size_history_add
(f, Qx_set_window_size_1, width, height,
- list2 (Fcons (make_number (pixelwidth),
- make_number (pixelheight)),
- Fcons (make_number (rect.right - rect.left),
- make_number (rect.bottom - rect.top))));
+ list2 (Fcons (make_fixnum (pixelwidth),
+ make_fixnum (pixelheight)),
+ Fcons (make_fixnum (rect.right - rect.left),
+ make_fixnum (rect.bottom - rect.top))));
if (!FRAME_PARENT_FRAME (f))
my_set_window_pos (FRAME_W32_WINDOW (f), NULL,
/* Initialize input mode: interrupt_input off, no flow control, allow
8 bit character input, standard quit char. */
- Fset_input_mode (Qnil, Qnil, make_number (2), Qnil);
+ Fset_input_mode (Qnil, Qnil, make_fixnum (2), Qnil);
{
LCID input_locale_id = LOWORD (GetKeyboardLayout (0));
the direction, the Hebrew point HOLAM is
drawn above the right edge of the base
consonant, instead of above the left edge. */
- ASET (vec, 0, make_number (-offsets[j].du
+ ASET (vec, 0, make_fixnum (-offsets[j].du
+ adj_offset));
/* Update the adjustment value for the width
advance of the glyph we just emitted. */
adj_offset -= 2 * advances[j];
}
else
- ASET (vec, 0, make_number (offsets[j].du + adj_offset));
+ ASET (vec, 0, make_fixnum (offsets[j].du + adj_offset));
/* In the font definition coordinate system, the
Y coordinate points up, while in our screen
coordinates Y grows downwards. So we need to
reverse the sign of Y-OFFSET here. */
- ASET (vec, 1, make_number (-offsets[j].dv));
+ ASET (vec, 1, make_fixnum (-offsets[j].dv));
/* Based on what ftfont.c does... */
- ASET (vec, 2, make_number (advances[j]));
+ ASET (vec, 2, make_fixnum (advances[j]));
LGLYPH_SET_ADJUSTMENT (lglyph, vec);
}
else
if (NILP (lgstring))
return Qnil;
else
- return make_number (done_glyphs);
+ return make_fixnum (done_glyphs);
}
/* Uniscribe implementation of encode_char for font backend.
frame_size_history_add
(f, Qset_frame_size, FRAME_TEXT_WIDTH (f), FRAME_TEXT_HEIGHT (f),
- list2 (make_number (ew->core.width), make_number (ew->core.height)));
+ list2 (make_fixnum (ew->core.width), make_fixnum (ew->core.height)));
}
static void
frame_size_history_add
(f, QEmacsFrameResize, width, height,
- list5 (make_number (ew->core.width), make_number (ew->core.height),
- make_number (FRAME_TOP_MARGIN_HEIGHT (f)),
- make_number (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
- make_number (2 * FRAME_INTERNAL_BORDER_WIDTH (f))));
+ list5 (make_fixnum (ew->core.width), make_fixnum (ew->core.height),
+ make_fixnum (FRAME_TOP_MARGIN_HEIGHT (f)),
+ make_fixnum (FRAME_SCROLL_BAR_AREA_HEIGHT (f)),
+ make_fixnum (2 * FRAME_INTERNAL_BORDER_WIDTH (f))));
change_frame_size (f, width, height, 0, 1, 0, 1);
selected one. */)
(Lisp_Object window)
{
- return make_number (decode_live_window (window)->use_time);
+ return make_fixnum (decode_live_window (window)->use_time);
}
\f
DEFUN ("window-pixel-width", Fwindow_pixel_width, Swindow_pixel_width, 0, 1, 0,
spanned by its children. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->pixel_width);
+ return make_fixnum (decode_valid_window (window)->pixel_width);
}
DEFUN ("window-pixel-height", Fwindow_pixel_height, Swindow_pixel_height, 0, 1, 0,
the height of the screen areas spanned by its children. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->pixel_height);
+ return make_fixnum (decode_valid_window (window)->pixel_height);
}
DEFUN ("window-pixel-width-before-size-change",
after that. */)
(Lisp_Object window)
{
- return (make_number
+ return (make_fixnum
(decode_valid_window (window)->pixel_width_before_size_change));
}
after that. */)
(Lisp_Object window)
{
- return (make_number
+ return (make_fixnum
(decode_valid_window (window)->pixel_height_before_size_change));
}
struct window *w = decode_valid_window (window);
if (! EQ (round, Qfloor) && ! EQ (round, Qceiling))
- return make_number (w->total_lines);
+ return make_fixnum (w->total_lines);
else
{
int unit = FRAME_LINE_HEIGHT (WINDOW_XFRAME (w));
- return make_number (EQ (round, Qceiling)
+ return make_fixnum (EQ (round, Qceiling)
? ((w->pixel_height + unit - 1) /unit)
: (w->pixel_height / unit));
}
struct window *w = decode_valid_window (window);
if (! EQ (round, Qfloor) && ! EQ (round, Qceiling))
- return make_number (w->total_cols);
+ return make_fixnum (w->total_cols);
else
{
int unit = FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w));
- return make_number (EQ (round, Qceiling)
+ return make_fixnum (EQ (round, Qceiling)
? ((w->pixel_width + unit - 1) /unit)
: (w->pixel_width / unit));
}
WINDOW must be a valid window and defaults to the selected one. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->pixel_left);
+ return make_fixnum (decode_valid_window (window)->pixel_left);
}
DEFUN ("window-pixel-top", Fwindow_pixel_top, Swindow_pixel_top, 0, 1, 0,
WINDOW must be a valid window and defaults to the selected one. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->pixel_top);
+ return make_fixnum (decode_valid_window (window)->pixel_top);
}
DEFUN ("window-left-column", Fwindow_left_column, Swindow_left_column, 0, 1, 0,
WINDOW must be a valid window and defaults to the selected one. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->left_col);
+ return make_fixnum (decode_valid_window (window)->left_col);
}
DEFUN ("window-top-line", Fwindow_top_line, Swindow_top_line, 0, 1, 0,
WINDOW must be a valid window and defaults to the selected one. */)
(Lisp_Object window)
{
- return make_number (decode_valid_window (window)->top_line);
+ return make_fixnum (decode_valid_window (window)->top_line);
}
/* Return the number of lines/pixels of W's body. Don't count any mode
visible, that line is not counted. */)
(Lisp_Object window, Lisp_Object pixelwise)
{
- return make_number (window_body_height (decode_live_window (window),
+ return make_fixnum (window_body_height (decode_live_window (window),
!NILP (pixelwise)));
}
continuation glyph. */)
(Lisp_Object window, Lisp_Object pixelwise)
{
- return make_number (window_body_width (decode_live_window (window),
+ return make_fixnum (window_body_width (decode_live_window (window),
!NILP (pixelwise)));
}
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window))));
+ return (make_fixnum (WINDOW_MODE_LINE_HEIGHT (decode_live_window (window))));
}
DEFUN ("window-header-line-height", Fwindow_header_line_height,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window))));
+ return (make_fixnum (WINDOW_HEADER_LINE_HEIGHT (decode_live_window (window))));
}
DEFUN ("window-right-divider-width", Fwindow_right_divider_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window))));
+ return (make_fixnum (WINDOW_RIGHT_DIVIDER_WIDTH (decode_live_window (window))));
}
DEFUN ("window-bottom-divider-width", Fwindow_bottom_divider_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window))));
+ return (make_fixnum (WINDOW_BOTTOM_DIVIDER_WIDTH (decode_live_window (window))));
}
DEFUN ("window-scroll-bar-width", Fwindow_scroll_bar_width,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window))));
+ return (make_fixnum (WINDOW_SCROLL_BAR_AREA_WIDTH (decode_live_window (window))));
}
DEFUN ("window-scroll-bar-height", Fwindow_scroll_bar_height,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return (make_number (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window))));
+ return (make_fixnum (WINDOW_SCROLL_BAR_AREA_HEIGHT (decode_live_window (window))));
}
DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
WINDOW must be a live window and defaults to the selected one. */)
(Lisp_Object window)
{
- return make_number (decode_live_window (window)->hscroll);
+ return make_fixnum (decode_live_window (window)->hscroll);
}
/* Set W's horizontal scroll amount to HSCROLL clipped to a reasonable
w->hscroll = new_hscroll;
w->suspend_auto_hscroll = true;
- return make_number (new_hscroll);
+ return make_fixnum (new_hscroll);
}
DEFUN ("set-window-hscroll", Fset_window_hscroll, Sset_window_hscroll, 2, 2, 0,
window so that the location of point moves off-window. */)
(Lisp_Object window, Lisp_Object ncol)
{
- CHECK_NUMBER (ncol);
+ CHECK_FIXNUM (ncol);
return set_window_hscroll (decode_live_window (window), XINT (ncol));
}
CHECK_CONS (coordinates);
lx = Fcar (coordinates);
ly = Fcdr (coordinates);
- CHECK_NUMBER_OR_FLOAT (lx);
- CHECK_NUMBER_OR_FLOAT (ly);
+ CHECK_FIXNUM_OR_FLOAT (lx);
+ CHECK_FIXNUM_OR_FLOAT (ly);
x = FRAME_PIXEL_X_FROM_CANON_X (f, lx) + FRAME_INTERNAL_BORDER_WIDTH (f);
y = FRAME_PIXEL_Y_FROM_CANON_Y (f, ly) + FRAME_INTERNAL_BORDER_WIDTH (f);
struct frame *f = decode_live_frame (frame);
/* Check that arguments are integers or floats. */
- CHECK_NUMBER_OR_FLOAT (x);
- CHECK_NUMBER_OR_FLOAT (y);
+ CHECK_FIXNUM_OR_FLOAT (x);
+ CHECK_FIXNUM_OR_FLOAT (y);
return window_from_coordinates (f,
(FRAME_PIXEL_X_FROM_CANON_X (f, x)
register struct window *w = decode_live_window (window);
if (w == XWINDOW (selected_window))
- return make_number (BUF_PT (XBUFFER (w->contents)));
+ return make_fixnum (BUF_PT (XBUFFER (w->contents)));
else
return Fmarker_position (w->pointm);
}
move_it_vertically (&it, window_box_height (w));
if (it.current_y < it.last_visible_y)
move_it_past_eol (&it);
- value = make_number (IT_CHARPOS (it));
+ value = make_fixnum (IT_CHARPOS (it));
bidi_unshelve_cache (itdata, false);
if (old_buffer)
struct buffer *old_buffer = current_buffer;
/* ... but here we want to catch type error before buffer change. */
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
set_buffer_internal (XBUFFER (w->contents));
Fgoto_char (pos);
set_buffer_internal (old_buffer);
posint = -1;
else if (!NILP (pos))
{
- CHECK_NUMBER_COERCE_MARKER (pos);
+ CHECK_FIXNUM_COERCE_MARKER (pos);
posint = XINT (pos);
}
else if (w == XWINDOW (selected_window))
Lisp_Object part = Qnil;
if (!fully_p)
part = list4i (rtop, rbot, rowh, vpos);
- in_window = Fcons (make_number (x),
- Fcons (make_number (y), part));
+ in_window = Fcons (make_fixnum (x),
+ Fcons (make_fixnum (y), part));
}
return in_window;
: Qnil);
}
- CHECK_NUMBER (line);
+ CHECK_FIXNUM (line);
n = XINT (line);
row = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
row = (NILP (body)
? MATRIX_ROW (w->current_matrix, 0)
: MATRIX_FIRST_TEXT_ROW (w->current_matrix));
- else if (NUMBERP (first))
+ else if (FIXED_OR_FLOATP (first))
{
CHECK_RANGED_INTEGER (first, 0, w->current_matrix->nrows);
row = MATRIX_ROW (w->current_matrix, XINT (first));
end_row = (NILP (body)
? MATRIX_ROW (w->current_matrix, w->current_matrix->nrows)
: MATRIX_BOTTOM_TEXT_ROW (w->current_matrix, w));
- else if (NUMBERP (last))
+ else if (FIXED_OR_FLOATP (last))
{
CHECK_RANGED_INTEGER (last, 0, w->current_matrix->nrows);
end_row = MATRIX_ROW (w->current_matrix, XINT (last));
{
struct glyph *glyph = row->glyphs[TEXT_AREA];
- rows = Fcons (Fcons (make_number
+ rows = Fcons (Fcons (make_fixnum
(invert
? glyph->pixel_width
: window_width - glyph->pixel_width),
- make_number (row->y + row->height - subtract)),
+ make_fixnum (row->y + row->height - subtract)),
rows);
}
else
- rows = Fcons (Fcons (make_number
+ rows = Fcons (Fcons (make_fixnum
(invert
? window_width - row->pixel_width
: row->pixel_width),
- make_number (row->y + row->height - subtract)),
+ make_fixnum (row->y + row->height - subtract)),
rows);
row++;
}
== FRAME_TERMINAL (XFRAME (selected_frame)));
}
- else if (INTEGERP (all_frames) && XINT (all_frames) == 0)
+ else if (FIXNUMP (all_frames) && XINT (all_frames) == 0)
{
candidate_p = (FRAME_VISIBLE_P (f) || FRAME_ICONIFIED_P (f)
#ifdef HAVE_X_WINDOWS
: Qnil);
else if (EQ (*all_frames, Qvisible))
;
- else if (EQ (*all_frames, make_number (0)))
+ else if (EQ (*all_frames, make_fixnum (0)))
;
else if (FRAMEP (*all_frames))
;
if (f)
frame_arg = Qlambda;
- else if (EQ (frames, make_number (0)))
+ else if (EQ (frames, make_fixnum (0)))
frame_arg = frames;
else if (EQ (frames, Qvisible))
frame_arg = frames;
b->display_error_modiff = 0;
/* Update time stamps of buffer display. */
- if (INTEGERP (BVAR (b, display_count)))
- bset_display_count (b, make_number (XINT (BVAR (b, display_count)) + 1));
+ if (FIXNUMP (BVAR (b, display_count)))
+ bset_display_count (b, make_fixnum (XINT (BVAR (b, display_count)) + 1));
bset_display_time (b, Fcurrent_time ());
w->window_end_pos = 0;
set_marker_both (w->pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
set_marker_both (w->old_pointm, buffer, BUF_PT (b), BUF_PT_BYTE (b));
set_marker_restricted (w->start,
- make_number (b->last_window_start),
+ make_fixnum (b->last_window_start),
buffer);
w->start_at_line_beg = false;
w->force_start = false;
Lisp data to nil, so do it only for slots which should not be nil. */
wset_normal_lines (w, make_float (1.0));
wset_normal_cols (w, make_float (1.0));
- wset_new_total (w, make_number (0));
- wset_new_normal (w, make_number (0));
- wset_new_pixel (w, make_number (0));
+ wset_new_total (w, make_fixnum (0));
+ wset_new_normal (w, make_fixnum (0));
+ wset_new_pixel (w, make_fixnum (0));
wset_start (w, Fmake_marker ());
wset_pointm (w, Fmake_marker ());
wset_old_pointm (w, Fmake_marker ());
if (NILP (add))
wset_new_pixel (w, size);
else
- wset_new_pixel (w, make_number (XINT (w->new_pixel) + XINT (size)));
+ wset_new_pixel (w, make_fixnum (XINT (w->new_pixel) + XINT (size)));
return w->new_pixel;
}
{
struct window *w = decode_valid_window (window);
- CHECK_NUMBER (size);
+ CHECK_FIXNUM (size);
if (NILP (add))
wset_new_total (w, size);
else
- wset_new_total (w, make_number (XINT (w->new_total) + XINT (size)));
+ wset_new_total (w, make_fixnum (XINT (w->new_total) + XINT (size)));
return w->new_total;
}
{
w->pixel_width = XFASTINT (w->new_pixel);
w->total_cols = w->pixel_width / unit;
- if (NUMBERP (w->new_normal))
+ if (FIXED_OR_FLOATP (w->new_normal))
wset_normal_cols (w, w->new_normal);
edge = w->pixel_left;
{
w->pixel_height = XFASTINT (w->new_pixel);
w->total_lines = w->pixel_height / unit;
- if (NUMBERP (w->new_normal))
+ if (FIXED_OR_FLOATP (w->new_normal))
wset_normal_lines (w, w->new_normal);
edge = w->pixel_top;
frame = WINDOW_FRAME (o);
f = XFRAME (frame);
- CHECK_NUMBER (pixel_size);
+ CHECK_FIXNUM (pixel_size);
EMACS_INT total_size
= XINT (pixel_size) / (horflag
? FRAME_COLUMN_WIDTH (f)
p = XWINDOW (o->parent);
/* Temporarily pretend we split the parent window. */
wset_new_pixel
- (p, make_number ((horflag ? p->pixel_width : p->pixel_height)
+ (p, make_fixnum ((horflag ? p->pixel_width : p->pixel_height)
- XINT (pixel_size)));
if (!window_resize_check (p, horflag))
error ("Window sizes don't fit");
else
/* Undo the temporary pretension. */
- wset_new_pixel (p, make_number (horflag ? p->pixel_width : p->pixel_height));
+ wset_new_pixel (p, make_fixnum (horflag ? p->pixel_width : p->pixel_height));
}
else
{
wset_combination_limit (p, Qt);
/* These get applied below. */
wset_new_pixel
- (p, make_number (horflag ? o->pixel_width : o->pixel_height));
+ (p, make_fixnum (horflag ? o->pixel_width : o->pixel_height));
wset_new_total
- (p, make_number (horflag ? o->total_cols : o->total_lines));
+ (p, make_fixnum (horflag ? o->total_cols : o->total_lines));
wset_new_normal (p, new_normal);
}
else
sum = sum + XINT (c->new_total);
c = NILP (c->next) ? 0 : XWINDOW (c->next);
}
- wset_new_total (n, make_number ((horflag
+ wset_new_total (n, make_fixnum ((horflag
? p->total_cols
: p->total_lines)
- sum));
root = FRAME_ROOT_WINDOW (f);
r = XWINDOW (root);
height = call3 (Qwindow__resize_root_window_vertically,
- root, make_number (- delta), pixelwise ? Qt : Qnil);
- if (INTEGERP (height) && window_resize_check (r, false))
+ root, make_fixnum (- delta), pixelwise ? Qt : Qnil);
+ if (FIXNUMP (height) && window_resize_check (r, false))
{
block_input ();
window_resize_apply (r, false);
root = FRAME_ROOT_WINDOW (f);
r = XWINDOW (root);
delta = call3 (Qwindow__resize_root_window_vertically,
- root, make_number (height - unit),
+ root, make_fixnum (height - unit),
pixelwise ? Qt : Qnil);
- if (INTEGERP (delta) && window_resize_check (r, false))
+ if (FIXNUMP (delta) && window_resize_check (r, false))
{
block_input ();
window_resize_apply (r, false);
if (w->vscroll < 0 && rtop > 0)
{
px = max (0, -w->vscroll - min (rtop, -dy));
- Fset_window_vscroll (window, make_number (px), Qt);
+ Fset_window_vscroll (window, make_fixnum (px), Qt);
return;
}
}
if (rbot > 0 && (w->vscroll < 0 || vpos == 0))
{
px = max (0, -w->vscroll + min (rbot, dy));
- Fset_window_vscroll (window, make_number (px), Qt);
+ Fset_window_vscroll (window, make_fixnum (px), Qt);
return;
}
{
ptrdiff_t spos;
- Fset_window_vscroll (window, make_number (0), Qt);
+ Fset_window_vscroll (window, make_fixnum (0), Qt);
/* 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));
else
spos = min (XINT (Fline_end_position (Qnil)) + 1, ZV);
- set_marker_restricted (w->start, make_number (spos),
+ set_marker_restricted (w->start, make_fixnum (spos),
w->contents);
w->start_at_line_beg = true;
wset_update_mode_line (w);
}
}
/* Cancel previous vscroll. */
- Fset_window_vscroll (window, make_number (0), Qt);
+ Fset_window_vscroll (window, make_fixnum (0), Qt);
}
itdata = bidi_shelve_cache ();
if (adjust_old_pointm)
Fset_marker (w->old_pointm,
((w == XWINDOW (selected_window))
- ? make_number (BUF_PT (XBUFFER (w->contents)))
+ ? make_fixnum (BUF_PT (XBUFFER (w->contents)))
: Fmarker_position (w->pointm)),
w->contents);
}
window_scroll_preserve_hpos = posit.hpos + w->hscroll;
}
- original_pos = Fcons (make_number (window_scroll_preserve_hpos),
- make_number (window_scroll_preserve_vpos));
+ original_pos = Fcons (make_fixnum (window_scroll_preserve_hpos),
+ make_fixnum (window_scroll_preserve_vpos));
}
XSETFASTINT (tem, PT);
if (NILP (tem))
{
- Fvertical_motion (make_number (- (ht / 2)), window, Qnil);
+ Fvertical_motion (make_fixnum (- (ht / 2)), window, Qnil);
startpos = PT;
startbyte = PT_BYTE;
}
SET_PT_BOTH (startpos, startbyte);
lose = n < 0 && PT == BEGV;
- Fvertical_motion (make_number (n), window, Qnil);
+ Fvertical_motion (make_fixnum (n), window, Qnil);
pos = PT;
pos_byte = PT_BYTE;
bolp = Fbolp ();
if (this_scroll_margin > 0)
{
SET_PT_BOTH (pos, pos_byte);
- Fvertical_motion (make_number (this_scroll_margin), window, Qnil);
+ Fvertical_motion (make_fixnum (this_scroll_margin), window, Qnil);
top_margin = PT;
}
else
else if (window_scroll_preserve_vpos
>= w->total_lines - this_scroll_margin)
nlines = w->total_lines - this_scroll_margin - 1;
- Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos),
- make_number (nlines)), window, Qnil);
+ Fvertical_motion (Fcons (make_fixnum (window_scroll_preserve_hpos),
+ make_fixnum (nlines)), window, Qnil);
}
else
SET_PT (top_margin);
/* If we scrolled backward, put point near the end of the window
but not within the scroll margin. */
SET_PT_BOTH (pos, pos_byte);
- tem = Fvertical_motion (make_number (ht - this_scroll_margin), window,
+ tem = Fvertical_motion (make_fixnum (ht - this_scroll_margin), window,
Qnil);
if (XFASTINT (tem) == ht - this_scroll_margin)
bottom_margin = PT;
else if (window_scroll_preserve_vpos
>= ht - this_scroll_margin)
nlines = ht - this_scroll_margin - 1;
- Fvertical_motion (Fcons (make_number (window_scroll_preserve_hpos),
- make_number (nlines)), window, Qnil);
+ Fvertical_motion (Fcons (make_fixnum (window_scroll_preserve_hpos),
+ make_fixnum (nlines)), window, Qnil);
}
else
- Fvertical_motion (make_number (-1), window, Qnil);
+ Fvertical_motion (make_fixnum (-1), window, Qnil);
}
}
}
if (adjust_old_pointm)
Fset_marker (w->old_pointm,
((w == XWINDOW (selected_window))
- ? make_number (BUF_PT (XBUFFER (w->contents)))
+ ? make_fixnum (BUF_PT (XBUFFER (w->contents)))
: Fmarker_position (w->pointm)),
w->contents);
}
else
{
arg = Fprefix_numeric_value (arg);
- CHECK_NUMBER (arg);
+ CHECK_FIXNUM (arg);
iarg = XINT (arg);
}
struct window *w = decode_live_window (window);
if (NILP (pixelwise))
- return make_number (window_box_width (w, TEXT_AREA)
+ return make_fixnum (window_box_width (w, TEXT_AREA)
/ FRAME_COLUMN_WIDTH (WINDOW_XFRAME (w)));
else
- return make_number (window_box_width (w, TEXT_AREA));
+ return make_fixnum (window_box_width (w, TEXT_AREA));
}
DEFUN ("window-text-height", Fwindow_text_height, Swindow_text_height,
struct window *w = decode_live_window (window);
if (NILP (pixelwise))
- return make_number (window_box_height (w)
+ return make_fixnum (window_box_height (w)
/ FRAME_LINE_HEIGHT (WINDOW_XFRAME (w)));
else
- return make_number (window_box_height (w));
+ return make_fixnum (window_box_height (w));
}
\f
DEFUN ("move-to-window-line", Fmove_to_window_line, Smove_to_window_line,
if (start < BEGV || start > ZV)
{
int height = window_internal_height (w);
- Fvertical_motion (make_number (- (height / 2)), window, Qnil);
+ Fvertical_motion (make_fixnum (- (height / 2)), window, Qnil);
set_marker_both (w->start, w->contents, PT, PT_BYTE);
w->start_at_line_beg = !NILP (Fbolp ());
w->force_start = true;
iarg = min (iarg, lines - this_scroll_margin - 1);
#endif
- arg = make_number (iarg);
+ arg = make_fixnum (iarg);
}
/* Skip past a partially visible first line. */
current when the window configuration was saved. */
if (EQ (XWINDOW (data->current_window)->contents, new_current_buffer))
set_marker_restricted (XWINDOW (data->current_window)->pointm,
- make_number (old_point),
+ make_fixnum (old_point),
XWINDOW (data->current_window)->contents);
/* In the following call to select_window, prevent "swapping out
the "normal" frame's selected window and that window *does*
show new_current_buffer. */
if (!EQ (XWINDOW (selected_window)->contents, new_current_buffer))
- Fgoto_char (make_number (old_point));
+ Fgoto_char (make_fixnum (old_point));
}
Vminibuf_scroll_window = data->minibuf_scroll_window;
p = SAVED_WINDOW_N (vector, i);
w = XWINDOW (window);
- wset_temslot (w, make_number (i)); i++;
+ wset_temslot (w, make_fixnum (i)); i++;
p->window = window;
p->buffer = (WINDOW_LEAF_P (w) ? w->contents : Qnil);
- p->pixel_left = make_number (w->pixel_left);
- p->pixel_top = make_number (w->pixel_top);
- p->pixel_width = make_number (w->pixel_width);
- p->pixel_height = make_number (w->pixel_height);
+ p->pixel_left = make_fixnum (w->pixel_left);
+ p->pixel_top = make_fixnum (w->pixel_top);
+ p->pixel_width = make_fixnum (w->pixel_width);
+ p->pixel_height = make_fixnum (w->pixel_height);
p->pixel_width_before_size_change
- = make_number (w->pixel_width_before_size_change);
+ = make_fixnum (w->pixel_width_before_size_change);
p->pixel_height_before_size_change
- = make_number (w->pixel_height_before_size_change);
- p->left_col = make_number (w->left_col);
- p->top_line = make_number (w->top_line);
- p->total_cols = make_number (w->total_cols);
- p->total_lines = make_number (w->total_lines);
+ = make_fixnum (w->pixel_height_before_size_change);
+ p->left_col = make_fixnum (w->left_col);
+ p->top_line = make_fixnum (w->top_line);
+ p->total_cols = make_fixnum (w->total_cols);
+ p->total_lines = make_fixnum (w->total_lines);
p->normal_cols = w->normal_cols;
p->normal_lines = w->normal_lines;
XSETFASTINT (p->hscroll, w->hscroll);
XSETFASTINT (p->min_hscroll, w->min_hscroll);
XSETFASTINT (p->hscroll_whole, w->hscroll_whole);
p->display_table = w->display_table;
- p->left_margin_cols = make_number (w->left_margin_cols);
- p->right_margin_cols = make_number (w->right_margin_cols);
- p->left_fringe_width = make_number (w->left_fringe_width);
- p->right_fringe_width = make_number (w->right_fringe_width);
+ p->left_margin_cols = make_fixnum (w->left_margin_cols);
+ p->right_margin_cols = make_fixnum (w->right_margin_cols);
+ p->left_fringe_width = make_fixnum (w->left_fringe_width);
+ p->right_fringe_width = make_fixnum (w->right_fringe_width);
p->fringes_outside_margins = w->fringes_outside_margins ? Qt : Qnil;
- p->scroll_bar_width = make_number (w->scroll_bar_width);
- p->scroll_bar_height = make_number (w->scroll_bar_height);
+ p->scroll_bar_width = make_fixnum (w->scroll_bar_width);
+ p->scroll_bar_height = make_fixnum (w->scroll_bar_height);
p->vertical_scroll_bar_type = w->vertical_scroll_bar_type;
p->horizontal_scroll_bar_type = w->horizontal_scroll_bar_type;
p->dedicated = w->dedicated;
data->saved_windows = tem;
for (i = 0; i < n_windows; i++)
ASET (tem, i,
- Fmake_vector (make_number (VECSIZE (struct saved_window)), Qnil));
+ Fmake_vector (make_fixnum (VECSIZE (struct saved_window)), Qnil));
save_window_save (FRAME_ROOT_WINDOW (f), XVECTOR (tem), 0);
XSETWINDOW_CONFIGURATION (tem, data);
return (tem);
{
struct window *w = decode_live_window (window);
return Fcons (w->left_margin_cols
- ? make_number (w->left_margin_cols) : Qnil,
+ ? make_fixnum (w->left_margin_cols) : Qnil,
w->right_margin_cols
- ? make_number (w->right_margin_cols) : Qnil);
+ ? make_fixnum (w->right_margin_cols) : Qnil);
}
{
struct window *w = decode_live_window (window);
- return list3 (make_number (WINDOW_LEFT_FRINGE_WIDTH (w)),
- make_number (WINDOW_RIGHT_FRINGE_WIDTH (w)),
+ return list3 (make_fixnum (WINDOW_LEFT_FRINGE_WIDTH (w)),
+ make_fixnum (WINDOW_RIGHT_FRINGE_WIDTH (w)),
WINDOW_HAS_FRINGES_OUTSIDE_MARGINS (w) ? Qt : Qnil);
}
struct window *w = decode_live_window (window);
return Fcons (((w->scroll_bar_width >= 0)
- ? make_number (w->scroll_bar_width)
+ ? make_fixnum (w->scroll_bar_width)
: Qnil),
- list5 (make_number (WINDOW_SCROLL_BAR_COLS (w)),
+ list5 (make_fixnum (WINDOW_SCROLL_BAR_COLS (w)),
w->vertical_scroll_bar_type,
((w->scroll_bar_height >= 0)
- ? make_number (w->scroll_bar_height)
+ ? make_fixnum (w->scroll_bar_height)
: Qnil),
- make_number (WINDOW_SCROLL_BAR_LINES (w)),
+ make_fixnum (WINDOW_SCROLL_BAR_LINES (w)),
w->horizontal_scroll_bar_type));
}
\f
if (FRAME_WINDOW_P (f))
result = (NILP (pixels_p)
? FRAME_CANON_Y_FROM_PIXEL_Y (f, -w->vscroll)
- : make_number (-w->vscroll));
+ : make_fixnum (-w->vscroll));
else
- result = make_number (0);
+ result = make_fixnum (0);
return result;
}
struct window *w = decode_live_window (window);
struct frame *f = XFRAME (w->frame);
- CHECK_NUMBER_OR_FLOAT (vscroll);
+ CHECK_FIXNUM_OR_FLOAT (vscroll);
if (FRAME_WINDOW_P (f))
{
move_it_by_lines (&it, 0);
it.vpos = it.current_y = 0;
last_height = 0;
- result = make_number (line_bottom_y (&it));
+ result = make_fixnum (line_bottom_y (&it));
if (old_buffer)
set_buffer_internal_1 (old_buffer);
val = BVAR (&buffer_defaults, extra_line_spacing);
if (!NILP (val))
{
- if (RANGED_INTEGERP (0, val, INT_MAX))
+ if (RANGED_FIXNUMP (0, val, INT_MAX))
height += XFASTINT (val);
else if (FLOATP (val))
{
}
else if (IT_CHARPOS (it) != charpos)
{
- Lisp_Object cpos = make_number (charpos);
+ Lisp_Object cpos = make_fixnum (charpos);
Lisp_Object spec = Fget_char_property (cpos, Qdisplay, Qnil);
Lisp_Object string = string_from_display_spec (spec);
struct text_pos tpos;
if (base_face_id == DEFAULT_FACE_ID
&& FRAME_WINDOW_P (it->f))
{
- if (NATNUMP (BVAR (current_buffer, extra_line_spacing)))
+ if (FIXNATP (BVAR (current_buffer, extra_line_spacing)))
it->extra_line_spacing = XFASTINT (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))
/* -1 means everything between a CR and the following line end
is invisible. >0 means lines indented more than this value are
invisible. */
- it->selective = (INTEGERP (BVAR (current_buffer, selective_display))
+ it->selective = (FIXNUMP (BVAR (current_buffer, selective_display))
? (clip_to_bounds
(-1, XINT (BVAR (current_buffer, selective_display)),
PTRDIFF_MAX))
&& XMARKER (w->redisplay_end_trigger)->buffer != 0)
it->redisplay_end_trigger_charpos
= marker_position (w->redisplay_end_trigger);
- else if (INTEGERP (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),
PTRDIFF_MAX);
&& !it->w->hscroll
&& (WINDOW_FULL_WIDTH_P (it->w)
|| NILP (Vtruncate_partial_width_windows)
- || (INTEGERP (Vtruncate_partial_width_windows)
+ || (FIXNUMP (Vtruncate_partial_width_windows)
/* PXW: Shall we do something about this? */
&& (XINT (Vtruncate_partial_width_windows)
<= WINDOW_TOTAL_COLS (it->w))))
&& CHARPOS (pos->string_pos) < 0
&& charpos > BEGV
&& (XSETWINDOW (window, w),
- prop = Fget_char_property (make_number (charpos),
+ prop = Fget_char_property (make_fixnum (charpos),
Qinvisible, window),
TEXT_PROP_MEANS_INVISIBLE (prop) == 0))
{
- prop = Fget_char_property (make_number (charpos - 1), Qinvisible,
+ prop = Fget_char_property (make_fixnum (charpos - 1), Qinvisible,
window);
ellipses_p = 2 == TEXT_PROP_MEANS_INVISIBLE (prop);
}
/* Set up variables for computing the stop position from text
property changes. */
XSETBUFFER (object, current_buffer);
- limit = make_number (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT);
+ limit = make_fixnum (IT_CHARPOS (*it) + TEXT_PROP_DISTANCE_LIMIT);
}
/* Get the interval containing IT's position. Value is a null
interval if there isn't such an interval. */
- position = make_number (charpos);
+ position = make_fixnum (charpos);
iv = validate_interval_range (object, &position, &position, false);
if (iv)
{
if (next_iv)
{
- if (INTEGERP (limit)
+ if (FIXNUMP (limit)
&& next_iv->position >= XFASTINT (limit))
/* No text property change up to limit. */
it->stop_charpos = min (XFASTINT (limit), it->stop_charpos);
/* If the character at CHARPOS is where the display string begins,
return CHARPOS. */
- pos = make_number (charpos);
+ pos = make_fixnum (charpos);
if (STRINGP (object))
bufpos = string->bufpos;
else
tpos = *position;
if (!NILP (spec = Fget_char_property (pos, Qdisplay, object))
&& (charpos <= begb
- || !EQ (Fget_char_property (make_number (charpos - 1), Qdisplay,
+ || !EQ (Fget_char_property (make_fixnum (charpos - 1), Qdisplay,
object),
spec))
&& (rv = handle_display_spec (NULL, spec, object, Qnil, &tpos, bufpos,
/* Look forward for the first character with a `display' property
that will replace the underlying text when displayed. */
- limpos = make_number (lim);
+ limpos = make_fixnum (lim);
do {
pos = Fnext_single_char_property_change (pos, Qdisplay, object1, limpos);
CHARPOS (tpos) = XFASTINT (pos);
/* OBJECT = nil means current buffer. */
Lisp_Object object =
(string && STRINGP (string->lstring)) ? string->lstring : Qnil;
- Lisp_Object pos = make_number (charpos);
+ Lisp_Object pos = make_fixnum (charpos);
ptrdiff_t eob =
(STRINGP (object) || (string && string->s)) ? string->schars : ZV;
&& it->s == NULL
&& !NILP (Vfontification_functions)
&& !NILP (Vrun_hooks)
- && (pos = make_number (IT_CHARPOS (*it)),
+ && (pos = make_fixnum (IT_CHARPOS (*it)),
prop = Fget_char_property (pos, Qfontified, Qnil),
/* Ignore the special cased nil value always present at EOB since
no amount of fontifying will be able to change it. */
/* Get the value of the invisible text property at the
current position. Value will be nil if there is no such
property. */
- end_charpos = make_number (IT_STRING_CHARPOS (*it));
+ end_charpos = make_fixnum (IT_STRING_CHARPOS (*it));
prop = Fget_text_property (end_charpos, Qinvisible, it->string);
invis = TEXT_PROP_MEANS_INVISIBLE (prop);
it->string, limit);
/* Since LIMIT is always an integer, so should be the
value returned by Fnext_single_property_change. */
- eassert (INTEGERP (end_charpos));
- if (INTEGERP (end_charpos))
+ eassert (FIXNUMP (end_charpos));
+ if (FIXNUMP (end_charpos))
{
endpos = XFASTINT (end_charpos);
prop = Fget_text_property (end_charpos, Qinvisible, it->string);
/* First of all, is there invisible text at this position? */
tem = start_charpos = IT_CHARPOS (*it);
- pos = make_number (tem);
+ pos = make_fixnum (tem);
prop = get_char_property_and_overlay (pos, Qinvisible, it->window,
&overlay);
invis = TEXT_PROP_MEANS_INVISIBLE (prop);
the char before the given position, i.e. if we
get invis = 0, this means that the char at
newpos is visible. */
- pos = make_number (newpos);
+ pos = make_fixnum (newpos);
prop = Fget_char_property (pos, Qinvisible, it->window);
invis = TEXT_PROP_MEANS_INVISIBLE (prop);
}
if (!it->string_from_display_prop_p)
it->area = TEXT_AREA;
- propval = get_char_property_and_overlay (make_number (position->charpos),
+ propval = get_char_property_and_overlay (make_fixnum (position->charpos),
Qdisplay, object, &overlay);
if (NILP (propval))
return HANDLED_NORMALLY;
Lisp_Object end;
struct text_pos end_pos;
- end = Fnext_single_char_property_change (make_number (CHARPOS (start_pos)),
+ end = Fnext_single_char_property_change (make_fixnum (CHARPOS (start_pos)),
Qdisplay, object, Qnil);
CHARPOS (end_pos) = XFASTINT (end);
if (STRINGP (object))
if (NILP (object))
XSETBUFFER (object, current_buffer);
specbind (Qobject, object);
- specbind (Qposition, make_number (CHARPOS (*position)));
- specbind (Qbuffer_position, make_number (bufpos));
+ specbind (Qposition, make_fixnum (CHARPOS (*position)));
+ specbind (Qbuffer_position, make_fixnum (bufpos));
form = safe_eval (form);
form = unbind_to (count, form);
}
&& (EQ (XCAR (it->font_height), Qplus)
|| EQ (XCAR (it->font_height), Qminus))
&& CONSP (XCDR (it->font_height))
- && RANGED_INTEGERP (0, XCAR (XCDR (it->font_height)), INT_MAX))
+ && 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)));
Lisp_Object height;
height = safe_call1 (it->font_height,
face->lface[LFACE_HEIGHT_INDEX]);
- if (NUMBERP (height))
+ if (FIXED_OR_FLOATP (height))
new_height = XFLOATINT (height);
}
- else if (NUMBERP (it->font_height))
+ else if (FIXED_OR_FLOATP (it->font_height))
{
/* Value is a multiple of the canonical char height. */
struct face *f;
value = safe_eval (it->font_height);
value = unbind_to (count, value);
- if (NUMBERP (value))
+ if (FIXED_OR_FLOATP (value))
new_height = XFLOATINT (value);
}
return 0;
value = XCAR (XCDR (spec));
- if (NUMBERP (value) && XFLOATINT (value) > 0)
+ if (FIXED_OR_FLOATP (value) && XFLOATINT (value) > 0)
it->space_width = value;
}
#ifdef HAVE_WINDOW_SYSTEM
value = XCAR (XCDR (spec));
- if (NUMBERP (value))
+ if (FIXED_OR_FLOATP (value))
{
struct face *face = FACE_FROM_ID (it->f, it->face_id);
it->voffset = - (XFLOATINT (value)
Lisp_Object limit, prop, pos;
bool found = false;
- pos = make_number (max (from, BEGV));
+ pos = make_fixnum (max (from, BEGV));
if (!back_p) /* looking forward */
{
- limit = make_number (min (to, ZV));
+ limit = make_fixnum (min (to, ZV));
while (!found && !EQ (pos, limit))
{
prop = Fget_char_property (pos, Qdisplay, Qnil);
}
else /* looking back */
{
- limit = make_number (max (to, BEGV));
+ limit = make_fixnum (max (to, BEGV));
while (!found && !EQ (pos, limit))
{
prop = Fget_char_property (pos, Qdisplay, Qnil);
entries[n].string = (STRING); \
entries[n].overlay = (OVERLAY); \
priority = Foverlay_get ((OVERLAY), Qpriority); \
- entries[n].priority = INTEGERP (priority) ? XINT (priority) : 0; \
+ entries[n].priority = FIXNUMP (priority) ? XINT (priority) : 0; \
entries[n].after_string_p = (AFTER_P); \
++n; \
} \
overlays, we can just use the position of the newline in
buffer text. */
if (it->stop_charpos >= limit
- || ((pos = Fnext_single_property_change (make_number (start),
+ || ((pos = Fnext_single_property_change (make_fixnum (start),
Qdisplay, Qnil,
- make_number (limit)),
+ make_fixnum (limit)),
NILP (pos))
&& next_overlay_change (start) == ZV))
{
/* Check the newline before point for invisibility. */
{
Lisp_Object prop;
- prop = Fget_char_property (make_number (IT_CHARPOS (*it) - 1),
+ prop = Fget_char_property (make_fixnum (IT_CHARPOS (*it) - 1),
Qinvisible, it->window);
if (TEXT_PROP_MEANS_INVISIBLE (prop) != 0)
continue;
it2.from_disp_prop_p = false;
if (handle_display_prop (&it2) == HANDLED_RETURN
&& !NILP (val = get_char_property_and_overlay
- (make_number (pos), Qdisplay, Qnil, &overlay))
+ (make_fixnum (pos), Qdisplay, Qnil, &overlay))
&& (OVERLAYP (overlay)
? (beg = OVERLAY_POSITION (OVERLAY_START (overlay)))
: get_property_and_range (pos, Qdisplay, &val, &beg, &end, Qnil)))
eassert (!it->bidi_p || it->s == it->bidi_it.string.s);
it->what = IT_CHARACTER;
BYTEPOS (it->position) = CHARPOS (it->position) = 0;
- it->object = make_number (0);
+ it->object = make_fixnum (0);
/* With bidi reordering, the character to display might not be the
character at IT_CHARPOS. BIDI_IT.FIRST_ELT means that
them again, even if they get an error. */
wset_redisplay_end_trigger (it->w, Qnil);
CALLN (Frun_hook_with_args, Qredisplay_end_trigger_functions, it->window,
- make_number (charpos));
+ make_fixnum (charpos));
/* Notice if it changed the face of the character we are on. */
handle_face_prop (it);
}
else
{
- CHECK_NUMBER_COERCE_MARKER (from);
+ CHECK_FIXNUM_COERCE_MARKER (from);
start = min (max (XINT (from), BEGV), ZV);
}
}
else
{
- CHECK_NUMBER_COERCE_MARKER (to);
+ CHECK_FIXNUM_COERCE_MARKER (to);
end = max (start, min (XINT (to), ZV));
}
- if (!NILP (x_limit) && RANGED_INTEGERP (0, x_limit, INT_MAX))
+ if (!NILP (x_limit) && RANGED_FIXNUMP (0, x_limit, INT_MAX))
max_x = XINT (x_limit);
if (NILP (y_limit))
max_y = INT_MAX;
- else if (RANGED_INTEGERP (0, y_limit, INT_MAX))
+ else if (RANGED_FIXNUMP (0, y_limit, INT_MAX))
max_y = XINT (y_limit);
itdata = bidi_shelve_cache ();
if (old_b)
set_buffer_internal (old_b);
- return Fcons (make_number (x), make_number (y));
+ return Fcons (make_fixnum (x), make_fixnum (y));
}
\f
/***********************************************************************
in the *Messages* buffer now, delete the oldest ones.
This is safe because we don't have undo in this buffer. */
- if (NATNUMP (Vmessage_log_max))
+ if (FIXNATP (Vmessage_log_max))
{
scan_newline (Z, Z_BYTE, BEG, BEG_BYTE,
-XFASTINT (Vmessage_log_max) - 1, false);
Vwith_echo_area_save_vector = Qnil;
if (NILP (vector))
- vector = Fmake_vector (make_number (11), Qnil);
+ vector = Fmake_vector (make_fixnum (11), Qnil);
XSETBUFFER (tmp, current_buffer); ASET (vector, i, tmp); ++i;
ASET (vector, i, Vdeactivate_mark); ++i;
- ASET (vector, i, make_number (windows_or_buffers_changed)); ++i;
+ ASET (vector, i, make_fixnum (windows_or_buffers_changed)); ++i;
if (w)
{
XSETWINDOW (tmp, w); ASET (vector, i, tmp); ++i;
ASET (vector, i, w->contents); ++i;
- ASET (vector, i, make_number (marker_position (w->pointm))); ++i;
- ASET (vector, i, make_number (marker_byte_position (w->pointm))); ++i;
- ASET (vector, i, make_number (marker_position (w->old_pointm))); ++i;
- ASET (vector, i, make_number (marker_byte_position (w->old_pointm))); ++i;
- ASET (vector, i, make_number (marker_position (w->start))); ++i;
- ASET (vector, i, make_number (marker_byte_position (w->start))); ++i;
+ ASET (vector, i, make_fixnum (marker_position (w->pointm))); ++i;
+ ASET (vector, i, make_fixnum (marker_byte_position (w->pointm))); ++i;
+ ASET (vector, i, make_fixnum (marker_position (w->old_pointm))); ++i;
+ ASET (vector, i, make_fixnum (marker_byte_position (w->old_pointm))); ++i;
+ ASET (vector, i, make_fixnum (marker_position (w->start))); ++i;
+ ASET (vector, i, make_fixnum (marker_byte_position (w->start))); ++i;
}
else
{
/* Compute the max. number of lines specified by the user. */
if (FLOATP (Vmax_mini_window_height))
max_height = XFLOAT_DATA (Vmax_mini_window_height) * total_height;
- else if (INTEGERP (Vmax_mini_window_height))
+ else if (FIXNUMP (Vmax_mini_window_height))
max_height = XINT (Vmax_mini_window_height) * unit;
else
max_height = total_height / 4;
Vmode_line_unwind_vector = Qnil;
if (NILP (vector))
- vector = Fmake_vector (make_number (10), Qnil);
+ vector = Fmake_vector (make_fixnum (10), Qnil);
- ASET (vector, 0, make_number (mode_line_target));
- ASET (vector, 1, make_number (MODE_LINE_NOPROP_LEN (0)));
+ ASET (vector, 0, make_fixnum (mode_line_target));
+ ASET (vector, 1, make_fixnum (MODE_LINE_NOPROP_LEN (0)));
ASET (vector, 2, mode_line_string_list);
ASET (vector, 3, save_proptrans ? mode_line_proptrans_alist : Qt);
ASET (vector, 4, mode_line_string_face);
/* Reuse f->desired_tool_bar_string, if possible. */
if (size < size_needed || NILP (f->desired_tool_bar_string))
fset_desired_tool_bar_string
- (f, Fmake_string (make_number (size_needed), make_number (' '), Qnil));
+ (f, Fmake_string (make_fixnum (size_needed), make_fixnum (' '), Qnil));
else
{
AUTO_LIST4 (props, Qdisplay, Qnil, Qmenu_item, Qnil);
- Fremove_text_properties (make_number (0), make_number (size),
+ Fremove_text_properties (make_fixnum (0), make_fixnum (size),
props, f->desired_tool_bar_string);
}
: DEFAULT_TOOL_BAR_BUTTON_RELIEF);
hmargin = vmargin = relief;
- if (RANGED_INTEGERP (1, Vtool_bar_button_margin,
+ if (RANGED_FIXNUMP (1, Vtool_bar_button_margin,
INT_MAX - max (hmargin, vmargin)))
{
hmargin += XFASTINT (Vtool_bar_button_margin);
}
else if (CONSP (Vtool_bar_button_margin))
{
- if (RANGED_INTEGERP (1, XCAR (Vtool_bar_button_margin),
+ if (RANGED_FIXNUMP (1, XCAR (Vtool_bar_button_margin),
INT_MAX - hmargin))
hmargin += XFASTINT (XCAR (Vtool_bar_button_margin));
- if (RANGED_INTEGERP (1, XCDR (Vtool_bar_button_margin),
+ if (RANGED_FIXNUMP (1, XCDR (Vtool_bar_button_margin),
INT_MAX - vmargin))
vmargin += XFASTINT (XCDR (Vtool_bar_button_margin));
}
selected. */
if (selected_p)
{
- plist = Fplist_put (plist, QCrelief, make_number (-relief));
+ plist = Fplist_put (plist, QCrelief, make_fixnum (-relief));
hmargin -= relief;
vmargin -= relief;
}
raised relief. */
plist = Fplist_put (plist, QCrelief,
(selected_p
- ? make_number (-relief)
- : make_number (relief)));
+ ? make_fixnum (-relief)
+ : make_fixnum (relief)));
hmargin -= relief;
vmargin -= relief;
}
if (hmargin || vmargin)
{
if (hmargin == vmargin)
- plist = Fplist_put (plist, QCmargin, make_number (hmargin));
+ plist = Fplist_put (plist, QCmargin, make_fixnum (hmargin));
else
plist = Fplist_put (plist, QCmargin,
- Fcons (make_number (hmargin),
- make_number (vmargin)));
+ Fcons (make_fixnum (hmargin),
+ make_fixnum (vmargin)));
}
/* If button is not enabled, and we don't have special images
vector. */
image = Fcons (Qimage, plist);
AUTO_LIST4 (props, Qdisplay, image, Qmenu_item,
- make_number (i * TOOL_BAR_ITEM_NSLOTS));
+ make_fixnum (i * TOOL_BAR_ITEM_NSLOTS));
/* Let the last image hide all remaining spaces in the tool bar
string. The string can be longer than needed when we reuse a
end = SCHARS (f->desired_tool_bar_string);
else
end = i + 1;
- Fadd_text_properties (make_number (i), make_number (end),
+ Fadd_text_properties (make_fixnum (i), make_fixnum (end),
props, f->desired_tool_bar_string);
#undef PROP
}
}
#endif
- return make_number (height);
+ return make_fixnum (height);
}
{
int border, rows, height, extra;
- if (TYPE_RANGED_INTEGERP (int, Vtool_bar_border))
+ if (TYPE_RANGED_FIXNUMP (int, Vtool_bar_border))
border = XINT (Vtool_bar_border);
else if (EQ (Vtool_bar_border, Qinternal_border_width))
border = FRAME_INTERNAL_BORDER_WIDTH (f);
/* Get the text property `menu-item' at pos. The value of that
property is the start index of this item's properties in
F->tool_bar_items. */
- prop = Fget_text_property (make_number (charpos),
+ prop = Fget_text_property (make_fixnum (charpos),
Qmenu_item, f->current_tool_bar_string);
- if (! INTEGERP (prop))
+ if (! FIXNUMP (prop))
return false;
*prop_idx = XINT (prop);
return true;
hscroll_step_abs = 0;
}
}
- else if (TYPE_RANGED_INTEGERP (int, Vhscroll_step))
+ else if (TYPE_RANGED_FIXNUMP (int, Vhscroll_step))
{
hscroll_step_abs = XINT (Vhscroll_step);
if (hscroll_step_abs < 0)
/* Remember window point. */
Fset_marker (w->old_pointm,
((w == XWINDOW (selected_window))
- ? make_number (BUF_PT (XBUFFER (w->contents)))
+ ? make_fixnum (BUF_PT (XBUFFER (w->contents)))
: Fmarker_position (w->pointm)),
w->contents);
/* If selective display, can't optimize if changes start at the
beginning of the line. */
if (unchanged_p
- && INTEGERP (BVAR (current_buffer, selective_display))
+ && FIXNUMP (BVAR (current_buffer, selective_display))
&& XINT (BVAR (current_buffer, selective_display)) > 0
&& (BEG_UNCHANGED < start || GPT <= start))
unchanged_p = false;
{
int fringe_bitmap = lookup_fringe_bitmap (val);
if (fringe_bitmap != 0)
- return make_number (fringe_bitmap);
+ return make_fixnum (fringe_bitmap);
}
#endif
- return make_number (-1); /* Use default arrow bitmap. */
+ return make_fixnum (-1); /* Use default arrow bitmap. */
}
return overlay_arrow_string_or_property (var);
}
#define AINC(a,i) \
{ \
- Lisp_Object entry = Fgethash (make_number (i), a, make_number (0)); \
- if (INTEGERP (entry)) \
- Fputhash (make_number (i), make_number (1 + XINT (entry)), a); \
+ Lisp_Object entry = Fgethash (make_fixnum (i), a, make_fixnum (0)); \
+ if (FIXNUMP (entry)) \
+ Fputhash (make_fixnum (i), make_fixnum (1 + XINT (entry)), a); \
}
AINC (Vredisplay__all_windows_cause, windows_or_buffers_changed);
Lisp_Object chprop;
ptrdiff_t glyph_pos = glyph->charpos;
- chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
+ chprop = Fget_char_property (make_fixnum (glyph_pos), Qcursor,
glyph->object);
if (!NILP (chprop))
{
if (prop_pos >= pos_before)
bpos_max = prop_pos;
}
- if (INTEGERP (chprop))
+ if (FIXNUMP (chprop))
{
bpos_covered = bpos_max + XINT (chprop);
/* If the `cursor' property covers buffer positions up
Lisp_Object chprop;
ptrdiff_t glyph_pos = glyph->charpos;
- chprop = Fget_char_property (make_number (glyph_pos), Qcursor,
+ chprop = Fget_char_property (make_fixnum (glyph_pos), Qcursor,
glyph->object);
if (!NILP (chprop))
{
if (prop_pos >= pos_before)
bpos_max = prop_pos;
}
- if (INTEGERP (chprop))
+ if (FIXNUMP (chprop))
{
bpos_covered = bpos_max + XINT (chprop);
/* If the `cursor' property covers buffer positions up
Lisp_Object cprop;
ptrdiff_t gpos = glyph->charpos;
- cprop = Fget_char_property (make_number (gpos),
+ cprop = Fget_char_property (make_fixnum (gpos),
Qcursor,
glyph->object);
if (!NILP (cprop))
/* Previous candidate is a glyph from a string that has
a non-nil `cursor' property. */
|| (STRINGP (g1->object)
- && (!NILP (Fget_char_property (make_number (g1->charpos),
+ && (!NILP (Fget_char_property (make_fixnum (g1->charpos),
Qcursor, g1->object))
/* Previous candidate is from the same display
string as this one, and the display string
if (!NILP (Vwindow_scroll_functions))
{
run_hook_with_args_2 (Qwindow_scroll_functions, window,
- make_number (CHARPOS (startp)));
+ make_fixnum (CHARPOS (startp)));
SET_TEXT_POS_FROM_MARKER (startp, w->start);
/* In case the hook functions switch buffers. */
set_buffer_internal (XBUFFER (w->contents));
scroll_max = (max (scroll_step,
max (arg_scroll_conservatively, temp_scroll_step))
* frame_line_height);
- else if (NUMBERP (BVAR (current_buffer, scroll_down_aggressively))
- || NUMBERP (BVAR (current_buffer, scroll_up_aggressively)))
+ else if (FIXED_OR_FLOATP (BVAR (current_buffer, scroll_down_aggressively))
+ || FIXED_OR_FLOATP (BVAR (current_buffer, scroll_up_aggressively)))
/* We're trying to scroll because of aggressive scrolling but no
scroll_step is set. Choose an arbitrary one. */
scroll_max = 10 * frame_line_height;
{
aggressive = BVAR (current_buffer, scroll_up_aggressively);
height = WINDOW_BOX_TEXT_HEIGHT (w);
- if (NUMBERP (aggressive))
+ if (FIXED_OR_FLOATP (aggressive))
{
double float_amount = XFLOATINT (aggressive) * height;
int aggressive_scroll = float_amount;
{
aggressive = BVAR (current_buffer, scroll_down_aggressively);
height = WINDOW_BOX_TEXT_HEIGHT (w);
- if (NUMBERP (aggressive))
+ if (FIXED_OR_FLOATP (aggressive))
{
double float_amount = XFLOATINT (aggressive) * height;
int aggressive_scroll = float_amount;
position past that. */
struct glyph_row *r = NULL;
Lisp_Object invprop =
- get_char_property_and_overlay (make_number (PT), Qinvisible,
+ get_char_property_and_overlay (make_fixnum (PT), Qinvisible,
Qnil, NULL);
if (TEXT_PROP_MEANS_INVISIBLE (invprop) != 0)
{
ptrdiff_t alt_pt;
Lisp_Object invprop_end =
- Fnext_single_char_property_change (make_number (PT), Qinvisible,
+ Fnext_single_char_property_change (make_fixnum (PT), Qinvisible,
Qnil, Qnil);
- if (NATNUMP (invprop_end))
+ if (FIXNATP (invprop_end))
alt_pt = XFASTINT (invprop_end);
else
alt_pt = ZV;
if ((scroll_conservatively
|| emacs_scroll_step
|| temp_scroll_step
- || NUMBERP (BVAR (current_buffer, scroll_up_aggressively))
- || NUMBERP (BVAR (current_buffer, scroll_down_aggressively)))
+ || FIXED_OR_FLOATP (BVAR (current_buffer, scroll_up_aggressively))
+ || FIXED_OR_FLOATP (BVAR (current_buffer, scroll_down_aggressively)))
&& CHARPOS (startp) >= BEGV
&& CHARPOS (startp) <= ZV)
{
: BVAR (current_buffer, scroll_down_aggressively);
if (!MINI_WINDOW_P (w)
- && (scroll_conservatively > SCROLL_LIMIT || NUMBERP (aggressive)))
+ && (scroll_conservatively > SCROLL_LIMIT || FIXED_OR_FLOATP (aggressive)))
{
int pt_offset = 0;
/* Setting scroll-conservatively overrides
scroll-*-aggressively. */
- if (!scroll_conservatively && NUMBERP (aggressive))
+ if (!scroll_conservatively && FIXED_OR_FLOATP (aggressive))
{
double float_amount = XFLOATINT (aggressive);
if (!row)
{
Lisp_Object val =
- get_char_property_and_overlay (make_number (PT), Qinvisible,
+ get_char_property_and_overlay (make_fixnum (PT), Qinvisible,
Qnil, NULL);
if (TEXT_PROP_MEANS_INVISIBLE (val) != 0)
{
ptrdiff_t alt_pos;
Lisp_Object invis_end =
- Fnext_single_char_property_change (make_number (PT), Qinvisible,
+ Fnext_single_char_property_change (make_fixnum (PT), Qinvisible,
Qnil, Qnil);
- if (NATNUMP (invis_end))
+ if (FIXNATP (invis_end))
alt_pos = XFASTINT (invis_end);
else
alt_pos = ZV;
w->cursor.x, w->cursor.y, w->cursor.hpos, w->cursor.vpos);
fprintf (stderr, "=============================================\n");
dump_glyph_matrix (w->current_matrix,
- TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 0);
+ TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 0);
return Qnil;
}
}
else
{
- CHECK_NUMBER (row);
+ CHECK_FIXNUM (row);
vpos = XINT (row);
}
matrix = XWINDOW (selected_window)->current_matrix;
if (vpos >= 0 && vpos < matrix->nrows)
dump_glyph_row (MATRIX_ROW (matrix, vpos),
vpos,
- TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 2);
+ TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2);
return Qnil;
}
vpos = 0;
else
{
- CHECK_NUMBER (row);
+ CHECK_FIXNUM (row);
vpos = XINT (row);
}
if (vpos >= 0 && vpos < m->nrows)
dump_glyph_row (MATRIX_ROW (m, vpos), vpos,
- TYPE_RANGED_INTEGERP (int, glyphs) ? XINT (glyphs) : 2);
+ TYPE_RANGED_FIXNUMP (int, glyphs) ? XINT (glyphs) : 2);
#endif
return Qnil;
}
p += it.len;
/* Get its face. */
- ilisp = make_number (p - arrow_string);
+ ilisp = make_fixnum (p - arrow_string);
face = Fget_text_property (ilisp, Qface, overlay_arrow_string);
it.face_id = compute_char_face (f, it.char_to_display, face);
spacing = calc_line_height_property (it, spacing, font,
boff, false);
}
- if (INTEGERP (spacing))
+ if (FIXNUMP (spacing))
{
extra_line_spacing = XINT (spacing);
if (!NILP (total_height))
if (STRINGP (glyph->object))
{
Lisp_Object prop
- = Fget_char_property (make_number (charpos),
+ = Fget_char_property (make_fixnum (charpos),
Qdisplay, Qnil);
result =
(!NILP (prop)
{
ptrdiff_t gpos = glyph->charpos;
- if (!NILP (Fget_char_property (make_number (gpos),
+ if (!NILP (Fget_char_property (make_fixnum (gpos),
Qcursor, s)))
{
result = true;
Lisp_Object position, object = it->object;
if (STRINGP (object))
- position = make_number (IT_STRING_CHARPOS (*it));
+ position = make_fixnum (IT_STRING_CHARPOS (*it));
else if (BUFFERP (object))
{
- position = make_number (IT_CHARPOS (*it));
+ position = make_fixnum (IT_CHARPOS (*it));
object = it->window;
}
else
/* Compute the required width if needed. */
if (!it->lnum_width)
{
- if (NATNUMP (Vdisplay_line_numbers_width))
+ if (FIXNATP (Vdisplay_line_numbers_width))
it->lnum_width = XFASTINT (Vdisplay_line_numbers_width);
/* Max line number to be displayed cannot be more than the one
property, disable line numbers for this row. This is for
packages such as company-mode, which need this for their tricky
layout, where line numbers get in the way. */
- Lisp_Object val = Fget_char_property (make_number (IT_CHARPOS (*it)),
+ Lisp_Object val = Fget_char_property (make_fixnum (IT_CHARPOS (*it)),
Qdisplay_line_numbers_disable,
it->window);
/* For ZV, we need to also look in empty overlays at that point,
}
else
{
- eassert (INTEGERP (overlay_arrow_string));
+ eassert (FIXNUMP (overlay_arrow_string));
row->overlay_arrow_bitmap = XINT (overlay_arrow_string);
}
overlay_arrow_seen = true;
bidi_unshelve_cache (itb_data, false);
set_buffer_temp (old);
- return (from_pos <= found && found < to_pos) ? make_number (found) : Qnil;
+ return (from_pos <= found && found < to_pos) ? make_fixnum (found) : Qnil;
}
DEFUN ("move-point-visually", Fmove_point_visually,
&& (GLYPH)->charpos >= 0 \
&& !(GLYPH)->avoid_cursor_p)
- CHECK_NUMBER (direction);
+ CHECK_FIXNUM (direction);
dir = XINT (direction);
if (dir > 0)
dir = 1;
{
SET_PT (g->charpos);
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
else if (!NILP (g->object) && !EQ (g->object, gpt->object))
{
break;
SET_PT (new_pos);
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
else if (ROW_GLYPH_NEWLINE_P (row, g))
{
else
break;
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
}
if (g == e || NILP (g->object))
{
SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
g = row->glyphs[TEXT_AREA];
e = g + row->used[TEXT_AREA];
else
continue;
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
}
}
{
SET_PT (MATRIX_ROW_END_CHARPOS (row) - 1);
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
e = row->glyphs[TEXT_AREA];
g = e + row->used[TEXT_AREA] - 1;
else
continue;
w->cursor.vpos = -1;
- return make_number (PT);
+ return make_fixnum (PT);
}
}
}
SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it));
}
- return make_number (PT);
+ return make_fixnum (PT);
#undef ROW_GLYPH_NEWLINE_P
}
}
else
{
- CHECK_NUMBER_COERCE_MARKER (vpos);
+ CHECK_FIXNUM_COERCE_MARKER (vpos);
nrow = XINT (vpos);
}
/* Create and fill the array. */
levels = make_uninit_vector (nglyphs);
for (i = 0; g1 < g; i++, g1++)
- ASET (levels, i, make_number (g1->resolved_level));
+ ASET (levels, i, make_fixnum (g1->resolved_level));
}
else /* Right-to-left glyph row. */
{
nglyphs++;
levels = make_uninit_vector (nglyphs);
for (i = 0; g1 > g; i++, g1--)
- ASET (levels, i, make_number (g1->resolved_level));
+ ASET (levels, i, make_fixnum (g1->resolved_level));
}
return levels;
}
break;
/* Remember where item was displayed. */
- ASET (items, i + 3, make_number (it.hpos));
+ ASET (items, i + 3, make_fixnum (it.hpos));
/* Display the item, pad with one space. */
if (it.current_x < it.last_visible_x)
&& (!NILP (props) || risky))
{
Lisp_Object oprops, aelt;
- oprops = Ftext_properties_at (make_number (0), elt);
+ oprops = Ftext_properties_at (make_fixnum (0), elt);
/* If the starting string's properties are not what
we want, translate the string. Also, if the string
= Fdelq (aelt, mode_line_proptrans_alist);
elt = Fcopy_sequence (elt);
- Fset_text_properties (make_number (0), Flength (elt),
+ Fset_text_properties (make_fixnum (0), Flength (elt),
props, elt);
/* Add this item to mode_line_proptrans_alist. */
mode_line_proptrans_alist
mode_line_proptrans_alist);
/* Truncate mode_line_proptrans_alist
to at most 50 elements. */
- tem = Fnthcdr (make_number (50),
+ tem = Fnthcdr (make_fixnum (50),
mode_line_proptrans_alist);
if (! NILP (tem))
XSETCDR (tem, Qnil);
? string_byte_to_char (elt, offset)
: charpos + nchars);
Lisp_Object mode_string
- = Fsubstring (elt, make_number (charpos),
- make_number (endpos));
+ = Fsubstring (elt, make_fixnum (charpos),
+ make_fixnum (endpos));
n += store_mode_line_string (NULL, mode_string, false,
0, 0, Qnil);
}
case MODE_LINE_STRING:
{
Lisp_Object tem = build_string (spec);
- props = Ftext_properties_at (make_number (charpos), elt);
+ props = Ftext_properties_at (make_fixnum (charpos), elt);
/* Should only keep face property in props */
n += store_mode_line_string (NULL, tem, false,
field, prec, props);
elt = XCAR (elt);
goto tail_recurse;
}
- else if (INTEGERP (car))
+ else if (FIXNUMP (car))
{
register int lim = XINT (car);
elt = XCDR (elt);
face = list2 (face, mode_line_string_face);
props = Fplist_put (props, Qface, face);
}
- Fadd_text_properties (make_number (0), make_number (len),
+ Fadd_text_properties (make_fixnum (0), make_fixnum (len),
props, lisp_string);
}
else
if (precision > 0 && len > precision)
{
len = precision;
- lisp_string = Fsubstring (lisp_string, make_number (0), make_number (len));
+ lisp_string = Fsubstring (lisp_string, make_fixnum (0), make_fixnum (len));
precision = -1;
}
if (!NILP (mode_line_string_face))
{
Lisp_Object face;
if (NILP (props))
- props = Ftext_properties_at (make_number (0), lisp_string);
+ props = Ftext_properties_at (make_fixnum (0), lisp_string);
face = Fplist_get (props, Qface);
if (NILP (face))
face = mode_line_string_face;
lisp_string = Fcopy_sequence (lisp_string);
}
if (!NILP (props))
- Fadd_text_properties (make_number (0), make_number (len),
+ Fadd_text_properties (make_fixnum (0), make_fixnum (len),
props, lisp_string);
}
if (field_width > len)
{
field_width -= len;
- lisp_string = Fmake_string (make_number (field_width), make_number (' '),
+ lisp_string = Fmake_string (make_fixnum (field_width), make_fixnum (' '),
Qnil);
if (!NILP (props))
- Fadd_text_properties (make_number (0), make_number (field_width),
+ Fadd_text_properties (make_fixnum (0), make_fixnum (field_width),
props, lisp_string);
mode_line_string_list = Fcons (lisp_string, mode_line_string_list);
n += field_width;
struct window *w;
struct buffer *old_buffer = NULL;
int face_id;
- bool no_props = INTEGERP (face);
+ bool no_props = FIXNUMP (face);
ptrdiff_t count = SPECPDL_INDEX ();
Lisp_Object str;
int string_start = 0;
goto no_value;
/* If the buffer is very big, don't waste time. */
- if (INTEGERP (Vline_number_display_limit)
+ if (FIXNUMP (Vline_number_display_limit)
&& BUF_ZV (b) - BUF_BEGV (b) > XINT (Vline_number_display_limit))
{
w->base_line_pos = 0;
check only for newlines. */
bool selective_display
= (!NILP (BVAR (current_buffer, selective_display))
- && !INTEGERP (BVAR (current_buffer, selective_display)));
+ && !FIXNUMP (BVAR (current_buffer, selective_display)));
if (count > 0)
{
(Lisp_Object pos)
{
Lisp_Object prop
- = (NATNUMP (pos) || MARKERP (pos)
+ = (FIXNATP (pos) || MARKERP (pos)
? Fget_char_property (pos, Qinvisible, Qnil)
: pos);
int invis = TEXT_PROP_MEANS_INVISIBLE (prop);
return (invis == 0 ? Qnil
: invis == 1 ? Qt
- : make_number (invis));
+ : make_fixnum (invis));
}
/* Calculate a width or height in pixels from a specification using
prop = Qnil;
}
- if (NUMBERP (prop))
+ if (FIXED_OR_FLOATP (prop))
{
int base_unit = (width_p
? FRAME_COLUMN_WIDTH (it->f)
}
/* '(NUM)': absolute number of pixels. */
- if (NUMBERP (car))
+ if (FIXED_OR_FLOATP (car))
{
double fact;
int offset =
slice.width = img->width;
slice.height = img->height;
- if (INTEGERP (it->slice.x))
+ if (FIXNUMP (it->slice.x))
slice.x = XINT (it->slice.x);
else if (FLOATP (it->slice.x))
slice.x = XFLOAT_DATA (it->slice.x) * img->width;
- if (INTEGERP (it->slice.y))
+ if (FIXNUMP (it->slice.y))
slice.y = XINT (it->slice.y);
else if (FLOATP (it->slice.y))
slice.y = XFLOAT_DATA (it->slice.y) * img->height;
- if (INTEGERP (it->slice.width))
+ if (FIXNUMP (it->slice.width))
slice.width = XINT (it->slice.width);
else if (FLOATP (it->slice.width))
slice.width = XFLOAT_DATA (it->slice.width) * img->width;
- if (INTEGERP (it->slice.height))
+ if (FIXNUMP (it->slice.height))
slice.height = XINT (it->slice.height);
else if (FLOATP (it->slice.height))
slice.height = XFLOAT_DATA (it->slice.height) * img->height;
Lisp_Object face_name = Qnil;
int ascent, descent, height;
- if (NILP (val) || INTEGERP (val) || (override && EQ (val, Qt)))
+ if (NILP (val) || FIXNUMP (val) || (override && EQ (val, Qt)))
return val;
if (CONSP (val))
{
face_name = XCAR (val);
val = XCDR (val);
- if (!NUMBERP (val))
- val = make_number (1);
+ if (!FIXED_OR_FLOATP (val))
+ val = make_fixnum (1);
if (NILP (face_name))
{
height = it->ascent + it->descent;
face_id = lookup_named_face (it->w, it->f, face_name, false);
face = FACE_FROM_ID_OR_NULL (it->f, face_id);
if (face == NULL || ((font = face->font) == NULL))
- return make_number (-1);
+ return make_fixnum (-1);
boff = font->baseline_offset;
if (font->vertical_centering)
boff = VCENTER_BASELINE_OFFSET (font, it->f) - boff;
scale:
if (FLOATP (val))
height = (int)(XFLOAT_DATA (val) * height);
- else if (INTEGERP (val))
+ else if (FIXNUMP (val))
height *= XINT (val);
- return make_number (height);
+ return make_fixnum (height);
}
spacing = calc_line_height_property (it, spacing, font,
boff, false);
}
- if (INTEGERP (spacing))
+ if (FIXNUMP (spacing))
{
extra_line_spacing = XINT (spacing);
if (!NILP (total_height))
&& font->default_ascent
&& CHAR_TABLE_P (Vuse_default_ascent)
&& !NILP (Faref (Vuse_default_ascent,
- make_number (it->char_to_display))))
+ make_fixnum (it->char_to_display))))
highest = font->default_ascent + boff;
/* Draw the first glyph at the normal position. It may be
if (font->relative_compose
&& (! CHAR_TABLE_P (Vignore_relative_composition)
|| NILP (Faref (Vignore_relative_composition,
- make_number (ch)))))
+ make_fixnum (ch)))))
{
if (- descent >= font->relative_compose)
if (CONSP (arg)
&& EQ (XCAR (arg), Qbar)
- && RANGED_INTEGERP (0, XCDR (arg), INT_MAX))
+ && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
{
*width = XINT (XCDR (arg));
return BAR_CURSOR;
if (CONSP (arg)
&& EQ (XCAR (arg), Qhbar)
- && RANGED_INTEGERP (0, XCDR (arg), INT_MAX))
+ && RANGED_FIXNUMP (0, XCDR (arg), INT_MAX))
{
*width = XINT (XCDR (arg));
return HBAR_CURSOR;
return false;
if (!CONSP (XCDR (rect)))
return false;
- if (!(tem = XCAR (XCAR (rect)), INTEGERP (tem) && x >= XINT (tem)))
+ if (!(tem = XCAR (XCAR (rect)), FIXNUMP (tem) && x >= XINT (tem)))
return false;
- if (!(tem = XCDR (XCAR (rect)), INTEGERP (tem) && y >= XINT (tem)))
+ if (!(tem = XCDR (XCAR (rect)), FIXNUMP (tem) && y >= XINT (tem)))
return false;
- if (!(tem = XCAR (XCDR (rect)), INTEGERP (tem) && x <= XINT (tem)))
+ if (!(tem = XCAR (XCDR (rect)), FIXNUMP (tem) && x <= XINT (tem)))
return false;
- if (!(tem = XCDR (XCDR (rect)), INTEGERP (tem) && y <= XINT (tem)))
+ if (!(tem = XCDR (XCDR (rect)), FIXNUMP (tem) && y <= XINT (tem)))
return false;
return true;
}
Lisp_Object lr, lx0, ly0;
if (CONSP (circ)
&& CONSP (XCAR (circ))
- && (lr = XCDR (circ), NUMBERP (lr))
- && (lx0 = XCAR (XCAR (circ)), INTEGERP (lx0))
- && (ly0 = XCDR (XCAR (circ)), INTEGERP (ly0)))
+ && (lr = XCDR (circ), FIXED_OR_FLOATP (lr))
+ && (lx0 = XCAR (XCAR (circ)), FIXNUMP (lx0))
+ && (ly0 = XCDR (XCAR (circ)), FIXNUMP (ly0)))
{
double r = XFLOATINT (lr);
double dx = XINT (lx0) - x;
If count is odd, we are inside polygon. Pixels on edges
may or may not be included depending on actual geometry of the
polygon. */
- if ((lx = poly[n-2], !INTEGERP (lx))
- || (ly = poly[n-1], !INTEGERP (lx)))
+ if ((lx = poly[n-2], !FIXNUMP (lx))
+ || (ly = poly[n-1], !FIXNUMP (lx)))
return false;
x0 = XINT (lx), y0 = XINT (ly);
for (i = 0; i < n; i += 2)
{
int x1 = x0, y1 = y0;
- if ((lx = poly[i], !INTEGERP (lx))
- || (ly = poly[i+1], !INTEGERP (ly)))
+ if ((lx = poly[i], !FIXNUMP (lx))
+ || (ly = poly[i+1], !FIXNUMP (ly)))
return false;
x0 = XINT (lx), y0 = XINT (ly);
if (NILP (map))
return Qnil;
- CHECK_NUMBER (x);
- CHECK_NUMBER (y);
+ CHECK_FIXNUM (x);
+ CHECK_FIXNUM (y);
return find_hot_spot (map,
clip_to_bounds (INT_MIN, XINT (x), INT_MAX),
#endif /* HAVE_WINDOW_SYSTEM */
if (STRINGP (string))
- pos = make_number (charpos);
+ pos = make_fixnum (charpos);
/* Set the help text and mouse pointer. If the mouse is on a part
of the mode line without any text (e.g. past the right edge of
int vpos, hpos;
- b = Fprevious_single_property_change (make_number (charpos + 1),
+ b = Fprevious_single_property_change (make_fixnum (charpos + 1),
Qmouse_face, string, Qnil);
if (NILP (b))
begpos = 0;
ZV = Z;
/* Is this char mouse-active or does it have help-echo? */
- position = make_number (pos);
+ position = make_fixnum (pos);
USE_SAFE_ALLOCA;
ptrdiff_t ignore;
s = Fprevious_single_property_change
- (make_number (pos + 1), Qmouse_face, object, Qnil);
+ (make_fixnum (pos + 1), Qmouse_face, object, Qnil);
e = Fnext_single_property_change
(position, Qmouse_face, object, Qnil);
if (NILP (s))
- s = make_number (0);
+ s = make_fixnum (0);
if (NILP (e))
- e = make_number (SCHARS (object));
+ e = make_fixnum (SCHARS (object));
mouse_face_from_string_pos (w, hlinfo, object,
XINT (s), XINT (e));
hlinfo->mouse_face_past_end = false;
if (pos > 0)
{
mouse_face = get_char_property_and_overlay
- (make_number (pos), Qmouse_face, w->contents, &overlay);
+ (make_fixnum (pos), Qmouse_face, w->contents, &overlay);
buffer = w->contents;
disp_string = object;
}
: Qnil;
Lisp_Object lim2
= NILP (BVAR (XBUFFER (buffer), bidi_display_reordering))
- ? make_number (BUF_Z (XBUFFER (buffer))
+ ? make_fixnum (BUF_Z (XBUFFER (buffer))
- w->window_end_pos)
: Qnil;
{
/* Handle the text property case. */
before = Fprevious_single_property_change
- (make_number (pos + 1), Qmouse_face, buffer, lim1);
+ (make_fixnum (pos + 1), Qmouse_face, buffer, lim1);
after = Fnext_single_property_change
- (make_number (pos), Qmouse_face, buffer, lim2);
+ (make_fixnum (pos), Qmouse_face, buffer, lim2);
before_string = after_string = Qnil;
}
else
&& charpos >= 0
&& charpos < SCHARS (obj))
{
- help = Fget_text_property (make_number (charpos),
+ help = Fget_text_property (make_fixnum (charpos),
Qhelp_echo, obj);
if (NILP (help))
{
ptrdiff_t p = string_buffer_position (obj, start);
if (p > 0)
{
- help = Fget_char_property (make_number (p),
+ help = Fget_char_property (make_fixnum (p),
Qhelp_echo, w->contents);
if (!NILP (help))
{
else if (BUFFERP (obj)
&& charpos >= BEGV
&& charpos < ZV)
- help = Fget_text_property (make_number (charpos), Qhelp_echo,
+ help = Fget_text_property (make_fixnum (charpos), Qhelp_echo,
obj);
if (!NILP (help))
&& charpos >= 0
&& charpos < SCHARS (obj))
{
- pointer = Fget_text_property (make_number (charpos),
+ pointer = Fget_text_property (make_fixnum (charpos),
Qpointer, obj);
if (NILP (pointer))
{
ptrdiff_t start = MATRIX_ROW_START_CHARPOS (r);
ptrdiff_t p = string_buffer_position (obj, start);
if (p > 0)
- pointer = Fget_char_property (make_number (p),
+ pointer = Fget_char_property (make_fixnum (p),
Qpointer, w->contents);
}
}
else if (BUFFERP (obj)
&& charpos >= BEGV
&& charpos < ZV)
- pointer = Fget_text_property (make_number (charpos),
+ pointer = Fget_text_property (make_fixnum (charpos),
Qpointer, obj);
}
}
A value of nil means to respect the value of `truncate-lines'.
If `word-wrap' is enabled, you might want to reduce this. */);
- Vtruncate_partial_width_windows = make_number (50);
+ Vtruncate_partial_width_windows = make_fixnum (50);
DEFVAR_LISP ("line-number-display-limit", Vline_number_display_limit,
doc: /* Maximum buffer size for which line number should be displayed.
doc: /* Maximum number of lines to keep in the message log buffer.
If nil, disable message logging. If t, log messages but don't truncate
the buffer when it becomes large. */);
- Vmessage_log_max = make_number (1000);
+ Vmessage_log_max = make_fixnum (1000);
DEFVAR_LISP ("window-scroll-functions", Vwindow_scroll_functions,
doc: /* List of functions to call before redisplaying a window with scrolling.
Otherwise, value should be a pair of integers `(HORZ . VERT)' with
HORZ specifying the horizontal margin, and VERT specifying the
vertical margin. */);
- Vtool_bar_button_margin = make_number (DEFAULT_TOOL_BAR_BUTTON_MARGIN);
+ Vtool_bar_button_margin = make_fixnum (DEFAULT_TOOL_BAR_BUTTON_MARGIN);
DEFVAR_INT ("tool-bar-button-relief", tool_bar_button_relief,
doc: /* Relief thickness of tool-bar buttons. */);
Note that the lower bound for automatic hscrolling specified by `scroll-left'
and `scroll-right' overrides this variable's effect. */);
- Vhscroll_step = make_number (0);
+ Vhscroll_step = make_fixnum (0);
DEFVAR_BOOL ("message-truncate-lines", message_truncate_lines,
doc: /* If non-nil, messages are truncated instead of resizing the echo area.
DEFVAR_LISP ("hourglass-delay", Vhourglass_delay,
doc: /* Seconds to wait before displaying an hourglass pointer when Emacs is busy. */);
- Vhourglass_delay = make_number (DEFAULT_HOURGLASS_DELAY);
+ Vhourglass_delay = make_fixnum (DEFAULT_HOURGLASS_DELAY);
#ifdef HAVE_WINDOW_SYSTEM
hourglass_atimer = NULL;
/* Symbol for the purpose of Vglyphless_char_display. */
DEFSYM (Qglyphless_char_display, "glyphless-char-display");
- Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_number (1));
+ Fput (Qglyphless_char_display, Qchar_table_extra_slots, make_fixnum (1));
DEFVAR_LISP ("glyphless-char-display", Vglyphless_char_display,
doc: /* Char-table defining glyphless characters.
display table takes effect; in this case, Emacs does not consult
`glyphless-char-display' at all. */);
Vglyphless_char_display = Fmake_char_table (Qglyphless_char_display, Qnil);
- Fset_char_table_extra_slot (Vglyphless_char_display, make_number (0),
+ Fset_char_table_extra_slot (Vglyphless_char_display, make_fixnum (0),
Qempty_box);
DEFVAR_LISP ("debug-on-message", Vdebug_on_message,
/* The default ellipsis glyphs `...'. */
for (i = 0; i < 3; ++i)
- default_invis_vector[i] = make_number ('.');
+ default_invis_vector[i] = make_fixnum ('.');
}
{
cancel_hourglass ();
- if (INTEGERP (Vhourglass_delay)
+ if (FIXNUMP (Vhourglass_delay)
&& XINT (Vhourglass_delay) > 0)
delay = make_timespec (min (XINT (Vhourglass_delay),
TYPE_MAXIMUM (time_t)),
}
if (STRINGP (data)
- && RANGED_INTEGERP (1, width, INT_MAX)
- && RANGED_INTEGERP (1, height, INT_MAX))
+ && 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)
parse_rgb_list (Lisp_Object rgb_list, XColor *color)
{
#define PARSE_RGB_LIST_FIELD(field) \
- if (CONSP (rgb_list) && INTEGERP (XCAR (rgb_list))) \
+ if (CONSP (rgb_list) && FIXNUMP (XCAR (rgb_list))) \
{ \
color->field = XINT (XCAR (rgb_list)); \
rgb_list = XCDR (rgb_list); \
{
Lisp_Object rgb;
- if (! INTEGERP (XCAR (XCDR (color_desc))))
+ if (! FIXNUMP (XCAR (XCDR (color_desc))))
return false;
tty_color->pixel = XINT (XCAR (XCDR (color_desc)));
Lisp_Object coldesc;
XSETFRAME (frame, f);
- coldesc = call2 (Qtty_color_by_index, make_number (idx), frame);
+ coldesc = call2 (Qtty_color_by_index, make_fixnum (idx), frame);
if (!NILP (coldesc))
return XCAR (coldesc);
}
else
{
- if (INTEGERP (val1))
- result = (INTEGERP (val2) && XINT (val1) >= XINT (val2)
+ if (FIXNUMP (val1))
+ result = (FIXNUMP (val2) && XINT (val1) >= XINT (val2)
? XINT (val1) > XINT (val2)
: -1);
else
- result = INTEGERP (val2) ? 1 : 0;
+ result = FIXNUMP (val2) ? 1 : 0;
}
if (result)
return result;
ASET (v, 1, FONT_WIDTH_SYMBOLIC (font));
point = PIXEL_TO_POINT (XINT (AREF (font, FONT_SIZE_INDEX)) * 10,
FRAME_RES_Y (f));
- ASET (v, 2, make_number (point));
+ ASET (v, 2, make_fixnum (point));
ASET (v, 3, FONT_WEIGHT_SYMBOLIC (font));
ASET (v, 4, FONT_SLANT_SYMBOLIC (font));
spacing = Ffont_get (font, QCspacing);
CHECK_STRING (pattern);
if (! NILP (maximum))
- CHECK_NATNUM (maximum);
+ CHECK_FIXNAT (maximum);
if (!NILP (width))
- CHECK_NUMBER (width);
+ CHECK_FIXNUM (width);
/* We can't simply call decode_window_system_frame because
this function may be called before any frame is created. */
if (size)
{
- Ffont_put (font_spec, QCsize, make_number (size));
- Ffont_put (font_spec, QCavgwidth, make_number (avgwidth));
+ Ffont_put (font_spec, QCsize, make_fixnum (size));
+ Ffont_put (font_spec, QCavgwidth, make_fixnum (avgwidth));
}
Lisp_Object fonts = Flist_fonts (font_spec, frame, maximum, font_spec);
for (Lisp_Object tail = fonts; CONSP (tail); tail = XCDR (tail))
|| SYMBOLP (attrs[LFACE_SWIDTH_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_HEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_HEIGHT_INDEX])
- || NUMBERP (attrs[LFACE_HEIGHT_INDEX])
+ || FIXED_OR_FLOATP (attrs[LFACE_HEIGHT_INDEX])
|| FUNCTIONP (attrs[LFACE_HEIGHT_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_WEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_WEIGHT_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_BOX_INDEX])
|| SYMBOLP (attrs[LFACE_BOX_INDEX])
|| STRINGP (attrs[LFACE_BOX_INDEX])
- || INTEGERP (attrs[LFACE_BOX_INDEX])
+ || FIXNUMP (attrs[LFACE_BOX_INDEX])
|| CONSP (attrs[LFACE_BOX_INDEX]));
eassert (UNSPECIFIEDP (attrs[LFACE_INVERSE_INDEX])
|| IGNORE_DEFFACE_P (attrs[LFACE_INVERSE_INDEX])
int pt = PIXEL_TO_POINT (font->pixel_size * 10, FRAME_RES_Y (f));
eassert (pt > 0);
- ASET (lface, LFACE_HEIGHT_INDEX, make_number (pt));
+ ASET (lface, LFACE_HEIGHT_INDEX, make_fixnum (pt));
}
if (force_p || UNSPECIFIEDP (LFACE_WEIGHT (lface)))
{
Lisp_Object result = invalid;
- if (INTEGERP (from))
+ if (FIXNUMP (from))
/* FROM is absolute, just use it as is. */
result = from;
else if (FLOATP (from))
/* FROM is a scale, use it to adjust TO. */
{
- if (INTEGERP (to))
+ if (FIXNUMP (to))
/* relative X absolute => absolute */
- result = make_number (XFLOAT_DATA (from) * XINT (to));
+ result = make_fixnum (XFLOAT_DATA (from) * XINT (to));
else if (FLOATP (to))
/* relative X relative => relative */
result = make_float (XFLOAT_DATA (from) * XFLOAT_DATA (to));
result = safe_call1 (from, to);
/* Ensure that if TO was absolute, so is the result. */
- if (INTEGERP (to) && !INTEGERP (result))
+ if (FIXNUMP (to) && !FIXNUMP (result))
result = invalid;
}
for (i = 1; i < LFACE_VECTOR_SIZE; ++i)
if (!UNSPECIFIEDP (from[i]))
{
- if (i == LFACE_HEIGHT_INDEX && !INTEGERP (from[i]))
+ if (i == LFACE_HEIGHT_INDEX && !FIXNUMP (from[i]))
{
to[i] = merge_face_heights (from[i], to[i], to[i]);
font_clear_prop (to, FONT_SIZE_INDEX);
else if (EQ (keyword, QCbox))
{
if (EQ (value, Qt))
- value = make_number (1);
- if (INTEGERP (value)
+ value = make_fixnum (1);
+ if (FIXNUMP (value)
|| STRINGP (value)
|| CONSP (value)
|| NILP (value))
/* Add a global definition if there is none. */
if (NILP (global_lface))
{
- global_lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE),
+ global_lface = Fmake_vector (make_fixnum (LFACE_VECTOR_SIZE),
Qunspecified);
ASET (global_lface, 0, Qface);
Vface_new_frame_defaults = Fcons (Fcons (face, global_lface),
sizeof *lface_id_to_name);
lface_id_to_name[next_lface_id] = face;
- Fput (face, Qface, make_number (next_lface_id));
+ Fput (face, Qface, make_fixnum (next_lface_id));
++next_lface_id;
}
else if (f == NULL)
{
if (NILP (lface))
{
- lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE),
+ lface = Fmake_vector (make_fixnum (LFACE_VECTOR_SIZE),
Qunspecified);
ASET (lface, 0, Qface);
fset_face_alist (f, Fcons (Fcons (face, lface), f->face_alist));
/* If FRAME is 0, change face on all frames, and change the
default for new frames. */
- if (INTEGERP (frame) && XINT (frame) == 0)
+ if (FIXNUMP (frame) && XINT (frame) == 0)
{
Lisp_Object tail;
Finternal_set_lisp_face_attribute (face, attr, value, Qt);
if (EQ (face, Qdefault))
{
/* The default face must have an absolute size. */
- if (!INTEGERP (value) || XINT (value) <= 0)
+ if (!FIXNUMP (value) || XINT (value) <= 0)
signal_error ("Default face height not absolute and positive",
value);
}
/* For non-default faces, do a test merge with a random
height to see if VALUE's ok. */
Lisp_Object test = merge_face_heights (value,
- make_number (10),
+ make_fixnum (10),
Qnil);
- if (!INTEGERP (test) || XINT (test) <= 0)
+ if (!FIXNUMP (test) || XINT (test) <= 0)
signal_error ("Face height does not produce a positive integer",
value);
}
/* Allow t meaning a simple box of width 1 in foreground color
of the face. */
if (EQ (value, Qt))
- value = make_number (1);
+ value = make_fixnum (1);
if (UNSPECIFIEDP (value) || IGNORE_DEFFACE_P (value))
valid_p = true;
else if (NILP (value))
valid_p = true;
- else if (INTEGERP (value))
+ else if (FIXNUMP (value))
valid_p = XINT (value) != 0;
else if (STRINGP (value))
valid_p = SCHARS (value) > 0;
if (EQ (k, QCline_width))
{
- if (!INTEGERP (v) || XINT (v) == 0)
+ if (!FIXNUMP (v) || XINT (v) == 0)
break;
}
else if (EQ (k, QCcolor))
static Lisp_Object
face_boolean_x_resource_value (Lisp_Object value, bool signal_p)
{
- Lisp_Object result = make_number (0);
+ Lisp_Object result = make_fixnum (0);
eassert (STRINGP (value));
else if (EQ (attr, QCheight))
{
value = Fstring_to_number (value, Qnil);
- if (!INTEGERP (value) || XINT (value) <= 0)
+ if (!FIXNUMP (value) || XINT (value) <= 0)
signal_error ("Invalid face height from X resource", value);
}
else if (EQ (attr, QCbold) || EQ (attr, QCitalic))
if (EQ (value, Qunspecified) || (EQ (value, QCignore_defface)))
return Qt;
else if (EQ (attribute, QCheight))
- return INTEGERP (value) ? Qnil : Qt;
+ return FIXNUMP (value) ? Qnil : Qt;
else
return Qnil;
}
signal_error ("Invalid color", color2);
if (NILP (metric))
- return make_number (color_distance (&cdef1, &cdef2));
+ return make_fixnum (color_distance (&cdef1, &cdef2));
else
return call2 (metric,
- list3 (make_number (cdef1.red),
- make_number (cdef1.green),
- make_number (cdef1.blue)),
- list3 (make_number (cdef2.red),
- make_number (cdef2.green),
- make_number (cdef2.blue)));
+ list3 (make_fixnum (cdef1.red),
+ make_fixnum (cdef1.green),
+ make_fixnum (cdef1.blue)),
+ list3 (make_fixnum (cdef2.red),
+ make_fixnum (cdef2.green),
+ make_fixnum (cdef2.blue)));
}
\f
{
/* Look up a face for a slightly smaller/larger font. */
pt += delta;
- attrs[LFACE_HEIGHT_INDEX] = make_number (pt);
+ attrs[LFACE_HEIGHT_INDEX] = make_fixnum (pt);
new_face_id = lookup_face (f, attrs);
new_face = FACE_FROM_ID (f, new_face_id);
face = FACE_FROM_ID (f, face_id);
memcpy (attrs, face->lface, sizeof attrs);
- attrs[LFACE_HEIGHT_INDEX] = make_number (height);
+ attrs[LFACE_HEIGHT_INDEX] = make_fixnum (height);
font_clear_prop (attrs, FONT_SIZE_INDEX);
face_id = lookup_face (f, attrs);
#endif /* HAVE_WINDOW_SYSTEM */
(Lisp_Object plist)
{
Lisp_Object lface;
- lface = Fmake_vector (make_number (LFACE_VECTOR_SIZE),
+ lface = Fmake_vector (make_fixnum (LFACE_VECTOR_SIZE),
Qunspecified);
merge_face_ref (NULL, XFRAME (selected_frame),
plist, XVECTOR (lface)->contents,
return true;
s1 = SYMBOL_NAME (face->font->props[i]);
s2 = SYMBOL_NAME (def_face->font->props[i]);
- if (! EQ (Fcompare_strings (s1, make_number (0), Qnil,
- s2, make_number (0), Qnil, Qt), Qt))
+ if (! EQ (Fcompare_strings (s1, make_fixnum (0), Qnil,
+ s2, make_fixnum (0), Qnil, Qt), Qt))
return true;
}
return false;
ASET (lface, LFACE_FAMILY_INDEX, build_string ("default"));
ASET (lface, LFACE_FOUNDRY_INDEX, LFACE_FAMILY (lface));
ASET (lface, LFACE_SWIDTH_INDEX, Qnormal);
- ASET (lface, LFACE_HEIGHT_INDEX, make_number (1));
+ ASET (lface, LFACE_HEIGHT_INDEX, make_fixnum (1));
if (UNSPECIFIEDP (LFACE_WEIGHT (lface)))
ASET (lface, LFACE_WEIGHT_INDEX, Qnormal);
if (UNSPECIFIEDP (LFACE_SLANT (lface)))
face->box = FACE_SIMPLE_BOX;
face->box_line_width = 1;
}
- else if (INTEGERP (box))
+ else if (FIXNUMP (box))
{
/* Simple box of specified line width in foreground color of the
face. */
if (EQ (keyword, QCline_width))
{
- if (INTEGERP (value) && XINT (value) != 0)
+ if (FIXNUMP (value) && XINT (value) != 0)
face->box_line_width = XINT (value);
}
else if (EQ (keyword, QCcolor))
prop = Fget_text_property (position, propname, w->contents);
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
end = Fnext_single_property_change (position, propname, w->contents, limit1);
- if (INTEGERP (end))
+ if (FIXNUMP (end))
endpos = XINT (end);
/* Look at properties from overlays. */
prop = Fget_text_property (position, propname, w->contents);
XSETFASTINT (limit1, (limit < endpos ? limit : endpos));
end = Fnext_single_property_change (position, propname, w->contents, limit1);
- if (INTEGERP (end))
+ if (FIXNUMP (end))
endpos = XINT (end);
*endptr = endpos;
short, so set the limit to the end of the string. */
XSETFASTINT (limit, SCHARS (string));
end = Fnext_single_property_change (position, prop_name, string, limit);
- if (INTEGERP (end))
+ if (FIXNUMP (end))
*endptr = XFASTINT (end);
else
*endptr = -1;
char *name = buf + num;
ptrdiff_t len = strlen (name);
len -= 0 < len && name[len - 1] == '\n';
- cmap = Fcons (Fcons (make_string (name, len), make_number (color)),
+ cmap = Fcons (Fcons (make_string (name, len), make_fixnum (color)),
cmap);
}
}
fprintf (stderr, "\n");
for (i = 0; i < FRAME_FACE_CACHE (SELECTED_FRAME ())->used; ++i)
- Fdump_face (make_number (i));
+ Fdump_face (make_fixnum (i));
}
else
{
struct face *face;
- CHECK_NUMBER (n);
+ CHECK_FIXNUM (n);
face = FACE_FROM_ID_OR_NULL (SELECTED_FRAME (), XINT (n));
if (face == NULL)
error ("Not a valid face");
if (FRAME_MINIBUF_ONLY_P (f) || FRAME_PARENT_FRAME (f))
return;
- if (TYPE_RANGED_INTEGERP (int, value))
+ if (TYPE_RANGED_FIXNUMP (int, value))
nlines = XINT (value);
else
nlines = 0;
return;
/* Use VALUE only if an int >= 0. */
- if (RANGED_INTEGERP (0, value, INT_MAX))
+ if (RANGED_FIXNUMP (0, value, INT_MAX))
nlines = XFASTINT (value);
else
nlines = 0;
FRAME_TOOL_BAR_HEIGHT (f) = height;
FRAME_TOOL_BAR_LINES (f) = lines;
/* Store the `tool-bar-lines' and `height' frame parameters. */
- store_frame_param (f, Qtool_bar_lines, make_number (lines));
- store_frame_param (f, Qheight, make_number (FRAME_LINES (f)));
+ store_frame_param (f, Qtool_bar_lines, make_fixnum (lines));
+ store_frame_param (f, Qheight, make_fixnum (FRAME_LINES (f)));
/* We also have to make sure that the internal border at the top of
the frame, below the menu bar or tool bar, is redrawn when the
icon_y = x_frame_get_and_record_arg (f, parms, Qicon_top, 0, 0, RES_TYPE_NUMBER);
if (!EQ (icon_x, Qunbound) && !EQ (icon_y, Qunbound))
{
- CHECK_NUMBER (icon_x);
- CHECK_NUMBER (icon_y);
+ CHECK_FIXNUM (icon_x);
+ CHECK_FIXNUM (icon_y);
}
else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
error ("Both left and top icon corners of icon must be specified");
if (EQ (parent, Qunbound))
parent = Qnil;
if (! NILP (parent))
- CHECK_NUMBER (parent);
+ CHECK_FIXNUM (parent);
frame = Qnil;
tem = x_get_arg (dpyinfo, parms, Qminibuffer, "minibuffer", "Minibuffer",
/* Frame contents get displaced if an embedded X window has a border. */
if (! FRAME_X_EMBEDDED_P (f))
- x_default_parameter (f, parms, Qborder_width, make_number (0),
+ x_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
/* This defaults to 1 in order to match xterm. We recognize either
}
x_default_parameter (f, parms, Qinternal_border_width,
#ifdef USE_GTK /* We used to impose 0 in xg_create_frame_widgets. */
- make_number (0),
+ make_fixnum (0),
#else
- make_number (1),
+ make_fixnum (1),
#endif
"internalBorderWidth", "internalBorderWidth",
RES_TYPE_NUMBER);
- x_default_parameter (f, parms, Qright_divider_width, make_number (0),
+ x_default_parameter (f, parms, Qright_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
- x_default_parameter (f, parms, Qbottom_divider_width, make_number (0),
+ x_default_parameter (f, parms, Qbottom_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qvertical_scroll_bars,
#if defined (USE_GTK) && defined (USE_TOOLKIT_SCROLL_BARS)
Also process `min-width' and `min-height' parameters right here
because `frame-windows-min-size' needs them. */
tem = x_get_arg (dpyinfo, parms, Qmin_width, NULL, NULL, RES_TYPE_NUMBER);
- if (NUMBERP (tem))
+ if (FIXED_OR_FLOATP (tem))
store_frame_param (f, Qmin_width, tem);
tem = x_get_arg (dpyinfo, parms, Qmin_height, NULL, NULL, RES_TYPE_NUMBER);
- if (NUMBERP (tem))
+ if (FIXED_OR_FLOATP (tem))
store_frame_param (f, Qmin_height, tem);
adjust_frame_size (f, FRAME_COLS (f) * FRAME_COLUMN_WIDTH (f),
FRAME_LINES (f) * FRAME_LINE_HEIGHT (f), 5, true,
x_default_parameter (f, parms, Qmenu_bar_lines,
NILP (Vmenu_bar_mode)
- ? make_number (0) : make_number (1),
+ ? make_fixnum (0) : make_fixnum (1),
NULL, NULL, RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qtool_bar_lines,
NILP (Vtool_bar_mode)
- ? make_number (0) : make_number (1),
+ ? make_fixnum (0) : make_fixnum (1),
NULL, NULL, RES_TYPE_NUMBER);
x_default_parameter (f, parms, Qbuffer_predicate, Qnil,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (x_display_pixel_width (dpyinfo));
+ return make_fixnum (x_display_pixel_width (dpyinfo));
}
DEFUN ("x-display-pixel-height", Fx_display_pixel_height,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (x_display_pixel_height (dpyinfo));
+ return make_fixnum (x_display_pixel_height (dpyinfo));
}
DEFUN ("x-display-planes", Fx_display_planes, Sx_display_planes,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (dpyinfo->n_planes);
+ return make_fixnum (dpyinfo->n_planes);
}
DEFUN ("x-display-color-cells", Fx_display_color_cells, Sx_display_color_cells,
it "should be enough for everyone". */
if (nr_planes > 24) nr_planes = 24;
- return make_number (1 << nr_planes);
+ return make_fixnum (1 << nr_planes);
}
DEFUN ("x-server-max-request-size", Fx_server_max_request_size,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (MAXREQUEST (dpyinfo->display));
+ return make_fixnum (MAXREQUEST (dpyinfo->display));
}
DEFUN ("x-server-vendor", Fx_server_vendor, Sx_server_vendor, 0, 1, 0,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (ScreenCount (dpyinfo->display));
+ return make_fixnum (ScreenCount (dpyinfo->display));
}
DEFUN ("x-display-mm-height", Fx_display_mm_height, Sx_display_mm_height, 0, 1, 0,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (HeightMMOfScreen (dpyinfo->screen));
+ return make_fixnum (HeightMMOfScreen (dpyinfo->screen));
}
DEFUN ("x-display-mm-width", Fx_display_mm_width, Sx_display_mm_width, 0, 1, 0,
{
struct x_display_info *dpyinfo = check_x_display_info (terminal);
- return make_number (WidthMMOfScreen (dpyinfo->screen));
+ return make_fixnum (WidthMMOfScreen (dpyinfo->screen));
}
DEFUN ("x-display-backing-store", Fx_display_backing_store,
struct x_display_info *dpyinfo,
const char *source)
{
- Lisp_Object monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
+ Lisp_Object monitor_frames = Fmake_vector (make_fixnum (n_monitors), Qnil);
Lisp_Object frame, rest;
FOR_EACH_FRAME (rest, frame)
#endif
n_monitors = gdk_screen_get_n_monitors (gscreen);
#endif
- monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
+ monitor_frames = Fmake_vector (make_fixnum (n_monitors), Qnil);
monitors = xzalloc (n_monitors * sizeof *monitors);
FOR_EACH_FRAME (rest, frame)
edges = Fx_frame_edges (parent, Qnative_edges);
if (!NILP (edges))
{
- x_native += XINT (Fnth (make_number (0), edges));
- y_native += XINT (Fnth (make_number (1), edges));
+ x_native += XINT (Fnth (make_fixnum (0), edges));
+ y_native += XINT (Fnth (make_fixnum (1), edges));
}
outer_left = x_native;
/* Construct list. */
if (EQ (attribute, Qouter_edges))
- return list4 (make_number (outer_left), make_number (outer_top),
- make_number (outer_right), make_number (outer_bottom));
+ return list4 (make_fixnum (outer_left), make_fixnum (outer_top),
+ make_fixnum (outer_right), make_fixnum (outer_bottom));
else if (EQ (attribute, Qnative_edges))
- return list4 (make_number (native_left), make_number (native_top),
- make_number (native_right), make_number (native_bottom));
+ return list4 (make_fixnum (native_left), make_fixnum (native_top),
+ make_fixnum (native_right), make_fixnum (native_bottom));
else if (EQ (attribute, Qinner_edges))
- return list4 (make_number (inner_left), make_number (inner_top),
- make_number (inner_right), make_number (inner_bottom));
+ return list4 (make_fixnum (inner_left), make_fixnum (inner_top),
+ make_fixnum (inner_right), make_fixnum (inner_bottom));
else
return
listn (CONSTYPE_HEAP, 11,
Fcons (Qouter_position,
- Fcons (make_number (outer_left),
- make_number (outer_top))),
+ Fcons (make_fixnum (outer_left),
+ make_fixnum (outer_top))),
Fcons (Qouter_size,
- Fcons (make_number (outer_right - outer_left),
- make_number (outer_bottom - outer_top))),
+ Fcons (make_fixnum (outer_right - outer_left),
+ make_fixnum (outer_bottom - outer_top))),
/* Approximate. */
Fcons (Qexternal_border_size,
- Fcons (make_number (right_off),
- make_number (bottom_off))),
- Fcons (Qouter_border_width, make_number (x_border_width)),
+ Fcons (make_fixnum (right_off),
+ make_fixnum (bottom_off))),
+ Fcons (Qouter_border_width, make_fixnum (x_border_width)),
/* Approximate. */
Fcons (Qtitle_bar_size,
- Fcons (make_number (0),
- make_number (top_off - bottom_off))),
+ Fcons (make_fixnum (0),
+ make_fixnum (top_off - bottom_off))),
Fcons (Qmenu_bar_external, menu_bar_external ? Qt : Qnil),
Fcons (Qmenu_bar_size,
- Fcons (make_number (menu_bar_width),
- make_number (menu_bar_height))),
+ Fcons (make_fixnum (menu_bar_width),
+ make_fixnum (menu_bar_height))),
Fcons (Qtool_bar_external, tool_bar_external ? Qt : Qnil),
Fcons (Qtool_bar_position, FRAME_TOOL_BAR_POSITION (f)),
Fcons (Qtool_bar_size,
- Fcons (make_number (tool_bar_width),
- make_number (tool_bar_height))),
+ Fcons (make_fixnum (tool_bar_width),
+ make_fixnum (tool_bar_height))),
Fcons (Qinternal_border_width,
- make_number (internal_border_width)));
+ make_fixnum (internal_border_width)));
}
DEFUN ("x-frame-geometry", Fx_frame_geometry, Sx_frame_geometry, 0, 1, 0,
(unsigned int *) &dummy);
unblock_input ();
- return Fcons (make_number (x), make_number (y));
+ return Fcons (make_fixnum (x), make_fixnum (y));
}
DEFUN ("x-set-mouse-absolute-pixel-position", Fx_set_mouse_absolute_pixel_position,
if (! NILP (format))
{
- CHECK_NUMBER (format);
+ CHECK_FIXNUM (format);
if (XINT (format) != 8 && XINT (format) != 16
&& XINT (format) != 32)
XFree (tmp_data);
prop_attr = make_uninit_vector (3);
- ASET (prop_attr, 0, make_number (actual_type));
- ASET (prop_attr, 1, make_number (actual_format));
- ASET (prop_attr, 2, make_number (bytes_remaining / (actual_format >> 3)));
+ ASET (prop_attr, 0, make_fixnum (actual_type));
+ ASET (prop_attr, 1, make_fixnum (actual_format));
+ ASET (prop_attr, 2, make_fixnum (bytes_remaining / (actual_format >> 3)));
}
unblock_input ();
needed to determine window geometry. */
x_default_font_parameter (f, parms);
- x_default_parameter (f, parms, Qborder_width, make_number (0),
+ x_default_parameter (f, parms, Qborder_width, make_fixnum (0),
"borderWidth", "BorderWidth", RES_TYPE_NUMBER);
/* This defaults to 2 in order to match xterm. We recognize either
parms);
}
- x_default_parameter (f, parms, Qinternal_border_width, make_number (1),
+ x_default_parameter (f, parms, Qinternal_border_width, make_fixnum (1),
"internalBorderWidth", "internalBorderWidth",
RES_TYPE_NUMBER);
- x_default_parameter (f, parms, Qright_divider_width, make_number (0),
+ x_default_parameter (f, parms, Qright_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
- x_default_parameter (f, parms, Qbottom_divider_width, make_number (0),
+ x_default_parameter (f, parms, Qbottom_divider_width, make_fixnum (0),
NULL, NULL, RES_TYPE_NUMBER);
/* Also do the stuff which must be set before the window exists. */
/* Move the tooltip window where the mouse pointer is. Resize and
show it. */
- if ((!INTEGERP (left) && !INTEGERP (right))
- || (!INTEGERP (top) && !INTEGERP (bottom)))
+ if ((!FIXNUMP (left) && !FIXNUMP (right))
+ || (!FIXNUMP (top) && !FIXNUMP (bottom)))
{
Lisp_Object frame, attributes, monitor, geometry;
geometry = Fassq (Qgeometry, monitor);
if (CONSP (geometry))
{
- min_x = XINT (Fnth (make_number (1), geometry));
- min_y = XINT (Fnth (make_number (2), geometry));
- max_x = min_x + XINT (Fnth (make_number (3), geometry));
- max_y = min_y + XINT (Fnth (make_number (4), 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));
if (min_x <= *root_x && *root_x < max_x
&& min_y <= *root_y && *root_y < max_y)
{
max_y = x_display_pixel_height (FRAME_DISPLAY_INFO (f));
}
- if (INTEGERP (top))
+ if (FIXNUMP (top))
*root_y = XINT (top);
- else if (INTEGERP (bottom))
+ else if (FIXNUMP (bottom))
*root_y = XINT (bottom) - height;
else if (*root_y + XINT (dy) <= min_y)
*root_y = min_y; /* Can happen for negative dy */
/* Put it on the top. */
*root_y = min_y;
- if (INTEGERP (left))
+ if (FIXNUMP (left))
*root_x = XINT (left);
- else if (INTEGERP (right))
+ else if (FIXNUMP (right))
*root_x = XINT (right) - width;
else if (*root_x + XINT (dx) <= min_x)
*root_x = 0; /* Can happen for negative dx */
f = decode_window_system_frame (frame);
if (NILP (timeout))
- timeout = make_number (5);
+ timeout = make_fixnum (5);
else
- CHECK_NATNUM (timeout);
+ CHECK_FIXNAT (timeout);
if (NILP (dx))
- dx = make_number (5);
+ dx = make_fixnum (5);
else
- CHECK_NUMBER (dx);
+ CHECK_FIXNUM (dx);
if (NILP (dy))
- dy = make_number (-10);
+ dy = make_fixnum (-10);
else
- CHECK_NUMBER (dy);
+ CHECK_FIXNUM (dy);
#ifdef USE_GTK
if (x_gtk_use_system_tooltips)
if (NILP (Fassq (Qname, parms)))
parms = Fcons (Fcons (Qname, build_string ("tooltip")), parms);
if (NILP (Fassq (Qinternal_border_width, parms)))
- parms = Fcons (Fcons (Qinternal_border_width, make_number (3)), parms);
+ parms = Fcons (Fcons (Qinternal_border_width, make_fixnum (3)), parms);
if (NILP (Fassq (Qborder_width, parms)))
- parms = Fcons (Fcons (Qborder_width, make_number (1)), parms);
+ parms = Fcons (Fcons (Qborder_width, make_fixnum (1)), parms);
if (NILP (Fassq (Qborder_color, parms)))
parms = Fcons (Fcons (Qborder_color, build_string ("lightyellow")), parms);
if (NILP (Fassq (Qbackground_color, parms)))
tip_buf = Fget_buffer_create (tip);
/* We will mark the tip window a "pseudo-window" below, and such
windows cannot have display margins. */
- bset_left_margin_cols (XBUFFER (tip_buf), make_number (0));
- bset_right_margin_cols (XBUFFER (tip_buf), make_number (0));
+ bset_left_margin_cols (XBUFFER (tip_buf), make_fixnum (0));
+ bset_right_margin_cols (XBUFFER (tip_buf), make_fixnum (0));
set_window_buffer (window, tip_buf, false, false);
w = XWINDOW (window);
w->pseudo_window_p = true;
w->pixel_top = 0;
if (CONSP (Vx_max_tooltip_size)
- && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
- && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
+ && 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));
try_window (window, pos, TRY_WINDOW_IGNORE_FONTS_CHANGE);
/* Calculate size of tooltip window. */
size = Fwindow_text_pixel_size (window, Qnil, Qnil, Qnil,
- make_number (w->pixel_height), 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);
DEFVAR_LISP ("x-max-tooltip-size", Vx_max_tooltip_size,
doc: /* Maximum size for tooltips.
Value is a pair (COLUMNS . ROWS). Text larger than this is clipped. */);
- Vx_max_tooltip_size = Fcons (make_number (80), make_number (40));
+ Vx_max_tooltip_size = Fcons (make_fixnum (80), make_fixnum (40));
DEFVAR_LISP ("x-no-window-manager", Vx_no_window_manager,
doc: /* Non-nil if no X window manager is in use.
continue;
ASET (entity, FONT_TYPE_INDEX, Qx);
/* Avoid auto-scaled fonts. */
- if (INTEGERP (AREF (entity, FONT_DPI_INDEX))
- && INTEGERP (AREF (entity, FONT_AVGWIDTH_INDEX))
+ 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)
continue;
{
int size = 0;
- if (INTEGERP (AREF (entity, FONT_SIZE_INDEX)))
+ if (FIXNUMP (AREF (entity, FONT_SIZE_INDEX)))
size = XINT (AREF (entity, FONT_SIZE_INDEX));
else if (FLOATP (AREF (entity, FONT_SIZE_INDEX)))
size = XFLOAT_DATA (AREF (entity, FONT_SIZE_INDEX));
font->space_width = 0;
val = Ffont_get (font_object, QCavgwidth);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
font->average_width = XINT (val) / 10;
if (font->average_width < 0)
font->average_width = - font->average_width;
staticpro (&xfont_scripts_cache);
xfont_scripts_cache = CALLN (Fmake_hash_table, QCtest, Qequal);
staticpro (&xfont_scratch_props);
- xfont_scratch_props = Fmake_vector (make_number (8), Qnil);
+ xfont_scratch_props = Fmake_vector (make_fixnum (8), Qnil);
register_font_driver (&xfont_driver, NULL);
}
FcPatternAddBool (pat, FC_AUTOHINT, NILP (val) ? FcFalse : FcTrue);
else if (EQ (key, QChintstyle))
{
- if (INTEGERP (val))
+ if (FIXNUMP (val))
FcPatternAddInteger (pat, FC_HINT_STYLE, XINT (val));
else if (SYMBOLP (val)
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
}
else if (EQ (key, QCrgba))
{
- if (INTEGERP (val))
+ if (FIXNUMP (val))
FcPatternAddInteger (pat, FC_RGBA, XINT (val));
else if (SYMBOLP (val)
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
}
else if (EQ (key, QClcdfilter))
{
- if (INTEGERP (val))
+ if (FIXNUMP (val))
FcPatternAddInteger (pat, FC_LCD_FILTER, ival = XINT (val));
else if (SYMBOLP (val)
&& FcNameConstant (SDATA (SYMBOL_NAME (val)), &ival))
FcPatternAddDouble (pat, FC_DPI, dbl);
}
val = AREF (entity, FONT_AVGWIDTH_INDEX);
- if (INTEGERP (val) && XINT (val) == 0)
+ if (FIXNUMP (val) && XINT (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). */
xftfont_info->matrix.xy = 0x10000L * matrix->xy;
xftfont_info->matrix.yx = 0x10000L * matrix->yx;
}
- if (INTEGERP (AREF (entity, FONT_SPACING_INDEX)))
+ if (FIXNUMP (AREF (entity, FONT_SPACING_INDEX)))
spacing = XINT (AREF (entity, FONT_SPACING_INDEX));
else
spacing = FC_PROPORTIONAL;
items in x-display-monitor-attributes-list. */
workarea = call3 (Qframe_monitor_workarea,
Qnil,
- make_number (data->x),
- make_number (data->y));
+ make_fixnum (data->x),
+ make_fixnum (data->y));
if (CONSP (workarea))
{
int min_x, min_y;
min_x = XINT (XCAR (workarea));
- min_y = XINT (Fnth (make_number (1), workarea));
- max_x = min_x + XINT (Fnth (make_number (2), workarea));
- max_y = min_y + XINT (Fnth (make_number (3), 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));
}
if (max_x < 0 || max_y < 0)
pane_name = first_item[MENU_ITEMS_ITEM_NAME];
/* (menu-item MENU-NAME PANE-NUMBER) */
- menu_object = list3 (Qmenu_item, pane_name, make_number (pane));
+ menu_object = list3 (Qmenu_item, pane_name, make_fixnum (pane));
show_help_echo (help_string ? build_string (help_string) : Qnil,
- Qnil, menu_object, make_number (item));
+ Qnil, menu_object, make_fixnum (item));
}
struct pop_down_menu
/* Set double click time of list boxes in the file selection
dialog from `double-click-time'. */
- if (INTEGERP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0)
+ if (FIXNUMP (Vdouble_click_time) && XINT (Vdouble_click_time) > 0)
{
sprintf (line, "%s*fsb*DirList.doubleClickInterval: %"pI"d",
myclass, XFASTINT (Vdouble_click_time));
if (STRINGP (check)
|| VECTORP (check)
|| SYMBOLP (check)
- || INTEGERP (check)
+ || FIXNUMP (check)
|| NILP (value))
return value;
/* Check for a value that CONS_TO_INTEGER could handle. */
else if (CONSP (check)
- && INTEGERP (XCAR (check))
- && (INTEGERP (XCDR (check))
+ && FIXNUMP (XCAR (check))
+ && (FIXNUMP (XCDR (check))
||
(CONSP (XCDR (check))
- && INTEGERP (XCAR (XCDR (check)))
+ && FIXNUMP (XCAR (XCDR (check)))
&& NILP (XCDR (XCDR (check))))))
return value;
lispy_type = QUTF8_STRING;
else
lispy_type = QSTRING;
- Fput_text_property (make_number (0), make_number (size),
+ Fput_text_property (make_fixnum (0), make_fixnum (size),
Qforeign_selection, lispy_type, str);
return str;
}
else if (format == 16 && size == sizeof (short))
{
if (type == XA_INTEGER)
- return make_number (((short *) data) [0]);
+ return make_fixnum (((short *) data) [0]);
else
- return make_number (((unsigned short *) data) [0]);
+ return make_fixnum (((unsigned short *) data) [0]);
}
/* Convert any other kind of data to a vector of numbers, represented
for (i = 0; i < size / 2; i++)
{
short j = ((short *) data) [i];
- ASET (v, i, make_number (j));
+ ASET (v, i, make_fixnum (j));
}
}
else
for (i = 0; i < size / 2; i++)
{
unsigned short j = ((unsigned short *) data) [i];
- ASET (v, i, make_number (j));
+ ASET (v, i, make_fixnum (j));
}
}
return v;
cons_to_x_long (Lisp_Object obj)
{
if (X_ULONG_MAX <= INTMAX_MAX
- || XINT (INTEGERP (obj) ? obj : XCAR (obj)) < 0)
+ || XINT (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);
*x_atom_ptr = symbol_to_x_atom (dpyinfo, obj);
if (NILP (type)) type = QATOM;
}
- else if (RANGED_INTEGERP (X_SHRT_MIN, obj, X_SHRT_MAX))
+ else if (RANGED_FIXNUMP (X_SHRT_MIN, obj, X_SHRT_MAX))
{
void *data = xmalloc (sizeof (short) + 1);
short *short_ptr = data;
*short_ptr = XINT (obj);
if (NILP (type)) type = QINTEGER;
}
- else if (INTEGERP (obj)
- || (CONSP (obj) && INTEGERP (XCAR (obj))
- && (INTEGERP (XCDR (obj))
+ else if (FIXNUMP (obj)
+ || (CONSP (obj) && FIXNUMP (XCAR (obj))
+ && (FIXNUMP (XCDR (obj))
|| (CONSP (XCDR (obj))
- && INTEGERP (XCAR (XCDR (obj)))))))
+ && FIXNUMP (XCAR (XCDR (obj)))))))
{
void *data = xmalloc (sizeof (unsigned long) + 1);
unsigned long *x_long_ptr = data;
if (NILP (type)) type = QINTEGER;
for (i = 0; i < size; i++)
{
- if (! RANGED_INTEGERP (X_SHRT_MIN, AREF (obj, i),
+ if (! RANGED_FIXNUMP (X_SHRT_MIN, AREF (obj, i),
X_SHRT_MAX))
{
/* Use sizeof (long) even if it is more than 32 bits.
clean_local_selection_data (Lisp_Object obj)
{
if (CONSP (obj)
- && INTEGERP (XCAR (obj))
+ && FIXNUMP (XCAR (obj))
&& CONSP (XCDR (obj))
- && INTEGERP (XCAR (XCDR (obj)))
+ && FIXNUMP (XCAR (XCDR (obj)))
&& NILP (XCDR (XCDR (obj))))
obj = Fcons (XCAR (obj), XCDR (obj));
if (CONSP (obj)
- && INTEGERP (XCAR (obj))
- && INTEGERP (XCDR (obj)))
+ && FIXNUMP (XCAR (obj))
+ && FIXNUMP (XCDR (obj)))
{
if (XINT (XCAR (obj)) == 0)
return XCDR (obj);
if (XINT (XCAR (obj)) == -1)
- return make_number (- XINT (XCDR (obj)));
+ return make_fixnum (- XINT (XCDR (obj)));
}
if (VECTORP (obj))
{
{
Lisp_Object o = XCAR (iter);
- if (! NUMBERP (o) && ! STRINGP (o) && ! CONSP (o))
+ if (! FIXED_OR_FLOATP (o) && ! STRINGP (o) && ! CONSP (o))
return -1;
else if (CONSP (o) &&
- (! NUMBERP (XCAR (o)) || ! NUMBERP (XCDR (o))))
+ (! FIXED_OR_FLOATP (XCAR (o)) || ! FIXED_OR_FLOATP (XCDR (o))))
return -1;
if (size == INT_MAX)
return -1;
{
Lisp_Object o = XCAR (iter);
- if (NUMBERP (o) || CONSP (o))
+ if (FIXED_OR_FLOATP (o) || CONSP (o))
{
if (CONSP (o)
- && RANGED_INTEGERP (X_LONG_MIN >> 16, XCAR (o), X_LONG_MAX >> 16)
- && RANGED_INTEGERP (- (1 << 15), XCDR (o), -1))
+ && RANGED_FIXNUMP (X_LONG_MIN >> 16, XCAR (o), X_LONG_MAX >> 16)
+ && RANGED_FIXNUMP (- (1 << 15), XCDR (o), -1))
{
/* cons_to_x_long does not handle negative values for v2.
For XDnd, v2 might be y of a window, and can be negative.
data = (unsigned char *) idata;
}
- vec = Fmake_vector (make_number (4), Qnil);
+ vec = Fmake_vector (make_fixnum (4), Qnil);
ASET (vec, 0, SYMBOL_NAME (x_atom_to_symbol (FRAME_DISPLAY_INFO (f),
event->message_type)));
ASET (vec, 1, frame);
- ASET (vec, 2, make_number (event->format));
+ ASET (vec, 2, make_fixnum (event->format));
ASET (vec, 3, x_property_data_to_lisp (f,
data,
event->message_type,
bufp->kind = DRAG_N_DROP_EVENT;
bufp->frame_or_window = frame;
bufp->timestamp = CurrentTime;
- bufp->x = make_number (x);
- bufp->y = make_number (y);
+ bufp->x = make_fixnum (x);
+ bufp->y = make_fixnum (y);
bufp->arg = vec;
bufp->modifiers = 0;
struct frame *f = decode_window_system_frame (from);
bool to_root;
- CHECK_NUMBER (format);
+ CHECK_FIXNUM (format);
CHECK_CONS (values);
if (x_check_property_data (values) == -1)
else
error ("DEST as a string must be one of PointerWindow or InputFocus");
}
- else if (NUMBERP (dest) || CONSP (dest))
+ else if (FIXED_OR_FLOATP (dest) || CONSP (dest))
CONS_TO_INTEGER (dest, Window, wdest);
else
error ("DEST must be a frame, nil, string, number or cons");
if (FLOATP (Vframe_alpha_lower_limit))
alpha_min = XFLOAT_DATA (Vframe_alpha_lower_limit);
- else if (INTEGERP (Vframe_alpha_lower_limit))
+ else if (FIXNUMP (Vframe_alpha_lower_limit))
alpha_min = (XINT (Vframe_alpha_lower_limit)) / 100.0;
if (alpha < 0.0)
if (s->face->id == TOOL_BAR_FACE_ID)
{
if (CONSP (Vtool_bar_button_margin)
- && INTEGERP (XCAR (Vtool_bar_button_margin))
- && INTEGERP (XCDR (Vtool_bar_button_margin)))
+ && 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));
}
- else if (INTEGERP (Vtool_bar_button_margin))
+ else if (FIXNUMP (Vtool_bar_button_margin))
extra_x = extra_y = XINT (Vtool_bar_button_margin);
}
Lisp_Object val
= buffer_local_value (Qunderline_minimum_offset,
s->w->contents);
- if (INTEGERP (val))
+ if (FIXNUMP (val))
minimum_offset = XFASTINT (val);
else
minimum_offset = 1;
Lisp_Object tem;
tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_ctrl = XINT (tem) & INT_MAX;
+ if (FIXNUMP (tem)) mod_ctrl = XINT (tem) & INT_MAX;
tem = Fget (Vx_alt_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_alt = XINT (tem) & INT_MAX;
+ if (FIXNUMP (tem)) mod_alt = XINT (tem) & INT_MAX;
tem = Fget (Vx_meta_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_meta = XINT (tem) & INT_MAX;
+ if (FIXNUMP (tem)) mod_meta = XINT (tem) & INT_MAX;
tem = Fget (Vx_hyper_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_hyper = XINT (tem) & INT_MAX;
+ if (FIXNUMP (tem)) mod_hyper = XINT (tem) & INT_MAX;
tem = Fget (Vx_super_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_super = XINT (tem) & INT_MAX;
+ if (FIXNUMP (tem)) mod_super = XINT (tem) & INT_MAX;
return ( ((state & (ShiftMask | dpyinfo->shift_lock_mask)) ? shift_modifier : 0)
| ((state & ControlMask) ? mod_ctrl : 0)
Lisp_Object tem;
tem = Fget (Vx_ctrl_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_ctrl = XINT (tem);
+ if (FIXNUMP (tem)) mod_ctrl = XINT (tem);
tem = Fget (Vx_alt_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_alt = XINT (tem);
+ if (FIXNUMP (tem)) mod_alt = XINT (tem);
tem = Fget (Vx_meta_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_meta = XINT (tem);
+ if (FIXNUMP (tem)) mod_meta = XINT (tem);
tem = Fget (Vx_hyper_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_hyper = XINT (tem);
+ if (FIXNUMP (tem)) mod_hyper = XINT (tem);
tem = Fget (Vx_super_keysym, Qmodifier_value);
- if (INTEGERP (tem)) mod_super = XINT (tem);
+ if (FIXNUMP (tem)) mod_super = XINT (tem);
return ( ((state & mod_alt) ? dpyinfo->alt_mod_mask : 0)
#endif
ievent->code = 0;
ievent->part = ev->data.l[2];
- ievent->x = make_number (ev->data.l[3]);
- ievent->y = make_number (ev->data.l[4]);
+ ievent->x = make_fixnum (ev->data.l[3]);
+ ievent->y = make_fixnum (ev->data.l[4]);
ievent->modifiers = 0;
}
#endif
ievent->code = 0;
ievent->part = ev->data.l[2];
- ievent->x = make_number (ev->data.l[3]);
- ievent->y = make_number (ev->data.l[4]);
+ ievent->x = make_fixnum (ev->data.l[3]);
+ ievent->y = make_fixnum (ev->data.l[4]);
ievent->modifiers = 0;
}
/* If mouse-highlight is an integer, input clears out
mouse highlighting. */
- if (!hlinfo->mouse_face_hidden && INTEGERP (Vmouse_highlight)
+ if (!hlinfo->mouse_face_hidden && FIXNUMP (Vmouse_highlight)
#if ! defined (USE_GTK)
&& (f == 0
|| !EQ (f->tool_bar_window, hlinfo->mouse_face_window))
/* Now non-ASCII. */
if (HASH_TABLE_P (Vx_keysym_table)
- && (c = Fgethash (make_number (keysym),
+ && (c = Fgethash (make_fixnum (keysym),
Vx_keysym_table,
Qnil),
- NATNUMP (c)))
+ FIXNATP (c)))
{
inev.ie.kind = (SINGLE_BYTE_CHAR_P (XFASTINT (c))
? ASCII_KEYSTROKE_EVENT
if (terminal_list == 0)
{
fprintf (stderr, "%s\n", error_msg);
- Fkill_emacs (make_number (70));
+ Fkill_emacs (make_fixnum (70));
/* NOTREACHED */
}
XSETFRAME (frame, f);
edges = Fx_frame_edges (frame, Qouter_edges);
if (!NILP (edges))
- width = (XINT (Fnth (make_number (2), edges))
- - XINT (Fnth (make_number (0), edges)));
+ width = (XINT (Fnth (make_fixnum (2), edges))
+ - XINT (Fnth (make_fixnum (0), edges)));
}
if (p)
if (NILP (edges))
edges = Fx_frame_edges (frame, Qouter_edges);
if (!NILP (edges))
- height = (XINT (Fnth (make_number (3), edges))
- - XINT (Fnth (make_number (1), edges)));
+ height = (XINT (Fnth (make_fixnum (3), edges))
+ - XINT (Fnth (make_fixnum (1), edges)));
}
if (p)
{
struct x_display_info *dpyinfo = FRAME_DISPLAY_INFO (XFRAME (frame));
- x_send_client_event (frame, make_number (0), frame,
+ x_send_client_event (frame, make_fixnum (0), frame,
dpyinfo->Xatom_net_wm_state,
- make_number (32),
+ make_fixnum (32),
/* 1 = add, 0 = remove */
Fcons
- (make_number (add),
+ (make_fixnum (add),
Fcons
(make_fixnum_or_float (atom),
(value != 0
{
frame_size_history_add
(f, Qx_set_window_size_1, width, height,
- list2 (make_number (old_height),
- make_number (pixelheight + FRAME_MENUBAR_HEIGHT (f))));
+ list2 (make_fixnum (old_height),
+ make_fixnum (pixelheight + FRAME_MENUBAR_HEIGHT (f))));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
old_width, pixelheight + FRAME_MENUBAR_HEIGHT (f));
{
frame_size_history_add
(f, Qx_set_window_size_2, width, height,
- list2 (make_number (old_width), make_number (pixelwidth)));
+ list2 (make_fixnum (old_width), make_fixnum (pixelwidth)));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
pixelwidth, old_height);
{
frame_size_history_add
(f, Qx_set_window_size_3, width, height,
- list3 (make_number (pixelwidth + FRAME_TOOLBAR_WIDTH (f)),
- make_number (pixelheight + FRAME_TOOLBAR_HEIGHT (f)
+ list3 (make_fixnum (pixelwidth + FRAME_TOOLBAR_WIDTH (f)),
+ make_fixnum (pixelheight + FRAME_TOOLBAR_HEIGHT (f)
+ FRAME_MENUBAR_HEIGHT (f)),
- make_number (FRAME_MENUBAR_HEIGHT (f))));
+ make_fixnum (FRAME_MENUBAR_HEIGHT (f))));
XResizeWindow (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f),
pixelwidth, pixelheight + FRAME_MENUBAR_HEIGHT (f));
{
Lisp_Object frame;
XSETFRAME (frame, f);
- x_send_client_event (frame, make_number (0), frame,
+ x_send_client_event (frame, make_fixnum (0), frame,
dpyinfo->Xatom_net_active_window,
- make_number (32),
+ make_fixnum (32),
list2i (1, dpyinfo->last_user_time));
}
}
DEFSYM (Qmodifier_value, "modifier-value");
DEFSYM (Qctrl, "ctrl");
- Fput (Qctrl, Qmodifier_value, make_number (ctrl_modifier));
+ Fput (Qctrl, Qmodifier_value, make_fixnum (ctrl_modifier));
DEFSYM (Qalt, "alt");
- Fput (Qalt, Qmodifier_value, make_number (alt_modifier));
+ Fput (Qalt, Qmodifier_value, make_fixnum (alt_modifier));
DEFSYM (Qhyper, "hyper");
- Fput (Qhyper, Qmodifier_value, make_number (hyper_modifier));
+ Fput (Qhyper, Qmodifier_value, make_fixnum (hyper_modifier));
DEFSYM (Qmeta, "meta");
- Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
+ Fput (Qmeta, Qmodifier_value, make_fixnum (meta_modifier));
DEFSYM (Qsuper, "super");
- Fput (Qsuper, Qmodifier_value, make_number (super_modifier));
+ Fput (Qsuper, Qmodifier_value, make_fixnum (super_modifier));
DEFVAR_LISP ("x-ctrl-keysym", Vx_ctrl_keysym,
doc: /* Which keys Emacs uses for the ctrl modifier.
Lisp_Object arguments, Lisp_Object buffer)
{
CHECK_SYMBOL (type);
- CHECK_NATNUM (width);
- CHECK_NATNUM (height);
+ CHECK_FIXNAT (width);
+ CHECK_FIXNAT (height);
struct xwidget *xw = allocate_xwidget ();
Lisp_Object val;
case kJSTypeBoolean:
return (JSValueToBoolean (context, value)) ? Qt : Qnil;
case kJSTypeNumber:
- return make_number (JSValueToNumber (context, value, NULL));
+ return make_fixnum (JSValueToNumber (context, value, NULL));
case kJSTypeObject:
{
if (JSValueIsArray (context, value))
{
Lisp_Object cbs = xw->script_callbacks;
if (NILP (cbs))
- xw->script_callbacks = cbs = Fmake_vector (make_number (32), Qnil);
+ xw->script_callbacks = cbs = Fmake_vector (make_fixnum (32), Qnil);
/* Find first free index. */
ptrdiff_t idx;
CHECK_XWIDGET (xwidget);
GtkRequisition requisition;
gtk_widget_size_request (XXWIDGET (xwidget)->widget_osr, &requisition);
- return list2 (make_number (requisition.width),
- make_number (requisition.height));
+ return list2 (make_fixnum (requisition.width),
+ make_fixnum (requisition.height));
}
DEFUN ("xwidgetp",
CHECK_XWIDGET (xwidget);
struct xwidget *xw = XXWIDGET (xwidget);
return CALLN (Fvector, xw->type, xw->title,
- make_natnum (xw->width), make_natnum (xw->height));
+ make_fixed_natnum (xw->width), make_fixed_natnum (xw->height));
}
DEFUN ("xwidget-view-info",
{
CHECK_XWIDGET_VIEW (xwidget_view);
struct xwidget_view *xv = XXWIDGET_VIEW (xwidget_view);
- return CALLN (Fvector, make_number (xv->x), make_number (xv->y),
- make_number (xv->clip_right), make_number (xv->clip_bottom),
- make_number (xv->clip_top), make_number (xv->clip_left));
+ return CALLN (Fvector, make_fixnum (xv->x), make_fixnum (xv->y),
+ make_fixnum (xv->clip_right), make_fixnum (xv->clip_bottom),
+ make_fixnum (xv->clip_top), make_fixnum (xv->clip_left));
}
DEFUN ("xwidget-view-model",