#define MAXREQUEST(dpy) (XMaxRequestSize (dpy))
-/* The gray bitmap `bitmaps/gray'. This is done because xterm.c uses
- it, and including `bitmaps/gray' more than once is a problem when
- config.h defines `static' as an empty replacement string. */
-
-int gray_bitmap_width = gray_width;
-int gray_bitmap_height = gray_height;
-char *gray_bitmap_bits = gray_bits;
-
/* Nonzero if using X. */
-static int x_in_use;
+int x_in_use;
static Lisp_Object Qnone;
static Lisp_Object Qsuppress_icon;
if (FRAME_MINIBUF_ONLY_P (f))
return;
- if (INTEGERP (value))
+ if (TYPE_RANGED_INTEGERP (int, value))
nlines = XINT (value);
else
nlines = 0;
FRAME_EXTERNAL_MENU_BAR (f) = 1;
if (FRAME_X_P (f) && f->output_data.x->menubar_widget == 0)
/* Make sure next redisplay shows the menu bar. */
- XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
+ XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = 1;
}
else
{
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;
FRAME_EXTERNAL_TOOL_BAR (f) = 1;
if (FRAME_X_P (f) && f->output_data.x->toolbar_widget == 0)
/* Make sure next redisplay shows the tool bar. */
- XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = Qt;
+ XWINDOW (FRAME_SELECTED_WINDOW (f))->update_mode_line = 1;
update_frame_tool_bar (f);
}
else
/* Do some needed geometry management. */
{
- ptrdiff_t len;
char *tem, shell_position[sizeof "=x++" + 4 * INT_STRLEN_BOUND (int)];
Arg gal[10];
int gac = 0;
}
}
- len = strlen (shell_position) + 1;
/* We don't free this because we don't know whether
it is safe to free it while the frame exists.
It isn't worth the trouble of arranging to free it
when the frame is deleted. */
- tem = (char *) xmalloc (len);
- strncpy (tem, shell_position, len);
+ tem = (char *) xstrdup (shell_position);
XtSetArg (gal[gac], XtNgeometry, tem); gac++;
XtSetValues (shell_widget, gal, gac);
}
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;
could get an infloop in next_frame since the frame is not yet in
Vframe_list. */
{
- int count2 = SPECPDL_INDEX ();
+ ptrdiff_t count2 = SPECPDL_INDEX ();
record_unwind_protect (unwind_create_frame_1, inhibit_lisp_code);
inhibit_lisp_code = Qt;
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 ();