if (FRAME_MINIBUF_ONLY_P (f))
return;
- if (INTEGERP (value))
+ if (TYPE_RANGED_INTEGERP (int, value))
nlines = XINT (value);
else
nlines = 0;
if (FRAME_MINIBUF_ONLY_P (f))
return;
- /* Use VALUE only if an integer >= 0. */
- if (INTEGERP (value) && XINT (value) >= 0)
+ /* Use VALUE only if an int >= 0. */
+ if (RANGED_INTEGERP (0, value, INT_MAX))
nlines = XFASTINT (value);
else
nlines = 0;
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_TYPE_RANGED_INTEGER (int, icon_x);
+ CHECK_TYPE_RANGED_INTEGER (int, icon_y);
}
else if (!EQ (icon_x, Qunbound) || !EQ (icon_y, Qunbound))
error ("Both left and top icon corners of icon must be specified");
int minibuffer_only = 0;
long window_prompting = 0;
int width, height;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
Lisp_Object display;
struct x_display_info *dpyinfo = NULL;
if (! NILP (format))
{
CHECK_NUMBER (format);
- element_format = XFASTINT (format);
- if (element_format != 8 && element_format != 16
- && element_format != 32)
+ if (XINT (format) != 8 && XINT (format) != 16
+ && XINT (format) != 32)
error ("FORMAT must be one of 8, 16 or 32");
+ element_format = XINT (format);
}
if (CONSP (value))
Lisp_Object frame;
Lisp_Object name;
int width, height;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3;
int face_change_count_before = face_change_count;
Lisp_Object buffer;
int i, width, height, seen_reversed_p;
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4;
int old_windows_or_buffers_changed = windows_or_buffers_changed;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
specbind (Qinhibit_redisplay, Qt);
w->left_col = w->top_line = make_number (0);
if (CONSP (Vx_max_tooltip_size)
- && INTEGERP (XCAR (Vx_max_tooltip_size))
- && XINT (XCAR (Vx_max_tooltip_size)) > 0
- && INTEGERP (XCDR (Vx_max_tooltip_size))
- && XINT (XCDR (Vx_max_tooltip_size)) > 0)
+ && RANGED_INTEGERP (1, XCAR (Vx_max_tooltip_size), INT_MAX)
+ && RANGED_INTEGERP (1, XCDR (Vx_max_tooltip_size), INT_MAX))
{
w->total_cols = XCAR (Vx_max_tooltip_size);
w->total_lines = XCDR (Vx_max_tooltip_size);
Value is t if tooltip was open, nil otherwise. */)
(void)
{
- int count;
+ ptrdiff_t count;
Lisp_Object deleted, frame, timer;
struct gcpro gcpro1, gcpro2;
Arg al[10];
int ac = 0;
XmString dir_xmstring, pattern_xmstring;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
check_x ();
char *fn;
Lisp_Object file = Qnil;
Lisp_Object decoded_file;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
struct gcpro gcpro1, gcpro2, gcpro3, gcpro4, gcpro5, gcpro6;
char *cdef_file;
Lisp_Object font_param;
char *default_name = NULL;
struct gcpro gcpro1, gcpro2;
- int count = SPECPDL_INDEX ();
+ ptrdiff_t count = SPECPDL_INDEX ();
check_x ();