for the window manager, so GC relocation won't bother it.
Elsewhere we specify the window name for the window manager. */
-
- {
- char *str = SSDATA (Vx_resource_name);
- f->namebuf = xmalloc (strlen (str) + 1);
- strcpy (f->namebuf, str);
- }
+ f->namebuf = xstrdup (SSDATA (Vx_resource_name));
ac = 0;
XtSetArg (al[ac], XtNallowShellResize, 1); ac++;
/* maybe_set_screen_title_format (shell_widget); */
pane_widget = lw_create_widget ("main", "pane", widget_id_tick++,
- (widget_value *) NULL,
- shell_widget, False,
- (lw_callback) NULL,
- (lw_callback) NULL,
- (lw_callback) NULL,
- (lw_callback) NULL);
+ NULL, shell_widget, False,
+ NULL, NULL, NULL, NULL);
ac = 0;
XtSetArg (al[ac], XtNvisual, FRAME_X_VISUAL (f)); ac++;
*/
XChangeProperty (XtDisplay (frame_widget), XtWindow (frame_widget),
FRAME_X_DISPLAY_INFO (f)->Xatom_wm_protocols,
- XA_ATOM, 32, PropModeAppend,
- (unsigned char*) NULL, 0);
+ XA_ATOM, 32, PropModeAppend, NULL, 0);
/* Make all the standard events reach the Emacs frame. */
attributes.event_mask = STANDARD_EVENT_SET;
/ x_display_pixel_width (dpyinfo));
mm_height_per_pixel = ((double) HeightMMOfScreen (dpyinfo->screen)
/ x_display_pixel_height (dpyinfo));
- monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors));
+ monitors = xzalloc (n_monitors * sizeof *monitors);
for (i = 0; i < n_monitors; ++i)
{
struct MonitorInfo *mi = &monitors[i];
return Qnil;
}
n_monitors = resources->noutput;
- monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors));
+ monitors = xzalloc (n_monitors * sizeof *monitors);
#ifdef HAVE_XRRGETOUTPUTPRIMARY
pxid = XRRGetOutputPrimary (dpy, dpyinfo->root_window);
#endif
n_monitors = gdk_screen_get_n_monitors (gscreen);
monitor_frames = Fmake_vector (make_number (n_monitors), Qnil);
- monitors = (struct MonitorInfo *) xzalloc (n_monitors * sizeof (*monitors));
+ monitors = xzalloc (n_monitors * sizeof *monitors);
FOR_EACH_FRAME (rest, frame)
{
validate_x_resource_name ();
- dpyinfo = x_term_init (name, (char *)0,
- SSDATA (Vx_resource_name));
+ dpyinfo = x_term_init (name, 0, SSDATA (Vx_resource_name));
if (dpyinfo == 0)
error ("Cannot connect to X server %s", SDATA (name));
error ("Not using X Windows"); /* That doesn't stop us anymore. */
#endif
- if (! NILP (xrm_string))
- xrm_option = SSDATA (xrm_string);
- else
- xrm_option = (char *) 0;
+ xrm_option = NILP (xrm_string) ? 0 : SSDATA (xrm_string);
validate_x_resource_name ();
static void
file_dialog_cb (Widget widget, XtPointer client_data, XtPointer call_data)
{
- int *result = (int *) client_data;
- XmAnyCallbackStruct *cb = (XmAnyCallbackStruct *) call_data;
+ int *result = client_data;
+ XmAnyCallbackStruct *cb = call_data;
*result = cb->reason;
}
static void
file_dialog_unmap_cb (Widget widget, XtPointer client_data, XtPointer call_data)
{
- int *result = (int *) client_data;
+ int *result = client_data;
*result = XmCR_CANCEL;
}