aboutsummaryrefslogtreecommitdiffstats
path: root/src/xterm.c
diff options
context:
space:
mode:
authorPaul Eggert2017-03-10 09:30:30 -0800
committerPaul Eggert2017-03-10 09:31:59 -0800
commitec168376d1d961be9adceaafcbff04d5b2b0a492 (patch)
treee714c3bc5e3c5323ddbf936c382a0ba079307618 /src/xterm.c
parent817c4d1a3055a12ab2f1a6a06479b5eb4d66286b (diff)
downloademacs-ec168376d1d961be9adceaafcbff04d5b2b0a492.tar.gz
emacs-ec168376d1d961be9adceaafcbff04d5b2b0a492.zip
Tweak X toolkit code to pacify modern GCC
* lwlib/lwlib-Xaw.c, lwlib/lwlib-Xm.c, lwlib/lwlib.c: Don’t include <stdlib.h>, since this code now calls emacs_abort rather than abort. * lwlib/lwlib-Xaw.c (make_dialog, xaw_generic_callback) (wm_delete_window): * lwlib/lwlib-Xm.c (make_menu_in_widget, do_call): * lwlib/lwlib.c (instantiate_widget_instance, lw_make_widget): * lwlib/xlwmenu.c (abort_gracefully, draw_separator) (separator_height, XlwMenuInitialize): Use emacs_abort, not abort. Without this change, some calls to ‘abort’ were invalid, as stdlib.h was not always included. * src/widget.c (resources, emacsFrameClassRec): * src/xfns.c (x_window) [USE_X_TOOLKIT]: * src/xmenu.c (create_and_show_popup_menu) [USE_X_TOOLKIT]: * src/xterm.c (emacs_options) [USE_X_TOOLKIT}: (x_term_init) [USE_X_TOOLKIT]: Cast string constants to char * to pacify --enable-gcc-warnings.
Diffstat (limited to 'src/xterm.c')
-rw-r--r--src/xterm.c35
1 files changed, 18 insertions, 17 deletions
diff --git a/src/xterm.c b/src/xterm.c
index 28faea14a3a..7856793f8dc 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -11671,20 +11671,21 @@ x_check_font (struct frame *f, struct font *font)
11671 11671
11672#ifdef USE_X_TOOLKIT 11672#ifdef USE_X_TOOLKIT
11673static XrmOptionDescRec emacs_options[] = { 11673static XrmOptionDescRec emacs_options[] = {
11674 {"-geometry", ".geometry", XrmoptionSepArg, NULL}, 11674 {(char *) "-geometry", (char *) ".geometry", XrmoptionSepArg, NULL},
11675 {"-iconic", ".iconic", XrmoptionNoArg, (XtPointer) "yes"}, 11675 {(char *) "-iconic", (char *) ".iconic", XrmoptionNoArg, (XtPointer) "yes"},
11676 11676
11677 {"-internal-border-width", "*EmacsScreen.internalBorderWidth", 11677 {(char *) "-internal-border-width",
11678 XrmoptionSepArg, NULL}, 11678 (char *) "*EmacsScreen.internalBorderWidth", XrmoptionSepArg, NULL},
11679 {"-ib", "*EmacsScreen.internalBorderWidth", XrmoptionSepArg, NULL}, 11679 {(char *) "-ib", (char *) "*EmacsScreen.internalBorderWidth",
11680 11680 XrmoptionSepArg, NULL},
11681 {"-T", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, 11681 {(char *) "-T", (char *) "*EmacsShell.title", XrmoptionSepArg, NULL},
11682 {"-wn", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, 11682 {(char *) "-wn", (char *) "*EmacsShell.title", XrmoptionSepArg, NULL},
11683 {"-title", "*EmacsShell.title", XrmoptionSepArg, (XtPointer) NULL}, 11683 {(char *) "-title", (char *) "*EmacsShell.title", XrmoptionSepArg, NULL},
11684 {"-iconname", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, 11684 {(char *) "-iconname", (char *) "*EmacsShell.iconName",
11685 {"-in", "*EmacsShell.iconName", XrmoptionSepArg, (XtPointer) NULL}, 11685 XrmoptionSepArg, NULL},
11686 {"-mc", "*pointerColor", XrmoptionSepArg, (XtPointer) NULL}, 11686 {(char *) "-in", (char *) "*EmacsShell.iconName", XrmoptionSepArg, NULL},
11687 {"-cr", "*cursorColor", XrmoptionSepArg, (XtPointer) NULL} 11687 {(char *) "-mc", (char *) "*pointerColor", XrmoptionSepArg, NULL},
11688 {(char *) "-cr", (char *) "*cursorColor", XrmoptionSepArg, NULL}
11688}; 11689};
11689 11690
11690/* Whether atimer for Xt timeouts is activated or not. */ 11691/* Whether atimer for Xt timeouts is activated or not. */
@@ -12002,11 +12003,11 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
12002 int argc = 0; 12003 int argc = 0;
12003 char *argv[3]; 12004 char *argv[3];
12004 12005
12005 argv[0] = ""; 12006 argv[0] = (char *) "";
12006 argc = 1; 12007 argc = 1;
12007 if (xrm_option) 12008 if (xrm_option)
12008 { 12009 {
12009 argv[argc++] = "-xrm"; 12010 argv[argc++] = (char *) "-xrm";
12010 argv[argc++] = xrm_option; 12011 argv[argc++] = xrm_option;
12011 } 12012 }
12012 turn_on_atimers (false); 12013 turn_on_atimers (false);
@@ -12384,7 +12385,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name)
12384 dpy = dpyinfo->display; 12385 dpy = dpyinfo->display;
12385 d.addr = (XPointer)&dpy; 12386 d.addr = (XPointer)&dpy;
12386 d.size = sizeof (Display *); 12387 d.size = sizeof (Display *);
12387 fr.addr = XtDefaultFont; 12388 fr.addr = (char *) XtDefaultFont;
12388 fr.size = sizeof (XtDefaultFont); 12389 fr.size = sizeof (XtDefaultFont);
12389 to.size = sizeof (Font *); 12390 to.size = sizeof (Font *);
12390 to.addr = (XPointer)&font; 12391 to.addr = (XPointer)&font;